Yang Luo wrote:
> Given that WinDump is kind of "official" example to use libpcap/Npcap API,
> it's not good that they can't compile.
Why do you say that? IMHO, tcpdump/WinDump at:
https://github.com/the-tcpdump-group/tcpdump.git
is the "official". Works fine for me on Windows. Have you tried
The use of function parse_elements() in print-802_11.c looks a bit fishy.
E.g. in handle_beacon():
ret = parse_elements(ndo, pbody, p, offset, length);
PRINT_SSID(pbody);
PRINT_RATES(pbody);
Here parse_elements() has set 'pbody.ssid' to a local (on stack)
SSID in it's 'struct ssid_t ssid':
I note that a local Win32/include/errno.h is shadowing for the
real errno.h which is not nice. And shouldn't sys-headers come first
in missing/inet_pton.c?
#include tcpdump-stdinc.h
#include errno.h
Since MSVC's errno.h has a 'EAFNOSUPPORT', but MingW+Watcom
does not, I think it's cleaner
Gisle Vanem gva...@yahoo.no wrote:
I'm sure my old MSVC v16 has a bit stupid C-preprocessor. At least when
expanding this (line 153):
Now this C-preprocessor bug got me into problems with print-olsr.c too.
A patch:
--- Git-Latest/print-olsr.c 2014-04-02 17:02:01 +
+++ print-olsr.c
I'm sure my old MSVC v16 has a bit stupid C-preprocessor. At least when
expanding this (line 153):
ND_PRINT((ndo, %s%s, sep,
#ifdef INET6
ip6addr_string(cp)
#else
(compiled w/o IPv6)
#endif /* INET6 */
into this (all on one line):
(*ndo-ndo_printf)(ndo, %s%s, sep,
The prototype and implementation of 'zmtp1_print_datagram()'
is slightly different; the prototype has a 'const u_int len' as the last
parameter. Whereas the implementation has no 'const'. Hence
I get a warning from MSVC. Hence:
diff -u3 Git-Latest/print-zeromq.c ./print-zeromq.c
---
François-Xavier Le Bail fx.leb...@yahoo.com wrote:
Is it not better to add const in the propotype ?
Comparing to other print-function with a 'len' as last parameter,
I think not. Looking through interface.h for *_print() functions, only these
have a 'const u_int' as last arg:
openflow_print,
Building windump using MingW + gcc 4.7.2, I get:
print-rx.c: In function 'fs_print':
print-rx.c:929:4: warning: unknown conversion type character 'T' in format
[-Wformat]
print-rx.c:933:4: warning: unknown conversion type character 'T' in format
[-Wformat]
This comes from the macro
Guy Harris guy at alum.mit.edu writes:
The tcpdump/libpcap RCS/CVS IDs serve no purpose now that
libpcap and tcpdump are kept in Git, as far as I can see.
Then you (or someone else) can change the WIN32 version stuff:
char WDversion[]=current-cvs.tcpdump.org;
#if
Lentes, Bernd bernd.len...@helmholtz-muenchen.de wrote:
I'd like to capture all packets which have the same MAC-address for sender and
destination.
But i don't know the MAC which is causing these messages. So i have to use an
universal filter.
I tried to use tcpdump 'ether[8:6] =
'struct pcap' has a member:
void *private; /* private data for methods */
Which doesn't work so well when including pcap-int.h
from a C++ program. The file looks to be meant for C++
because of:
#ifdef __cplusplus
extern C {
#endif
Can this be renamed to 'priv' or '_private' ?
--gv
Denis Ovsienko infrastat...@yandex.ru wrote:
10.07.2013, 15:18, Gisle Vanem gva...@broadpark.no:
'int32_t' isn't 'int' for all targets. Some Windows targets have
it defined as 'signed int' in win32/Include/bittypes.h. So print-nfs.c
does not compile cleanly; conflicting definition
'int32_t' isn't 'int' for all targets. Some Windows targets have
it defined as 'signed int' in win32/Include/bittypes.h. So print-nfs.c
does not compile cleanly; conflicting definition of xid_map_find().
A fix:
--- Git-Latest/print-nfs.c 2013-07-03 09:24:42 +
+++ print-nfs.c 2013-07-04
I really don't understand the motivation behind the Win32-code
for pcap_compile(). In gencode.c:
int
pcap_compile(pcap_t *p, struct bpf_program *program,
const char *buf, int optimize, bpf_u_int32 mask)
{
int result;
EnterCriticalSection(g_PcapCompileCriticalSection);
result =
This is a similar patch to the change of pcap-dos.c:
https://github.com/mcr/libpcap/commit/73b5f0387199fbaa75130837b931faf770471640
I.e. the '_interfaces' suffix got lost in some other change to the puplic API.
(I don't know when). Since 'pcap_findalldevs()' is now a more generic version in
Guy Harris g...@alum.mit.edu wrote:
'NameLength = 0' is just in case 'PacketGetAdapterNames()' fails
w/o setting '*NameLength == 0'. It really could do that; ref. Packet32.c in
WinPcap.
Really? I don't see that. (The first call should *always* fail, in the sense of
returning FALSE; if the
This file has fallen behind since pcap_create() was put in
pcap.c long time ago (a more generic create-function). Hence:
--- Git-Latest\pcap-dos.c Wed Nov 28 23:41:44 2012
+++ pcap-dos.c Thu Nov 29 00:00:12 2012
@@ -143,7 +143,7 @@
return handle_to_device [fd-1];
}
-pcap_t *pcap_create
Michael Richardson m...@sandelman.ca wrote:
If one wants to add -W options to the standard build, I'm wondering what
the right autoconf magic is to enable such a thing. fxlb suggested:
-Wunused -Wunused-parameter
I compile using MingW (gcc 4.7.2) and normally I use
-Wall -W.
But this gives
This file doesn't compile using MSVC v16 (from VC-Express 2010)
because it has variable definitions after statements (' problem X' below).
tcpdump should be in pure C, not C++ or gcc features. Right?
Patch:
--- Git-Latest\print-dhcp6.cThu Feb 28 16:10:44 2013
+++ print-dhcp6.c Mon
It doesn't matter much for folks with case-insensitive file-systems, but
the Git-repo contains these two directories:
https://github.com/mcr/tcpdump/tree/master/win32
https://github.com/mcr/tcpdump/tree/master/Win32
Maybe the files under 'Win32' should be moved into 'win32'?
PS. I'm trying
Guy Harris g...@alum.mit.edu wrote:
Send us a patch, submit it on SourceForge, or do whatever the shiny new Git
magic
is for that (Michael, how do people do that?).
This is what I do (and what the sourceforge page [1] states). 1st time
checkout:
git clone git://bpf.tcpdump.org/libpcap
A small patch to make this file compile on Windows:
--- Git-latest/findalldevstest.c Tue Feb 17 16:55:35 2009
+++ findalldevstest.c Wed Feb 18 12:45:00 2009
@@ -4,10 +4,13 @@
#include stdlib.h
#include sys/types.h
+
+#ifndef WIN32
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h
* Added header-guard.
* Include IP6_misc.h unconditionally (why treat MingW specially?)
--gv
--- CVS-Latest/pcap-stdinc.h Mon Oct 06 14:27:32 2008
+++ pcap-stdinc.hThu Feb 12 21:25:34 2009
@@ -30,6 +30,8 @@
*
* @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.11 2008-10-06
* nametoaddr.c with DECNETLIB defined needs netdnet/dnetdb.h
included. And which again needs sys/types.h.
* Remove IP6_misc.h since it's already included in pcap-stdinc.h
(ref. my patch to this file).
--gv
--- CVS-Latest/nametoaddr.cWed Feb 06 09:21:30 2008
+++ nametoaddr.c Mon
bzero() and bcopy() are not universally available. But
memset() and memcpy() are AFAICS. Attached diffs-5.txt.
--gv
--- CVS-Latest/signature.c Sat Aug 16 10:36:20 2008
+++ signature.c Mon Sep 22 16:58:20 2008
@@ -83,10 +83,10 @@
*/
/* start out by storing key in pads */
-
What's up with the cvs access? I'm getting this error now:
no such user tcpdump in CVSROOT/passwd
when logging in with the command
cvs -d :pserver:[EMAIL PROTECTED]:/tcpdump/master login
--gv
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.
Guy Harris [EMAIL PROTECTED] wrote:
So what *is* this case? The error message is Cannot use different
devices simultaneously; does that mean that you can have multiple
instances of the same device open at the same time, but you can't have
instances of more than one device open at the same
dot hew at gmail dot com
Gianluca Varennivarenni at netgroup-serv dot polito dot
it
Gilbert Hoyek gil_hoyek at hotmail dot com
- Gisle Vanem giva at bgnett dot no
+ Gisle Vanem gvanem at broadpark dot
* gnuc.c not needed.
* sys/pack*.h was renamed in a recent Watt-32 distro.
--- msdos/pktdrvr.c.orig Sat Dec 18 07:52:14 2004
+++ msdos/pktdrvr.c Wed Dec 13 15:55:00 2006
@@ -21,7 +21,6 @@
#include string.h
#include dos.h
-#include gnuc.h
#include pcap-dos.h
#include pcap-int.h
#include
The recent change for pcap_activate() broke the DOS-port.
Here's a small fix:
--- pcap-dos.c.orig Mon Apr 14 19:40:58 2008
+++ pcap-doc.cThu Apr 17 15:33:00 2008
@@ -97,10 +97,10 @@
static struct device *handle_to_device [20];
-static void pcap_activate_dos (pcap_t *p);
+static int
Guy Harris [EMAIL PROTECTED] wrote:
@@ -201,7 +202,7 @@
Cannot use different devices simultaneously
(`%s' vs. `%s'), active_dev-name, pcap-md.device);
free (pcap);
-err = PCAP_ERROR;
+err = PCAP_ERROR_ACTIVATED;
PCAP_ERROR_ACTIVATED means you've called
--- CVS-Latest/pcap.c Wed Oct 17 17:52:41 2007
+++ pcap.c Tue Nov 06 15:04:27 2007
@@ -789,7 +789,7 @@
int
pcap_setmintocopy(pcap_t *p, int size)
{
- return p-setintocopy_op(p, size);
+ return p-setmintocopy_op(p, size);
}
static int
--gv
-
This is the tcpdump-workers list.
The recent pcap-win32.c adds these link types:
NdisMediumBare80211
NdisMediumRadio80211
Searching MS and Google came up blank on these. What
values should these have?
IMHO, something like this should be added to the top of pcap-win32.c:
#ifndef NdisMediumBare80211
#define NdisMediumBare80211
Guy Harris [EMAIL PROTECTED] wrote:
No - it, and af.c, should probably be generated from the stuff removed
from print-bgp.c.
I've checked in versions of af.c and af.h generated that way.
netdissect.h isn't atomic; it needs stdint.h ahead of it (from
tcpdump-stdinc.h). Hence:
---
This file is needed by print-bgp.c, print-ldp.c and print-rip.c, but missing
from the tar-ball. Should it be generated by configure? And the FILES list
af.c as well. That's missing too.
BTW. addrtoname.c on Win32 is missing ETHER_ADDR_LEN. A fix:
--- tcpdump-2006.02.25\addrtoname.c Sat Feb
The recent (?) -G option requires gettimeofday() which isn't available
on Win32. Attached is a patch to util.c which adds this function.
--gv
--- tcpdump-2005.12.03/util.c Thu Jun 16 00:19:38 2005
+++ util.c Sat Dec 03 17:01:05 2005
@@ -526,3 +526,44 @@
else
I've compiled tcpdump okay with these compilers and some
small changes.
Digital Mars doesn't allow conversion between unsigned
and signed without a cast. So this is needed:
--- tcpdump-2004.11.02/print-802_11.c Thu Sep 23 23:57:25 2004
+++ ./print-802_11.c Fri Oct 29 14:48:11 2004
@@ -964,7 +964,7
Guy Harris [EMAIL PROTECTED] said:
Also, should we save the mode returned by setmode() and restore it
when we close a pcap_t or pcap_dumper_t that refers to the standard
input or output?
Since pcap_dump_close() doesn't have a pcap_t argument, where should
the oldmode come from? Can we have
I feel it's high time we cleanup some of the sources. I'd start
with savefile.c. Currently it doesn't work for offline data from stdin.
--gv
--- libpcap-2004.05.20/savefile.c Tue Mar 23 21:18:08 2004
+++ savefile.c Wed Mar 24 16:29:06 2004
@@ -52,6 +52,12 @@
#define TCPDUMP_MAGIC
I've had problem replying to the list, so this is just a test.
BTW. tok2str() is still vulnerable.
- Original Message -
From: Gisle Vanem [EMAIL PROTECTED]
To: tcpdump-workers [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:26 PM
Subject: [tcpdump-workers] tok2str() patch
tok2str
40 matches
Mail list logo