Really need to include pcap-int.h after system includes #6
Conversation
libpcap's portability.h goes off the rails.
|
pcap-int isn't a public header, so it shouldn't include it, nor should it be including portability.h, which is also not a public header. Instead, given that pcap files are not platform-dependent, it should define the pcap file data structures itself, as per the pcap-savefile man page or the RFC-style pcap file format specification (I plan to ask Van Jacobson and Steve McCanne if they want their names on it). I'll do that. |
It's not something we need to pick up by pulling in an internal libpcap header; it is *always* the same - if it's not a 32-bit time-in-seconds, a 32-bit microseconds-part-of-the-time, a 32-bit captured length, and a 32-bit on-the-network length, it's not a valid pcap file. This should address GitHub issue #6.
Done, along with a bunch of other modernizations largely stolen from modernizations done to tcpdump. It builds on my FreeBSD 11.2 VM. |
I don't disagree with you, this was the minimal change that allowed the FreeBSD port to build without patching.
I don't know when dependency on pcap-int.h appeared but I just looked and it is not present in the original Network Research Group rcs repo version of search.c. There are only commits by Vern, Steve, and I ending around 2000. And I don't think we had any 64-bit systems at that point. Rewriting the code to eliminate the dependency is clearly the best solution. |
|
For posterity, there is now a FAQ entry about this. |
or else libpcap's portability.h causes things to go off the rails.
On FreeBSD 11.3-RELEASE the conflict is with string.h: