mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 16:57:44 +00:00
isisd: Add alloc func for Sub-Sub-TLVs in general
Add a function to allocate memory for IS-IS Sub-Sub-TLVs. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
c54b8f99c1
commit
ea22a01c5d
@ -1971,6 +1971,18 @@ static int pack_items_(uint16_t mtid, enum isis_tlv_context context,
|
||||
struct list *new_fragment_arg);
|
||||
#define pack_items(...) pack_items_(ISIS_MT_IPV4_UNICAST, __VA_ARGS__)
|
||||
|
||||
/* Functions related to Sub-Sub-TLVs in general */
|
||||
|
||||
struct isis_subsubtlvs *isis_alloc_subsubtlvs(enum isis_tlv_context context)
|
||||
{
|
||||
struct isis_subsubtlvs *result;
|
||||
|
||||
result = XCALLOC(MTYPE_ISIS_SUBSUBTLV, sizeof(*result));
|
||||
result->context = context;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Functions related to subtlvs */
|
||||
|
||||
static struct isis_subtlvs *isis_alloc_subtlvs(enum isis_tlv_context context)
|
||||
|
@ -693,6 +693,7 @@ int isis_pack_tlvs(struct isis_tlvs *tlvs, struct stream *stream,
|
||||
size_t len_pointer, bool pad, bool is_lsp);
|
||||
void isis_free_tlvs(struct isis_tlvs *tlvs);
|
||||
struct isis_tlvs *isis_alloc_tlvs(void);
|
||||
struct isis_subsubtlvs *isis_alloc_subsubtlvs(enum isis_tlv_context context);
|
||||
int isis_unpack_tlvs(size_t avail_len, struct stream *stream,
|
||||
struct isis_tlvs **dest, const char **error_log);
|
||||
const char *isis_format_tlvs(struct isis_tlvs *tlvs, struct json_object *json);
|
||||
|
Loading…
Reference in New Issue
Block a user