]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-msnlb.c
Add CAP_FCNTL and use cap_fcntls_limit().
[tcpdump] / print-msnlb.c
index b3004985874de618b70c3f0597b614c8cf1a4520..fcd0006482687850fae573e303beb9604209256a 100644 (file)
  * SUCH DAMAGE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-#include <string.h>
-
-#include "netdissect.h"
+#include "interface.h"
 #include "addrtoname.h"
 #include "extract.h"
 
 struct msnlb_heartbeat_pkt {
-       u_int32_t unknown1;
-       u_int32_t unknown2;
-       u_int32_t host_prio;    /* little-endian */
-       u_int32_t virtual_ip;
-       u_int32_t host_ip;
+       uint32_t unknown1;
+       uint32_t unknown2;
+       uint32_t host_prio;     /* little-endian */
+       uint32_t virtual_ip;
+       uint32_t host_ip;
        /* the protocol is undocumented so we ignore the rest */
 };
 
@@ -58,8 +56,8 @@ msnlb_print(netdissect_options *ndo, const u_char *bp)
 
        ND_PRINT((ndo, "MS NLB heartbeat, host priority: %u,",
                EXTRACT_LE_32BITS(&(hb->host_prio))));
-       ND_PRINT((ndo, " cluster IP: %s,", ipaddr_string(&(hb->virtual_ip))));
-       ND_PRINT((ndo, " host IP: %s", ipaddr_string(&(hb->host_ip))));
+       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]"));