Skip to content

v0.2.0

Compare
Choose a tag to compare
@segevfiner segevfiner released this 15 Nov 12:56

Added

  • Wheels for Windows, Linux & macOS.
  • Pkthdr can be created from Python and is mutable (Useful for bpf.offline_filter).
  • Add BpfProgram.dumps/BpfProgram.loads to dump and load the filter in the format used by
    iptables, tc-bpf, etc.
  • Pcap now has a __repr__.
  • Pcap now has a type and source attributes.
  • Add PcapType for indicating the type of a Pcap.
  • Pkthdr.ts_datetime & Pkthdr.ts_utcdatetime that return Pkthdr.ts as a naive
    datetime.
  • Pcap.set_pre_config & Pcap.set_config shortcuts to set Pcap configuration via keyword
    arguments.

Changed

  • Change findalldevs interface address parsing to use the same format as the socket
    module and add support for AF_PACKET sockaddr_ll used in Linux.
  • Addresses in PcapIf.addresses/PcapAddr will now be in the format
    Tuple[socket.AddressFamily, <sockaddr tuple>].
  • BpfProgram.dump renamed to BpfProgram.debug_dump.
  • set_timeout & open_live now accept Python style float seconds instead of milliseconds.
  • The netmask argument to Pcap.compile is now optional, the package will try to figure out
    the correct value by itself.