diff options
author | delphij <delphij@FreeBSD.org> | 2015-01-06 19:03:11 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2015-01-06 19:03:11 +0000 |
commit | 08263d19579d35a7a65e0c8bcb768504ce76d04e (patch) | |
tree | b0af675e15d65cc0adac2367c37233a794389c9a /print-msnlb.c | |
parent | 89918529102669b0d24d8aac9e5516b010b1c81c (diff) | |
download | FreeBSD-src-08263d19579d35a7a65e0c8bcb768504ce76d04e.zip FreeBSD-src-08263d19579d35a7a65e0c8bcb768504ce76d04e.tar.gz |
Vendor import of tcpdump 4.6.2.
Diffstat (limited to 'print-msnlb.c')
-rw-r--r-- | print-msnlb.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/print-msnlb.c b/print-msnlb.c index 4c5fb0c..fcd0006 100644 --- a/print-msnlb.c +++ b/print-msnlb.c @@ -26,30 +26,28 @@ * 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 */ }; void -msnlb_print(netdissect_options *ndo, const u_char *bp, u_int length) +msnlb_print(netdissect_options *ndo, const u_char *bp) { const struct msnlb_heartbeat_pkt *hb; @@ -58,8 +56,8 @@ msnlb_print(netdissect_options *ndo, const u_char *bp, u_int length) 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]")); |