Python scapy.arch.pcapdnet.open_pcap() Examples

The following are 1 code examples of scapy.arch.pcapdnet.open_pcap(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module scapy.arch.pcapdnet , or try the search function .
Example #1
Source File: frameio.py    From voltha with Apache License 2.0 5 votes vote down vote up
def open_socket(self, iface_name):
        sin = pcapdnet.open_pcap(iface_name, 1600, 1, 100)
        try:
            fcntl.ioctl(sin.fileno(), BIOCIMMEDIATE, struct.pack("I",1))
        except:
            pass

        # need a different kind of socket for sending out
        self.sout = dnet.eth(iface_name)

        return sin