diff options
author | 2016-03-21 12:55:16 +0200 | |
---|---|---|
committer | 2016-03-21 12:55:16 +0200 | |
commit | 1831e9bbc03484b078dbd604dfec0e025cea8eca (patch) | |
tree | 96ffe76ee50a29f8eea36ada1cc21738de09bcb7 /scripts/external_libs/scapy-python3-0.18/scapy/contrib/mpls.py | |
parent | 33c80d0f2c3af8b302e50ce3925869dfd37267ed (diff) |
scapy 3-0.18 with trex client diff
Diffstat (limited to 'scripts/external_libs/scapy-python3-0.18/scapy/contrib/mpls.py')
-rw-r--r-- | scripts/external_libs/scapy-python3-0.18/scapy/contrib/mpls.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/external_libs/scapy-python3-0.18/scapy/contrib/mpls.py b/scripts/external_libs/scapy-python3-0.18/scapy/contrib/mpls.py new file mode 100644 index 00000000..037278c5 --- /dev/null +++ b/scripts/external_libs/scapy-python3-0.18/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) |