Package killerbee :: Module zigbeedecode :: Class ZigBeeNWKPacketParser
[hide private]
[frames] | no frames]

Class ZigBeeNWKPacketParser

source code

Instance Methods [hide private]
 
__init__(self)
Instantiates the ZigBeeNWKPacketParser class.
source code
list
pktchop(self, packet)
Chops up the specified packet contents into a list of fields.
source code
Int
hdrlen(self, packet)
Returns the length of the ZigBee NWK header.
source code
Int
payloadlen(self, packet)
Returns the length of the NWK payload.
source code
Method Details [hide private]

pktchop(self, packet)

source code 

Chops up the specified packet contents into a list of fields. Does not attempt to re-order the field values for parsing. ''.join(X) will reassemble original packet string. Fields which may or may not be present (such as the destination address) are empty if they are not present, keeping the list elements consistent, as follows: Frame Control | DA | SA | Radius | Seq # | Dst IEEE Address | Src IEEE Address | MCast Ctrl | Src Route Subframe | Payload

An exception is raised if the packet contents are too short to decode.

Parameters:
  • packet (String) - Packet contents.
Returns: list
Chopped contents of the ZigBee NWK packet into list elements.

hdrlen(self, packet)

source code 

Returns the length of the ZigBee NWK header.

Parameters:
  • packet (String) - Packet contents to evaluate for header length.
Returns: Int
Length of the ZigBEE NWK header.

payloadlen(self, packet)

source code 

Returns the length of the NWK payload.

Parameters:
  • packet (String) - Packet contents to evaluate for header length.
Returns: Int
Length of the NWK payload.