| Total Complexity | 0 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # encoding: utf-8 |
||
| 2 | """ |
||
| 3 | igpflags.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 | # |D|N|L|P| Resvd.| |
||
| 18 | # +-+-+-+-+-+-+-+-+ |
||
| 19 | # https://tools.ietf.org/html/rfc7752#section-3.3.3.1 |
||
| 20 | # |
||
| 21 | # +----------+---------------------------+-----------+ |
||
| 22 | # | Bit | Description | Reference | |
||
| 23 | # +----------+---------------------------+-----------+ |
||
| 24 | # | 'D' | IS-IS Up/Down Bit | [RFC5305] | |
||
| 25 | # | 'N' | OSPF "no unicast" Bit | [RFC5340] | |
||
| 26 | # | 'L' | OSPF "local address" Bit | [RFC5340] | |
||
| 27 | # | 'P' | OSPF "propagate NSSA" Bit | [RFC5340] | |
||
| 28 | # | Reserved | Reserved for future use. | | |
||
| 29 | # +----------+---------------------------+-----------+ |
||
| 30 | |||
| 31 | # RFC 7752 3.3.3.1. IGP Flags TLV |
||
| 32 | |||
| 33 | |||
| 34 | @LINKSTATE.register() |
||
| 35 | class IgpFlags(LsGenericFlags): |
||
| 36 | REPR = 'IGP flags' |
||
| 37 | JSON = 'igp-flags' |
||
| 38 | TLV = 1152 |
||
| 39 | FLAGS = ['D', 'N', 'L', 'P', 'RSV', 'RSV', 'RSV', 'RSV'] |
||
| 40 | LEN = 1 |
||
| 41 |