Many printf()s generates only key, value is generated by
json_puts_string() or json_print_base64().
Add helper functions sharkd_json_value_string, sharkd_json_value_base64
to generate key with a string, or base64 as a value.
It lower number of printf() from 156 to 105 (32% reduction).
Change-Id: I22901d9759534a4fab7bcdefd66242fd6c5b20cc
Reviewed-on: https://code.wireshark.org/review/29821
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
In the about dialog, create directories within the folders tab
if the user wants them to open and they do not exist yet
Change-Id: Ia95692dabef92392714c329c868abc78e3bcec6e
Reviewed-on: https://code.wireshark.org/review/29782
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Most of sharkd printf()'s are used to output formatted value with given key.
Add two formatting-function helpers: sharkd_json_value_anyf and sharkd_json_value_stringf.
Conversion printf to these function lower number of printf() from 300 to 156 (48% reduction).
Change-Id: Ied538cc5b84d48d942e2140ff6b93969579d6132
Reviewed-on: https://code.wireshark.org/review/29816
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
A funny thing happened on the way to the Frame Relay Forum.
Change-Id: Ia58e55645ab6ee16fb077cde4496c25352c7e08d
Reviewed-on: https://code.wireshark.org/review/29819
Reviewed-by: Guy Harris <guy@alum.mit.edu>
A funny thing happened on the way to the {ATM, MPLS} Forum.
Change-Id: I8159f9191737febe3e5c4618bbb72ecb4bfc300b
Reviewed-on: https://code.wireshark.org/review/29818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Dissect the ESNI TLS 1.3 extension in CH and EE.
Bug: 14984
Change-Id: I95bb5ef0313aefdab7c09dbeb60556d9574c2a00
Reviewed-on: https://code.wireshark.org/review/29817
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
packet-mpeg-pmt.h is included only by DVB-CI. All it contains is
the definition of a value string for stream types in the ca_pmt.
Move the definition into packet-dvbci.c and remove the include file.
Change-Id: I7d63e49804c936284f6a9c5218e0fd9b4fa469a6
Reviewed-on: https://code.wireshark.org/review/29813
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This reverts commit 5dd0c8daa5.
Reason for revert: As Guy pointed out, Oracle ships a recent version.
Change-Id: I9689dfd0656d95f7ae57ae86c2bea7d09afddc70
Reviewed-on: https://code.wireshark.org/review/29815
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Installing and enabling ccache makes testing RPM builds (which always do a
complete build) much less painful.
Change-Id: Ie9ab1794614701cdbe261089f81398c2b7d1f027
Reviewed-on: https://code.wireshark.org/review/29812
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Set the length of the Network Monitor Event and ETW Ndis protocols to
that of their respective headers instead of the remaining TVB length.
Add packet-netmon.c and packet-messageanalyzer.c to .editorconfig.
Change-Id: I50c23c63a74190cebf760fa6b374cc1b78c0191e
Reviewed-on: https://code.wireshark.org/review/29810
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Lot of printf()s in sharkd are caused from:
- opening array with a key, like: printf(",\"eo\":[");
- opening object with comma separator, like: printf("%s{", i ? "," : "");
Add argument to sharkd_json_{array,object}_open() to specify if there need to be a separator,
and key argument to sharkd_json_array_open().
Replace printf() with these functions.
This change lower number of printf() from 365 to 300 (17% reduction).
Change-Id: Id84259ae0fed47d9d7d84709e554a03c97d6ed98
Reviewed-on: https://code.wireshark.org/review/29811
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Move the maxminddb dependencies out of if(qt) and above the RPM's
description; this makes them actually work and takes the RPM code for
those dependencies out of the Qt RPM's Description (where they clearly
weren't doing any good).
Change-Id: I01705f8f5f6435571cf521b68f8450730ddaa383
Reviewed-on: https://code.wireshark.org/review/29808
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Remove leading spaces early such that the regex in find_remove_ei_defs
can avoid (falsely) matching every line (saves 97% for packet-rrc.c).
Copy the improved remove_if0_code from checkAPIs.pl (saves 600ms).
packet-ieee80211.c used to spend 240ms and now completes in 165ms.
packet-rrc.c used to spend 53.7s and now completes in 0.85s.
Change-Id: I6469f7c11839fab2f33c49d3c839473f1d4902d2
Reviewed-on: https://code.wireshark.org/review/29795
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Lower number of printf()s by adding some function wrappers.
Replace:
printf("]"); with sharkd_json_array_close();
printf("}"); with sharkd_json_object_close();
printf("\["); with sharkd_json_array_open();
printf("{"); with sharkd_json_object_open();
These replaces lower number of printf() from 434 to 365 (15% reduction).
Change-Id: I44f2244a7c1f8992a38c56c64759ed039aafaedc
Reviewed-on: https://code.wireshark.org/review/29809
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Don't require the RPM to include maxminddb if we couldn't find it. Treat it
like the other optional packages: enable it in the RPM iff we found it.
IOW if cmake ran and will build Wireshark [without maxminddb] you'll also be
able to build an RPM [without maxminddb].
Change-Id: I012b75ae44e9289275b68db2eb804fc45bb0d330
Reviewed-on: https://code.wireshark.org/review/29807
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
The recently introduced %F in custom window title is empty when no
capture file is loaded. Check for this to avoid having a trailing
UTF8_EM_DASH or "[]" in the title.
Change-Id: I5fb0832a2898501cb128bd52b22a4dc5f3ad4f4e
Reviewed-on: https://code.wireshark.org/review/29800
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
commit c5efe46d43c107b82fac4c758c81ad707c892596
Author: Yury Gargay <yury.gargay@gmail.com>
Date: Thu Jun 22 14:49:43 2017 +0200
Add TP-Trace-Id to Travelping dictionary
May be used to share some OpenTracing id between components.
commit 6926d38d187318b971d26c0aa54b90b89c81e161
Author: 0xAX <kuleshovmail@gmail.com>
Date: Tue Apr 5 20:20:33 2016 +0600
Add new travelping attributes to dictionary
commit c81e3508ba906fe87855dde93a27956d8a0946b9
Author: Andreas Schultz <aschultz@tpip.net>
Date: Thu Feb 19 16:59:18 2015 +0100
add vendor values for Framed-Protocol and Service-Type
commit 333ed048d2dda4342c3af5d9036a0f2c86a3ae30
Author: Andreas Schultz <aschultz@tpip.net>
Date: Thu Feb 5 10:57:15 2015 +0100
fix case of CAPWAP Power attributes in Travelping dictionary
Change-Id: I472dd7b63ebb6e69acd8d1d33ff959771d302771
Reviewed-on: https://code.wireshark.org/review/29626
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Wiretap was originally being writen to be a packet-capture library which
might eventually replace libpcap but that's no longer the case: it's now
meant to be a library for accessing multiple types of files.
As such, don't describe it in the README as a packet-capture-library-to-be;
in fact since it's really internal to Wireshark don't mention it at all.
Don't discuss the fact that ancient (pre-2003) versions of zlib don't work
for Wireshark's purposes.
Change-Id: I2387d0ecc65a66c21dd7db3a38b8fee7d32add7f
Reviewed-on: https://code.wireshark.org/review/29786
Reviewed-by: Anders Broman <a.broman58@gmail.com>
The initial execution time on packet-ieee80211.c was 940ms. Optimize:
- Assume that "static const value_string ... = { ... };" does not have
other preceding stuff (including optional whitespace). This speeds up
check_value_string_arrays and reduces runtime by 440ms to 500ms.
- Rewrite remove_if0_code to avoid invoking a substitution for every
line. This reduces runtime by 130ms to 370ms.
packet-rrc.c used to take 9.4s. The fixes improved it to 3.0s and 2.8s.
Change-Id: Ifc7efa447d64dccba3e211f0741099451b61b95a
Reviewed-on: https://code.wireshark.org/review/29794
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Use short names (and add a missing one for INVALID_MIGRATION), otherwise
columns and lines become too long. Use range_string to prepare for
addition of CRYPTO_ERROR.
Change-Id: I9c2742cdc8010443a456e8cfff2fc9012b1efe7e
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29739
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
For empty filters dfilter_compile() return success but with NULL dfcode.
NULL dfcode cannot be used in dfilter_deprecated_tokens().
Request: {"req":"check","filter":""} was crashing sharkd.
Change-Id: Id677fc84251ab27bf691ec8aaee4c5bdf55e4d6c
Reviewed-on: https://code.wireshark.org/review/29797
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
For E-DCH TYPE 1 frames, the field showed in the tree
was showing 1 bit instead of 3.
Change-Id: Ia28b2a8381f02a0f636ccb47b95b707915b90ff8
Reviewed-on: https://code.wireshark.org/review/29793
Reviewed-by: Anders Broman <a.broman58@gmail.com>
"fix-encoding-args.pl epan/dissectors/packet-ieee80211.c" used to take
over 12 seconds to complete. After this change it is reduced to 400ms.
Profiling with Devel::NYTProf showed two issues:
- find_hf_array_entries (5 seconds): matching leading whitespace
triggers a candidate match against every line. Fix this by removing
whitespace prior to matching.
- fix_encoding_args_by_hf_type (7.5 seconds): executing 2131 different
substitution patterns is slow. Fix this by grouping field names and
execute the substitution only once afterwards (in total 6 calls).
packet-rrc.c is by far the largest file with 215k lines, this used to
take forever (321s) and now completes in 1.3s.
Regression tested by removing "ENC_ASCII" and "ENC_UTF_8" in
dissect_venue_name_info, the expected warnings are still visible.
Change-Id: I071038e8fcb56474ac41223568ce6724258c059d
Reviewed-on: https://code.wireshark.org/review/29789
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
packet-gnutella.h doesn't export any functions and nothing appears to
depend on it. Pull its contents into packet-gnutella.c.
Change-Id: I9bab0bfed87af3ac520fb8d8daa89d3fa3dc6f17
Reviewed-on: https://code.wireshark.org/review/29785
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>
Move the contents of packet-clearcase.h, packet-fcp.h, packet-klm.h,
packet-rquota.h, packet-rwall.h, and packet-spray.h to their respective
.c files. packet-pktc.h didn't contain anything so just remove it.
Change-Id: I019db0cb14bf527c5d73c6d18bee922dd822bc43
Reviewed-on: https://code.wireshark.org/review/29787
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>
Also remove some, extra, commas and fix some other minor issues.
Change-Id: Idfd45bba26ad9d1dc55d2f0ca241fc4c70fabbb6
Reviewed-on: https://code.wireshark.org/review/29784
Reviewed-by: Gerald Combs <gerald@wireshark.org>
According to the current Profinet specification in regard
to the coding of the AM_DeviceIdentification field, the
dissection order of DeviceId and VendorId is in the wrong
order.
Bug: 15140
Change-Id: I9954619a938db382967104de91e2b905677cc171
Reviewed-on: https://code.wireshark.org/review/29780
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
If decryption is not possible due to missing keys, say so rather than a
vague "packet number decryption failed". Ensure that the Info column is
populated for a protected packet even if decryption fails. Show the
remaining unprocessed data as a tree item.
Change-Id: I47294d7af20836976cb619ccab45e2b379a863cb
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29762
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Stop listing Solaris as a supported platform. I'm not sure if you can
compile Wireshark out of the box on it any more and the available binary
packages I can find are ancient.
Change-Id: I89afef01abe05986ce660327731c5504c6622ff7
Reviewed-on: https://code.wireshark.org/review/29764
Reviewed-by: Anders Broman <a.broman58@gmail.com>
We no longer use red.libssh.org, so the file number isn't needed any
more.
Change-Id: I4cc6eb242eac51219742731cfa82a7bfe9fff2c3
Reviewed-on: https://code.wireshark.org/review/29771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Downloading from red.libssh.org got "curl: (51) SSL: no alternative
certificate subject name matches target host name 'red.libssh.org'" on
my Mojave virtual machine.
Change-Id: Iab8016c4dc5200c80bff3c0cdc776bc922f4dd59
Reviewed-on: https://code.wireshark.org/review/29768
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Use HTTP rather than FTP; the FTP server appears no longer to be
available.
Change-Id: I4446cc48818f419a341880da53db8670170794ae
Reviewed-on: https://code.wireshark.org/review/29765
Reviewed-by: Guy Harris <guy@alum.mit.edu>