Commit Graph

73568 Commits

Author SHA1 Message Date
Peter Wu fb9c6905ef wsutil: rename some wsjson functions
Rename wsjson_unescape_json_string to json_decode_string_inplace
(inspired by the g_base64_decode_inplace name). Rename
wsjson_is_valid_json to json_validate (inspired by g_unichar_validate).

Ideally json_parse is inlined with its user (sharkd_session.c), but that
requires exporting the jsmn_init and jsmn_parse functions... Hence the
dependency on jsmn.h remains in wsjson.h.

Change-Id: I7ecfe3565f15516e9115cbd7e025362df2da5416
Reviewed-on: https://code.wireshark.org/review/30731
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:03:26 +00:00
Peter Wu e2a5ad1feb wsutil: fix indentation/modelines in wsjson
The modelines says tabs, but the actual indentation is 8 spaces. Let's
change it to match the standard 4 spaces in the top-level .editorconfig.

Change-Id: I2b26b095f5e4f6f8d5d083d41ceaae98f9284fba
Reviewed-on: https://code.wireshark.org/review/30730
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:02:50 +00:00
Guy Harris ba34545293 Add an API to get a list of compressed-file extensions, and use it.
Move all the compressed-file type stuff to wiretap/file_wrappers.c.

Rename wtap_compressed_file_extension() to
wtap_compression_type_extension() for consistency with the other
compression-type-extension routine names.

Move the declarations of the compression-type-extension routines in the
header file.

wtap_compression_type_extension() now returns NULL for
WTAP_UNCOMPRESSED; there's no need to special-case it.

Get rid of the now-unused wtap_compression_type_supported() and
WTAP_NUM_COMPRESSION_TYPES.

Change-Id: Ib93874079bea669a0c87104513dba0d21390455a
Reviewed-on: https://code.wireshark.org/review/30729
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-20 03:11:10 +00:00
Guy Harris 2f17546932 Fix a comment to reflect reality.
Change-Id: I789b3993dbf07805bed2f8cde70b3ded4b5bc9f9
Reviewed-on: https://code.wireshark.org/review/30727
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-19 22:31:13 +00:00
Guy Harris c055d32d10 Ensure that fixFilenameExtension() is used only when writing a file.
It *should* never happen, but just make sure of that by calling it only
for "open for writing" ("save") dialogs.

Change-Id: I1813f31537c0aa4efdf08c1622db9cb9e7f5ae83
Reviewed-on: https://code.wireshark.org/review/30726
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-19 22:28:43 +00:00
Jaap Keuter 3653e23097 Convert enum increment into int increment
Using an enum type with the increment operator causes the following
error to be emitted by newer compilers:
"increment of enumeration value is invalid in C++ [-Werror=c++-compat]"
Numerical operations seem only allowed when taking their integer value.
Convert the loops involved to use integer and cast back to
wtap_compression_type when needed.

Change-Id: Ic96a6350c7d4db9ba2ba99df8b922649924c0e7a
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30722
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-19 21:31:16 +00:00
Gerald Combs 8788c990b5 rpm-setup.sh: We no longer use FOP or AsciiDoc.
Change-Id: I3b6e200be149d12a42604528a695aae98d310b9c
Reviewed-on: https://code.wireshark.org/review/30719
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-19 20:54:15 +00:00
Robert Cragie 214f196414 Fix MLE security suite display
Security suite 0xff (no security) is displayed incorrectly as 0x7f.

Bug: 15288
Change-Id: Ic899ca724a4a958520e34d522c211e5c625d43ce
Reviewed-on: https://code.wireshark.org/review/30713
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-19 17:11:19 +00:00
Anders Broman c2d625a542 ain:Prettify Carrier and AMAslpID parameters.
Bug: 15285
Change-Id: I34fc67e2faa4c4e53834b257796b3f256239f27a
Reviewed-on: https://code.wireshark.org/review/30711
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-19 13:28:32 +00:00
Anders Broman bc12cdb1a8 lnpdqp: Get rid of warnings.
Change-Id: Ib38960def1bdefde64b82ba0848c5e13a51189c7
Reviewed-on: https://code.wireshark.org/review/30712
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-19 13:11:13 +00:00
Joerg Mayer 94ae9324d3 wtap.h: Fix documentation warnings
Change-Id: Ib0b5ae47047d3f574bd35cab045cefb8fcb8778d
Reviewed-on: https://code.wireshark.org/review/30710
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-19 10:23:31 +00:00
Jaap Keuter 9aa29213f0 text2pcap: consolidate ethernet header protocol determination
With the addition of the IPv6 dummy header the logic to set the
correct ethernet protocol has become scattered across the code
and also poured into the actual packet writing code.
Once command line parsing is completed a consistent set of frame
generating parameters should be established.

This change consolidates the ethernet header protocol
determination to one point, with the added benefit of resolving
a possible duplicate IPv4 / IPv6 paramter setting in the same
manner as is done for other conflicting parameters.

Change-Id: I2c0d3ee8ad5a28b216a374dad807406113200fa2
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30691
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-19 06:18:21 +00:00
Guy Harris bf9286e554 Add an API to get the file extension for a compression type, and use it.
Add wtap_compressed_file_extension(), which returns NULL for
WTAP_UNCOMPRESSED and the appropriate file extension for other
compression types.

Add wtap_compression_type_supported(), which returns TRUE for
WTAP_UNCOMPRESSED and all supported compression types and FALSE
otherwise.  ("Supported" means "the code can decompmress files in that
compression format and can write files in that compression format", so
WTAP_GAIP_COMPRESSED is supported iff libwiretap is built with zlib.)

In MainWindow::fileAddExtension, instead of checking for
WTAP_GZIP_COMPRESSED and using ".gz" as the extension, use the extension
returned by wtap_compressed_file_extension() for the compression type.

Change-Id: I47cb0eca8c887ada3562df30b54e76509008180f
Reviewed-on: https://code.wireshark.org/review/30707
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-18 22:10:42 +00:00
Joerg Mayer 189f1ceec2 packet-mint.c: Rename mint type to mint port and enhance list of ports.
Change-Id: Icdf39f23bfcbd711f1b20a6bf7144f9fcff9744e
Reviewed-on: https://code.wireshark.org/review/30706
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-18 21:32:21 +00:00
Jaap Keuter 9dad39293e text2pcap: pcapng is an output option
Buried at the end of the help text, in the Miscellaneous section,
is the '-n' option to write pcapng format files. This can hardly
be considered miscellaneous but rather an output option.
Move the option in the help text to the output section.

Change-Id: I3e39b75281091d6d5d9607891ef2f97ba031e48a
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30690
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-18 21:29:59 +00:00
Juergen Kosel 353e7065ff s7comm: Add additional syntax ids 0x83 and 0x84 for NCK data access
Beside the standard NCK syntax id 0x82 the ids 0x83 and 0x84 are used
for values with metric and inch units.

Change-Id: I62bf2d2e583905c9fa90e4e7caa614a6fe6a7155
Signed-off-by: Juergen Kosel <juergen.kosel@gmx.de>
Reviewed-on: https://code.wireshark.org/review/30674
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-18 21:29:10 +00:00
John Tapparo 87862cb74b f5ethtrailer: Update for new format trailers
Bug: 15284
Change-Id: I062b7d85b31ced6f4e8478cdbf048fc15b0edf5e
Reviewed-on: https://code.wireshark.org/review/30671
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-18 18:17:46 +00:00
Vasil Velichkov 2294ac3dfe .mailmap: fix duplicate entry
Change-Id: I4498178e0eae3cec45514cb11185e906edffa7c4
Reviewed-on: https://code.wireshark.org/review/30694
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-11-18 14:54:31 +00:00
Gerald Combs 0d50cfe123 [Automatic update for 2018-11-18]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I896204ae8c6e8ca23e75ff9202ff4bc344d023f8
Reviewed-on: https://code.wireshark.org/review/30686
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-18 08:27:21 +00:00
Peter Wu 923d719f2b CMake: call cmake_minimum_required before project
cmake_minimum_required() MUST be called even before project(), otherwise
some policies will not be correctly set. On the macOS build on Travis
for example, CMP0025 was accidentally set to "OLD" which resulted in
CMAKE_C_COMPILER_ID being reported as "Clang" instead of "AppleClang".

Change-Id: I20065e621628cde24946edb519d719f527936d87
Reviewed-on: https://code.wireshark.org/review/30685
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-18 07:20:41 +00:00
Jaap Keuter 93361b9977 text2pcap: assure an IP next layer protocol is set
Using -4 or -6 to set an IP address pair to use in the dummy IP
header it is possible to generate a capture in which the next
layer protocol is undefined. Add a check that an next layer
protocol is always set.

Bug: 15275
Change-Id: Ifef54be7f708a0f168d2067f6f691e2611f25428
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30683
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-18 07:19:00 +00:00
Guy Harris 7370a6f00f Clean up previous change.
compressed_file_extension shouldn't include the ".", as we insert the
"." before it.

Use it when appending the extension, rather than hardwiring "gz" in two
places.

Change-Id: I89e3ed1df9a8457fdbb6e6386686176816f4671b
Reviewed-on: https://code.wireshark.org/review/30682
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-18 00:59:32 +00:00
Guy Harris c22c060d2b Fix addition of extensions to file names.
If the file is to be compressed, then:

  if the type in which the file is to be written has a set of extensions
  it uses, leave the file name alone if it ends with one of those
  extensions followed by the extension for the compression type,
  otherwise append the default extension for that file type followed by
  the extension for the compression type;

  if it doesn't, leave the file name alone if it ends with the extension
  for the compression type, otherwise append the extension for the
  compression type;

otherwise:

  if the type in which the file is to be written has a set of extensions
  it uses, leave the file name alone if it ends with one of those
  extensions, otherwise append the default extension for that file type followed by
  the extension for the compression type;

  if it doesn't, leave the file name alone if it ends with the extension
  for the compression type, otherwise append the extension for the
  compression type.

Change-Id: I7c4093af28cc30d579a2ae9faa8f4164b4764001
Reviewed-on: https://code.wireshark.org/review/30681
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-18 00:17:44 +00:00
Peter Wu 204dc92717 wiretap/merge.c: consolidate three similar merge_files routines
The three merge_files routines (filename, tempfile, stdout) have exactly
the same code except for a single wtap_dump_open routine. Reduce code
duplication to ease further improvements to this file.

Change-Id: I4fa890730d54c11b3614e56cf4d3d3da1ae9f5fd
Reviewed-on: https://code.wireshark.org/review/30678
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-17 20:51:22 +00:00
Peter Wu 77578b081b Qt: fix build failure due to adding two incompatible pointers
Change-Id: I08d45c87c9232edcabfc69d25a773552fe9e0871
Fixes: v2.9.0rc0-2567-g43872a3a0e (""." in version numbers and file names isn't translated into other languages.")
Reviewed-on: https://code.wireshark.org/review/30680
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-17 19:25:14 +00:00
Joerg Mayer 9891cb2c22 etypes.h: Small whitespace fixes
Change-Id: Idd4178eb69bb69adb2df812dda8462e2631101e3
Reviewed-on: https://code.wireshark.org/review/30677
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-17 11:48:53 +00:00
Guy Harris 43872a3a0e "." in version numbers and file names isn't translated into other languages.
"xxx.pcap.gz" is "xxx.pcap.gz" in any language.  "3.0.1" is "3.0.1" in
any language.

Change-Id: I231a3f9bd21a3ea5d56a8e410d20b1bc3927540f
Reviewed-on: https://code.wireshark.org/review/30676
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-17 07:39:19 +00:00
Gerald Combs 4ebe640ec1 Man pages: Update pipe input documentation.
Make sure the -i <pipe> documentation is consistent and correct.

Change-Id: I9019effb658f914ac754e4ae893eafbe7c4b4da1
Reviewed-on: https://code.wireshark.org/review/30675
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-16 23:40:23 +00:00
Gerald Combs f300676bec Dumpcap: Fix writing SHBs and IDBs.
If we have a single capture source and that capture source is pcapng and
we're writing a pcapng file, do the following:

- Pass its SHB and IDBs through unmodified. Don't save or write command
  line interface IDBs.

- Save the most recent SHB and IDBs so that we can write them when we're
  writing multiple output files.

If we have multiple capture sources, do the following:

- Write Dumpcap's SHB.

- Keep a global list of IDBs, consisting of both command line interfaces
  and IDBs read from pcapng sources.

- When reading an EPB or ISB, remap its local interface number to its
  corresponding global number.

Add Dumpcap pcapng section tests. Make the application IDs in the
"many_interfaces" captures unique.

Change-Id: I2005934c1f83d839727421960005f106d6c682dd
Reviewed-on: https://code.wireshark.org/review/30085
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-16 19:28:11 +00:00
Anders Broman 377f5d0de7 nettrace: Handle failure to parse IPv6.
Reading of Address needs refacoring.

Change-Id: Icca094a50bda4314bda72005bfc0d722e3d185d2
Reviewed-on: https://code.wireshark.org/review/30672
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-16 15:40:23 +00:00
ismaelrti 1fcdd66dda RTPS: RTPS 2.3 Domain ID and Domain Tag support.
Added dissection of field PID_DOMAIN_TAG. PID_DOMAIN_ID moved to
PID_RTI_DOMAIN_ID and PID_IS_RELIABLE moved to PID_DOMAIN_ID.

Change-Id: Ie189b2d2e66b705df202e7ee3e752aea5ddee271
Reviewed-on: https://code.wireshark.org/review/30664
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 15:06:35 +00:00
Lorand Jakab f8100ba30a LISP: Switch to proto_tree_add_subtree_format()
When the LISP dissector was initially written, it followed a different
pattern for adding subtrees with a text label, which needs to be
modified while dissecting: proto_tree_add_item() +
proto_item_append_text() + proto_item_add_subtree().

This commit updates the code to use the more elegant
proto_tree_add_subtree_format() call.

Change-Id: Icb6424be3c9cdecbfe9bb5aa2d39f3ad3d1499e0
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/30655
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-11-16 14:18:02 +00:00
Peter Wu e2e069e3fa travis: enable tests even if libpcap is disabled
Proper dependency tracking has been implemented such that tests that
require dumpcap are skipped when unavailable, let's enable tests again.
Use pytest for nicer traces.

Bug: 14949
Change-Id: I1751bed8bd62e1a69d6e19161f7517735ae96662
Reviewed-on: https://code.wireshark.org/review/30669
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 13:55:56 +00:00
Peter Wu 88ce087dcf test: finalize suite_capture conversion to fixtures, drop config.py
Convert the old start_pinging routine to use pytest fixtures, rewriting
it to enable a different generator that uses (for example) UDP.
Remove the config module since it is no longer neded.

Change-Id: Ic4727157faab084b41144e8f16ea44f59c9037d8
Reviewed-on: https://code.wireshark.org/review/30659
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 13:55:40 +00:00
Peter Wu 3ab521118a test: convert capture tests to use fixtures, fix tests without dumpcap
Add a new --capture-interface option to pytest, similar to test.py. It
will grab some Ethernet interface on Windows. An empty value overrides
this and disables capture tests. Remove the test.py --enable-capture
option since that is implied by the --capture-interface option.

Port the `test.py --program-path` option to pytest and additionally make
the pytest look in the current working directory if neither WS_BIN_PATH
nor --program-path are specified. Drop config.setProgramPath, this
allows tests to be run even if not all binaries are available.

With all capture tests converted to fixtures, it is now possible to run
tests when Wireshark is not built with libpcap as tests that depend on
cmd_dumpcap (or capture_interface) will be skipped.

Bug: 14949
Change-Id: Ie802c07904936de4cd30a4c68b6a5139e6680fbd
Reviewed-on: https://code.wireshark.org/review/30656
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 13:55:28 +00:00
Peter Wu cb9be3850d tshark: do not print packet information when using -w without libpcap
The test_tshark_io_direct_stdout test was failing because the command
"tshark -r test/captures/dhcp.pcap -w - > some.pcap" produced a corrupt
capture file which has the packet information appended at the end.

Change-Id: I1a79e98f1475c29d7dad3ff90d4cb689f46b0e57
Fixes: 57389a0c69 ("make tshark compile and work also when pcap is not available")
Reviewed-on: https://code.wireshark.org/review/30668
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 13:54:50 +00:00
Peter Wu a3239adeee Qt: fix build with Qt 5.4 and older
Change-Id: Iabdd87128a2af8c668c0602ea677f71984e64723
Fixes: v2.9.0rc0-2556-gb894c53d5e ("Add an API to get a description of a compression type, and use it.")
Reviewed-on: https://code.wireshark.org/review/30670
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 13:54:27 +00:00
Guy Harris b894c53d5e Add an API to get a description of a compression type, and use it.
Add wtap_compression_type_description(), which returns NULL for
WTAP_UNCOMPRESSED and a descriptive string for other compression types.

Instead of checking for WTAP_GZIP_COMPRESSED and appending "(gzip
compressed)", just pass the compression type to
wtap_compression_type_description() and, if the result is non-null,
append its result, wrapped in parentheses, with a space before the left
parenthesis.

Change-Id: I79a999c7838a883953795d5cbab009966e14b65e
Reviewed-on: https://code.wireshark.org/review/30666
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-16 12:21:00 +00:00
Martin Boye Petersen eea4997f7e ZigBee: Fixed incorrect field type
Fixed incorrect field type for tariff label in publish tariff information.
It is an zigbee octet string, so the first byte indicates the length of the string.

Change-Id: Ia90e47a19a3bd1ca7642f5e7ce99377618198f15
Reviewed-on: https://code.wireshark.org/review/30663
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-16 11:23:55 +00:00
Dario Lombardo 76b80712ee nettrace: fix var init.
Error:
../wiretap/nettrace_3gpp_32_423.c:745:47: error: missing field 'src_ip' initializer [-Werror,-Wmissing-field-initializers]
        exported_pdu_info_t  exported_pdu_info = { 0 };
                                                     ^
1 error generated.
ninja: build stopped: subcommand failed.

Change-Id: I6c083b474854ea062f0a1c9f94e83af83574fc91
Reviewed-on: https://code.wireshark.org/review/30661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-16 09:55:46 +00:00
Anders Broman 9fe5d3729f gtpv2: Handle different sizes of 8.38 MM Context.
Change-Id: Iaeb795f439a1157bca6d006d2a0bf8fe44703267
Reviewed-on: https://code.wireshark.org/review/30662
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-16 09:55:31 +00:00
Joerg Mayer ca96dfe059 dictionary.symbol: Update to version received from vendor with minor formatting changes
Change-Id: I569e2fdb96ffc6757fffce8ddaf0086037cfa64f
Reviewed-on: https://code.wireshark.org/review/30665
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-16 09:36:04 +00:00
Guy Harris a1372f6d01 Use an enum for compression types in various interfaces.
This:

1) means that we don't have to flag the compression argument with a
comment to indicate what it means (FALSE doesn't obviously say "not
compressed", WTAP_UNCOMPRESSED does);

2) leaves space in the interfaces in question for additional compression
types.

(No, this is not part 1 of an implementation of additional compression
types, it's just an API cleanup.  Implementing additional compression
types involves significant work in libwiretap, as well as UI changes to
replace "compress the file" checkboxes with something to indicate *how*
to compress the file, or to always use some other form of compression).

Change-Id: I1d23dc720be10158e6b34f97baa247ba8a537abf
Reviewed-on: https://code.wireshark.org/review/30660
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-16 09:20:36 +00:00
Craig Jackson e12753d5f6 TDS: Fix decoding of TDS7 password.
Fix decoding of the TDS7 password field by treating it as a byte string, not an ASCII string.

Also fix another display problem demonstrated by the sample trace.

Bug: 15274
Change-Id: I906d6e9499e2e986820e9248604e98051d877bed
Reviewed-on: https://code.wireshark.org/review/30653
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-16 06:21:17 +00:00
Guy Harris 4e17bd6229 Use the dump parameters structure for non-pcapng-specific stuff.
Use it for all the per-file information, including the per-file
link-layer type and the per-file snapshot length.

Change-Id: Id75687c7faa6418a2bfcf7f8198206a9f95db629
Reviewed-on: https://code.wireshark.org/review/30616
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-16 02:18:26 +00:00
Guy Harris 658c30dc4b Always use the input file's encapsulation for the output file.
Using WTAP_ENCAP_PER_PACKET if there's more than one interface forces a
format supporting multiple encapsulations even if all interfaces use the
same encapsulation; there's no reason to force that - you might as well
let the user specify pcap format, for example, if that's what they
really want.

(If there are multiple interfaces and they have different
encapsulations, the file encapsulation will be WTAP_ENCAP_PER_PACKET
*anyway*.)

Change-Id: I0e65c06e1ae3ff159ccd27f72cc63014e30a58f3
Reviewed-on: https://code.wireshark.org/review/30658
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-15 23:37:39 +00:00
Guy Harris ad2bc773d6 Just pass on a snapshot length of 0 to the dumper.
It means "snapshot length unknown".

For most file formats, the snapshot length isn't recorded (even for
formats that support slicing - all they record is the on-the-network
length, and length after slicing, for each packet), so it's ignored in
the dumper.

The one exception is pcap, which records it in the file header; if it's
unknown, the pcap-writing code picks the maximum supported snapshot
length for the file's link-layer header type.

Change-Id: Ieda5dfe34c4bac63e43fdadeff31799ac3c908de
Reviewed-on: https://code.wireshark.org/review/30657
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-15 23:25:41 +00:00
Peter Wu d631c17eee test: convert suite_dfilter to use fixtures
Stop using subprocesstest, drop the (now redundant) DFTestCase base
class and use pytest-style fixtures to inject the dependency on tshark.
This approach makes it easier to switch to pytest in the future.
Most substitutions were automated, so no typos should be present.

Change-Id: I3516029162f87423816937410ff63507ff82e96f
Reviewed-on: https://code.wireshark.org/review/30649
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-15 22:57:40 +00:00
Peter Wu d38ab1bde0 test: convert suite_nameres to use fixtures
Create a special custom profile just for the nameres tests, instead of
doing this for all tests. Other tests do not need it.

Change-Id: I41de0ece9dcf1ee310957beab2bbee0a99784753
Reviewed-on: https://code.wireshark.org/review/30633
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-15 22:56:47 +00:00
Peter Wu bd84c71668 test: convert suite_text2pcap to use fixtures
Inline all capture file names and use fixtures instead of the global
config object. This makes dependencies more explicit.

Change-Id: I37a6eda73822735b5a6957b44bce53bb5ecd1aa0
Reviewed-on: https://code.wireshark.org/review/30631
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-15 22:56:23 +00:00