]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: Add SRv6 Locator TLV data structure
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 21 Feb 2023 23:03:49 +0000 (00:03 +0100)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:35:07 +0000 (17:35 +0200)
Add a data structure to represent an SRv6 Locator TLV as per RFC 9352
section #7.1.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
isisd/isis_tlvs.h

index fd7a0306ac4b543d9d846273e3545f1eb89cd849..4fa0fe81d7a16377e361ceb6355b2336bd738227 100644 (file)
@@ -193,6 +193,23 @@ struct isis_router_cap_fad {
 };
 #endif /* ifndef FABRICD */
 
+/* RFC 9352 section 7.1 */
+struct isis_srv6_locator_tlv {
+       struct isis_srv6_locator_tlv *next;
+
+       uint32_t metric;
+
+       uint8_t flags;
+#define ISIS_TLV_SRV6_LOCATOR_FLAG_D 1 << 7
+
+       uint8_t algorithm;
+       struct prefix_ipv6 prefix;
+
+       struct isis_subtlvs *subtlvs;
+};
+
+#define ISIS_SRV6_LOCATOR_HDR_SIZE 22
+
 /* Maximum SRv6 SID Depths (MSD) as per RFC 9352 section #4 */
 struct isis_srv6_msd {
        /* RFC 9352 section #4.1 */
@@ -338,6 +355,7 @@ struct isis_tlvs {
        struct isis_threeway_adj *threeway_adj;
        struct isis_router_cap *router_cap;
        struct isis_spine_leaf *spine_leaf;
+       struct isis_mt_item_list srv6_locator;
 };
 
 enum isis_tlv_context {