/* dissect a bencoded integer from tvb, start at offset. it's like "i5673e" *result will be the decoded value  */
static int dissect_bencoded_int(tvbuff_t *tvb, packet_info _U_ *pinfo, proto_tree *tree, guint offset, const char **result, const char *label)
/* dissect a bencoded integer from tvb, start at offset. it's like "i5673e" *result will be the decoded value  */
static int dissect_bencoded_int(tvbuff_t *tvb, packet_info _U_ *pinfo, proto_tree *tree, guint offset, const char **result, const char *label)
{
  guint start_offset;
  offset += 1;
  start_offset = offset;
  while( tvb_get_guint8(tvb,offset)!='e' )
    offset += 1;
  *result = tvb_get_string_enc( wmem_packet_scope(), tvb, start_offset, offset-start_offset, ENC_ASCII);
  proto_tree_add_string_format( tree, hf_bencoded_int, tvb, start_offset, offset-start_offset, *result,
    "%s: %s", label, *result );
  offset += 1;
  return offset;
}