Commit Graph

41 Commits

Author SHA1 Message Date
João Valverde 1a8e1b1466 Use explicit test for Clang with compiler attributes
Clang likes to pretend to be other compilers but does not implement
the full range of pragmas other compilers have. Make Clang
always use __attribute__, it should be better supported than
the alternatives, for example with clang-cl.

Do not use __GNUC__ to select Clang, it does not work with
clang-cl. Test explicitly for __clang__ instead.

Fixes #19385.
2023-10-27 16:30:00 +00:00
João Valverde 7595fc7b01 Revert "plugins: Do not require a "type" subfolder hierarchy"
This reverts commit ef836e9afe.

To improve usability the commit created other issues that do not
have an easy fix.
2023-10-18 14:30:46 +00:00
João Valverde c7d0e02b49 plugins: Optimize directory scanning
Move the "right type or skip" check to the top.

Make the type string shorter and closer to natural text.

Add the API/ABI break to the release notes.
2023-10-17 12:33:31 +01:00
João Valverde ef836e9afe plugins: Do not require a "type" subfolder hierarchy
The folder structure was introduced to organize the
plugins and permit more efficient loading during the
startup but the gains are slight and the requirement
is awkward to describe and easy to forget in practice.

Remove that requirement and load any compatible binary
plugin in the plugin folder. This also allows extra
flexibility to organize the plugins in categories,
for example adding an "external" folder for plugins
external to the project, or whatever else one might
wish.

To check for library compatibility we add an extra string
signature token in the plugin that can be compared with
the expected plugin type.

The downside is that the initialization is still performed
3 times and more files need to be skipped now but in practice
this should not have a measurable performance impact
and this eliminates a class of annoying small forgetful mistakes
when manually installing files.

This is still compatible with the old requirement of having a
epan/wiretap/codecs subfolder. At most one sublevel is allowed
to minimize security risks and slowness with any random folder
hierarchies if the plugins folder setting is somehow misconfigured
or hijacked.

Ping #19389.
2023-10-11 08:08:16 +01:00
Moshe Kaplan f8d48d04d5 Fix misppellings in root and ui directories
Fix misppellings in root and ui directories.
Most of these are comments, but some are in
error messages.
2023-09-26 00:26:25 -04:00
Guy Harris 6396860fb9 With -D, always let the user know if capture_interface_list() fails.
Don't do so only if no interfaces are reported; we now append extcaps to
the list even if, due to an error, no interfaces were found, so report
an error in that cas regardless of whether the interface list is empty
or not.

Add additional exit status values for -D errors (and potentially for
errors elsewhere), use them, and allow "pcap error" in the tests
for -D.
2023-08-27 17:20:12 -07:00
João Valverde fea3f90147 Rename the Lua log domain
The name "WSLua" looks kind of weird. Use just "Lua" instead.
2023-08-17 15:39:21 +01:00
João Valverde 8ed0b47667 Qt: Add Lua console dialog
This adds a dialog in the Tools menu to open a console and evaluate
Lua code using the embedded Lua engine. It replaces the previous
console.lua implementation that was more limited to use, because
it relies on GUI bits exposed to Lua. It used two separate windows
for that reason.

The implementation uses the existing "funnel" API amd  relies heavily
on callbacks to maintain separation between GUI and epan code and
make it generic enough to possibly support more use cases than just
the Lua 5.2 console.

The open and close callbacks are used to install and remove a custom
print() lua function with dialog creation and destruction.

The eval callback is basically the same as luaL_dostring().
2023-08-16 15:19:00 +00:00
João Valverde 70255bed33 wsutil: Add a plugins log domain and use it 2023-06-14 16:40:37 +00:00
Gerald Combs eb76265355 Windows: Make use of SSIZE_T
Windows defines SSIZE_T, so typedef ssize_t to it.
2023-06-07 16:04:06 +00:00
João Valverde 152e5a5e88 wsutil: Downgrade severity of ws_returh.h macros
Downgrade the severity of this issue. Even though it is critical
in the sense that it is a (recoverable) programming error, by
breaking the contract for the function arguments, for practical
purposes we don't want to constantly trip our fuzzers with this
issue (running with a fatal critical level) so downgrade the
ws_return.h severity to "info".

At the same time use a dedicated log domain to the debugging
purpose can be fulfilled by setting the "InvalidArg" domain
as fatal.

Remove the duplicated function name from the output while at it.
2023-04-16 17:14:58 +00:00
João Valverde 20f6197205 Improve a compiler test and diagnostic control 2023-04-16 15:08:45 +00:00
Joakim Karlsson 47bc2e62e3 LWM: fix error: unknown option [-Werror=pragmas]
epan/dissectors/packet-lwm.c:468:21: error: unknown option after
‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
                     DIAG_OFF_STRINGOP_OVERFLOW()

gcc-warning "stringop-overflow=" was introduced in gcc7.1
https://hackmd.io/@VZ/gcc-warnings
2023-04-14 18:44:04 +00:00
João Valverde e14ef590e3 LWM: Silence false positive stringop-overflow warning (take 2)
```
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c: In function 'dissect_lwm':
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 16 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 32 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 48 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 64 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 80 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 96 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 112 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 128 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 144 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 64 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 80 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 96 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 112 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 128 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 144 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 160 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 176 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 192 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 208 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:464:31: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
D:/a/wireshark/wireshark/build/src/wireshark/epan/dissectors/packet-lwm.c:419:21: note: at offset 224 into destination object 'nwkSecurityVector' of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
```

Ping #18383
2023-04-12 15:40:13 +01:00
John Thacker 258c6f7352 log: Convert MaxMindDB to use new logging system
The current logging, if enabled, does an extra strdup and
double prints the functions and line number.

Note these are optimized away on a Release build target.
2023-03-19 14:17:19 -04:00
João Valverde 9cb759b38e Enable rpathification and working relocation on Linux (take 3)
Dumpcap depends on wsutil.so. The path to the shared library
is encoded in the RPATH (or RUNPATH) property of ELF binaries.
This is currently an absolute path on most Unixy systems.

Dumpcap could not be made to work with a relative RPATH because it
uses elevated privileges and some loaders will ignore relative
RPATHs and non-standard paths under those circumstances, because of
(justified) security concerns.

To enable relocation of the program we link dumpcap statically
with wsutil instead.

This provides a fully working relocatable installation on Linux
and other platforms that support relative RPATHs.
2023-02-13 00:24:21 +00:00
João Valverde c62aa67d2c Move ui/exit_codes.h to include/ 2023-02-07 10:12:08 +00:00
João Valverde d09460283b MinGW: Fix -Wattributes 2023-01-13 22:41:04 +00:00
Philipp Dittmann 9c68879a27 Windows: Fix Release (unused variables)
- ws_assert does not work, because _ASSERT_ENABLED is false and gets optimized
- add _U_ to unused variables because of compile flag /W3
- local variables need suppression of warning 4189
2023-01-11 17:50:42 +00:00
João Valverde 90084d8269 Add Wunused-parameter to DIAG_OFF_FLEX() 2023-01-04 15:50:07 +00:00
João Valverde b577b8a37f Add WS_WARN_UNUSED function attribute 2022-12-29 18:28:54 +00:00
João Valverde 79c3a77752 Add macros to control lemon diagnostics
Rename flex macros using parenthesis (mostly a style issue):

DIAG_OFF_FLEX -> DIAG_OFF_FLEX()
DIAG_ON_FLEX  -> DIAG_ON_FLEX()

Use the same kind of construct with lemon generated code using
DIAG_OFF_LEMON() and DIAG_ON_LEMON(). Use %include and %code
directives to enforce the desired order with generated code
in the middle in between pragmas.

Fix a clang-specific pragma to use DIAG_OFF_CLANG().

DIAG_OFF(unreachable-code) -> DIAG_OFF_CLANG(unreachable-code).

Apparently GCC is ignoring the -Wunreachable flag, that's why
it did not trigger an unknown pragma warning. From [1}:

  The -Wunreachable-code has been removed, because it was unstable: it
  relied on the optimizer, and so different versions of gcc would warn
  about different code.  The compiler still accepts and ignores the
  command line option so that existing Makefiles are not broken.  In some
  future release the option will be removed entirely. - Ian

[1] https://gcc.gnu.org/legacy-ml/gcc-help/2011-05/msg00360.html
2022-11-20 10:11:27 +00:00
João Valverde 90fb3ff438 Disable a compiler warning for Flex generated code
The flex+clang combination in the macOS Intel builder generates
-Wdocumentation warnings. Silence those warnings.
2022-11-17 17:36:32 +00:00
Guy Harris 1c9c1b5100 Add a #define for REPLACEMENT CHARACTER and use it.
Add UNICODE_REPLACEMENT_CHARACTER as a #define for the Unicode
REPLACEMENT CHARACTER code point (0x00FFFD), and use that instead of
0xfffd/0xFFFD/0x00FFFD in cases where that value refers to REPLACEMENT
CHARACTER.
2022-10-16 23:36:12 +00:00
João Valverde a19834b98c Windows: Store "gui.console_open" in the Windows registry
This removes the last dependency of the logging subsystem on the
preferences module. The latter is started much later than the former
and this is an issue.

The Windows-only preference "gui.console_open" is stored in the
registry as HKEY_LOCAL_USER\Software\Wireshark\ConsoleOpen. The semantics
are exactly the same. The preference is read by the logging subsystem
for initialization and then again by the preferences (read/write) so
the user can configure it as before.

The code to store the preference also in the preferences file was
kept, for backward compatibility and because it is not incompatible
with using the Registry concurrently.

The elimination of the prefs dependency also allows moving the Windows
console logic to wsutil and add the functionality to wslog directly,
thereby eliminating the superfluous Wireshark/Logray custom log handler.

To be able to read the ws_log_console_open global variable from
libwireshark it becomes necessary to add a new export macro
symbol called WSUTIL_EXPORT.
2022-10-11 14:25:04 +01:00
João Valverde 1b12dc4b9e Add WS_DEPRECATED_X() function attribute
This adds a new attribute that allows declaring Wireshark
functions as deprecated.

Also disabe -Werror with deprecated declarations  Deprecated
declarations can be introduced suddenly with a new version
of an external dependency or a new internal deprecation and
that has its own timeline to fix. We should still be able to
build with -Werror in that case.
2022-10-10 20:27:33 +00:00
João Valverde f6de88707c Add DIAG_WARN() diagnostic macros
This enable the warning at "warning" level (neither ignored nor
an error). This is used to selectively disable -Werror for a section
of code but keep the warning enabled as useful and relevant.

For example it can be used to defer replacing deprecated declarations
and still build with -Werror enabled globally.
2022-10-04 17:35:55 +00:00
João Valverde 32befe119d Add a log domain for encoding errors and lower the log level
Using a warning is probably too exalted for the current state
of the code, where UTF-8 errors are somewhat expected from
dissectors that are lax about input validation.

Use a debug level with its own "UTF-8" domain instead.

Using a dedicated domain allows to filter on encoding errors and
with some enhancements to the logging subsystem make them fatal
for tracking and debugging purposes.

Using a dedicated domain might have other drawbacks but for now
it seems like the best approach.
2022-09-28 14:57:51 +01:00
Guy Harris db27fb777a exceptions: make the exception handler stack per-thread.
This prevents the weird failures I saw on macOS in #17856; instead, it
should fail on *all* platforms with

    Unhandled exception ("epan/proto.c:8800: failed assertion "DISSECTOR_ASSERT_NOT_REACHED"", group=1, code=6)

(which it does on macOS 11.6/Xcode 12.5.1 and Windows 10/VS 2019
16.11.8; according to

https://en.wikipedia.org/w/index.php?title=Thread-local_storage&oldid=1064900318#C_and_C++

the major UN*X C compilers support __thread and the major Windows C
compilers support __declspec(thread).).

@jvalverde: on branches that require C11/C++11 support, we could perhaps
just use _Thread_local for C and thread_local for C++.  Note that
<thread.h> is optional in C11, and macOS 11.6/Xcode 12.5.1 does not
appear to include it.)

This does not *fix* the aforementioned issue; to do *that* we need to do
TRY in the register-dissectors thread code.  I'm committing this
separately because it fixes a bug in our exception package that could
cause all sorts of randomness now and in the future - what we're doing
now is Just Wrong.

(Yes, there's code to support per-thread exception handler stacks *on
platforms with pthreads*, but this is simpler *and* also works on
Windows.)
2022-01-11 05:00:42 +00:00
João Valverde 60533a55ff wslog: Add WS_DEBUG_HERE() macro
Add a LOG_LEVEL_ECHO that is always active and always non-fatal.

Use that to implement a WS_DEBUG_HERE() macro for quick print outs
during debugging sessions.
2021-12-29 15:21:46 +00:00
João Valverde 9a52634c5f Add ws_version.h to wireshark.h 2021-12-21 23:00:04 +00:00
João Valverde 4448b6494e Add a ws_posix_compat.h header
Currently used to define ssize_t on platforms that lack it.

Fix some Windows build errors caused by moving the definition into a
separate header.

Fix some narrowing warnings on Windows x64 from changing the definition
of ssize_t from long int to int64_t.

The casts in dumpcap are ugly but necessary. The whole code needs
to be rewritten for portability, or the warnings disabled.
2021-12-21 01:30:06 +00:00
João Valverde 64c0e166d1 Add string.h to wireshark.h
Wireshark development requires handling strings a lot. Add this
standard header to the base environment to avoid unnecessary repetition.
2021-12-18 20:28:54 +00:00
João Valverde f19c18a299 Add wmem.h to wireshark.h
Wmem is an alternative to GLib data structures so it should
have the same scope and be equally as convenient to use.

Wmem does not and cannot depend on anything else other than
GLib.
2021-12-18 20:28:54 +00:00
João Valverde d443197097 Prefer the portable _Noreturn attribute (C11)
Use _Noreturn, available with C11, instead of vendor specific
attributes. It's not compatible with C++ so we we must keep
the old code for now.
2021-12-18 18:54:08 +00:00
João Valverde 64e8a2817e Add wsutil/glib-compat.h to wireshark.h
We are already adding glib.h, we should include glib-compat.h
as well in the base environment.
2021-12-17 19:34:54 +00:00
João Valverde 689976477a Add inttypes.h to wireshark.h
For convenience, having to add this header constantly is annoying
and kind of pointless, now that we are relying more on stdio.h.
2021-12-17 19:34:54 +00:00
João Valverde cef5e81146 Define more log domains for extcaps 2021-12-05 00:28:26 +00:00
Moshe Kaplan 1c3a9af869 Add files with WS_DLL_PUBLIC to Doxygen
Add @file markers for most files that
contain functions exported with
WS_DLL_PUBLIC so that Doxygen will
generate documentation for them.
2021-11-29 21:27:45 +00:00
João Valverde 9bdccce574 More workarounds for Debian 2021-11-14 21:00:59 +00:00
João Valverde ca06d7e4fe Add an include sub-directory to the tree
Blind attempt to fix Debian package brokenness managing
headers separately from install rules.

Global public headers that don't fit any of the Wireshark
libraries should be placed in include/.

Eventually the C files in the root dir should be placed somewhere
else as well (like src/) but this is not a priority.

Fixes #17726.
2021-11-12 17:33:13 +00:00