X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/9d83ad9c9e8ce15d380e7b04d8ffbb73991e552f..0f24a43a7e9fbdcff2baae3990939b2bc25d9fd1:/print-nsh.c diff --git a/print-nsh.c b/print-nsh.c index 636b4d38..7de9002f 100644 --- a/print-nsh.c +++ b/print-nsh.c @@ -26,15 +26,14 @@ /* specification: draft-ietf-sfc-nsh-01 */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include "netdissect.h" #include "extract.h" -static const char tstr[] = " [|NSH]"; static const struct tok nsh_flags [] = { { 0x20, "O" }, { 0x10, "C" }, @@ -62,6 +61,7 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len) uint8_t tlv_len; u_int next_len; + ndo->ndo_protocol = "nsh"; /* print Base Header and Service Path Header */ if (len < NSH_BASE_HDR_LEN + NSH_SERVICE_PATH_HDR_LEN) goto trunc; @@ -180,6 +180,6 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len) return; trunc: - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); }