summaryrefslogtreecommitdiffstats
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-09-08 18:38:53 +0200
committervivek <vivek@cumulusnetworks.com>2016-09-08 18:53:26 +0200
commit80c2442a9b959afce944d75c62565a9659bf84f9 (patch)
treed9acd69caa90f5391dff07a461844416f5f0889b /lib/nexthop.h
parentbgpd: Enhance path selection logs (diff)
downloadfrr-80c2442a9b959afce944d75c62565a9659bf84f9.tar.xz
frr-80c2442a9b959afce944d75c62565a9659bf84f9.zip
lib, bgpd: Log next hops
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-12390 Reviewed By: CCR-5156 Testing Done: Manual
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index eb9b27ea9..725eb537a 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -26,6 +26,9 @@
#include "prefix.h"
+/* Maximum next hop string length - gateway + ifindex */
+#define NEXTHOP_STRLEN (INET6_ADDRSTRLEN + 30)
+
union g_addr {
struct in_addr ipv4;
struct in6_addr ipv6;
@@ -97,4 +100,5 @@ void nexthops_free (struct nexthop *nexthop);
extern const char *nexthop_type_to_str (enum nexthop_types_t nh_type);
extern int nexthop_same_no_recurse (struct nexthop *next1, struct nexthop *next2);
+extern const char * nexthop2str (struct nexthop *nexthop, char *str, int size);
#endif /*_LIB_NEXTHOP_H */