(self, aBuffer)
| 433 | self.__FCS_at_end=not not fcs_at_end |
| 434 | |
| 435 | def decode(self, aBuffer): |
| 436 | d = dot11.Dot11(aBuffer, self.__FCS_at_end) |
| 437 | self.set_decoded_protocol(d) |
| 438 | |
| 439 | self.subtype = d.get_subtype() |
| 440 | if self.subtype is dot11.Dot11Types.DOT11_SUBTYPE_CONTROL_CLEAR_TO_SEND: |
| 441 | self.ctrl_cts_decoder = Dot11ControlFrameCTSDecoder() |
| 442 | packet = self.ctrl_cts_decoder.decode(d.body_string) |
| 443 | elif self.subtype is dot11.Dot11Types.DOT11_SUBTYPE_CONTROL_ACKNOWLEDGMENT: |
| 444 | self.ctrl_ack_decoder = Dot11ControlFrameACKDecoder() |
| 445 | packet = self.ctrl_ack_decoder.decode(d.body_string) |
| 446 | elif self.subtype is dot11.Dot11Types.DOT11_SUBTYPE_CONTROL_REQUEST_TO_SEND: |
| 447 | self.ctrl_rts_decoder = Dot11ControlFrameRTSDecoder() |
| 448 | packet = self.ctrl_rts_decoder.decode(d.body_string) |
| 449 | elif self.subtype is dot11.Dot11Types.DOT11_SUBTYPE_CONTROL_POWERSAVE_POLL: |
| 450 | self.ctrl_pspoll_decoder = Dot11ControlFramePSPollDecoder() |
| 451 | packet = self.ctrl_pspoll_decoder.decode(d.body_string) |
| 452 | elif self.subtype is dot11.Dot11Types.DOT11_SUBTYPE_CONTROL_CF_END: |
| 453 | self.ctrl_cfend_decoder = Dot11ControlFrameCFEndDecoder() |
| 454 | packet = self.ctrl_cfend_decoder.decode(d.body_string) |
| 455 | elif self.subtype is dot11.Dot11Types.DOT11_SUBTYPE_CONTROL_CF_END_CF_ACK: |
| 456 | self.ctrl_cfendcfack_decoder = Dot11ControlFrameCFEndCFACKDecoder() |
| 457 | packet = self.ctrl_cfendcfack_decoder.decode(d.body_string) |
| 458 | else: |
| 459 | data_decoder = DataDecoder() |
| 460 | packet = data_decoder.decode(d.body_string) |
| 461 | |
| 462 | d.contains(packet) |
| 463 | return d |
| 464 | |
| 465 | class Dot11ControlFrameCTSDecoder(BaseDot11Decoder): |
| 466 | def __init__(self): |
no test coverage detected