Commit Graph

466 Commits

Author SHA1 Message Date
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
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
Jakub Zawadzki 531541660b Move cpuid to seperate header file.
It'll be later used also for detecting sse4.2

Change-Id: I1930abb29026b455d453a79b5f301cdf37585160
Reviewed-on: https://code.wireshark.org/review/1803
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-31 13:01:08 +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
Balint Reczey 7bf49b31ac Set PLUGIN_INSTALL_DIR properly for wireshark.pc
Change-Id: I64c04095ce780ce2cc44a54a68695506d27e5747
Reviewed-on: https://code.wireshark.org/review/1861
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-30 12:48:08 +00:00
Alexis La Goutte 56d8ff6790 Add Modelines
Change-Id: I3b41a15f53afc718ccf5892174345220a09c6714
Reviewed-on: https://code.wireshark.org/review/1847
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-28 23:41:42 +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
Guy Harris f67fc8a4d2 Fix some whitespace issues.
Change-Id: I363361e898c4b37fcde29847a1473530e5052733
Reviewed-on: https://code.wireshark.org/review/1771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23 23:44:57 +00:00
Guy Harris d470a468a6 More handling of missing time stamps.
Make nstime_cmp() handle "unset" time stamps (they're equal to other
"unset" time stamps, and less than all other time stamps), use it in
reordercap, and "unset" the time stamp if it's absent.

Also, nstime_cmp() does not modify its argument, so make it const.

Change-Id: I016dab5fefaf4696e78cbd8c6dd3395808e54369
Reviewed-on: https://code.wireshark.org/review/1769
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23 23:41:21 +00:00
AndersBroman 3157bf6ba5 isprint() -> g_ascii_isprint()
Change-Id: Ia586ef8ce500d5fc7578c52014206fa7a7eaea41
Reviewed-on: https://code.wireshark.org/review/1624
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-13 16:14:07 +00:00
AndersBroman f7819de76a In ascii_xx_inplace use g_ascii_isupper/g_ascii_islower directly, it
*should* be slightly more efficient.

Change-Id: I3081e2e25f241cdb07fa46011f50709fd560fb1c
Reviewed-on: https://code.wireshark.org/review/1626
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-13 16:07:08 +00:00
Stig Bjørlykke bd38b3152d Support out-of-source checkapi
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.

Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 04:23:46 +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
Stig Bjørlykke a317ba0e1f Fixed typo HAVE_LIBGRYPT -> HAVE_LIBGCRYPT
Change-Id: I85772e1f4d4882810bf82a9903e30156eb374df9
Reviewed-on: https://code.wireshark.org/review/1191
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-04-17 22:01:22 +00:00
Hadriel Kaplan dd002649c3 Add tvb_get and proto_tree_add for string-encoded timestamps
This commit adds tvb_get_string_time and proto_tree_add_time_item routines for
getting nstime fields from the tvb when they are encoded in ASCII string form.

The proto_tree_add_time_item routine is also usable for normal
big/little-endian encoded time_t, and has the advantage of retrieving
the value even if there's no proto tree.

It also exposes the routines to Lua, both so that a Lua script can take
advantage of this, but also so I can write a testsuite to test the functions.

Change-Id: I955da10f68f2680e3da3a5be5ad8fdce7ed6808c
Reviewed-on: https://code.wireshark.org/review/1084
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-14 11:47:39 +00:00
Gerald Combs 63ed4745a2 Replace QTableWidgets with QLabels + HTML tables.
This lets the user select and copy the folder and plugin data as text.
Add clickable local filesystem URLs while we're at it.

(I suspect that you shouldn't use QTableWidgets unless you're creating a
spreadsheet.)

Change-Id: I45650bd4f4b6215824a4ed70ec80698d0805baba
Reviewed-on: https://code.wireshark.org/review/1064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-13 18:32:55 +00:00
Bill Meier c0b0a11e4e (Pedantic): set editor modelines tab-width & etc to 8; Also: fix some indentation in packet-sip.c
Change-Id: I623fc5e4c1247dbe5e15f0f33270f4f0994268ab
Reviewed-on: https://code.wireshark.org/review/943
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-03 15:31:56 +00:00
Alexis La Goutte 7d77d753c6 Continue to remove $Id$ from top of file
(Using sed :sed -i '/^\/\* \$Id\$ \*\//,+0 d') ( /* $Id */ )

Change-Id: I46e928d7f2a307c35876ed5d34cb6b7cccfcd6e9
Reviewed-on: https://code.wireshark.org/review/886
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:49:26 +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
Alexis La Goutte b0ba475fbf Continue to remove $Id$ from top of file
(Using sed : sed -i '/^  \$Id\$/,+1 d') (No star only 2 spaces before)

Change-Id: Id7b254031769a9dca2941304e4d3a0f4bdbc3f54
Reviewed-on: https://code.wireshark.org/review/883
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:46:57 +00:00
Alexis La Goutte 09cd306d1c Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\* \$Id\$/,+1 d') (no space before star)

Change-Id: I318968db2b8512ba1303b5fc5c624c66441658f0
Reviewed-on: https://code.wireshark.org/review/879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:30:52 +00:00
Alexis La Goutte 3170f2e418 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^ \*  \$Id\$/,+1 d') (Double space between star and $Id$)

Change-Id: If9b8f345e3b6493de0b573600e60005c8b0b33c3
Reviewed-on: https://code.wireshark.org/review/877
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 15:59:51 +00:00
Alexis La Goutte 0f51f78608 The 1.11.x installer puts the global plugins in the wrong place [Mac OS X]
Issue found by rols

Fix comment and use the correct plugin_dir path (missing wireshark folder)

Change-Id: I298bc5e9872d8c20c5baeaaf056262b9668f15bf
Closed-bug: 9854
Reviewed-on: https://code.wireshark.org/review/745
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-19 18:42:31 +00:00
Alexis La Goutte eb2fb39ff7 The 1.11.x installer puts the global plugins in the wrong place [Mac OS X]
Issue found by rols

The installer puts the normal included plugins (e.g. mate, wimax) in
/Applications/Wireshark.app/Contents/Frameworks/wireshark/plugins,
however the global plugins directory is set to
/Applications/Wireshark.app/Contents/Resources/lib/wireshark/plugins
(as it was in previous versions) so no plugins load at startup.
In order to make them load you have to create this directory and
copy the plugins there, or put them in your personal directory.

From remark of Gerald, use recommandation of Bundle Programming Guide (use Contents/PlugIns for plugin)

https://developer.apple.com/library/mac/documentation/corefoundation/conceptual/cfbundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19

Change-Id: Ib1ae7da48a8fa94f7037912cd44c05532a238b71
Closed-bug: 9854
Reviewed-on: https://code.wireshark.org/review/602
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-19 11:19:37 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Guy Harris 9733917e28 Sherman, set the Wayback Machine for 1997.
The URLs for the CRC-10 code are dead; use Wayback Machine URLs.

Change-Id: I3924e9cabb3b49b0e1abb31fbffa9b89f95cd0ce
Reviewed-on: https://code.wireshark.org/review/419
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-27 00:59:23 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Hadriel Kaplan 0353c9a8e3 Fix Bug 6489 to stop compiler warning on gcrypt deprecated delcarations
The libgcrypt library has several deprecated functions exported, that we don't use.
Unfortunately the GCC compiler warns about these deprecated functions regardless,
which is quite annoying.  This commit makes clang/gcc ignore the deprecated attribute,
for gcrypt.h only.  The danger with this is if gcrypt ever deprecates a function
we actually *use*, then we won't see the warning.  So I'm not sure if it's a good or
bad idea to do this change, but it's really annoying to see the warnings and makes
finding real warnings difficult.

Change-Id: I03e80a6e7e4833ce0f709088c9ab4af98193db3d
Reviewed-on: https://code.wireshark.org/review/128
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-02-09 13:18:40 +00:00
Guy Harris 570a36436c Consistently use "guint8" for "8-bit byte".
Constify.

For routines that manipulate sequences of 8-bit bytes, have them take
guint8 pointers rather than void pointers.

Don't cast away constness.

svn path=/trunk/; revision=54795
2014-01-14 18:03:54 +00:00
Anders Broman 05f7044bc7 Make internal functions static
svn path=/trunk/; revision=54686
2014-01-10 07:01:15 +00:00
Guy Harris 2adcfcd914 Need <strsafe.h> for StringCchPrintf().
svn path=/trunk/; revision=54644
2014-01-08 00:39:14 +00:00
Jakub Zawadzki d28084d183 Move UAT xton() to wsutil library
Use ws_xton() in few more places.

svn path=/trunk/; revision=54642
2014-01-08 00:28:13 +00:00
Guy Harris e8dd800cc1 As checkAPIs.pl says, "use StringCchPrintf".
svn path=/trunk/; revision=54641
2014-01-07 23:56:21 +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 d1dcee936b Move defines for helping with UTF-16 surrogate pairs to wsutil/unicode-utils.h
tvbuff version was moved, but with 'or' optimization from packet-json.

svn path=/trunk/; revision=54632
2014-01-07 21:55:49 +00:00
Jakub Zawadzki ca91b33cc8 There's no need to mark inline functions with _U_
svn path=/trunk/; revision=54459
2013-12-26 10:53:53 +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
Bill Meier 7838eada54 - Change guint32 array initializer constants to use 'U' rather than 'L'
(not that it actally makes any difference);
- Change 'guint crc32_0AA725CF_reverse[]' to 'guint32 ...'
 (no actual difference);
- Fix some indentation;
- Add editor modelines.

svn path=/trunk/; revision=54309
2013-12-20 16:57:02 +00:00
Gerald Combs 82d0e1f669 Another try at marking the ws_sign_ext functions possibly-unused.
svn path=/trunk/; revision=54267
2013-12-19 20:16:31 +00:00
Gerald Combs 67ceb469b3 Try to fix a warning found by, but not related to, the ABI check.
svn path=/trunk/; revision=54265
2013-12-19 19:12:25 +00:00
Jakub Zawadzki ff2a5847b9 sign_ext.h: use G_GINT64_CONSTANT(), add sample for alternative method of sign extension.
Alternative method looks much nicer in dissasembly.

svn path=/trunk/; revision=54202
2013-12-17 22:16:06 +00:00
Jakub Zawadzki c8716a45ee Put sign_ext.h in Makefile.
svn path=/trunk/; revision=54198
2013-12-17 21:38:59 +00:00
Jakub Zawadzki 0de43ce2dd Create sign extension routines in <wsutil/sign_ext.h>, use it in few places.
svn path=/trunk/; revision=54197
2013-12-17 21:36:33 +00:00
Alexis La Goutte 67c04188ce Fix (-W)documentation error found by Clang
error: parameter '...' not found in the function declaration [-Werror,-Wdocumentation]

svn path=/trunk/; revision=53719
2013-12-02 13:45:59 +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
Jakub Zawadzki d99fdfda63 Replace macros: BSWAP16, BSWAP32, BSWAP64 with glib-version.
XXX, people are not aware that expression of this macros might be evaluated multiple times, like:
 -  BSWAP16(tvb_get_letohs(tvb, off)) : \
 +  GUINT16_SWAP_LE_BE(tvb_get_letohs(tvb, off)) : \

Should be tvb_get_ntohs() called?


svn path=/trunk/; revision=53653
2013-11-29 19:21:20 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +00:00
Jakub Zawadzki 288efa5128 Expand macros: htoles(), htolel(), htolell()
svn path=/trunk/; revision=53651
2013-11-29 18:44:00 +00:00
Michael Mann ea278d3bf8 Remove a few (now unused) variables.
svn path=/trunk/; revision=53442
2013-11-20 01:44:06 +00:00
Guy Harris 30620ff1be Fix missing semicolon.
svn path=/trunk/; revision=53437
2013-11-19 20:06:47 +00:00
Guy Harris 06098fce7b Add routines to set the personal file directory paths (personal
configuration file directory and directory in which to save captures),
have the routine to parse -P options use them, and move that routine to
libui.

Have that routine just return a gboolean.

svn path=/trunk/; revision=53435
2013-11-19 19:45:38 +00:00
Guy Harris 67d4aaaa10 Get rid of unused trivial wrapper routine.
svn path=/trunk/; revision=53403
2013-11-18 00:51:22 +00:00
Guy Harris ed80b06a78 strncat() bad, g_strlcat() good.
svn path=/trunk/; revision=53381
2013-11-17 08:49:51 +00:00
Guy Harris d0cd9624d9 Clean up indentation.
svn path=/trunk/; revision=53380
2013-11-17 04:43:28 +00:00
Guy Harris eee9b9ddd3 Move get_tempfile_path() from filesystem.[ch] to tempfile.[ch].
svn path=/trunk/; revision=53379
2013-11-17 04:39:44 +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 bc8d5a1e61 Fix previous commit + rename to bitswap.
svn path=/trunk/; revision=53375
2013-11-16 22:44:29 +00:00
Jakub Zawadzki 004220fb63 Exporting/importing variables cause problems, so create function to do bitswaping.
svn path=/trunk/; revision=53374
2013-11-16 22:31:07 +00:00
Guy Harris 623caeeaa0 For *definitions* of external data items, we need to use
WS_DLL_PUBLIC_DEF.

svn path=/trunk/; revision=53372
2013-11-16 19:47:25 +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
Gerald Combs f954245491 Revert some inadvertent changes from the last commit.
svn path=/trunk/; revision=53329
2013-11-14 22:52:05 +00:00
Gerald Combs 1745e131fc Create a plural-only English translation. Use it to pluralize the Follow
Stream and Flow Graph hint statistics.

svn path=/trunk/; revision=53326
2013-11-14 22:35:10 +00:00
Gerald Combs b0063a025b Highlight selected sequence diagram items.
Create a new dialog each time the user follows a stream. A lot of the
follow code seems to assume one and only one dialog so there are likely
outstanding bugs.

Don't use the global cfile (should we deprecate its usage?). We want to
move closer to multiple documents, not further away.

Clean up after ourselves. Free our payload list and unlink our temp
file. Make a bunch of gchar*s QStrings. Make sure our destructor gets
called and use it.

Make member variable and method names more consistent.

svn path=/trunk/; revision=53306
2013-11-13 22:18:01 +00:00
Jakub Zawadzki 3b2e519422 Remove comment (leftovers from r49444) + add missing WS_DLL_PUBLIC for adler32
(modifing files to be commited when svn commit is already running is no good).

svn path=/trunk/; revision=53192
2013-11-09 14:19:19 +00:00
Jakub Zawadzki 3931cfdd79 Correct include path.
svn path=/trunk/; revision=53191
2013-11-09 14:04:52 +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 38edae1c71 Replace wtap_nstime with nstime_t, remove wtap_nstime_to_sec.
After r50154 nstime_t is inside wsutil/ so wiretap don't need it's own copy. 

svn path=/trunk/; revision=53184
2013-11-09 10:38:02 +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
Jakub Zawadzki e6944e68b9 Try to split ws_ctz() from hfinfo_bitshift().
svn path=/trunk/; revision=53176
2013-11-08 22:01:12 +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
Michael Mann cbd3194bcf Add STANAG 5066 DTS CRC routines. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217)
STANAG 5066 DTS will follow when it passes review, just trying to make the patch more manageable.

svn path=/trunk/; revision=52774
2013-10-22 23:30:26 +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
Gerald Combs be9eedeb8c Make sure LIBGCRYPT_CFLAGS is added to AM_CPPFLAGS.
svn path=/trunk/; revision=52672
2013-10-18 16:32:43 +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
Gerald Combs 73353437ce Another Solaris Studio C++ fix.
svn path=/trunk/; revision=52561
2013-10-12 03:00:04 +00:00
Jörg Mayer 30f8fb14df Undo r52382 for this file: We use a different solution on Windows
svn path=/trunk/; revision=52422
2013-10-06 21:07:58 +00:00
Jörg Mayer 32efaf8ac9 Add $Id$
svn path=/trunk/; revision=52421
2013-10-06 21:05:47 +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
Chris Maynard 6a1bd211fd Trivial: Fix typo.
svn path=/trunk/; revision=52101
2013-09-16 16:49:17 +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
Alexis La Goutte ef56cd2c0a Fix (-W)documentation error found by Clang
./str_util.h:72:11: error: parameter 'str' not found in the function declaration [-Werror,-Wdocumentation]
 * @param str The string to be checked
          ^~~
./str_util.h:72:11: note: did you mean 'string'?
 * @param str The string to be checked
          ^~~
          string
./str_util.h:80:11: error: parameter 'str' not found in the function declaration [-Werror,-Wdocumentation]
 * @param str The string to be checked
          ^~~
./str_util.h:80:11: note: did you mean 'string'?
 * @param str The string to be checked
          ^~~
          string

svn path=/trunk/; revision=51252
2013-08-10 21:27:42 +00:00
Alexis La Goutte 1ef2d9fd58 Fix (-W)documentation error found by Clang
../wsutil/crc16.h:68:11: error: parameter 'pBuffer' not found in the function declaration [-Werror,-Wdocumentation]
 * @param pBuffer a pointer to a buffer of the given length
          ^~~~~~~
../wsutil/crc16.h:68:11: note: did you mean 'buf'?
 * @param pBuffer a pointer to a buffer of the given length
          ^~~~~~~
          buf
../wsutil/crc16.h:77:11: error: parameter 'pBuffer' not found in the function declaration [-Werror,-Wdocumentation]
 * @param pBuffer a pointer to a buffer of the given length
          ^~~~~~~
../wsutil/crc16.h:77:11: note: did you mean 'buf'?
 * @param pBuffer a pointer to a buffer of the given length
          ^~~~~~~
          buf

svn path=/trunk/; revision=51251
2013-08-10 21:27:34 +00:00
Jeff Morriss 99050171cb Keep checkAPIs happy (even though it's just test code). Get that test code
compiling again (warning free).

Fix the checkapi target in automake.

svn path=/trunk/; revision=51114
2013-08-02 02:34:13 +00:00
Jeff Morriss 2b69003dc0 Link wsutil with gnutls on Windows too.
svn path=/trunk/; revision=51109
2013-08-02 01:11:08 +00:00
Jeff Morriss 95b4443aeb LIBGCRYPT_CFLAGS is not set in Windows builds, use GNUTLS_CFLAGS instead.
svn path=/trunk/; revision=51108
2013-08-02 00:52:13 +00:00
Jeff Morriss 1248db2ad6 pint.h is in wsutil now.
svn path=/trunk/; revision=51107
2013-08-02 00:31:37 +00:00
Jeff Morriss 9d0bcc9d09 Include LIBGCRYPT_CFLAGS in wsutil (but not in epan/crypt).
svn path=/trunk/; revision=51103
2013-08-01 23:56:09 +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
Martin Kaiser b8cc7b5239 make getopt_long() available on systems that don't have it natively
svn path=/trunk/; revision=50677
2013-07-16 20:15:02 +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
Jeff Morriss a8ad045a77 Add report_err.c to cmake build.
svn path=/trunk/; revision=50600
2013-07-15 03:12:02 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{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 capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Bill Meier 828d4e89f6 Define certain 'const char *...' arrays as static.
(That is: Don't create the array on the stack each time
  the function is called).

 Reduces code memory usage and execution time.
 (See SVN #50271)


svn path=/trunk/; revision=50300
2013-07-01 15:41:05 +00:00
Michael Mann 6e1f213fca openSAFETY: CRC Maintenance, new CRC, new expert interface implemented. Bug 8847 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8847)
From Roland Knall

svn path=/trunk/; revision=50166
2013-06-26 12:11:08 +00:00
Jeff Morriss bbf6a3766e Move tempfile.{h,c} into wsutil.
svn path=/trunk/; revision=50163
2013-06-26 01:14:35 +00:00
Jeff Morriss 74dc568ef1 As pointed out by Guy: timestats uses packet_info so it belongs in epan
not wsutil.

svn path=/trunk/; revision=50159
2013-06-26 00:18:44 +00:00
Jeff Morriss a441793cba Move a couple of time-related modules into wsutil.
A bunch of files didn't really need to include these header files so remove
the include line rather than changing it.

svn path=/trunk/; revision=50154
2013-06-25 22:02:20 +00:00
Chris Maynard ce088c334d makefile.nmake -> Makefile.nmake and minor whitespace (spaces -> tabs) changes.
svn path=/trunk/; revision=50140
2013-06-25 15:32:49 +00:00
Evan Huus 6c65dd2b30 Add a few of our headers to code generated by pycrc (their faq says we can do
basically whatever we want with it, and this cleans up a couple of licensecheck
errors).

Fix FSF address in one dissector.

svn path=/trunk/; revision=50080
2013-06-20 16:54:13 +00:00
Jeff Morriss 8e7abd9871 From Anders:
Check Header CRC of SYNC protocol.

svn path=/trunk/; revision=50062
2013-06-19 22:28:58 +00:00
Guy Harris 4422348ebc Add some comments to #else and #endif to make it clearer what's going
on.

svn path=/trunk/; revision=49223
2013-05-10 02:41:22 +00:00
Jörg Mayer 7e51c9713b dumpabi: This would create the directories in the sourcedir instead
of the binary dir. Fixed that.
  NOTE: It fails with and without this patch for out of tree builds:

jmayer@egg:~/work/wireshark/svn/build/qt-gtk3> make dumpabi
[  1%] Built target wsutil
[  1%] Generating libwsutil.abi.tar.gz
ERROR: can't find modules
cp: cannot stat `abi_dumps/libwsutil/libwsutil_*': No such file or directory
make[3]: *** [wsutil/libwsutil.abi.tar.gz] Error 1
make[2]: *** [wsutil/CMakeFiles/dumpabi-libwsutil.dir/all] Error 2
make[1]: *** [CMakeFiles/dumpabi.dir/rule] Error 2
make: *** [dumpabi] Error 2
jmayer@egg:~/work/wireshark/svn/build/qt-gtk3>


svn path=/trunk/; revision=49014
2013-04-24 12:57:56 +00:00
Evan Huus d0bd2097f0 Fix another dozen or so files with bad FSF addresses as caught by licensecheck.
svn path=/trunk/; revision=48869
2013-04-16 00:00:09 +00:00
Gerald Combs e96673d549 Add links to Google Breakpad and other possible solutions.
svn path=/trunk/; revision=48863
2013-04-15 23:02:34 +00:00
Guy Harris b6ee206d2f Distribute CMakeLists.txt.
svn path=/trunk/; revision=48716
2013-04-03 07:38:44 +00:00
Stig Bjørlykke ca5516c665 Use pragma diagnostic also when compiling with clang.
svn path=/trunk/; revision=48295
2013-03-14 08:42:51 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Gerald Combs a79e5d5b94 Check to see if GLib's printf routines support the X/Open / POSIX
thousands grouping (') flag and use it in format_size if it's available.
As far as I can tell this translates to "everywhere except Windows and
OpenBSD". According to the various build logs at

https://build.opensuse.org/package/show?package=mingw32-glib2&project=windows%3Amingw%3Awin32

the OBS GLib packages enable GLib's internal printf implementation from
Gnulib which means we *should* be able to enable this on Windows.
Unfortunately this doesn't appear to be the case.

svn path=/trunk/; revision=48042
2013-03-03 19:34:58 +00:00
Anders Broman 85973068cc From beroset:
remove C++ incompatibilities

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

svn path=/trunk/; revision=48038
2013-03-03 17:14:19 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Jeff Morriss 98ea7d3a8d From Anders: revert r47934: it doesn't work everywhere.
See email discussion on -dev.

svn path=/trunk/; revision=47940
2013-02-28 15:16:46 +00:00
Balint Reczey 45c2884f1b Export libwsutil symbols using WS_DLL_PUBLIC define
This change replaces *.def and *.sym file usage following the
guideline at http://gcc.gnu.org/wiki/Visibility

svn path=/trunk/; revision=47938
2013-02-28 14:09:46 +00:00
Gerald Combs 2f47e63a88 str_util.c: Although the glib documentation doesn't explicitly say so,
it looks like the thousands grouping (') modifier is supported so use it
in format_size.

capinfos.c: Set our locale.

svn path=/trunk/; revision=47934
2013-02-28 04:44:38 +00:00
Gerald Combs 0645396514 Print human-readable statistics by default. Raw values can be printed
using "-M". Based on a suggestion by Hansang Bae.

svn path=/trunk/; revision=47900
2013-02-26 06:40:25 +00:00
Balint Reczey 82843905c5 ABI dumps don't have to depend on config.h directly
They depend on libs which need config.h already.

svn path=/trunk/; revision=47883
2013-02-25 21:27:07 +00:00
Balint Reczey d2e0724afc Add dumpabi targets to CMake builds
Also update automake generated targets to match CMake generated ones

svn path=/trunk/; revision=47879
2013-02-25 18:12:20 +00:00
Balint Reczey e1d24fdb49 Generate abi-descriptor.xml-s in CMake builds
svn path=/trunk/; revision=47865
2013-02-24 21:14:17 +00:00
Balint Reczey 7f0ee327ca Set library versions in CMake builds
svn path=/trunk/; revision=47848
2013-02-23 22:54:36 +00:00
Martin Kaiser b057717767 use pragma GCC diagnostic to work around gcrypt.h warnings
distinguish between different gcc versions

this should allow a clean build with libgcrypt 1.5.0

svn path=/trunk/; revision=47803
2013-02-21 18:40:48 +00:00
Martin Kaiser 7126d3a56b add wsutil/wsgcrypt.h as a wrapper around libgcrypt's gcrypt.h
(not used for now)

svn path=/trunk/; revision=47801
2013-02-21 18:09:18 +00:00
Gerald Combs 3ba2c108f1 As http://www.jrsoftware.org/iskb.php?mutexsessions points out, a session
mutex may not be visible to other sessions and we may not be able to
create a global mutex. Try to create both, and make each one accessible
to all users. Update the NSIS installer to check for both global and
session mutexes.

svn path=/trunk/; revision=47773
2013-02-20 19:58:55 +00:00
Gerald Combs 8f478c5c44 Exclude create_app_running_mutex.
svn path=/trunk/; revision=47762
2013-02-20 03:01:12 +00:00
Gerald Combs bd4cffae58 When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask
the user to close Wireshark if it's found. While not perfect this makes
the WinSparkle update process much less annoying.

svn path=/trunk/; revision=47758
2013-02-20 01:19:42 +00:00
Gerald Combs ec880b7db3 Use readlink instead of ls.
svn path=/trunk/; revision=47338
2013-01-29 01:06:24 +00:00
Balint Reczey c6f9d4c131 make dumpabi target build with multiple digits in library version numbers
svn path=/trunk/; revision=47329
2013-01-28 21:45:44 +00:00
Guy Harris e787c3434e Get rid of C++ comments from the CUPS code.
svn path=/trunk/; revision=47111
2013-01-16 03:56:36 +00:00
Guy Harris 9936b9764a Add crash_info.c
svn path=/trunk/; revision=47107
2013-01-15 23:37:47 +00:00
Guy Harris 111f8ea2bb Use GLib "return an allocated string generated by printf-style
formatting" routines and the corresponding deallocate routines.

svn path=/trunk/; revision=47106
2013-01-15 23:36:48 +00:00
Guy Harris 92b524bb1c I must haz config.h (to define _U_, if nothing else).
svn path=/trunk/; revision=47105
2013-01-15 22:22:44 +00:00
Guy Harris 05825b02cd Add some routines to wsutil to, at least on some platforms, add
information to crash dumps and the like.  (Currently, we only handle OS
X's CrashReporter, but we should do this on other platforms where this
information can be added and would be helpful.)

White space tweaks.

svn path=/trunk/; revision=47104
2013-01-15 21:54:41 +00:00
Michael Mann 86d690880f replace "unsigned" datatype with "guint". Some mpeg files needed "unsigned int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825)

svn path=/trunk/; revision=46928
2013-01-04 05:22:43 +00:00
Evan Huus c2945ff831 Squash some sign-conversion warnings that g++ picks up but gcc does
not. QtShark now builds warning-free (for me at least).

svn path=/trunk/; revision=46786
2012-12-26 13:41:30 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Guy Harris bb674a2e1e Include <wsutil/crc11.h> so that we check whether the prototypes therein
match the actual function types here.

svn path=/trunk/; revision=46648
2012-12-21 01:57:03 +00:00
Guy Harris 166b5d4469 Squelch some cast-discard warnings.
svn path=/trunk/; revision=46647
2012-12-21 00:53:30 +00:00
Guy Harris 0ddce65214 fclose() and fflush() are standard C routines, so there's no need for
our own wrappers.  (pcapio.c isn't using wrappers around, for example,
fwrite().)

svn path=/trunk/; revision=46640
2012-12-20 20:00:06 +00:00
Michael Tüxen 7e84abf005 Add ws_fclose(), ws_fflush(), and ws_fdopen() to the fileutils.
Retire libpcap_fdopen(), libpcap_dump_flush(), and libpcap_dump_close().

svn path=/trunk/; revision=46636
2012-12-20 14:53:09 +00:00
Anders Broman a98414062c try to fix Id.
svn path=/trunk/; revision=45922
2012-11-05 11:52:14 +00:00
Gerald Combs b369a09cd2 The file set and export object trees are lists. Make them act like
it. Show human-readable sizes in the file set dialog. Move the
format_size_flags_e operator to qt_ui_utils.cpp for lack of a better
place.

svn path=/trunk/; revision=45661
2012-10-19 19:04:21 +00:00
Gerald Combs 576b24c96e Move ui-independent object export routines to the common ui directory.
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export
files. C++-ize epan/tap.h. Fix an apparent memory leak in
eo_save_all_clicked_cb.

The Qt dialog has an indeterminate progress bar. I tried adding
something similar to the GTK+ dialog but event processing led down a
rabbit hole.

svn path=/trunk/; revision=45647
2012-10-18 21:14:43 +00:00
Chris Maynard b66cc7ed48 str_util.c:format_size() uses 0xff00 for the mask, so left-shift format_size_prefix_[si|iec] by 8, not 16. Fixes Coverity CID 733852: Operands don't affect result.
svn path=/trunk/; revision=45637
2012-10-18 17:29:37 +00:00
Gerald Combs f003add90f Fix a copy+paste error and a missing include. Adjust the format_size
digit threshold.

svn path=/trunk/; revision=45456
2012-10-10 20:19:18 +00:00
Gerald Combs 98b0812341 Add a format_size function similar to g_format_size that renders a size
value in a human-readable format. Use it in the welcome screen, status
bar, and Win32 interface details.

Note that in the welcome screen and status bar we've switched from
customary binary prefixes to strict SI.

svn path=/trunk/; revision=45453
2012-10-10 19:17:31 +00:00
Bill Meier d882372200 *nix: Test return status of set*uid and related set*gid fcns for failure;
This fixes gcc compiler errors [-Werror=unused-result]  caused by the recent addition
of the "__wur" (warn_unused_result) attribute to the declarations of these functions in
unistd.h.

svn path=/trunk/; revision=45286
2012-10-03 15:22:31 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Chris Maynard 1c35b91296 Trivial typo/copy-and-paste comment fix.
svn path=/trunk/; revision=44983
2012-09-18 20:03:03 +00:00
Anders Broman 68e2e8b889 From Jacob Nordgren and Rishie Sharma:
Add CRC11 algorithms

svn path=/trunk/; revision=44346
2012-08-08 16:27:10 +00:00
Gerald Combs 89e6169fc5 Back out an inadvertent change in r44194.
svn path=/trunk/; revision=44210
2012-08-02 16:26:57 +00:00
Gerald Combs 02894a0be8 Move utf8_entities.h to the "ui" directory. Separate packet information
items with MIDDLE DOTs.

svn path=/trunk/; revision=44194
2012-08-01 19:18:49 +00:00
Anders Broman 967a3c9ce4 From Rishie Sharma:
Add a new CRC16 routine.

svn path=/trunk/; revision=43982
2012-07-25 08:57:33 +00:00
Anders Broman 01e69df536 Get rid of not needed includes
svn path=/trunk/; revision=43917
2012-07-22 16:48:52 +00:00
Anders Broman 5160177aff Remove not needed includes.
svn path=/trunk/; revision=43830
2012-07-19 15:04:43 +00:00
Evan Huus a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00
Anders Broman 02d23f97b0 Add crc7 calculation abillity.
svn path=/trunk/; revision=43680
2012-07-12 14:24:19 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss 9e1359e2fa Revert 43481: linking dftest against libui was not the problem.
svn path=/trunk/; revision=43488
2012-06-25 22:21:58 +00:00
Jeff Morriss 8eeebf73e0 Move get_args_as_string from ui/util.c into wsutil (maybe not to the best
module, but...).

This makes dftest no longer dependent on libui, so stop linking against it.

svn path=/trunk/; revision=43481
2012-06-25 20:38:45 +00:00
Gerald Combs 1a7470c6be Forward-port r43165 and r43168 from trunk-1.6.
------------------------------------------------------------------------
  r43165 | gerald | 2012-06-08 14:23:25 -0700 (Fri, 08 Jun 2012) | 4 lines
  Changed paths:
     M /trunk-1.6/epan/Makefile.am
     M /trunk-1.6/wiretap/Makefile.am
     M /trunk-1.6/wsutil/Makefile.am
  
  Use separate commands in the dumpabi recipes instead a big huge long
  chain. If abi-compliance-checker fails print the contents of its
  log file.
  ------------------------------------------------------------------------
  r43168 | gerald | 2012-06-08 15:43:50 -0700 (Fri, 08 Jun 2012) | 2 lines
  Changed paths:
     M /trunk-1.6/epan/Makefile.am
     M /trunk-1.6/wiretap/Makefile.am
     M /trunk-1.6/wsutil/Makefile.am
  
  Make sure ln happens in the right directory.
  ------------------------------------------------------------------------

We don't currently have a usable tag for "git describe --tags
--abbrev=0" to latch onto so just use the first 1.9 commit.

svn path=/trunk/; revision=43170
2012-06-08 23:54:22 +00:00
Guy Harris 03f0e46d6f Update comments to reflect that the GLib version is no longer relevant
(we require GLib 2.14 or later, and always use UTF-8 for pathnames on
Windows), to note that ws_stdio_rename() should have UN*X-style
rename semantics in that it removes the target if necessary, and to give
more details in other ways.

Clean up indetation a bit.

svn path=/trunk/; revision=42775
2012-05-22 09:57:18 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Guy Harris d0039be915 Always declare getopt() with a prototype.
svn path=/trunk/; revision=41939
2012-04-04 19:36:24 +00:00
Gerald Combs f934bcd42c Fix compilation on Win64.
svn path=/trunk/; revision=41930
2012-04-04 16:13:35 +00:00
Anders Broman 1d60842c59 Update to a version which have getopt_long(). + one file
svn path=/trunk/; revision=41927
2012-04-04 15:24:23 +00:00
Anders Broman 82913779e4 Update to a version which have getopt_long().
svn path=/trunk/; revision=41926
2012-04-04 15:23:47 +00:00