X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3fb4560e1ebe3144a0f475373eeaaaf7ca91f501..3d6e7bd1e42a7316fb2020348a8d3e86b1346b36:/print-babel.c diff --git a/print-babel.c b/print-babel.c index 2e9c26ca..f8741d7b 100644 --- a/print-babel.c +++ b/print-babel.c @@ -26,11 +26,13 @@ * SUCH DAMAGE. */ +/* \summary: Babel Routing Protocol printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include #include #include @@ -40,7 +42,6 @@ #include "extract.h" static const char tstr[] = "[|babel]"; -static const char istr[] = " (invalid)"; static void babel_print_v2(netdissect_options *, const u_char *cp, u_int length); @@ -126,11 +127,7 @@ format_prefix(netdissect_options *ndo, const u_char *prefix, unsigned char plen) if(plen >= 96 && memcmp(prefix, v4prefix, 12) == 0) snprintf(buf, 50, "%s/%u", ipaddr_string(ndo, prefix + 12), plen - 96); else -#ifdef INET6 snprintf(buf, 50, "%s/%u", ip6addr_string(ndo, prefix), plen); -#else - snprintf(buf, 50, "IPv6 addresses not supported"); -#endif buf[49] = '\0'; return buf; } @@ -141,11 +138,7 @@ format_address(netdissect_options *ndo, const u_char *prefix) if(memcmp(prefix, v4prefix, 12) == 0) return ipaddr_string(ndo, prefix + 12); else -#ifdef INET6 return ip6addr_string(ndo, prefix); -#else - return "IPv6 addresses not supported"; -#endif } static const char *