diff --git a/dpkt/ieee80211.py b/dpkt/ieee80211.py index 7d173d86..92d41deb 100644 --- a/dpkt/ieee80211.py +++ b/dpkt/ieee80211.py @@ -115,6 +115,7 @@ # Block ack category action codes BLOCK_ACK_CODE_REQUEST = 0 BLOCK_ACK_CODE_RESPONSE = 1 +BLOCK_ACK_CODE_DELBA = 2 class IEEE80211(dpkt.Packet): @@ -132,6 +133,10 @@ class IEEE80211(dpkt.Packet): ('duration', 'H', 0) ) + # The standard really defines the entire MAC protocol as little-endian on the wire, + # however there is broken logic in the rest of the module preventing this from working right now + #__byte_order__ = '<' + @property def version(self): return (self.framectl & _VERSION_MASK) >> _VERSION_SHIFT @@ -517,6 +522,7 @@ def unpack(self, buf): BLOCK_ACK: { BLOCK_ACK_CODE_REQUEST: ('block_ack_request', IEEE80211.BlockAckActionRequest), BLOCK_ACK_CODE_RESPONSE: ('block_ack_response', IEEE80211.BlockAckActionResponse), + BLOCK_ACK_CODE_DELBA: ('block_ack_delba', IEEE80211.BlockAckActionDelba), }, } @@ -546,6 +552,14 @@ class BlockAckActionResponse(dpkt.Packet): ('timeout', 'H', 0), ) + class BlockAckActionDelba(dpkt.Packet): + __byte_order__ = '<' + __hdr__ = ( + ('delba_param_set', 'H', 0), + ('reason_code', 'H', 0), + #('gcr_group_addr', '8s', '\x00' * 8), # Standard says it must be there, but it isn't? + ) + class Data(dpkt.Packet): __hdr__ = ( ('dst', '6s', '\x00' * 6), @@ -781,6 +795,16 @@ def test_action_block_ack_response(): parameters = struct.unpack('