forked from Mirror/frr
ospfd, ospf6d: add qobj registrations
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
19df7279f7
commit
ae19c24047
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,6 +247,7 @@ 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);
|
||||
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue