summaryrefslogtreecommitdiffstats
path: root/scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py')
-rw-r--r--scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py b/scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py
index df85875a..ba65e637 100644
--- a/scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py
+++ b/scripts/external_libs/scapy-2.3.1/python2/scapy/fields.py
@@ -34,7 +34,7 @@ class Field:
self.default = self.any2i(None,default)
self.sz = struct.calcsize(self.fmt)
self.owners = []
- self.offset =0;
+ self._offset =0;
def get_size_bytes (self):
if hasattr(self, 'size'):
@@ -42,6 +42,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)