mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-26 04:03:32 +00:00
isisd: Add function to build TLV from SRv6 Locator
Add a function to build an SRv6 Locator TLV (RFC 9352 section #7.1) to advertise a specific SRv6 Locator passed as an argument. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
7e340af13b
commit
2aaa75a6f3
@ -7731,3 +7731,20 @@ void isis_tlvs_set_purge_originator(struct isis_tlvs *tlvs,
|
|||||||
sizeof(tlvs->purge_originator->sender));
|
sizeof(tlvs->purge_originator->sender));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add an SRv6 Locator to the SRv6 Locator TLV */
|
||||||
|
void isis_tlvs_add_srv6_locator(struct isis_tlvs *tlvs, uint16_t mtid,
|
||||||
|
struct isis_srv6_locator *loc)
|
||||||
|
{
|
||||||
|
struct isis_srv6_locator_tlv *loc_tlv =
|
||||||
|
XCALLOC(MTYPE_ISIS_TLV, sizeof(*loc_tlv));
|
||||||
|
|
||||||
|
/* Fill in the SRv6 Locator TLV according to the SRv6 Locator
|
||||||
|
* configuration */
|
||||||
|
isis_srv6_locator2tlv(loc, loc_tlv);
|
||||||
|
|
||||||
|
/* Append the SRv6 Locator TLV to the TLVs list */
|
||||||
|
struct isis_item_list *l;
|
||||||
|
l = isis_get_mt_items(&tlvs->srv6_locator, mtid);
|
||||||
|
append_item(l, (struct isis_item *)loc_tlv);
|
||||||
|
}
|
||||||
|
@ -22,6 +22,7 @@ DECLARE_MTYPE(ISIS_SUBTLV);
|
|||||||
|
|
||||||
struct lspdb_head;
|
struct lspdb_head;
|
||||||
struct sr_prefix_cfg;
|
struct sr_prefix_cfg;
|
||||||
|
struct isis_srv6_locator;
|
||||||
|
|
||||||
struct isis_area_address {
|
struct isis_area_address {
|
||||||
struct isis_area_address *next;
|
struct isis_area_address *next;
|
||||||
@ -832,4 +833,7 @@ isis_tlvs_lookup_mt_router_info(struct isis_tlvs *tlvs, uint16_t mtid);
|
|||||||
void isis_tlvs_set_purge_originator(struct isis_tlvs *tlvs,
|
void isis_tlvs_set_purge_originator(struct isis_tlvs *tlvs,
|
||||||
const uint8_t *generator,
|
const uint8_t *generator,
|
||||||
const uint8_t *sender);
|
const uint8_t *sender);
|
||||||
|
|
||||||
|
void isis_tlvs_add_srv6_locator(struct isis_tlvs *tlvs, uint16_t mtid,
|
||||||
|
struct isis_srv6_locator *loc);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user