Clean up various "shadow" warnings in babeld.
Signed-off-by: Mark Stapp <mjs@cisco.com>
}
/* Disable babel redistribution */
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
- zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP, type, 0, VRF_DEFAULT);
- zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP6, type, 0, VRF_DEFAULT);
+ zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, babel_zclient, AFI_IP, type, 0,
+ VRF_DEFAULT);
+ zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, babel_zclient, AFI_IP6, type, 0,
+ VRF_DEFAULT);
}
}
{
struct route_stream *routes = NULL;
struct xroute_stream *xroutes = NULL;
+
routes = route_stream(0);
if(routes) {
while(1) {
/* we must use a pointer because of zclient.c's functions (new, free). */
-struct zclient *zclient;
+struct zclient *babel_zclient;
/* Debug types */
static const struct {
}
if (!negate)
- zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, afi, type, 0, VRF_DEFAULT);
+ zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, babel_zclient, afi, type, 0, VRF_DEFAULT);
else {
- zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, afi, type, 0, VRF_DEFAULT);
+ zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, babel_zclient, afi, type, 0,
+ VRF_DEFAULT);
/* perhaps should we remove xroutes having the same type... */
}
return CMD_SUCCESS;
void babelz_zebra_init(void)
{
- zclient = zclient_new(master, &zclient_options_default, babel_handlers,
- array_size(babel_handlers));
- zclient_init(zclient, ZEBRA_ROUTE_BABEL, 0, &babeld_privs);
+ babel_zclient = zclient_new(master, &zclient_options_default, babel_handlers,
+ array_size(babel_handlers));
+ zclient_init(babel_zclient, ZEBRA_ROUTE_BABEL, 0, &babeld_privs);
- zclient->zebra_connected = babel_zebra_connected;
+ babel_zclient->zebra_connected = babel_zebra_connected;
install_element(BABEL_NODE, &babel_redistribute_type_cmd);
install_element(ENABLE_NODE, &debug_babel_cmd);
void
babel_zebra_close_connexion(void)
{
- zclient_stop(zclient);
- zclient_free(zclient);
+ zclient_stop(babel_zclient);
+ zclient_free(babel_zclient);
}
#include "vty.h"
-extern struct zclient *zclient;
+extern struct zclient *babel_zclient;
void babelz_zebra_init(void);
void babel_zebra_close_connexion(void);
/* list redistributed protocols */
for (afi = AFI_IP; afi <= AFI_IP6; afi++) {
for (i = 0; i < ZEBRA_ROUTE_MAX; i++) {
- if (i != zclient->redist_default &&
- vrf_bitmap_check(&zclient->redist[afi][i], VRF_DEFAULT)) {
+ if (i != babel_zclient->redist_default &&
+ vrf_bitmap_check(&babel_zclient->redist[afi][i], VRF_DEFAULT)) {
vty_out(vty, " redistribute %s %s\n",
(afi == AFI_IP) ? "ipv4" : "ipv6",
zebra_route_string(i));
debugf(BABEL_DEBUG_ROUTE, "%s route (%s) to zebra",
add ? "adding" : "removing",
(family == AF_INET) ? "ipv4" : "ipv6");
- return zclient_route_send (add ? ZEBRA_ROUTE_ADD : ZEBRA_ROUTE_DELETE,
- zclient, &api);
+ return zclient_route_send(add ? ZEBRA_ROUTE_ADD : ZEBRA_ROUTE_DELETE, babel_zclient, &api);
}
int
struct route_stream;
-extern struct babel_route **routes;
extern int kernel_metric;
extern enum babel_diversity diversity_kind;
extern int diversity_factor;