scapy.layers.zigbee

ZigBee bindings for IEEE 802.15.4.

class scapy.layers.zigbee.LinkStatusEntry

Bases: scapy.packet.Packet

aliastypes
fields_desc
LinkStatusEntry fields

neighbor_network_address

XLEShortField

0

reserved1

BitField (1 bit)

0

outgoing_cost

BitField (3 bits)

0

reserved2

BitField (1 bit)

0

incoming_cost

BitField (3 bits)

0

class scapy.layers.zigbee.ZCLGeneralReadAttributes

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZCLGeneralReadAttributes fields

attribute_identifiers

FieldListField

[]

class scapy.layers.zigbee.ZCLGeneralReadAttributesResponse

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZCLGeneralReadAttributesResponse fields

read_attribute_status_record

PacketListField

[]

class scapy.layers.zigbee.ZCLMeteringGetProfile

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZCLMeteringGetProfile fields

Interval_Channel

ByteField

0

End_Time

XLEIntField

0

NumberOfPeriods

ByteField

1

class scapy.layers.zigbee.ZCLPriceGetCurrentPrice

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZCLPriceGetCurrentPrice fields

reserved

BitField (7 bits)

0

Requestor_Rx_On_When_Idle

BitField (1 bit)

0

class scapy.layers.zigbee.ZCLPriceGetScheduledPrices

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZCLPriceGetScheduledPrices fields

start_time

XLEIntField

0

number_of_events

ByteField

0

class scapy.layers.zigbee.ZCLPricePublishPrice

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZCLPricePublishPrice fields

provider_id

XLEIntField

0

rate_label

StrLenField

b''

issuer_event_id

XLEIntField

0

current_time

XLEIntField

0

unit_of_measure

ByteField

0

currency

XLEShortField

0

price_trailing_digit

ByteField

0

number_of_price_tiers

ByteField

0

start_time

XLEIntField

0

duration_in_minutes

XLEShortField

0

price

XLEIntField

0

price_ratio

ByteField

0

generation_price

XLEIntField

0

generation_price_ratio

ByteField

0

alternate_cost_delivered

XLEIntField

0

alternate_cost_unit

ByteField

0

alternate_cost_trailing_digit

ByteField

0

number_of_block_thresholds

ByteField

0

price_control

ByteField

0

class scapy.layers.zigbee.ZCLReadAttributeStatusRecord

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ZCLReadAttributeStatusRecord fields

attribute_identifier

XLEShortField

0

status

ByteEnumField

0

attribute_data_type

ByteEnumField (Cond)

0

attribute_value

_DiscreteString (Cond)

b''

class scapy.layers.zigbee.ZEP1

Bases: scapy.layers.zigbee.ZEP2

aliastypes
fields_desc
ZEP1 fields

preamble

StrFixedLenField

b'EX'

ver

ByteField

0

channel

ByteField

0

device

ShortField

0

lqi_mode

ByteField

0

lqi_val

ByteField

0

res

BitField (56 bits)

0

len

ByteField

0

class scapy.layers.zigbee.ZEP2

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=b'', *args, **kargs)
fields_desc
ZEP2 fields

preamble

StrFixedLenField

b'EX'

ver

ByteField

0

type

ByteField

0

channel

ByteField

0

device

ShortField

0

lqi_mode

ByteField

1

lqi_val

ByteField

0

timestamp

TimeStampField (64 bits)

0

seq

IntField

0

res

BitField (80 bits)

0

length

ByteField

0

guess_payload_class(payload)
class scapy.layers.zigbee.ZigBeeBeacon

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigBeeBeacon fields

proto_id

ByteField

0

nwkc_protocol_version

BitField (4 bits)

0

stack_profile

BitField (4 bits)

0

end_device_capacity

BitField (1 bit)

0

device_depth

BitField (4 bits)

0

router_capacity

BitField (1 bit)

0

reserved

BitField (2 bits)

0

extended_pan_id

dot15d4AddressField

0

tx_offset

BitField (24 bits)

0

update_id

ByteField

0

class scapy.layers.zigbee.ZigbeeAppCommandPayload

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeAppCommandPayload fields

cmd_identifier

ByteEnumField

1

initiator

dot15d4AddressField (Cond)

0

responder

dot15d4AddressField (Cond)

0

data

StrFixedLenField (Cond)

0

key_type

ByteEnumField (Cond)

0

key

StrFixedLenField (Cond)

None

key_seqnum

ByteField (Cond)

0

dest_addr

dot15d4AddressField (Cond)

0

src_addr

dot15d4AddressField (Cond)

0

address

dot15d4AddressField (Cond)

0

short_address

XLEShortField (Cond)

0

status

ByteField (Cond)

0

address

dot15d4AddressField (Cond)

0

key_type

ByteEnumField (Cond)

0

key

StrFixedLenField (Cond)

None

seqnum

StrFixedLenField (Cond)

None

data

StrField (Cond)

b''

class scapy.layers.zigbee.ZigbeeAppDataPayload

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeAppDataPayload fields

frame_control

FlagsField (4 bits)

<Flag 2 (security)>

delivery_mode

BitEnumField (2 bits)

0

aps_frametype

BitEnumField (2 bits)

0

dst_endpoint

ByteField (Cond)

10

cluster

EnumField (Cond)

0

profile

EnumField (Cond)

0

src_endpoint

ByteField (Cond)

10

counter

ByteField

0

fragmentation

ByteEnumField (Cond)

0

block_number

ByteField (Cond)

0

guess_payload_class(payload)
payload_guess

Possible sublayers: ZigbeeAppCommandPayload

class scapy.layers.zigbee.ZigbeeAppDataPayloadStub

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeAppDataPayloadStub fields

frame_control

FlagsField (4 bits)

<Flag 0 ()>

delivery_mode

BitEnumField (2 bits)

0

frametype

BitField (2 bits)

3

group_addr

XLEShortField (Cond)

0

cluster

EnumField

0

profile

EnumField

0

data

StrField (Cond)

b''

class scapy.layers.zigbee.ZigbeeClusterLibrary

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeClusterLibrary fields

reserved

BitField (3 bits)

0

disable_default_response

BitField (1 bit)

0

direction

BitField (1 bit)

0

manufacturer_specific

BitField (1 bit)

0

zcl_frametype

BitEnumField (2 bits)

0

manufacturer_code

XLEShortField (Cond)

0

transaction_sequence

ByteField

0

command_identifier

ByteEnumField

0

guess_payload_class(payload)
payload_guess

Possible sublayers: ZCLGeneralReadAttributesResponse, ZCLGeneralReadAttributes

class scapy.layers.zigbee.ZigbeeNWK

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeNWK fields

discover_route

BitField (2 bits)

0

proto_version

BitField (4 bits)

2

frametype

BitEnumField (2 bits)

0

flags

FlagsField (8 bits)

<Flag 0 ()>

destination

XLEShortField

0

source

XLEShortField

0

radius

ByteField

0

seqnum

ByteField

1

ext_dst

dot15d4AddressField (Cond)

0

ext_src

dot15d4AddressField (Cond)

0

relay_count

ByteField (Cond)

1

relay_index

ByteField (Cond)

0

relays

FieldListField (Cond)

[]

guess_payload_class(payload)
class scapy.layers.zigbee.ZigbeeNWKCommandPayload

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeNWKCommandPayload fields

cmd_identifier

ByteEnumField

1

reserved

BitField (Cond) (1 bit)

0

multicast

BitField (Cond) (1 bit)

0

dest_addr_bit

BitField (Cond) (1 bit)

0

many_to_one

BitEnumField (Cond) (2 bits)

0

reserved

BitField (Cond) (3 bits)

0

route_request_identifier

ByteField (Cond)

0

destination_address

XLEShortField (Cond)

0

path_cost

ByteField (Cond)

0

ext_dst

dot15d4AddressField (Cond)

0

reserved

BitField (Cond) (1 bit)

0

multicast

BitField (Cond) (1 bit)

0

responder_addr_bit

BitField (Cond) (1 bit)

0

originator_addr_bit

BitField (Cond) (1 bit)

0

reserved

BitField (Cond) (4 bits)

0

route_request_identifier

ByteField (Cond)

0

originator_address

XLEShortField (Cond)

0

responder_address

XLEShortField (Cond)

0

path_cost

ByteField (Cond)

0

originator_addr

dot15d4AddressField (Cond)

0

responder_addr

dot15d4AddressField (Cond)

0

status_code

ByteEnumField (Cond)

0

destination_address

XLEShortField (Cond)

0

remove_children

BitField (Cond) (1 bit)

0

request

BitField (Cond) (1 bit)

0

rejoin

BitField (Cond) (1 bit)

0

reserved

BitField (Cond) (5 bits)

0

rr_relay_count

ByteField (Cond)

0

rr_relay_list

FieldListField (Cond)

[]

allocate_address

BitField (Cond) (1 bit)

0

security_capability

BitField (Cond) (1 bit)

0

reserved2

BitField (Cond) (1 bit)

0

reserved1

BitField (Cond) (1 bit)

0

receiver_on_when_idle

BitField (Cond) (1 bit)

0

power_source

BitField (Cond) (1 bit)

0

device_type

BitField (Cond) (1 bit)

0

alternate_pan_coordinator

BitField (Cond) (1 bit)

0

network_address

XLEShortField (Cond)

65535

rejoin_status

ByteField (Cond)

0

reserved

BitField (Cond) (1 bit)

0

last_frame

BitField (Cond) (1 bit)

0

first_frame

BitField (Cond) (1 bit)

0

entry_count

BitField (Cond) (5 bits)

0

link_status_list

PacketListField (Cond)

[]

report_command_identifier

BitEnumField (Cond) (3 bits)

0

report_information_count

BitField (Cond) (5 bits)

0

epid

dot15d4AddressField (Cond)

0

PAN_ID_conflict_report

FieldListField (Cond)

[]

update_command_identifier

BitEnumField (Cond) (3 bits)

0

update_information_count

BitField (Cond) (5 bits)

0

epid

dot15d4AddressField (Cond)

0

update_id

ByteField (Cond)

0

new_PAN_ID

XLEShortField (Cond)

0

class scapy.layers.zigbee.ZigbeeNWKStub

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeNWKStub fields

reserved

BitField (2 bits)

0

proto_version

BitField (4 bits)

2

frametype

BitField (2 bits)

3

reserved

BitField (8 bits)

0

guess_payload_class(payload)
class scapy.layers.zigbee.ZigbeeSecurityHeader

Bases: scapy.packet.Packet

aliastypes
fields_desc
ZigbeeSecurityHeader fields

reserved1

FlagsField (2 bits)

<Flag 0 ()>

extended_nonce

BitField (1 bit)

1

key_type

BitEnumField (2 bits)

1

nwk_seclevel

BitEnumField (3 bits)

0

fc

XLEIntField

0

source

dot15d4AddressField (Cond)

0

key_seqnum

ByteField (Cond)

0

data

StrField

b''

mic

XStrField

b''

post_dissect(s)
scapy.layers.zigbee.util_mic_len(pkt)

Calculate the length of the attribute value field