aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_tvb.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-11wslua: Convert more comment markup to Asciidoctor.Gerald Combs1-2/+8
Convert links, source code blocks, and admonitions. Change-Id: I50c8daa19a115c23f7501b91dbfd904779a609c9 Reviewed-on: https://code.wireshark.org/review/25720 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-09wslua: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I80d9d4e3ffc25eebf09e6ef693c378b77554e1b8 Reviewed-on: https://code.wireshark.org/review/25693 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-24wslua: fix nstime memory leak after passing unknown encoding to ↵Jakub Zawadzki1-3/+5
TvbRange_nstime() Move checking of encoding before allocating nstime. Found by clang. Change-Id: I3c1de5fae6fcf52393cc38302359f21f17808087 Reviewed-on: https://code.wireshark.org/review/25442 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-1/+1
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-11-06lua: Added new integer sizes in TvbRangeFranklin "Snaipe" Mathieu1-6/+36
* Added support for 3-byte integers in :int() and :le_int() * Added support for 5, 6, and 7-byte integers in :int64() and :le_int64() Change-Id: If9ab4ea806191bc63effe45a081b9c65693c2367 Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io> Reviewed-on: https://code.wireshark.org/review/18672 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-25lua: Added support for FT_IPv6 fieldsSnaipe1-0/+24
* Implement Tvb:ipv6() * Handle FT_IPv6 protofields during insertion in the lua tree * Implement Address.ipv6(hostname) Change-Id: I585c392681b3aef02ed8ee956f74051d77fb28d4 Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io> Reviewed-on: https://code.wireshark.org/review/18442 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-18wslua: fix errors in documentation, add notational conventionsPeter Wu1-3/+2
Improve example with better formatting, clarification comments and more common variable names. Extend make-wsluarm.pl to support arguments containing underscores. Fixes the description of dissect_tcp_pdus. Change TvbRange.tvb(tvb) into tvbrange:tvb() and ByteArray.tvb(name) into bytearray:tvb(name), these are really instance methods. Change-Id: I1e20ef46195dc6c06f9ac790d3432db283d21a5e Reviewed-on: https://code.wireshark.org/review/18226 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-14wslua: Drop unused "push_code" macro parameterPeter Wu1-2/+2
Reduce noise, no caller has used this parameter since its introduction. Msotly automated regex search and replace. Change-Id: I4b1180bfee8544b38d19c9c440ff5b9b0dc080b2 Reviewed-on: https://code.wireshark.org/review/14790 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-04Rename "libz" to "zlib"João Valverde1-2/+2
Change-Id: I12f92c983d587c2a4751428cdf299635090c9f0b Reviewed-on: https://code.wireshark.org/review/14748 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: Anders Broman <a.broman58@gmail.com>
2016-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-20/+7
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde1-7/+20
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde1-20/+7
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 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-01-26wslua: fix memleak on error path of Tvb:bytes()Peter Wu1-5/+6
Delay allocation of a GByteArray to avoid a memleak on errors. Change-Id: I2b2ae6d33407500e81a4f45b86ef82720d3443a4 Reviewed-on: https://code.wireshark.org/review/13553 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-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-3/+3
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-24Lua: fix "since 1.99.9" to be 1.99.8Hadriel Kaplan1-3/+3
Change-Id: I842e4b6a38fc161ba7ab14caa27b3bbf74c989d7 Reviewed-on: https://code.wireshark.org/review/9763 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-13Change Lua's tvbrange:*int64() to read only the number of bytes specified inCédric Delmas1-18/+46
the range. Previously the length was ignored and 8 bytes were always read. The constraint on int64() and le_int64() becomes stricter to match int()'s ones: the range must be 1, 2, 4 or 8 octets long. Change-Id: Ic66798757564ac840c332b978effb418726a654c Reviewed-on: https://code.wireshark.org/review/9622 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-12Lua: split up wslua files into class-based filesHadriel Kaplan1-452/+103
The size of some of the wslua source files has grown large, and it's hard to quickly find things. So split them up based on class name, as much as seems reasonable. Also have the make-wsluarm.pl Perl script handle this. Change-Id: Ib495ec5c2a4df90495c0a05504856288a0b09213 Reviewed-on: https://code.wireshark.org/review/9579 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-09Lua: add functions for more field informationHadriel Kaplan1-7/+101
Add Lua functions so a plugin can introspect field information, such as the type of field, flags, tvb, etc. Also add a couple of Tvb and ByteArray methods. And cleanup the TreeItem code a little. Change-Id: I7b58ce589ace91cce14b8abccd01ceabb63e2653 Reviewed-on: https://code.wireshark.org/review/6500 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-02-13wslua*: Add editor modelines; Fix indentation, etc as needed.Bill Meier1-52/+64
Change-Id: I6df5d46f4b263104aa9cb6353cc987087cdb867e Reviewed-on: https://code.wireshark.org/review/7102 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-23Fix some WsLua documentation errorsHadriel Kaplan1-9/+33
The format of the API chapter was a bit screwed up, as was the indentation level of attributes. Also, some functions introduced in 1.11.3 were not documented as being since that version. Change-Id: I7912488c6da5b5ae72933e4c5ce49f8fbf0b0e34 Reviewed-on: https://code.wireshark.org/review/6753 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-23Use luaL_{check,opt}integer() rather than luaL_{check,opt}int().Guy Harris1-24/+24
Lua prior to 5.3 defined luaL_{check,opt}int() as macros wrapping luaL_{check,opt}integer() with a cast to int; Lua 5.3 doesn't. It sounds as if the Lua developers are deprecating luaL_{check,opt}int(): http://osdir.com/ml/general/2014-10/msg46568.html Change-Id: I2d0b649dcd57ede124f31d39f7945f342ae9b18f Reviewed-on: https://code.wireshark.org/review/6744 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-2/+2
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04Make all Lua code use wmem not ememHadriel Kaplan1-10/+15
Changed all remaining code in wslua that was using emem, to use wmem or simpler methods. Bug: 9927 Change-Id: I3d19a770e0fd77d996bdb6b61a76a722cc2bcd55 Reviewed-on: https://code.wireshark.org/review/6109 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-03Lua: replace deprecated functionsHadriel Kaplan1-11/+11
Remove deprecated functions from Lua API code: tvb_length and tvb_length_remaining. The calls to proto_tree_add_text() are left in, as I have no idea what to replace them with. The calls to ep_* are being left in, as they're removed by change-id I3d19a770e0fd77d996bdb6b61a76a722cc2bcd55. Bug: 10822 Change-Id: Ib0686f90be1edc892d3ecf401b91eb7484540b3e Reviewed-on: https://code.wireshark.org/review/6247 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-09Convert the Lua reference to AsciiDoc.Gerald Combs1-1/+1
Move it to the Developer's Guide while we're here. Nudge the markup in epan/wslua where needed. Note that we should probably convert it to AsciiDoc (if we're going to keep it in the DG) or Doxygen. Change-Id: Ie175111043f98b7a37eeeb8d185a833d8e866f8b Reviewed-on: https://code.wireshark.org/review/5203 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-13Lua: luaL_checkstring does not return NULLStig Bjørlykke1-5/+0
Removed all checks for NULL strings to cleanup the code. Change-Id: Ia890cd9b206296f586e85214f07765f14984580b Reviewed-on: https://code.wireshark.org/review/4632 Tested-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-06-18Convert the obvious emem to wmem in lua code.Evan Huus1-2/+3
Bug:9927 Change-Id: Ibf0dd45d3b54e489b70a4fde193b825ec703379e Reviewed-on: https://code.wireshark.org/review/2349 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-17Add tvb_get and proto_tree_add for string-encoded byte arraysHadriel Kaplan1-4/+63
This commit adds tvb_get_string_bytes and proto_tree_add_bytes_item routines for getting GByteArrays fields from the tvb when they are encoded in ASCII hex string form. The proto_tree_add_bytes_item routine is also usable for normal binary encoded byte arrays, and has the advantage of retrieving the array values 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: I112a038653df6482a5d0ebe7c95708f207319e20 Reviewed-on: https://code.wireshark.org/review/1158 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-16Squelch warnings when built without libz.Guy Harris1-0/+2
Change-Id: I881bb369ccf5d32cb53014998ddf76210aaab73e Reviewed-on: https://code.wireshark.org/review/1161 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-14Add tvb_get and proto_tree_add for string-encoded timestampsHadriel Kaplan1-13/+35
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-03-25Enhance Lua API doc generator and add more API infoHadriel Kaplan1-111/+134
This enhances the Lua API doc generator Perl script to handle meta-information in description comments, such as bold, italics, raw code, version info, etc. The supported markup and codes are documented in make-wsluarm.pl. It's not beautiful Perl code (I don't know Perl), and I'd rather do it using Lua, but I think keeping it Perl makes more sense in the long run. Change-Id: I477b3ebe770075dcea9ec52708e2d6fb5758d2f4 Reviewed-on: https://code.wireshark.org/review/802 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-14Add Lua heuristic dissector supportHadriel Kaplan1-3/+3
This adds the ability for Lua scripts to register heuristic dissectors for any protocol that has registered a heuristic dissector list, such as UDP, TCP, and ~50 others. The Lua function can also establish a conversation tied to its Proto dissector, to avoid having to check the heuristics for the same flow. The example dissector in the testsuite has also been enhanced to include a heuristic dissector, to verify the functionality and provide an example implementation. Change-Id: Ie232602779f43d3418fe8db09c61d5fc0b59597a Reviewed-on: https://code.wireshark.org/review/576 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+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-27Fix coverity warnings for all wslua files. (redux)Hadriel Kaplan1-10/+26
This fixes/addresses all the coverity warnings shown by the buildbots. (I hope) Change-Id: Ic2722df97c577d274e3cf3f0cbdca1902edde047 Reviewed-on: https://code.wireshark.org/review/423 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-25Adds some Lua helper functions: some commonly used functions, and to help ↵Hadriel Kaplan1-56/+133
troubleshooting Lua scripts There are some common things people need to do, such as convert to/from hex or get the raw binary string in a ByteArray/Tvb/TvbRange. These have been added, as well as some tests for them in the testsuites. Also, functions have been added to allow a script to get all the available tap types and filter fields, since they are not exactly what one can see in the Wireshark gui. Change-Id: I92e5e4eae713bb90d79b0c024eaa4e55b99cc96b Reviewed-on: https://code.wireshark.org/review/249 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-2/+2
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-21Cleanup on aisle 5: normalizes the Lua code to follow common schema/modelHadriel Kaplan1-118/+60
Over time the various wslua classes/functions have gotten moldy, with different ways of doing similar things. Some of it can't be changed without breaking backwards compatibility for Lua scripts, so I didn't do that. But I did what I could. The biggest change is a refactoring of how accessors/attributes are handled in the code, so that most of them work the same way using the same code. Specific changes made: * Added null/expired checking macro to class declarations for many classes * Removed extraneous pointer/expired checking, since checkFoo() does that already * Fixed "errors" reported by clang static analyzer; they were false positives, but it was easier to get it to stop complaining by changing the code * Moved internal wslua functions from wslua_utils.c into a new 'wslua_internals.c' file * Changed Listener/NSTime/Pinfo/Proto to use a common setter/getter accessor/attribute code model, instead of each of them doing their own * Fixed some API doc mistakes, mostly around attributes that were documented as read-only but were actually read-write Change-Id: Idddafc5fbd3545ebff29e063acc767e1c743a1a9 Reviewed-on: https://code.wireshark.org/review/271 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2014-02-07Fix Bug 9728 'Lua: ProtoField.bool() VALUESTRING argument is not optional ↵Hadriel Kaplan1-5/+5
but was supposed to be' Similar to bug 9725 and ProtoField.new(), the way the VALUESTRING argument is being checked in the code for ProtoField.bool() ends up making it non-optional. This patch fixes that, along with some minor API documentation fixes (text). Change-Id: Iadb9a8ace9c5514fc623d882301fe16b637fe4ce Reviewed-on: https://code.wireshark.org/review/125 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-04Adds support for Lua Int64 and UInt64 operators, functions, and generalHadriel Kaplan1-105/+5
usefulness, working around bug #9162 until Lua 5.3 is released. The existing Int64 and UInt64 classes provide virtually no usefullness, other than for creating a string of their value. While one could then write Lua code to convert the string to Lua numbers and such, ultimately Lua has no native 64-bit integer support, making such a task difficult to handle in Lua. This change adds a host of functions and operators to the existing Int64 (gint64) and UInt64 (guint64) classes, to enable true 64-bit integer support on par with native Lua numbers. A test script is also provided, which tests the functions/operators. Change-Id: I4c5f8f5219b9a88198902283bd32ddf24c346bbe Reviewed-on: https://code.wireshark.org/review/83 Tested-by: Evan Huus <eapache@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-01-31Fix for Bug-9711 Lua: the Lua stack is growing slightly during initialization.Hadriel Kaplan1-5/+5
Change-Id: I689319c0071fdb42583e8bd7633d8f0660c92f1b Reviewed-on: https://code.wireshark.org/review/51 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2013-12-23Removed a wrong sanity check in ByteArray base64_decode.Stig Bjørlykke1-5/+0
svn path=/trunk/; revision=54379
2013-12-22Improved out-of-bounds check in TvbRange ustringz and le_ustringz.Stig Bjørlykke1-2/+10
This functions should probably be marked as obsoleted now that we have support for encoding in stringz. svn path=/trunk/; revision=54372
2013-12-22Made TvbRange strsize take an optional encoding argument.Stig Bjørlykke1-5/+28
svn path=/trunk/; revision=54371
2013-12-22Made TvbRange string and stringz take an optional encoding argument, andStig Bjørlykke1-42/+7
removed the yet-another-string-function string_enc and stringz_enc. Documented the encoding argument. svn path=/trunk/; revision=54356
2013-12-21Move epan/base64.[ch] to wsutil/ with function name change.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=54326
2013-12-20Add new string_enc and stringz_enc methods that take an encoding valueGuy Harris1-4/+64
as an argument, just as the add_packet_field method for a tree does. Use tvb_get_string_enc() and tvb_get_stringz_enc() rather than tvb_get_string(), tvb_get_stringz(), tvb_get_unicode_string(), and tvb_get_unicode_stringz(). Treat "ustring" as meaning "UTF-16-encoded Unicode string" rather than "UCS-2-encoded subset-of-Unicode string". svn path=/trunk/; revision=54310
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-2/+2
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-19Renamed new_TvbRange to push_TvbRange and use this when creating a newStig Bjørlykke1-15/+12
TvbRange from a FieldInfo. This should fix the crash in bug #9483. svn path=/trunk/; revision=54247
2013-12-18Add cast to try to fix buildbot failureMartin Mathieson1-1/+1
svn path=/trunk/; revision=54218
2013-12-18Added ByteArray base64_decode().Stig Bjørlykke1-1/+30
svn path=/trunk/; revision=54215