def decode(self, aBuffer): t = ImpactPacket.TCP(aBuffer) self.set_decoded_protocol(t) off = t.get_header_size() self.data_decoder = DataDecoder() packet = self.data_decoder.decode(aBuffer[off:]) t.contains(packet) return t
def decode(self, aBuffer): t = ImpactPacket.TCP(aBuffer) self.set_decoded_protocol(t) off = t.get_header_size() self.data_decoder = DataDecoder() # Setting limits on the header if off <= 70: packet = self.data_decoder.decode(aBuffer[off:]) else: packet = self.data_decoder.decode(aBuffer[off:70]) t.contains(packet) return t