Package dpkt :: Module pcapng
[hide private]
[frames] | no frames]

Module pcapng

source code

pcap Next Generation file format

Classes [hide private]
  _PcapngBlock
Base class for a pcapng block with Options
  PcapngBlockLE
  PcapngOption
A single Option
  PcapngOptionLE
  SectionHeaderBlock
Section Header block
  SectionHeaderBlockLE
  InterfaceDescriptionBlock
Interface Description block
  InterfaceDescriptionBlockLE
  EnhancedPacketBlock
Enhanced Packet block
  EnhancedPacketBlockLE
  Writer
Simple pcapng dumpfile writer.
  Reader
Simple pypcap-compatible pcapng file reader.
Functions [hide private]
 
_swap32b(i)
Swap endianness of an uint32
source code
 
_align32b(i)
Return int `i` aligned to the 32-bit boundary
source code
 
_padded(s)
Return bytes `s` padded with zeroes to align to the 32-bit boundary
source code
 
_padlen(s)
Return size of padding required to align str `s` to the 32-bit boundary
source code
 
test_shb()
Test SHB with options
source code
 
test_idb()
Test IDB with options
source code
 
test_epb()
Test EPB with a non-ascii comment option
source code
 
test_simple_write_read()
Test writing a basic pcapng and then reading it
source code
 
test_custom_read_write()
Test a full pcapng file with 1 ICMP packet
source code
Variables [hide private]
  BYTE_ORDER_MAGIC = 439041101
  BYTE_ORDER_MAGIC_LE = 1295788826
  PCAPNG_VERSION_MAJOR = 1
  PCAPNG_VERSION_MINOR = 0
  PCAPNG_BT_IDB = 1
  PCAPNG_BT_PB = 2
  PCAPNG_BT_SPB = 3
  PCAPNG_BT_EPB = 6
  PCAPNG_BT_SHB = 168627466
  PCAPNG_OPT_ENDOFOPT = 0
  PCAPNG_OPT_COMMENT = 1
  PCAPNG_OPT_SHB_HARDWARE = 2
  PCAPNG_OPT_SHB_OS = 3
  PCAPNG_OPT_SHB_USERAPPL = 4
  PCAPNG_OPT_IF_NAME = 2
  PCAPNG_OPT_IF_DESCRIPTION = 3
  PCAPNG_OPT_IF_IPV4ADDR = 4
  PCAPNG_OPT_IF_IPV6ADDR = 5
  PCAPNG_OPT_IF_MACADDR = 6
  PCAPNG_OPT_IF_EUIADDR = 7
  PCAPNG_OPT_IF_SPEED = 8
  PCAPNG_OPT_IF_TSRESOL = 9
  PCAPNG_OPT_IF_TZONE = 10
  PCAPNG_OPT_IF_FILTER = 11
  PCAPNG_OPT_IF_OS = 12
  PCAPNG_OPT_IF_FCSLEN = 13
  PCAPNG_OPT_IF_TSOFFSET = 14
  DLT_NULL = 0
  DLT_EN10MB = 1
  DLT_EN3MB = 2
  DLT_AX25 = 3
  DLT_PRONET = 4
  DLT_CHAOS = 5
  DLT_IEEE802 = 6
  DLT_ARCNET = 7
  DLT_SLIP = 8
  DLT_PPP = 9
  DLT_FDDI = 10
  DLT_PFSYNC = 18
  DLT_IEEE802_11 = 105
  DLT_LINUX_SLL = 113
  DLT_PFLOG = 117
  DLT_IEEE802_11_RADIO = 127
  DLT_LOOP = 108
  DLT_RAW = 12
  dltoff = {0: 4, 1: 14, 6: 22, 7: 6, 8: 16, 9: 4, 10: 21, 18: 4...
  __package__ = 'dpkt'
Variables Details [hide private]

dltoff

Value:
{0: 4,
 1: 14,
 6: 22,
 7: 6,
 8: 16,
 9: 4,
 10: 21,
 18: 4,
...