Commit Graph

277 Commits

Author SHA1 Message Date
Guy Harris 9e9d284d91 Have separate routines for open-for-reading and open-for-writing errors.
Expand comments while we're at it.

Change-Id: I6dcc791eab1c9e323a9572f3d54720d223bdd64b
Reviewed-on: https://code.wireshark.org/review/21252
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 18:24:20 +00:00
Guy Harris d09ef61459 Make the command-line and alert-box failure messages more similar.
Change-Id: I94af221a0ce8b6b3ff8e0e1b94d5379351ac0962
Reviewed-on: https://code.wireshark.org/review/21251
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 17:15:22 +00:00
Guy Harris bce5ec919e Use the new cfile_XXX_failure_message() routines more broadly.
Change-Id: I7814b3fd0353f4836ae61cbdbd4e13f659cbcb59
Reviewed-on: https://code.wireshark.org/review/21239
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 07:19:41 +00:00
Guy Harris 347a19ae96 Add common routines for command-line libwiretap error reporting.
These are similar to the routines added to ui/alert_box.c for dialog-box
libwiretap error reporting.

This centralizes the knowledge about what to say for various libwiretap
errors, removing some duplicate code, and giving more details in some
programs.

Change-Id: I737405c4edaa0e6c27840f78a8c587a8b3ee120b
Reviewed-on: https://code.wireshark.org/review/21234
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 02:21:58 +00:00
Guy Harris c9bb6b8282 Don't close a wtap that you don't have open in the first place.
Change-Id: I4d9d539957d06cb3568df287eb36ecc34677373f
Reviewed-on: https://code.wireshark.org/review/21170
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18 00:10:12 +00:00
Guy Harris 0f3e20051c Fix parsing of packet ranges.
Replace the dash in a range with a '\0', so that the first value in the
range is properly terminated.

Change-Id: Ib2807c2534c1e99e643848ca0fc32f4b78025ce3
Reviewed-on: https://code.wireshark.org/review/21099
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-15 00:44:37 +00:00
Guy Harris 2c44a7f930 Clean up handling of enabled/disabled protocols/heuristic dissectors.
Add a "report a warning message" routine to the "report_err" code in
libwsutil, and rename files and routines appropriately, as they don't
only handle errors any more.

Have a routine read_enabled_and_disabled_protos() that reads all the
files that enable or disable protocols or heuristic dissectors, enables
and disables them based on the contents of those files, and reports
errors itself (as warnings) using the new "report a warning message"
routine.  Fix that error reporting to report separately on the disabled
protocols, enabled protocols, and heuristic dissectors files.

Have a routine to set up the enabled and disabled protocols and
heuristic dissectors from the command-line arguments, so it's done the
same way in all programs.

If we try to enable or disable an unknown heuristic dissector via a
command-line argument, report an error.

Update a bunch of comments.

Update the name of disabled_protos_cleanup(), as it cleans up
information for disabled *and* enabled protocols and for heuristic
dissectors.

Support the command-line flags to enable and disable protocols and
heuristic dissectors in tfshark.

Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df
Reviewed-on: https://code.wireshark.org/review/20966
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 20:40:08 +00:00
Erik de Jong f1c75cf6ef Rewrite dissectors to use Libgcrypt functions.
As discussed on the mailinglist, rewriting dissectors to use Libgcrypt
functions as Libgcrypt will be mandatory after change 20030.
Removal of following functions:
- crypt_md4
- crypt_rc4*
- aes_cmac_encrypt_*
- md5_*
- sha1_*
- sha256_*

Further candidates:
- aes_*
- rijndael_*
- ...

Added functions:
- ws_hmac_buffer

Added const macros:
- HASH_MD5_LENGTH
- HASH_SHA1_LENGTH

Changes on epan/crypt/* verified with captures from
https://wiki.wireshark.org/HowToDecrypt802.11
Changes on packet-snmp.c and packet-radius.c verified with captures from
https://wiki.wireshark.org/SampleCapture
Changes on packet-tacacs.c verified with capture from
http://ccie-in-3-months.blogspot.nl/2009/04/decoding-login-credentials-regardless.html

Change-Id: Iea6ba2bf207cf0f1bf2117068fb1abcfeaafaa46
Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html
Reviewed-on: https://code.wireshark.org/review/20095
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-02 23:58:05 +00:00
Dario Lombardo 955cf0ba37 editcap: use single exit point.
Change-Id: I9ed9a7effdcfdb660616f5199a8227b466e91ad4
Reviewed-on: https://code.wireshark.org/review/20204
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-22 13:58:23 +00:00
Gerald Combs d84577fe1a Yell at the user less.
Our user-facing messages should have a helpful (or at the very least
neutral) tone. In English, exclamation points are neither. Replace a
bunch of them with periods.

Change-Id: I29c3b2f84c25e06aae5b559860224559053a0378
Reviewed-on: https://code.wireshark.org/review/20189
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-20 16:53:17 +00:00
Dario Lombardo 6d79055ba6 wsutil: remove leaks from filesystem and plugins code.
Change-Id: Iac2805c0130bd2ba6cdb3c9dd997050274d58d99
Reviewed-on: https://code.wireshark.org/review/20020
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-18 13:45:14 +00:00
Dario Lombardo 7c0c580c4b wiretap: add cleanup routine.
The cleanup routine has been added to exit section of the applications.
Those which required a exit restyle have been patched as well.

Change-Id: I3a8787f0718ac7fef00dc58176869c7510fda7b1
Reviewed-on: https://code.wireshark.org/review/19949
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-14 10:22:20 +00:00
Jaap Keuter b28b07379f editcap: handle too short frames in frame comparison
With option -I one can ignore the first number of bytes from the frame
while doing duplicate frame removal. This doesn't handle shorter frames
correctly. Add safeguards for this, and update the help text.

Bug: 13378
Change-Id: Ia6b65d0797f4069f0b89fa134114d88d80988211
Reviewed-on: https://code.wireshark.org/review/20004
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-02-08 22:31:43 +00:00
Guy Harris 037c64aa34 Clean up initialization code for programs.
Make the init_progfile_dir() call unconditionally, even if plugins
aren't supported, as that doesn't necessarily mean nobody uses the
directory containing the executable.

Report the error the same way in all programs, and free the error string
after we're finished with it.

Make the error - and the comment before the code - reflect what
init_progfile_dir() is actually doing (the goal is to get the full
pathname of the directory *containing* the executable; that's generally
done by getting the pathname of the executable and stripping off the
name of the executable, but that's won't necessarily always be the
case).  Also note for TShark that we won't be able to capture traffic,
just as we do for Wireshark (if we don't have the pathname of the
program file, we don't have a pathname to use to find dumpcap).

Have the plugin scanner just fail silently if we weren't able to get the
plugin directory path, so we don't have to worry about calling it if
init_progfile_dir() fails.

Clean up white space while we're at it.

Change-Id: I8e580c719aab6fbf74a764bf6629962394fff7c8
Reviewed-on: https://code.wireshark.org/review/19076
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-05 04:27:49 +00:00
Guy Harris ab07f8e0f8 Have a routine to do all the work of initializing libwiretap.
Have programs that use libwiretap call that routine rather than
separately calling some or all of init_open_routines(),
wtap_register_plugin_types(), and wtap_opttypes_initialize().

Also don't have routines internal to libwiretap call those.  Yes, this
means doing some initialization work when it isn't necessary, but
scattering on-demand calls throughout the code is a great way to forget
to make those calls.

Change-Id: I5828e1c5591c9d94fbb3eb0a0e54591e8fc61710
Reviewed-on: https://code.wireshark.org/review/19069
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-04 21:42:44 +00:00
Uli Heilmeier cacb4a4287 Editcap: Fix comparsion between signed and unsigned int
secs_per_block is a unsigned integer. Therefore we can't
compare a signed integer with it.

Change-Id: Ic965a88e0e704e296c4af9193ca4a3504173ae36
Reviewed-on: https://code.wireshark.org/review/17901
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-24 22:49:58 +00:00
Guy Harris 4abf452b19 Use the get.*guint32() routines to get guint32s.
Change-Id: Ie3b451549a29970a5e3204b449f198aa1c82de5b
Reviewed-on: https://code.wireshark.org/review/17650
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-11 20:32:30 +00:00
Guy Harris 4f46d9da9c Allow a zero change offset in editcap.
It doesn't have to be non-zero.

Change-Id: If578906855abd9eb9fa07e97ee5508c139b6f61b
Reviewed-on: https://code.wireshark.org/review/17646
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-11 20:24:16 +00:00
Peter Wu d1a82132a6 editcap: fix memleaks
The version string stuff mirrors an earlier tshark change. Move some
cleanup calls (in case no packets are selected) and add wtap_close.

Change-Id: I6f282e89279a732c226824e10857be04b40841e8
Reviewed-on: https://code.wireshark.org/review/17621
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-10 13:00:05 +00:00
Guy Harris fd38b0c3fb Fix copy-and-pasteo.
Change-Id: Ifead0872053943b7cfe192e15d7099e2328ae456
Reviewed-on: https://code.wireshark.org/review/17603
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-09 08:34:45 +00:00
Guy Harris e09b03e9b1 Add get_ routines to get a guint32, and use them.
By analogy to get_natural_int() and get_positive_int(), add routines to
get a guint32 and to get a non-zero guint32, doing all the necessary
error checks, and use it.

Change-Id: I65a9ac8a3d136886df3588806ae7af5bdc7b8cb6
Reviewed-on: https://code.wireshark.org/review/17586
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-08 18:27:21 +00:00
Dario Lombardo 132632bcd9 editcap: use ws_strtou/i functions.
Change-Id: Ib69241eb04088fe32f53ac4e87911499cf5e9e40
Reviewed-on: https://code.wireshark.org/review/17500
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-08 18:05:41 +00:00
Guy Harris 94d8250bd0 Use get_positive_int() to parse signed positive arguments.
Change-Id: Id17b56704f484abdf047a3d1b0775f7fa46eb380
Reviewed-on: https://code.wireshark.org/review/17507
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-05 23:39:59 +00:00
Guy Harris 2a38dc74ed Have scan_plugins() take an argument specify what to do on load failures.
That's a less gross hack to suppress load failures due to not having
libwiretap than providing a no-op failure-message routine, as it at
least allows other code using a failure-message routine, such as
cmdarg_err() and routines that call it, to be used.

We really should put libwiretap and libwireshark plugins into separate
subdirectories of the plugin directories, and avoid even looking at
libwireshark plugins in programs that don't use libwireshark.

Change-Id: I0a6ec01ecb4e718ed36233cfaf638a317f839a73
Reviewed-on: https://code.wireshark.org/review/17506
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-05 23:27:02 +00:00
Dario Lombardo 042b49a24d editcap: fix typos
Change-Id: I24c455afc51749a665e452312332d167831f19d2
Reviewed-on: https://code.wireshark.org/review/16760
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-29 15:02:05 +00:00
Dario Lombardo 3a3bf8926e editcap: fix typos
Change-Id: Ibdd81d8dbc779a8741a83d1269ccfb5ea156dd5a
Reviewed-on: https://code.wireshark.org/review/16691
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-26 11:35:28 +00:00
Dario Lombardo 3ebb2cfe6b editcap: fix typos
Change-Id: Ic5eb5daca1ab7463723ee2b299482929f3e8be56
Reviewed-on: https://code.wireshark.org/review/16666
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-25 16:08:03 +00:00
Guy Harris 3beab65515 No need to check for string option values being null.
A string option, if present, always has a value; it might be a null
*string*, but you won't get a null pointer (if the option isn't present,
it simply isn't present).

Fix some comments while we're at it.

Change-Id: I9c1420f56998a7d04de5c5cc2e92631b181f303a
Reviewed-on: https://code.wireshark.org/review/16564
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-21 00:28:18 +00:00
Michael Mann db1e0bcf65 Fix printf style parameters complaints from VS Code Analysis
Change-Id: I5669e2442582f899643fae4a9f86ab6d505dde07
Reviewed-on: https://code.wireshark.org/review/16505
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 13:10:37 +00:00
Guy Harris 1f8999bb96 Redo the block options APIs.
A block can have zero or more instances of a given option.  We
distinguish between "one instance only" options, where a block can have
zero or one instance, and "multiple instances allowed" options, where a
block can have zero or more instances.

For "one instance only" options:

	"add" routines add an instance if there isn't one already
	and fail if there is;

	"set" routines add an instance if there isn't one already
	and change the value of the existing instance if there is one;

	"set nth" routines fail;

	"get" routines return the value of the instance if there is one
	and fail if there isn't;

	"get nth" routines fail.

For "multiple instances allowed" options:

	"add" routines add an instance;

	"set" routines fail;

	"set nth" routines set the value of the nth instance if there is
	one and fail otherwise;

	"get" routines fail;

	"get nth" routines get the value if the nth instance if there is
	one and fail otherwise.

Rename "optionblock" to just "block"; it describes the contents of a
block, including both mandatory items and options.

Add some support for NRB options, including IPv4 and IPv6 option types.

Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e
Reviewed-on: https://code.wireshark.org/review/16444
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-14 23:02:39 +00:00
John A. Thacker 18a900f191 Editcap: Fix setting of max_packet_number
editcap -r only sets max_packet_number to the earliest, instead of latest,
packet or end of range selection. This changes it to the proper test.

Bug: 12547
Change-Id: I81772962b00fc6566ccead4fb44c6626a47fff31
Reviewed-on: https://code.wireshark.org/review/16045
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-23 02:58:10 +00:00
Michael Mann 614d09af13 Add data structures necessary to support multiple Name Resolution blocks.
This doesn't try to use any data from multiple Name Resolution blocks, it
just converts single Name Resolution block usage into a GArray, so the
potential is there to then use/support multiple Name Resolution blocks
within a file format (like pcapng)

Change-Id: Ib0b584af0bd263f183bd6d31ba18275ab0577d0c
Reviewed-on: https://code.wireshark.org/review/15684
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-01 22:58:06 +00:00
Michael Mann 6fa77a6acb Add data structures necessary to support multiple Section Header blocks.
This doesn't try to use any data from multiple Section Header blocks, it
just converts single Section Header block usage into a GArray, so the
potential is there to then use/support multiple Section Header blocks
within a file format (like pcapng)

Change-Id: I6ad1f7b8daf4b1ad7ba0eb1ecf2e170421505486
Reviewed-on: https://code.wireshark.org/review/15636
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-01 14:33:23 +00:00
Michael Mann 81d65ccec6 Add wtap_optionblock_set_option_string_format
Also add a length parameter to wtap_optionblock_set_option_string

Change-Id: I8c7bbc48aa96b5c2a91ab9a17980928d6894f1ee
Reviewed-on: https://code.wireshark.org/review/15505
Reviewed-by: Anthony Coddington <anthony.coddington@endace.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-22 23:39:14 +00:00
João Valverde 3db13a7fc9 Link version code statically again
This allows keeping the code-sharing with the static linking.

This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more
external dependencies to wsutil than strictly necessary.

A nice side-effect is that libwsutil no longer depends on version.h.

Follow up to f95976eefc.

Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23
Reviewed-on: https://code.wireshark.org/review/15002
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-21 18:59:56 +00:00
Gerald Combs cf6501eb45 Windows: Remove the need for _CRT_NONSTDC_NO_DEPRECATE.
Replace some function calls with their non-deprecated equivalents so
that we can remove _CRT_NONSTDC_NO_DEPRECATE from CMakeLists.txt and
config.nmake.

Leave _CRT_SECURE_NO_DEPRECATE in place. Removing it failed with 145
warnings and 72 errors.

Note that we could probably improve startup performance by using wmem
in diam_dict.*.

Change-Id: I6e130003de838aebedbdd1aa78c50de8a339ddcb
Reviewed-on: https://code.wireshark.org/review/14883
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-13 02:16:20 +00:00
João Valverde ecb4dc396e Include ws_diag_control.h in config.h
Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317
Reviewed-on: https://code.wireshark.org/review/14749
Petri-Dish: João Valverde <j@v6e.pt>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-04 23:05:31 +00:00
João Valverde f95976eefc Move zlib version check to wsutil
Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c
Reviewed-on: https://code.wireshark.org/review/14747
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-03 02:58:04 +00:00
Joerg Mayer 7e5dae90d6 Fix warnings/errors of type -Wused-but-marked-unused
Change-Id: I34c2d9953272822da0745d1b24c64d8466e43b37
Reviewed-on: https://code.wireshark.org/review/14668
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-28 13:27:52 +00:00
Daniël van Eeden a0b1354583 Fix compile errors when compiling w/o zlib
Change-Id: I443cd0d4a143e456e11b5939891312a0501770a0
Reviewed-on: https://code.wireshark.org/review/14636
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-26 16:19:34 +00:00
Jaap Keuter 99db1c5c98 Remove superfluous pointer checks (CID-280599, 280600 and 280601)
The preceding code takes every effort to make sure that the
frac and end pointers are relevant pointers. Don't go back and
check for NULL yet again.

Change-Id: If805aee5a77a8c23eac7b074bd11d3743c5e1a3b
Reviewed-on: https://code.wireshark.org/review/14398
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-09 13:20:10 +00:00
Guy Harris ad3afb02c3 Properly fetch the ethertype.
The ethertype is 16 bits and big-endian, so fetch it with pntoh16() to
convert it to host byte order (and to handle unaligned values).

Fixes Coverity CID 1355352.

Change-Id: I14980e2813c3ea19c6df01681f8ed7aaad5c3f59
Reviewed-on: https://code.wireshark.org/review/14359
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-06 17:24:05 +00:00
Michael Mann 08d49ff2e0 Making wiretap option blocks more generic.
This was inspired by https://code.wireshark.org/review/9729/, but takes it in a different direction where all options are put into an array, regardless of whether they are "standard" or "custom".  It should be easier to add "custom" options in this design. Some, but not all blocks have been converted.
Descriptions of some of the block options have been moved from wtap.h to pcapng.h as it seems to be the one that implements the description of the blocks.

Also what could be added/refactored is registering block behavior.

Change-Id: I3dffa38f0bb088f98749a4f97a3b7655baa4aa6a
Reviewed-on: https://code.wireshark.org/review/13667
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-23 00:39:38 +00:00
Jonas Falkevik 780f886d29 editcap: flag for ignore vlan duplication removal
Add additional --novlan flag for removing vlan tag info before checking for duplicates.
When capturing with -i any you could see packets more than once and some drivers include vlan info.
With the --novlan the vlan info is removed from the packet so that checksum duplication detection can be used,
if the rest of the packets are the same.

Change-Id: I5dca6e20259a0a396875919e9e60cc42291579d3
Reviewed-on: https://code.wireshark.org/review/13414
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-15 05:33:14 +00:00
Guy Harris 41d734ec67 Adjust time stamps even if the secs value of the time stamp is 0.
If the seconds value in a time stamp is 0, that says nothing whatsoever
about whether it's supported or not - it's the presence flag, which
we've already tested and found to be set, that indicates whether the
time stamp is supported.

Bug: 12116
Change-Id: I91354783af7b6356d9806c7559d35da44ea4567f
Reviewed-on: https://code.wireshark.org/review/13913
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-12 02:13:53 +00:00
Guy Harris 48267465c8 More structure assignments for nstime_t.
Change-Id: I4d320b50d7d74b6fc423014c9611a60d49c6be02
Reviewed-on: https://code.wireshark.org/review/13503
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 08:05:37 +00:00
Alexis La Goutte d326eb98f6 fix spelling-error-in-binary found by lintian
Change-Id: I2bdb40d287b2c19d40679fb73a8bae5f1debdd98
Reviewed-on: https://code.wireshark.org/review/13330
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-01-16 14:06:10 +00:00
Michael Mann 7bde1d70f2 [editcap] Pacify OS X buildbot.
Change-Id: I3ec3c4723d29d84b25419982712707126351a01c
Reviewed-on: https://code.wireshark.org/review/13301
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-15 01:13:34 +00:00
Matej Košík 93193465dd [editcap] Remove excess parsing when packets are kept.
Also allow for range to include "the rest" (ex 10- would include all the packets starting at number 10)

Bug: 9686
Change-Id: Ib02e52b22acf49b0e52df0a75fa4fa0d5f37aa31
Reviewed-on: https://code.wireshark.org/review/13291
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-14 22:36:57 +00:00
Michael Mann baf3321942 [editcap] Bugfix tree compare function.
Bug: 12007
Change-Id: Icd31988ebbfe1e0bf4d29f32462c58c6c2c55547
Reviewed-on: https://code.wireshark.org/review/13277
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-14 18:44:55 +00:00