pub struct EtherNeighborDiscovery(/* private fields */);Expand description
Ethernet neighbor discovery — newtype wrapper around HelloProtocol<EtherMedium>.
Implementations§
Source§impl EtherNeighborDiscovery
impl EtherNeighborDiscovery
Sourcepub fn new(
multicast_face_id: FaceId,
iface: impl Into<String>,
node_name: Name,
local_mac: MacAddr,
) -> Self
pub fn new( multicast_face_id: FaceId, iface: impl Into<String>, node_name: Name, local_mac: MacAddr, ) -> Self
Create a new instance with the default LAN profile.
Sourcepub fn new_with_config(
multicast_face_id: FaceId,
iface: impl Into<String>,
node_name: Name,
local_mac: MacAddr,
config: DiscoveryConfig,
) -> Self
pub fn new_with_config( multicast_face_id: FaceId, iface: impl Into<String>, node_name: Name, local_mac: MacAddr, config: DiscoveryConfig, ) -> Self
Create with an explicit DiscoveryConfig.
Sourcepub fn from_profile(
multicast_face_id: FaceId,
iface: impl Into<String>,
node_name: Name,
local_mac: MacAddr,
profile: &DiscoveryProfile,
) -> Self
pub fn from_profile( multicast_face_id: FaceId, iface: impl Into<String>, node_name: Name, local_mac: MacAddr, profile: &DiscoveryProfile, ) -> Self
Create with a named deployment profile.
Methods from Deref<Target = HelloProtocol<EtherMedium>>§
Sourcepub fn set_served_prefixes(&self, prefixes: Vec<Name>)
pub fn set_served_prefixes(&self, prefixes: Vec<Name>)
Set the prefixes this node serves (announced in Hello Data when InHello mode).
pub fn build_hello_interest(&self, nonce: u32) -> Bytes
Sourcepub fn build_hello_payload(&self) -> HelloPayload
pub fn build_hello_payload(&self) -> HelloPayload
Build a HelloPayload from the current shared state.
Called by LinkMedium::build_hello_data to get the payload content
before applying link-specific signing.
Trait Implementations§
Source§impl Deref for EtherNeighborDiscovery
impl Deref for EtherNeighborDiscovery
Source§type Target = HelloProtocol<EtherMedium>
type Target = HelloProtocol<EtherMedium>
The resulting type after dereferencing.
Source§impl DerefMut for EtherNeighborDiscovery
impl DerefMut for EtherNeighborDiscovery
Source§impl DiscoveryProtocol for EtherNeighborDiscovery
impl DiscoveryProtocol for EtherNeighborDiscovery
Source§fn protocol_id(&self) -> ProtocolId
fn protocol_id(&self) -> ProtocolId
Unique protocol identifier.
Source§fn claimed_prefixes(&self) -> &[Name]
fn claimed_prefixes(&self) -> &[Name]
NDN name prefixes this protocol reserves. Read more
Source§fn tick_interval(&self) -> Duration
fn tick_interval(&self) -> Duration
How often the engine should call
on_tick. Read moreSource§fn on_face_up(&self, face_id: FaceId, ctx: &dyn DiscoveryContext)
fn on_face_up(&self, face_id: FaceId, ctx: &dyn DiscoveryContext)
Called when a new face comes up (after
FaceTable::insert).Source§fn on_face_down(&self, face_id: FaceId, ctx: &dyn DiscoveryContext)
fn on_face_down(&self, face_id: FaceId, ctx: &dyn DiscoveryContext)
Called when a face goes down (before
FaceTable::remove).Source§fn on_inbound(
&self,
raw: &Bytes,
incoming_face: FaceId,
meta: &InboundMeta,
ctx: &dyn DiscoveryContext,
) -> bool
fn on_inbound( &self, raw: &Bytes, incoming_face: FaceId, meta: &InboundMeta, ctx: &dyn DiscoveryContext, ) -> bool
Called for every inbound raw packet before it enters the pipeline. Read more
Auto Trait Implementations§
impl !Freeze for EtherNeighborDiscovery
impl RefUnwindSafe for EtherNeighborDiscovery
impl Send for EtherNeighborDiscovery
impl Sync for EtherNeighborDiscovery
impl Unpin for EtherNeighborDiscovery
impl UnwindSafe for EtherNeighborDiscovery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more