mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 16:26:10 +00:00
isisd: qobj: register everything
Wire up all neccessary isisd first-class objects to be able to use qobj safe-pointers on them. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
e80e7cced3
commit
676a4ea3ed
@ -41,6 +41,7 @@
|
||||
#include "hash.h"
|
||||
#include "prefix.h"
|
||||
#include "stream.h"
|
||||
#include "qobj.h"
|
||||
|
||||
#include "isisd/dict.h"
|
||||
#include "isisd/include-netbsd/iso.h"
|
||||
@ -61,6 +62,8 @@
|
||||
#include "isisd/isis_events.h"
|
||||
#include "isisd/isis_te.h"
|
||||
|
||||
DEFINE_QOBJ_TYPE(isis_circuit)
|
||||
|
||||
/*
|
||||
* Prototypes.
|
||||
*/
|
||||
@ -100,6 +103,8 @@ isis_circuit_new ()
|
||||
|
||||
circuit->mtc = mpls_te_circuit_new();
|
||||
|
||||
QOBJ_REG (circuit, isis_circuit);
|
||||
|
||||
return circuit;
|
||||
}
|
||||
|
||||
@ -109,6 +114,8 @@ isis_circuit_del (struct isis_circuit *circuit)
|
||||
if (!circuit)
|
||||
return;
|
||||
|
||||
QOBJ_UNREG (circuit);
|
||||
|
||||
isis_circuit_if_unbind (circuit, circuit->interface);
|
||||
|
||||
/* and lastly the circuit itself */
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "vty.h"
|
||||
#include "if.h"
|
||||
#include "qobj.h"
|
||||
|
||||
#include "isis_constants.h"
|
||||
#include "isis_common.h"
|
||||
@ -140,7 +141,10 @@ struct isis_circuit
|
||||
u_int32_t ctrl_pdus_txed; /* controlPDUsSent */
|
||||
u_int32_t desig_changes[2]; /* lanLxDesignatedIntermediateSystemChanges */
|
||||
u_int32_t rej_adjacencies; /* rejectedAdjacencies */
|
||||
|
||||
QOBJ_FIELDS
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(isis_circuit)
|
||||
|
||||
void isis_circuit_init (void);
|
||||
struct isis_circuit *isis_circuit_new (void);
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "plist.h"
|
||||
#include "zclient.h"
|
||||
#include "vrf.h"
|
||||
#include "qobj.h"
|
||||
|
||||
#include "isisd/dict.h"
|
||||
#include "include-netbsd/iso.h"
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "stream.h"
|
||||
#include "prefix.h"
|
||||
#include "table.h"
|
||||
#include "qobj.h"
|
||||
|
||||
#include "isisd/dict.h"
|
||||
#include "isisd/include-netbsd/iso.h"
|
||||
@ -63,6 +64,9 @@ u_char DEFAULT_TOPOLOGY_BASEIS[6] = { 0xFE, 0xED, 0xFE, 0xED, 0x00, 0x00 };
|
||||
|
||||
struct isis *isis = NULL;
|
||||
|
||||
DEFINE_QOBJ_TYPE(isis)
|
||||
DEFINE_QOBJ_TYPE(isis_area)
|
||||
|
||||
/*
|
||||
* Prototypes.
|
||||
*/
|
||||
@ -100,6 +104,7 @@ isis_new (unsigned long process_id)
|
||||
*/
|
||||
/* isis->debugs = 0xFFFF; */
|
||||
isisMplsTE.status = disable; /* Only support TE metric */
|
||||
QOBJ_REG (isis, isis);
|
||||
}
|
||||
|
||||
struct isis_area *
|
||||
@ -169,6 +174,8 @@ isis_area_create (const char *area_tag)
|
||||
listnode_add (isis->area_list, area);
|
||||
area->isis = isis;
|
||||
|
||||
QOBJ_REG (area, isis_area);
|
||||
|
||||
return area;
|
||||
}
|
||||
|
||||
@ -228,6 +235,8 @@ isis_area_destroy (struct vty *vty, const char *area_tag)
|
||||
return CMD_ERR_NO_MATCH;
|
||||
}
|
||||
|
||||
QOBJ_UNREG (area);
|
||||
|
||||
if (area->circuit_list)
|
||||
{
|
||||
for (ALL_LIST_ELEMENTS (area->circuit_list, node, nnode, circuit))
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "isis_flags.h"
|
||||
#include "dict.h"
|
||||
#include "isis_memory.h"
|
||||
#include "qobj.h"
|
||||
|
||||
/* uncomment if you are a developer in bug hunt */
|
||||
/* #define EXTREME_DEBUG */
|
||||
@ -57,9 +58,12 @@ struct isis
|
||||
struct thread *t_dync_clean; /* dynamic hostname cache cleanup thread */
|
||||
|
||||
struct route_table *ext_info[REDIST_PROTOCOL_COUNT];
|
||||
|
||||
QOBJ_FIELDS
|
||||
};
|
||||
|
||||
extern struct isis *isis;
|
||||
DECLARE_QOBJ_TYPE(isis_area)
|
||||
|
||||
struct isis_area
|
||||
{
|
||||
@ -135,7 +139,10 @@ struct isis_area
|
||||
char *topology_basedynh; /* Dynamic hostname base. */
|
||||
char top_params[200]; /* FIXME: what is reasonable? */
|
||||
#endif /* TOPOLOGY_GENERATE */
|
||||
|
||||
QOBJ_FIELDS
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(isis_area)
|
||||
|
||||
void isis_init (void);
|
||||
void isis_new(unsigned long);
|
||||
|
Loading…
Reference in New Issue
Block a user