/* dissect a bencoded string from tvb, start at offset. it's like "5:abcde" *result will be the decoded value  */
static int dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_ *pinfo, proto_tree *tree, guint offset, const char **result, gboolean tohex, const char *label)
/* dissect a bencoded string from tvb, start at offset. it's like "5:abcde" *result will be the decoded value  */
static int dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_ *pinfo, proto_tree *tree, guint offset, const char **result, gboolean tohex, const char *label)
{
  guint string_len;
  string_len = bencoded_string_length(tvb, &offset);
  if( tohex )
    *result = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, string_len );
  else
    *result = tvb_get_string_enc( wmem_packet_scope(), tvb, offset, string_len , ENC_ASCII);
  proto_tree_add_string_format( tree, hf_bencoded_string, tvb, offset, string_len, *result, "%s: %s", label, *result );
  offset += string_len;
  return offset;
}