listnode_add_sort(node->entries, entry);
entry->prefix = node;
- eigrp_zebra_route_add((struct prefix_ipv4 *)
- node->destination, l);
+ eigrp_zebra_route_add(node->destination, l);
}
list_delete(l);
list_free(node->entries);
list_free(node->rij);
listnode_delete(topology, node);
- eigrp_zebra_route_delete((struct prefix_ipv4 *)
- node->destination);
+ eigrp_zebra_route_delete(node->destination);
XFREE(MTYPE_EIGRP_PREFIX_ENTRY, node);
}
}
{
if (listnode_lookup(node->entries, entry) != NULL) {
listnode_delete(node->entries, entry);
- eigrp_zebra_route_delete((struct prefix_ipv4 *)
- node->destination);
+ eigrp_zebra_route_delete(node->destination);
XFREE(MTYPE_EIGRP_NEIGHBOR_ENTRY, entry);
}
}
struct eigrp_neighbor_entry *entry;
if (successors) {
- eigrp_zebra_route_add((struct prefix_ipv4 *)
- prefix->destination,
+ eigrp_zebra_route_add(prefix->destination,
successors);
for (ALL_LIST_ELEMENTS_RO(successors, node, entry))
entry->flags |= EIGRP_NEIGHBOR_ENTRY_INTABLE_FLAG;
list_delete(successors);
} else {
- eigrp_zebra_route_delete((struct prefix_ipv4 *)
- prefix->destination);
+ eigrp_zebra_route_delete(prefix->destination);
for (ALL_LIST_ELEMENTS_RO(prefix->entries, node, entry))
entry->flags &= ~EIGRP_NEIGHBOR_ENTRY_INTABLE_FLAG;
}
ifname_tmp, strnlen(ifname_tmp, INTERFACE_NAMSIZ), VRF_DEFAULT);
}
-void eigrp_zebra_route_add(struct prefix_ipv4 *p, struct list *successors)
+void eigrp_zebra_route_add(struct prefix *p, struct list *successors)
{
struct zapi_route api;
struct zapi_nexthop *api_nh;
}
if (IS_DEBUG_EIGRP(zebra, ZEBRA_REDISTRIBUTE)) {
- char buf[2][INET_ADDRSTRLEN];
- zlog_debug(
- "Zebra: Route add %s/%d nexthop %s",
- inet_ntop(AF_INET, &p->prefix, buf[0], sizeof(buf[0])),
- p->prefixlen, inet_ntop(AF_INET, 0 /*&p->nexthop*/,
- buf[1], sizeof(buf[1])));
+ char buf[2][PREFIX_STRLEN];
+ zlog_debug("Zebra: Route add %s nexthop %s",
+ prefix2str(p, buf[0], PREFIX_STRLEN),
+ inet_ntop(AF_INET, 0, buf[1], PREFIX_STRLEN));
}
zclient_route_send(ZEBRA_ROUTE_ADD, zclient, &api);
}
-void eigrp_zebra_route_delete(struct prefix_ipv4 *p)
+void eigrp_zebra_route_delete(struct prefix *p)
{
struct zapi_route api;
zclient_route_send(ZEBRA_ROUTE_DELETE, zclient, &api);
if (IS_DEBUG_EIGRP(zebra, ZEBRA_REDISTRIBUTE)) {
- char buf[INET_ADDRSTRLEN];
- zlog_debug("Zebra: Route del %s/%d",
- inet_ntop(AF_INET, &p->prefix, buf, sizeof(buf)),
- p->prefixlen);
+ char buf[PREFIX_STRLEN];
+ zlog_debug("Zebra: Route del %s",
+ prefix2str(p, buf, PREFIX_STRLEN));
}
return;
extern void eigrp_zebra_init(void);
-extern void eigrp_zebra_route_add(struct prefix_ipv4 *, struct list *);
-extern void eigrp_zebra_route_delete(struct prefix_ipv4 *);
+extern void eigrp_zebra_route_add(struct prefix *, struct list *);
+extern void eigrp_zebra_route_delete(struct prefix *);
extern int eigrp_redistribute_set(struct eigrp *, int, struct eigrp_metrics);
extern int eigrp_redistribute_unset(struct eigrp *, int);
extern int eigrp_is_type_redistributed(int);