[x] Consider remembering some more info in Pcap and adding a useful __repr__ to it. – #16
[x] Consider auto-detection of the netmask in compile if possible. (Using lookupnet and remembering the device name in the Pcap struct? But what about when we don't have a device name (Offline capture/dead)? Should we then default to NETMASK_UNKNOWN or error?) – #16
[x] Add a ts_datetime/ts_utcdatetime to Pkthdr? (Should be aware or naive datetime?) – #19
[x] ~Can we use the Python buffer interface for __next__/loop/dispatch to save copying the packet to a bytes? Ownership is troublesome since the data is only valid until the next call to __next__ or returning from the callback. Also we want the returned object to have a nice interface and not be something that will always be immediately casted to bytes to make any use of it.~ – Moved to #20
[x] Add a set_?config?(snaplen=None, promisc=None, timeout_ms=None, ...) method to set per-activation configuration in one call. – #18
Ideas for improving the API:
Pcap
and adding a useful__repr__
to it. – #16netmask
incompile
if possible. (Usinglookupnet
and remembering the device name in the Pcap struct? But what about when we don't have a device name (Offline capture/dead)? Should we then default toNETMASK_UNKNOWN
or error?) – #16ts_datetime
/ts_utcdatetime
toPkthdr
? (Should be aware or naive datetime?) – #19__next__
/loop
/dispatch
to save copying the packet to abytes
? Ownership is troublesome since the data is only valid until the next call to__next__
or returning from the callback. Also we want the returned object to have a nice interface and not be something that will always be immediately casted to bytes to make any use of it.~ – Moved to #20set_?config?(snaplen=None, promisc=None, timeout_ms=None, ...)
method to set per-activation configuration in one call. – #18