diff options
author | Michael Richardson <mcr@sandelman.ca> | 2014-01-01 20:43:45 -0500 |
---|---|---|
committer | Michael Richardson <mcr@sandelman.ca> | 2014-01-01 21:31:18 -0500 |
commit | ac910c086ec393a8c320a82d0edb5ea412175b62 (patch) | |
tree | 33d14bd58d51bbe8e0ab2965818e846160f530fc /print-rip.c | |
parent | adfd0d83043811735de089343d043bbeaab95e02 (diff) | |
download | tcpdump-ac910c086ec393a8c320a82d0edb5ea412175b62.tar.gz |
ndo-ize print-ascii: hex_print_with_offset()
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 6310e5da..c0b5f09a 100644 --- a/print-rip.c +++ b/print-rip.c @@ -106,14 +106,14 @@ rip_entry_print_v1(register const struct rip_netinfo *ni) family = EXTRACT_16BITS(&ni->rip_family); if (family != BSD_AFNUM_INET && family != 0) { 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); + print_unknown_data(gndo,(u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); return; } if (EXTRACT_16BITS(&ni->rip_tag) || EXTRACT_32BITS(&ni->rip_dest_mask) || EXTRACT_32BITS(&ni->rip_router)) { /* MBZ fields not zero */ - print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); + print_unknown_data(gndo,(u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN); return; } if (family == 0) { @@ -151,16 +151,16 @@ rip_entry_print_v2(register const struct rip_netinfo *ni, const unsigned remaini printf(" MBZ %u", EXTRACT_32BITS(&ni->rip_metric)); } else if (auth_type == 1) { printf("\n\t Auth trailer:"); - print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t ",remaining); + print_unknown_data(gndo,(u_int8_t *)&ni->rip_dest,"\n\t ",remaining); return remaining; /* AT spans till the packet end */ } else { printf("\n\t Unknown (%u) Authentication data:", EXTRACT_16BITS(&ni->rip_tag)); - print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t ",remaining); + print_unknown_data(gndo,(u_int8_t *)&ni->rip_dest,"\n\t ",remaining); } } else if (family != BSD_AFNUM_INET && family != 0) { 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); + print_unknown_data(gndo,(u_int8_t *)&ni->rip_tag,"\n\t ",RIP_ROUTELEN-2); } else { /* BSD_AFNUM_INET or AFI 0 */ printf("\n\t AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ", tok2str(bsd_af_values, "%u", family), @@ -215,7 +215,7 @@ rip_print(const u_char *dat, u_int length) * * so perhaps we should just dump the packet, in hex. */ - print_unknown_data((u_int8_t *)&rp->rip_cmd,"\n\t",length); + print_unknown_data(gndo,(u_int8_t *)&rp->rip_cmd,"\n\t",length); break; default: /* dump version and lets see if we know the commands name*/ @@ -258,14 +258,14 @@ rip_print(const u_char *dat, u_int length) /* fall through */ default: if (vflag <= 1) { - if(!print_unknown_data((u_int8_t *)rp,"\n\t",length)) + if(!print_unknown_data(gndo,(u_int8_t *)rp,"\n\t",length)) return; } break; } /* do we want to see an additionally hexdump ? */ if (vflag> 1) { - if(!print_unknown_data((u_int8_t *)rp,"\n\t",length)) + if(!print_unknown_data(gndo,(u_int8_t *)rp,"\n\t",length)) return; } } |