]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Add data structure for SRv6 Adjacency SIDs
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 3 Jun 2023 20:06:04 +0000 (22:06 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 20:11:46 +0000 (22:11 +0200)
An SRv6 adjacency SID is a SID that is associated with a particular
adjacency. Adjacency SIDs are advertised using the SRv6 End.X SID
Sub-TLV (RFC 9352 section #8.1) or SRv6 LAN End.X SID Sub-TLV (RFC 9352
section #8.2).

This commit defines a data structure `srv6_adjacency` for storing
information about an SRv6 Adjacency SID. This data structure will be
used to support SRv6 Adjacency SIDs functionalities in future commits.

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

index 89e8044f38565565b256337e68f7292a22ad5d82..5db844737e210a65861bde5bc10b3f5e804d8bc0 100644 (file)
@@ -69,6 +69,48 @@ struct isis_srv6_locator {
        struct list *srv6_sid;
 };
 
+/* SRv6 Adjacency-SID type */
+enum srv6_adj_type {
+       ISIS_SRV6_ADJ_NORMAL = 0,
+       ISIS_SRV6_LAN_BACKUP,
+};
+
+/* SRv6 Adjacency. */
+struct srv6_adjacency {
+       /* Adjacency type */
+       enum srv6_adj_type type;
+
+       /* SID flags */
+       uint8_t flags;
+
+       /* SID value */
+       struct in6_addr sid;
+
+       /* Endpoint behavior bound to the SID */
+       enum srv6_endpoint_behavior_codepoint behavior;
+
+       /* SRv6 SID structure */
+       struct isis_srv6_sid_structure structure;
+
+       /* Parent SRv6 locator */
+       struct srv6_locator_chunk *locator;
+
+       /* Adjacency-SID nexthop information */
+       struct in6_addr nexthop;
+
+       /* End.X SID TI-LFA backup nexthops */
+       struct list *backup_nexthops;
+
+       /* SRv6 (LAN) End.X SID Sub-TLV */
+       union {
+               struct isis_srv6_endx_sid_subtlv *endx_sid;
+               struct isis_srv6_lan_endx_sid_subtlv *lendx_sid;
+       } u;
+
+       /* Back pointer to IS-IS adjacency. */
+       struct isis_adjacency *adj;
+};
+
 /* Per-area IS-IS SRv6 Data Base (SRv6 DB) */
 struct isis_srv6_db {