def __init__(self, packet): self._packet = { "hex": packet, "bin": h2b(packet), } self._sport = self._get_subpacket("sport") self._dport = self._get_subpacket("dport")
def __init__(self, packet, encapsulate=None): self._packet = { "hex": packet, "bin": h2b(packet), } self._encapsulated = encapsulate