#include "zebra/interface.h"
#include "zebra/connected.h"
#include "zebra/rtadv.h"
-extern struct zebra_t zebrad;
/* communicate the withdrawal of a connected address */
static void
#include "sockunion.h"
#include "log.h"
-
-/* Master of threads. */
-extern struct zebra_t zebrad;
-
extern int irdp_sock;
static const char *
extern struct zebra_privs_t zserv_privs;
-/* Master of threads. */
-extern struct zebra_t zebrad;
struct thread *t_irdp_raw;
/* Timer interval of irdp. */
int irdp_sock = -1;
-extern struct zebra_t zebrad;
extern struct thread *t_irdp_raw;
static void
#include "zebra/rib.h"
extern struct zebra_privs_t zserv_privs;
-extern struct zebra_t zebrad;
/*
* Given a sockaddr length, round it up to include pad bytes following
#define ZEBRA_PTM_SUPPORT
-
-/* master zebra server structure */
-extern struct zebra_t zebrad;
-
/* array holding redistribute info about table redistribution */
/* bit AFI is set if that AFI is redistributing routes from this table */
static u_char zebra_import_table_used[ZEBRA_KERNEL_TABLE_MAX];
extern void rib_close (void);
extern void rib_init (void);
extern unsigned long rib_score_proto (u_char proto, u_short instance);
-struct zebra_t;
-extern void rib_queue_add (struct zebra_t *zebra, struct route_node *rn);
+extern void rib_queue_add (struct route_node *rn);
extern int
#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)
{
{0, NULL}
};
-extern struct zebra_t zebrad;
-
extern struct zebra_privs_t zserv_privs;
extern u_int32_t nl_rcvbufsize;
#define ALLNODE "ff02::1"
#define ALLROUTER "ff02::2"
-extern struct zebra_t zebrad;
-
enum rtadv_event {RTADV_START, RTADV_STOP, RTADV_TIMER,
RTADV_TIMER_MSEC, RTADV_READ};
const char ZEBRA_PTM_BFD_SEND_EVENT[] = "sendEvent";
const char ZEBRA_PTM_BFD_VRF_NAME_FIELD[] = "vrfName";
-extern struct zebra_t zebrad;
-
static ptm_lib_handle_t *ptm_hdl;
struct zebra_ptm_cb ptm_cb;
#include "zebra/zserv.h"
#include "zebra/zebra_ptm_redistribute.h"
-/* master zebra server structure */
-extern struct zebra_t zebrad;
-
static int
zsend_interface_bfd_update (int cmd, struct zserv *client,
struct interface *ifp, struct prefix *dp,
#include "zebra/interface.h"
#include "zebra/connected.h"
-/* Default rtm_table for all clients */
-extern struct zebra_t zebrad;
-
/* Should we allow non Quagga processes to delete our routes */
extern int allow_delete;
/* Add route_node to work queue and schedule processing */
void
-rib_queue_add (struct zebra_t *zebra, struct route_node *rn)
+rib_queue_add (struct route_node *rn)
{
- assert (zebra && rn);
+ assert (rn);
/* Pointless to queue a route_node with no RIB entries to add or remove */
if (!rnode_to_ribs (rn))
return;
}
- assert (zebra);
-
- if (zebra->ribq == NULL)
+ if (zebrad.ribq == NULL)
{
zlog_err ("%s: work_queue does not exist!", __func__);
return;
* holder, if necessary, then push the work into it in any case.
* This semantics was introduced after 0.99.9 release.
*/
- if (!zebra->ribq->items->count)
- work_queue_add (zebra->ribq, zebra->mq);
+ if (!zebrad.ribq->items->count)
+ work_queue_add (zebrad.ribq, zebrad.mq);
- rib_meta_queue_add (zebra->mq, rn);
+ rib_meta_queue_add (zebrad.mq, rn);
return;
}
zebra_add_import_table_entry(rn, rib);
else
if (process)
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
}
static void
}
else
{
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
}
}
}
}
if (changed)
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
}
int
si->type == STATIC_IPV6_GATEWAY)
zebra_evaluate_rnh(si->vrf_id, nh_p.family, 1, RNH_NEXTHOP_TYPE, &nh_p);
else
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
}
else
{
* take care.
*/
if (nh)
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
}
else
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
}
break;
* some cases (TODO).
*/
if (rnode_to_ribs (rn))
- rib_queue_add (&zebrad, rn);
+ rib_queue_add (rn);
break;
default:
#include "zebra/zebra_rnh.h"
#include "zebra/interface.h"
-/* Default rtm_table for all clients */
-extern struct zebra_t zebrad;
-
static void free_state(vrf_id_t vrf_id, struct rib *rib, struct route_node *rn);
static void copy_state(struct rnh *rnh, struct rib *rib,
struct route_node *rn);
SET_FLAG(srib->flags, ZEBRA_FLAG_CHANGED);
SET_FLAG(srib->status, RIB_ENTRY_NEXTHOPS_CHANGED);
- rib_queue_add(&zebrad, static_rn);
+ rib_queue_add(static_rn);
}
}
/* NH Tracking route map */
char *nht_rm[AFI_MAX][ZEBRA_ROUTE_MAX+1]; /* "any" == ZEBRA_ROUTE_MAX */
-extern struct zebra_t zebrad;
struct nh_rmap_obj
{
struct nexthop *nexthop;
#define IPADDRESS ASN_IPADDRESS
#define OBJECTIDENTIFIER ASN_OBJECT_ID
-extern struct zebra_t zebrad;
-
oid ipfw_oid [] = { IPFWMIB };
/* Hook functions. */
/* Event list of zebra. */
enum event { ZEBRA_SERV, ZEBRA_READ, ZEBRA_WRITE };
-extern struct zebra_t zebrad;
-
static void zebra_event (enum event event, int sock, struct zserv *client);
extern struct zebra_privs_t zserv_privs;
struct work_queue *ribq;
struct meta_queue *mq;
};
+extern struct zebra_t zebrad;
/* Prototypes. */
extern void zebra_init (void);