diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-02-15 11:43:03 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 22:11:37 +0200 |
| commit | 43786ccfdcdbdb65c2f5af02db55b6879892d108 (patch) | |
| tree | 704adcef9d4e10aff4936f96d298dad4cb371db5 /isisd/isis_srv6.c | |
| parent | 6cd23c6d95e52b1a86b2a8a2b77d8c929252e251 (diff) | |
isisd: Add func to fill in an SRv6 End SID Sub-TLV
Add a function to fill in an SRv6 End SID Sub-TLV with information from
an SRv6 End SID (RFC 9352 section #7.2).
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'isisd/isis_srv6.c')
| -rw-r--r-- | isisd/isis_srv6.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/isisd/isis_srv6.c b/isisd/isis_srv6.c index f8e3ca90d4..c4d4c369b5 100644 --- a/isisd/isis_srv6.c +++ b/isisd/isis_srv6.c @@ -21,6 +21,25 @@ DEFINE_MTYPE_STATIC(ISISD, ISIS_SRV6_SID, "ISIS SRv6 Segment ID"); /** + * Fill in SRv6 End SID Sub-TLV with information from an SRv6 SID. + * + * @param sid SRv6 SID configuration + * @param sid_subtlv SRv6 End SID Sub-TLV to be updated + */ +void isis_srv6_end_sid2subtlv(const struct isis_srv6_sid *sid, + struct isis_srv6_end_sid_subtlv *sid_subtlv) +{ + /* Set SRv6 SID flags */ + sid_subtlv->flags = sid->flags; + + /* Set SRv6 SID behavior */ + sid_subtlv->behavior = sid->behavior; + + /* Set SRv6 SID value */ + sid_subtlv->sid = sid->sid; +} + +/** * Fill in SRv6 Locator TLV with information from an SRv6 locator. * * @param loc SRv6 Locator configuration |
