mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
isisd: Add unpack func for SID Struct Sub-Sub-TLV
Add a function to unpack an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
8953be7a0c
commit
5579ca40ef
@ -2035,6 +2035,33 @@ static int pack_subsubtlv_srv6_sid_structure(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int unpack_subsubtlv_srv6_sid_structure(
|
||||||
|
enum isis_tlv_context context, uint8_t tlv_type, uint8_t tlv_len,
|
||||||
|
struct stream *s, struct sbuf *log, void *dest, int indent)
|
||||||
|
{
|
||||||
|
struct isis_subsubtlvs *subsubtlvs = dest;
|
||||||
|
struct isis_srv6_sid_structure_subsubtlv sid_struct = {};
|
||||||
|
|
||||||
|
sbuf_push(log, indent, "Unpacking SRv6 SID Structure...\n");
|
||||||
|
if (tlv_len != 4) {
|
||||||
|
sbuf_push(
|
||||||
|
log, indent,
|
||||||
|
"Invalid SRv6 SID Structure Sub-Sub-TLV size. (Expected 4 bytes, got %hhu)\n",
|
||||||
|
tlv_len);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sid_struct.loc_block_len = stream_getc(s);
|
||||||
|
sid_struct.loc_node_len = stream_getc(s);
|
||||||
|
sid_struct.func_len = stream_getc(s);
|
||||||
|
sid_struct.arg_len = stream_getc(s);
|
||||||
|
|
||||||
|
subsubtlvs->srv6_sid_structure =
|
||||||
|
copy_subsubtlv_srv6_sid_structure(&sid_struct);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static struct isis_item *copy_item(enum isis_tlv_context context,
|
static struct isis_item *copy_item(enum isis_tlv_context context,
|
||||||
enum isis_tlv_type type,
|
enum isis_tlv_type type,
|
||||||
struct isis_item *item);
|
struct isis_item *item);
|
||||||
|
Loading…
Reference in New Issue
Block a user