mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 14:05:31 +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 "hash.h"
|
||||||
#include "prefix.h"
|
#include "prefix.h"
|
||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
|
#include "qobj.h"
|
||||||
|
|
||||||
#include "isisd/dict.h"
|
#include "isisd/dict.h"
|
||||||
#include "isisd/include-netbsd/iso.h"
|
#include "isisd/include-netbsd/iso.h"
|
||||||
@ -61,6 +62,8 @@
|
|||||||
#include "isisd/isis_events.h"
|
#include "isisd/isis_events.h"
|
||||||
#include "isisd/isis_te.h"
|
#include "isisd/isis_te.h"
|
||||||
|
|
||||||
|
DEFINE_QOBJ_TYPE(isis_circuit)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes.
|
* Prototypes.
|
||||||
*/
|
*/
|
||||||
@ -100,6 +103,8 @@ isis_circuit_new ()
|
|||||||
|
|
||||||
circuit->mtc = mpls_te_circuit_new();
|
circuit->mtc = mpls_te_circuit_new();
|
||||||
|
|
||||||
|
QOBJ_REG (circuit, isis_circuit);
|
||||||
|
|
||||||
return circuit;
|
return circuit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,6 +114,8 @@ isis_circuit_del (struct isis_circuit *circuit)
|
|||||||
if (!circuit)
|
if (!circuit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
QOBJ_UNREG (circuit);
|
||||||
|
|
||||||
isis_circuit_if_unbind (circuit, circuit->interface);
|
isis_circuit_if_unbind (circuit, circuit->interface);
|
||||||
|
|
||||||
/* and lastly the circuit itself */
|
/* and lastly the circuit itself */
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "vty.h"
|
#include "vty.h"
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
|
#include "qobj.h"
|
||||||
|
|
||||||
#include "isis_constants.h"
|
#include "isis_constants.h"
|
||||||
#include "isis_common.h"
|
#include "isis_common.h"
|
||||||
@ -140,7 +141,10 @@ struct isis_circuit
|
|||||||
u_int32_t ctrl_pdus_txed; /* controlPDUsSent */
|
u_int32_t ctrl_pdus_txed; /* controlPDUsSent */
|
||||||
u_int32_t desig_changes[2]; /* lanLxDesignatedIntermediateSystemChanges */
|
u_int32_t desig_changes[2]; /* lanLxDesignatedIntermediateSystemChanges */
|
||||||
u_int32_t rej_adjacencies; /* rejectedAdjacencies */
|
u_int32_t rej_adjacencies; /* rejectedAdjacencies */
|
||||||
|
|
||||||
|
QOBJ_FIELDS
|
||||||
};
|
};
|
||||||
|
DECLARE_QOBJ_TYPE(isis_circuit)
|
||||||
|
|
||||||
void isis_circuit_init (void);
|
void isis_circuit_init (void);
|
||||||
struct isis_circuit *isis_circuit_new (void);
|
struct isis_circuit *isis_circuit_new (void);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "plist.h"
|
#include "plist.h"
|
||||||
#include "zclient.h"
|
#include "zclient.h"
|
||||||
#include "vrf.h"
|
#include "vrf.h"
|
||||||
|
#include "qobj.h"
|
||||||
|
|
||||||
#include "isisd/dict.h"
|
#include "isisd/dict.h"
|
||||||
#include "include-netbsd/iso.h"
|
#include "include-netbsd/iso.h"
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
#include "prefix.h"
|
#include "prefix.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
#include "qobj.h"
|
||||||
|
|
||||||
#include "isisd/dict.h"
|
#include "isisd/dict.h"
|
||||||
#include "isisd/include-netbsd/iso.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;
|
struct isis *isis = NULL;
|
||||||
|
|
||||||
|
DEFINE_QOBJ_TYPE(isis)
|
||||||
|
DEFINE_QOBJ_TYPE(isis_area)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes.
|
* Prototypes.
|
||||||
*/
|
*/
|
||||||
@ -100,6 +104,7 @@ isis_new (unsigned long process_id)
|
|||||||
*/
|
*/
|
||||||
/* isis->debugs = 0xFFFF; */
|
/* isis->debugs = 0xFFFF; */
|
||||||
isisMplsTE.status = disable; /* Only support TE metric */
|
isisMplsTE.status = disable; /* Only support TE metric */
|
||||||
|
QOBJ_REG (isis, isis);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct isis_area *
|
struct isis_area *
|
||||||
@ -169,6 +174,8 @@ isis_area_create (const char *area_tag)
|
|||||||
listnode_add (isis->area_list, area);
|
listnode_add (isis->area_list, area);
|
||||||
area->isis = isis;
|
area->isis = isis;
|
||||||
|
|
||||||
|
QOBJ_REG (area, isis_area);
|
||||||
|
|
||||||
return area;
|
return area;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,6 +235,8 @@ isis_area_destroy (struct vty *vty, const char *area_tag)
|
|||||||
return CMD_ERR_NO_MATCH;
|
return CMD_ERR_NO_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QOBJ_UNREG (area);
|
||||||
|
|
||||||
if (area->circuit_list)
|
if (area->circuit_list)
|
||||||
{
|
{
|
||||||
for (ALL_LIST_ELEMENTS (area->circuit_list, node, nnode, circuit))
|
for (ALL_LIST_ELEMENTS (area->circuit_list, node, nnode, circuit))
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "isis_flags.h"
|
#include "isis_flags.h"
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "isis_memory.h"
|
#include "isis_memory.h"
|
||||||
|
#include "qobj.h"
|
||||||
|
|
||||||
/* uncomment if you are a developer in bug hunt */
|
/* uncomment if you are a developer in bug hunt */
|
||||||
/* #define EXTREME_DEBUG */
|
/* #define EXTREME_DEBUG */
|
||||||
@ -57,9 +58,12 @@ struct isis
|
|||||||
struct thread *t_dync_clean; /* dynamic hostname cache cleanup thread */
|
struct thread *t_dync_clean; /* dynamic hostname cache cleanup thread */
|
||||||
|
|
||||||
struct route_table *ext_info[REDIST_PROTOCOL_COUNT];
|
struct route_table *ext_info[REDIST_PROTOCOL_COUNT];
|
||||||
|
|
||||||
|
QOBJ_FIELDS
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct isis *isis;
|
extern struct isis *isis;
|
||||||
|
DECLARE_QOBJ_TYPE(isis_area)
|
||||||
|
|
||||||
struct isis_area
|
struct isis_area
|
||||||
{
|
{
|
||||||
@ -135,7 +139,10 @@ struct isis_area
|
|||||||
char *topology_basedynh; /* Dynamic hostname base. */
|
char *topology_basedynh; /* Dynamic hostname base. */
|
||||||
char top_params[200]; /* FIXME: what is reasonable? */
|
char top_params[200]; /* FIXME: what is reasonable? */
|
||||||
#endif /* TOPOLOGY_GENERATE */
|
#endif /* TOPOLOGY_GENERATE */
|
||||||
|
|
||||||
|
QOBJ_FIELDS
|
||||||
};
|
};
|
||||||
|
DECLARE_QOBJ_TYPE(isis_area)
|
||||||
|
|
||||||
void isis_init (void);
|
void isis_init (void);
|
||||||
void isis_new(unsigned long);
|
void isis_new(unsigned long);
|
||||||
|
Loading…
Reference in New Issue
Block a user