summaryrefslogtreecommitdiffstats
path: root/isisd/isis_tlvs.h
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-05-25 13:26:27 +0200
committerChristian Franke <chris@opensourcerouting.org>2018-09-05 11:38:13 +0200
commitbd507085e0559ae6c8c6076c2948fdd6c66e4d1f (patch)
tree86d7b4a6a55bf3fe2bd72147fb12671347a8234f /isisd/isis_tlvs.h
parentfabricd: add flooding algorithm debugging (diff)
downloadfrr-bd507085e0559ae6c8c6076c2948fdd6c66e4d1f.tar.xz
frr-bd507085e0559ae6c8c6076c2948fdd6c66e4d1f.zip
isisd: add support for Prefix-SID subtlv
Extend isisd's TLV parser to support the Prefix-SID subtlv as per draft-ietf-isis-segment-routing-extensions-19 Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_tlvs.h')
-rw-r--r--isisd/isis_tlvs.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/isisd/isis_tlvs.h b/isisd/isis_tlvs.h
index 451321ea9..7ebb648cc 100644
--- a/isisd/isis_tlvs.h
+++ b/isisd/isis_tlvs.h
@@ -83,6 +83,8 @@ struct isis_extended_ip_reach {
uint32_t metric;
bool down;
struct prefix_ipv4 prefix;
+
+ struct isis_subtlvs *subtlvs;
};
struct isis_ipv6_reach;
@@ -219,9 +221,21 @@ struct isis_tlvs {
struct isis_spine_leaf *spine_leaf;
};
-struct isis_subtlvs {
- /* draft-baker-ipv6-isis-dst-src-routing-06 */
- struct prefix_ipv6 *source_prefix;
+#define ISIS_PREFIX_SID_READVERTISED 0x80
+#define ISIS_PREFIX_SID_NODE 0x40
+#define ISIS_PREFIX_SID_NO_PHP 0x20
+#define ISIS_PREFIX_SID_EXPLICIT_NULL 0x10
+#define ISIS_PREFIX_SID_VALUE 0x08
+#define ISIS_PREFIX_SID_LOCAL 0x04
+
+struct isis_prefix_sid;
+struct isis_prefix_sid {
+ struct isis_prefix_sid *next;
+
+ uint8_t flags;
+ uint8_t algorithm;
+
+ uint32_t value;
};
enum isis_tlv_context {
@@ -232,6 +246,15 @@ enum isis_tlv_context {
ISIS_CONTEXT_MAX
};
+struct isis_subtlvs {
+ enum isis_tlv_context context;
+
+ /* draft-baker-ipv6-isis-dst-src-routing-06 */
+ struct prefix_ipv6 *source_prefix;
+ /* draft-ietf-isis-segment-routing-extensions-16 */
+ struct isis_item_list prefix_sids;
+};
+
enum isis_tlv_type {
ISIS_TLV_AREA_ADDRESSES = 1,
ISIS_TLV_OLDSTYLE_REACH = 2,
@@ -258,6 +281,7 @@ enum isis_tlv_type {
ISIS_TLV_THREE_WAY_ADJ = 240,
ISIS_TLV_MAX = 256,
+ ISIS_SUBTLV_PREFIX_SID = 3,
ISIS_SUBTLV_IPV6_SOURCE_PREFIX = 22
};