summaryrefslogtreecommitdiff
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorpaul <paul>2004-05-09 09:09:59 +0000
committerpaul <paul>2004-05-09 09:09:59 +0000
commitb9df2d25fc8d06ca63fa792d162d97656361338b (patch)
tree53ec5975f608983b5cb95ee38ca112934db5e609 /zebra/redistribute.c
parent0a5893596774554f039222c481d235de0f35d99e (diff)
2004-05-09 Paul Jakma <paul@dishone.st>
* zserv.c: (zsend_route_multipath) Set the nexthop_num field correctly. Add NEXTHOP_TYPE_IPV6_IFNAME for v6. Conditionally set ZAPI_MESSAGE_METRIC flag - only for adds. (zsend_ipv4_add) cruft, deleted. (zsend_ipv4_delete) ditto. (zsend_ipv6_add) ditto. (zsend_ipv6_delete) ditto. 2004-05-09 Sowmini Varadhan <sowmini.varadhan@sun.com> * zserv.c: (zsend_ipv{4,6}_{add,delete}_multipath) collapsed into single zsend_route_multipath function. (zsend_interface_{up,down}) collapsed into zsend_interface_update. (zsend_interface_address_{add,delete}) collapsed into zsend_interface_address. (zsend_interface_add) send mtu6. (zsend_interface_delete) ditto. (zebra_write) remove unused function. (various) Apply static qualifier. Add comments. * zserv.h: Definitions changed as per above. * redistribute.c: Changes as per zserv.c.
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r--zebra/redistribute.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 2d30f790..ae61a448 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -107,7 +107,7 @@ zebra_redistribute_default (struct zserv *client)
for (newrib = rn->info; newrib; newrib = newrib->next)
if (CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)
&& newrib->distance != DISTANCE_INFINITY)
- zsend_ipv4_add_multipath (client, &rn->p, newrib);
+ zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, &rn->p, newrib);
route_unlock_node (rn);
}
}
@@ -127,7 +127,7 @@ zebra_redistribute_default (struct zserv *client)
for (newrib = rn->info; newrib; newrib = newrib->next)
if (CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)
&& newrib->distance != DISTANCE_INFINITY)
- zsend_ipv6_add_multipath (client, &rn->p, newrib);
+ zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, &rn->p, newrib);
route_unlock_node (rn);
}
}
@@ -150,7 +150,7 @@ zebra_redistribute (struct zserv *client, int type)
&& newrib->type == type
&& newrib->distance != DISTANCE_INFINITY
&& zebra_check_addr (&rn->p))
- zsend_ipv4_add_multipath (client, &rn->p, newrib);
+ zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, &rn->p, newrib);
#ifdef HAVE_IPV6
table = vrf_table (AFI_IP6, SAFI_UNICAST, 0);
@@ -161,7 +161,7 @@ zebra_redistribute (struct zserv *client, int type)
&& newrib->type == type
&& newrib->distance != DISTANCE_INFINITY
&& zebra_check_addr (&rn->p))
- zsend_ipv6_add_multipath (client, &rn->p, newrib);
+ zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, &rn->p, newrib);
#endif /* HAVE_IPV6 */
}
@@ -179,20 +179,20 @@ redistribute_add (struct prefix *p, struct rib *rib)
if (client->redist_default || client->redist[rib->type])
{
if (p->family == AF_INET)
- zsend_ipv4_add_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, p, rib);
#ifdef HAVE_IPV6
if (p->family == AF_INET6)
- zsend_ipv6_add_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, p, rib);
#endif /* HAVE_IPV6 */
}
}
else if (client->redist[rib->type])
{
if (p->family == AF_INET)
- zsend_ipv4_add_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, p, rib);
#ifdef HAVE_IPV6
if (p->family == AF_INET6)
- zsend_ipv6_add_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, p, rib);
#endif /* HAVE_IPV6 */
}
}
@@ -216,20 +216,20 @@ redistribute_delete (struct prefix *p, struct rib *rib)
if (client->redist_default || client->redist[rib->type])
{
if (p->family == AF_INET)
- zsend_ipv4_delete_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV4_ROUTE_DELETE, client, p, rib);
#ifdef HAVE_IPV6
if (p->family == AF_INET6)
- zsend_ipv6_delete_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV6_ROUTE_DELETE, client, p, rib);
#endif /* HAVE_IPV6 */
}
}
else if (client->redist[rib->type])
{
if (p->family == AF_INET)
- zsend_ipv4_delete_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV4_ROUTE_DELETE, client, p, rib);
#ifdef HAVE_IPV6
if (p->family == AF_INET6)
- zsend_ipv6_delete_multipath (client, p, rib);
+ zsend_route_multipath (ZEBRA_IPV6_ROUTE_DELETE, client, p, rib);
#endif /* HAVE_IPV6 */
}
}
@@ -313,7 +313,7 @@ zebra_interface_up_update (struct interface *ifp)
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
- zsend_interface_up (client, ifp);
+ zsend_interface_update (ZEBRA_INTERFACE_UP, client, ifp);
}
/* Interface down information. */
@@ -328,7 +328,7 @@ zebra_interface_down_update (struct interface *ifp)
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
- zsend_interface_down (client, ifp);
+ zsend_interface_update (ZEBRA_INTERFACE_DOWN, client, ifp);
}
/* Interface information update. */
@@ -383,7 +383,7 @@ zebra_interface_address_add_update (struct interface *ifp,
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (client->ifinfo && CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL))
- zsend_interface_address_add (client, ifp, ifc);
+ zsend_interface_address (ZEBRA_INTERFACE_ADDRESS_ADD, client, ifp, ifc);
}
/* Interface address deletion. */
@@ -407,5 +407,5 @@ zebra_interface_address_delete_update (struct interface *ifp,
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (client->ifinfo && CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL))
- zsend_interface_address_delete (client, ifp, ifc);
+ zsend_interface_address (ZEBRA_INTERFACE_ADDRESS_DELETE, client, ifp, ifc);
}