Trait ArpIpLayerContext

Source
pub trait ArpIpLayerContext<D: ArpDevice, BC>: DeviceIdContext<D> {
    // Required method
    fn on_arp_packet(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
        sender_addr: Ipv4Addr,
        target_addr: Ipv4Addr,
    ) -> IpAddressState;
}
Expand description

An execution context for ARP providing functionality from the IP layer.

Required Methods§

Source

fn on_arp_packet( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, sender_addr: Ipv4Addr, target_addr: Ipv4Addr, ) -> IpAddressState

Dispatches a received ARP Request or Reply to the IP layer.

The IP layer may use this packet to update internal state, such as facilitating Address Conflict Detection (RFC 5227).

Returns the IpAddressState of the target_addr on device. This is used by ARP to send responses to the packet (if applicable).

Implementors§