aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2023-11-21GNSS: add wiretap for EGNOS Message Server (EMS) filesTimo Warns1-0/+1
Add a wiretap implementation for EGNOS Message Server (EMS) files.
2023-11-07Qt: Add DSBs info to capture file propertiesJohn Thacker1-0/+1
Add the type and size of each DSB to the Capture File Properties window. Related to #14599, #15799.
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-04-13Add rtpdump read and parse supportDavid Perry1-1/+2
Add a wiretap file format reader to read rtpdump files. Generates "Exported PDU" data from the header of the rtpdump file. Add MIME file format read support for rtpdump files. Change the default extension for exporting rtpdump files to '*.rtp' as per the rtptools project's recommendation. Wireshark generates rtpdump files slightly differently from how rtpdump itself works. Both the wiretap reader and the MIME reader examine the text and binary headers to determine the most appropriate presentation of information to the user.
2023-02-06CMake: Cleanup unnecessary linking with shared librariesJoão Valverde1-0/+1
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-11-17CMake: Disable -Werror for flex generated filesJoão Valverde1-1/+1
2022-10-07wiretap: Add enum generationJoão Valverde1-0/+2
2022-08-26DLT: Adding support to open DLT filesDr. Lars Völker1-0/+1
This patch allows Wireshark to open DLT files directly.
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."
2022-01-01Windows: UTF-8 harder.Gerald Combs1-1/+1
Set the process code page in wireshark.exe.manifest to UTF-8 as described at https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page Make sure each of our command line resource files includes our main manifest. Rename wiretap.rc to libwiretap.rc to match our other libraries.
2021-10-04Read eNode-B raw logsAnders Broman1-0/+1
2021-09-01Add support for ZSTD and LZ4 decompressionErik Rigtorp1-0/+4
- Describe zstd and lz4 support in man pages - Update AUTHORS - Update mime types to recognize zstd and lz4
2021-07-21CMake: Remove unneeded GLIB2_LIBRARIES.Gerald Combs1-1/+0
GLib is part of wsutil's link interface, so we don't need to link to it explictly.
2021-07-16BLF: Support for BLF file formatDr. Lars Völker1-0/+1
This patch adds first support for the BLF file format.
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-29CMake: Remove non existent '/codecs' include pathJoão Valverde1-0/+4
The '/codecs' dir was removed in g63af1da7e7. Avoid using include_directories(), prefer target_include_directories(). Remove some unnecessary CMAKE_CURRENT_*_DIR includes and some other small cleanups while at it.
2021-03-13doc: Clean up lists of file types.Guy Harris1-1/+1
Add missing entries, regularize the descriptions, etc.. Note that pcap and pcapng are the native formats. Fix various issues. Update the editcap -F output to match urrent reality. While we're at it, sort the libwiretap modules, putting observer.c in the right place.
2021-03-11observer: rename source and update name.Guy Harris1-1/+1
Name the source to the code to read Observer files after the file format, not the company that created it, got bought by JDSU, and then ended up in Viavi when JDSU split. Refer to the file format as "Viavi Observer" to reflect that.
2021-03-01CMake: Use CheckAPI's abort/termoutput with dissectors onlyJoão Valverde1-2/+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-23wiretap: eliminate the pcap/nspcap/pcapng WTAP_FILE_TYPE_SUBTYPE_ values.Guy Harris1-2/+7
Register the pcap and pcapng file types/subtypes rather than hardwiring them into the table. Call the registration routines for them directly, rather than through a generated table; they're always supposed to be there, as some code in Wireshark either writes only one of those formats or defaults to writing one of those formats. Don't run their source code through the registration-routine-finder script. Have the file type/subtype codes for them be directly exported to the libwiretap core, and provide routines to return each of them, to be used by the aforementioned code. When reporting errors with cfile_write_failure_message(), use wtap_dump_file_type_subtype() to get the file type/subtype value for the wtap_dumper to which we're writing, rather than hardcoding it. Have the "export PDU" code capable of supporting arbitrary file types/subtypes, although we currently only use pcapng. Get rid of declarations of now-static can_write_encap and dump_open routines in various headers.
2021-02-22wiretap: fix dependency in CMakeLists.txt.Guy Harris1-1/+1
wtap_modules.c depends on ${WIRETAP_MODULE_FILES} rather than ${WIRETAP_NONGENERATED_FILES}.
2021-02-14wiretap: register most built-in file types from its module.Guy Harris1-7/+34
Remove most of the built-in file types from the table in wiretap/file_access.c and, instead, have the file types register themselves, using wtap_register_file_type_subtypes(). This reduces the source code changes needed to add a new file type from three (add the handler, add the file type to the table in file_access.c, add a #define for the file type in wiretap/wtap.h) to one (add the handler). (It also requires adding the handler's source file to wiretap/CMakeLists.txt, but that's required in both cases.) A few remain because the WTAP_FILE_TYPE_SUBTYPE_ #define is used elsewhere; that needs to be fixed. Fix the wiretap/CMakefile.txt file to scan k12text.l, as that now contains a registration routine. In the process, avoid scanning files that don't implement a file type and won't ever have a registration routine. Add a Lua routine to fetch the total number of file types; we use that in some code to construct the wtap_filetypes table, which we need to do in order to continue to have all the values that used to come from the WTAP_FILE_TYPE_SUBTYPE_ types. While we're at it, add modelines to a file that lacked them.
2021-02-06wiretap: add a mechanism for built-in modules to have a register routine.Guy Harris1-75/+92
Currently, only pcapng has one, and it does nothing, but this mechanism will be used more in the future. Update comments in epan/dissectors/CMakeLists.txt and ui/taps.h while we're at it.
2020-11-30wiretap: Convert ascend.y to Lemon.Gerald Combs1-5/+1
Convert wiretap/ascend.y.in from Bison/YACC to Lemon and rename it to wiretap/ascend_parser.lemon. Tighten up some of our scanning and parsing. Make the indentation in it and related files consistent. Aside from the recent IPv4 fragment offset changes, this produces identical output to the 3.4 branch for the Ascend trace files I have here. Remove the comment about supporting other commands. Another timeline might have an Ascend that successfully pivoted to DSL or 15625B+1D gigabit ISDN, but this one has neither. This was our last/only Bison/YACC file, so remove Bison/YACC as a development and packaging dependency and remove references to it from the documentation.
2020-09-05Tools: Clean up checkAPI and add ui/qt.Gerald Combs1-1/+0
Remove the --check-addtext and --build flags. They were used for checkAddTextCalls, which was removed in e2735ecfdd. Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp. Rename "index"es in packet-usb-hid.c.
2020-01-14wiretap: Add MP4 readerJakub Adam1-0/+1
Allows opening MP4 (ISO/IEC 14496-12) media files in Wireshark and viewing their structure. Change-Id: Ie20b8b89dc69bb52d6faa890e547d90317adecf6 Reviewed-on: https://code.wireshark.org/review/35804 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-08-03wiretap: Add support for Busmaster log file formatMaksim Salau1-0/+4
Only CAN protocol is supported. Extra information available in J1939 entries is ignored since the J1939 wireshark dissector works with raw CAN frames and makes no use of this extra information. The log format may also encapsulate LIN messages which are not supported by wireshark and thus are ignored. The only limitation is that relative timestamp format is not supported. If a file defines relative format of timestamps, packets are extracted, but timestamps are omitted, since random access deems impossible without reparsing the whole file up to the packet of interest. In order to support relative timestamps we need to parse the whole file at once on open and either dump into a temporary PCAP file or keep messages in a private list and provide access to them on read()/seek_read(). The change also creates a separate header for CAN frame structure definitions which are used by several file readers (candump and busmaster for now). Bug: 15939 Change-Id: I87c5555e4e5e1b142b9984b24544b2591d494fbc Reviewed-on: https://code.wireshark.org/review/34083 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-21Remove ABI compliance checker code.João Valverde1-14/+0
It's broken, unmaintained, poorly implemented and obsoleted by saner debug-info methods. Note: To do the compliance check properly would require much more extensive work to clearly define public and private interfaces (without manual bookeeping of files or symbols either, of course, because who would want that...). Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a Reviewed-on: https://code.wireshark.org/review/33928 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2019-07-11wiretap: Add support of candump logsMaksim Salau1-0/+6
The change adds ability to import text logs produced by the candump tool. E.g.: candump -L can0 -or- candump -l can0 The whole file is read and converted into a temporary PCAPNG file with Exported PDU packets containing SocketCAN frames. Bug: 15889 Change-Id: I5ad93dca96d6e955a4b21cf624f0553e60f060f6 Reviewed-on: https://code.wireshark.org/review/33800 Petri-Dish: Jim Young <jim.young.ws@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-08wiretap: Add a phone log reader.Anders Broman1-0/+1
Change-Id: I0b290df4783616f1eb15e6ad35fbd6d2b4c3dbdd Reviewed-on: https://code.wireshark.org/review/33865 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04iseries: ensure the buffer is null terminated.Dario Lombardo1-1/+1
Check buflen to prevent wrong scanf call as well. Bug: 15614 Change-Id: I58a2855d8b1beda067bf9b2d724229ab20249228 Reviewed-on: https://code.wireshark.org/review/32573 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-02-02CMake: Fix DOCDIR on UnixJoão Valverde1-1/+1
User guides are installed to doc/Wireshark. Use doc/wireshark instead. Remove leftover variable CPACK_PACKAGE_NAME. Change-Id: I9a1d6bdc7d8f0b48c61e43679285d5ba83904a63 Reviewed-on: https://code.wireshark.org/review/31851 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2019-01-22CMake: Set a direct rpath for librariesJoão Valverde1-0/+1
Instead of using "$ORIGIN/../lib" just use "$ORIGIN". Also be explicit in configuring the relative RPATH. We don't want to assume a default relative path, in case more targets are addded, out of caution. Change-Id: I3b7f5e8de7be8bb30aca3b433212113d876c4163 Reviewed-on: https://code.wireshark.org/review/31647 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-20CMake: Replace PACKAGELIST magicJoão Valverde1-3/+8
This is more explicit and easier to read with slightly better locality while using less code. Also less awkward when the package doesn't fit the narrow package list expectations. The ws_find_package() macro doesn't include all the status messages. The choice was to rely on standard find_package() and feature_summary() output and be less verbose. Avoid polluting the CLI build interface. Per target include paths and macro definitions are preferred. Because this patch intentionally removes the global CMAKE_*_FLAGS and include_directories() usage in favor of target properties, some untested build configurations may inadvertently break because of missing ${PACKAGE}_INCLUDE_DIRS or ${PACKAGE}_DEFINITIONS. This required a manual review of dependencies that might have been incomplete. ${PACKAGE_VAR}_LINK_FLAGS seems to be unused. Changing the CMake Qt code to use more modern CMake component syntax is left as future work. Change-Id: I3ed75252189a6e05a23ed6e619088f519cd7ed78 Reviewed-on: https://code.wireshark.org/review/31496 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-12wiretap: remove dependency on version_infoPeter Wu1-1/+0
Avoid including the precise version string in the pcapng file that is created for 3GPP TS 32.423 formats. This avoids unnecessarily relinking of applications depending on wiretap. Change-Id: Ida1f3c0c998d811cbf85734bd83438bcbfc39cf4 Reviewed-on: https://code.wireshark.org/review/31513 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-12CMake: use object libraries to avoid redundant buildsPeter Wu1-3/+1
Some source files are duplicated via add_executable. Assuming that these are not affected by target-specific preprocessor macros, they can be built only once and shared among executables. In one configuration, this reduces the number of object files by 55 (cli_main.c and version_info.c alone were built 15 times each). Removes the version dependency from each target since the 'version_info' target can now declare this dependency. Remove CLEAN_C_FILES from extcap since it is not used to set -Werror. Due to removing some files from wireshark_FILES (and others), these are no longer part of checkAPIs though. Hopefully that is acceptable. Change-Id: I0a3f1ffb950e70a6176c96d867f694fbc6476f58 Reviewed-on: https://code.wireshark.org/review/31509 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-12-20CMake: Don't bundle our libraries at compile time.Gerald Combs1-13/+0
Setting LIBRARY_OUTPUT_DIRECTORY to Wireshark.app/Contents/Frameworks for each of our libraries ends up installing a fully versioned .dylib along with soversion and unversioned symlinks, which is more than we want and which wastes disk space when osx-app.sh dsymifies our libraries. Leave LIBRARY_OUTPUT_DIRECTORY unset and depend on osx-app.sh to copy our libraries into place. Bug: 15361 Change-Id: If0fbaa796b4be806e2aa13887e511a330fe55df5 Reviewed-on: https://code.wireshark.org/review/31139 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-29CMake: Fix some transitive link dependenciesJoão Valverde1-8/+7
libwireshark and libwiretap have their INTERFACE link dependencies changed to the required set. libwsutil keeps a default public visibility. Further work may show some unneeded link requirements. The executable dependencies are adjusted accordingly. Change-Id: I3a534f72403819cac136ae47a3d80acee76e0fb3 Reviewed-on: https://code.wireshark.org/review/30815 Reviewed-by: João Valverde <j@v6e.pt>
2018-11-26CMake: Fix runtime destination for our librariesJoão Valverde1-1/+1
Ping-Bug: 15301 Change-Id: I7d461c696ce096b7687f71277a33295eb43ff8fc Reviewed-on: https://code.wireshark.org/review/30792 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-11-24Install development headers on all platformsJoão Valverde1-5/+3
Install headers to support plugins development on Windows. Change-Id: I3161bd2f730edf62ab44fee6ce4fedbb9aee0d31 Reviewed-on: https://code.wireshark.org/review/30776 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-11-20wiretap: add read/write support for Decryption Secrets Block (DSB)Peter Wu1-0/+1
Support reading and writing pcapng files with DSBs. A DSB may occur multiple times but should appear before packets that need those decryption secrets (so it cannot be moved to the end like NRB). The TLS dissector will be updated in the future to make use of these secrets. pcapng spec update: https://github.com/pcapng/pcapng/pull/54 As DSBs may be interleaved with packets, do not even try to read it in pcapng_open (as is done for IDBs). Instead process them during the sequential read, appending them to the 'wtap::dsbs' array. Writing is more complicated, secrets may initially not be available when 'wtap_dumper' is created. As they may become available in 'wtap::dsbs' as more packets are read, allow 'wtap_dumper::dsbs_growing' to reference this array. This saves every user from checking/dumping DSBs. If the wtap user needs to insert extra DSBs (while preserving existing DSBs), they can set the 'wtap_dumper::dsbs_initial' field. The test file was creating using a patched editcap (future patch) and combined using mergecap (which required a change to preserve the DSBs). Change-Id: I74e4ee3171bd852a89ea0f6fbae9e0f65ed6eda9 Ping-Bug: 15252 Reviewed-on: https://code.wireshark.org/review/30692 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-19Try to discourage the use of APIs via counting.Gerald Combs1-3/+3
Add the ability to specify maximum function counts for each group to checkAPIs. Add maximum counts for the "termoutput" and "abort" groups where needed. Show summaries in various checkAPI targets. Switch uses of ws_g_warning back to plain g_warning. Change-Id: I5cbddc8c671729e424eed8551f69116d16491976 Reviewed-on: https://code.wireshark.org/review/29721 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-08-31Add a systemd Journal Export Format parser and dissector.Gerald Combs1-0/+1
Add a file parser and dissector that can handle the output of `journalctl -o export`. From here we can add a systemd journal extcap and possibly support for the JSON and binary formats. Change-Id: I01576959b2c347ce7ac9aa57cdb5c119c81d61e9 Reviewed-on: https://code.wireshark.org/review/29311 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-25CMake: Modernize config-file package supportJoão Valverde1-0/+1
A CMake config-file package provides support for downstreams using CMake and Wireshark libraries to easily configure the libwireshark dependency with: find_package(Wireshark CONFIG [REQUIRED]) target_link_libraries(foo epan) The FindWireshark.cmake file is no longer needed. See cmake-package(7) for more details on CMake's package system. Change-Id: Ie8af1d44417a99dd08d37959f7b2ffca88572ec2 Reviewed-on: https://code.wireshark.org/review/29208 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-08-01RFC 7468 is PEM-inspired, but it's not PEM.Guy Harris1-1/+1
Do some renaming. Change-Id: If8fa85370014f9618df38d97048dd1c52a4c389f Reviewed-on: https://code.wireshark.org/review/28918 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-21Fix build paths for cmake's Xcode project generator on macOS.David Kreitschmann1-3/+10
Multi-configuration generators (such as Xcode or VS) append the current build configuration to most paths (eg. Debug/Release). Currently this results in inconsistent paths for the application bundle and the included command line tools. This commit sets the correct path information for multi-configuration generators for macOS application bundles. The standard Makefile behaviour is untouched. One Windows specific configuration was changed, as it was conflicting with these changes. This needs to be checked before merging. Additionally the wrapper scripts are omitted for Xcode, as the path to the binaries depends on the configuration chosen in Xcode. Therefore it is not viable to create these scripts in the cmake run. Bug: 11816 Change-Id: Ib43d82eb04600a0e2f2b020afb44b579ffc7a7c9 Reviewed-on: https://code.wireshark.org/review/28291 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>