aboutsummaryrefslogtreecommitdiffstats
path: root/epan/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-01-18HTTP3: Huffman decodingJohn Thacker1-0/+3
Add Huffman decoding from libngttp2 library (MIT licensed), and use it in HTTP/3 to display the decoded QPACK bytes. (HTTP/2 and HTTP/3 use the same Huffman encoding.) These files are not part of the public libnghttp2 library but normally internal. Note that libnghttp3 does not supply a function to inflate headers like nghttp2_hd_inflate_h2. Related to #16761
2023-12-12Move wireshark.pc.in and make our .pc file paths relativeGerald Combs1-6/+0
Move the libwireshark pkgconfig file to the resource directory. Set the various paths in our .pc files based on the `pcfiledir` variable instead of using absolute paths. This should make it possible to install using a DESTDIR that differs from CMAKE_INSTALL_PREFIX.
2023-11-19CMake: Move wireshark.pc.inGerald Combs1-0/+6
Move the libwireshark pkgconfig file to the libwireshark directory (epan).
2023-10-31epan: Move tvbuff functions to tvbuff.cJoão Valverde1-2/+0
2023-10-31wsutil: Move and consolidate CIDR codeJoão Valverde1-4/+0
Consolidate code to handle CIDR network addresses in inet_netw.[ch].
2023-10-24Add IPv4/IPv6 IANA special purpose registry as generated dataJoão Valverde1-0/+4
2023-08-30Adding HTTP/3 dissection to Wireshark.Anders Broman1-0/+2
This is a copy of MR #9330 all code and credit to Omer Shapira.
2023-07-25Replace "manuf" files with static arraysJoão Valverde1-0/+1
To reduce startup external file parsing replce the manuf file with static arrays compiled into the binary. Add 3 tables for MA-L, MA-M and MA-S. Add a fourth table to direct a 24-bit MAC prefix (OUI) to one of these tables. Adapt the make-manuf.py script to generate the static C data instead of the text file. The arrays are sorted and a binary search is performed to map an OUI (24bit/28bit/36bit) to a short and long name.
2023-07-08Replace services file with static arrayJoão Valverde1-0/+1
To speed up start-up we no longer read the services file from an external resource. Instead it is compiled statically into the binary in a sorted array. The personal services file is still parsed and loaded at startup, if it exists, to allow users to add custom entries and override global entries. For historical reasons the port list is mostly composed of the same entry for TCP and UDP. To avoid a lot of duplication we add an extra TCP+UDP table and do two lookups for TCP or UDP, one in the TCP+UDP table and the other in the TCP/UDP table. Because the services name space is pretty sparse, with lots of holes, we also use a binary search instead of a linear array with aprox. 49000 entries, where most would be empty.
2023-07-06Rename enterprises filesJoão Valverde1-2/+2
Rename generator script and C source file to be more descriptive and less unwieldly respectively.
2023-07-05Speed up handling of global enterprises.tsvMartin Mathieson1-1/+2
2023-06-09Add a preference for ignoring duplicate framesGilbert Ramirez1-0/+11
Sometimes you have a capture file that has many duplicate frames because of how the capture was made, and its convenient to ignore the duplicates so you can concentrate on the data and not all the TCP warnings. This adds a preference in the "Protocols" section to ignore duplicates. This currently only works while reading a capture file *not* during a live capture.
2023-05-27CMake: Try to use FindPython3.cmake againJoão Valverde1-1/+1
Use FindPython3.cmake instead of the deprecated FindPythonInterp.cmake, to make sure we actually find Python3. Don't use the module with MSYS2 because it is buggy and exhibits broken behaviour. Run it earlier in the configuration, just as a precaution, so other indirect calls to find python don't happen earlier.
2023-05-26Revert "CMake: Replace deprecated module FindPythonInterp"João Valverde1-1/+1
This reverts commit d6380e7ae40ec53cbd9119e9527546656f82d660. Turns out we were unwittingly still using FindPythonInterp instead of FindPython3.cmake, via LocatePythonModule.cmake, nd this commit actually enabled FindPython3.cmake. Also turns out FindPython3.cmake is far too clever and very buggy with MSYS2. It will usually not find the correct python binary and fail in many suprising ways, depending on which combination of Python Windows installations is present.
2023-05-26CMake: Replace deprecated module FindPythonInterpJoão Valverde1-1/+1
2023-02-06CMake: Cleanup unnecessary linking with shared librariesJoão Valverde1-4/+2
2023-01-18CMake: Require explicit installation of development headersJoão Valverde1-0/+2
Develpment headers are a sizeable part of the binary installation and most users won't ever require them. It's recommended to package them separately in a devel package or SDK. Create a CMake installation component for development headers and add the EXCLUDE_FROM_ALL property. Headers can be installed using the invocation: cmake --install <dir> --component Development
2022-12-28add zstd_testsKevin Albertson1-2/+1
2022-12-28add tvbuff_zstd.cKevin Albertson1-1/+3
2022-11-17CMake: Disable -Werror for flex generated filesJoão Valverde1-1/+1
2022-10-20epan/proto: Replace format text()João Valverde1-0/+8
The proto.h APIs expect valid UTF-8 so replace uses of format_text() with a label copy function that just does formatting and does not check for encoding errors. Avoid multiple levels of temporary string allocations. Make sure the copy does not truncate a multibyte character and produce invalid strings. Add debug checks for UTF-8 encoding errors instead. We escape C0 and C1 control codes (because control codes) and ASCII whitespace (and bell). Overall the goal is to be more efficient and optimized and help detect misuse of APIs by passing invalid UTF-8. Add a unit test for ws_label_strcat.
2022-10-20CMake: Add -Werror to test binariesJoão Valverde1-0/+5
2022-10-07wiretap: Add enum generationJoão Valverde1-8/+0
2022-06-07Make it easier to call tools/make-enums.py from the source dirJoão Valverde1-9/+0
2022-05-26Lua: Add lrexlib-pcre2 Lua regex bindingsJoão Valverde1-0/+1
Add the de facto standard Lua regex API to Wireshark. Upstream code is copied verbatim and the module opened in the "rex" table. This is just a user convenience and developer quality of life improvement over the GRegex Lua API because it has always been possible to load lrexlib-pcre2 as a Lua module from Wireshark.
2022-03-09Rename the "image" directory to "resources".Gerald Combs1-1/+1
The "image" directory contains resource compiler assets and other application resources, so name it "resources."
2021-12-27epan: Move time display types to field_display_eJoão Valverde1-1/+0
This makes it easier to understand the code, avoids conflicts and ugly and unnecessary casts. The field display enum has evolved over time from integer types to a type generic parameter.
2021-12-27epan: Remove obsolete header "garrayfix.h"João Valverde1-1/+0
2021-11-27epan: Add binary search to introspection APIJoão Valverde1-1/+1
2021-11-27epan: Add ipproto.h to instrospection enumsJoão Valverde1-0/+1
2021-11-26epan: Add introspection API to export some constantsJoão Valverde1-0/+18
C is notoriously difficult to bind from other languages without additional metadata. The C ABI does not include enums and macros that are an essential component of the API. To make Wireshark instrospectable and more binding friendly include an introspection API to export enums and integer macros. To avoid the tedious need to manually keep the code up to date it uses the excellent pyclibrary python package to automatically parse C headers and extract this data. This is not a process that should be done automatically during the build. This could be used for example to replace most of the wslua make-init-lua.pl perl script, which tries to do the same thing using regular expressions. Besides the downside of using Perl using regular expressions is inferior to pyclibrary in 2 ways: 1) pyclibrary understands most of C99 grammar so it is much more powerful; 2) pyclibrary has a specific API to extract "values" (enums and constants) automagically. We just need to take care to use only integer values, for our purposes.
2021-11-14Move regex code to wsutilJoão Valverde1-2/+0
2021-11-14dfilter: Add support for PCRE2João Valverde1-0/+2
PCRE2 is the future of PCRE. The only advantage of GRegex is that it comes bundled with GLib, which is not an advantage at all. PCRE2 is widely available, the GRegex abstractions layer are not a good fit and abstract things that don't need abstracting or that we could handle better ourselves, there are open bugs (#12997) and maintenance is spotty at best. GRegex comes with many of the problems of bundled code, aggravated by the fact that it completely falls outside of our control.
2021-10-21CMake: Compile dissectors.c independently.Gerald Combs1-0/+1
Move dissectors.c to a separate object library so that the rest of the dissectors don't have to wait for it to be generated. This reduces build time here by a few seconds when ccache is enabled.
2021-10-02rdp: add dissector for the egfx channelDavid Fort1-0/+1
This patch adds basic dissection for the egfx channel. It also fixes fragmentation in the dynamic channel, and also introduces some of the decompressors involved in RDP traffic.
2021-09-29COSE dissector from dtn-wireshark projectBrian Sipos1-0/+9
2021-08-24CMake: Switch GLib back to PUBLIC.Gerald Combs1-1/+6
379352ef7f / !3603 removed GLib from the INTERFACE_LINK_LIBRARIES and INTERFACE_INCLUDE_DIRECTORIES properties for the epan target. This broke external plugin development as discussed in !3891, so switch it back.
2021-07-26Move epan/wmem/wmem_scopes.h to epan/João Valverde1-3/+2
This header was installed incorrectly to epan/wmem_scopes.h. Instead of creating additional installation rules for a single header in a subfolder (kept for backward compatibility) just rename the standard "epan/wmem/wmem.h" include to "epan/wmem_scopes.h" and fix the documentation. Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-26Move wmem to wsutilJoão Valverde1-2/+3
This allows wmem to be used from other libraries, namely wsutil. It is often the case that a funtion exists in wsutil and cannot be used with a wmem scope, requiring some code duplication or extra memory allocations, or vice-versa, code in epan cannot be moved to wsutil because it has a wmem dependency. To this end wmem is moved to wsutil. Scope management remains part of epan because those scope semantics are specific to dissection.
2021-07-14CMake: Adjust wsutil includes and linking.Gerald Combs1-0/+2
Mark wsutil's includes SYSTEM PRIVATE. This exposed a lot of targets that were indirectly picking up include paths via the wsutil target, so add direct includes where needed. The G.722 and G.726 codecs were implicilty including tiffio.h; find it explicitly instead. Mark some of wsutil's libraries PRIVATE, but leave commonly-used ones PUBLIC. Ping #17477.
2021-07-11CMake: Remove a duplicate target include directory.Gerald Combs1-8/+3
epan/CMakeLists.txt set both SYSTEM PUBLIC and SYSTEM PRIVATE for GLIB2_INCLUDE_DIRS. The PUBLIC keyword adds it to the INTERFACE_INCLUDE_DIRECTORIES property, which is only appropriate for includes that we ship with Wireshark, so remove that one. Make GLIB2_LIBRARIES private as well. Fixes #17477.
2021-07-04epan: Remove dependency on version_info object libraryJoão Valverde1-1/+0
Dependending on version_info is unnecessary and forces an epan rebuild every time the git commit id changes, which can be slow, especially with LTO enabled, and again is unnecessary. Printing the VCS version to the TLS debug log is a minor convenience that doesn't justify the cost to relink epan with every commit.
2021-06-25wsutil: Rewrite ws_assert() to minimize dependenciesJoão Valverde1-1/+1
This includes as little as possible in the assertion header, so that it can be included globally in every file without pulling any unwanted definitions. In particular pulling stdlib.h is avoided because that can have side effects if it wants to include non-portable extensions. It is possible to have side-effects from include glib.h too, for example because of G_LOG_DOMAIN. These side-effects are usually avoidable with careful ordering of pre-processor directives but with multiple levels of indirections it can be hard to track. Better to make it robust to these kinds of failures in the first place. Also integrate with our logger for a cohesive experience (but keep it a private dependency).
2021-05-19Remove use of PACKAGE_VERSION in maxminddb versionDavid Perry1-1/+0
2021-05-19Add version info for lz4, zstd, maxmindDavid Perry1-0/+3
This simply implements the patches given in a comment on bug 16270. <https://gitlab.com/wireshark/wireshark/-/issues/16270#note_400748726>
2021-04-10CMake: Add ENABLE_VLD option for MSVCTomasz Moń1-0/+3
Calling cmake with -DENABLE_VLD=ON when building with Visual Studio, results in debug configuration being linked to Visual Leak Detector. By default, Visual Leak Detector outputs the leak summary to Visual Studio debug window. When ENABLE_VLD is active, VLD is linked to all wireshark libraries and executables.
2021-03-01CMake: Use CheckAPI's abort/termoutput with dissectors onlyJoão Valverde1-1/+0
I believe this was the original intention, to use these API restricitons with dissectors only (not that I necessarily agree with that policy either), and through copy-paste and lack of clear guidelines it spread to other parts of the build. Rename the checkAPI groups to make it very clear that this is dissector-only. This doesn't mean, of course, that good programming practices shouldn't be followed everywhere. In particular assertions need to be used properly. Don't use them to catch runtime errors or validate input data. This commit will be followed by another removing the various ugly hacks people have been using to get around the checkAPI hammer.
2021-02-26Added decoding of ProtocolID and PPID into Component Status Protocol dissector.Thomas Dreibholz1-0/+1
This merge request adds: * Decoding of ProtocolID and PPID in Component Status Protocol dissector. * Moved SCTP PPID list from SCTP dissector into separate file sctpppids.c, due to reuse in Component Status Protocol dissector. * Export of sctpppid_val_ext containing the PPID list.
2021-02-19Added missing dccpservicecodes.h to epan/CMakeLists.txt.Thomas Dreibholz1-0/+1
2021-02-18CMake: Use target_include_directores more.Gerald Combs1-8/+9
The include_directories documentation at https://cmake.org/cmake/help/latest/command/include_directories.html says: "Note: Prefer the target_include_directories() command to add include directories to individual targets and optionally propagate/export them to dependents." Switch from include_directories to target_include_directories in a bunch of places. Add "SYSTEM" to the remaining external include_directories calls in order to minimize our compiler warning blast radius.