aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2015-01-21Don't set SSE4_2_FLAG to -msse4.2 unless -msse4.2 works.Guy Harris1-1/+3
Change-Id: I54eca86d53dc0e4015a15491b9adfdfe9ef9e346 Reviewed-on: https://code.wireshark.org/review/6703 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21Check whether we can use nmmintrin.h.Guy Harris1-22/+33
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-21Only turn -msse4.2 on for ws_mempbrk_sse42.c, and don't always build it.Guy Harris1-3/+23
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-11Fix CMake generation and use of Windows .rc filesGraham Bloice1-1/+1
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-05Minor CMake updates to better group build artefactsGraham Bloice1-1/+1
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>
2014-12-31Move some routines into ws_version_info.c.Guy Harris1-4/+0
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-25Check for getopt_long(), not getopt().Guy Harris1-1/+1
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-25Include some files based on whether the functions they define are present.Guy Harris1-3/+12
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-24Don't use extra variables for ws_mempbrk_sse42.c and popcount.cGuy Harris1-14/+8
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-23Cmake: check for popcount, and build it from wsutil/popcount.c if missing.Guy Harris1-0/+7
Change-Id: Id646a9f0b1fc6acafa99a78725e3f0ec8a48c170 Reviewed-on: https://code.wireshark.org/review/6006 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-03Don't use -msse4.2 with MSVC.Guy Harris1-5/+17
Change-Id: I457d45d9ad05e0eb851e78a7342e666ef9df8ffd Reviewed-on: https://code.wireshark.org/review/5086 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-10CMake: Bundle our libraries.Gerald Combs1-0/+6
Change-Id: I5df4d794602f7e53c2f4f496597f8eaf7c7b6eaa Reviewed-on: https://code.wireshark.org/review/4588 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-08The DRM DCP CRC-16 is the same as the X.25 CRC-16.Guy Harris1-1/+0
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-07-15Only one buffer.c, please.Guy Harris1-0/+1
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-15Fix up library names when using CMake on WindowsGraham Bloice1-4/+6
Change-Id: I3573e69eb54044bb915161756dbb8f18cc769061 Reviewed-on: https://code.wireshark.org/review/2957 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-09Moved nghttp2 to epanGraham Bloice1-5/+0
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-03Make wsutil depend on gitversion.Guy Harris1-0/+2
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-03Move the GLib version info string stuff to get_glib_version_info().Guy Harris1-0/+1
Change-Id: I1013ad9a0a98bcbf07fe597f9e932f2ea1a5cd28 Reviewed-on: https://code.wireshark.org/review/2818 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-29Move some more stuff into wsutil.Guy Harris1-0/+2
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-24Fix OS X CMake build.Guy Harris1-0/+8
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-22Add a routine to return a version string including VCS information.Guy Harris1-0/+1
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-21Move the routine to get memory information to wsutil.Guy Harris1-0/+1
Change-Id: I94717cec5a464166585b258a83f8ccdaccf8d5ff Reviewed-on: https://code.wireshark.org/review/2525 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21Move the routine to get a CPU information string to wsutil.Guy Harris1-0/+1
Change-Id: Ibf6e57d7382cbbd831a0367fd48d684118712408 Reviewed-on: https://code.wireshark.org/review/2523 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21Add a get_compiler_info() routine in libwsutil to get compiler information.Guy Harris1-0/+1
Change-Id: I8ccb6187f2ee0255460f448aee170768b6fa3f5d Reviewed-on: https://code.wireshark.org/review/2519 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21Move get_os_version_info() to libwsutil.Guy Harris1-0/+3
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-21Move get_copyright_info() to wsutil.Guy Harris1-0/+1
Change-Id: I75c1c747cd2b4a9845c659636582d54b2caecf1a Reviewed-on: https://code.wireshark.org/review/2510 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20Add .rc files to the sources to have them included in the buildJoerg Mayer1-0/+1
Change-Id: I84dda519e617b24d92fcf374670a4a6ee6f488ee Reviewed-on: https://code.wireshark.org/review/2506 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-19Dissectors for totemnet and totemsrp protocols implemented in corosync ↵Michael Mann1-0/+1
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-14Backport autofoo simd optimizationJoerg Mayer1-1/+15
Change-Id: I5d58154bf8266eabedf550b54f18845612f514c6 Reviewed-on: https://code.wireshark.org/review/2206 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-09Fix CMake build.Tomasz Moń1-0/+2
Change-Id: I749c6f1e978e385a9f1340f315c670404a2470ad Reviewed-on: https://code.wireshark.org/review/2087 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-05-31Add nghttp2 lib (HPACK)Alexis La Goutte1-0/+5
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-30Honor configured CMAKE_INSTALL_LIBDIR when installing librariesBalint Reczey1-3/+3
Change-Id: I860c9408ed01e9567992b0dcf5c6c6421344c13e Reviewed-on: https://code.wireshark.org/review/1862 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-27Fix indent (use tabs)Alexis La Goutte1-57/+57
Change-Id: Iecb242bddb06779ba8b5ce8913fa9c4f64d7f79a Reviewed-on: https://code.wireshark.org/review/1812 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-25Move mktime_utc() from tvbuff.c to wsutil/time_util.cJakub Zawadzki1-0/+1
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-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(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-01-07Fix bug #9618: Invalid utf8 causes JSON dissector assertion failure ↵Jakub Zawadzki1-1/+1
"g_utf8_validate" Validate JSON UTF-8 characters, replace with '?' when invalid. svn path=/trunk/; revision=54633
2013-12-21Move epan/base64.[ch] to wsutil/ with function name change.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=54326
2013-12-02Move most of the plugin code from epan to wsutil and remove allGuy Harris1-0/+1
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-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-0/+15
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-16Move bitswap.[ch] from epan to wsutil.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53365
2013-11-09Move adler32 from epan/ to wsutil/Jakub Zawadzki1-0/+1
The same like done for crc* svn path=/trunk/; revision=53190
2013-11-09Rename swar_count_bits() to ws_count_ones()Jakub Zawadzki1-1/+0
Try to make ws_count_ones() inline function. svn path=/trunk/; revision=53178
2013-10-29Revert part of 52896 and (for now) all of 52935. As Jeff pointed out,Gerald Combs1-0/+1
the PortableApps version relies on U3_-prefixed environment variables. svn path=/trunk/; revision=52941
2013-10-27Remove U3 code and packaging.Gerald Combs1-1/+0
svn path=/trunk/; revision=52896
2013-10-19Minor refactoring in CMake ABI dump generationBalint Reczey1-3/+1
svn path=/trunk/; revision=52689
2013-10-19Set and use TMPDIR for ABI dump generation when using CMakeBalint Reczey1-4/+4
svn path=/trunk/; revision=52688
2013-10-15Factor out common parts of ABI checks to UseABICheck.cmakeBalint Reczey1-15/+3
svn path=/trunk/; revision=52614
2013-10-13Add CMake properties to targets so that they are logically organised when ↵Graham Bloice1-0/+4
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-06config.h.win32 used another solutionJörg Mayer1-1/+0
svn path=/trunk/; revision=52410
2013-10-05editcap and capinfos compile now with cmakeJörg Mayer1-6/+7
svn path=/trunk/; revision=52382