diff options
author | 2016-03-21 16:03:47 +0200 | |
---|---|---|
committer | 2016-03-21 16:03:47 +0200 | |
commit | b89efa188810bf95a9d245e69e2961b5721c3b0f (patch) | |
tree | 454273ac6c4ae972ebb8a2c86b893296970b4fa9 /scripts/external_libs/scapy-python3-0.18/scapy/layers/vrrp.py | |
parent | f72c6df9d2e9998ae1f3529d729ab7930b35785a (diff) |
scapy python 2/3
Diffstat (limited to 'scripts/external_libs/scapy-python3-0.18/scapy/layers/vrrp.py')
-rw-r--r-- | scripts/external_libs/scapy-python3-0.18/scapy/layers/vrrp.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/scripts/external_libs/scapy-python3-0.18/scapy/layers/vrrp.py b/scripts/external_libs/scapy-python3-0.18/scapy/layers/vrrp.py deleted file mode 100644 index e2818381..00000000 --- a/scripts/external_libs/scapy-python3-0.18/scapy/layers/vrrp.py +++ /dev/null @@ -1,39 +0,0 @@ -## This file is part of Scapy -## See http://www.secdev.org/projects/scapy for more informations -## Copyright (C) Philippe Biondi <phil@secdev.org> -## Copyright (C) 6WIND <olivier.matz@6wind.com> -## This program is published under a GPLv2 license - -""" -VRRP (Virtual Router Redundancy Protocol). -""" - -from scapy.packet import * -from scapy.fields import * -from scapy.layers.inet import IP - -IPPROTO_VRRP=112 - -# RFC 3768 - Virtual Router Redundancy Protocol (VRRP) -class VRRP(Packet): - fields_desc = [ - BitField("version" , 2, 4), - BitField("type" , 1, 4), - ByteField("vrid", 1), - ByteField("priority", 100), - FieldLenField("ipcount", None, count_of="addrlist", fmt="B"), - ByteField("authtype", 0), - ByteField("adv", 1), - XShortField("chksum", None), - FieldListField("addrlist", [], IPField("", "0.0.0.0"), - count_from = lambda pkt: pkt.ipcount), - IntField("auth1", 0), - IntField("auth2", 0) ] - - def post_build(self, p, pay): - if self.chksum is None: - ck = checksum(p) - p = p[:6]+bytes([(ck>>8),(ck&0xff)])+p[8:] - return p - -bind_layers( IP, VRRP, proto=IPPROTO_VRRP) |