Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet

2007-12-12 Thread Gianluca Varenni
- Original Message - From: "Alexander Dupuy" <[EMAIL PROTECTED]> To: "tcpdump-workers" Sent: Wednesday, December 12, 2007 7:52 AM Subject: Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet Gianluca Varenni wrote: Having a functio

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet

2007-12-12 Thread Alexander Dupuy
Gianluca Varenni wrote: Having a function that returns success but then spits out a human only readable warning string in a parameter called "errbuf" and not "warnbuf" (also considering that there's an errbuf in the pcap_t structure that can be retrieved with pcap_geterror() or similar) is not th

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet

2007-12-11 Thread Gianluca Varenni
- Original Message - From: "Guy Harris" <[EMAIL PROTECTED]> To: Sent: Monday, December 10, 2007 1:29 PM Subject: Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet Gianluca Varenni wrote: why not using a different return value instead of a stri

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet

2007-12-10 Thread Guy Harris
Gianluca Varenni wrote: why not using a different return value instead of a string message which is human readable but not easily computer readable? Probably because that's the way that other pcap APIs work. That doesn't mean it's the *right* way to work, it just means it fits in with the wa

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-10 Thread Gianluca Varenni
- Original Message - From: "Alexander Dupuy" <[EMAIL PROTECTED]> To: Sent: Monday, December 10, 2007 10:42 AM Subject: Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux Guy Harris asked: How does pcap_setbufsize() differ f

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-10 Thread Alexander Dupuy
Guy Harris asked: How does pcap_setbufsize() differ from pcap_setbuff()? The WinPcap pcap_setbuff function is defined as: int pcap_setbuff(pcap_t *p, int dim); I declared it as follows: extern int pcap_setbufsize(pcap_t *p, int bufsize, char *errbuf); extern int pcap_getbufsize(pcap_t *p, ch

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet

2007-12-07 Thread Matthew Luckie
With BPF and Digital UNIX's packetfilter, changing the filter flushes the buffer. With Linux, changing the filter doesn't flush the buffer - so current versions of libpcap purge the buffer themselves, so that, after you change a filter, you don't get any packets that wouldn't have passed t

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-07 Thread Gianluca Varenni
- Original Message - From: "Guy Harris" <[EMAIL PROTECTED]> To: Sent: Thursday, December 06, 2007 4:09 PM Subject: Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux There's also an issue that with the ringbuffer, the init

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet

2007-12-07 Thread Andy Howell
Guy Harris wrote: With BPF and Digital UNIX's packetfilter, changing the filter flushes the buffer. With Linux, changing the filter doesn't flush the buffer - so current versions of libpcap purge the buffer themselves, so that, after you change a filter, you don't get any packets that wou

[tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-07 Thread Alexander Dupuy
[I sent this from my other account but it seems not to have gone through; resending and apologies if you receive it twice.] Paolo Abeni writes: It does not use environment variables to control the memory mapped ring parameters; instead the requested snap len is used: the low order bytes are used

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-06 Thread Guy Harris
On Dec 6, 2007, at 9:54 AM, Alexander Dupuy wrote: Paolo Abeni writes: It does not use environment variables to control the memory mapped ring parameters; instead the requested snap len is used: the low order bytes are used to select the ring frame size and the high order bytes are used t

[tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-06 Thread Alexander Dupuy
Paolo Abeni writes: It does not use environment variables to control the memory mapped ring parameters; instead the requested snap len is used: the low order bytes are used to select the ring frame size and the high order bytes are used to select the ring frame number. If the high order bytes is

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet devices

2007-12-05 Thread Abeni Paolo
hello, Gregor Maier wrote: > Using a function to set the ring buffer size sounds like the best choice > to me, as long as these parameters can still be changed after the open > or after packets have been read. In the easier implementation I can think of, changing the ring size will cause the lo

Re: [tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-05 Thread Gianluca Varenni
entually create a new pcap_open_live_mmap() function)? Have a nice day GV - Original Message - From: "Paolo Abeni" <[EMAIL PROTECTED]> To: Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 05, 2007 3:11 AM Subject: [tcpdump-workers] [PAT

[tcpdump-workers] [PATCH] enable memory mapped access to ethernet device for linux

2007-12-05 Thread Paolo Abeni
hi list, Following the discussion about the memory mapped access for Linux, I tried to rework some existing code (originally independently created by Simon Patarin and Phil Wood) to enable this functionality with the minimum impact on the current pcap code. It does not use environment variables