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 [EMAIL PROTECTED]

        Thank you

                                        www.telecomitalia.it

--------------------------------------------------------------------
                        
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to