We are deliberately not declaring those variables in header files,
because they were never so declared in any libpcap API, and because we
don't want people to use them. We only keep them exported to avoid
causing breakage for binaries that happen to use them; if, as, and when
either 1) we're sure there aren't any binaries that use them or 2)
decide we don't care whether those binaries stop working, we can get rid
of them.
* Debian, at least, so make it a public symbol, even though we
* don't officially export it by declaring it in a header file.
* (Programs *should* do this themselves, as tcpdump now does.)
+ *
+ * We declare it here, right before defining it, to squelch any
+ * warnings we might get from compilers about the lack of a
+ * declaration.
*/
+extern struct eproto eproto_db[];
PCAP_API_DEF struct eproto eproto_db[] = {
{ "pup", ETHERTYPE_PUP },
{ "xns", ETHERTYPE_NS },
* Not explicitly exported via a header file - the right API to use
* is pcap_lib_version() - but some programs included it, so we
* provide it.
+ *
+ * We declare it here, right before defining it, to squelch any
+ * warnings we might get from compilers about the lack of a
+ * declaration.
*/
+extern char pcap_version[];
PCAP_API_DEF char pcap_version[] = PACKAGE_VERSION;
static int