pub fn send_arp_reply(&mut self, src_ip_addr: Ipv4Addr) -> io::Result<()> {
        // ARP
        let arp = Arp::new_reply(
            self.local_hardware_addr,
            self.local_ip_addr,
            *self
                .src_hardware_addr_map
                .get(&src_ip_addr)
                .unwrap_or(&pcap::HARDWARE_ADDR_UNSPECIFIED),
            src_ip_addr,
        );

        // Send
        self.send_ethernet(arp.dst_hardware_addr(), Layers::Arp(arp), None, None)
    }
/// Sends an ARP reply packet.
Sends an ARP reply packet.
Sends an ARP reply packet .
pub fn send_arp_reply(&mut self, src_ip_addr: Ipv4Addr) -> io::Result<()> {
        // ARP
        let arp = Arp::new_reply(
            self.local_hardware_addr,
            self.local_ip_addr,
            *self
                .src_hardware_addr_map
                .get(&src_ip_addr)
                .unwrap_or(&pcap::HARDWARE_ADDR_UNSPECIFIED),
            src_ip_addr,
        );
        // Send
        self.send_ethernet(arp.dst_hardware_addr(), Layers::Arp(arp), None, None)
    }
pub fn send_arp_reply ( & mut self , src_ip_addr : Ipv4Addr ) -> io :: Result < ( ) > { // ARP let arp = Arp :: new_reply ( self . local_hardware_addr , self . local_ip_addr , * self . src_hardware_addr_map . get ( & src_ip_addr ) . unwrap_or ( & pcap :: HARDWARE_ADDR_UNSPECIFIED ) , src_ip_addr , ) ; // Send self . send_ethernet ( arp . dst_hardware_addr ( ) , Layers :: Arp ( arp ) , None , None ) }
Sends an ARP reply packet.
Sends an ARP reply packet .
&mut self
src_ip_addr
Ipv4Addr
&mut self
src_ip_addr
Ipv4Addr