isisd: add support to import routes from other protocols
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c
index 4fca072..8d4ea0e 100644
--- a/isisd/isis_tlv.c
+++ b/isisd/isis_tlv.c
@@ -993,8 +993,8 @@
return add_tlv (LSP_ENTRIES, pos - value, value, stream);
}
-int
-tlv_add_ipv4_reachs (struct list *ipv4_reachs, struct stream *stream)
+static int
+tlv_add_ipv4_reachs (u_char tag, struct list *ipv4_reachs, struct stream *stream)
{
struct listnode *node;
struct ipv4_reachability *reach;
@@ -1007,7 +1007,7 @@
if (pos - value + IPV4_REACH_LEN > 255)
{
retval =
- add_tlv (IPV4_INT_REACHABILITY, pos - value, value, stream);
+ add_tlv (tag, pos - value, value, stream);
if (retval != ISIS_OK)
return retval;
pos = value;
@@ -1026,10 +1026,23 @@
pos += IPV4_MAX_BYTELEN;
}
- return add_tlv (IPV4_INT_REACHABILITY, pos - value, value, stream);
+ return add_tlv (tag, pos - value, value, stream);
}
int
+tlv_add_ipv4_int_reachs (struct list *ipv4_reachs, struct stream *stream)
+{
+ return tlv_add_ipv4_reachs(IPV4_INT_REACHABILITY, ipv4_reachs, stream);
+}
+
+int
+tlv_add_ipv4_ext_reachs (struct list *ipv4_reachs, struct stream *stream)
+{
+ return tlv_add_ipv4_reachs(IPV4_EXT_REACHABILITY, ipv4_reachs, stream);
+}
+
+
+int
tlv_add_te_ipv4_reachs (struct list *te_ipv4_reachs, struct stream *stream)
{
struct listnode *node;