tcpdump mailing list archives

TPACKET v3 / pcap_open_live - backwards compatibility for projects


From: John Farnsworth <John.Farnsworth () imc-chicago com>
Date: Thu, 27 Mar 2014 18:58:31 +0000

Hello - had a question regarding the changes in newer versions of libpcap that support tpacket v3 for linux capture.  I 
can't seem to find a sane method to do a backwards compatible set of code between versions of libpcap prior to this 
support and with it.  Since the only described way to interrogate the version of libpcap is a function, and I have to 
use a new function to stick with old behavior (pcap_set_immediate_mode), I don't see a reasonable way to support both.

Can anyone suggest a libpcap supported way of querying the library version via way of a define to invoke the 
appropriate code and avoid unresolved symbols for newer functions?  The documentation indicated I should not use the 
PCAP_VERSION defines as they are the pcap file format version, not the library version.

FYI - the changes to the behavior are pretty massive to existing code.  Our application was brought to a crawl by the 
new behavior when we moved to a newer version of the OS which provided 1.5.3.  Spent a lot of time trying to figure out 
why our OS upgrade had degraded performance by thousands of percent.  It might be reasonable to have pcap_open_live set 
immediate mode by default, but I don't know if that might cause worse issues for programs of different design.

________________________________

The information in this e-mail is intended only for the person or entity to which it is addressed.

It may contain confidential and /or privileged material. If someone other than the intended recipient should receive 
this e-mail, he / she shall not be entitled to read, disseminate, disclose or duplicate it.

If you receive this e-mail unintentionally, please inform us immediately by "reply" and then delete it from your 
system. Although this information has been compiled with great care, neither IMC Financial Markets & Asset Management 
nor any of its related entities shall accept any responsibility for any errors, omissions or other inaccuracies in this 
information or for the consequences thereof, nor shall it be bound in any way by the contents of this e-mail or its 
attachments. In the event of incomplete or incorrect transmission, please return the e-mail to the sender and 
permanently delete this message and any attachments.

Messages and attachments are scanned for all known viruses. Always scan attachments before opening them.
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: