diff options
author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-06-03 22:06:04 +0200 |
---|---|---|
committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 22:11:46 +0200 |
commit | 2566656a6f5082e62bafa4a5e42764f666499876 (patch) | |
tree | 3035d3557c63c773a85bef10fe6232157070e5e1 /isisd/isis_srv6.h | |
parent | isisd: Make MTYPE_ISIS_SUBSUBTLV non-static (diff) | |
download | frr-2566656a6f5082e62bafa4a5e42764f666499876.tar.xz frr-2566656a6f5082e62bafa4a5e42764f666499876.zip |
isisd: Add data structure for SRv6 Adjacency SIDs
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>
Diffstat (limited to '')
-rw-r--r-- | isisd/isis_srv6.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/isisd/isis_srv6.h b/isisd/isis_srv6.h index 89e8044f3..5db844737 100644 --- a/isisd/isis_srv6.h +++ b/isisd/isis_srv6.h @@ -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 { |