summaryrefslogtreecommitdiffstats
path: root/scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py')
-rw-r--r--scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py b/scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py
index 66ccd552..9dcebcf3 100644
--- a/scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py
+++ b/scripts/external_libs/scapy-2.3.1/python3/scapy/fields.py
@@ -35,6 +35,7 @@ class Field:
self.sz = struct.calcsize(self.fmt)
self.owners = []
self.offset =0;
+ self._offset =0
def get_size_bytes (self):
@@ -43,6 +44,9 @@ class Field:
else:
return self.sz
+ def get_size_bits(self):
+ return getattr(self, 'size', self.sz * 8)
+
def register_owner(self, cls):
self.owners.append(cls)