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 | |
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>
-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 | ||||
-rw-r--r-- | ospfd/ospf_interface.c | 6 | ||||
-rw-r--r-- | ospfd/ospf_interface.h | 4 | ||||
-rw-r--r-- | ospfd/ospfd.c | 5 | ||||
-rw-r--r-- | ospfd/ospfd.h | 4 |
8 files changed, 35 insertions, 1 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 diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 844076557..936ec6966 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -51,6 +51,7 @@ #include "ospfd/ospf_snmp.h" #endif /* HAVE_SNMP */ +DEFINE_QOBJ_TYPE(ospf_interface) int ospf_if_get_output_cost (struct ospf_interface *oi) @@ -246,7 +247,8 @@ ospf_if_new (struct ospf *ospf, struct interface *ifp, struct prefix *p) ospf_opaque_type9_lsa_init (oi); oi->ospf = ospf; - + QOBJ_REG (oi, ospf_interface); + return oi; } @@ -307,6 +309,8 @@ ospf_if_free (struct ospf_interface *oi) ospf_opaque_type9_lsa_term (oi); + QOBJ_UNREG (oi); + /* Free Pseudo Neighbour */ ospf_nbr_delete (oi->nbr_self); diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h index 7a74288bf..bd51bbf42 100644 --- a/ospfd/ospf_interface.h +++ b/ospfd/ospf_interface.h @@ -23,6 +23,7 @@ #ifndef _ZEBRA_OSPF_INTERFACE_H #define _ZEBRA_OSPF_INTERFACE_H +#include "qobj.h" #include "ospfd/ospf_packet.h" #include "ospfd/ospf_spf.h" @@ -228,7 +229,10 @@ struct ospf_interface u_int32_t state_change; /* Number of status change. */ u_int32_t full_nbrs; + + QOBJ_FIELDS }; +DECLARE_QOBJ_TYPE(ospf_interface) /* Prototypes. */ extern char *ospf_if_name (struct ospf_interface *); diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 1a7691c52..b7542c2a8 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -55,6 +55,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "ospfd/ospf_ase.h" +DEFINE_QOBJ_TYPE(ospf) /* OSPF process wide configuration. */ static struct ospf_master ospf_master; @@ -292,6 +293,8 @@ ospf_new (u_short instance) /* Enable "log-adjacency-changes" */ SET_FLAG(new->config, OSPF_LOG_ADJACENCY_CHANGES); + QOBJ_REG (new, ospf); + return new; } @@ -505,6 +508,8 @@ ospf_finish_final (struct ospf *ospf) int i; u_short instance = 0; + QOBJ_UNREG (ospf); + ospf_opaque_type11_lsa_term (ospf); /* be nice if this worked, but it doesn't */ diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 41a7a30d8..a9e3efeea 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -24,6 +24,7 @@ #define _ZEBRA_OSPFD_H #include <zebra.h> +#include "qobj.h" #include "libospf.h" #include "filter.h" @@ -302,7 +303,10 @@ struct ospf u_int32_t if_ospf_cli_count; struct route_table *distance_table; + + QOBJ_FIELDS }; +DECLARE_QOBJ_TYPE(ospf) /* OSPF area structure. */ struct ospf_area |