diff options
author | hannes <hannes> | 2006-03-23 14:58:44 +0000 |
---|---|---|
committer | hannes <hannes> | 2006-03-23 14:58:44 +0000 |
commit | 5636348412ff1463a2b26f035237cf7cedef5cab (patch) | |
tree | 462be41ea2a72960a23172c72b1a7f50635b0dea /print-rip.c | |
parent | 3820594d702f863088754f590546f21cfe3c562c (diff) | |
download | tcpdump-5636348412ff1463a2b26f035237cf7cedef5cab.tar.gz |
move the BSD AF defs into af.h and make the null and rip printer make use of it
Diffstat (limited to 'print-rip.c')
-rw-r--r-- | print-rip.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/print-rip.c b/print-rip.c index c66c86db..27446a68 100644 --- a/print-rip.c +++ b/print-rip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.58 2006-02-21 10:27:40 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.59 2006-03-23 14:58:44 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -102,8 +102,8 @@ rip_entry_print_v1(register const struct rip_netinfo *ni) /* RFC 1058 */ family = EXTRACT_16BITS(&ni->rip_family); - if (family != AF_INET) { - printf("\n\t AFI %s, ", tok2str(af_values, "Unknown (%u)", family)); + if (family != BSD_AFNUM_INET) { + printf("\n\t AFI %s, ", tok2str(bsd_af_values, "Unknown (%u)", family)); print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); return; } @@ -113,7 +113,7 @@ rip_entry_print_v1(register const struct rip_netinfo *ni) /* MBZ fields not zero */ print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); return; - } /* AF_INET */ + } /* BSD_AFNUM_INET */ printf("\n\t %s, metric: %u", ipaddr_string(&ni->rip_dest), EXTRACT_32BITS(&ni->rip_metric)); @@ -141,13 +141,13 @@ rip_entry_print_v2(register const struct rip_netinfo *ni) EXTRACT_16BITS(&ni->rip_tag)); print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t ",RIP_AUTHLEN); } - } else if (family != AF_INET) { - printf("\n\t AFI %s", tok2str(af_values, "Unknown (%u)", family)); + } else if (family != BSD_AFNUM_INET) { + printf("\n\t AFI %s", tok2str(bsd_af_values, "Unknown (%u)", family)); print_unknown_data((u_int8_t *)&ni->rip_tag,"\n\t ",RIP_ROUTELEN-2); return; - } else { /* AF_INET */ + } else { /* BSD_AFNUM_INET */ printf("\n\t AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ", - tok2str(af_values, "Unknown (%u)", family), + tok2str(bsd_af_values, "Unknown (%u)", family), ipaddr_string(&ni->rip_dest), mask2plen(EXTRACT_32BITS(&ni->rip_dest_mask)), EXTRACT_16BITS(&ni->rip_tag), |