From d662a1bd6140f83bbe47e150a1610ba198a3cda8 Mon Sep 17 00:00:00 2001 From: Philip Axer Date: Tue, 10 Dec 2024 12:13:24 +0100 Subject: [PATCH] debugging: print annotations for #671 Signed-off-by: Philip Axer --- dpkt/ethernet.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dpkt/ethernet.py b/dpkt/ethernet.py index 86cb1d08..f25b32cd 100644 --- a/dpkt/ethernet.py +++ b/dpkt/ethernet.py @@ -84,10 +84,13 @@ def __init__(self, *args, **kwargs): dpkt.Packet.__init__(self, *args, **kwargs) # if data was given in kwargs, try to unpack it if self.data: + print("__init__") if isstr(self.data) or isinstance(self.data, bytes): + print(" -> isstr or is bytes") self._unpack_data(self.data) def _unpack_data(self, buf): + print("_unpack_data") # unpack vlan tag and mpls label stacks if self._next_type in _ETH_TYPES_QINQ: self.vlan_tags = [] @@ -137,8 +140,10 @@ def _unpack_data(self, buf): self.data = buf def unpack(self, buf): + print("unpack") dpkt.Packet.unpack(self, buf) if self.type > 1500: + print(" -> unpack and type > 1500") # Ethernet II self._next_type = self.type self._unpack_data(self.data)