Пример #1
0
 def __init__(self, name, ingress_queue, symod=None):
     LLNetBase.__init__(self)
     self.__ingress_queue = ingress_queue
     self.__egress_pipes = {}
     self.__name = name
     self.__interfaces = {}
     self.__symod = symod
     self.__done = False
     self.__linkem = None
     self.__tolinkem = None
     self.__recv_monitors = {'host': NullMonitor()}
     self.__t = None
Пример #2
0
 def __init__(self, name, ingress_queue, symod=None):
     LLNetBase.__init__(self)
     self.__ingress_queue = ingress_queue
     self.__egress_pipes = {}
     self.__name = name
     self.__interfaces = {}
     self.__symod = symod
     self.__done = False
     self.__linkem = None
     self.__tolinkem = None
     self.__recv_monitors = {"host": NullMonitor()}
     self.__t = None
Пример #3
0
    def __init__(self, devlist, name=None):
        LLNetBase.__init__(self)
        signal.signal(signal.SIGINT, self._sig_handler)
        signal.signal(signal.SIGTERM, self._sig_handler)
        signal.signal(signal.SIGHUP, self._sig_handler)
        signal.signal(signal.SIGUSR1, self._sig_handler)
        signal.signal(signal.SIGUSR2, self._sig_handler)

        self.devs = devlist # self.__initialize_devices(includelist, excludelist)
        self.devinfo = self.__assemble_devinfo()
        self.pcaps = {}
        self.__make_pcaps()
        log_info("Using network devices: {}".format(' '.join(self.devs)))
        for devname, intf in self.devinfo.items():
            log_debug("{}: {}".format(devname, str(intf)))

        PyLLNet.running = True
        self.__spawn_threads()

        if name:
            self.__name = name
        else:
            self.__name = gethostname()
    def __init__(self, devlist, name=None):
        LLNetBase.__init__(self)
        signal.signal(signal.SIGINT, self._sig_handler)
        signal.signal(signal.SIGTERM, self._sig_handler)
        signal.signal(signal.SIGHUP, self._sig_handler)
        signal.signal(signal.SIGUSR1, self._sig_handler)
        signal.signal(signal.SIGUSR2, self._sig_handler)

        self.devs = devlist  # self.__initialize_devices(includelist, excludelist)
        self.devinfo = self.__assemble_devinfo()
        self.pcaps = {}
        self.__make_pcaps()
        log_info("Using network devices: {}".format(' '.join(self.devs)))
        for devname, intf in self.devinfo.items():
            log_debug("{}: {}".format(devname, str(intf)))

        PyLLNet.running = True
        self.__spawn_threads()

        if name:
            self.__name = name
        else:
            self.__name = gethostname()