tcpdump mailing list archives

Re: [PATCH]: pcap and zero copy.


From: Yoann Vandoorselaere <yoann () prelude-ids org>
Date: Sun, 04 Jan 2004 14:35:19 +0000

On Sun, 2004-01-04 at 14:07, Gisle Vanem wrote:
"Yoann Vandoorselaere" <yoann () prelude-ids org> said:

I agree that many args should be 'const'ed, but your patch will break e.g.
Ethereal that binds to libpcap functions via dynamic lib-loading and function-
pointers.

Huu, could you detail a little more here ? Don't see how it could break
anything... 

In Ethereal's capture-wpcap.c:

#include <pcap.h>
...
int
#ifdef WPCAP_CONSTIFIED
pcap_lookupnet(const char *a, bpf_u_int32 *b, bpf_u_int32 *c, char *d)
#else
pcap_lookupnet(char *a, bpf_u_int32 *b, bpf_u_int32 *c, char *d)
#endif
{
        g_assert(has_wpcap);
        return p_pcap_lookupnet(a, b, c, d);
}

The WPCAP_CONSTIFIED was added recently AFAICT so it may not be
a problem anymore. But it could cause a redefine error with an "old" Ethereal
and your patch.

Well, ok, then I guess it's not a problem... :)

-- 
Yoann Vandoorselaere <yoann () prelude-ids org>

Attachment: signature.asc
Description: This is a digitally signed message part


Current thread: