Commit Graph

202 Commits

Author SHA1 Message Date
Guy Harris 5bfc21cf9e Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.

If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.

Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.

Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.

Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 21:03:09 +00:00
Guy Harris 318205e699 Fix an error caught by enum-conversion warnings.
(Strong typing is for weak minds.

Human minds are weak.

Therefore, strong typing is for human minds.)

Change-Id: I099b85e98f3b9742b1addd8d260b3e94ca7add31
Reviewed-on: https://code.wireshark.org/review/2866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-05 22:22:44 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +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 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
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 b671551625 Another file to generate in the configure script.
Change-Id: I6dafc9ab9fafd465cb2ad83e5e56e4d22b36d41b
Reviewed-on: https://code.wireshark.org/review/2609
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 03:35:47 +00:00
Guy Harris 213189ef9e Move the routines to talk to dumpcap into a static libcapchild.
This pulls some stuff out of the top-level directory, and means we don't
have to build them once for every program using them.

Change-Id: I37b31fed20f2d5c3563ecd2bae9fd86af70afff5
Reviewed-on: https://code.wireshark.org/review/2591
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-23 23:58:29 +00:00
Guy Harris 421d817d70 Don't compile anything with -msse4.2 unless the compiler supports it.
This includes ws_mempbrk_sse42.c; if the compiler doesn't support
-msse4.2, HAS_SSE4_2 isn't defined, so all the stuff in
ws_mempbrk_sse42.c that uses SSE 4.2 will be #ifdeffed out.

Not all compilers with which we're built will support -msse4.2; in
particular, the ones that aren't compiling for x86 won't....

Change-Id: I69566ca06f602104b40c78b3b06fcb7dfeb054b2
Reviewed-on: https://code.wireshark.org/review/2373
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 09:50:43 +00:00
Jakub Zawadzki 7bae85acb8 Fix x86 buildbots, revert sse4.2 AM_CONDITIONAL logic
Change-Id: I0b594089753980b58f702e86293028c8dc7e4e54
Reviewed-on: https://code.wireshark.org/review/2363
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 05:39:20 +00:00
Guy Harris 20accf341c Don't do the check for clang/clang++.
Adding -Qunused-arguments to CXXFLAGS causes the checks for -f and -m
flags not to fail with clang++, causing the configure script to warn
about -f flags supported by clang but not clang++ indicating that the
compilers are a mismatched pair.

The checks we do for flags should eliminate "unused" -f/-m flags,
suppressing the warnings that way.

Change-Id: I749d6f499a3d34300518cc0ba539f355377359af
Reviewed-on: https://code.wireshark.org/review/2362
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 04:58:42 +00:00
Guy Harris a61ebef1a5 Set the conditional SSE42_SUPPORTED in all circumstances.
This might fix the Solaris/SPARC build error

	configure: error: conditional "SSE42_SUPPORTED" was never defined.
	Usually this means the macro was only invoked conditionally.

(not all the world's a VAX^Wx86).

Change-Id: Ib189ce70b203875188cee3266b8652c02ca34237
Reviewed-on: https://code.wireshark.org/review/2358
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 01:23:43 +00:00
Jakub Zawadzki 6664030571 Rewrite check for ws_mempbrk_sse42.c compilation
- check only for -msse4.2
- check if there's nmmintrin.h header
- don't check if current CPU support -msse4.2 (fix cross compilation)

Change-Id: Iba8d291fdf5602937ab540a69b7608a81427ad25
Reviewed-on: https://code.wireshark.org/review/2189
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17 23:58:52 +00:00
Jeff Morriss aeb1888a50 Remove the (old, broken) Python bindings option to ./configure (and a few other references).
Change-Id: I470502bfae6617a798d0c2538f0f04ff7d36fee5
Reviewed-on: https://code.wireshark.org/review/2277
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-16 21:19:28 +00:00
Gerald Combs a82c8d1cff More wspython removal.
Change-Id: I09b7bac7906f0e134459c4a81a7ef626e6590d5b
Reviewed-on: https://code.wireshark.org/review/2276
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-06-16 21:09:48 +00:00
AndersBroman fcb019acb8 Change HAVE_SSE42 to HAVE_SSE4_2 add $(SIMD_FLAGS)
Add autotools macros to distribution
Call AX_EXT to define HAVE_SSE4_2

Change-Id: I9ff085d923dfafb32510cdd14290e74a2aaea302
Reviewed-on: https://code.wireshark.org/review/2110
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 14:51:26 +00:00
Alexis La Goutte 62fd14cbd7 Add nghttp2 lib (HPACK)
Change-Id: I2a361951924045035a2a5d38f943e6b97c170f36
Reviewed-on: https://code.wireshark.org/review/1623
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-31 13:11:05 +00:00
Balint Reczey 7bf49b31ac Set PLUGIN_INSTALL_DIR properly for wireshark.pc
Change-Id: I64c04095ce780ce2cc44a54a68695506d27e5747
Reviewed-on: https://code.wireshark.org/review/1861
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-30 12:48:08 +00:00
Gerald Combs 285405a0d7 1.11.4 → 1.99.0.
Change-Id: I5b0f713fdbc63e78f4f52177317c0e536aca3044
Reviewed-on: https://code.wireshark.org/review/1761
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-05-23 20:57:42 +00:00
Alexis La Goutte ca97ba0fcb Update comment about -Wunreachable-code and -Wdocumentation
Change-Id: I5b942bdacc5f4a9ecfa084dbff479eba6582b0df
Reviewed-on: https://code.wireshark.org/review/1726
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-23 07:23:42 +00:00
Guy Harris 4fdd528f89 "extra *compiler* warnings", not just "extra warnings".
Rename --enable-extra-warnings to --enable-extra-compiler-warnings, and
have the message talking about "extra warnings" talk about "extra
compiler warnings", to make it more uniform (the documentation for the
--enable flag speaks of "additional compiler warnings") and to clarify
that these are warnings from the compiler, not from *shark.

Change-Id: Ic1a045670144f8d9eda2e3427142027e2a339156
Reviewed-on: https://code.wireshark.org/review/1230
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-20 23:50:04 +00:00
Guy Harris 0bdd9a7d7a Rename --enable-extra-compiler-checks to --enable-extra-warnings.
That makes it clearer that what we're enabling are extra warnings, and
fits better with the description for --enable-warnings-as-errors, which
says the default is "yes, unless extra warnings are enabled".

Change-Id: If21f778df0dfdb98acbe02cb6a763ed27f2a7f91
Reviewed-on: https://code.wireshark.org/review/1227
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-20 22:53:18 +00:00
Guy Harris 68f9811b1b Don't distinguish between "GCC" and "Clang" extra -W flags.
We test whether a given compiler supports a given -W flag, so we don't
need to separate them and check them only for particular compilers.

To make that even clearer, rename the --enable option from
--enable-extra-gcc-checks to --enable-extra-compiler-checks, and
document it as just "do additional -W checks", and rename the
WIRESHARK_EXTRA_GCC_ CMake variables to WIRESHARK_EXTRA_COMPILER_.

Sync up the lists of warning flags in CMake with the lists in autoconf.

Uncomment -Wdocumentation while we're at it.  If it doesn't work *at
all*, comment it out until it's fixed, or, better yet, fix it; if it
still produces warnings, we just leave it among the "extra" flags.

Change-Id: I4042affdade612e4025e2881d08f1ca69d759626
Reviewed-on: https://code.wireshark.org/review/1226
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-20 22:47:18 +00:00
Gerald Combs 3f0bc55ed0 Add license compatibility information for GMP (used by GnuTLS).
Update GLib and GTK+ release dates and add Qt release dates while we're
here.

Change-Id: Ia0da8f6e118e5737d19d321ce3fae6de75477b08
Reviewed-on: https://code.wireshark.org/review/1157
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-15 19:01:24 +00:00
Gerald Combs d73d1f14b3 1.11.3 → 1.11.4.
Change-Id: I0bf8792b9b524ae4d8e1022b234e2510972c7019
Reviewed-on: https://code.wireshark.org/review/1154
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-15 17:29:19 +00:00
Alexis La Goutte 280c2958f2 Add --enable-extra-clang-checks for autotools and CMakeList
With -Wunreachable-code flags (and disable for the moment -Wdocumentation)

Change-Id: I126c962b32e650a63b78092e95896736ae7335c9
Reviewed-on: https://code.wireshark.org/review/678
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-31 08:29:58 +00:00
Alexis La Goutte d43f7d134b Remove -Wunreachable-code it is removed from GCC
http://gcc.gnu.org/ml/gcc-help/2011-05/msg00360.html

Change-Id: I3f016611d0dc5e7cc6d53965f9b5d2b1ee88fe1c
Reviewed-on: https://code.wireshark.org/review/677
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-17 14:32:44 +00:00
Guy Harris 907d24db89 Get rid of $Id$, add some comments.
Change-Id: I3f34484f18fba45b23b5acc924b56e5b62291114
Reviewed-on: https://code.wireshark.org/review/627
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-12 23:12:14 +00:00
Michal Labedzki 10084c344c RTP: Add support for SBC codec in RTP Player
Add optional dependancy to libsbc to play Bluetooth SBC in
A2DP payload. Also simplify RTP Player and extent codec interface.

Change-Id: I52e1fce9c82e2885736354fe73c6c37168a4fda3
Reviewed-on: https://code.wireshark.org/review/19
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-12 01:36:02 +00:00
Jörg Mayer 5783452ab2 -Warray-bounds was listed twice
svn path=/trunk/; revision=54839
2014-01-18 22:52:56 +00:00
Guy Harris 035526af10 tfshark.c doesn't build without warnings, so default to "don't build it"
for now.

svn path=/trunk/; revision=54651
2014-01-08 05:36:36 +00:00
Guy Harris cd7909ebdf Handle tfshark.
svn path=/trunk/; revision=54650
2014-01-08 05:34:02 +00:00
Michael Mann bf284da2ee TFShark (Terminal Fileshark) v.001. Bug 9607 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9607)
This is a VERY PRELIMINARY version of tfshark.  It's an attempt to jumpstart FileShark and its architecture.  Right now it's mostly just a very stripped down version of tshark with all of the necessary build modifications (including now building filetap library since tfshark depends on it)

This code has helped me identify what I believe to be all of the necessary layers for a complete fileshark architecture.  And those layers will slowly be added in time (patches always welcome!).

svn path=/trunk/; revision=54646
2014-01-08 04:35:28 +00:00
Jeff Morriss ef5e9fd6b4 Don't try to build asn1/asn1/Makefile either (see r54561).
svn path=/trunk/; revision=54571
2014-01-02 20:48:33 +00:00
Jeff Morriss d91261a53b Don't try to build asn1/gnm/Makefile (see r54561).
svn path=/trunk/; revision=54567
2014-01-02 19:48:26 +00:00
Martin Kaiser 43e892e985 From Dirk
dissector for Novell's PKIS certificate extensions

from me
clean up the $Id$ tags
remove packet-pkis(-template).h
remove ASN.1 definitions that cause compiler warnings
   (OID, SecurityLabelType2)
move the dissector to the clean ASN.1 dissectors
support CMake build
change the name to novell_pkis

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9597

svn path=/trunk/; revision=54508
2013-12-31 14:20:08 +00:00
Guy Harris cc74708a79 Fix some typoes, quote $CFLAGS and $LDFLAGS when using them in
assignments (not sure that's necessary, but...).

svn path=/trunk/; revision=54474
2013-12-27 11:08:41 +00:00
Guy Harris 8713e0457b Some warning options are, for reasons not entirely obvious to me, not
supported by some versions of g++ even though the corresponding version
of gcc supports them.  Other versions of g++, and clang, support them.

Check, before adding a -W option for C++, whether the compiler supports
it; that check must be done with -Werror, at least with g++, in order to
get a non-zero exit status from the compiler.

svn path=/trunk/; revision=54447
2013-12-24 18:43:42 +00:00
Bill Meier 6ec4ba58a1 If Gtk >= 3.10, allow use of deprecated Gtk features (and prevent 'deprecated' warnings);
Given that Wireshark is moving to QT, the Wireshark changes required to
fix the features deprecated in Gtk 3.10 will not be done.

svn path=/trunk/; revision=54337
2013-12-21 18:16:07 +00:00
Jakub Zawadzki 53f438b4ed Allow -Wmissing-prototypes only for C
It should fix:
	cc1plus: warning: command line option `-Wmissing-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]

(only g++ complains, clang is OK with -Wmissing-prototypes)

svn path=/trunk/; revision=54086
2013-12-14 10:43:29 +00:00
Guy Harris e21fd7c0ce Add a "captype" file that just reports the type of a capture file, based
on what libwiretap thinks it is.

Update some comments to reflect the death of the hack used to include
(libwiretap) plugin support in programs not built with libwireshark.

svn path=/trunk/; revision=54015
2013-12-13 02:59:16 +00:00
Jeff Morriss 69017ac3bd Overhaul rpm-building options a bit: as suggested by Anders, have the RPM follow
./configure's options for gtk2 vs gtk3 vs qt.

Make it possible to not build the GNOME package (now both UIs' packages are
optional).  I think Chris requested this a while ago.

If this works out it may make sense to control the rest of the options via
./configure .

svn path=/trunk/; revision=53607
2013-11-26 23:43:18 +00:00
Guy Harris 4dbed5fbd0 According to
http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Code-Gen-Options.html#Code-Gen-Options

-ftrapv "generates traps for signed overflow on addition, subtraction,
multiplication operations." and -fwrapv "instructs the compiler to
assume that signed arithmetic overflow of addition, subtraction and
multiplication wraps around using twos-complement representation."

Those seem mutually-exclusive to me, and we probably want wrapping, not
traps, as there's probably a fair bit of code out there that explicitly
or implicitly assumes wrapping.  (Actually, we really want to avoid
signed arithmetic for the cases that most matter, such as offsets and
lengths, but, unfortunately, we currently have API conventions that
allow negative values for lengths, either with -1 meaning "to the end"
or with negative values meaning "relative to the end".)  In addition,
there seem to be some bugs complaining that -ftrapv doesn't always cause
traps on signed integer overflow.

We seem to be seeing crashes in Lemon on the Solaris buildbot subsequent
to adding -ftrapv; I don't know whether that's an overflow being
detected, a bug in the compiler, or something unrelated, especially
given that we're using Sun C, not GCC, on the Solaris buildbot. 
However, we'll try removing -ftrapv, to see if it fixes the problem; the
MIT CSAIL paper in question wasn't really recommending all the GCC
options it mentioned (which, as noted, wouldn't make sense, as -ftrapv
and -fwrapv appear to be mutually-exclusive).

svn path=/trunk/; revision=53556
2013-11-24 22:51:44 +00:00
Balint Reczey ee147994b7 Use GCC flags to avoid optimization problems due to undefined behaviour
Adding flags suggested by article at:
http://pdos.csail.mit.edu/~xi/papers/stack-sosp13.pdf

svn path=/trunk/; revision=53551
2013-11-24 20:28:25 +00:00
Alexis La Goutte 001d79cac3 Add -Wheader-guard to Autotools and CMake
svn path=/trunk/; revision=53507
2013-11-22 14:51:31 +00:00
Alexis La Goutte d28d1a8240 Fix compilation with Clang (Remove limitation to -fPIE to only C)
/usr/include/qt5/QtCore/qglobal.h:1079:4: error:
"You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."

svn path=/trunk/; revision=53432
2013-11-19 12:27:09 +00:00
Gerald Combs 16e27047d0 1.11.2 → 1.11.3.
svn path=/trunk/; revision=53412
2013-11-18 17:41:00 +00:00
Gerald Combs f772a268db 1.11.1 → 1.11.2.
svn path=/trunk/; revision=53346
2013-11-15 22:34:31 +00:00
Alexis La Goutte 4bff9d32a0 Enable Packet Editor by default
svn path=/trunk/; revision=53132
2013-11-07 07:42:35 +00:00