X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e2982e7f6f0b624a773ec5a58885ee80fab46d34..0446070756e8f61c29d4c41f4adab08b3bf9d830:/print-arp.c diff --git a/print-arp.c b/print-arp.c index 897317dc..034a0566 100644 --- a/print-arp.c +++ b/print-arp.c @@ -22,10 +22,10 @@ /* \summary: Address Resolution Protocol (ARP) printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include @@ -34,7 +34,6 @@ #include "ethertype.h" #include "extract.h" -static const char tstr[] = "[|ARP]"; /* * Address Resolution Protocol. @@ -266,7 +265,7 @@ atmarp_print(netdissect_options *ndo, op = ATMOP(ap); if (!ND_TTEST_LEN(aar_tpa(ap), ATMTPROTO_LEN(ap))) { - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); ND_DEFAULTPRINT((const u_char *)ap, length); return; } @@ -349,7 +348,7 @@ atmarp_print(netdissect_options *ndo, return; trunc: - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); } void @@ -359,6 +358,7 @@ arp_print(netdissect_options *ndo, const struct arp_pkthdr *ap; u_short pro, hrd, op, linkaddr; + ndo->ndo_protocol = "arp"; ap = (const struct arp_pkthdr *)bp; ND_TCHECK_SIZE(ap); @@ -385,7 +385,7 @@ arp_print(netdissect_options *ndo, } if (!ND_TTEST_LEN(TPA(ap), PROTO_LEN(ap))) { - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); ND_DEFAULTPRINT((const u_char *)ap, length); return; } @@ -468,12 +468,5 @@ arp_print(netdissect_options *ndo, return; trunc: - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); } - -/* - * Local Variables: - * c-style: bsd - * End: - */ -