void ldp_zebra_shutdown() { int i; for (i = 0;i < ZEBRA_ROUTE_MAX;i++) { if (i != ZEBRA_ROUTE_LDP) zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, zclient,i); } }
void ldp_zebra_startup() { int i; for (i = 0;i < ZEBRA_ROUTE_MAX;i++) { if (i != ZEBRA_ROUTE_LDP) zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, zclient,i); } }
int eigrp_redistribute_set(struct eigrp *eigrp, int type, struct eigrp_metrics metric) { if (eigrp_is_type_redistributed(type)) { if (eigrp_metrics_is_same(metric, eigrp->dmetric[type])) { eigrp->dmetric[type] = metric; } eigrp_external_routes_refresh(eigrp, type); // if (IS_DEBUG_EIGRP(zebra, ZEBRA_REDISTRIBUTE)) // zlog_debug ("Redistribute[%s]: Refresh Type[%d], // Metric[%d]", // eigrp_redist_string(type), // metric_type (eigrp, type), metric_value // (eigrp, type)); return CMD_SUCCESS; } eigrp->dmetric[type] = metric; zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP, type, 0, VRF_DEFAULT); ++eigrp->redistribute; return CMD_SUCCESS; }
void rsvp_zebra_init () { /* Allocate zebra structure. */ zclient = zclient_new (); zclient_init (zclient, ZEBRA_ROUTE_RSVP); zclient->router_id_update = rsvp_router_id_update_zebra; zclient->interface_add = rsvp_interface_add; zclient->interface_delete = rsvp_interface_delete; zclient->interface_up = rsvp_interface_state_up; zclient->interface_down = rsvp_interface_state_down; zclient->interface_address_add = rsvp_interface_address_add; zclient->interface_address_delete = rsvp_interface_address_delete; zclient->ipv4_route_add = rsvp_zebra_read_ipv4; zclient->ipv4_route_delete = rsvp_zebra_read_ipv4; #if 0 zclient->te_link_add = te_zebra_read_link; zclient->te_link_delete = te_zebra_read_link; zclient->te_link_update = te_zebra_read_link; zclient->te_link_remote_update = te_zebra_read_remote_link; zclient->te_link2rtrid_add = te_zebra_read_link2rtrid; zclient->te_link2rtrid_delete = te_zebra_read_link2rtrid; zclient->te_nexthop_add = te_zebra_read_nexthop; zclient->te_nexthop_delete = te_zebra_read_nexthop; #endif zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, ZEBRA_ROUTE_TE); #if 0 rdb_igp_hello(); #endif }
int eigrp_redistribute_unset(struct eigrp *eigrp, int type) { if (eigrp_is_type_redistributed(type)) { memset(&eigrp->dmetric[type], 0, sizeof(struct eigrp_metrics)); zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP, type, 0, VRF_DEFAULT); --eigrp->redistribute; } return CMD_SUCCESS; }
void rip_redistribute_conf_update(struct rip *rip, int type) { zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP, type, 0, rip->vrf->vrf_id); }