6 /* Note: You cannot use earlier #defines in later #cmakedefines (cmake 2.6.2). */
9 #define PACKAGE "wireshark"
11 #define VERSION_EXTRA "$ENV{WIRESHARK_VERSION_EXTRA}"
13 /* Version number of Wireshark and associated utilities */
14 #define VERSION "${PROJECT_VERSION}${VERSION_EXTRA}"
15 #define VERSION_MAJOR ${PROJECT_MAJOR_VERSION}
16 #define VERSION_MINOR ${PROJECT_MINOR_VERSION}
17 #define VERSION_MICRO ${PROJECT_PATCH_VERSION}
19 /* Version number of Stratoshark and associated utilities */
20 #define LOG_VERSION "${LOG_PROJECT_VERSION}${VERSION_EXTRA}"
22 #define PLUGIN_PATH_ID "${PLUGIN_PATH_ID}"
23 #define VERSION_FLAVOR "${VERSION_FLAVOR}"
25 /* Build wsutil with SIMD optimization */
26 #cmakedefine HAVE_SSE4_2 1
28 /* Define to 1 if we want to enable plugins */
29 #cmakedefine HAVE_PLUGINS 1
31 /* Define to 1 if we check hf conflict */
32 #cmakedefine ENABLE_CHECK_FILTER 1
34 /* Link Wireshark libraries statically */
35 #cmakedefine ENABLE_STATIC 1
37 /* Enable AddressSanitizer (and LeakSanitizer on clang/gcc) */
38 #cmakedefine ENABLE_ASAN 1
40 /* Enable LeakSanitizer standalone */
41 #cmakedefine ENABLE_LSAN 1
43 /* Define to 1 if you have the <arpa/inet.h> header file. */
44 #cmakedefine HAVE_ARPA_INET_H 1
46 /* Define to 1 if you have the `clock_gettime` function. */
47 #cmakedefine HAVE_CLOCK_GETTIME 1
49 /* Define to 1 if you have the `timespec_get` function. */
50 #cmakedefine HAVE_TIMESPEC_GET 1
52 /* Define to 1 if you have the `localtime_r` function. */
53 #cmakedefine HAVE_LOCALTIME_R 1
55 /* Define to 1 if you have the `gmtime_r` function. */
56 #cmakedefine HAVE_GMTIME_R 1
58 /* Define to 1 if you have the `timegm` function. */
59 #cmakedefine HAVE_TIMEGM 1
61 /* Define to 1 if you have the `tzset` function. */
62 #cmakedefine HAVE_TZSET 1
64 /* Define to use the MaxMind DB library */
65 #cmakedefine HAVE_MAXMINDDB 1
66 /* MaxmindDB version */
67 #define MAXMINDDB_VERSION "${MAXMINDDB_VERSION}"
70 /* Define to 1 if you have the <ifaddrs.h> header file. */
71 #cmakedefine HAVE_IFADDRS_H 1
73 /* Define to 1 if yu have the `fseeko` function. */
74 #cmakedefine HAVE_FSEEKO 1
76 /* Define to 1 if you have the `getexecname' function. */
77 #cmakedefine HAVE_GETEXECNAME 1
79 /* Define to 1 if you have the `getifaddrs' function. */
80 #cmakedefine HAVE_GETIFADDRS 1
82 /* Define if LIBSSH support is enabled */
83 #cmakedefine HAVE_LIBSSH 1
85 /* Define if you have the 'dlget' function. */
86 #cmakedefine HAVE_DLGET 1
88 /* Define to 1 if you have the <grp.h> header file. */
89 #cmakedefine HAVE_GRP_H 1
91 /* Define to use heimdal kerberos */
92 #cmakedefine HAVE_HEIMDAL_KERBEROS 1
94 /* Define to 1 if you have the `krb5_pac_verify' function. */
95 #cmakedefine HAVE_KRB5_PAC_VERIFY 1
97 /* Define to 1 if you have the `krb5_c_fx_cf2_simple' function. */
98 #cmakedefine HAVE_KRB5_C_FX_CF2_SIMPLE 1
100 /* Define to 1 if you have the `decode_krb5_enc_tkt_part' function. */
101 #cmakedefine HAVE_DECODE_KRB5_ENC_TKT_PART 1
103 /* Define to 1 if you have the `encode_krb5_enc_tkt_part' function. */
104 #cmakedefine HAVE_ENCODE_KRB5_ENC_TKT_PART 1
106 /* Define to 1 if you have the `inflatePrime' function. */
107 #cmakedefine HAVE_INFLATEPRIME 1
109 /* Define to 1 if you have the `zng_gzopen' function. */
110 #cmakedefine WITH_GZFILEOP 1
112 /* Define to 1 if you have the `issetugid' function. */
113 #cmakedefine HAVE_ISSETUGID 1
115 /* Define to use kerberos */
116 #cmakedefine HAVE_KERBEROS 1
118 /* Define to use nghttp2 */
119 #cmakedefine HAVE_NGHTTP2 1
121 /* Define to use nghttp3 */
122 #cmakedefine HAVE_NGHTTP3 1
124 /* Define to use the libcap library */
125 #cmakedefine HAVE_LIBCAP 1
127 /* Define to use GnuTLS library */
128 #cmakedefine HAVE_LIBGNUTLS 1
130 /* Define to 1 if GnuTLS was built with pkcs11 support. */
131 #cmakedefine HAVE_GNUTLS_PKCS11 1
133 /* Enable libnl support */
134 #cmakedefine HAVE_LIBNL 1
136 /* libnl version 1 */
137 #cmakedefine HAVE_LIBNL1 1
139 /* libnl version 2 */
140 #cmakedefine HAVE_LIBNL2 1
142 /* libnl version 3 */
143 #cmakedefine HAVE_LIBNL3 1
145 /* Define to use libpcap library */
146 #cmakedefine HAVE_LIBPCAP 1
148 /* Define to 1 if you have the `smi' library (-lsmi). */
149 #cmakedefine HAVE_LIBSMI 1
151 /* Define to 1 if libsmi exports a version string (and that symbol is visible). */
152 #cmakedefine HAVE_SMI_VERSION_STRING 1
154 /* Define to use zlib library */
155 #cmakedefine HAVE_ZLIB 1
157 /* Define to use zlib-ng library */
158 #cmakedefine HAVE_ZLIBNG 1
159 #define ZLIBNG_VERSION_STRING "${ZLIBNG_VERSION_STRING}"
161 /* Define to use the minizip library */
162 #cmakedefine HAVE_MINIZIP 1
163 #define MINIZIP_VERSION "${MINIZIP_VERSION}"
165 /* Define to use the minizip-ng library */
166 #cmakedefine HAVE_MINIZIPNG 1
167 #define MINIZIPNG_VERSION "${MINIZIPNG_VERSION}"
169 /* Define if `dos_date' (with underscore) field exists in `zip_fileinfo' */
170 #cmakedefine HAVE_MZCOMPAT_DOS_DATE 1
172 /* Define to use brotli library */
173 #cmakedefine HAVE_BROTLI 1
175 /* Define to use lz4 library */
176 #cmakedefine HAVE_LZ4 1
178 /* Check for lz4frame */
179 #cmakedefine HAVE_LZ4FRAME_H 1
181 /* Define to use snappy library */
182 #cmakedefine HAVE_SNAPPY 1
183 #define SNAPPY_VERSION "${SNAPPY_VERSION}"
185 /* Define to use zstd library */
186 #cmakedefine HAVE_ZSTD 1
188 /* Define to 1 if you have the <linux/sockios.h> header file. */
189 #cmakedefine HAVE_LINUX_SOCKIOS_H 1
191 /* Define to 1 if you have the <linux/if_bonding.h> header file. */
192 #cmakedefine HAVE_LINUX_IF_BONDING_H 1
194 /* Define to use Lua */
195 #cmakedefine HAVE_LUA 1
197 /* Define to 1 if we have Lua with Unicode for Windows patches. */
198 #cmakedefine HAVE_LUA_UNICODE 1
200 /* The size of the lua_Integer type, if we have Lua. */
201 #cmakedefine LUA_INTEGER_SIZE ${LUA_INTEGER_SIZE}
203 /* Define to use MIT kerberos */
204 #cmakedefine HAVE_MIT_KERBEROS 1
206 /* Define to 1 if you have the <netdb.h> header file. */
207 #cmakedefine HAVE_NETDB_H 1
209 /* Define to 1 if you have the <netinet/in.h> header file. */
210 #cmakedefine HAVE_NETINET_IN_H 1
212 /* nl80211.h is new enough */
213 #cmakedefine HAVE_NL80211 1
215 /* SET_CHANNEL is supported */
216 #cmakedefine HAVE_NL80211_CMD_SET_CHANNEL 1
218 /* SPLIT_WIPHY_DUMP is supported */
219 #cmakedefine HAVE_NL80211_SPLIT_WIPHY_DUMP 1
221 /* VHT_CAPABILITY is supported */
222 #cmakedefine HAVE_NL80211_VHT_CAPABILITY 1
224 /* Define to 1 if you have macOS frameworks */
225 #cmakedefine HAVE_MACOS_FRAMEWORKS 1
227 /* Define to 1 if you have the macOS CFPropertyListCreateWithStream function */
228 #cmakedefine HAVE_CFPROPERTYLISTCREATEWITHSTREAM 1
230 /* Define to 1 if you have the `pcap_create' function. */
231 #cmakedefine HAVE_PCAP_CREATE 1
233 /* Define to 1 if the capture buffer size can be set. */
234 #cmakedefine CAN_SET_CAPTURE_BUFFER_SIZE 1
236 /* Define to 1 if you have the `pcap_freecode' function. */
237 #cmakedefine HAVE_PCAP_FREECODE 1
239 /* Define to 1 if you have the `pcap_free_datalinks' function. */
240 #cmakedefine HAVE_PCAP_FREE_DATALINKS 1
242 /* Define to 1 if you have the `pcap_open' function. */
243 #cmakedefine HAVE_PCAP_OPEN 1
245 /* Define to 1 if you have libpcap/WinPcap/Npcap remote capturing support. */
246 #cmakedefine HAVE_PCAP_REMOTE 1
248 /* Define to 1 if you have the `pcap_setsampling' function. */
249 #cmakedefine HAVE_PCAP_SETSAMPLING 1
251 /* Define to 1 if you have the `pcap_set_tstamp_precision' function. */
252 #cmakedefine HAVE_PCAP_SET_TSTAMP_PRECISION 1
254 /* Define to 1 if you have the `pcap_set_tstamp_type' function. */
255 #cmakedefine HAVE_PCAP_SET_TSTAMP_TYPE 1
257 /* Define to 1 if you have the `PCAP_ERROR_PROMISC_PERM_DENIED' symbol. */
258 #cmakedefine HAVE_PCAP_ERROR_PROMISC_PERM_DENIED 1
260 /* Define to 1 if you have the `PCAP_WARNING_TSTAMP_TYPE_NOTSUP' symbol. */
261 #cmakedefine HAVE_PCAP_WARNING_TSTAMP_TYPE_NOTSUP 1
263 /* Define to 1 if you have the <pwd.h> header file. */
264 #cmakedefine HAVE_PWD_H 1
266 /* Define to 1 if you want to playing SBC by standalone BlueZ SBC library */
267 #cmakedefine HAVE_SBC 1
269 /* Define to 1 if you have the SpanDSP library. */
270 #cmakedefine HAVE_SPANDSP 1
272 /* Define to 1 if you have the bcg729 library. */
273 #cmakedefine HAVE_BCG729 1
275 /* Define to 1 if you have the opencore-amrnb library. */
276 #cmakedefine HAVE_AMRNB 1
278 /* Define to 1 if you have the ilbc library. */
279 #cmakedefine HAVE_ILBC 1
281 /* Define to 1 if you have the opus library. */
282 #cmakedefine HAVE_OPUS 1
284 /* Define to 1 if you have the lixbml2 library. */
285 #cmakedefine HAVE_LIBXML2 1
287 /* Define to 1 if you have the `setresgid' function. */
288 #cmakedefine HAVE_SETRESGID 1
290 /* Define to 1 if you have the `setresuid' function. */
291 #cmakedefine HAVE_SETRESUID 1
293 /* Define to 1 if you have the Sparkle or WinSparkle library */
294 #cmakedefine HAVE_SOFTWARE_UPDATE 1
296 /* Define if you have the 'strptime' function. */
297 #cmakedefine HAVE_STRPTIME 1
299 /* Define if you have the 'memmem' function. */
300 #cmakedefine HAVE_MEMMEM 1
302 /* Define if you have the 'memrchr' function. */
303 #cmakedefine HAVE_MEMRCHR 1
305 /* Define if you have the 'strerrorname_np' function. */
306 #cmakedefine HAVE_STRERRORNAME_NP 1
308 /* Define if you have the 'vasprintf' function. */
309 #cmakedefine HAVE_VASPRINTF 1
311 /* Define to 1 if `st_birthtime' is a member of `struct stat'. */
312 #cmakedefine HAVE_STRUCT_STAT_ST_BIRTHTIME 1
314 /* Define if st_blksize field exists in struct stat */
315 #cmakedefine HAVE_STRUCT_STAT_ST_BLKSIZE 1
317 /* Define to 1 if `__st_birthtime' is a member of `struct stat'. */
318 #cmakedefine HAVE_STRUCT_STAT___ST_BIRTHTIME 1
320 /* Define to 1 if you have the <sys/socket.h> header file. */
321 #cmakedefine HAVE_SYS_SOCKET_H 1
323 /* Define to 1 if you have the <sys/time.h> header file. */
324 #cmakedefine HAVE_SYS_TIME_H 1
326 /* Define to 1 if you have the <sys/utsname.h> header file. */
327 #cmakedefine HAVE_SYS_UTSNAME_H 1
329 /* Define to 1 if you have the <sys/wait.h> header file. */
330 #cmakedefine HAVE_SYS_WAIT_H 1
332 /* Define if tm_gmtoff field exists in struct tm */
333 #cmakedefine HAVE_STRUCT_TM_TM_GMTOFF 1
335 /* Define if tm_zone field exists in struct tm */
336 #cmakedefine HAVE_STRUCT_TM_TM_ZONE 1
338 /* Define if tzname array exists */
339 #cmakedefine HAVE_TZNAME 1
341 /* Define to 1 if you have the <unistd.h> header file. */
342 #cmakedefine HAVE_UNISTD_H 1
344 /* Define if we have QtMultimedia */
345 #cmakedefine QT_MULTIMEDIA_LIB 1
347 /* Define if we have QtDBus */
348 #cmakedefine QT_DBUS_LIB 1
350 /* Build androiddump with libpcap instead of wireshark stuff */
351 #cmakedefine ANDROIDDUMP_USE_LIBPCAP 1
353 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
355 /* Note: not use in the code */
356 #cmakedefine YYTEXT_POINTER
358 /* Define to 1 if the 'ssize_t' type exists. */
359 #cmakedefine HAVE_SSIZE_T 1
361 /* Define to 1 if we are using the msys2 environment to build. */
362 #cmakedefine HAVE_MSYSTEM 1
364 /* Define if we have sinsp and scap */
365 #cmakedefine HAVE_SINSP 1
368 #define SINSP_VERSION_MAJOR ${SINSP_VERSION_MAJOR}
369 #define SINSP_VERSION_MINOR ${SINSP_VERSION_MINOR}
370 #define SINSP_VERSION_MICRO ${SINSP_VERSION_MICRO}
373 #if defined(_MSC_VER)
374 # define strncasecmp strnicmp
375 # define popen _popen
376 # define pclose _pclose
381 * Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
383 # define YY_NO_UNISTD_H
390 * Make sure everyone is using the same API and that it's sufficient
392 * This should match the following:
393 * - The <compatibility><application> section in resources\wireshark.exe.manifest.in
394 * - The WinVer parts of packaging\nsis\wireshark.nsi
395 * - The VersionNT parts of packaging\wix\Prerequisites.wxi
397 # ifndef NTDDI_VERSION
398 # define NTDDI_VERSION NTDDI_WIN10
401 # ifndef _WIN32_WINNT
402 # define _WIN32_WINNT _WIN32_WINNT_WIN10
406 #define PCRE2_CODE_UNIT_WIDTH 8
409 * If HAVE_PCAP_REMOTE is defined, it forces the WinPcap header files to
410 * define things required for remote capture, by defining HAVE_REMOTE.
412 * With all versions of the WinPcap SDK, if:
414 * 1) you are building with any current WinPcap SDK;
415 * 2) you do not define HAVE_REMOTE before including pcap.h (or
417 * 3) you define a struct pcap_stat and pass it to a call to
419 * 4) the system you're running on has WinPcap, rather than Npcap,
422 * whatever is in memory after the struct pcap_stat may get overwritten,
423 * with unpredictable results, because the pcap_stats() implementation for
424 * WinPcap will assume that the structure has the additional members that
425 * are added if and only if HAVE_REMOTE is defined, and will fill them in,
426 * even if they're not there.
428 * Yes, this is q WinPcap bug; if your project has a public header file
429 * that checks or otherwise uses a #define that's defined by your project's
430 * configuration process, and don't ensure that it's always defined
431 * appropriately when that header file is included, before its first use,
432 * you have made a mistake.
434 * In libpcap 1.7.0 and later, the pcap_stats() implementation for WinPcap
435 * will not fill those fields in; however, no WinPcap implementation was
436 * based on that recent a libpcap release, so they all have the bug.
438 * Npcap was originally based on libpcap 1.8.0, and later releases are
439 * based on later releases of libpcap, so they will not overwrite memory
440 * past the end of the structure.
442 * The header file bug is fixed in libpcap 1.9.0 or later - the fields
443 * are present on Windows, regardless of whether HAVE_REMOTE is defined
444 * or not when the header is included (and are not present on UN*X), so
445 * if you build with an SDK with libpcap 1.9.0 or later headers, you
446 * do not need to define HAVE_REMOTE before including pcap.h (including it
447 * will make no difference).
449 * No version of the WinPcap SDK provided libpcap 1.9.0-or-later headers.
450 * The Npcap SDK, as of SDK version 1.04, provides them, so this is
451 * only necessary for building with the WinPcap SDK.
453 #ifdef HAVE_PCAP_REMOTE
457 #include <ws_log_defs.h>
459 #endif /* __CONFIG_H__ */