Commit Graph

339 Commits

Author SHA1 Message Date
Guy Harris 0e4e825309 Add license information to the copyright information.
See

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

Change-Id: I19c1cf560a1bb7ed7d7312bea727550977d66120
Reviewed-on: https://code.wireshark.org/review/2787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 01:33:51 +00:00
Guy Harris ac88f71220 Clean up a comment.
SetProcessDEPPolicy() is the API; PSetProcessDEPPolicy is just a local
pointer variable that either points to that API's implementation (if
it's available) or is null (if it isn't).

Change-Id: I676fbb75019e32af511cefa6f1c7b7124ac9d8e8
Reviewed-on: https://code.wireshark.org/review/2735
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 23:03:22 +00:00
Pascal Quantin e2801d0da0 Windows: fix update of version information in wireshark and tshark
Broken since gc46329c

Change-Id: I00146675d16db021e2cbb7b16841ea9ecb1439b9
Reviewed-on: https://code.wireshark.org/review/2703
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-30 05:13:24 +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
Alexis La Goutte b632c23a3b Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I5c66a456b7986e3fd7672deaf7ce773467873324
Reviewed-on: https://code.wireshark.org/review/2653
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-26 02:41:48 +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 7ba4aef599 Don't declare CFString_to_C_string() if we don't have OS X frameworks.
You shouldn't be including cfutils.h if you don't have CF, but this may
be tripping up the ABI checker.

Change-Id: Ib736a33013c6ab0f416ebbedaa4ebf112bade6f7
Reviewed-on: https://code.wireshark.org/review/2530
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 01:11:29 +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 a70dea1956 Move get_os_major_version() to wsutil and rename it to get_windows_major_version().
It's Windows-specific, so name it appropriately.

Change-Id: Ic518cbfabebf95757f6b308a4d547a6cabed6a5e
Reviewed-on: https://code.wireshark.org/review/2528
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 21:33:11 +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 3c96970544 Get rid of trailing blank lines.
Change-Id: Ie28a9904fd8befe98677c9f9f169beffe4df1d5d
Reviewed-on: https://code.wireshark.org/review/2524
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 20:22:13 +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 9e8fb87a3e Clean up inclusion of cfutils.h.
Change-Id: I7da381f12db6721448e15d30d441a943127cbca1
Reviewed-on: https://code.wireshark.org/review/2522
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:54:40 +00:00
Guy Harris 83d832c8ee Get rid of trailing blank lines.
Change-Id: Ib806d07aea8e4d903f084171ce2021c6f3c3fc07
Reviewed-on: https://code.wireshark.org/review/2520
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:37:34 +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 f13f70d1c4 Need <string.h> for string routines.
Change-Id: I828bb29953727eb43e169fa9b06837c9657ca051
Reviewed-on: https://code.wireshark.org/review/2517
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:07:15 +00:00
Guy Harris aeed656ceb We need the Unicode utilities, at least on Windows.
Multiple UTFs FTW!

Change-Id: Ib50dda4577f0038b11179be92dc6fb321b033618
Reviewed-on: https://code.wireshark.org/review/2516
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 19:02:45 +00:00
Guy Harris d0a567e94b We need <windows.h> on Windows.
Change-Id: I54c9991b3322d14966913367f951900cc7e54c4e
Reviewed-on: https://code.wireshark.org/review/2513
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 18:34:36 +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
Evan Huus 0c3e1a243b Add casting and license info to fix buildbots
Change-Id: Iea53b17480d758c16822d80778fa4f186a188a91
Reviewed-on: https://code.wireshark.org/review/2470
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 23:55:47 +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
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 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 f113306e0e More Python-bindings removal.
Change-Id: I4d82175781e65c73179f4c8e737a7900cb050bce
Reviewed-on: https://code.wireshark.org/review/2283
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-16 23:14:05 +00:00
AndersBroman f5476e90a0 Explicitly declare/cast 'unsigned <variable>' as 'unsigned int <variable>'
Applying part of Bug 7825

Change-Id: I460b5c61b04d793ccc27c25debbd5e8f08bc6974
Reviewed-on: https://code.wireshark.org/review/2280
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-16 22:03:12 +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
Joerg Mayer a4a7d2cfec Small whitespace fixes
Change-Id: I44c6c193ec2a7d88cda56ba34c2f17c03f7e121d
Reviewed-on: https://code.wireshark.org/review/2205
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-14 06:43:22 +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 5d7b59aec4 Fix Buildbot Mac OS: /wsutil/ws_cpuid.h:56: warning: unused parameter 'CPUInfo'
Change-Id: Ic0b0d5392ff049cc51f05b79fc5feae190064ce8
Reviewed-on: https://code.wireshark.org/review/2097
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-10 09:00:41 +00:00
AndersBroman e1f0ee412f Mark an unused parameter as such.
Change-Id: Ia319d7b8523ab9b9e9d8ec8533ebdcf4a506a69e
Reviewed-on: https://code.wireshark.org/review/2096
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 08:58:42 +00:00
Alexis La Goutte d041b1e91b WS mempbrk SEE4.2: Fix indent (use 2spaces) and add Modelines info
Change-Id: I50c71401f46846a459b18347ef0b9793a2a05ea7
Reviewed-on: https://code.wireshark.org/review/2084
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 08:13:54 +00:00
Jakub Zawadzki 4571283379 CPUID improvements
- Make ws_cpuid() return boolean when CPUID is support or no, this way
it's easier for caller to determinate if it works (and can use cpuinfo[X] or no).

- Add function ws_cpuid_sse42(), use it in ws_mempbrk() [cached] &
  version information.

Change-Id: I4e77699f9f3d11bb9b2e8ea599e48d3c5ad84ed7
Reviewed-on: https://code.wireshark.org/review/2088
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-10 08:12:43 +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
AndersBroman c9621e2bef We must include config.h to have HAVE_SSE42
Change-Id: I2b882b05b2864edbfef0ea03bc086efeaac84ad2
Reviewed-on: https://code.wireshark.org/review/2086
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09 19:30:17 +00:00
AndersBroman 618187a777 Hopfully thiw will make the Solaris build going.
Change-Id: I44b93494f6d3cb0504517ab4581afeef180f1513
Reviewed-on: https://code.wireshark.org/review/2079
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09 16:36:29 +00:00
AndersBroman c2a187f4ac Try to fix OSX build
Change-Id: Iab664f349e7604b99368f4a986dfe98db48aea84
Reviewed-on: https://code.wireshark.org/review/2078
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09 16:24:50 +00:00
AndersBroman f9254e5173 Fix a copy paste error.
Change-Id: I9a153b3e89886c7de943226dd5313c90e8be1b7b
Reviewed-on: https://code.wireshark.org/review/2075
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09 16:00:13 +00:00
AndersBroman 8e8a4ceba3 Try to fix the builds.
Change-Id: I3ccb5c1b40504cd9314da5a09b225e3e2bf991b8
Reviewed-on: https://code.wireshark.org/review/2073
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09 15:31:45 +00:00
Alexis La Goutte d3104c228e Make buildbot Happy about shadow index variable...
Change-Id: I4c93af520883235828a4bb1881c74035eace995d
Reviewed-on: https://code.wireshark.org/review/2070
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-09 13:33:33 +00:00
Jakub Zawadzki fcb710baec Add sse4.2 optimized function ws_mempbrk_sse42()
In text protocols, like SIP, lot of time is spend guint8_pbrk(),
assume that text is not binary (no NULs), and use SSE4.2 pcmpistri
instruction.

Also move & rename guint8_pbrk() from tvbuff.c as _ws_mempbrk.

HAVE_SSE42 must be defined to use _ws_mempbrk_sse42() only activaded for
Windows currently.

Change-Id: Ic853d84805bdb6492c4f45d2bcc79a973fd9804e
Reviewed-on: https://code.wireshark.org/review/1730
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09 12:02:27 +00:00
Guy Harris 090f568e6a Make this comple whether assertions are enabled or not.
Make the check for a valid index range a macro, so the compiler doesn't
whine if it's not used, but it's available if it *is* used.

Change-Id: I3cee0460eacef23187c141458dc5ac7a7acbf7c8
Reviewed-on: https://code.wireshark.org/review/1914
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-01 21:55:37 +00:00
Joerg Mayer 6f15d7a865 Fix /home/jmayer/work/wireshark/git/wsutil/nghttp2/nghttp2_hd.c:996:12: error: ‘check_index_range’ defined but not used [-Werror=unused-function]
static int check_index_range(nghttp2_hd_context *context, size_t idx)
            ^
cc1: all warnings being treated as errors

Change-Id: Ie8e3fe12d339a689e0222eda501b253a7d6d923c
Reviewed-on: https://code.wireshark.org/review/1912
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-01 19:58:13 +00:00
Pascal Quantin 09816dd4c5 nghttp2: do not copy nghttp2* objects in wsutil folder
Change-Id: I114d3a795a93c7612453fcd08f6e30e520dde900
Reviewed-on: https://code.wireshark.org/review/1902
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-31 15:49:05 +00:00
Pascal Quantin 158dd9c10d nghttp2: more warning fixes
Change-Id: Ib94a02f5977bd7d456895bbe453c35d77f559bd1
Reviewed-on: https://code.wireshark.org/review/1901
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-31 15:35:51 +00:00
Pascal Quantin 173e3024ed nghttp2: upgrade library to g4f7223e and add casts to please buildbots
Change-Id: Ic412d4bfc56695cbcab709d42a6f31aa9e50c64e
Reviewed-on: https://code.wireshark.org/review/1900
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-31 15:01:44 +00:00
Alexis La Goutte 33fc5c0300 NGHTTP2: Add missing nghttp2_int.h (need by make dist...)
Change-Id: I7906f28b42960ea69b7f23e888bc0e184f67021a
Reviewed-on: https://code.wireshark.org/review/1899
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-31 14:53:57 +00:00
Alexis La Goutte 41c78afc54 NGHTTP2: fix -Wshadow about index with some old GCC release or Mac OS X buildbot
(No problem with gcc-4.7 or gcc-4.8)

Change-Id: Iae1f801abeb80429c08e93668133a9c5ac7977ef
Reviewed-on: https://code.wireshark.org/review/1898
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-31 14:20:24 +00:00
Alexis La Goutte c4aa524291 NGHTTP2: fix typo (nghttp2_ent.h => nghttp2_net.h)
Change-Id: I52d3c40794841614d55e88c9fe9cf2de43a0fa46
Reviewed-on: https://code.wireshark.org/review/1897
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-31 14:15:40 +00:00