'socket is the socket to be wrapped.
outstream is the stream to write the PCAP trace to.
Ethernet addresses have to be faked, and it can be convenient to
fake IP and TCP addresses as well.  Thus, you can specify local_addrs
or remote_addrs.  These are tuples of (EthAddr, IPAddr, TCPPort).
Any item that is None gets a default value.'

def __init__(self, socket, outstream, close=True, local_addrs=(None, None, None), remote_addrs=(None, None, None)):

    super(CaptureSocket, self).__init__(socket)
    self._close = close
    self._writer = PCapWriter(outstream, socket=socket, local_addrs=local_addrs, remote_addrs=remote_addrs)
