Commit Graph

184 Commits

Author SHA1 Message Date
Guy Harris 6a949ed155 Put special pipe-handling code into libwsutil.
Ask, in a comment, why we're doing PeekNamedPipe() when we're trying
to read everyting in the pipe, up to the EOF, into a string.

On UN*X, do the same "read up to an EOF and then NUL-terminate the
result" stuff that we did on Windows; nothing guarantees that, on all
UN*Xes, in all circumstances, until the end of time, world without end,
amen, we can do one read and get the entire string.

Change-Id: I578802b23fec1051139eaefd9a09fe2a6de06a11
Reviewed-on: https://code.wireshark.org/review/24959
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-23 20:43:32 +00:00
João Valverde 262a84c384 Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support
libraries only.

Before the patch:

Static plugins don't work with CMake and autotools.

autotools static build is broken, and most likely will always be, as
building Wireshark all-static is difficult and time-consuming.

After the patch:

For CMake Wireshark will be built with static or shared libraries and
dynamic plugins. Everything just works. CMake apparently doesn't want
you building static and shared libraries at the same time.

For autotools Wireshark will be built with shared libraries by default.
--disable-shared and --enable-static options work as usual. Dlopened
plugins are not built if --disable-shared is given to configure (to
disable shared libraries). This is a limitations imposed by libtool.

Tested on Linux. This removes broken support for building plugins
statically.

Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c
Reviewed-on: https://code.wireshark.org/review/24241
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-19 20:16:50 +00:00
João Valverde eae216ef1d Remove replacement inet_pton/inet_ntop
Should be available on every platform we support.

Change-Id: Ib65d78e351d22d581b427e5e93fc8d5e5348b260
Reviewed-on: https://code.wireshark.org/review/24047
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-25 21:03:56 +00:00
João Valverde 90644c8372 Remove inet_aton() usage everywhere
Including where it says not to in comments. Use IPv4 dotted-decimal
notation.

Change-Id: Iafe1f6fbd2bd5867c41642dc27411f47dff8ce6a
Reviewed-on: https://code.wireshark.org/review/24044
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-25 19:10:57 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).

Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.

Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.

Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
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>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-13 21:32:18 +00:00
João Valverde 978f6b4e1a plugins: Fix paths to match WSUG
The Wireshark User Guide seems to say:

Global lua plugins are in $pkglibdir/plugins
Personal lua plugins are in XDG_CONFIG_HOME/plugins

Global binary plugins are in $pkglibdir/plugins/$version
Personal binary plugins are in XDG_CONFIG_HOME/plugins/$version

Fix code to match that. This is a backward-incompatible change
for global lua plugins and personal binary plugins.

Adds a version subfolder to the personal plugin folder for binary plugins.

This allows for safe upgrades and side-by-side installations
with different prefixes (they no longer use the same personal dir).

Change-Id: Ie0f039113628a257625a9a9fb2cb30e532f5dd47
Reviewed-on: https://code.wireshark.org/review/23516
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>
2017-09-17 16:54:52 +00:00
João Valverde 21d2158a0b CMake: Initial work to install headers for the benefit of plugins
To be continued incrementally to fix gaps and omissions.

If we are willing to reorganize the source tree to have one or two header
include folders this could be simplified considerably.

It would also force developers to give more consideration to API issues,
which is a good thing.

See also e7ef19efc0.

Bug: 14062
Change-Id: I0759da2f9793cfb5cf92c9e231457bba43df4353
Reviewed-on: https://code.wireshark.org/review/23548
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>
2017-09-17 07:22:16 +00:00
Ahmad Fatoum aa2117a8f2 Include xtea.[hs] in CMakeLists.txt and Makefile.am
CMake part was missing. Autotools part didn't include header.

Change-Id: I5a642a80d30b02bb16eb48e0e4e1f8e0e8332a75
Reviewed-on: https://code.wireshark.org/review/23051
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-12 23:18:36 +00:00
Guy Harris 5039d0e576 Change some names to reflect Apple's new UNIX-for-Macs name.
{OS_X,os_x} -> {MACOS,macos}.

Change-Id: Icebea6ab566c65996ee97bacb88fac7e84ec32de
Reviewed-on: https://code.wireshark.org/review/22161
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-16 08:50:22 +00:00
Ahmad Fatoum 502cc61711 Move RSA key loading and decryption functions to wsutil
Loading PEM and PKCS#11 keys was being done in static functions
in packet-ssl-utils.c. These were moved to wsutil, with prototypes
in a new <wsutil/rsa.h> header. This adds gnutls as optional
dependency to wsutil.

The RSA decryption helper was also moved and is now provided in
<wsutil/wsgcrypt.h>.

This allows more dissectors to access this functionality.

Change-Id: I6cfbbf5203f2881c82bad721747834ccd76e2033
Reviewed-on: https://code.wireshark.org/review/21941
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>
2017-06-05 23:43:03 +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
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X
10.0", for example.  It was "Mac OS X" until 10.8 (although 10.7 was
sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS
X" from 10.8 to 10.11.

Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3
Reviewed-on: https://code.wireshark.org/review/20933
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05 19:16:22 +00:00
erikdejong fe285c640b Replace aes.c and des.c by Libgcrypt
Follow-up of https://code.wireshark.org/review/20095

Rewritten functions:
- crypt_des_ecb

crypt_des_ecb verified against previous crypt_des_ecb implementation with
4294967295 random keys and input buffers from /dev/random as I cannot find a
suitable pcap which uses DES

Change-Id: I21ec2572451e0ded4299ffadd8dd687817bc6318
Reviewed-on: https://code.wireshark.org/review/20429
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-10 02:54:51 +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
AndersBroman e2e4415c9f Add some glib functions not available in older glibs
Change-Id: I6526d799447a3b6c0b9bb42f8d0f8c3415299ed0
Reviewed-on: https://code.wireshark.org/review/20158
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-02-20 12:55:49 +00:00
Peter Wu d5fdbef7f4 cmake,wslua,wsutil: load files from run/ instead of source tree
Fixes Lua on macOS, tested with an out-of-tree build:

    WS_BIN_PATH=$PWD/run ../wireshark/test/test.sh -s wslua

Previously programs that were ran from the build directory would load
data files (radius/, diameter/, init.lua) from the source directory.
Then in the case of Lua, files were loaded from the program directory
($BUILDDIR/run/init.lua on Linux) or source directory
(sSOURCEDIR/epan/wslua/console.lua).

On macOS, this does not work for Lua since files are installed into
$BUILDDIR/run/Wireshark.app/Contents/Resources/share/wireshark/init.lua
instead. Since CMake always copies data files (radius, console.lua,
etc.) into the build directory, make get_datafile_dir() return this
"run" directory instead.

Change-Id: If97d2f5686271caf9ad4d4e4fc58e902dc592a98
Reviewed-on: https://code.wireshark.org/review/19330
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-20 13:16:57 +00:00
Michael Mann 26e883a75c Move Base32_encode from packet-fc00.c to wsutil (as ws_base32_decode)
There could be some reuse out of it, so but it with the rest of the
general utilities.

Change-Id: I404c135b933660a82678510b9ca2701985c5632a
Reviewed-on: https://code.wireshark.org/review/18589
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-11-02 04:34:44 +00:00
Dario Lombardo 11c10244ef wsutil: split libjsmn.
The libjsmn was imported into the tree and enhanced with a new
function. This change splits it into the "original" libjsmn and
an addictional module wsjsmn that contains the new function.
This will make easier to port within the tree future versions
of the library.

Change-Id: I3f1caa91bee462e0767e5e18d0b6a10f0b1cad32
Reviewed-on: https://code.wireshark.org/review/17963
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-30 20:12:00 +00:00
Peter Wu 534787e402 cmake: make WERROR_COMMON_FLAGS a normal string
Instead of checking for the boolean "FALSE", just set an empty string.
This avoids the need to check for WERROR_COMMON_FLAGS before using it.

The transformation is the same for all files, remove
"if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since
we have a string here and not a list).

Modelines have been added where missing.

Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92
Reviewed-on: https://code.wireshark.org/review/17997
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
2016-09-30 20:08:02 +00:00
Stig Bjørlykke 0703c7b414 dumpcap: Include CPU info as hardware description in SHB
Add CPU info as hardware description in session header block when
using pcapng.

Use capture_comment from the capture_options structure when using
ring buffer.

Change-Id: I5e688fc2d6ab61de1f64ad9a8a96e6e39e8cf708
Reviewed-on: https://code.wireshark.org/review/17862
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-09-23 08:13:43 +00:00
Dario Lombardo ba981aced8 wsutil: add string to integer conversion utilities.
In the current code many functions have been used for convertion
(strtol, atoi, g_ascii_strtoll, etc). Those utilities want to be
the only, shared, way to convert integers.

Change-Id: I22ba1bf54e144e73a4728612a4437de5a2d339e2
Reviewed-on: https://code.wireshark.org/review/17414
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-09-05 09:54:12 +00:00
Dario Lombardo 139170c6c6 wsutil: add enumeration of local ip addresses in Windows.
Routine used by ssh-based extcaps.

Change-Id: I06d8e1e1444cd03a0508dc0c7cb91d340a451c58
Reviewed-on: https://code.wireshark.org/review/17308
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-08-26 21:04:40 +00:00
João Valverde 640382c743 CMake: Allow setting per target compiler warnings
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow
using different flags per target.

Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS
and using the COMPILE_OPTIONS property to set them.

This change is just setting mechanism and there should be no difference
in generated warnings.

The check_X_compiler_flag cmake test is changed to test each flag individually.
We need a list, not a space separated string, and the aggregate test is not
significant.

Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25
Reviewed-on: https://code.wireshark.org/review/17150
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-08-23 21:33:09 +00:00
Roland Knall 79836fa23a wsutil: Move Win32 helper routines from capchild
Move error handling and argument quoting routines from
capchild to wsutil, as those methods will be used by
extcap_spawn as well.

Change-Id: I2c4515fefd5aecad317fcdaefa721734288f792c
Reviewed-on: https://code.wireshark.org/review/16123
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-06-25 15:06:27 +00:00
Pascal Quantin df231d9c52 libcodecs and libwsutil are DLLs, not static libraries
Change-Id: I4486f35e07c72d4ca35d5649de25d0c9abd2a964
Reviewed-on: https://code.wireshark.org/review/16057
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-21 14:31:16 +00:00
Graham Bloice 2e23b506c7 Add checkAPI calls to CMake.
This generates a top level target, checkAPI, that is
excluded from the ALL build target, so must be run separately.

On Windows using a Visual Studio generator, call
msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj

Change-Id: I44a57c564dcfc75499463b942436f4b920a82478
Reviewed-on: https://code.wireshark.org/review/14873
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-05-02 12:01:24 +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
João Valverde 7f873d92cb Use AC_REPLACE_FUNCS and LTLIBOBJS
Change-Id: I0f46167fe900c39d678560809cd5391c2a9bc4d2
Reviewed-on: https://code.wireshark.org/review/14809
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-04 23:58:41 +00:00
João Valverde 31dd7a2da7 Fix cmake libwsutil zlib missing linkage
Change-Id: I803f5fee26d2f10d56cad774a71c71d3dcbbcc20
Reviewed-on: https://code.wireshark.org/review/14787
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-03 04:58:02 +00:00
Gerald Combs 6ed543dbe6 Remove the last remnants of U3 support.
Change-Id: Ide4c177e67a77c5f9495b3b4c0f817f40e6dde30
Reviewed-on: https://code.wireshark.org/review/14425
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-11 19:55:57 +00:00
Dario Lombardo 68d4ba212c extcap: add local_interfaces_to_list() to wsutil.
This new function abstracts the creation of a list of the local
interfaces that will be used by future extcaps to generate specific
filters. Sshdump now uses it to create a pcap filter.

Change-Id: I5b75a266f81104b3c9bcb3e51de246b7cc8785ce
Reviewed-on: https://code.wireshark.org/review/14092
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-04 05:53:56 +00:00
João Valverde 8bee8bad81 Add inet_pton/inet_ntop interface to libwsutil
Change-Id: Ifc344ed33f2f7ca09a6912a5adb49dc35f07c81f
Reviewed-on: https://code.wireshark.org/review/13881
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-02-19 15:55:09 +00:00
Cedric Izoard 16bee215c1 Add functions for SHA256 and HMAC-SHA256
- Use same API as SHA-1
- Tested against NIST's test vectors (byte oriented implementation)

Bug: 11312
Change-Id: I7fea7d13c43da059138153b17de7084ef9d81ac5
Reviewed-on: https://code.wireshark.org/review/13662
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>
2016-02-03 20:53:03 +00:00
João Valverde e639a13d11 cfutils.c: Fix ISO C forbids an empty translation unit [-Wpedantic]
Change-Id: Iac9384e63a4e946c73832103f8d6949f0187fa38
Reviewed-on: https://code.wireshark.org/review/12147
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-29 21:54:34 +00:00
Gerald Combs b05803db4b CMake: Add /WX
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off,
similar to config.nmake.

We haven't compiled C++ code with -Wshorten-64-to-32 for quite 
some time so there's no need to add -Wno-shorten-64-to-32 in
ui/qt/CMakeLists.txt.

Additionally, squelch

----
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled
        with
        [
            _Iter=QList<QString>::iterator
,            _RanIt=QList<QString>::iterator
,            _Diff=int
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
----

in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp
so that we'll compile successfully.

Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357
Reviewed-on: https://code.wireshark.org/review/10533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 21:32:22 +00:00
Peter Wu e6a071db05 cmake: link against dl, fixes linking with gold
wsutil/filesystem.c uses dladdr (when available), but does not declare a
dependency on it. Adding it fixes a CMAKE_C(XX)_FLAGS=-fuse-ld=gold
build failure:

    run/libwsutil.so.0.0.0: error: undefined reference to 'dladdr'

This change is somehow not necessary for autotools, just for cmake.

Change-Id: I642a7d85f9c33541831262f930e73d1f47c58b60
Reviewed-on: https://code.wireshark.org/review/10906
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-13 07:35:55 +00:00
Joerg Mayer 57b2b77022 cmake: rework version.h handling to treat it like config.h
It wasn't working on my system: I kept seeing the old git revision
in '...shark -v' even after deleting version.h

Change-Id: I75f41a7afcee4b9384f33a56014e4af6b527fec5
Reviewed-on: https://code.wireshark.org/review/10265
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-26 07:37:02 +00:00
Gerald Combs c643cbfb81 Run abicheck commands at compile time.
The CMake dumpbabi targets collectively copy over 800 files. Do
that when when we build the actual targets instead of at configure
time. Hopefully this will speed up initial CMake runs.

Change-Id: I6e4d691e24c73ea05d638a0f897f570541c84e38
Reviewed-on: https://code.wireshark.org/review/10052
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 16:04:47 +00:00
Gerald Combs ece4b01f21 Add the wireless toolbar.
Add the wireless toolbar to the Qt UI.

Start adding AirPcap support to ui/80211_utils. Add FCS validation
routines to ws80211_utils.

Move a bunch of AirPcap routines that require epan from caputils to
ui/gtk. They were required for driver key management, which we'll
leave to the AirPcap Control Panel in the Qt UI.

Move frequency-utils to wsutil.

Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1
Reviewed-on: https://code.wireshark.org/review/8910
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 03:45:54 +00:00
Guy Harris 493ab6bcf3 Check whether emmintrin.h can be used *without* -msse4.2.
If not, we can't use SSE 4.2, as we need to be able to include it in
files that use tvb_pbrk_compile()/tvb_pbrk_exec() even if they're not
compiled with -msse4.2 (most files aren't, as we need to isolate SSE 4.2
instructions to a small bit of code that uses them only if running on
hardware that supports them).

Change-Id: I62262a3c45fa14e200967916ac0ffc283f8e322c
Reviewed-on: https://code.wireshark.org/review/7246
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-19 02:42:11 +00:00
Dario Lombardo bd911096bd Added JSON native file support.
libjsmn has also been moved from epan/ to wsutil/ to make it visible from wiretap.

Change-Id: I59abb3419acb1baa83194b38152d3651ed5c123c
Bug: 10878
Reviewed-on: https://code.wireshark.org/review/6716
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-17 11:08:51 +00:00
Guy Harris d3d0a0a802 Fix SSE 4.2 checks.
CMake has "normal" and "cache" variables, and unexpected things happen
if you have a normal and a cache variable with the same name.
Apparently, check_c_compiler_flag() currently sets its result variable
as a cache variable, and set(), by default, sets it as a normal
variable.

This means that there are two different HAVE_SSE4_2 variables, and the
top-level CMakeLists.txt looks at the cache variable when it creates
config.h; this means that if the nmmintrin.h test fails, config.h still
says we have SSE 4.2.

Instead, use separate variables for the "compiler can be made to
generate SSE 4.2 code" test and the "nmmintr.h works" test; that way we
don't have to worry about normal vs.  cache variables (and don't have to
worry about CMake changing what type of variable particular
functions/macros set).

Change-Id: I618ad402b248f35fffd822974b6a569d4e5d6398
Reviewed-on: https://code.wireshark.org/review/7073
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-11 22:21:19 +00:00
Guy Harris bc86257750 Also support -xarch=sse_42 in the Sun C compiler for x86(-64).
Change-Id: Ib6d0ae9c237b96568e2522d2077b311b3ac5af2e
Reviewed-on: https://code.wireshark.org/review/6706
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21 07:27:40 +00:00
Guy Harris db6f7339f7 Always set the COMPILE_FLAGS property, so we can always fetch it.
If we aren't adding -Werror, just set it to a null string, so when we
fetch it to add the SSE 4.2 flag to it for ws_mempbrk_sse42.c, it
doesn't fail.

Change-Id: I53858130c025e094ed8d0d975451961506fb1a39
Reviewed-on: https://code.wireshark.org/review/6704
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21 04:39:33 +00:00
Guy Harris 41cbbc2f77 Don't set SSE4_2_FLAG to -msse4.2 unless -msse4.2 works.
Change-Id: I54eca86d53dc0e4015a15491b9adfdfe9ef9e346
Reviewed-on: https://code.wireshark.org/review/6703
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21 04:33:07 +00:00
Guy Harris 8a0bd92722 Check whether we can use nmmintrin.h.
If we think the compiler supports SSE 4.2, check whether we can use
nmmintrin.h if we tell the compiler to compile with SSE 4.2 support; if
not, disable SSE 4.2 support.

This matches what we do in autotools.

Change-Id: I474d53d2fe7e2628faca7309efd7155b63bd7eab
Reviewed-on: https://code.wireshark.org/review/6702
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21 03:18:06 +00:00
Guy Harris bf239535b9 Only turn -msse4.2 on for ws_mempbrk_sse42.c, and don't always build it.
Move all the SSE 4.2 stuff to wsutil/CMakeLists.txt.

Don't put ws_mempbrk_sse42.c in WSUTIL_FILES by default; add it if we
think the compiler supports compiling for SSE 4.2.

Add -msse4.2 to its COMPILE_FLAGS, but don't add it to any other
compiler flags - we don't want to build anything else with -msse4.2 by
default, as the only code that uses SSE 4.2 instructions but *only* does
so if the processor supports it is our mempbrk implementation.  (And
*add* it, don't *replace* the existing flags with -msse4.2; that way,
-Werror is left in there as well.)

Change-Id: I979b37a37e4b88b3af11e2275e89441118c8ce0a
Reviewed-on: https://code.wireshark.org/review/6698
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21 02:45:35 +00:00
Graham Bloice 528a857258 Fix CMake generation and use of Windows .rc files
CMake now generates local copies of .rc files for all the Windows
components and uses the files in the build of the components.

The .rc.in files that include an icon were modified to allow the icon
path to be set by CMake.  The path is removed for nmake builds.

Updated build architecture detection, required for wireshark.manifest.in

Change-Id: I7b1ff43050e9b0efb861d1041636fb4aef49a4f8
Reviewed-on: https://code.wireshark.org/review/6482
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-11 20:22:32 +00:00
Graham Bloice a7a17047eb Minor CMake updates to better group build artefacts
Move capchild, caputils, codecs and wsutil into a Libs group
Move gtkui into UI group
Move update-sminmpec into tools group

Change-Id: Iaf2bfe4697265af2c3ed9c9d7de2d5d1ef3cafee
Reviewed-on: https://code.wireshark.org/review/6332
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-05 23:48:46 +00:00
Guy Harris cb7c949091 Move some routines into ws_version_info.c.
The routines to get compiler, GLib version, CPU, and memory info are
used only in routines in ws_version_info.c; move them into
ws_version_info.c and make them static.

Change-Id: I58edd18da3301095012d2c7a3c5198e5a7073964
Reviewed-on: https://code.wireshark.org/review/6183
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 19:34:40 +00:00
Guy Harris 20503c7047 Check for getopt_long(), not getopt().
We support three types of platforms:

	1) UN*Xes that have both getopt() and getopt_long();

	2) UN*Xes that have getopt() but not getopt_long();

	3) Windows, which has neither.

Checking for getopt_long() lets us distinguish between 1) and 2) and
build getopt_long() for them.

Change-Id: Iaf0f142f9bebaa2eed2128d544ec9786711def45
Reviewed-on: https://code.wireshark.org/review/6045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-25 01:11:10 +00:00
Guy Harris 2233ef59c9 Include some files based on whether the functions they define are present.
Rather than including wsgetopt.c, inet_aton.c, and strptime.c iff we're
building for Windows:

	include wsgetopt.c iff we don't have getopt();

	include inet_aton.c iff we don't have inet_aton();

	include strptime.c iff we don't have strptime().

Change-Id: Ibd68306ac372a4ae102c3220a94cdf6ecb04e58c
Reviewed-on: https://code.wireshark.org/review/6044
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-25 00:13:55 +00:00
Guy Harris 153c63d3ff Don't use extra variables for ws_mempbrk_sse42.c and popcount.c
Instead, just add to WSUTIL_FILES as necessary.

Change-Id: Iecadbd9a66ec54ee5d90aecfbfe5e636ae56e27e
Reviewed-on: https://code.wireshark.org/review/6043
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-24 23:55:15 +00:00
Guy Harris 1b37f4c5ef Cmake: check for popcount, and build it from wsutil/popcount.c if missing.
Change-Id: Id646a9f0b1fc6acafa99a78725e3f0ec8a48c170
Reviewed-on: https://code.wireshark.org/review/6006
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-23 05:04:17 +00:00
Guy Harris 7a787927a5 Don't use -msse4.2 with MSVC.
Change-Id: I457d45d9ad05e0eb851e78a7342e666ef9df8ffd
Reviewed-on: https://code.wireshark.org/review/5086
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-03 16:39:54 +00:00
Gerald Combs 3a4cab751e CMake: Bundle our libraries.
Change-Id: I5df4d794602f7e53c2f4f496597f8eaf7c7b6eaa
Reviewed-on: https://code.wireshark.org/review/4588
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-10 01:45:55 +00:00
Guy Harris 9b9005eb94 The DRM DCP CRC-16 is the same as the X.25 CRC-16.
So just use crc16_x25_ccitt_tvb(), which goes a byte at a time rather
than a bit at a time, and which takes a tvbuff rather than requiring you
to call tvb_get_ptr().

It also doesn't 1's-complement the result, so we can compare it against the
0x1D0F in ETSI TS 102 821 V1.4.1 (2012-10) rather than against a
1's-complement version, 0xE2F0.

Change-Id: Ia513f851f0a8ff1e7853278ddf3618c532fb2aba
Reviewed-on: https://code.wireshark.org/review/3507
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 17:11:03 +00:00
Guy Harris d4dab16a3f Only one buffer.c, please.
Otherwise, if you link with both libwiretap and libfiletap, it's
anybody's guess which one you get.  That means you're wasting memory
with two copies of its routines if they're identical, and means
surprising behavior if they're not (which showed up when I was debugging
a double-free crash - fixing libwiretap's buffer_free() didn't fix the
problem, because Wireshark happened to be calling libfiletap' unfixed
buffer_free()).

There's nothing *tap-specific about Buffers, anyway, so it really
belongs in wsutil.

Change-Id: I91537e46917e91277981f8f3365a2c0873152870
Reviewed-on: https://code.wireshark.org/review/3066
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 23:43:32 +00:00
Graham Bloice 9ba0a18d12 Fix up library names when using CMake on Windows
Change-Id: I3573e69eb54044bb915161756dbb8f18cc769061
Reviewed-on: https://code.wireshark.org/review/2957
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-15 20:37:44 +00:00
Graham Bloice 4b5967f683 Moved nghttp2 to epan
Cleaned up nghttp2 build

Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d
Reviewed-on: https://code.wireshark.org/review/2937
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-09 05:31:31 +00:00
Guy Harris 06bd8045d7 Make wsutil depend on gitversion.
wsutil contains the only code that uses version.h; make the dependency
explicit, to see whether that fixes the current build issues with Debian
packaging.

Also, get rid of all *other* dependencies on gitversion.

Change-Id: I89fa5e4112633b83a1a7dfa349bc337e3688575f
Reviewed-on: https://code.wireshark.org/review/2823
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 17:16:54 +00:00
Guy Harris f3c62edc77 Move the GLib version info string stuff to get_glib_version_info().
Change-Id: I1013ad9a0a98bcbf07fe597f9e932f2ea1a5cd28
Reviewed-on: https://code.wireshark.org/review/2818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 15:10:25 +00:00
Guy Harris fe42762f23 Move some more stuff into wsutil.
Move the routines to parse numerical command-line arguments there.

Make cmdarg_err() and cmdarg_err_cont() routines in wsutil that just
call routines specified by a call to cmdarg_err_init(), and have
programs supply the appropriate routines to it.

Change-Id: Ic24fc758c0e647f4ff49eb91673529bcb9587b01
Reviewed-on: https://code.wireshark.org/review/2704
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-29 23:03:24 +00:00
Guy Harris dbd409d041 Fix OS X CMake build.
I have ***NO*** idea why this makes a difference, but, without this
change, APPLE_CORE_FOUNDATION_LIBRARY is apparently *not* set correctly
for wsutil/CMakeLists.txt, and, with this change, it is.  I guess
there's something magic involved here with "global" CMake variables or
something crazy such as that.

Change-Id: I7a0046b9c249568cd666720838104f48e854e203
Reviewed-on: https://code.wireshark.org/review/2612
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 07:10:12 +00:00
Guy Harris c46329c27b Add a routine to return a version string including VCS information.
Add a routine get_ws_vcs_version_info() that, for builds from a tree
checked out from Wireshark's version control system, returns a string
that includes both the Wireshark version number and an indication of
what particular VCS version was checked out, and just returns
Wireshark's version number for other builds.

Use that routine rather than manually gluing VERSION and the Git version
number together.

("vcs", not "git", just in case we do something bizarre or mercurial
some day. :-))

Change-Id: Ie5c6dc83b9d3f56655eaef30fec3ec9916b6320d
Reviewed-on: https://code.wireshark.org/review/2529
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 01:06:25 +00:00
Guy Harris 73c7addfa6 Move the routine to get memory information to wsutil.
Change-Id: I94717cec5a464166585b258a83f8ccdaccf8d5ff
Reviewed-on: https://code.wireshark.org/review/2525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 20:31:53 +00:00
Guy Harris 00f23a4f5c Move the routine to get a CPU information string to wsutil.
Change-Id: Ibf6e57d7382cbbd831a0367fd48d684118712408
Reviewed-on: https://code.wireshark.org/review/2523
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 20:21:03 +00:00
Guy Harris d99d1b90f8 Add a get_compiler_info() routine in libwsutil to get compiler information.
Change-Id: I8ccb6187f2ee0255460f448aee170768b6fa3f5d
Reviewed-on: https://code.wireshark.org/review/2519
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:35:06 +00:00
Guy Harris a1112249fa Move get_os_version_info() to libwsutil.
This mean we also have to move CFString_to_C_string() there for OS X.

Change-Id: Ic91ad872e9d5290cf34f842503ededd5452e4337
Reviewed-on: https://code.wireshark.org/review/2511
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 18:02:32 +00:00
Guy Harris 43443af0ac Move get_copyright_info() to wsutil.
Change-Id: I75c1c747cd2b4a9845c659636582d54b2caecf1a
Reviewed-on: https://code.wireshark.org/review/2510
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 17:33:05 +00:00
Joerg Mayer c11ae8ac82 Add .rc files to the sources to have them included in the build
Change-Id: I84dda519e617b24d92fcf374670a4a6ee6f488ee
Reviewed-on: https://code.wireshark.org/review/2506
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-20 23:58:22 +00:00
Michael Mann 53594f34e4 Dissectors for totemnet and totemsrp protocols implemented in corosync cluster engine. Bug 3232.
From Masatake YAMATO

changes in patch3 (Masatake YAMATO):

  * Fix a typo(s/Sequnce/Sequence/)
  * Use variable len instead of a number literal
  * Put _U_ marker to length parameter of dissect_corosync_totemsrp_ip_address
  * Use tvb_report_length instread of tvb_length

changes in patch5 (Masatake YAMATO):

  * packet-corosync-totemsrp.c: Adapt to new dissector_try_heuristic interface

    + pass hdtbl_entry argument to dissector_try_heuristic.

  * packet-corosync-totemnet.c: Initialize corosync_totemnet_port to 5405

changes in patch6 (Masatake YAMATO):

  * packet-corosync-totemsrp.c: Use tvb_reported_length instead of tvb_length.
  * packet-corosync-totemsrp.c: Remove unnecessary trailing space in string literals.

  * packet-corosync-totemnet.c: Remove SVN Id tag in a comment.

changes in patch8 (Masatake YAMATO):

  * packet-corosync-totemnet.c: Remove SVN Id tag in comment(again).
  * packet-corosync-totemsrp.c: Use val_to_str_const instead of val_to_str.

changes in patch9 (Masatake YAMATO):

  * wsutil/sober128.[ch]: New files derived from packet-corosync-totemnet.c.
    Decryption code is moved here.
  * packet-corosync-totemnet.c: Remove all decryption code from this file.

Change-Id: Id832d9c5ce1be1668c857c9bbf39e8a84c31880c
Reviewed-on: https://code.wireshark.org/review/725
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 18:23:09 +00:00
Joerg Mayer 935280317a Backport autofoo simd optimization
Change-Id: I5d58154bf8266eabedf550b54f18845612f514c6
Reviewed-on: https://code.wireshark.org/review/2206
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-14 06:44:15 +00:00
Tomasz Moń 9538d1c433 Fix CMake build.
Change-Id: I749c6f1e978e385a9f1340f315c670404a2470ad
Reviewed-on: https://code.wireshark.org/review/2087
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-06-09 22:00:21 +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 5c6403b27b Honor configured CMAKE_INSTALL_LIBDIR when installing libraries
Change-Id: I860c9408ed01e9567992b0dcf5c6c6421344c13e
Reviewed-on: https://code.wireshark.org/review/1862
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-30 13:36:02 +00:00
Alexis La Goutte eb1bbb677d Fix indent (use tabs)
Change-Id: Iecb242bddb06779ba8b5ce8913fa9c4f64d7f79a
Reviewed-on: https://code.wireshark.org/review/1812
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-27 23:58:08 +00:00
Jakub Zawadzki 75cb2675fd Move mktime_utc() from tvbuff.c to wsutil/time_util.c
Also do little cleanup in mktime_utc (one big #ifndef)

Change-Id: I8f721ba76cad856cfef0a2d78e7f98686f8e4e3f
Reviewed-on: https://code.wireshark.org/review/1327
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 04:13:02 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Jakub Zawadzki abda30e9e6 Fix bug #9618: Invalid utf8 causes JSON dissector assertion failure "g_utf8_validate"
Validate JSON UTF-8 characters, replace with '?' when invalid.

svn path=/trunk/; revision=54633
2014-01-07 22:17:32 +00:00
Jakub Zawadzki be733f3041 Move epan/base64.[ch] to wsutil/ with function name change.
svn path=/trunk/; revision=54326
2013-12-21 14:38:51 +00:00
Guy Harris 0cc1545d05 Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins.  Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.

In particular applications, only process the relevant plugin types.

Add a Makefile.common to the codecs directory.

svn path=/trunk/; revision=53710
2013-12-02 08:30:29 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Jakub Zawadzki 3b9f6dfab4 Move bitswap.[ch] from epan to wsutil.
svn path=/trunk/; revision=53365
2013-11-16 09:16:57 +00:00
Jakub Zawadzki ca42cb3e40 Move adler32 from epan/ to wsutil/
The same like done for crc*

svn path=/trunk/; revision=53190
2013-11-09 14:03:53 +00:00
Jakub Zawadzki 9297c9e780 Rename swar_count_bits() to ws_count_ones()
Try to make ws_count_ones() inline function.

svn path=/trunk/; revision=53178
2013-11-09 04:47:08 +00:00
Gerald Combs ba49d9bcf0 Revert part of 52896 and (for now) all of 52935. As Jeff pointed out,
the PortableApps version relies on U3_-prefixed environment variables.

svn path=/trunk/; revision=52941
2013-10-29 04:05:27 +00:00
Gerald Combs 69741d086b Remove U3 code and packaging.
svn path=/trunk/; revision=52896
2013-10-27 17:15:39 +00:00
Balint Reczey 2ec414c257 Minor refactoring in CMake ABI dump generation
svn path=/trunk/; revision=52689
2013-10-19 15:51:36 +00:00
Balint Reczey 70dce86ab3 Set and use TMPDIR for ABI dump generation when using CMake
svn path=/trunk/; revision=52688
2013-10-19 14:55:12 +00:00
Balint Reczey 8956ee2a56 Factor out common parts of ABI checks to UseABICheck.cmake
svn path=/trunk/; revision=52614
2013-10-15 07:30:05 +00:00
Graham Bloice 9c4ee86784 Add CMake properties to targets so that they are logically organised when using a Visual Studio solution.
Add CMake properties to group the source files in epan into logical blocks when using a Visual Studio solution.

svn path=/trunk/; revision=52580
2013-10-13 09:21:55 +00:00
Jörg Mayer fb0af7e2d4 config.h.win32 used another solution
svn path=/trunk/; revision=52410
2013-10-06 18:15:43 +00:00
Jörg Mayer eb1ee413e3 editcap and capinfos compile now with cmake
svn path=/trunk/; revision=52382
2013-10-05 20:49:44 +00:00
Jörg Mayer afb568c549 libwsutil needs to link against libgmodule2
svn path=/trunk/; revision=52371
2013-10-04 22:08:46 +00:00
Evan Huus 304bbabbbe From Jiri Engelthaler via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9055

Add support for bitmask set for signed integer types.

svn path=/trunk/; revision=51522
2013-08-26 16:23:55 +00:00
Jeff Morriss 2df54da6e2 Move a bunch of the crypt modules and pint.h into wsutil.
This means wsutil now links against libcrypt.

Protect a bunch of the crypt header files from multiple inclusion.

svn path=/trunk/; revision=51100
2013-08-01 23:34:47 +00:00
Jörg Mayer f833e8e59d Looks like building with -Werror in wsutil was forgotten with
cmake.

svn path=/trunk/; revision=50788
2013-07-22 14:43:17 +00:00
Jeff Morriss 56735f8c16 Move u3.{h,c} and g711.{h,c} into wsutil.
Project g711.h against multiple inclusion and add C++ compatibility wrapper.

svn path=/trunk/; revision=50654
2013-07-16 02:04:55 +00:00
Jeff Morriss 2d30d5beb1 Move strnatcmp.{h,c} from epan into wsutil: there's nothing epan-specific
there and moving it avoids having to recompile the file for use in editcap
and mergecap (which don't link against libwireshark).

svn path=/trunk/; revision=50650
2013-07-16 01:16:50 +00:00