X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/64677b0d78ff168d98c3035e894c4910c021136e..0f24a43a7e9fbdcff2baae3990939b2bc25d9fd1:/print-nsh.c diff --git a/print-nsh.c b/print-nsh.c index c97364b5..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" }, @@ -51,7 +50,7 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len) u_int n, vn; uint8_t ver; uint8_t flags; - uint8_t length; + u_int length; uint8_t md_type; uint8_t next_protocol; uint32_t service_path_id; @@ -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); }