layer3 Package

esp Module

Encapsulated Security Protocol.

class pypacker.layer3.esp.ESP(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('spi', 'I', 0), ('seq', 'I', 0))
seq = 0
spi = 0

icmp Module

Internet Control Message Protocol for IPv4.

class pypacker.layer3.icmp.ICMP(*args, **kwargs)

Bases: pypacker.pypacker.Packet

class Echo(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('id', 'H', 0), ('seq', 'H', 1), ('ts', 'd', 0))
id = 0
seq = 1
ts = 0
class ICMP.Redirect(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('gw', 'I', 0), ('seq', 'H', 0))
gw = 0
seq = 0
class ICMP.Unreach(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('pad', 'H', 0), ('mtu', 'H', 0))
mtu = 0
pad = 0
ICMP.__hdr__ = (('type', 'B', 8), ('code', 'B', 0), ('_sum', 'H', 0))
ICMP.bin()
ICMP.code = 0
ICMP.sum
ICMP.type = 8

icmp6 Module

Internet Control Message Protocol for IPv6.

class pypacker.layer3.icmp6.ICMP6(*args, **kwargs)

Bases: pypacker.pypacker.Packet

class Echo(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('id', 'H', 0), ('seq', 'H', 0))
id = 0
seq = 0
class ICMP6.Error(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('pad', 'I', 0),)
pad = 0
class ICMP6.ParamProb(*args, **kwargs)

Bases: pypacker.layer3.icmp6.Error

__hdr__ = (('ptr', 'I', 0),)
ptr = 0
class ICMP6.TimeExceed(*args, **kwargs)

Bases: pypacker.layer3.icmp6.Error

pad = 0
class ICMP6.TooBig(*args, **kwargs)

Bases: pypacker.layer3.icmp6.Error

__hdr__ = (('mtu', 'I', 1232),)
mtu = 1232
class ICMP6.Unreach(*args, **kwargs)

Bases: pypacker.layer3.icmp6.Error

pad = 0
ICMP6.__hdr__ = (('type', 'B', 0), ('code', 'B', 0), ('sum', 'H', 0))
ICMP6.code = 0
ICMP6.sum = 0
ICMP6.type = 0

igmp Module

Internet Group Management Protocol.

class pypacker.layer3.igmp.IGMP(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('type', 'B', 0), ('maxresp', 'B', 0), ('_sum', 'H', 0), ('group', 'I', 0))
bin()
group = 0
maxresp = 0
sum
type = 0

ip Module

Internet Protocol version 4.

RFC 791

class pypacker.layer3.ip.IP(*args, **kwargs)

Bases: pypacker.pypacker.Packet

Convenient access for: src[_s], dst[_s]

__hdr__ = (('v_hl', 'B', 69), ('tos', 'B', 0), ('_len', 'H', 20), ('id', 'H', 0), ('off', 'H', 0), ('ttl', 'B', 64), ('p', 'B', 6), ('_sum', 'H', 0), ('src', '4s', b'\x00\x00\x00\x00'), ('dst', '4s', b'\x00\x00\x00\x00'), ('opts', None, <class 'pypacker.layer3.ip.IPTriggerList'>))
bin()
dst = b'\x00\x00\x00\x00'
dst_s
hl
id = 0
len
off = 0
p = 6
src = b'\x00\x00\x00\x00'
src_s
sum
tos = 0
ttl = 64
v
v_hl = 69
class pypacker.layer3.ip.IPOptMulti(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('type', 'B', 0), ('len', 'B', 0))
len = 0
type = 0
class pypacker.layer3.ip.IPOptSingle(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('type', 'B', 0),)
type = 0
class pypacker.layer3.ip.IPTriggerList(lst=[], clz=None, packet=None)

Bases: pypacker.triggerlist.TriggerList

ip6 Module

Internet Protocol version 6..for whoever needs it (:

RFC 2460

class pypacker.layer3.ip6.IP6(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('v_fc_flow', 'I', 1610612736), ('dlen', 'H', 0), ('nxt', 'B', 0), ('hlim', 'B', 0), ('src', '16s', b''), ('dst', '16s', b''), ('opts', None, <class 'pypacker.triggerlist.TriggerList'>))
callback_impl(id)

Callback to get data needed for checksum-computation. Used id: ‘ip_src_dst_changed’

return – self.src, self.dst, self._header_changed

dlen = 0
dst = b''
fc
flow
hlim = 0
nxt = 0
src = b''
v
v_fc_flow = 1610612736
class pypacker.layer3.ip6.IP6AHHeader(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('nxt', 'B', 0), ('len', 'B', 0), ('resv', 'H', 0), ('spi', 'I', 0), ('seq', 'I', 0))
len = 0
nxt = 0
resv = 0
seq = 0
spi = 0
class pypacker.layer3.ip6.IP6DstOptsHeader(*args, **kwargs)

Bases: pypacker.layer3.ip6.IP6OptsHeader

len = 0
nxt = 0
class pypacker.layer3.ip6.IP6ESPHeader(*args, **kwargs)

Bases: pypacker.pypacker.Packet

class pypacker.layer3.ip6.IP6FragmentHeader(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('nxt', 'B', 0), ('resv', 'B', 0), ('frag_off_resv_m', 'H', 0), ('id', 'I', 0))
frag_off
frag_off_resv_m = 0
id = 0
m_flag
nxt = 0
resv = 0
class pypacker.layer3.ip6.IP6HopOptsHeader(*args, **kwargs)

Bases: pypacker.layer3.ip6.IP6OptsHeader

len = 0
nxt = 0
class pypacker.layer3.ip6.IP6Option(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('type', 'B', 0), ('len', 'B', 0))
len = 0
type = 0
class pypacker.layer3.ip6.IP6OptionPad(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('type', 'B', 0),)
type = 0
class pypacker.layer3.ip6.IP6OptsHeader(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('nxt', 'B', 0), ('len', 'B', 0), ('opts', None, <class 'pypacker.triggerlist.TriggerList'>))
len = 0
nxt = 0
class pypacker.layer3.ip6.IP6RoutingHeader(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('nxt', 'B', 0), ('len', 'B', 0), ('type', 'B', 0), ('segs_left', 'B', 0), ('rsvd_sl_bits', 'I', 0), ('addresses', None, <class 'pypacker.triggerlist.TriggerList'>))
len = 0
nxt = 0
rsvd_sl_bits = 0
segs_left = 0
sl_bits
type = 0

ip_shared Module

Shared constants for IPv4 and IPv6.

ipx Module

Internetwork Packet Exchange.

class pypacker.layer3.ipx.IPX(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('sum', 'H', 65535), ('len', 'H', 30), ('tc', 'B', 0), ('pt', 'B', 0), ('dst', '12s', b''), ('src', '12s', b''))
dst = b''
len = 30
pt = 0
src = b''
sum = 65535
tc = 0

ospf Module

Open Shortest Path First.

class pypacker.layer3.ospf.OSPF(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('v', 'B', 0), ('type', 'B', 0), ('len', 'H', 0), ('router', 'I', 0), ('area', 'I', 0), ('_sum', 'H', 0), ('atype', 'H', 0), ('auth', '8s', b''))
area = 0
atype = 0
auth = b''
bin()
len = 0
router = 0
sum
type = 0
v = 0

pim Module

Protocol Independent Multicast.

class pypacker.layer3.pim.PIM(*args, **kwargs)

Bases: pypacker.pypacker.Packet

__hdr__ = (('v_type', 'B', 32), ('rsvd', 'B', 0), ('_sum', 'H', 0))
bin()
rsvd = 0
sum
type
v
v_type = 32

Table Of Contents

This Page