示例#1
0
 def resume_sniffing(self):
     """
     Tell the sniffer associated with this NetworkInterface to resume sniffing for network traffic on
     the NetworkInterface's physical interface.
     """
     if self.__sniffer.is_defunct():
         self.__sniffer = Sniffer(self)
         
     if not self.__sniffer.isAlive():
         self.__sniffer.start()
     else:
         self.__sniffer.resume()
示例#2
0
    def __init__(self, interface, ll_addr):
        """
        Prepares a new NetworkInterface, ready to send packets to a
        particular physical interface.
        
        Expected Attributes:
         interface  the physical interface on which to send/receive
                    packets
        """
        self.__interface = interface
        self.__ll_addr = ll_addr
        self.__sniffer = Sniffer(self)

        self.__on_receive_callbacks = []