diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-12-07 13:25:38 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2016-12-09 17:36:25 +0100 |
commit | ae19c240472c8315aac4d1a0958cb3bcd48eee91 (patch) | |
tree | 46310a893acb0c8a4deb0807a6cb78bc8dcffb2d /ospf6d | |
parent | bgpd: add qobj registrations (diff) | |
download | frr-ae19c240472c8315aac4d1a0958cb3bcd48eee91.tar.xz frr-ae19c240472c8315aac4d1a0958cb3bcd48eee91.zip |
ospfd, ospf6d: add qobj registrations
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_interface.c | 5 | ||||
-rw-r--r-- | ospf6d/ospf6_interface.h | 4 | ||||
-rw-r--r-- | ospf6d/ospf6_top.c | 4 | ||||
-rw-r--r-- | ospf6d/ospf6_top.h | 4 |
4 files changed, 17 insertions, 0 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 74c9ac739..dd63f00c7 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -46,6 +46,7 @@ #include "ospf6_bfd.h" DEFINE_MTYPE_STATIC(OSPF6D, CFG_PLIST_NAME, "configured prefix list names") +DEFINE_QOBJ_TYPE(ospf6_interface) unsigned char conf_debug_ospf6_interface = 0; @@ -212,6 +213,8 @@ ospf6_interface_create (struct interface *ifp) oi->ifmtu = iobuflen; } + QOBJ_REG (oi, ospf6_interface); + oi->lsupdate_list = ospf6_lsdb_create (oi); oi->lsack_list = ospf6_lsdb_create (oi); oi->lsdb = ospf6_lsdb_create (oi); @@ -238,6 +241,8 @@ ospf6_interface_delete (struct ospf6_interface *oi) struct listnode *node, *nnode; struct ospf6_neighbor *on; + QOBJ_UNREG (oi); + for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on)) ospf6_neighbor_delete (on); diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index 3e09bfb93..179477a63 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -22,6 +22,7 @@ #ifndef OSPF6_INTERFACE_H #define OSPF6_INTERFACE_H +#include "qobj.h" #include "if.h" /* Debug option */ @@ -116,7 +117,10 @@ struct ospf6_interface /* BFD information */ void *bfd_info; + + QOBJ_FIELDS }; +DECLARE_QOBJ_TYPE(ospf6_interface) /* interface state */ #define OSPF6_INTERFACE_NONE 0 diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 16fb012ea..238053231 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -49,6 +49,8 @@ #include "ospf6_spf.h" #include "ospf6d.h" +DEFINE_QOBJ_TYPE(ospf6) + /* global ospf6d variable */ struct ospf6 *ospf6; @@ -159,6 +161,7 @@ ospf6_create (void) /* Enable "log-adjacency-changes" */ SET_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES); + QOBJ_REG (o, ospf6); return o; } @@ -169,6 +172,7 @@ ospf6_delete (struct ospf6 *o) struct listnode *node, *nnode; struct ospf6_area *oa; + QOBJ_UNREG (o); ospf6_disable (ospf6); for (ALL_LIST_ELEMENTS (o->area_list, node, nnode, oa)) diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h index 8985eeaa2..42a4d1248 100644 --- a/ospf6d/ospf6_top.h +++ b/ospf6d/ospf6_top.h @@ -22,6 +22,7 @@ #ifndef OSPF6_TOP_H #define OSPF6_TOP_H +#include "qobj.h" #include "routemap.h" /* OSPFv3 top level data structure */ @@ -93,7 +94,10 @@ struct ospf6 u_char distance_external; struct route_table *distance_table; + + QOBJ_FIELDS }; +DECLARE_QOBJ_TYPE(ospf6) #define OSPF6_DISABLED 0x01 #define OSPF6_STUB_ROUTER 0x02 |