pub fn send_arp_reply(&mut self) -> io::Result<()> {
        // ARP
        let arp = Arp::new_reply(
            self.local_hardware_addr,
            self.local_ip_addr,
            self.src_hardware_addr,
            self.src_ip_addr,
        );

        // Ethernet
        let ethernet = Ethernet::new(
            arp.get_type(),
            arp.get_src_hardware_addr(),
            arp.get_dst_hardware_addr(),
        )
        .unwrap();

        // Indicator
        let indicator = Indicator::new(Layers::Ethernet(ethernet), Some(Layers::Arp(arp)), None);

        // Send
        self.send(&indicator)
    }
/// Sends an ARP reply packet.
Sends an ARP reply packet.
Sends an ARP reply packet .
pub fn send_arp_reply(&mut self) -> io::Result<()> {
        // ARP
        let arp = Arp::new_reply(
            self.local_hardware_addr,
            self.local_ip_addr,
            self.src_hardware_addr,
            self.src_ip_addr,
        );
        // Ethernet
        let ethernet = Ethernet::new(
            arp.get_type(),
            arp.get_src_hardware_addr(),
            arp.get_dst_hardware_addr(),
        )
        .unwrap();
        // Indicator
        let indicator = Indicator::new(Layers::Ethernet(ethernet), Some(Layers::Arp(arp)), None);
        // Send
        self.send(&indicator)
    }
pub fn send_arp_reply ( & mut self ) -> io :: Result < ( ) > { // ARP let arp = Arp :: new_reply ( self . local_hardware_addr , self . local_ip_addr , self . src_hardware_addr , self . src_ip_addr , ) ; // Ethernet let ethernet = Ethernet :: new ( arp . get_type ( ) , arp . get_src_hardware_addr ( ) , arp . get_dst_hardware_addr ( ) , ) . unwrap ( ) ; // Indicator let indicator = Indicator :: new ( Layers :: Ethernet ( ethernet ) , Some ( Layers :: Arp ( arp ) ) , None ) ; // Send self . send ( & indicator ) }
Sends an ARP reply packet.
Sends an ARP reply packet .
&mut self