def packet_received(self, packet, **kwargs): self.win.add_connection_item(kwargs["IP"]["src"], packet.sport, kwargs["IP"]["dst"], packet.dport) TCPProtocol.packet_received(self, packet, **kwargs)