"Denis Ovsienko" <infrastat...@yandex.ru> wrote:
is anybody else willing to review this pull request?
https://github.com/the-tcpdump-group/tcpdump/pull/324
I just did a build with MSVC after a new checkout of
https://github.com/the-tcpdump-group/tcpdump.git
It didn't work out-of-the box because my MSVC (v16 from Visual C
Express 2010) isn't a C99 compiler; you cannot have code ahead of
declarations. Hence these patches should be applied:
--- Git-Latest/print-calm-fast.c 2013-07-03 09:24:42 +0000
+++ ./print-calm-fast.c 2013-07-03 09:53:37 +0000
@@ -42,13 +42,12 @@
void
calm_fast_print(netdissect_options *ndo, const u_char *eth, const u_char *bp,
u_int length)
{
- printf("CALM FAST src:%s; ", etheraddr_string(eth+6));
-
int srcNwref = bp[0];
int dstNwref = bp[1];
length -= 2;
bp += 2;
+ printf("CALM FAST src:%s; ", etheraddr_string(eth+6));
printf("SrcNwref:%d; ", srcNwref);
printf("DstNwref:%d; ", dstNwref);
--- Git-Latest/print-geonet.c 2013-07-03 09:24:42 +0000
+++ ./print-geonet.c 2013-07-03 09:54:27 +0000
@@ -58,14 +58,18 @@
static void
print_btp_body(const u_char *bp, u_int length)
{
+ int version;
+ int msg_type;
+ const char *msg_type_str;
+
if (length <= 2) {
return;
}
// Assuming ItsDpuHeader
- int version = bp[0];
- int msg_type = bp[1];
- const char *msg_type_str = tok2str(msg_type_values, "unknown (%u)",
msg_type);
+ version = bp[0];
+ msg_type = bp[1];
+ msg_type_str = tok2str(msg_type_values, "unknown (%u)", msg_type);
printf("; ItsPduHeader v:%d t:%d-%s", version, msg_type, msg_type_str);
}
------------
And <netinet/in.h> must go on Windows:
--- Git-Latest/print-carp.c 2013-07-03 09:24:42 +0000
+++ ./print-carp.c 2011-12-22 19:56:22 +0000
@@ -44,7 +44,9 @@
#include <stdlib.h>
#include <unistd.h>
+#ifndef WIN32
#include <netinet/in.h>
+#endif
#include "interface.h"
#include "extract.h"
--gv
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers