aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-06-03 10:11:01 -0400
committerAnders Broman <a.broman58@gmail.com>2014-06-04 04:24:25 +0000
commita3ebd0d8d95fa508fb0784413e1d10db90083c81 (patch)
tree628341e37eb899049f19045d49d2d93adb11853a
parent3bdc0f9f2d9d80068f32df565def7c4f8c634eb0 (diff)
packet-q2931.c: proto_tree_add_text -> something filterable.
Parts of this dissector have TLV design, but the identifier is "hidden" by the field. I left that behavior in and used more proto_tree_add_uint than proto_tree_add_item because of it. But at least the fields themselves are more filterable. Change-Id: I94f38d0063e32f6f3f682b380e0ce7bd051121c6 Reviewed-on: https://code.wireshark.org/review/1934 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-q2931.c588
1 files changed, 272 insertions, 316 deletions
diff --git a/epan/dissectors/packet-q2931.c b/epan/dissectors/packet-q2931.c
index b58bdffb85..ccbcfde283 100644
--- a/epan/dissectors/packet-q2931.c
+++ b/epan/dissectors/packet-q2931.c
@@ -56,6 +56,86 @@ static int hf_q2931_message_len = -1;
static int hf_q2931_ie_handling_instructions = -1;
static int hf_q2931_ie_coding_standard = -1;
static int hf_q2931_ie_action_indicator = -1;
+/* Generated from convert_proto_tree_add_text.pl */
+static int hf_q2931_number_bytes = -1;
+static int hf_q2931_conn_id_vci = -1;
+static int hf_q2931_restart_indicator = -1;
+static int hf_q2931_conn_id_vpci = -1;
+static int hf_q2931_bband_low_layer_info_mode = -1;
+static int hf_q2931_cause_rejection_insufficient_information_element = -1;
+static int hf_q2931_bband_low_layer_info_user_info_l3_proto = -1;
+static int hf_q2931_number_string = -1;
+static int hf_q2931_aal1_backward_max_cpcs_sdu_size = -1;
+static int hf_q2931_user_plane_connection_configuration = -1;
+static int hf_q2931_party_subaddr_subaddress = -1;
+static int hf_q2931_aal1_mode = -1;
+static int hf_q2931_cause_location = -1;
+static int hf_q2931_bband_low_layer_info_user_specified_l2_proto = -1;
+static int hf_q2931_information_element = -1;
+static int hf_q2931_conn_id_preferred_exclusive = -1;
+static int hf_q2931_cause_vci = -1;
+static int hf_q2931_cause_information_element = -1;
+static int hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator = -1;
+static int hf_q2931_cause_rejection_reason = -1;
+static int hf_q2931_ethernet_type = -1;
+static int hf_q2931_cause_value = -1;
+static int hf_q2931_information_element_length = -1;
+static int hf_q2931_cause_rejection_user_specific_diagnostic = -1;
+static int hf_q2931_transit_network_sel_type = -1;
+static int hf_q2931_user_defined_aal_information = -1;
+static int hf_q2931_aal1_forward_max_cpcs_sdu_size = -1;
+static int hf_q2931_atm_transfer_capability = -1;
+static int hf_q2931_aal1_subtype = -1;
+static int hf_q2931_information_element_extension = -1;
+static int hf_q2931_party_subaddr_type_of_subaddress = -1;
+static int hf_q2931_number_plan = -1;
+static int hf_q2931_aal1_error_correction_method = -1;
+static int hf_q2931_call_state = -1;
+static int hf_q2931_bearer_class = -1;
+static int hf_q2931_protocol_id = -1;
+static int hf_q2931_information_element_data = -1;
+static int hf_q2931_aal1_partially_filled_cells_method = -1;
+static int hf_q2931_lane_protocol_id = -1;
+static int hf_q2931_party_subaddr_odd_even_indicator = -1;
+static int hf_q2931_qos_class_backward = -1;
+static int hf_q2931_cause_rejection_condition = -1;
+static int hf_q2931_aal1_source_clock_frequency_recovery_method = -1;
+static int hf_q2931_broadband_repeat_indicator = -1;
+static int hf_q2931_cause_rejection_missing_information_element = -1;
+static int hf_q2931_e2e_transit_delay_maximum_end_to_end = -1;
+static int hf_q2931_endpoint_reference_identifier_value = -1;
+static int hf_q2931_cause_vpci = -1;
+static int hf_q2931_endpoint_state = -1;
+static int hf_q2931_high_layer_information_type = -1;
+static int hf_q2931_transit_network_sel_network_id = -1;
+static int hf_q2931_aal1_sscs_type = -1;
+static int hf_q2931_bband_low_layer_info_packet_window_size = -1;
+static int hf_q2931_aal1_structured_data_transfer_block_size = -1;
+static int hf_q2931_cause_timer = -1;
+static int hf_q2931_cause_message_type = -1;
+static int hf_q2931_e2e_transit_delay_cumulative = -1;
+static int hf_q2931_oam_traffic_descriptor_shaping_indicator = -1;
+static int hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator = -1;
+static int hf_q2931_organization_code = -1;
+static int hf_q2931_bband_low_layer_info_additional_l3_proto = -1;
+static int hf_q2931_transit_network_sel_plan = -1;
+static int hf_q2931_bband_low_layer_info_user_info_l2_proto = -1;
+static int hf_q2931_aal1_multiplier = -1;
+static int hf_q2931_aal_type = -1;
+static int hf_q2931_aal1_cbr_rate = -1;
+static int hf_q2931_number_type = -1;
+static int hf_q2931_cause_rejection_diagnostic = -1;
+static int hf_q2931_bband_low_layer_info_default_packet_size = -1;
+static int hf_q2931_susceptibility_to_clipping = -1;
+static int hf_q2931_oam_traffic_descriptor_management_indicator = -1;
+static int hf_q2931_qos_class_forward = -1;
+static int hf_q2931_endpoint_reference_type = -1;
+static int hf_q2931_number_presentation_indicator = -1;
+static int hf_q2931_bband_low_layer_info_user_info_l1_proto = -1;
+static int hf_q2931_number_screening_indicator = -1;
+static int hf_q2931_bband_low_layer_info_window_size = -1;
+static int hf_q2931_conn_id_vp_associated_signalling = -1;
+static int hf_q2931_cause_cell_rate_subfield_identifier = -1;
static gint ett_q2931 = -1;
static gint ett_q2931_ext = -1;
@@ -118,6 +198,8 @@ static const value_string q2931_message_type_vals[] = {
{ 0, NULL }
};
+static value_string_ext q2931_message_type_vals_ext = VALUE_STRING_EXT_INIT(q2931_message_type_vals);
+
static const true_false_string tfs_call_ref_flag = {
"Message sent to originating side",
"Message sent from originating side"
@@ -239,6 +321,8 @@ static const value_string q2931_info_element_vals[] = {
{ 0, NULL }
};
+static value_string_ext q2931_info_element_vals_ext = VALUE_STRING_EXT_INIT(q2931_info_element_vals);
+
/*
* Dissect a locking or non-locking shift information element.
*/
@@ -360,8 +444,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
aal_type = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1, "AAL type: %s",
- val_to_str(aal_type, q9231_aal_type_vals, "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_aal_type, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -374,9 +457,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
*/
if (len > 4)
len = 4;
- proto_tree_add_text(tree, tvb, offset, len,
- "User defined AAL information: %s",
- tvb_bytes_to_ep_str(tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_user_defined_aal_information, tvb, offset, len, ENC_NA);
return;
}
@@ -388,10 +469,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "Subtype: %s",
- val_to_str(value, q9231_aal1_subtype_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_aal1_subtype, tvb, offset, 2, value);
offset += 2;
len -= 2;
break;
@@ -400,10 +478,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "CBR rate: %s",
- val_to_str(value, q9231_aal1_cbr_rate_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_aal1_cbr_rate, tvb, offset, 2, value);
offset += 2;
len -= 2;
break;
@@ -412,8 +487,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 3)
return;
value = tvb_get_ntohs(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 3,
- "Multiplier: %u", value);
+ proto_tree_add_uint(tree, hf_q2931_aal1_multiplier, tvb, offset, 3, value);
offset += 3;
len -= 3;
break;
@@ -422,10 +496,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "Source clock frequency recovery method: %s",
- val_to_str(value, q2931_aal1_src_clk_rec_meth_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_aal1_source_clock_frequency_recovery_method, tvb, offset, 2, value);
offset += 2;
len -= 2;
break;
@@ -434,10 +505,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "Error correction method: %s",
- val_to_str(value, q2931_aal1_err_correction_method_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_aal1_error_correction_method, tvb, offset, 2, value);
offset += 2;
len -= 2;
break;
@@ -446,8 +514,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 3)
return;
value = tvb_get_ntohs(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 3,
- "Structured data transfer block size: %u", value);
+ proto_tree_add_uint(tree, hf_q2931_aal1_structured_data_transfer_block_size, tvb, offset, 3, value);
offset += 3;
len -= 3;
break;
@@ -456,8 +523,8 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "Partially filled cells method: %u octets", value);
+ proto_tree_add_uint_format_value(tree, hf_q2931_aal1_partially_filled_cells_method, tvb, offset, 2,
+ value, "%u octets", value);
offset += 2;
len -= 2;
break;
@@ -466,8 +533,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 3)
return;
value = tvb_get_ntohs(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 3,
- "Forward maximum CPCS-SDU size: %u", value);
+ proto_tree_add_uint(tree, hf_q2931_aal1_forward_max_cpcs_sdu_size, tvb, offset, 3, value);
offset += 3;
len -= 3;
break;
@@ -476,8 +542,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 3)
return;
value = tvb_get_ntohs(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 3,
- "Backward maximum CPCS-SDU size: %u", value);
+ proto_tree_add_uint(tree, hf_q2931_aal1_backward_max_cpcs_sdu_size, tvb, offset, 3, value);
offset += 3;
len -= 3;
break;
@@ -497,10 +562,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "Mode: %s",
- val_to_str(value, q2931_aal_mode_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_aal1_mode, tvb, offset, 2, value);
offset += 2;
len -= 2;
break;
@@ -509,10 +571,7 @@ dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, int offset, int len,
if (len < 2)
return;
value = tvb_get_guint8(tvb, offset + 1);
- proto_tree_add_text(tree, tvb, offset, 2,
- "SSCS type: %s",
- val_to_str(value, q2931_sscs_type_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_aal1_sscs_type, tvb, offset, 2, value);
offset += 2;
len -= 2;
break;
@@ -688,36 +747,22 @@ dissect_q2931_bband_bearer_cap_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Bearer class: %s",
- val_to_str(octet & 0x1F, q2931_bearer_class_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_bearer_class, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (len == 0)
return;
if (!(octet & Q2931_IE_EXTENSION)) {
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "ATM Transfer Capability: %s",
- val_to_str(octet & 0x1F, q2931_transfer_capability_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_atm_transfer_capability, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
}
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Susceptibility to clipping: %s",
- val_to_str(octet & 0x60, q2931_susc_clip_vals,
- "Unknown (0x%02X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "User-plane connection configuration: %s",
- val_to_str(octet & 0x03, q2931_up_conn_config_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_susceptibility_to_clipping, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_user_plane_connection_configuration, tvb, offset, 1, ENC_NA);
}
/*
@@ -735,15 +780,10 @@ static void
dissect_q2931_bband_hi_layer_info_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "High layer information type: %s",
- val_to_str(octet & 0x7F, q2931_hi_layer_info_type_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_high_layer_information_type, tvb, offset, 1, ENC_NA);
/*offset += 1; */
/* len -= 1; */
}
@@ -814,7 +854,6 @@ dissect_q2931_bband_low_layer_info_ie(tvbuff_t *tvb, int offset, int len,
guint8 uil3_protocol;
guint8 add_l3_info;
guint32 organization_code;
- guint16 pid;
if (len == 0)
return;
@@ -823,9 +862,7 @@ dissect_q2931_bband_low_layer_info_ie(tvbuff_t *tvb, int offset, int len,
/*
* Layer 1 information.
*/
- proto_tree_add_text(tree, tvb, offset, 1,
- "User information layer 1 protocol: 0x%02X",
- octet & 0x1F);
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_info_l1_proto, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
}
@@ -838,10 +875,7 @@ dissect_q2931_bband_low_layer_info_ie(tvbuff_t *tvb, int offset, int len,
* Layer 2 information.
*/
uil2_protocol = octet & 0x1F;
- proto_tree_add_text(tree, tvb, offset, 1,
- "User information layer 2 protocol: %s",
- val_to_str(uil2_protocol, q2931_uil2_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_info_l2_proto, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -851,14 +885,9 @@ dissect_q2931_bband_low_layer_info_ie(tvbuff_t *tvb, int offset, int len,
return;
octet = tvb_get_guint8(tvb, offset);
if (uil2_protocol == Q2931_UIL2_USER_SPEC) {
- proto_tree_add_text(tree, tvb, offset, 1,
- "User-specified layer 2 protocol information: 0x%02X",
- octet & 0x7F);
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_specified_l2_proto, tvb, offset, 1, ENC_NA);
} else {
- proto_tree_add_text(tree, tvb, offset, 1,
- "Mode: %s",
- val_to_str(octet & 0x60, q2931_mode_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_mode, tvb, offset, 1, ENC_NA);
}
offset += 1;
len -= 1;
@@ -868,8 +897,8 @@ dissect_q2931_bband_low_layer_info_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Window size: %u k", octet & 0x7F);
+ proto_tree_add_uint_format_value(tree, hf_q2931_bband_low_layer_info_window_size, tvb, offset, 1,
+ octet & 0x7F, "%u k", octet & 0x7F);
offset += 1;
len -= 1;
}
@@ -884,10 +913,7 @@ l2_done:
* Layer 3 information.
*/
uil3_protocol = octet & 0x1F;
- proto_tree_add_text(tree, tvb, offset, 1,
- "User information layer 3 protocol: %s",
- val_to_str(uil3_protocol, q2931_uil3_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_info_l3_proto, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -905,10 +931,7 @@ l2_done:
case Q2931_UIL3_X25_PL:
case Q2931_UIL3_ISO_8208:
case Q2931_UIL3_X223:
- proto_tree_add_text(tree, tvb, offset, 1,
- "Mode: %s",
- val_to_str(octet & 0x60, q2931_mode_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_mode, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -917,8 +940,7 @@ l2_done:
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Default packet size: %u", octet & 0x0F);
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_default_packet_size, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -927,16 +949,14 @@ l2_done:
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Packet window size: %u", octet & 0x7F);
+ proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_packet_window_size, tvb, offset, 1, ENC_NA);
/*offset += 1;*/
/*len -= 1;*/
break;
case Q2931_UIL3_USER_SPEC:
- proto_tree_add_text(tree, tvb, offset, 1,
- "Default packet size: %u octets",
- 1 << (octet & 0x0F));
+ proto_tree_add_uint_format_value(tree, hf_q2931_bband_low_layer_info_default_packet_size, tvb, offset, 1,
+ 1 << (octet & 0x0F), "%u octets", 1 << (octet & 0x0F));
/*offset += 1;*/
/*len -= 1;*/
break;
@@ -948,10 +968,7 @@ l2_done:
if (len < 2)
return;
add_l3_info |= (tvb_get_guint8(tvb, offset + 1) & 0x40) >> 6;
- proto_tree_add_text(tree, tvb, offset, 2,
- "Additional layer 3 protocol information: %s",
- val_to_str(add_l3_info, nlpid_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_uint(tree, hf_q2931_bband_low_layer_info_additional_l3_proto, tvb, offset, 2, add_l3_info);
offset += 2;
len -= 2;
if (add_l3_info == NLPID_SNAP) {
@@ -960,34 +977,22 @@ l2_done:
offset += 1;
/*len -= 1;*/
organization_code = tvb_get_ntoh24(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 3,
- "Organization Code: 0x%06X (%s)",
- organization_code,
- val_to_str_const(organization_code, oui_vals,
- "Unknown"));
+ proto_tree_add_item(tree, hf_q2931_organization_code, tvb, offset, 3, ENC_BIG_ENDIAN);
offset += 3;
/*len -= 3;*/
- pid = tvb_get_ntohs(tvb, offset);
switch (organization_code) {
case OUI_ENCAP_ETHER:
- proto_tree_add_text(tree, tvb, offset, 2,
- "Ethernet type: %s",
- val_to_str(pid, etype_vals,
- "Unknown (0x%04X)"));
+ proto_tree_add_item(tree, hf_q2931_ethernet_type, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
case OUI_ATM_FORUM:
- proto_tree_add_text(tree, tvb, offset, 2,
- "LANE Protocol ID: %s",
- val_to_str(pid, lane_pid_vals,
- "Unknown (0x%04X)"));
+ proto_tree_add_item(tree, hf_q2931_lane_protocol_id, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
default:
- proto_tree_add_text(tree, tvb, offset, 2,
- "Protocol ID: 0x%04X", pid);
+ proto_tree_add_item(tree, hf_q2931_protocol_id, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
}
}
@@ -1115,6 +1120,8 @@ static const value_string q2931_cause_code_vals[] = {
{ 0, NULL }
};
+static value_string_ext q2931_cause_code_vals_ext = VALUE_STRING_EXT_INIT(q2931_cause_code_vals);
+
static const value_string q2931_cause_condition_vals[] = {
{ 0x00, "Unknown" },
{ 0x01, "Permanent" },
@@ -1146,11 +1153,7 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Location: %s",
- val_to_str(octet & 0x0F, q2931_cause_location_vals,
- "Unknown (0x%X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_location, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -1158,10 +1161,7 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
return;
octet = tvb_get_guint8(tvb, offset);
cause_value = octet & 0x7F;
- proto_tree_add_text(tree, tvb, offset, 1,
- "Cause value: %s",
- val_to_str(cause_value, q2931_cause_code_vals,
- "Unknown (0x%X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_value, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -1187,14 +1187,8 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
case Q2931_CAUSE_CALL_REJECTED:
rejection_reason = octet & 0x7C;
- proto_tree_add_text(tree, tvb, offset, 1,
- "Rejection reason: %s",
- val_to_str(octet & 0x7C, q2931_rejection_reason_vals,
- "Unknown (0x%X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "Condition: %s",
- val_to_str(octet & 0x03, q2931_cause_condition_vals,
- "Unknown (0x%X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_reason, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_condition, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -1203,29 +1197,19 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
switch (rejection_reason) {
case Q2931_REJ_USER_SPECIFIC:
- proto_tree_add_text(tree, tvb, offset, len,
- "User specific diagnostic: %s",
- tvb_bytes_to_ep_str(tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_user_specific_diagnostic, tvb, offset, len, ENC_NA);
break;
case Q2931_REJ_IE_MISSING:
- proto_tree_add_text(tree, tvb, offset, 1,
- "Missing information element: %s",
- val_to_str(tvb_get_guint8(tvb, offset), q2931_info_element_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_missing_information_element, tvb, offset, 1, ENC_NA);
break;
case Q2931_REJ_IE_INSUFFICIENT:
- proto_tree_add_text(tree, tvb, offset, 1,
- "Insufficient information element: %s",
- val_to_str(tvb_get_guint8(tvb, offset), q2931_info_element_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_insufficient_information_element, tvb, offset, 1, ENC_NA);
break;
default:
- proto_tree_add_text(tree, tvb, offset, len,
- "Diagnostic: %s",
- tvb_bytes_to_ep_str(tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_diagnostic, tvb, offset, len, ENC_NA);
break;
}
break;
@@ -1249,10 +1233,7 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
case Q2931_CAUSE_IE_NONEX_OR_UNIMPL:
case Q2931_CAUSE_INVALID_IE_CONTENTS:
do {
- proto_tree_add_text(tree, tvb, offset, 1,
- "Information element: %s",
- val_to_str(tvb_get_guint8(tvb, offset), q2931_info_element_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_information_element, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
} while (len >= 0);
@@ -1260,10 +1241,7 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
case Q2931_CAUSE_CELL_RATE_UNAVAIL:
do {
- proto_tree_add_text(tree, tvb, offset, 1,
- "Cell rate subfield identifier: %s",
- val_to_str(tvb_get_guint8(tvb, offset), q2931_atm_td_subfield_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_cell_rate_subfield_identifier, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
} while (len >= 0);
@@ -1272,36 +1250,28 @@ dissect_q2931_cause_ie(tvbuff_t *tvb, int offset, int len,
case Q2931_CAUSE_CHAN_NONEXISTENT:
if (len < 2)
return;
- proto_tree_add_text(tree, tvb, offset, 2,
- "VPCI: %u", tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(tree, hf_q2931_cause_vpci, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
len -= 2;
if (len < 2)
return;
- proto_tree_add_text(tree, tvb, offset, 2,
- "VCI: %u", tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(tree, hf_q2931_cause_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
case Q2931_CAUSE_MT_NONEX_OR_UNIMPL:
case Q2931_CAUSE_MSG_INCOMPAT_W_CS:
- proto_tree_add_text(tree, tvb, offset, 1,
- "Message type: %s",
- val_to_str(tvb_get_guint8(tvb, offset), q2931_message_type_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_cause_message_type, tvb, offset, 1, ENC_NA);
break;
case Q2931_CAUSE_REC_TIMER_EXP:
if (len < 3)
return;
- proto_tree_add_text(tree, tvb, offset, 3,
- "Timer: %.3s", tvb_get_string(wmem_packet_scope(), tvb, offset, 3));
+ proto_tree_add_item(tree, hf_q2931_cause_timer, tvb, offset, 3, ENC_ASCII|ENC_NA);
break;
default:
- proto_tree_add_text(tree, tvb, offset, len,
- "Diagnostics: %s",
- tvb_bytes_to_ep_str(tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_cause_rejection_diagnostic, tvb, offset, len, ENC_NA);
}
}
@@ -1334,15 +1304,10 @@ static void
dissect_q2931_call_state_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Call state: %s",
- val_to_str(octet & 0x3F, q2931_call_state_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_call_state, tvb, offset, 1, ENC_NA);
}
/*
@@ -1396,30 +1361,18 @@ dissect_q2931_number_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Type of number: %s",
- val_to_str(octet & 0x70, q2931_number_type_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_number_type, tvb, offset, 1, ENC_NA);
numbering_plan = octet & 0x0F;
- proto_tree_add_text(tree, tvb, offset, 1,
- "Numbering plan: %s",
- val_to_str(numbering_plan, q2931_numbering_plan_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_number_plan, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (!(octet & Q2931_IE_EXTENSION)) {
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Presentation indicator: %s",
- val_to_str(octet & 0x60, q2931_presentation_indicator_vals,
- "Unknown (0x%X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "Screening indicator: %s",
- val_to_str(octet & 0x03, q2931_screening_indicator_vals,
- "Unknown (0x%X)"));
+
+ proto_tree_add_item(tree, hf_q2931_number_presentation_indicator, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_number_screening_indicator, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
}
@@ -1429,8 +1382,7 @@ dissect_q2931_number_ie(tvbuff_t *tvb, int offset, int len,
switch (numbering_plan) {
case Q2931_ISDN_NUMBERING:
- proto_tree_add_text(tree, tvb, offset, len, "Number: %.*s",
- len, tvb_get_string(wmem_packet_scope(), tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_number_string, tvb, offset, len, ENC_ASCII|ENC_NA);
break;
case Q2931_NSAP_ADDRESSING:
@@ -1446,8 +1398,7 @@ dissect_q2931_number_ie(tvbuff_t *tvb, int offset, int len,
break;
default:
- proto_tree_add_text(tree, tvb, offset, len, "Number: %s",
- tvb_bytes_to_ep_str(tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_number_bytes, tvb, offset, len, ENC_NA);
break;
}
}
@@ -1472,26 +1423,17 @@ static void
dissect_q2931_party_subaddr_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Type of subaddress: %s",
- val_to_str(octet & 0x70, q2931_subaddress_type_vals,
- "Unknown (0x%02X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "Odd/even indicator: %s",
- val_to_str(octet & 0x10, q2931_odd_even_indicator_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_party_subaddr_type_of_subaddress, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_party_subaddr_odd_even_indicator, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (len == 0)
return;
- proto_tree_add_text(tree, tvb, offset, len, "Subaddress: %s",
- tvb_bytes_to_ep_str(tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_party_subaddr_subaddress, tvb, offset, len, ENC_NA);
}
/*
@@ -1514,33 +1456,23 @@ static void
dissect_q2931_connection_identifier_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "VP-associated signalling: %s",
- val_to_str(octet & 0x18, q2931_vp_associated_signalling_vals,
- "Unknown (0x%02X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "Preferred/exclusive: %s",
- val_to_str(octet & 0x07, q2931_preferred_exclusive_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_conn_id_vp_associated_signalling, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_conn_id_preferred_exclusive, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (len < 2)
return;
- proto_tree_add_text(tree, tvb, offset, 2, "VPCI: %u",
- tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(tree, hf_q2931_conn_id_vpci, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
len -= 2;
if (len < 2)
return;
- proto_tree_add_text(tree, tvb, offset, 2, "VCI: %u",
- tvb_get_ntohs(tvb, offset));
+ proto_tree_add_item(tree, hf_q2931_conn_id_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
}
/*
@@ -1560,18 +1492,17 @@ dissect_q2931_e2e_transit_delay_ie(tvbuff_t *tvb, int offset, int len,
switch (identifier) {
case 0x01: /* Cumulative transit delay identifier */
- proto_tree_add_text(tree, tvb, offset, 3,
- "Cumulative transit delay: %u ms", value);
+ proto_tree_add_uint_format_value(tree, hf_q2931_e2e_transit_delay_cumulative, tvb, offset, 3,
+ value, "%u ms", value);
break;
case 0x03: /* Maximum transit delay identifier */
if (value == 0xFFFF) {
- proto_tree_add_text(tree, tvb, offset, 3,
- "Any end-to-end transit delay value acceptable");
+ proto_tree_add_uint_format_value(tree, hf_q2931_e2e_transit_delay_maximum_end_to_end, tvb, offset, 3,
+ value, "Any end-to-end transit delay value acceptable");
} else {
- proto_tree_add_text(tree, tvb, offset, 3,
- "Maximum end-to-end transit delay: %u ms",
- value);
+ proto_tree_add_uint_format_value(tree, hf_q2931_e2e_transit_delay_maximum_end_to_end, tvb, offset, 3,
+ value, "%u ms", value);
}
break;
@@ -1596,25 +1527,16 @@ static void
dissect_q2931_qos_parameter_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "QOS class forward: %s",
- val_to_str(octet, q2931_qos_parameter_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_qos_class_forward, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "QOS class backward: %s",
- val_to_str(octet, q2931_qos_parameter_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_qos_class_backward, tvb, offset, 1, ENC_NA);
}
/*
@@ -1629,15 +1551,10 @@ static void
dissect_q2931_bband_rpt_indicator(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Broadband repeat indicator: %s",
- val_to_str(octet & 0x0F, q2931_bband_rpt_indicator_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_broadband_repeat_indicator, tvb, offset, 1, ENC_NA);
}
/*
@@ -1654,15 +1571,10 @@ static void
dissect_q2931_restart_indicator(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Restart indicator: %s",
- val_to_str(octet & 0x07, q2931_class_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_restart_indicator, tvb, offset, 1, ENC_NA);
}
/*
@@ -1715,26 +1627,17 @@ static void
dissect_q2931_transit_network_sel_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Type of network identification: %s",
- val_to_str(octet & 0x70, q2931_netid_type_vals,
- "Unknown (0x%02X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "Network identification plan: %s",
- val_to_str(octet & 0x0F, q2931_netid_plan_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_transit_network_sel_type, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_transit_network_sel_plan, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (len == 0)
return;
- proto_tree_add_text(tree, tvb, offset, len,
- "Network identification: %.*s", len, tvb_get_string(wmem_packet_scope(), tvb, offset, len));
+ proto_tree_add_item(tree, hf_q2931_transit_network_sel_network_id, tvb, offset, len, ENC_NA|ENC_ASCII);
}
/*
@@ -1775,31 +1678,19 @@ dissect_q2931_oam_traffic_descriptor_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Shaping indicator: %s",
- val_to_str(octet & 0x60, q2931_shaping_indicator_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_shaping_indicator, tvb, offset, 1, ENC_NA);
proto_tree_add_text(tree, tvb, offset, 1,
"Use of end-to-end OAM F5 flow is %s",
(octet & 0x10) ? "mandatory" : "optional");
- proto_tree_add_text(tree, tvb, offset, 1,
- "User-Network fault management indicator: %s",
- val_to_str(octet & 0x07, q2931_user_net_fault_mgmt_vals,
- "Unknown (0x%02X)"));
+ proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_management_indicator, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Forward end-to-end OAM F5 flow indicator: %s",
- val_to_str(octet & 0x70, q2931_fwd_e2e_oam_f5_flow_indicator_vals,
- "Unknown (0x%02X)"));
- proto_tree_add_text(tree, tvb, offset, 1,
- "Backward end-to-end OAM F5 flow indicator: %s",
- val_to_str(octet & 0x07, q2931_bwd_e2e_oam_f5_flow_indicator_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator, tvb, offset, 1, ENC_NA);
}
/*
@@ -1814,16 +1705,12 @@ static void
dissect_q2931_endpoint_reference_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
guint16 value;
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Endpoint reference type: %s",
- val_to_str(octet, q2931_endpoint_reference_type_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_endpoint_reference_type, tvb, offset, 1, ENC_NA);
offset += 1;
len -= 1;
@@ -1833,10 +1720,8 @@ dissect_q2931_endpoint_reference_ie(tvbuff_t *tvb, int offset, int len,
proto_tree_add_text(tree, tvb, offset, 2,
"Endpoint reference flag: %s",
(value & 0x8000) ? "Message sent to side that originates the endpoint reference" :
- "Message sent from side that originates the endpoint reference");
- proto_tree_add_text(tree, tvb, offset, 2,
- "Endpoint reference identifier value: %u",
- value & 0x7FFF);
+ "Message sent from side that originates the endpoint reference");
+ proto_tree_add_item(tree, hf_q2931_endpoint_reference_identifier_value, tvb, offset, 2, ENC_BIG_ENDIAN);
}
/*
@@ -1856,15 +1741,10 @@ static void
dissect_q2931_endpoint_state_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- guint8 octet;
-
if (len == 0)
return;
- octet = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 1,
- "Endpoint reference party-state: %s",
- val_to_str(octet & 0x3F, q2931_endpoint_reference_party_state_vals,
- "Unknown (0x%02X)"));
+
+ proto_tree_add_item(tree, hf_q2931_endpoint_state, tvb, offset, 1, ENC_NA);
}
static void
@@ -1980,22 +1860,18 @@ dissect_q2931_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
proto_tree *ie_ext_tree;
ti = proto_tree_add_text(tree, tvb, offset, 1+1+2+len, "%s",
- val_to_str(info_element, q2931_info_element_vals,
+ val_to_str_ext(info_element, &q2931_info_element_vals_ext,
"Unknown information element (0x%02X)"));
ie_tree = proto_item_add_subtree(ti, ett_q2931_ie);
- proto_tree_add_text(ie_tree, tvb, offset, 1, "Information element: %s",
- val_to_str(info_element, q2931_info_element_vals,
- "Unknown (0x%02X)"));
- ti = proto_tree_add_text(ie_tree, tvb, offset + 1, 1,
- "Information element extension: 0x%02x",
- info_element_ext);
+ proto_tree_add_uint(ie_tree, hf_q2931_information_element, tvb, offset, 1, info_element);
+ ti = proto_tree_add_uint(ie_tree, hf_q2931_information_element_extension, tvb, offset + 1, 1, info_element_ext);
ie_ext_tree = proto_item_add_subtree(ti, ett_q2931_ie_ext);
proto_tree_add_item(ie_ext_tree, hf_q2931_ie_coding_standard, tvb, offset+1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(ie_ext_tree, hf_q2931_ie_handling_instructions, tvb, offset+1, 1, ENC_BIG_ENDIAN);
if (info_element_ext & Q2931_IE_COMPAT_FOLLOW_INST) {
proto_tree_add_item(ie_ext_tree, hf_q2931_ie_action_indicator, tvb, offset+1, 1, ENC_BIG_ENDIAN);
}
- proto_tree_add_text(ie_tree, tvb, offset + 2, 2, "Length: %u", len);
+ proto_tree_add_uint(ie_tree, hf_q2931_information_element_length, tvb, offset + 2, 2, len);
if ((info_element_ext & Q2931_IE_COMPAT_CODING_STD)
== Q2931_ITU_STANDARDIZED_CODING) {
@@ -2006,8 +1882,7 @@ dissect_q2931_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
* We don't know how it's encoded, so just
* dump it as data and be done with it.
*/
- proto_tree_add_text(ie_tree, tvb, offset + 4, len,
- "Data: %s", tvb_bytes_to_ep_str(tvb, offset + 4, len));
+ proto_tree_add_item(ie_tree, hf_q2931_information_element_data, tvb, offset + 4, len, ENC_NA);
}
}
@@ -2057,7 +1932,7 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
message_type = tvb_get_guint8(tvb, offset);
col_add_str(pinfo->cinfo, COL_INFO,
- val_to_str(message_type, q2931_message_type_vals,
+ val_to_str_ext(message_type, &q2931_message_type_vals_ext,
"Unknown message type (0x%02X)"));
if (q2931_tree != NULL)
@@ -2146,7 +2021,7 @@ proto_register_q2931(void)
NULL, HFILL }},
{ &hf_q2931_message_type,
- { "Message type", "q2931.message_type", FT_UINT8, BASE_HEX, VALS(q2931_message_type_vals), 0x0,
+ { "Message type", "q2931.message_type", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_message_type_vals_ext, 0x0,
NULL, HFILL }},
{ &hf_q2931_message_type_ext,
@@ -2176,6 +2051,87 @@ proto_register_q2931(void)
{ &hf_q2931_ie_action_indicator,
{ "Action indicator", "q2931.ie_action_indicator", FT_UINT8, BASE_DEC, VALS(ie_action_ind_vals), Q2931_IE_COMPAT_ACTION_IND,
NULL, HFILL }},
+
+ /* Generated from convert_proto_tree_add_text.pl */
+ { &hf_q2931_aal_type, { "AAL type", "q2931.aal_type", FT_UINT8, BASE_HEX, VALS(q9231_aal_type_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_user_defined_aal_information, { "User defined AAL information", "q2931.user_defined_aal_information", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_subtype, { "Subtype", "q2931.aal1.subtype", FT_UINT8, BASE_HEX, VALS(q9231_aal1_subtype_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_cbr_rate, { "CBR rate", "q2931.aal1.cbr_rate", FT_UINT8, BASE_HEX, VALS(q9231_aal1_cbr_rate_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_multiplier, { "Multiplier", "q2931.aal1.multiplier", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_source_clock_frequency_recovery_method, { "Source clock frequency recovery method", "q2931.aal1.source_clock_frequency_recovery_method", FT_UINT8, BASE_HEX, VALS(q2931_aal1_src_clk_rec_meth_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_error_correction_method, { "Error correction method", "q2931.aal1.error_correction_method", FT_UINT8, BASE_HEX, VALS(q2931_aal1_err_correction_method_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_structured_data_transfer_block_size, { "Structured data transfer block size", "q2931.aal1.structured_data_transfer_block_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_partially_filled_cells_method, { "Partially filled cells method", "q2931.aal1.partially_filled_cells_method", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_forward_max_cpcs_sdu_size, { "Forward maximum CPCS-SDU size", "q2931.aal1.forward_max_cpcs_sdu_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_backward_max_cpcs_sdu_size, { "Backward maximum CPCS-SDU size", "q2931.aal1.backward_max_cpcs_sdu_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_mode, { "Mode", "q2931.aal1.mode", FT_UINT8, BASE_HEX, VALS(q2931_aal_mode_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_aal1_sscs_type, { "SSCS type", "q2931.aal1.sscs_type", FT_UINT8, BASE_HEX, VALS(q2931_sscs_type_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_bearer_class, { "Bearer class", "q2931.bearer_class", FT_UINT8, BASE_HEX, VALS(q2931_bearer_class_vals), 0x1F, NULL, HFILL }},
+ { &hf_q2931_atm_transfer_capability, { "ATM Transfer Capability", "q2931.atm_transfer_capability", FT_UINT8, BASE_HEX, VALS(q2931_transfer_capability_vals), 0x1F, NULL, HFILL }},
+ { &hf_q2931_susceptibility_to_clipping, { "Susceptibility to clipping", "q2931.susceptibility_to_clipping", FT_UINT8, BASE_HEX, VALS(q2931_susc_clip_vals), 0x60, NULL, HFILL }},
+ { &hf_q2931_user_plane_connection_configuration, { "User-plane connection configuration", "q2931.user_plane_connection_configuration", FT_UINT8, BASE_HEX, VALS(q2931_up_conn_config_vals), 0x03, NULL, HFILL }},
+ { &hf_q2931_high_layer_information_type, { "High layer information type", "q2931.high_layer_information_type", FT_UINT8, BASE_HEX, VALS(q2931_hi_layer_info_type_vals), 0x7F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_user_info_l1_proto, { "User information layer 1 protocol", "q2931.bband_low_layer_info.user_info_l1_proto", FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_user_info_l2_proto, { "User information layer 2 protocol", "q2931.bband_low_layer_info.user_info_l2_proto", FT_UINT8, BASE_HEX, VALS(q2931_uil2_vals), 0x1F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_user_specified_l2_proto, { "User-specified layer 2 protocol information", "q2931.bband_low_layer_info.user_specified_l2_proto", FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_mode, { "Mode", "q2931.bband_low_layer_info.mode", FT_UINT8, BASE_HEX, VALS(q2931_mode_vals), 0x60, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_window_size, { "Window size", "q2931.bband_low_layer_info.window_size", FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_user_info_l3_proto, { "User information layer 3 protocol", "q2931.bband_low_layer_info.user_info_l3_proto", FT_UINT8, BASE_HEX, VALS(q2931_uil3_vals), 0x1F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_default_packet_size, { "Default packet size", "q2931.bband_low_layer_info.default_packet_size", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_packet_window_size, { "Packet window size", "q2931.bband_low_layer_info.packet_window_size", FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL }},
+ { &hf_q2931_bband_low_layer_info_additional_l3_proto, { "Additional layer 3 protocol information", "q2931.bband_low_layer_info.additional_l3_proto", FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_organization_code, { "Organization Code", "q2931.bband_low_layer_info.organization_code", FT_UINT24, BASE_HEX, VALS(oui_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_ethernet_type, { "Ethernet type", "q2931.bband_low_layer_info.ethernet_type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_lane_protocol_id, { "LANE Protocol ID", "q2931.bband_low_layer_info.lane_protocol_id", FT_UINT16, BASE_HEX, VALS(lane_pid_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_protocol_id, { "Protocol ID", "q2931.bband_low_layer_info.protocol_id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_location, { "Location", "q2931.cause.location", FT_UINT8, BASE_HEX, VALS(q2931_cause_location_vals), 0x0F, NULL, HFILL }},
+ { &hf_q2931_cause_value, { "Cause value", "q2931.cause.value", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_cause_code_vals_ext, 0x7F, NULL, HFILL }},
+ { &hf_q2931_cause_rejection_reason, { "Rejection reason", "q2931.cause.rejection.reason", FT_UINT8, BASE_HEX, VALS(q2931_rejection_reason_vals), 0x7C, NULL, HFILL }},
+ { &hf_q2931_cause_rejection_condition, { "Condition", "q2931.cause.rejection.condition", FT_UINT8, BASE_HEX, VALS(q2931_cause_condition_vals), 0x03, NULL, HFILL }},
+ { &hf_q2931_cause_rejection_user_specific_diagnostic, { "User specific diagnostic", "q2931.cause.rejection.user_specific_diagnostic", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_rejection_missing_information_element, { "Missing information element", "q2931.cause.rejection.missing_information_element", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_rejection_insufficient_information_element, { "Insufficient information element", "q2931.cause.rejection.insufficient_information_element", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_rejection_diagnostic, { "Diagnostic", "q2931.cause.rejection.diagnostic", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_information_element, { "Information element", "q2931.cause.information_element", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_cell_rate_subfield_identifier, { "Cell rate subfield identifier", "q2931.cause.cell_rate_subfield_identifier", FT_UINT8, BASE_HEX, VALS(q2931_atm_td_subfield_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_vpci, { "VPCI", "q2931.cause.vpci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_vci, { "VCI", "q2931.cause.vci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_message_type, { "Message type", "q2931.cause.message_type", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_message_type_vals_ext, 0x0, NULL, HFILL }},
+ { &hf_q2931_cause_timer, { "Timer", "q2931.cause.timer", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_call_state, { "Call state", "q2931.call_state", FT_UINT8, BASE_HEX, VALS(q2931_call_state_vals), 0x3F, NULL, HFILL }},
+ { &hf_q2931_number_type, { "Type of number", "q2931.number.type", FT_UINT8, BASE_HEX, VALS(q2931_number_type_vals), 0x70, NULL, HFILL }},
+ { &hf_q2931_number_plan, { "Numbering plan", "q2931.number.plan", FT_UINT8, BASE_HEX, VALS(q2931_numbering_plan_vals), 0x0F, NULL, HFILL }},
+ { &hf_q2931_number_presentation_indicator, { "Presentation indicator", "q2931.number.presentation_indicator", FT_UINT8, BASE_HEX, VALS(q2931_presentation_indicator_vals), 0x60, NULL, HFILL }},
+ { &hf_q2931_number_screening_indicator, { "Screening indicator", "q2931.number.screening_indicator", FT_UINT8, BASE_HEX, VALS(q2931_screening_indicator_vals), 0x03, NULL, HFILL }},
+ { &hf_q2931_number_string, { "Number", "q2931.number.string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_number_bytes, { "Number", "q2931.number.bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_party_subaddr_type_of_subaddress, { "Type of subaddress", "q2931.party_subaddr.type_of_subaddress", FT_UINT8, BASE_HEX, VALS(q2931_subaddress_type_vals), 0x70, NULL, HFILL }},
+ { &hf_q2931_party_subaddr_odd_even_indicator, { "Odd/even indicator", "q2931.party_subaddr.odd_even_indicator", FT_UINT8, BASE_HEX, VALS(q2931_odd_even_indicator_vals), 0x10, NULL, HFILL }},
+ { &hf_q2931_party_subaddr_subaddress, { "Subaddress", "q2931.party_subaddr.subaddress", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_conn_id_vp_associated_signalling, { "VP-associated signalling", "q2931.conn_id.vp_associated_signalling", FT_UINT8, BASE_HEX, VALS(q2931_vp_associated_signalling_vals), 0x18, NULL, HFILL }},
+ { &hf_q2931_conn_id_preferred_exclusive, { "Preferred/exclusive", "q2931.conn_id.preferred_exclusive", FT_UINT8, BASE_HEX, VALS(q2931_preferred_exclusive_vals), 0x07, NULL, HFILL }},
+ { &hf_q2931_conn_id_vpci, { "VPCI", "q2931.conn_id.vpci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_conn_id_vci, { "VCI", "q2931.conn_id.vci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_e2e_transit_delay_cumulative, { "Cumulative transit delay", "q2931.e2e_transit_delay.cumulative", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_e2e_transit_delay_maximum_end_to_end, { "Maximum end-to-end transit delay", "q2931.e2e_transit_delay.maximum_end_to_end", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_qos_class_forward, { "QOS class forward", "q2931.qos_class_forward", FT_UINT8, BASE_HEX, VALS(q2931_qos_parameter_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_qos_class_backward, { "QOS class backward", "q2931.qos_class_backward", FT_UINT8, BASE_HEX, VALS(q2931_qos_parameter_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_broadband_repeat_indicator, { "Broadband repeat indicator", "q2931.broadband_repeat_indicator", FT_UINT8, BASE_HEX, VALS(q2931_bband_rpt_indicator_vals), 0x0F, NULL, HFILL }},
+ { &hf_q2931_restart_indicator, { "Restart indicator", "q2931.restart_indicator", FT_UINT8, BASE_HEX, VALS(q2931_class_vals), 0x07, NULL, HFILL }},
+ { &hf_q2931_transit_network_sel_type, { "Type of network identification", "q2931.transit_network_sel.type", FT_UINT8, BASE_HEX, VALS(q2931_netid_type_vals), 0x70, NULL, HFILL }},
+ { &hf_q2931_transit_network_sel_plan, { "Network identification plan", "q2931.transit_network_sel.plan", FT_UINT8, BASE_HEX, VALS(q2931_netid_plan_vals), 0x0F, NULL, HFILL }},
+ { &hf_q2931_transit_network_sel_network_id, { "Network identification", "q2931.transit_network_sel.network_identification", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_oam_traffic_descriptor_shaping_indicator, { "Shaping indicator", "q2931.oam_traffic_descriptor.shaping_indicator", FT_UINT8, BASE_HEX, VALS(q2931_shaping_indicator_vals), 0x60, NULL, HFILL }},
+ { &hf_q2931_oam_traffic_descriptor_management_indicator, { "User-Network fault management indicator", "q2931.oam_traffic_descriptor.management_indicator", FT_UINT8, BASE_HEX, VALS(q2931_user_net_fault_mgmt_vals), 0x07, NULL, HFILL }},
+ { &hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator, { "Forward end-to-end OAM F5 flow indicator", "q2931.oam_traffic_descriptor.forward_f5_flow_indicator", FT_UINT8, BASE_HEX, VALS(q2931_fwd_e2e_oam_f5_flow_indicator_vals), 0x70, NULL, HFILL }},
+ { &hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator, { "Backward end-to-end OAM F5 flow indicator", "q2931.oam_traffic_descriptor.backward_f5_flow_indicator", FT_UINT8, BASE_HEX, VALS(q2931_bwd_e2e_oam_f5_flow_indicator_vals), 0x07, NULL, HFILL }},
+ { &hf_q2931_endpoint_reference_type, { "Endpoint reference type", "q2931.endpoint_reference.type", FT_UINT8, BASE_HEX, VALS(q2931_endpoint_reference_type_vals), 0x0, NULL, HFILL }},
+ { &hf_q2931_endpoint_reference_identifier_value, { "Endpoint reference identifier value", "q2931.endpoint_reference.identifier_value", FT_UINT16, BASE_DEC, NULL, 0x7FFF, NULL, HFILL }},
+ { &hf_q2931_endpoint_state, { "Endpoint reference party-state", "q2931.endpoint_state", FT_UINT8, BASE_HEX, VALS(q2931_endpoint_reference_party_state_vals), 0x3F, NULL, HFILL }},
+ { &hf_q2931_information_element, { "Information element", "q2931.information_element", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0, NULL, HFILL }},
+ { &hf_q2931_information_element_extension, { "Information element extension", "q2931.information_element.extension", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_information_element_length, { "Length", "q2931.information_element.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_q2931_information_element_data, { "Data", "q2931.information_element.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
&ett_q2931,