On Thu, Mar 14, 2002 at 05:15:02PM -0000, tcpdump-workers wrote: > Is their a way to set the libpcap the buffer to write the data to the > application.(a static buffer defined in the application , and libpcap > will write the data to this buffer)?
If you mean you want to have libpcap read from the kernel directly into your buffer, rather than to its buffer, no, there isn't. What are you trying to accomplish by doing this? Note that what libpcap reads into that buffer may include more than one packet - and the size of the buffer may depend on the platform on which you're running, etc.. Note also that libpcap calls the "pcap_dispatch()"/"pcap_loop()" callback routine with a pointer to the packet data in its buffer, so, unless your application copies that data, it's not as if having it read into your buffer rather than its own buffer will reduce the number of packet copies. - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe
