'Initialize this instance
use_bytearray: specifies capturing to bytearray buffers instead of bytes'

def __init__(self, device=None, promiscuous=True, period=10, start=True, callback=None, filter=None, use_bytearray=False, **kw):

    if (filter is not None):
        self.deferred_filter = (filter,)
    else:
        self.deferred_filter = None
    self.packets_received = 0
    self.packets_dropped = 0
    self._thread = None
    self.pcap = None
    self.promiscuous = promiscuous
    self.device = None
    self.use_bytearray = use_bytearray
    self.period = period
    self.netmask = IPAddr('0.0.0.0')
    self._quitting = False
    self.addresses = {}
    if (callback is None):
        self.callback = self.__class__._handle_rx
    else:
        self.callback = callback
    for (k, v) in kw.items():
        assert (not hasattr(self, k))
        setattr(self, k, v)
    if (device is not None):
        self.open(device)
    if (self.pcap is not None):
        if start:
            self.start()
