Add a function to copy all the Sub-Sub-TLVs passed as an argument.
At this time, this function does not copy any Sub-Sub-TLVs because no
Sub-Sub-TLVs have been defined yet. This function will be extended in
future commits to copy specific Sub-Sub-TLVs, as they become supported.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
return result;
}
+static struct isis_subsubtlvs *
+isis_copy_subsubtlvs(struct isis_subsubtlvs *subsubtlvs)
+{
+ if (!subsubtlvs)
+ return NULL;
+
+ struct isis_subsubtlvs *rv = XCALLOC(MTYPE_ISIS_SUBSUBTLV, sizeof(*rv));
+
+ rv->context = subsubtlvs->context;
+
+ return rv;
+}
+
/* Functions related to subtlvs */
static struct isis_subtlvs *isis_alloc_subtlvs(enum isis_tlv_context context)