]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-dvmrp.c
ICMPv6: Add the IPv6-Only flag
[tcpdump] / print-dvmrp.c
index e1ef8bc2e66d2f441f18d83b0d9f4eca594af331..983b63b467725817d3cc53fb285f8e034431d2f6 100644 (file)
@@ -22,7 +22,7 @@
 /* \summary: Distance Vector Multicast Routing Protocol printer */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "netdissect-stdinc.h"
@@ -73,6 +73,7 @@ dvmrp_print(netdissect_options *ndo,
        u_char type;
        uint8_t major_version, minor_version;
 
+       ndo->ndo_protocol = "dvmrp";
        ep = ndo->ndo_snapend;
        if (bp >= ep)
                return;
@@ -156,7 +157,7 @@ dvmrp_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|dvmrp]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -234,8 +235,7 @@ print_probe(netdissect_options *ndo,
                ND_PRINT(" [|}");
                return (0);
        }
-       genid = (EXTRACT_U_1(bp) << 24) | (EXTRACT_U_1(bp + 1) << 16) |
-                (EXTRACT_U_1(bp + 2) << 8) | EXTRACT_U_1(bp + 3);
+       genid = EXTRACT_BE_U_4(bp);
        bp += 4;
        len -= 4;
        ND_PRINT(ndo->ndo_vflag > 1 ? "\n\t" : " ");