diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-06 22:01:38 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-06 22:01:38 -0700 |
commit | f290068cc95f6e635791ee7f871e7118b6458502 (patch) | |
tree | 9f3fd77cf51551ccbc12bf6598218978c2fe33e4 /pcap/pcap.h | |
parent | bad8c25c99cf5511125c7a7e688113c0811841c4 (diff) | |
download | libpcap-f290068cc95f6e635791ee7f871e7118b6458502.tar.gz |
Push pcap_lib_version() into the pcap-XXX.c files.
This lets us move the Windows version to pcap-win32.c, so we don't have
to include packet32.h in pcap.c.
It also gets rid of some #ifdefs, and lets us construct the version
string on UN*X platforms, and MS-DOS, at compile time.
Diffstat (limited to 'pcap/pcap.h')
-rw-r--r-- | pcap/pcap.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pcap/pcap.h b/pcap/pcap.h index 59ab73f6..92a7270e 100644 --- a/pcap/pcap.h +++ b/pcap/pcap.h @@ -479,6 +479,21 @@ PCAP_API void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); PCAP_API int pcap_findalldevs(pcap_if_t **, char *); PCAP_API void pcap_freealldevs(pcap_if_t *); +/* + * We return a pointer to the version string, rather than exporting the + * version string directly. + * + * On at least some UNIXes, if you import data from a shared library into + * an program, the data is bound into the program binary, so if the string + * in the version of the library with which the program was linked isn't + * the same as the string in the version of the library with which the + * program is being run, various undesirable things may happen (warnings, + * the string being the one from the version of the library with which the + * program was linked, or even weirder things, such as the string being the + * one from the library but being truncated). + * + * On Windows, the string is constructed at run time. + */ PCAP_API const char *pcap_lib_version(void); /* |