]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-vxlan-gpe.c
Add printing support for vsockmon devices.
[tcpdump] / print-vxlan-gpe.c
index fb903c2105e88d1d28b00a5c9943d136ccb0f4ab..1364534ed20317d17a6e4906ef5ebde71490f0ab 100644 (file)
@@ -34,7 +34,6 @@
 #include "netdissect.h"
 #include "extract.h"
 
-static const char tstr[] = " [|VXLAN-GPE]";
 static const struct tok vxlan_gpe_flags [] = {
     { 0x08, "I" },
     { 0x04, "P" },
@@ -70,13 +69,13 @@ vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len)
 
     ND_TCHECK_LEN(bp, VXLAN_GPE_HDR_LEN);
 
-    flags = EXTRACT_U_1(bp);
+    flags = GET_U_1(bp);
     bp += 3;
 
-    next_protocol = EXTRACT_U_1(bp);
+    next_protocol = GET_U_1(bp);
     bp += 1;
 
-    vni = EXTRACT_BE_U_3(bp);
+    vni = GET_BE_U_3(bp);
     bp += 4;
 
     ND_PRINT("VXLAN-GPE, ");
@@ -109,6 +108,6 @@ vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len)
        return;
 
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }