]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-gre.c
CHANGES: Add/move change(s) backported to 4.99
[tcpdump] / print-gre.c
index 53c418fb7db4126adcaa067a7f2158f980b9e2b4..7832343a6d0709dd714beb71863a6e43d00f45ca 100644 (file)
  * RFC1701 (GRE), RFC1702 (GRE IPv4), and RFC2637 (Enhanced GRE)
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
-#include <string.h>
-
 #include "netdissect.h"
 #include "addrtostr.h"
 #include "extract.h"
@@ -52,7 +48,6 @@
 #define        GRE_KP          0x2000          /* key present */
 #define        GRE_SP          0x1000          /* sequence# present */
 #define        GRE_sP          0x0800          /* source routing */
-#define        GRE_RECRS       0x0700          /* recursion count */
 #define        GRE_AP          0x0080          /* acknowledgment# present */
 
 static const struct tok gre_flag_values[] = {
@@ -61,11 +56,11 @@ static const struct tok gre_flag_values[] = {
     { GRE_KP, "key present"},
     { GRE_SP, "sequence# present"},
     { GRE_sP, "source routing present"},
-    { GRE_RECRS, "recursion count"},
     { GRE_AP, "ack present"},
     { 0, NULL }
 };
 
+#define        GRE_RECRS_MASK  0x0700          /* recursion count */
 #define        GRE_VERS_MASK   0x0007          /* protocol version */
 
 /* source route entry types */
@@ -105,7 +100,6 @@ gre_print(netdissect_options *ndo, const u_char *bp, u_int length)
 
 trunc:
        nd_print_trunc(ndo);
-       return;
 }
 
 static void
@@ -224,7 +218,7 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
                isoclns_print(ndo, bp, len);
                break;
        case ETHERTYPE_TEB:
-               ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+               ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
                break;
        default:
                ND_PRINT("gre-proto-0x%x", prot);