ospfd: Add support Router Capabilities support to OSPF
This is an implementation of RFC4970 (Router Information) and
RFC5088 (PCE Capabilities announcement)
* ospfd/Makefile.am: Add new file ospf_ri.c and ospf_ri.h
* ospfd/ospf_opaque.c: Add new Router Capabilities code point
* ospfd/ospf_ri.[c,h]: Implementation of RFC4970 & RFC5088
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 6b069c8..39465c1 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -62,6 +62,7 @@
*------------------------------------------------------------------------*/
#include "ospfd/ospf_te.h"
+#include "ospfd/ospf_ri.h"
#ifdef SUPPORT_OSPF_API
int ospf_apiserver_init (void);
@@ -87,6 +88,9 @@
if (ospf_mpls_te_init () != 0)
exit (1);
+ if (ospf_router_info_init () != 0)
+ exit (1);
+
#ifdef SUPPORT_OSPF_API
if ((ospf_apiserver_enable) && (ospf_apiserver_init () != 0))
exit (1);
@@ -100,6 +104,8 @@
{
ospf_mpls_te_term ();
+ ospf_router_info_term ();
+
#ifdef SUPPORT_OSPF_API
ospf_apiserver_term ();
#endif /* SUPPORT_OSPF_API */
@@ -216,6 +222,9 @@
case OPAQUE_TYPE_INTER_AS_LSA:
name = "Inter-AS TE-v2 LSA";
break;
+ case OPAQUE_TYPE_ROUTER_INFORMATION_LSA:
+ name = "Router Information LSA";
+ break;
default:
if (OPAQUE_TYPE_RANGE_UNASSIGNED (opaque_type))
name = "Unassigned";