scapy.layers.zigbee module

ZigBee bindings for IEEE 802.15.4.

class scapy.layers.zigbee.LinkStatusEntry

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.LinkStatusEntry'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LinkStatusEntry).neighbor_network_address>, <Field (LinkStatusEntry).reserved1>, <Field (LinkStatusEntry).outgoing_cost>, <Field (LinkStatusEntry).reserved2>, <Field (LinkStatusEntry).incoming_cost>]
class scapy.layers.zigbee.ZCLGeneralReadAttributes

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLGeneralReadAttributes'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZCLGeneralReadAttributes).attribute_identifiers>]
class scapy.layers.zigbee.ZCLGeneralReadAttributesResponse

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLGeneralReadAttributesResponse'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZCLGeneralReadAttributesResponse).read_attribute_status_record>]
class scapy.layers.zigbee.ZCLMeteringGetProfile

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLMeteringGetProfile'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZCLMeteringGetProfile).Interval_Channel>, <Field (ZCLMeteringGetProfile).End_Time>, <Field (ZCLMeteringGetProfile).NumberOfPeriods>]
class scapy.layers.zigbee.ZCLPriceGetCurrentPrice

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLPriceGetCurrentPrice'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZCLPriceGetCurrentPrice).reserved>, <Field (ZCLPriceGetCurrentPrice).Requestor_Rx_On_When_Idle>]
class scapy.layers.zigbee.ZCLPriceGetScheduledPrices

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLPriceGetScheduledPrices'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZCLPriceGetScheduledPrices).start_time>, <Field (ZCLPriceGetScheduledPrices).number_of_events>]
class scapy.layers.zigbee.ZCLPricePublishPrice

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLPricePublishPrice'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZCLPricePublishPrice).provider_id>, <Field (ZCLPricePublishPrice).rate_label>, <Field (ZCLPricePublishPrice).issuer_event_id>, <Field (ZCLPricePublishPrice).current_time>, <Field (ZCLPricePublishPrice).unit_of_measure>, <Field (ZCLPricePublishPrice).currency>, <Field (ZCLPricePublishPrice).price_trailing_digit>, <Field (ZCLPricePublishPrice).number_of_price_tiers>, <Field (ZCLPricePublishPrice).start_time>, <Field (ZCLPricePublishPrice).duration_in_minutes>, <Field (ZCLPricePublishPrice).price>, <Field (ZCLPricePublishPrice).price_ratio>, <Field (ZCLPricePublishPrice).generation_price>, <Field (ZCLPricePublishPrice).generation_price_ratio>, <Field (ZCLPricePublishPrice).alternate_cost_delivered>, <Field (ZCLPricePublishPrice).alternate_cost_unit>, <Field (ZCLPricePublishPrice).alternate_cost_trailing_digit>, <Field (ZCLPricePublishPrice).number_of_block_thresholds>, <Field (ZCLPricePublishPrice).price_control>]
class scapy.layers.zigbee.ZCLReadAttributeStatusRecord

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZCLReadAttributeStatusRecord'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (ZCLReadAttributeStatusRecord).attribute_identifier>, <Field (ZCLReadAttributeStatusRecord).status>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.zigbee.ZEP1

Bases: scapy.layers.zigbee.ZEP2

aliastypes = [<class 'scapy.layers.zigbee.ZEP1'>, <class 'scapy.layers.zigbee.ZEP2'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZEP1).preamble>, <Field (ZEP1).ver>, <Field (ZEP1).channel>, <Field (ZEP1).device>, <Field (ZEP1).lqi_mode>, <Field (ZEP1).lqi_val>, <Field (ZEP1).res>, <Field (ZEP1).len>]
class scapy.layers.zigbee.ZEP2

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZEP2'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=b'', *args, **kargs)
fields_desc = [<Field (ZEP2).preamble>, <Field (ZEP2).ver>, <Field (ZEP2).type>, <Field (ZEP2).channel>, <Field (ZEP2).device>, <Field (ZEP2).lqi_mode>, <Field (ZEP2).lqi_val>, <Field (ZEP2).timestamp>, <Field (ZEP2).seq>, <Field (ZEP2).res>, <Field (ZEP2).length>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.layers.zigbee.ZigBeeBeacon

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigBeeBeacon'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigBeeBeacon).proto_id>, <Field (ZigBeeBeacon).nwkc_protocol_version>, <Field (ZigBeeBeacon).stack_profile>, <Field (ZigBeeBeacon).end_device_capacity>, <Field (ZigBeeBeacon).device_depth>, <Field (ZigBeeBeacon).router_capacity>, <Field (ZigBeeBeacon).reserved>, <Field (ZigBeeBeacon).extended_pan_id>, <Field (ZigBeeBeacon).tx_offset>, <Field (ZigBeeBeacon).update_id>]
class scapy.layers.zigbee.ZigbeeAppCommandPayload

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeAppCommandPayload'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeAppCommandPayload).cmd_identifier>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.zigbee.ZigbeeAppDataPayload

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeAppDataPayload'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeAppDataPayload).frame_control>, <Field (ZigbeeAppDataPayload).delivery_mode>, <Field (ZigbeeAppDataPayload).aps_frametype>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <Field (ZigbeeAppDataPayload).counter>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
payload_guess = [({'frametype': 1}, <class 'scapy.layers.zigbee.ZigbeeAppCommandPayload'>)]
class scapy.layers.zigbee.ZigbeeAppDataPayloadStub

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeAppDataPayloadStub'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeAppDataPayloadStub).frame_control>, <Field (ZigbeeAppDataPayloadStub).delivery_mode>, <Field (ZigbeeAppDataPayloadStub).frametype>, <scapy.fields.ConditionalField object>, <Field (ZigbeeAppDataPayloadStub).cluster>, <Field (ZigbeeAppDataPayloadStub).profile>, <scapy.fields.ConditionalField object>]
class scapy.layers.zigbee.ZigbeeClusterLibrary

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeClusterLibrary'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeClusterLibrary).reserved>, <Field (ZigbeeClusterLibrary).disable_default_response>, <Field (ZigbeeClusterLibrary).direction>, <Field (ZigbeeClusterLibrary).manufacturer_specific>, <Field (ZigbeeClusterLibrary).zcl_frametype>, <scapy.fields.ConditionalField object>, <Field (ZigbeeClusterLibrary).transaction_sequence>, <Field (ZigbeeClusterLibrary).command_identifier>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
payload_guess = [({'zcl_frametype': 0, 'command_identifier': 0}, <class 'scapy.layers.zigbee.ZCLGeneralReadAttributes'>), ({'zcl_frametype': 0, 'command_identifier': 1}, <class 'scapy.layers.zigbee.ZCLGeneralReadAttributesResponse'>)]
class scapy.layers.zigbee.ZigbeeNWK

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeNWK'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeNWK).discover_route>, <Field (ZigbeeNWK).proto_version>, <Field (ZigbeeNWK).frametype>, <Field (ZigbeeNWK).flags>, <Field (ZigbeeNWK).destination>, <Field (ZigbeeNWK).source>, <Field (ZigbeeNWK).radius>, <Field (ZigbeeNWK).seqnum>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.layers.zigbee.ZigbeeNWKCommandPayload

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeNWKCommandPayload'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeNWKCommandPayload).cmd_identifier>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.zigbee.ZigbeeNWKStub

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeNWKStub'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeNWKStub).reserved>, <Field (ZigbeeNWKStub).proto_version>, <Field (ZigbeeNWKStub).frametype>, <Field (ZigbeeNWKStub).reserved>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.layers.zigbee.ZigbeeSecurityHeader

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.zigbee.ZigbeeSecurityHeader'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ZigbeeSecurityHeader).reserved1>, <Field (ZigbeeSecurityHeader).extended_nonce>, <Field (ZigbeeSecurityHeader).key_type>, <Field (ZigbeeSecurityHeader).nwk_seclevel>, <Field (ZigbeeSecurityHeader).fc>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <Field (ZigbeeSecurityHeader).data>, <Field (ZigbeeSecurityHeader).mic>]
post_dissect(s)

DEV: is called right after the current layer has been dissected

scapy.layers.zigbee.util_mic_len(pkt)

Calculate the length of the attribute value field