Wireshark-commits: [Wireshark-commits] master f52626c: Add tvb_get and proto_tree_add for string-en
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 17 Apr 2014 14:04:21 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f52626cc83fa6362a286f3ffbda1d3d67392ac3f
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

f52626c by Hadriel Kaplan (hadrielk@xxxxxxxxx):

    Add tvb_get and proto_tree_add for string-encoded byte arrays
    
    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@xxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  c49be78   remove duplicated entries.
    adds  f52626c   Add tvb_get and proto_tree_add for string-encoded byte arrays


Summary of changes:
 doc/README.dissector     |   46 ++++++++
 epan/proto.c             |  159 +++++++++++++++++++++++++++-
 epan/proto.h             |   54 ++++++++++
 epan/strutil.c           |  129 ++++++++++++++++++++++-
 epan/strutil.h           |   30 +++++-
 epan/tvbuff.c            |   30 ++++++
 epan/tvbuff.h            |   12 +++
 epan/wslua/wslua_field.c |   19 +++-
 epan/wslua/wslua_tree.c  |   22 ++++
 epan/wslua/wslua_tvb.c   |   67 +++++++++++-
 test/lua/tvb.lua         |  263 +++++++++++++++++++++++++++++++++++++++++-----
 test/suite-wslua.sh      |    8 ++
 12 files changed, 802 insertions(+), 37 deletions(-)