]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nsh.c
Handle rpcaps:// URLs as well, for rpcap-over-TLS.
[tcpdump] / print-nsh.c
index 636b4d3887f611f6f649eaa174ac6d71d3622603..7de9002f2b1e663e56855235e3ca5bb6437164a8 100644 (file)
 /* specification: draft-ietf-sfc-nsh-01 */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#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);
 }