Skip to content

Commit

Permalink
Modify signature of Protocol.__init__
Browse files Browse the repository at this point in the history
Replaced the parameter 'packet' with *args

- Modify reference to IETF RFC of the TCP protocol
  • Loading branch information
EONRaider committed Dec 10, 2020
1 parent 271b645 commit f6ac4b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocols.py
Expand Up @@ -15,7 +15,7 @@ class Protocol(BigEndianStructure):
def __new__(cls, packet):
return cls.from_buffer_copy(packet)

def __init__(self, packet=None):
def __init__(self, *args):
super().__init__()
self.encapsulated_proto = None

Expand Down Expand Up @@ -127,7 +127,7 @@ def __init__(self, packet: bytes):
self.target_proto = inet_ntop(AF_INET, bytes(self.tpa))


class TCP(Protocol): # IETF RFC 675
class TCP(Protocol): # IETF RFC 793
_fields_ = [
("sport", c_uint16), # Source port
("dport", c_uint16), # Destination port
Expand Down

0 comments on commit f6ac4b7

Please sign in to comment.