summaryrefslogtreecommitdiff
path: root/ospfd/ospf_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-09-02 10:32:14 -0400
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-09-02 10:36:28 -0400
commit5b30316ea51a86de29450b59ea288afa858953b6 (patch)
tree005f4ccdedb006ad4f3782d5748447ef098e93de /ospfd/ospf_zebra.c
parent5b2c166731c351fd04507b5d495a2ae012cc7ca1 (diff)
bgpd, lib, ospfd, pimd, zebra: Use nexthop_types_t
Use the 'enum nexthop_types_t' instead of the zebra.h #defines. And remove code from zebra.h that does not belong there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r--ospfd/ospf_zebra.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index f945a4acb7..a31ef5f707 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -35,6 +35,7 @@
#include "plist.h"
#include "log.h"
#include "lib/bfd.h"
+#include "nexthop.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_interface.h"
@@ -393,18 +394,18 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
(path->nexthop.s_addr != INADDR_ANY &&
path->ifindex != 0))
{
- stream_putc (s, ZEBRA_NEXTHOP_IPV4_IFINDEX);
+ stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX);
stream_put_in_addr (s, &path->nexthop);
stream_putl (s, path->ifindex);
}
else if (path->nexthop.s_addr != INADDR_ANY)
{
- stream_putc (s, ZEBRA_NEXTHOP_IPV4);
+ stream_putc (s, NEXTHOP_TYPE_IPV4);
stream_put_in_addr (s, &path->nexthop);
}
else
{
- stream_putc (s, ZEBRA_NEXTHOP_IFINDEX);
+ stream_putc (s, NEXTHOP_TYPE_IFINDEX);
if (path->ifindex)
stream_putl (s, path->ifindex);
else
@@ -414,18 +415,18 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
if (path->nexthop.s_addr != INADDR_ANY &&
path->ifindex != 0)
{
- stream_putc (s, ZEBRA_NEXTHOP_IPV4_IFINDEX);
+ stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX);
stream_put_in_addr (s, &path->nexthop);
stream_putl (s, path->ifindex);
}
else if (path->nexthop.s_addr != INADDR_ANY)
{
- stream_putc (s, ZEBRA_NEXTHOP_IPV4);
+ stream_putc (s, NEXTHOP_TYPE_IPV4);
stream_put_in_addr (s, &path->nexthop);
}
else
{
- stream_putc (s, ZEBRA_NEXTHOP_IFINDEX);
+ stream_putc (s, NEXTHOP_TYPE_IFINDEX);
if (path->ifindex)
stream_putl (s, path->ifindex);
else
@@ -514,18 +515,18 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
if (path->nexthop.s_addr != INADDR_ANY &&
path->ifindex != 0)
{
- stream_putc (s, ZEBRA_NEXTHOP_IPV4_IFINDEX);
+ stream_putc (s, NEXTHOP_TYPE_IPV4_IFINDEX);
stream_put_in_addr (s, &path->nexthop);
stream_putl (s, path->ifindex);
}
else if (path->nexthop.s_addr != INADDR_ANY)
{
- stream_putc (s, ZEBRA_NEXTHOP_IPV4);
+ stream_putc (s, NEXTHOP_TYPE_IPV4);
stream_put_in_addr (s, &path->nexthop);
}
else
{
- stream_putc (s, ZEBRA_NEXTHOP_IFINDEX);
+ stream_putc (s, NEXTHOP_TYPE_IFINDEX);
stream_putl (s, path->ifindex);
}