On Tue, 12 Dec 2006 09:35:59 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote:
> The pcap patch to use the new API has been reworked and now it works > also with the mmap access. (it forward the kernel header to the > application). The pcap patch can be found here: > > http://thread.gmane.org/gmane.network.tcpdump.devel/1984/focus=1984 I looked at it, and indeed I see you solved that problem, thanks a lot! But the old comment still remains: +static +int usb_mmap(pcap_t* handle) +{ + int len = ioctl(handle->fd, MON_IOCQ_RING_SIZE); + if (len < 0) + return 0; + + /* write access is required, because we create pcap_hdr in-place */ + errno = 0; + handle->buffer = mmap(0, len, PROT_READ, + MAP_SHARED, handle->fd, 0); + return handle->buffer != MAP_FAILED; Maybe you want to remove it? I'm working on getting the kernel patch up to date, but there were some changes to mmap interface in 2.6.20-rc1 (like VM_RESERVED is gone, apparently), so not today. Maybe on Sunday. -- Pete ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel