Commit Graph

53718 Commits

Author SHA1 Message Date
Guy Harris edc6736293 Add --help and --version support.
Make the output for them resemble the output for other programs.

Change-Id: I45dbee32ad403b8fedc2350ac9096ac1a5820cbe
Reviewed-on: https://code.wireshark.org/review/2799
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 09:09:14 +00:00
AndersBroman f0ed0e69fa Get rid of soft-deprecated API:s
Change-Id: Ieb4a3f07a7831c141ba8ce9c075e72091ef909be
Reviewed-on: https://code.wireshark.org/review/2798
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 09:04:33 +00:00
Guy Harris a1ec6693eb Clean up printf() argument list.
Splitting %s from \n makes it clearer that the %s's in question take
arguments that already include a newline, and that the subsequent \n
adds a blank line.

Change-Id: I5bac8ca80b42f7de980ad29480042cae3166ff7e
Reviewed-on: https://code.wireshark.org/review/2797
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 08:58:22 +00:00
Guy Harris 35c47214e9 Get rid of an extra blank line.
Change-Id: I321ef1404e37ebb13a456d18eeb81285b7ba477f
Reviewed-on: https://code.wireshark.org/review/2796
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 08:56:00 +00:00
Guy Harris 6264b8a2be Use get_*_int() from wsutil, rather than defining our own.
Change-Id: I4811d87a903cc3cea93e12883edf25bcd1271a53
Reviewed-on: https://code.wireshark.org/review/2795
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 08:54:38 +00:00
Guy Harris b4ce352539 Make --help and --version information a bit more uniform.
Have --version print the version number, the copyright information, the
"compiled with" information, the "running on/with" information, and the
compiler information.

Have --help print the version number, a one-line summary of what the
program does, a reference to http://www.wireshark.org for more
information, a Usage: line, and a list of command-line options.

This means programs doing that don't need to include version.h; that's
left up to get_ws_vcs_version_info() to do.

Change-Id: Idac641bc10e4dfd04c9914d379b3a3e0cc5ca8cb
Reviewed-on: https://code.wireshark.org/review/2794
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 08:46:01 +00:00
Evan Huus d70e56a733 Revert to 3ms if we don't have the handshake
Change-Id: I96b23677f3050e9c62edd49f26d50d8b4addcf58
Reviewed-on: https://code.wireshark.org/review/2784
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:32:11 +00:00
Pascal Quantin 2dbab6df18 GTP: add dissection of Extended End User Address
Bug: 10251
Change-Id: I174b5a2b3e2ec8ff2ead9f290b452ee468f6fe66
Reviewed-on: https://code.wireshark.org/review/2783
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:30:20 +00:00
Guy Harris 5889d4b435 More getopt_long(), for --help and --version.
Change-Id: Ia02d7b1fbeaa8e581e85ad8b87afabd576515434
Reviewed-on: https://code.wireshark.org/review/2792
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 07:28:50 +00:00
Guy Harris 8afe331369 More getopt_long, to add --help and --version support.
Change-Id: I946067b972a70154f02ab561bc0fd029a7a5abc4
Reviewed-on: https://code.wireshark.org/review/2791
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 04:51:20 +00:00
Guy Harris a4304de1cc Add long-option support.
That way, --help and --version, as well as -h and -v, work.

Change-Id: I095e0dcef9f6181d6fbe6337f9f33e80bc44f11a
Reviewed-on: https://code.wireshark.org/review/2790
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 02:33:52 +00:00
Guy Harris 6b3391c60a Regularize the help output of programs.
Only print to the standard output, and only give the version
information, if a "print help" command-line option is specified.
Otherwise, leave out the version information, and print to the standard
error.

Leave out the copyright information; it's extra cruft, and

	http://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html

doesn't say anything about it (and bash, at least, doesn't print it).

Change-Id: Ic5029ccf96e096453f3bd38383cc2dd355542e8a
Reviewed-on: https://code.wireshark.org/review/2789
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 02:29:54 +00:00
Guy Harris 66c342ed59 Regularize the first line of version output.
For Wireshark, say "Wireshark", not "wireshark".

For other programs, put "(Wireshark)" after the program name, as per

	http://www.gnu.org/prep/standards/html_node/_002d_002dversion.html

("If the program is a subsidiary part of a larger package, mention the
package name in parentheses, like this").

Change-Id: I68558f64cfa6ee4423e42f3d6b120633ef1b2716
Reviewed-on: https://code.wireshark.org/review/2788
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 02:03:35 +00:00
Guy Harris 0e4e825309 Add license information to the copyright information.
See

	http://www.gnu.org/prep/standards/html_node/_002d_002dversion.html

Change-Id: I19c1cf560a1bb7ed7d7312bea727550977d66120
Reviewed-on: https://code.wireshark.org/review/2787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 01:33:51 +00:00
Irene Ruengeler f3c5f14bc4 Manage Interfaces
- Add dialog to manage interfaces
- Add and delete pipes
- Hide local interfaces

Change-Id: I08323c306c2ea736f99e57c28e2fe3170a0c2216
Reviewed-on: https://code.wireshark.org/review/2613
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-07-02 20:56:37 +00:00
Guy Harris 2c9d2bea32 Fail if any of the install-exec-hook commands fails.
Hopefully, this will mean that somebody doing a set-UID/set-GID/setcap
installation as themselves rather than as root will not "succeed" but
leave dumpcap installed without enhanced privileges, so the underlying
problem in bugs such as bug 10247 will be more obvious.

Change-Id: I34393bc2c9ea4dc59854a08524edb4f65e79730b
Reviewed-on: https://code.wireshark.org/review/2781
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 20:27:28 +00:00
Michael Mann 980893a15a NDPS dissector is the poster child for proto_tree_add_subtree[_format].
NDPS dissector is also the poster child for not being considered "that naughty" by checkAPIs because most of its proto_tree_add_text calls don't have printf-style arguments (which is what checkAPIs really keys off of)

Fixed both cases and removed about 370 proto_tree_add_text calls from the dissector.

Change-Id: I721678c39d4a0544e5e7212e622c0c2eebfd04f7
Reviewed-on: https://code.wireshark.org/review/2775
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:35:52 +00:00
Evan Huus a3bac6d0ce kafka: fully dissect offset request/response messages
Change-Id: I641a3dbece6f822144f6740dde6801b1be202db5
Reviewed-on: https://code.wireshark.org/review/2777
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:29:55 +00:00
Joerg Mayer 0041f36093 Make the flag testing logic for linker flags work like the compiler flag testing.
Change-Id: I2478417cbcd395247215f149978c5f0c874c9b3a
Reviewed-on: https://code.wireshark.org/review/2779
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-02 15:57:09 +00:00
Balint Reczey 65e3f5c25e Allow overriding C/C++ flags from CMake command line
Append user's flags to our flags instead of prepending them to make
user flags higher priority.

Change-Id: I3ead33ee5fa06a2395d9197a027306ef99a704a2
Reviewed-on: https://code.wireshark.org/review/2722
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-02 13:53:26 +00:00
Evan Huus 956c440786 RSVP checksum is not required if integrity object is present
Bug: 10219
Change-Id: I2da62ee184327b2bc42a264e1782db927460f5cf
Reviewed-on: https://code.wireshark.org/review/2773
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:31:58 +00:00
Tim Furlong 09839e3a6a Update WSDG win32/win64 quick start guide to include dependencies and
instructions for building QtShark; note alternate cygwin package for
'patch' utility; update example setup script to add Qt bin directory to PATH,
and extract out paths as variables.

Change-Id: Id404b8757dbfd0dc1119b89e01bbe2fa139e2b38
Reviewed-on: https://code.wireshark.org/review/2751
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:08:39 +00:00
Jakub Zawadzki af7528999f Optimize sip dissector: avoid calling tvb_get_string_enc()
Fetch header value, only when we need to parse it.

Change-Id: I3c170ef8ab03985c8111a1b84ac1afc87bc8b5ca
Reviewed-on: https://code.wireshark.org/review/2767
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:07:44 +00:00
Tim Furlong f737381896 Add a note to Doc/docbook-xml42 requirement in docbook/README.txt indicating
that a later version may be required; e.g. my a2x (from cygwin64) generates a
developer-guide.xml that needs docbook-xml45.

Change-Id: Iea9d4b45e32157a9317e3fcf6794668e3a810c54
Reviewed-on: https://code.wireshark.org/review/2750
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 01:21:24 +00:00
Guy Harris 98d8dec61f See if this forces version.h to be built.
(It's not being built by the Ubuntu buildboth when it's building the
Debian package.)

Change-Id: Id7866e13ce72cdda4bb7d5cf0362ba7295ff766b
Reviewed-on: https://code.wireshark.org/review/2772
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 01:02:21 +00:00
Guy Harris 096aca67de Make some inconsistent configuration options errors.
This way, if you ask for both setuid and setcap installation of dumpcap,
it will fail, rather than silently (other than a message you might miss)
ignoring the request for setuid installation.  See bug 10246.

Also:

	if you ask for setuid or setcap installation of dumpcap, but
	dumpcap isn't built, it'll let you know that there's nothing to
	make setuid/setcap, and fail;

	if you ask for setcap installation of dumpcap, but setcap wasn't
	found, it'll let you know that it can't install it setcap, and
	fail;

so that it won't silently (other than a message you might miss) ignore
those requests, either.

Change-Id: Ibc01593e59fd1cd1be8c68d8cdacbfdca863efa0
Reviewed-on: https://code.wireshark.org/review/2771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 00:48:28 +00:00
Guy Harris 4cdfc5c014 AUTHORS-SHORT is build in ${CMAKE_BINARY_DIR}, not ${CMAKE_SOURCE_DIR}.
Make the dependencies list indicate that.

Change-Id: I88416e1239130b7661bbd9deccfb289e0b0fd627
Reviewed-on: https://code.wireshark.org/review/2770
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 00:35:16 +00:00
Guy Harris ae26b12f3e If -fvisibility=hidden isn't supported, try -xldscope=hidden.
That's the option for newer versions of Sun^WOracle C.

Change-Id: I62c12d5870d84587f81a8789732675021523e9ed
Reviewed-on: https://code.wireshark.org/review/2769
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 00:20:46 +00:00
Evan Huus ab1e6f30d2 Bump (again) the amount of work we do for wmem's timing test
Apparently the new win8 vm has a *very* low-resolution timer, and the allocators
are indistinguishable at the previous amount of work.

Change-Id: If4e5bb8f85b1f0d39658f54001c88f42ffddfc47
Reviewed-on: https://code.wireshark.org/review/2768
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-01 23:48:41 +00:00
Guy Harris 22ea889ee4 For Sun C with linker scoping specifiers, define WS_DLL_PUBLIC_DEF.
This may let us, at least for those compilers, make the default "hidden"
with -xldscope=hidden.

Change-Id: I94e10733c2aba0ff8d77a8bf4f1dc8ecc8b2a47f
Reviewed-on: https://code.wireshark.org/review/2766
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 23:04:05 +00:00
Jeff Morriss a4a624e4c5 Get rid of rpath when we're building RPMs.
Fedora prohibits it, we don't need it, and it gets in the way some times.

Change-Id: I92cee959f471866ff90efe9f96e4fa519c357dd9
Reviewed-on: https://code.wireshark.org/review/2763
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-07-01 22:31:30 +00:00
Jeff Morriss 5f682f1f03 Fix buildroot.
Change-Id: I902db6c69ae5966da1102e4fbcfd9f46867c0b4f
Reviewed-on: https://code.wireshark.org/review/2762
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-07-01 22:30:28 +00:00
Malcolm Walters 2a306f4b05 Fix for Bug 10240.
Include padding length in calculation of correct attribute length

Change-Id: I569c6a9e1be39e3bb997e797a094b80cdcba6b07
Reviewed-on: https://code.wireshark.org/review/2747
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-01 20:49:30 +00:00
Guy Harris a73199e31a Use G_GNUC_PRINTF() for simple_message_box().
We don't need to do the right __attribute__ magic ourselves; GLib does
it for us.

Change-Id: Id31943a8413f0272237be4f868659b5bd5e70626
Reviewed-on: https://code.wireshark.org/review/2758
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 20:39:51 +00:00
Jakub Zawadzki 852d5dac9c Remove executable bit, from not executable files.
Change-Id: I36b303b9c2bf4d6bb717261cdbf39ea16532fe06
Reviewed-on: https://code.wireshark.org/review/2757
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-01 20:37:09 +00:00
Guy Harris e696d0f93d Fix the checks for the Cygwin path.
I.e., do

	if we have 32-bit Cygwin
		CYGWIN_PATH=path to it
	else if we have 64-bit Cygwin
		CYGWIN_PATH=path to it
	else
		fail
	endif

rather than

	CYGWIN_PATH=standard path for 32-bit Cygwin
	if we don't have 32-bit cygwin and we do have 64-bit Cygwin
		CYGWIN_PATH=path to 64-bit cygwin
	else
		fail
	endif

as the latter will fail if we *do* have 32-bit Cygwin.

Change-Id: I42d607a1319263edcc1d6e546b813862b7d33ffa
Reviewed-on: https://code.wireshark.org/review/2756
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 20:19:03 +00:00
Guy Harris aa0f80981a Don't check for -Wl,{option} support.
Not all AC_WIRESHARK_LDFLAGS_CHECK flags are -Wl,{option} flags, so
don't check for that first.  If we want to check for specific compilers
and linkers, we should do that, not for -Wl,{option} support.

Change-Id: Ib9581d4a1573a1ffa2493ce08e6d5845d2601352
Reviewed-on: https://code.wireshark.org/review/2755
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 19:47:07 +00:00
Guy Harris b378f72545 Fix comments to reflect reality.
Change-Id: Id56f5844932371a89785f4ddce87eb66789acdc8
Reviewed-on: https://code.wireshark.org/review/2754
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 19:27:01 +00:00
Guy Harris 27d320112e Pick up stuff from GLib to hide symbols with Sun C.
Note why we don't use G_GNUC_INTERNAL, but duplicate what GLib does, and
don't use G_HAVE_GNUC_VISIBILITY to determine whether we can use
__attribute__ ((visibility (...))).

Change-Id: I0b8d40f40d04e821352522320626173806787214
Reviewed-on: https://code.wireshark.org/review/2753
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 19:21:39 +00:00
Tim Furlong 2211813e21 Add logic to config.nmake to find 64-bit cygwin, and a note warning
about forward slashes in the QT5_BASE_PATH if the recommended qmake
command is used; both of these issues will cause annoyingly non-
obvious errors.

Change-Id: I6f9a662969d1fc1887e75e8b0fde3520bbbea416
Reviewed-on: https://code.wireshark.org/review/2749
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 19:18:29 +00:00
Graham Bloice e1e7dd0cfd Fix the QT build on Qt 5.3 or later to use the windeployqt tool
to copy the rquired Qt files into the runtime directory

Qt 5.2 is broken as windeployqt doesn't take the required --release flag

Also fix the passing of GCC_DLL and GPGERROR_DLL into config.pri so
that the Qt build copies the required files instead of the entire
gnutls bin dir twice (the variables expanded to nothing).

Add support for autodetection of Qt 5.3.0 with msvc2013

Change-Id: I1e9c70a5ff5d1fdfdce88ba15d324f1899c8129c
Reviewed-on: https://code.wireshark.org/review/2734
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 19:16:52 +00:00
Balint Reczey b5e266feda Keep VS Code Analysis happy
Change-Id: I4ef92f715d7a0a1449f1b509ce7ed59651cd1a6a
Reviewed-on: https://code.wireshark.org/review/2745
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-01 14:24:35 +00:00
Graham Bloice bd79dae438 Remove debugging info from protocol tree for frame
Change-Id: Id7f02087e536964bfa6d01a3646c20035a3ab6cb
Reviewed-on: https://code.wireshark.org/review/2746
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 12:44:31 +00:00
Balint Reczey 147db828d5 Log2() and exp2() are missing on Windows
Change-Id: I8a970f9030fafd8fdcb4e2a24620033ec8005da7
Reviewed-on: https://code.wireshark.org/review/2744
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-07-01 10:33:36 +00:00
Guy Harris 0cf54e7827 Drop privileges even earlier.
Do it at the same point at which Wireshark does so.  Do some other
things in the same order as well.

Change-Id: I2925366d49d14271ceffa1a938b5e3450337c772
Reviewed-on: https://code.wireshark.org/review/2743
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 10:11:49 +00:00
Guy Harris 9485392687 Add a comment that appears in other programs.
Change-Id: Ife885779d339fbb706c9d6cfd931833afba25277
Reviewed-on: https://code.wireshark.org/review/2742
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 10:06:11 +00:00
Guy Harris deeb1de24c Squelch some warnings.
Make some arguments and structure members gsize, as that's what stored
into them or passed to them.  (And move a newly-widened-on-LP64 item, to
avoid extra structure padding.)

Add a cast, which also appears necessary to squelch a warning.

Clean up indentation while we're at it.

Change-Id: I0cc92e7d2904c5af1f3f3d93f51b6ecb3aed464d
Reviewed-on: https://code.wireshark.org/review/2741
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 10:03:20 +00:00
Balint Reczey f90bf8ae2a Increase space allocated for IO Graph slower after 1 million items
Change-Id: I691070b572e519f412a80db5d7415331f07e8e50
Reviewed-on: https://code.wireshark.org/review/2689
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-07-01 09:24:39 +00:00
Balint Reczey 524583298b GTK: Unlimited, dynamically allocated IO Graph
Bug: 8460
Change-Id: Id9aad3f5f69bee9e5a62601ecac28a6a7019e623
Reviewed-on: https://code.wireshark.org/review/2672
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-07-01 09:24:05 +00:00
Joerg Mayer eb239946c6 Generate version.h before adding subdirs (especially wsutil). Otherwise
build could fail in wsutil because of missing version.h

Change-Id: If6fdf1080c6de9ca1581bcc126506e78ec03a1d8
Reviewed-on: https://code.wireshark.org/review/2740
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-01 06:22:29 +00:00