aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
AgeCommit message (Collapse)AuthorFilesLines
2019-08-05Qt: Check filename before importRoland Knall2-0/+11
Before the unzipped files are being copied from the temp directory, they are checked against the stored list of profile names, to ensure, that only allowed files are being imported. Also ensures, that no empty directory exists for the skipped one Bug: 15969 Change-Id: I6ae8c9fb5f63d089d42fc0ef18dbe84baec515a2 Reviewed-on: https://code.wireshark.org/review/34184 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-02wsutil: link with -lm.Dario Lombardo1-0/+1
Required because json_dumper.c uses isfinite, fixes FreeBSD builds. Error: /usr/lib/libpcap.so && : /usr/local/bin/ld: run/libwsutil.so.0.0.0: undefined reference to `__isfinite' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Change-Id: I6376250fa2037eab0bb2ad63382b8f3bb3560215 Reviewed-on: https://code.wireshark.org/review/34138 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-30Qt: Change from User/System to Personal/Global profile typesStig Bjørlykke2-34/+34
Change the Profile types from User/System to Personal/Global in UI to match the terminology used in About Wireshark -> Folders. This reverts commit 40af4aa93e469d37bd8e712228ecccb07407c3c6. This reverts commit f0cde7ca34a4975370e1b9ded2fee7df266343f6. This reverts commit c37cabe900b9b11e12c8626ca46adc080e465fdb. Change-Id: I9012db6385707754e26a2dadb57f6003f8112f9b Reviewed-on: https://code.wireshark.org/review/34134 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-07-29Rename variable to eliminate shadow variable warning.Guy Harris2-4/+4
get_profile_dir() already calls the corresponding variable is_system; use that in profile_exists() as well. Change-Id: Icce42b2074d64c46598cc7561b3c5468da8ede90 Reviewed-on: https://code.wireshark.org/review/34131 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-29USBLL: Verify Token/Split packets CRC-5Tomasz Moń3-0/+110
Ping-Bug: 15908 Change-Id: I25aaf772d3d0af2f459a1ad78d8253344ed13f05 Reviewed-on: https://code.wireshark.org/review/34025 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-07-29Qt: Rename profile global to systemStig Bjørlykke2-34/+34
It's called system profiles in UI so update function names and variables to use the same name. This will increase code readability. Change-Id: I048e9ea85bd6ebab4a2c3ed1c685487ac8f7e40e Reviewed-on: https://code.wireshark.org/review/34116 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-28HTTPS In Even More Places, update some links.Guy Harris1-1/+1
Fall back on the Wayback Machine for some links. Change-Id: I6a44a2caaeb4fa521c2f08196e7c36069e3bb842 Reviewed-on: https://code.wireshark.org/review/34103 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27HTTPS In Still More Places, update more URLs.Guy Harris4-5/+5
Microsoft reshuffled their documentation - almost all of it moved from msdn.microsoft.com to docs.microsoft.com. Some blogs moved to devblogs.microsoft.com; the comments *didn't* move, so in one case we go to the Wayback Machine - the link isn't dead, but it formats horribly, at least on my browser, but the archived version formats OK. Use the Wayback Machine for some URLs, and update others. Update the sections for MS-ADTS. Point to the HTML versions of some RFCs and I-Ds. Change-Id: I344b20f880de63f1ae2a4e3f9ff98af78a7fe139 Reviewed-on: https://code.wireshark.org/review/34101 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26HTTPS (almost) everywhere.Guy Harris45-45/+45
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-25USBLL: Verify DATA packets CRC-16Tomasz Moń2-0/+62
Ping-Bug: 15908 Change-Id: Idda280545665184aca40c694ea6d639c9317307a Reviewed-on: https://code.wireshark.org/review/34016 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-21Remove ABI compliance checker code.João Valverde2-22/+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-20copyright_info: convert GPL-2.0 URL to HTTPPeter Wu1-2/+2
Use a shorter URL and use HTTPS. Change-Id: I9cfcd52775c95457e81694272dbe795d4eae4e58 Reviewed-on: https://code.wireshark.org/review/34026 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-16Editcap: Allow floating point split intervals.Gerald Combs1-0/+3
Update the `-i` option to allow floating point values as suggested at https://stackoverflow.com/questions/57004719/split-wireshark-to-miliseconds Change-Id: I24028d409bc441ed3b45ac2179f7c42b2bc424bc Reviewed-on: https://code.wireshark.org/review/33938 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-30wsutil: fix build failure of Debian packages on Ubuntu 16.04Peter Wu2-6/+22
The libwsutil symbols file contains two public symbols which depend on Libgcrypt 1.7.0. As the version included with Ubuntu 16.04 is too old, building a Debian package fails due to missing two curve25519 symbols. Add stub implementations as workaround. Change-Id: Ie39e784e9e631750b5269d038772496565b2dce8 Reviewed-on: https://code.wireshark.org/review/33780 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-16NGAP: fix dissection of N2 Information ContentPascal Quantin2-0/+90
Change-Id: I8aaf578c8eb71533313cf2cfd42871eae0c0ff57 Reviewed-on: https://code.wireshark.org/review/33603 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-06-11Kill libwscodecs plugin library, just use pluginsJoão Valverde3-0/+254
Change-Id: I085d04840acb53b0b7681787429a2b4e10547cd5 Reviewed-on: https://code.wireshark.org/review/33068 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-24wsutil+macOS: Use realpath() to resolve our program path.Gerald Combs1-1/+16
Use realpath() to resolve our program file directory on macOS. This lets us create symlinks to the program files in our application bundle without affecting our plugin and other paths. Change-Id: If77cbd7da56e01f2cd602334d361c8aa52afeae0 Reviewed-on: https://code.wireshark.org/review/33151 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-05-03CMake: Remove wsutil pcap dependencyJoão Valverde2-36/+0
Change-Id: Ic5a3653cb8bcc33e0be108c8b201567e7090f9f5 Reviewed-on: https://code.wireshark.org/review/33043 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-05-03CMake: Add libpcap imported library targetJoão Valverde1-2/+1
Change-Id: I5326b87784817fb353329e2d686fe0515c32f6cb Reviewed-on: https://code.wireshark.org/review/33038 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-05-02Have the multiple-include guards cover everything.Guy Harris1-2/+2
Change-Id: Ibfb7b014fbffff64d1c4f179c452b4499c683481 Reviewed-on: https://code.wireshark.org/review/33050 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-02Move the Winsock initialization and cleanup to wsutil routines.Guy Harris3-0/+72
Those routines exist on both Windows and UN*X, but they don't do anything on UN*X (they could if it were ever necessary). That eliminates some #ifdefs, and also means that the gory details of initializing Winsock, including the Winsock version being requested, are buried in one routine. The initialization routine returns NULL on success and a pointer to a g_malloc()ated error message on failure; report the error to the user, along with a "report this to the Wireshark developers" suggestion. That means including wsutil/socket.h, which obviates the need to include some headers for socket APIs, as it includes them for you. Change-Id: I9327bbf25effbb441e4217edc5354a4d5ab07186 Reviewed-on: https://code.wireshark.org/review/33045 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-01Windows: Modernize our WSAStartup usage.Gerald Combs1-1/+1
Make sure we link each application that calls WSAStartup with ws2_32.lib. Pass version 2.2 to WSAStartup. Wikipedia says it was introduced in 1996, so we should be OK. Ping-Bug: 15711 Change-Id: I431839e930e7c646669af7373789640b5180ec28 Reviewed-on: https://code.wireshark.org/review/33033 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Tomasz Moń <desowin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-30wsutil: Fix 30 seconds freeze if process fails to startTomasz Moń1-0/+1
In ws_pipe_wait_for_pipe() on Windows, the WaitForMultipleObjects() waits on the pending pipe connection events and process handle. If the process handle is signalled, then it means that the process did exit without connecting to the pipes. The WaitForMultipleObjects() was not waiting on the process handle and thus if the process did fail without connecting to pipes the Wireshark gui was frozen for 30 seconds. This change fixes the freeze by increasing the number of handles, so WaitForMultipleObjects() is aware of the process handle. Change-Id: Id13824a60baf4be7795cbe1d5ed1c7932edbff45 Reviewed-on: https://code.wireshark.org/review/33028 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-26file-util: fix possible null reference from code analysisGraham Bloice1-19/+21
Change-Id: I9b0c6b118b5f866abc969a437bbd9b9a28271bf0 Reviewed-on: https://code.wireshark.org/review/32841 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-25win32-utils: Do not share job between Wireshark instancesTomasz Moń1-1/+1
Creating Job Object named "Local\Wireshark child process cleanup" results in the job being shared between all Wireshark instances run within a single session. When two or more Wireshark instances were running, debug message appeared: "Could not assign child cleanup process: Access is denied. (5)" As the child process was not assigned to a job, it was possible that the child process was still active even after Wireshark did terminate. This fixes the issue by creating unnamed job object which is not shared. Change-Id: I59adc2aacff0151802163f155d68cbc8022c1479 Reviewed-on: https://code.wireshark.org/review/32985 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-23ws_pipe: fix memory leaks in spawn arguments handlingPeter Wu2-81/+102
On Windows, ws_pipe_spawn_sync always leaks 'winargs', and leaks 'argv' on some error paths. Fix these and refactor the common argument parsing functionality to reduce duplication of functionality. Change-Id: I8fa5ca45aec20b53f6fa243b0dd07241a345f7ab Reviewed-on: https://code.wireshark.org/review/32932 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Tomasz Moń <desowin@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22ws_pipe: fix return value of ws_pipe_spawn_async on error pathPeter Wu1-3/+3
The function returns a GPid, not a gboolean. Callers (mmdbresolv and extcap) only assume WS_INVALID_PID to be invalid (as documented). Change-Id: I40b491272a451f569864fa3259009d6d3fcce772 Fixes: v2.5.1rc0-413-g1a0987904f ("Generalize our process spawning code.") Reviewed-on: https://code.wireshark.org/review/32933 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Tomasz Moń <desowin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-21wsutil: Refactor WIN32 ws_pipe_wait_for_pipe()Tomasz Moń1-54/+75
The ws_pipe_wait_for_pipe() implementation had multiple issues: * Use auto-reset events with ConnectNamedPipe (should be manual-reset) * Leaking event handles * Not checking return value from CreateEvent() * Waiting on closed handles This change fixes all the above mentioned issues. Bug: 15696 Change-Id: Ia0c389a902655f85eccb0c59288b4a7d49da48c9 Reviewed-on: https://code.wireshark.org/review/32896 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Tomasz Moń <desowin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-19wsutil: use environment variable WIRESHARK_EXTCAP_DIR when possiblePeter Wu1-40/+31
The WIRESHARK_EXTCAP_DIR environment variable is currently only used on Windows, and on UN*X when not running from the build directory. In order to avoid copying the sampleif.py test utility to the program directory, let's prioritize the environment variable over the build directory. Update the outdated comments while at it, the version directory has been removed long time ago. (The comments are based on the one for plugins.) This also fixes the test suite on macOS where the extcap subdirectory is located in the appbundle directory and not the build directory. Change-Id: I329bb233b1dd0b9c1422c2ebd60a6455347e1d62 Reviewed-on: https://code.wireshark.org/review/32890 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-18wsutil: Warn on empty argumentsTomasz Moń1-2/+8
Callers should not include empty strings in arguments list. Log warning message instead of silently dropping remaining arguments. Change-Id: Ia68c7b90cec860e032f81a4008aa005b07ebcfd5 Ping-Bug: 15586 Reviewed-on: https://code.wireshark.org/review/32849 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-15wsutil: Read stderr and stdout data asynchronouslyTomasz Moń1-40/+178
This significantly reduces the initialization time when system is using small pipe buffers. No time is lost on periodic process status checks as WaitForMultipleObjects() returns when the stdout/stderr data was read and/or when process finishes. Bug: 14657 Change-Id: I61fabf986577db7102a3136df83d2d92c7156727 Reviewed-on: https://code.wireshark.org/review/32773 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Tomasz Moń <desowin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-10wsutil: Fix pipe handle leaks on WindowsTomasz Moń1-0/+11
If the PATHEXT environment variable contains .py and extcap is enabled, then Wireshark did leak 2 pipes for every .py file present in the extcap directory (regardless if there was .bat wrapper for it or not). Bug: 15689 Change-Id: Iae402c0075ee8155a7205a59711bbae734da7e9e Reviewed-on: https://code.wireshark.org/review/32812 Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-10ieee80211: Fix some coverity scan issuesMikael Kanstrup1-2/+2
Fix coverity scan issues: - Insecure data handling (CID 1444231) - Unchecked return value (CID 1444234) Introduced by: 9cf77ec5e1 ieee80211: Support decrypting WPA3-Personal / SAE captures Change-Id: I8eb581750d2b0519f03f92873433f79409b0386b Reviewed-on: https://code.wireshark.org/review/32546 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-03-24Add routines to return "Please report this as a bug" message strings.Guy Harris3-0/+70
(Routines, so that if we internationalize strings not in the Qt code, this can return the appropriately translated version.) Change-Id: I1c169d79acde2f0545af7af2a737883d58f52509 Reviewed-on: https://code.wireshark.org/review/32549 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-23wsgcrypt: fix wrong double assignment (CID: 1444233).Dario Lombardo1-2/+1
Change-Id: Iaff0f7c6cc24286dcf48330088b1ba9a3f5dd18e Reviewed-on: https://code.wireshark.org/review/32541 Petri-Dish: Dario Lombardo <lomato@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-22json_dumper: flush dumper before printing an error.Dario Lombardo1-0/+1
This helps the developer in the debug phases. Change-Id: I85558334b5d618219a48a6c00129cd36a6ab0b10 Reviewed-on: https://code.wireshark.org/review/32531 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-03-22wsgcrypt: fix build with older gcrypts.Jeff Morriss1-2/+6
Fixes 9cf77ec5e12e24f1a8c6eb9fa14c015b830f066b. Change-Id: Ie90ce25995707d88995c243cb7b2d5013c3a4c28 Reviewed-on: https://code.wireshark.org/review/32522 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2019-03-21ieee80211: Support decrypting WPA3-Personal / SAE capturesMikael Kanstrup2-0/+25
Add support for decrypting IEEE 802.11 WPA3-Personal / SAE traffic. SAE uses AES encryption but a different key derivation function (KDF) making Wireshark fail to decrypt such captures. Also both KDF and decryption method is determined based only on EAPOL key description version. This is not enough to figure out that SAE is being used. Implement the alternative KDF needed to derive valid PTK. Also implement a function to parse pairwise + group cipher suites and auth key management type from RSNE tag. Using this new function together with a number of new cipher and AKM lookup functions correct KDF for SAE can be selected. Bug: 15621 Change-Id: I8f6c917af1c9642c276a244943dd35f850ee3757 Reviewed-on: https://code.wireshark.org/review/32485 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-10Dumpcap: Set a bigger IO buffer (64KiB).Anders Broman1-0/+3
Set a bigger IO buffer to avoid syscall overhead. See https://github.com/the-tcpdump-group/libpcap/issues/792 Change-Id: If370da5ab2b70a9d0c925dd7c4c5c135c675c3f6 Reviewed-on: https://code.wireshark.org/review/31326 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-13macOS: Fix our plugin path.Gerald Combs1-2/+2
In CMake we only used PROJECT_RELEASE_VERSION to construct our plugin path, so rename it to PLUGIN_PATH_ID. Use a dash to separate version numbers on macOS in order to allow code signing and a period elsewhere. In the C code we only used VERSION_RELEASE to construct our plugin path, so rename it to PLUGIN_PATH_ID. Change-Id: I02abc591d7857269e8d47b414b61df4b28a25f2d Reviewed-on: https://code.wireshark.org/review/32013 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-12json_dumper: escape forward slash in some stringsPeter Wu1-0/+3
If the JSON output is written in a script tag for a HTML page, be sure to not to break it. Change-Id: I1b9ba6a39faf266e8a7bf9befa2899978beb130c Reviewed-on: https://code.wireshark.org/review/31953 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11json_dumper: add json_dumper_value_doublePeter Wu2-1/+24
Add locale-independent version that replaces json_dumper_value_anyf for floating-point numbers. NaN and -/+Infinity are mapped to null. Change-Id: I8e7856de480b7bcafe77ddd015239e1257768ced Reviewed-on: https://code.wireshark.org/review/31948 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <jbwzawadzki@gmail.com> Reviewed-by: Anders Broman <a.broman58@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-02-01Fix comment.Guy Harris1-2/+1
Change-Id: I6047e0167f861214ff735b26d1965081b2b29703 Reviewed-on: https://code.wireshark.org/review/31855 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-01Have win32strerror() return interned strings.Guy Harris2-20/+19
That's what g_strerror() does, and it means that the caller doesn't need to free the string (it's kept around, and if another call to win32strerror() generates the same string, the interned string is returned). Change-Id: I564bb700fabe2629131fb1c6468494dd5f5fc9e3 Reviewed-on: https://code.wireshark.org/review/31854 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-01Have win32strerror() return a g_malloc()ated UTF-8 error message.Guy Harris2-25/+60
Use FormatMessageW() to get a UTF-16-encoded Unicode error string, rather than an error string in the local code page, and then convert it from UTF-16 to UTF-8. Make it dynamically-allocated, so it's big enough and so that we are thread-safe. Make the callers free the result. Change-Id: I217aec5a644fa0176a829f181eb05561cb9d10f4 Reviewed-on: https://code.wireshark.org/review/31846 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-20json_dumper: increase JSON_DUMPER_MAX_DEPTH to 1100.Dario Lombardo1-1/+1
The new value has been chosen to make room for sharkd packet output as: proto.c:MAX_TREE_LEVELS * 2 + 10% of additional sharkd overhead. A new regression test for sharkd has been added that requires more than 15 levels. Change-Id: Ie54955c79c50c60b95c99b1a3c472888fc4842ac Reviewed-on: https://code.wireshark.org/review/31624 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-20CMake: Replace PACKAGELIST magicJoão Valverde1-0/+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-08ws_pipe(.h): fix issue on doxygen documentationAlexis La Goutte1-1/+1
parameter 'argv' not found in the function declaration [-Wdocumentation] Change-Id: I68262a23e3a6f4b50d8b5e666b92f055feeaf74f Reviewed-on: https://code.wireshark.org/review/31424 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>