Commit Graph

263 Commits

Author SHA1 Message Date
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