tcpdump mailing list archives
Re: Libpcap reentrancy and PF_RING patch
From: "Paolo Abeni" <paolo.abeni () telecomitalia it>
Date: Wed, 02 Jan 2008 13:47:41 +0100
hello, On Sun, 2007-12-30 at 12:09 +0100, Luca Deri wrote:
please find enclosed a patch (against the code that's in CVS) that adds reentrancy in pcap.
There is an issue with the linux/usb code: =================================================================== RCS file: /tcpdump/master/libpcap/pcap-usb-linux.c,v retrieving revision 1.20 diff -r1.20 pcap-usb-linux.c 652c652 < usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user) ---
usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user, u_char *buf, u_short bufsize)
696c696 < hdr = (pcap_usb_header*) &handle->buffer[vec[i]]; ---
hdr = (pcap_usb_header*) &buf[vec[i]];
Here handle->buffer refers to a memory mapped kernel buffer, which holds
the USB Request Blocks and related meta-data. To make the patch work is
necessary to perform a memcpy from the kernel buffer to the user
provided one, but this solution will remove the performance gain of the
memory mapped access.
ciao,
Paolo
--------------------------------------------------------------------
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons above and may contain confidential information. If
you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it
immediately to the sender and delete the message. Should you have any questions, please contact us by replying to
webmaster () telecomitalia it.
Thank you
www.telecomitalia.it
--------------------------------------------------------------------
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 01)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- <Possible follow-ups>
- Re: Libpcap reentrancy and PF_RING patch Paolo Abeni (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Paolo Abeni (Jan 03)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Gregor Maier (Jan 07)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 02)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 05)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Luca Deri (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 06)
- Re: Libpcap reentrancy and PF_RING patch Guy Harris (Jan 05)
