]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-msnlb.c
gre: add support for MikroTik Ethernet-over-IP hack.
[tcpdump] / print-msnlb.c
index a7bee091f0c1151da4ba151ecc472bc8151c249e..8afaa7fe7107f2a88dc255ed5cc84ee7f7f57bb6 100644 (file)
 /* \summary: MS Network Load Balancing's (NLB) heartbeat printer */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include "netdissect.h"
 #include "addrtoname.h"
@@ -52,14 +52,11 @@ msnlb_print(netdissect_options *ndo, const u_char *bp)
 {
        const struct msnlb_heartbeat_pkt *hb;
 
+       ndo->ndo_protocol = "msnlb";
        hb = (const struct msnlb_heartbeat_pkt *)bp;
-       ND_TCHECK(*hb);
 
-       ND_PRINT((ndo, "MS NLB heartbeat, host priority: %u,",
-               EXTRACT_LE_U_4((hb->host_prio))));
-       ND_PRINT((ndo, " cluster IP: %s,", ipaddr_string(ndo, &(hb->virtual_ip))));
-       ND_PRINT((ndo, " host IP: %s", ipaddr_string(ndo, &(hb->host_ip))));
-       return;
-trunc:
-       ND_PRINT((ndo, "[|MS NLB]"));
+       ND_PRINT("MS NLB heartbeat");
+       ND_PRINT(", host priority: %u", GET_LE_U_4((hb->host_prio)));
+       ND_PRINT(", cluster IP: %s", GET_IPADDR_STRING(hb->virtual_ip));
+       ND_PRINT(", host IP: %s", GET_IPADDR_STRING(hb->host_ip));
 }