pub struct EtherMedium { /* private fields */ }Expand description
Ethernet-specific link medium for HelloProtocol.
Handles unsigned hello Data, MAC address extraction from inbound
metadata, passive detection of new MACs, and unicast face creation
via NamedEtherFace.
Trait Implementations§
Source§impl LinkMedium for EtherMedium
impl LinkMedium for EtherMedium
Source§fn protocol_id(&self) -> ProtocolId
fn protocol_id(&self) -> ProtocolId
Protocol identifier (e.g.
"udp-nd", "ether-nd").Source§fn build_hello_data(&self, core: &HelloCore, interest_name: &Name) -> Bytes
fn build_hello_data(&self, core: &HelloCore, interest_name: &Name) -> Bytes
Build the hello Data reply for the given Interest name. Read more
Source§fn handle_hello_interest(
&self,
raw: &Bytes,
_incoming_face: FaceId,
meta: &InboundMeta,
core: &HelloCore,
ctx: &dyn DiscoveryContext,
) -> bool
fn handle_hello_interest( &self, raw: &Bytes, _incoming_face: FaceId, meta: &InboundMeta, core: &HelloCore, ctx: &dyn DiscoveryContext, ) -> bool
Handle a hello Interest (link-specific dispatch). Read more
Source§fn verify_and_ensure_peer(
&self,
_raw: &Bytes,
payload: &HelloPayload,
meta: &InboundMeta,
_core: &HelloCore,
ctx: &dyn DiscoveryContext,
) -> Option<(Name, Option<FaceId>)>
fn verify_and_ensure_peer( &self, _raw: &Bytes, payload: &HelloPayload, meta: &InboundMeta, _core: &HelloCore, ctx: &dyn DiscoveryContext, ) -> Option<(Name, Option<FaceId>)>
Verify signature (if applicable), extract source address, and ensure
a unicast face to the peer exists. Read more
Source§fn send_multicast(&self, ctx: &dyn DiscoveryContext, pkt: Bytes)
fn send_multicast(&self, ctx: &dyn DiscoveryContext, pkt: Bytes)
Send a packet on all multicast face(s).
Source§fn is_multicast_face(&self, face_id: FaceId) -> bool
fn is_multicast_face(&self, face_id: FaceId) -> bool
Whether
face_id is one of this medium’s multicast faces.Source§fn on_face_down(
&self,
_face_id: FaceId,
_state: &mut HelloState,
_ctx: &dyn DiscoveryContext,
)
fn on_face_down( &self, _face_id: FaceId, _state: &mut HelloState, _ctx: &dyn DiscoveryContext, )
Handle face-down event (clean up link-specific state).
Source§fn on_peer_removed(&self, _entry: &NeighborEntry, _state: &mut HelloState)
fn on_peer_removed(&self, _entry: &NeighborEntry, _state: &mut HelloState)
Clean up link-specific state when a peer is being removed
(reached miss_limit in the liveness state machine).
Auto Trait Implementations§
impl Freeze for EtherMedium
impl RefUnwindSafe for EtherMedium
impl Send for EtherMedium
impl Sync for EtherMedium
impl Unpin for EtherMedium
impl UnwindSafe for EtherMedium
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