aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-11-20wsutil: rename some wsjson functionsPeter Wu6-23/+23
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-20wsutil: fix indentation/modelines in wsjsonPeter Wu2-135/+135
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-20Add an API to get a list of compressed-file extensions, and use it.Guy Harris5-146/+148
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-19Fix a comment to reflect reality.Guy Harris1-1/+2
Change-Id: I789b3993dbf07805bed2f8cde70b3ded4b5bc9f9 Reviewed-on: https://code.wireshark.org/review/30727 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-19Ensure that fixFilenameExtension() is used only when writing a file.Guy Harris1-6/+16
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-19Convert enum increment into int incrementJaap Keuter1-10/+10
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-19rpm-setup.sh: We no longer use FOP or AsciiDoc.Gerald Combs1-2/+0
Change-Id: I3b6e200be149d12a42604528a695aae98d310b9c Reviewed-on: https://code.wireshark.org/review/30719 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-19Fix MLE security suite displayRobert Cragie1-2/+2
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-19ain:Prettify Carrier and AMAslpID parameters.Anders Broman5-61/+256
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-19lnpdqp: Get rid of warnings.Anders Broman2-5/+11
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-19wtap.h: Fix documentation warningsJoerg Mayer1-2/+0
Change-Id: Ib0b5ae47047d3f574bd35cab045cefb8fcb8778d Reviewed-on: https://code.wireshark.org/review/30710 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-19text2pcap: consolidate ethernet header protocol determinationJaap Keuter1-13/+10
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-18Add an API to get the file extension for a compression type, and use it.Guy Harris6-57/+115
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-18packet-mint.c: Rename mint type to mint port and enhance list of ports.Joerg Mayer1-129/+263
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-18text2pcap: pcapng is an output optionJaap Keuter1-1/+1
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-18s7comm: Add additional syntax ids 0x83 and 0x84 for NCK data accessJuergen Kosel1-4/+11
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-18f5ethtrailer: Update for new format trailersJohn Tapparo2-82/+739
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.mailmap: fix duplicate entryVasil Velichkov2-1/+1
Change-Id: I4498178e0eae3cec45514cb11185e906edffa7c4 Reviewed-on: https://code.wireshark.org/review/30694 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-11-18[Automatic update for 2018-11-18]Gerald Combs12-68/+203
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-18CMake: call cmake_minimum_required before projectPeter Wu1-6/+6
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-18text2pcap: assure an IP next layer protocol is setJaap Keuter1-0/+6
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-18Clean up previous change.Guy Harris1-2/+2
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-18Fix addition of extensions to file names.Guy Harris1-24/+71
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-17wiretap/merge.c: consolidate three similar merge_files routinesPeter Wu1-179/+46
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-17Qt: fix build failure due to adding two incompatible pointersPeter Wu1-2/+2
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-17etypes.h: Small whitespace fixesJoerg Mayer1-23/+23
Change-Id: Idd4178eb69bb69adb2df812dda8462e2631101e3 Reviewed-on: https://code.wireshark.org/review/30677 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-17"." in version numbers and file names isn't translated into other languages.Guy Harris2-3/+3
"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-16Man pages: Update pipe input documentation.Gerald Combs3-17/+16
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-16Dumpcap: Fix writing SHBs and IDBs.Gerald Combs6-157/+473
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-16nettrace: Handle failure to parse IPv6.Anders Broman1-3/+6
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-16RTPS: RTPS 2.3 Domain ID and Domain Tag support.ismaelrti2-3/+37
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-16LISP: Switch to proto_tree_add_subtree_format()Lorand Jakab2-37/+7
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-16travis: enable tests even if libpcap is disabledPeter Wu1-2/+5
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-16test: finalize suite_capture conversion to fixtures, drop config.pyPeter Wu4-308/+89
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-16test: convert capture tests to use fixtures, fix tests without dumpcapPeter Wu10-378/+454
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-16tshark: do not print packet information when using -w without libpcapPeter Wu1-7/+9
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-16Qt: fix build with Qt 5.4 and olderPeter Wu3-3/+3
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-16Add an API to get a description of a compression type, and use it.Guy Harris13-95/+35
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-16ZigBee: Fixed incorrect field typeMartin Boye Petersen1-1/+1
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-16nettrace: fix var init.Dario Lombardo1-1/+3
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-16gtpv2: Handle different sizes of 8.38 MM Context.Anders Broman1-0/+8
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-16dictionary.symbol: Update to version received from vendor with minor ↵Joerg Mayer1-53/+45
formatting changes Change-Id: I569e2fdb96ffc6757fffce8ddaf0086037cfa64f Reviewed-on: https://code.wireshark.org/review/30665 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-11-16Use an enum for compression types in various interfaces.Guy Harris33-253/+281
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-16TDS: Fix decoding of TDS7 password.Craig Jackson1-9/+24
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-16Use the dump parameters structure for non-pcapng-specific stuff.Guy Harris15-221/+194
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-15Always use the input file's encapsulation for the output file.Guy Harris1-8/+0
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-15Just pass on a snapshot length of 0 to the dumper.Guy Harris1-6/+0
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-15test: convert suite_dfilter to use fixturesPeter Wu18-516/+586
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-15test: convert suite_nameres to use fixturesPeter Wu2-39/+57
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-15test: convert suite_text2pcap to use fixturesPeter Wu2-208/+221
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>