aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2017-02-20Add some glib functions not available in older glibsAndersBroman1-0/+1
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>
2016-12-20cmake,wslua,wsutil: load files from run/ instead of source treePeter Wu1-1/+6
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-11-02Move Base32_encode from packet-fc00.c to wsutil (as ws_base32_decode)Michael Mann1-0/+1
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-09-30wsutil: split libjsmn.Dario Lombardo1-0/+3
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-30cmake: make WERROR_COMMON_FLAGS a normal stringPeter Wu1-23/+8
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-23dumpcap: Include CPU info as hardware description in SHBStig Bjørlykke1-0/+1
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-05wsutil: add string to integer conversion utilities.Dario Lombardo1-0/+1
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-08-26wsutil: add enumeration of local ip addresses in Windows.Dario Lombardo1-1/+1
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-23CMake: Allow setting per target compiler warningsJoão Valverde1-0/+1
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-06-25wsutil: Move Win32 helper routines from capchildRoland Knall1-0/+1
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-21libcodecs and libwsutil are DLLs, not static librariesPascal Quantin1-1/+1
Change-Id: I4486f35e07c72d4ca35d5649de25d0c9abd2a964 Reviewed-on: https://code.wireshark.org/review/16057 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-05-02Add checkAPI calls to CMake.Graham Bloice1-16/+26
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-04-21Link version code statically againJoão Valverde1-1/+0
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 f95976eefcbeb5d24df383c29d29ef888b503945. 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-04Use AC_REPLACE_FUNCS and LTLIBOBJSJoão Valverde1-1/+1
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-03Fix cmake libwsutil zlib missing linkageJoão Valverde1-0/+1
Change-Id: I803f5fee26d2f10d56cad774a71c71d3dcbbcc20 Reviewed-on: https://code.wireshark.org/review/14787 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-11Remove the last remnants of U3 support.Gerald Combs1-1/+0
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-04extcap: add local_interfaces_to_list() to wsutil.Dario Lombardo1-0/+1
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-02-19Add inet_pton/inet_ntop interface to libwsutilJoão Valverde1-0/+1
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-03Add functions for SHA256 and HMAC-SHA256Cedric Izoard1-0/+1
- 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>
2015-11-29cfutils.c: Fix ISO C forbids an empty translation unit [-Wpedantic]João Valverde1-1/+4
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-10-16CMake: Add /WXGerald Combs1-2/+2
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-13cmake: link against dl, fixes linking with goldPeter Wu1-0/+1
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-08-26cmake: rework version.h handling to treat it like config.hJoerg Mayer1-2/+0
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-16Run abicheck commands at compile time.Gerald Combs1-2/+5
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-06-16Add the wireless toolbar.Gerald Combs1-0/+1
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-02-19Check whether emmintrin.h can be used *without* -msse4.2.Guy Harris1-14/+26
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-17Added JSON native file support.Dario Lombardo1-0/+1
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-11Fix SSE 4.2 checks.Guy Harris1-14/+14
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-01-21Also support -xarch=sse_42 in the Sun C compiler for x86(-64).Guy Harris1-7/+12
Change-Id: Ib6d0ae9c237b96568e2522d2077b311b3ac5af2e Reviewed-on: https://code.wireshark.org/review/6706 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21Always set the COMPILE_FLAGS property, so we can always fetch it.Guy Harris1-0/+10
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-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>