Total Complexity | 0 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # encoding: utf-8 |
||
2 | """ |
||
3 | mplsmask.py |
||
4 | |||
5 | Created by Evelio Vila on 2016-12-01. |
||
6 | Copyright (c) 2014-2017 Exa Networks. All rights reserved. |
||
7 | """ |
||
8 | from exabgp.bgp.message.notification import Notify |
||
9 | from exabgp.bgp.message.update.attribute.bgpls.linkstate import LINKSTATE |
||
10 | from exabgp.bgp.message.update.attribute.bgpls.linkstate import LsGenericFlags |
||
11 | |||
12 | # 0 1 2 3 |
||
13 | # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
||
14 | # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
||
15 | # | Type | Length | |
||
16 | # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
||
17 | # |L|R| Reserved | |
||
18 | # +-+-+-+-+-+-+-+-+ |
||
19 | # https://tools.ietf.org/html/rfc7752#section-3.3.2.2 MPLS Protocol Mask |
||
20 | # |
||
21 | # +------------+------------------------------------------+-----------+ |
||
22 | # | Bit | Description | Reference | |
||
23 | # +------------+------------------------------------------+-----------+ |
||
24 | # | 'L' | Label Distribution Protocol (LDP) | [RFC5036] | |
||
25 | # | 'R' | Extension to RSVP for LSP Tunnels | [RFC3209] | |
||
26 | # | | (RSVP-TE) | | |
||
27 | # | 'Reserved' | Reserved for future use | | |
||
28 | # +------------+------------------------------------------+-----------+ |
||
29 | |||
30 | # RFC 7752 3.3.2.2. MPLS Protocol Mask TLV |
||
31 | |||
32 | @LINKSTATE.register() |
||
33 | class MplsMask(LsGenericFlags): |
||
34 | REPR = 'MPLS Protocol mask' |
||
35 | JSON = 'mpls-mask' |
||
36 | TLV = 1094 |
||
37 | FLAGS = ['LDP', 'RSVP-TE', 'RSV', 'RSV', 'RSV', 'RSV', 'RSV', 'RSV'] |
||
38 | LEN = 1 |
||
39 |