aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
AgeCommit message (Collapse)AuthorFilesLines
2014-04-17Fixed typo HAVE_LIBGRYPT -> HAVE_LIBGCRYPTStig Bjørlykke1-1/+1
Change-Id: I85772e1f4d4882810bf82a9903e30156eb374df9 Reviewed-on: https://code.wireshark.org/review/1191 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-04-14Add tvb_get and proto_tree_add for string-encoded timestampsHadriel Kaplan1-1/+1
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-13Replace QTableWidgets with QLabels + HTML tables.Gerald Combs1-0/+1
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-03(Pedantic): set editor modelines tab-width & etc to 8; Also: fix some ↵Bill Meier1-3/+3
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-03-31Continue to remove $Id$ from top of fileAlexis La Goutte2-2/+0
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte4-7/+0
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash) Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd Reviewed-on: https://code.wireshark.org/review/881 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte9-18/+0
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(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-31Continue to remove $Id$ from top of fileAlexis La Goutte3-6/+0
(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-19The 1.11.x installer puts the global plugins in the wrong place [Mac OS X]Alexis La Goutte1-2/+2
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-19The 1.11.x installer puts the global plugins in the wrong place [Mac OS X]Alexis La Goutte1-1/+1
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-04Remove all $Id$ from top of fileAlexis La Goutte68-137/+0
(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-02-27Sherman, set the Wayback Machine for 1997.Guy Harris1-1/+1
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-25Remove trailing whitespaceBill Meier13-23/+23
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-09Fix Bug 6489 to stop compiler warning on gcrypt deprecated delcarationsHadriel Kaplan1-3/+3
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-01-14Consistently use "guint8" for "8-bit byte".Guy Harris1-5/+5
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-10Make internal functions staticAnders Broman1-1/+1
svn path=/trunk/; revision=54686
2014-01-08Need <strsafe.h> for StringCchPrintf().Guy Harris1-0/+1
svn path=/trunk/; revision=54644
2014-01-08Move UAT xton() to wsutil libraryJakub Zawadzki2-0/+27
Use ws_xton() in few more places. svn path=/trunk/; revision=54642
2014-01-07As checkAPIs.pl says, "use StringCchPrintf".Guy Harris1-1/+1
svn path=/trunk/; revision=54641
2014-01-07Fix bug #9618: Invalid utf8 causes JSON dissector assertion failure ↵Jakub Zawadzki6-17/+33
"g_utf8_validate" Validate JSON UTF-8 characters, replace with '?' when invalid. svn path=/trunk/; revision=54633
2014-01-07Move defines for helping with UTF-16 surrogate pairs to wsutil/unicode-utils.hJakub Zawadzki1-0/+11
tvbuff version was moved, but with 'or' optimization from packet-json. svn path=/trunk/; revision=54632
2013-12-26There's no need to mark inline functions with _U_Jakub Zawadzki1-6/+2
svn path=/trunk/; revision=54459
2013-12-21Move epan/base64.[ch] to wsutil/ with function name change.Jakub Zawadzki4-1/+112
svn path=/trunk/; revision=54326
2013-12-20- Change guint32 array initializer constants to use 'U' rather than 'L'Bill Meier1-172/+185
(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-19Another try at marking the ws_sign_ext functions possibly-unused.Gerald Combs1-4/+8
svn path=/trunk/; revision=54267
2013-12-19Try to fix a warning found by, but not related to, the ABI check.Gerald Combs1-2/+2
svn path=/trunk/; revision=54265
2013-12-17sign_ext.h: use G_GINT64_CONSTANT(), add sample for alternative method of ↵Jakub Zawadzki1-2/+12
sign extension. Alternative method looks much nicer in dissasembly. svn path=/trunk/; revision=54202
2013-12-17Put sign_ext.h in Makefile.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=54198
2013-12-17Create sign extension routines in <wsutil/sign_ext.h>, use it in few places.Jakub Zawadzki1-0/+50
svn path=/trunk/; revision=54197
2013-12-02Fix (-W)documentation error found by ClangAlexis La Goutte1-2/+2
error: parameter '...' not found in the function declaration [-Werror,-Wdocumentation] svn path=/trunk/; revision=53719
2013-12-02Move most of the plugin code from epan to wsutil and remove allGuy Harris4-0/+482
knowledge of particular types of plugins. Instead, let particular types of plugins register with the common plugin code, giving a name and a routine to recognize that type of plugin. In particular applications, only process the relevant plugin types. Add a Makefile.common to the codecs directory. svn path=/trunk/; revision=53710
2013-11-29Replace macros: BSWAP16, BSWAP32, BSWAP64 with glib-version.Jakub Zawadzki1-11/+0
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-29Rename some of pint.h macros to match common style (bits number on the end).Jakub Zawadzki2-8/+8
pntohs -> pntoh16 pntohl -> pntoh32 pletohs -> pletoh16 pletohl -> pletoh32 phtons -> phton16 phtonl -> phton32 svn path=/trunk/; revision=53652
2013-11-29Expand macros: htoles(), htolel(), htolell()Jakub Zawadzki1-4/+0
svn path=/trunk/; revision=53651
2013-11-20Remove a few (now unused) variables.Michael Mann1-2/+0
svn path=/trunk/; revision=53442
2013-11-19Fix missing semicolon.Guy Harris1-1/+1
svn path=/trunk/; revision=53437
2013-11-19Add routines to set the personal file directory paths (personalGuy Harris2-70/+26
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-18Get rid of unused trivial wrapper routine.Guy Harris2-10/+0
svn path=/trunk/; revision=53403
2013-11-17strncat() bad, g_strlcat() good.Guy Harris1-5/+6
svn path=/trunk/; revision=53381
2013-11-17Clean up indentation.Guy Harris1-2/+2
svn path=/trunk/; revision=53380
2013-11-17Move get_tempfile_path() from filesystem.[ch] to tempfile.[ch].Guy Harris4-20/+18
svn path=/trunk/; revision=53379
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris5-1/+2534
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-16Fix previous commit + rename to bitswap.Jakub Zawadzki2-2/+2
svn path=/trunk/; revision=53375
2013-11-16Exporting/importing variables cause problems, so create function to do ↵Jakub Zawadzki2-4/+10
bitswaping. svn path=/trunk/; revision=53374
2013-11-16For *definitions* of external data items, we need to useGuy Harris1-2/+1
WS_DLL_PUBLIC_DEF. svn path=/trunk/; revision=53372
2013-11-16Move bitswap.[ch] from epan to wsutil.Jakub Zawadzki4-0/+113
svn path=/trunk/; revision=53365
2013-11-14Revert some inadvertent changes from the last commit.Gerald Combs1-0/+2
svn path=/trunk/; revision=53329
2013-11-14Create a plural-only English translation. Use it to pluralize the FollowGerald Combs1-2/+0
Stream and Flow Graph hint statistics. svn path=/trunk/; revision=53326
2013-11-13Highlight selected sequence diagram items.Gerald Combs1-2/+2
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