blob: 66d4664f5b3d541fada9884e87ea19fa3940f2d7 [file] [log] [blame]
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07001"""
2Copyright 2015 Open Networking Foundation (ONF)
3
4Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
20"""
21
GlennRC956ea742015-11-05 16:14:15 -080022import scapy
23
24class MPLS(Packet):
25 name = "MPLS"
26 fields_desc = [
27 BitField("label", 3, 20),
28 BitField("experimental_bits", 0, 3),
29 BitField("bottom_of_label_stack", 1, 1), # Now we're at the bottom
30 ByteField("TTL", 255)
31 ]