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-2.3.1/python2/scapy/contrib/mpls.py | |
parent | f72c6df9d2e9998ae1f3529d729ab7930b35785a (diff) |
scapy python 2/3
Diffstat (limited to 'scripts/external_libs/scapy-2.3.1/python2/scapy/contrib/mpls.py')
-rw-r--r-- | scripts/external_libs/scapy-2.3.1/python2/scapy/contrib/mpls.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/external_libs/scapy-2.3.1/python2/scapy/contrib/mpls.py b/scripts/external_libs/scapy-2.3.1/python2/scapy/contrib/mpls.py new file mode 100644 index 00000000..037278c5 --- /dev/null +++ b/scripts/external_libs/scapy-2.3.1/python2/scapy/contrib/mpls.py @@ -0,0 +1,17 @@ +# http://trac.secdev.org/scapy/ticket/31 + +# scapy.contrib.description = MPLS +# scapy.contrib.status = loads + +from scapy.packet import Packet,bind_layers +from scapy.fields import BitField,ByteField +from scapy.layers.l2 import Ether + +class MPLS(Packet): + name = "MPLS" + fields_desc = [ BitField("label", 3, 20), + BitField("cos", 0, 3), + BitField("s", 1, 1), + ByteField("ttl", 0) ] + +bind_layers(Ether, MPLS, type=0x8847) |