#define ZEBRA_PTM_SUPPORT
-/* Zebra instance */
-struct zebra_t zebrad = {
-};
-
/* process id. */
pid_t pid;
#include "zebra/router-id.h"
#include "zebra/redistribute.h"
-/* master zebra server structure */
-extern struct zebra_t zebrad;
-
static struct connected *router_id_find_node(struct list *l,
struct connected *ifc)
{
/*
* Initialize the dataplane module during startup, internal/private version
*/
-static void zebra_dplane_init_internal(struct zebra_t *zebra)
+static void zebra_dplane_init_internal(void)
{
memset(&zdplane_info, 0, sizeof(zdplane_info));
*/
void zebra_dplane_init(int (*results_fp)(struct dplane_ctx_q *))
{
- zebra_dplane_init_internal(&zebrad);
+ zebra_dplane_init_internal();
zdplane_info.dg_results_cb = results_fp;
}
int mpls_enabled;
-/* Default rtm_table for all clients */
-extern struct zebra_t zebrad;
-
/* static function declarations */
static void fec_evaluate(struct zebra_vrf *zvrf);
static int snhlfe_del(zebra_snhlfe_t *snhlfe);
static int snhlfe_del_all(zebra_slsp_t *slsp);
static char *snhlfe2str(zebra_snhlfe_t *snhlfe, char *buf, int size);
-static int mpls_processq_init(struct zebra_t *zebra);
/* Static functions */
/*
* Initialize work queue for processing changed LSPs.
*/
-static int mpls_processq_init(struct zebra_t *zebra)
+static int mpls_processq_init(void)
{
zrouter.lsp_process_q = work_queue_new(zrouter.master, "LSP processing");
if (!zrouter.lsp_process_q) {
return;
}
- if (!mpls_processq_init(&zebrad))
+ if (!mpls_processq_init())
mpls_enabled = 1;
hook_register(zserv_client_close, zebra_mpls_cleanup_fecs_for_client);
#define MPLS_NO_LABEL MPLS_INVALID_LABEL
-extern struct zebra_t zebrad;
-
static int zebra_pw_enabled(struct zebra_pw *);
static void zebra_pw_install(struct zebra_pw *);
static void zebra_pw_uninstall(struct zebra_pw *);
}
/* initialise zebra rib work queue */
-static void rib_queue_init(struct zebra_t *zebra)
+static void rib_queue_init(void)
{
- assert(zebra);
-
if (!(zrouter.ribq = work_queue_new(zrouter.master,
"route_node processing"))) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
/* Routing information base initialize. */
void rib_init(void)
{
- rib_queue_init(&zebrad);
+ rib_queue_init();
/* Init dataplane, and register for results */
pthread_mutex_init(&dplane_mutex, NULL);
#include "zebra/zebra_netns_notify.h"
#include "zebra/zebra_routemap.h"
-extern struct zebra_t zebrad;
-
static void zebra_vrf_table_create(struct zebra_vrf *zvrf, afi_t afi,
safi_t safi);
static void zebra_rnhtable_node_cleanup(struct route_table *table,
* with the message is executed. This proceeds until there are no more messages,
* an error occurs, or the processing limit is reached.
*
- * The client's I/O thread can push at most zebrad.packets_to_process messages
+ * The client's I/O thread can push at most zrouter.packets_to_process messages
* onto the input buffer before notifying us there are packets to read. As long
- * as we always process zebrad.packets_to_process messages here, then we can
+ * as we always process zrouter.packets_to_process messages here, then we can
* rely on the read thread to handle queuing this task enough times to process
* everything on the input queue.
*/
DECLARE_HOOK(zserv_client_connect, (struct zserv *client), (client));
DECLARE_KOOH(zserv_client_close, (struct zserv *client), (client));
-/* Zebra instance */
-struct zebra_t {
-};
-extern struct zebra_t zebrad;
extern unsigned int multipath_num;
/*