--- Begin Message ---
On Aug 12, 2020, at 1:31 PM, Guy Harris via tcpdump-workers
<tcpdump-workers@lists.tcpdump.org> wrote:
> We should probably have an include/libnetdissect directory in which we
> install netdissect.h and the headers it requires.
Or include/netdissect.
> However, API-declaring headers should *NEVER* require config.h (there was a
> particularly horrible case with OpenBSD's version of libz, forcing a painful
> workaround in Wireshark:
...
> so if anything in netdissect.h depends on config.h definitions, we should try
> to fix that.
It looks like it's just declaring replacements for strlcat(), strlcpy(),
strdup(), and strsep() if the platform doesn't provide them. That should be
done in a non-public header.
> That leaves ip.h and ip6.h; I'd have to check to see whether they should be
> considered part of the API or not.
The comments are:
#include "ip.h" /* struct ip for nextproto4_cksum() */
#include "ip6.h" /* struct ip6 for nextproto6_cksum() */
so what should probably be done is have a header for *users* of libnetdissect
and a separate header for *components* of libnetdissect; the latter can define
more things. (The latter would be a non-public header, unless we decide to
support third-party dissector plugins; that would also mean we'd probably want
to have something like Wireshark's dissector tables to which those plugins
would add themselves.)
--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers