tcpdump mailing list archives
Re: [PATCH] enable memory mapped access toethernet
From: "Gianluca Varenni" <gianluca.varenni () cacetech com>
Date: Wed, 5 Dec 2007 11:41:11 -0800
I agree with you.Consider that under windows, for example, we have a windows-only function to set the kernel buffer size (http://www.winpcap.org/docs/docs_40_2/html/group__wpcapfunc.html#g124bde25ccd9e39017ff2abec2dda623) and the kernel buffer in WinPcap is actually a ring buffer (although we do not use memory mapped access).
Have a nice day GV----- Original Message ----- From: "Gregor Maier" <gregor () net in tum de>
To: <tcpdump-workers () lists tcpdump org> Sent: Wednesday, December 05, 2007 10:27 AMSubject: Re: [tcpdump-workers] [PATCH] enable memory mapped access toethernet
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1The idea behind the snaplen [miss-]use is to permit legacy application to take advantage of the memory mapped access and permit new ones to control the ring behaviur. Such goal could be obtained even with other solution, but I was a bit 'scared' to add a 'Linux only' API to pcap.h.IMHO that's not an issue. Furthermore we have a student working on an MMAP-pcap for FreeBSD as his master thesis. So it won't be a Linux only API for long ;-)Undoubtedly my implementation is not the most clean one; I can rework the patch adding a function to control the ring size [something like 'pcap_set_ring_size(handle, ring_size)'] and using some default values for the memory mapped ring during pcap_open_live, if there is some consensus in this direction.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. If you can't change these parameters during the capture I would introduce a new pcap_open_live_mmap() function and make the "old" pcap_open_live() call pcap_open_live_mmap() just my 2ct Gregor -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHVu2HdGiwgbikMYMRAuKRAKCFf34TkiSMu0u1k6PuTiNeUk5YSwCePy+2 uewmmfimn5aGktK9AuJ+5hM= =NU53 -----END PGP SIGNATURE----- - This is the tcpdump-workers list.Visit https://cod.sandelman.ca/ to unsubscribe.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- [PATCH] enable memory mapped access to ethernet device for linux Paolo Abeni (Dec 05)
- Re: [PATCH] enable memory mapped access to ethernet device for linux Gianluca Varenni (Dec 05)
- Re: [PATCH] enable memory mapped access toethernet device for linux Paolo Abeni (Dec 05)
- Re: [PATCH] enable memory mapped access toethernet Gregor Maier (Dec 05)
- Re: [PATCH] enable memory mapped access toethernet Gianluca Varenni (Dec 05)
- Re: [PATCH] enable memory mapped access to ethernet devices Abeni Paolo (Dec 05)
- Re: [PATCH] enable memory mapped access toethernet device for linux Paolo Abeni (Dec 05)
- Re: [PATCH] enable memory mapped access to ethernet device for linux Gianluca Varenni (Dec 05)
- <Possible follow-ups>
- [PATCH] enable memory mapped access to ethernet device for linux Alexander Dupuy (Dec 06)
- Re: [PATCH] enable memory mapped access to ethernet device for linux Guy Harris (Dec 06)
- Re: [PATCH] enable memory mapped access to ethernet Andy Howell (Dec 07)
- Re: [PATCH] enable memory mapped access to ethernet device for linux Gianluca Varenni (Dec 07)
- Re: [PATCH] enable memory mapped access to ethernet Matthew Luckie (Dec 07)
- Re: [PATCH] enable memory mapped access to ethernet device for linux Guy Harris (Dec 06)
- Re: [PATCH] enable memory mapped access toethernet device for linux Paolo Abeni (Dec 07)
- Re: [PATCH] enable memory mapped access to ethernet device for linux Gianluca Varenni (Dec 10)