scapy.layers.dot15d4

Wireless MAC according to IEEE 802.15.4.

class scapy.layers.dot15d4.Dot15d4

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
Dot15d4 fields

fcf_reserved_1

BitField (1 bit)

0

fcf_panidcompress

BitEnumField (1 bit)

0

fcf_ackreq

BitEnumField (1 bit)

0

fcf_pending

BitEnumField (1 bit)

0

fcf_security

BitEnumField (1 bit)

0

fcf_frametype

BitEnumField (3 bits)

0

fcf_srcaddrmode

BitEnumField (2 bits)

0

fcf_framever

BitField (2 bits)

0

fcf_destaddrmode

BitEnumField (2 bits)

2

fcf_reserved_2

BitField (2 bits)

0

seqnum

ByteField

1

guess_payload_class(payload)
mysummary()
payload_guess

Possible sublayers: Dot15d4Ack, Dot15d4Beacon, Dot15d4Cmd, Dot15d4Data

post_build(p, pay)
class scapy.layers.dot15d4.Dot15d4Ack

Bases: scapy.packet.Packet

aliastypes
fields_desc
class scapy.layers.dot15d4.Dot15d4AuxSecurityHeader

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4AuxSecurityHeader fields

sec_sc_reserved

BitField (3 bits)

0

sec_sc_keyidmode

BitEnumField (2 bits)

0

sec_sc_seclevel

BitEnumField (3 bits)

0

sec_framecounter

XLEIntField

0

sec_keyid_keysource

XLEIntField (Cond)

0

sec_keyid_keysource

LELongField (Cond)

0

sec_keyid_keyindex

XByteField (Cond)

255

class scapy.layers.dot15d4.Dot15d4Beacon

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4Beacon fields

src_panid

XLEShortField

0

src_addr

dot15d4AddressField

None

aux_sec_header

PacketField (Cond)

<Dot15d4AuxSecurityHeader  |>

sf_sforder

BitField (4 bits)

15

sf_beaconorder

BitField (4 bits)

15

sf_assocpermit

BitEnumField (1 bit)

0

sf_pancoord

BitEnumField (1 bit)

0

sf_reserved

BitField (1 bit)

0

sf_battlifeextend

BitEnumField (1 bit)

0

sf_finalcapslot

BitField (4 bits)

15

gts_spec_permit

BitEnumField (1 bit)

1

gts_spec_reserved

BitField (4 bits)

0

gts_spec_desccount

BitField (3 bits)

0

gts_dir_reserved

BitField (Cond) (1 bit)

0

gts_dir_mask

BitField (Cond) (7 bits)

0

pa_num_short

BitField (3 bits)

0

pa_reserved_1

BitField (1 bit)

0

pa_num_long

BitField (3 bits)

0

pa_reserved_2

BitField (1 bit)

0

mysummary()
payload_guess

Possible sublayers: ZigBeeBeacon

class scapy.layers.dot15d4.Dot15d4Cmd

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4Cmd fields

dest_panid

XLEShortField

65535

dest_addr

dot15d4AddressField

0

src_panid

XLEShortField (Cond)

0

src_addr

dot15d4AddressField (Cond)

None

aux_sec_header

PacketField (Cond)

<Dot15d4AuxSecurityHeader  |>

cmd_id

ByteEnumField

0

guess_payload_class(payload)
mysummary()
class scapy.layers.dot15d4.Dot15d4CmdAssocReq

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4CmdAssocReq fields

allocate_address

BitField (1 bit)

0

security_capability

BitField (1 bit)

0

reserved2

BitField (1 bit)

0

reserved1

BitField (1 bit)

0

receiver_on_when_idle

BitField (1 bit)

0

power_source

BitField (1 bit)

0

device_type

BitField (1 bit)

0

alternate_pan_coordinator

BitField (1 bit)

0

mysummary()
class scapy.layers.dot15d4.Dot15d4CmdAssocResp

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4CmdAssocResp fields

short_address

XLEShortField

65535

association_status

ByteEnumField

0

mysummary()
class scapy.layers.dot15d4.Dot15d4CmdCoordRealign

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4CmdCoordRealign fields

panid

XLEShortField

65535

coord_address

XLEShortField

0

channel

ByteField

0

dev_address

XLEShortField

65535

mysummary()
class scapy.layers.dot15d4.Dot15d4CmdDisassociation

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4CmdDisassociation fields

disassociation_reason

ByteEnumField

2

mysummary()
class scapy.layers.dot15d4.Dot15d4CmdGTSReq

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4CmdGTSReq fields

reserved

BitField (2 bits)

0

charact_type

BitField (1 bit)

0

gts_dir

BitField (1 bit)

0

gts_len

BitField (4 bits)

0

mysummary()
class scapy.layers.dot15d4.Dot15d4Data

Bases: scapy.packet.Packet

aliastypes
fields_desc
Dot15d4Data fields

dest_panid

XLEShortField

65535

dest_addr

dot15d4AddressField

65535

src_panid

XLEShortField (Cond)

0

src_addr

dot15d4AddressField (Cond)

None

aux_sec_header

PacketField (Cond)

<Dot15d4AuxSecurityHeader  |>

guess_payload_class(payload)
mysummary()
class scapy.layers.dot15d4.Dot15d4FCS

Bases: scapy.layers.dot15d4.Dot15d4

This class is a drop-in replacement for the Dot15d4 class above, except it expects a FCS/checksum in the input, and produces one in the output. This provides the user flexibility, as many 802.15.4 interfaces will have an AUTO_CRC setting # noqa: E501 that will validate the FCS/CRC in firmware, and add it automatically when transmitting. # noqa: E501

aliastypes
compute_fcs(data)
fields_desc
Dot15d4FCS fields

fcf_reserved_1

BitField (1 bit)

0

fcf_panidcompress

BitEnumField (1 bit)

0

fcf_ackreq

BitEnumField (1 bit)

0

fcf_pending

BitEnumField (1 bit)

0

fcf_security

BitEnumField (1 bit)

0

fcf_frametype

BitEnumField (3 bits)

0

fcf_srcaddrmode

BitEnumField (2 bits)

0

fcf_framever

BitField (2 bits)

0

fcf_destaddrmode

BitEnumField (2 bits)

2

fcf_reserved_2

BitField (2 bits)

0

seqnum

ByteField

1

fcs

FCSField

None

match_subclass = True
post_build(p, pay)
class scapy.layers.dot15d4.dot15d4AddressField(name, default, length_of=None, fmt='<H', adjust=None)

Bases: scapy.fields.Field

addfield(pkt, s, val)

Add an internal value to a string

adjust
getfield(pkt, s)
i2repr(pkt, x)

Convert internal value to a nice representation

lengthFromAddrMode(pkt, x)
length_of
scapy.layers.dot15d4.util_srcpanid_present(pkt)

A source PAN ID is included if and only if both src addr mode != 0 and PAN ID Compression in FCF == 0