/* Length cannot be used in these functions, big problem if a element dissector is not defined for these.  */
static guint16 elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guint32 offset, ansi_a_shared_data_t *data_p)
/* Length cannot be used in these functions, big problem if a element dissector is not defined for these.  */
static guint16 elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guint32 offset, ansi_a_shared_data_t *data_p)
{
    guint16     consumed;
    guint32     curr_offset;
    gint        dec_idx;
    curr_offset = offset;
    if ((int) idx < 0 || idx >= ansi_a_elem_1_max-1)
    {
        return tvb_reported_length_remaining(tvb, offset) ;
    }
    dec_idx = ansi_a_elem_1_strings[idx].dec_index;
    data_p->elem_item = NULL;
    if (elem_1_fcn[dec_idx] == NULL)
    {
        proto_tree_add_expert_format(tree, pinfo, &ei_ansi_a_no_v_elem_diss, tvb, curr_offset, 1,
            "No element dissector, rest of dissection may be incorrect");
        consumed = 1;
    }
    else
    {
        consumed = (*elem_1_fcn[dec_idx])(tvb, pinfo, tree, curr_offset, -1, data_p);
    }
    return(consumed);
}