Package dpkt :: Module pcap :: Class Reader
[hide private]
[frames] | no frames]

Class Reader

source code

object --+
         |
        Reader

Simple pypcap-compatible pcap file reader.

TODO: Longer class information....

Attributes:
    __hdr__: Header fields of simple pypcap-compatible pcap file reader.
    TODO.

Instance Methods [hide private]
 
__init__(self, fileobj)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
fileno(self) source code
 
datalink(self) source code
 
setfilter(self, value, optimize=1) source code
 
readpkts(self) source code
 
__next__(self) source code
 
dispatch(self, cnt, callback, *args)
Collect and process packets with a user callback.
source code
 
loop(self, callback, *args) source code
 
__iter__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  fd

Inherited from object: __class__

Method Details [hide private]

__init__(self, fileobj)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

dispatch(self, cnt, callback, *args)

source code 
Collect and process packets with a user callback.

Return the number of packets processed, or 0 for a savefile.

Arguments:

cnt      -- number of packets to process;
            or 0 to process all packets until EOF
callback -- function with (timestamp, pkt, *args) prototype
*args    -- optional arguments passed to callback on execution


Property Details [hide private]

fd

Get Method:
unreachable.fd(self)