2 * Routines for Q.2931 frame disassembly
3 * Guy Harris <guy@alum.mit.edu>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
9 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include <epan/packet.h>
16 #include <epan/unit_strings.h>
18 #include <epan/nlpid.h>
19 #include <epan/etypes.h>
20 #include <epan/expert.h>
21 #include "packet-q931.h"
22 #include "packet-arp.h"
27 * http://web.archive.org/web/20150408122122/http://www.protocols.com/pbook/atmsig.htm
29 * for some information on Q.2931, although, alas, not the actual message
30 * type and information element values - those I got from the FreeBSD 3.2
31 * ATM code, and from Q.2931 (and Q.931) itself.
34 void proto_register_q2931(void);
36 static int proto_q2931
;
37 static int hf_q2931_discriminator
;
38 static int hf_q2931_call_ref_len
;
39 static int hf_q2931_call_ref_flag
;
40 static int hf_q2931_call_ref
;
41 static int hf_q2931_message_type
;
42 static int hf_q2931_message_type_ext
;
43 static int hf_q2931_message_flag
;
44 static int hf_q2931_message_action_indicator
;
45 static int hf_q2931_message_len
;
46 static int hf_q2931_ie_handling_instructions
;
47 static int hf_q2931_ie_coding_standard
;
48 static int hf_q2931_ie_action_indicator
;
49 /* Generated from convert_proto_tree_add_text.pl */
50 static int hf_q2931_number_bytes
;
51 static int hf_q2931_conn_id_vci
;
52 static int hf_q2931_restart_indicator
;
53 static int hf_q2931_conn_id_vpci
;
54 static int hf_q2931_bband_low_layer_info_mode
;
55 static int hf_q2931_cause_rejection_insufficient_information_element
;
56 static int hf_q2931_bband_low_layer_info_user_info_l3_proto
;
57 static int hf_q2931_number_string
;
58 static int hf_q2931_aal1_backward_max_cpcs_sdu_size
;
59 static int hf_q2931_user_plane_connection_configuration
;
60 static int hf_q2931_party_subaddr_subaddress
;
61 static int hf_q2931_aal1_mode
;
62 static int hf_q2931_cause_location
;
63 static int hf_q2931_bband_low_layer_info_user_specified_l2_proto
;
64 static int hf_q2931_information_element
;
65 static int hf_q2931_conn_id_preferred_exclusive
;
66 static int hf_q2931_cause_vci
;
67 static int hf_q2931_cause_information_element
;
68 static int hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator
;
69 static int hf_q2931_cause_rejection_reason
;
70 static int hf_q2931_ethernet_type
;
71 static int hf_q2931_cause_value
;
72 static int hf_q2931_information_element_length
;
73 static int hf_q2931_cause_rejection_user_specific_diagnostic
;
74 static int hf_q2931_transit_network_sel_type
;
75 static int hf_q2931_user_defined_aal_information
;
76 static int hf_q2931_aal1_forward_max_cpcs_sdu_size
;
77 static int hf_q2931_atm_transfer_capability
;
78 static int hf_q2931_aal1_subtype
;
79 static int hf_q2931_information_element_extension
;
80 static int hf_q2931_party_subaddr_type_of_subaddress
;
81 static int hf_q2931_number_plan
;
82 static int hf_q2931_aal1_error_correction_method
;
83 static int hf_q2931_call_state
;
84 static int hf_q2931_bearer_class
;
85 static int hf_q2931_protocol_id
;
86 static int hf_q2931_information_element_data
;
87 static int hf_q2931_aal1_partially_filled_cells_method
;
88 static int hf_q2931_lane_protocol_id
;
89 static int hf_q2931_party_subaddr_odd_even_indicator
;
90 static int hf_q2931_qos_class_backward
;
91 static int hf_q2931_cause_rejection_condition
;
92 static int hf_q2931_aal1_source_clock_frequency_recovery_method
;
93 static int hf_q2931_broadband_repeat_indicator
;
94 static int hf_q2931_cause_rejection_missing_information_element
;
95 static int hf_q2931_e2e_transit_delay_maximum_end_to_end
;
96 static int hf_q2931_endpoint_reference_flag
;
97 static int hf_q2931_endpoint_reference_identifier_value
;
98 static int hf_q2931_cause_vpci
;
99 static int hf_q2931_endpoint_state
;
100 static int hf_q2931_high_layer_information_type
;
101 static int hf_q2931_transit_network_sel_network_id
;
102 static int hf_q2931_aal1_sscs_type
;
103 static int hf_q2931_bband_low_layer_info_packet_window_size
;
104 static int hf_q2931_aal1_structured_data_transfer_block_size
;
105 static int hf_q2931_cause_timer
;
106 static int hf_q2931_cause_message_type
;
107 static int hf_q2931_e2e_transit_delay_cumulative
;
108 static int hf_q2931_oam_traffic_descriptor_shaping_indicator
;
109 static int hf_q2931_oam_end_to_end_f5_flow
;
110 static int hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator
;
111 static int hf_q2931_organization_code
;
112 static int hf_q2931_bband_low_layer_info_additional_l3_proto
;
113 static int hf_q2931_transit_network_sel_plan
;
114 static int hf_q2931_bband_low_layer_info_user_info_l2_proto
;
115 static int hf_q2931_aal1_multiplier
;
116 static int hf_q2931_aal_type
;
117 static int hf_q2931_aal1_cbr_rate
;
118 static int hf_q2931_number_type
;
119 static int hf_q2931_cause_rejection_diagnostic
;
120 static int hf_q2931_bband_low_layer_info_default_packet_size
;
121 static int hf_q2931_susceptibility_to_clipping
;
122 static int hf_q2931_oam_traffic_descriptor_management_indicator
;
123 static int hf_q2931_qos_class_forward
;
124 static int hf_q2931_endpoint_reference_type
;
125 static int hf_q2931_number_presentation_indicator
;
126 static int hf_q2931_bband_low_layer_info_user_info_l1_proto
;
127 static int hf_q2931_number_screening_indicator
;
128 static int hf_q2931_bband_low_layer_info_window_size
;
129 static int hf_q2931_conn_id_vp_associated_signalling
;
130 static int hf_q2931_cause_cell_rate_subfield_identifier
;
131 static int hf_q2931_frame_discard_forward_dir
;
132 static int hf_q2931_frame_discard_backward_dir
;
133 static int hf_q2931_tagging_backward_dir
;
134 static int hf_q2931_tagging_forward_dir
;
135 static int hf_q2931_midrange
;
136 static int hf_q2931_cause_network_service
;
137 static int hf_q2931_cause_network_behavior
;
138 static int hf_q2931_nsap_address_number_short
;
139 static int hf_q2931_atm_identifier
;
140 static int hf_q2931_atm_identifier_value
;
141 static int hf_q2931_aal_parameter_identifier
;
142 static int hf_q2931_e2e_transit_delay_identifier
;
143 static int hf_q2931_bband_sending_complete_id
;
144 static int hf_q2931_bband_sending_complete
;
145 static int hf_q2931_locking_codeset
;
147 static int ett_q2931
;
148 static int ett_q2931_ext
;
149 static int ett_q2931_ie
;
150 static int ett_q2931_ie_ext
;
151 static int ett_q2931_nsap
;
153 static expert_field ei_q2931_atm_identifier
;
154 static expert_field ei_q2931_aal_parameter_identifier
;
155 static expert_field ei_q2931_e2e_transit_delay_identifier
;
156 static expert_field ei_q2931_bband_sending_complete_id
;
158 static void dissect_q2931_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
159 proto_tree
*tree
, uint8_t info_element
, uint8_t info_element_ext
);
162 * Q.2931 message types.
164 #define Q2931_ALERTING 0x01
165 #define Q2931_CALL_PROCEEDING 0x02
166 #define Q2931_PROGRESS 0x03
167 #define Q2931_SETUP 0x05
168 #define Q2931_CONNECT 0x07
169 #define Q2931_SETUP_ACK 0x0B
170 #define Q2931_CONNECT_ACK 0x0F
171 #define Q2931_RESTART 0x46
172 #define Q2931_RELEASE 0x4D
173 #define Q2931_RESTART_ACK 0x4E
174 #define Q2931_RELEASE_COMPLETE 0x5A
175 #define Q2931_NOTIFY 0x6E
176 #define Q2931_STATUS_ENQUIRY 0x75
177 #define Q2931_INFORMATION 0x7B
178 #define Q2931_STATUS 0x7D
179 #define Q2931_ADD_PARTY 0x80
180 #define Q2931_ADD_PARTY_ACK 0x81
181 #define Q2931_ADD_PARTY_REJ 0x82
182 #define Q2931_DROP_PARTY 0x83
183 #define Q2931_DROP_PARTY_ACK 0x84
184 #define Q2931_LEAF_SETUP_FAIL 0x90
185 #define Q2931_LEAF_SETUP_REQ 0x91
187 static const value_string q2931_message_type_vals
[] = {
188 { Q2931_ALERTING
, "ALERTING" },
189 { Q2931_CALL_PROCEEDING
, "CALL PROCEEDING" },
190 { Q2931_PROGRESS
, "PROGRESS" },
191 { Q2931_SETUP
, "SETUP" },
192 { Q2931_CONNECT
, "CONNECT" },
193 { Q2931_SETUP_ACK
, "SETUP ACKNOWLEDGE" },
194 { Q2931_CONNECT_ACK
, "CONNECT ACKNOWLEDGE" },
195 { Q2931_RESTART
, "RESTART" },
196 { Q2931_RELEASE
, "RELEASE" },
197 { Q2931_RESTART_ACK
, "RESTART ACKNOWLEDGE" },
198 { Q2931_RELEASE_COMPLETE
, "RELEASE COMPLETE" },
199 { Q2931_NOTIFY
, "NOTIFY" },
200 { Q2931_STATUS_ENQUIRY
, "STATUS ENQUIRY" },
201 { Q2931_INFORMATION
, "INFORMATION" },
202 { Q2931_STATUS
, "STATUS" },
203 { Q2931_ADD_PARTY
, "ADD PARTY" },
204 { Q2931_ADD_PARTY_ACK
, "ADD PARTY ACKNOWLEDGE" },
205 { Q2931_ADD_PARTY_REJ
, "ADD PARTY REJECT" },
206 { Q2931_DROP_PARTY
, "DROP PARTY" },
207 { Q2931_DROP_PARTY_ACK
, "DROP PARTY ACKNOWLEDGE" },
208 { Q2931_LEAF_SETUP_FAIL
, "LEAF SETUP FAILURE" },
209 { Q2931_LEAF_SETUP_REQ
, "LEAF SETUP REQUEST" },
213 static value_string_ext q2931_message_type_vals_ext
= VALUE_STRING_EXT_INIT(q2931_message_type_vals
);
215 static const true_false_string tfs_call_ref_flag
= {
216 "Message sent to originating side",
217 "Message sent from originating side"
221 * Bits in the message type extension.
223 #define Q2931_MSG_TYPE_EXT_FOLLOW_INST 0x10 /* follow instructions in action indicator */
224 #define Q2931_MSG_TYPE_EXT_ACTION_IND 0x03 /* said instructions */
226 static const true_false_string tos_msg_flag
= {
227 "Regular error handling procedures apply",
228 "Follow explicit error handling instructions"
231 static const value_string msg_action_ind_vals
[] = {
232 { 0x00, "Clear call" },
233 { 0x01, "Discard and ignore" },
234 { 0x02, "Discard and report status" },
239 * Bits in the compatibility instruction indicator octet of an
240 * information element.
242 #define Q2931_IE_COMPAT_CODING_STD 0x60 /* Coding standard */
243 #define Q2931_IE_COMPAT_FOLLOW_INST 0x10 /* follow instructions in action indicator */
244 #define Q2931_IE_COMPAT_ACTION_IND 0x07
247 * ITU-standardized coding.
249 #define Q2931_ITU_STANDARDIZED_CODING 0x00
251 static const value_string coding_std_vals
[] = {
252 { 0x00, "ITU-T standardized coding" },
253 { 0x01, "ISO/IEC standard" },
254 { 0x02, "National standard" },
255 { 0x03, "Standard defined for the network" },
259 static const value_string ie_action_ind_vals
[] = {
260 { 0x00, "Clear call" },
261 { 0x01, "Discard information element and proceed" },
262 { 0x02, "Discard information element, proceed, and report status" },
263 { 0x05, "Discard message, and ignore" },
264 { 0x06, "Discard message, and report status" },
269 * Information elements.
271 #define Q2931_IE_EXTENSION 0x80 /* Extension flag */
273 #define Q2931_IE_NBAND_BEARER_CAP 0x04 /* Narrowband bearer capability */
274 #define Q2931_IE_CAUSE 0x08
275 #define Q2931_IE_CALL_STATE 0x14
276 #define Q2931_IE_PROGRESS_INDICATOR 0x1E
277 #define Q2931_IE_NOTIFICATION_INDICATOR 0x27
278 #define Q2931_IE_E2E_TRANSIT_DELAY 0x42 /* End-to-end Transit Delay */
279 #define Q2931_IE_ENDPOINT_REFERENCE 0x54
280 #define Q2931_IE_ENDPOINT_STATE 0x55
281 #define Q2931_IE_AAL_PARAMETERS 0x58 /* ATM adaptation layer parameters */
282 #define Q2931_IE_ATM_USER_CELL_RATE 0x59 /* ATM traffic descriptor */
283 #define Q2931_IE_CONNECTION_IDENTIFIER 0x5A
284 #define Q2931_IE_OAM_TRAFFIC_DESCRIPTOR 0x5B
285 #define Q2931_IE_QOS_PARAMETER 0x5C /* Quality of Service parameter */
286 #define Q2931_IE_BBAND_HI_LAYER_INFO 0x5D /* Broadband high-layer information */
287 #define Q2931_IE_BBAND_BEARER_CAP 0x5E /* Broadband bearer capability */
288 #define Q2931_IE_BBAND_LOW_LAYER_INFO 0x5F /* Broadband low-layer information */
289 #define Q2931_IE_BBAND_LOCKING_SHIFT 0x60 /* Broadband locking shift */
290 #define Q2931_IE_BBAND_NLOCKING_SHIFT 0x61 /* Broadband non-locking shift */
291 #define Q2931_IE_BBAND_SENDING_COMPL 0x62 /* Broadband sending complete */
292 #define Q2931_IE_BBAND_RPT_INDICATOR 0x63 /* Broadband repeat indicator */
293 #define Q2931_IE_CALLING_PARTY_NUMBER 0x6C /* Calling Party Number */
294 #define Q2931_IE_CALLING_PARTY_SUBADDR 0x6D /* Calling Party Subaddress */
295 #define Q2931_IE_CALLED_PARTY_NUMBER 0x70 /* Called Party Number */
296 #define Q2931_IE_CALLED_PARTY_SUBADDR 0x71 /* Called Party Subaddress */
297 #define Q2931_IE_TRANSIT_NETWORK_SEL 0x78 /* Transit Network Selection */
298 #define Q2931_IE_RESTART_INDICATOR 0x79
299 #define Q2931_IE_NBAND_LOW_LAYER_COMPAT 0x7C /* Narrowband Low-Layer Compatibility */
300 #define Q2931_IE_NBAND_HIGH_LAYER_COMPAT 0x7D /* Narrowband High-Layer Compatibility */
301 #define Q2931_IE_GENERIC_IDENT_TRANSPORT 0x7F /* Generic identifier transport */
303 static const value_string q2931_info_element_vals
[] = {
304 { Q2931_IE_NBAND_BEARER_CAP
, "Narrowband bearer capability" },
305 { Q2931_IE_CAUSE
, "Cause" },
306 { Q2931_IE_CALL_STATE
, "Call state" },
307 { Q2931_IE_PROGRESS_INDICATOR
, "Progress indicator" },
308 { Q2931_IE_NOTIFICATION_INDICATOR
, "Notification indicator" },
309 { Q2931_IE_E2E_TRANSIT_DELAY
, "End-to-end transit delay" },
310 { Q2931_IE_ENDPOINT_REFERENCE
, "Endpoint reference" },
311 { Q2931_IE_ENDPOINT_STATE
, "Endpoint state" },
312 { Q2931_IE_AAL_PARAMETERS
, "AAL parameters" },
313 { Q2931_IE_ATM_USER_CELL_RATE
, "ATM user cell rate" },
314 { Q2931_IE_CONNECTION_IDENTIFIER
, "Connection identifier" },
315 { Q2931_IE_OAM_TRAFFIC_DESCRIPTOR
, "OAM traffic descriptor" },
316 { Q2931_IE_QOS_PARAMETER
, "Quality of service parameter" },
317 { Q2931_IE_BBAND_HI_LAYER_INFO
, "Broadband high-layer information" },
318 { Q2931_IE_BBAND_BEARER_CAP
, "Broadband bearer capability" },
319 { Q2931_IE_BBAND_LOW_LAYER_INFO
, "Broadband low-layer information" },
320 { Q2931_IE_BBAND_LOCKING_SHIFT
, "Broadband locking shift" },
321 { Q2931_IE_BBAND_NLOCKING_SHIFT
, "Broadband non-locking shift" },
322 { Q2931_IE_BBAND_SENDING_COMPL
, "Broadband sending complete" },
323 { Q2931_IE_BBAND_RPT_INDICATOR
, "Broadband repeat indicator" },
324 { Q2931_IE_CALLING_PARTY_NUMBER
, "Calling party number" },
325 { Q2931_IE_CALLING_PARTY_SUBADDR
, "Calling party subaddress" },
326 { Q2931_IE_CALLED_PARTY_NUMBER
, "Called party number" },
327 { Q2931_IE_CALLED_PARTY_SUBADDR
, "Called party subaddress" },
328 { Q2931_IE_TRANSIT_NETWORK_SEL
, "Transit network selection" },
329 { Q2931_IE_RESTART_INDICATOR
, "Restart indicator" },
330 { Q2931_IE_NBAND_LOW_LAYER_COMPAT
, "Narrowband low-layer compatibility" },
331 { Q2931_IE_NBAND_HIGH_LAYER_COMPAT
, "Narrowband high-layer compatibility" },
332 { Q2931_IE_GENERIC_IDENT_TRANSPORT
, "Generic identifier transport" },
336 static value_string_ext q2931_info_element_vals_ext
= VALUE_STRING_EXT_INIT(q2931_info_element_vals
);
339 * Dissect a locking or non-locking shift information element.
341 static const value_string q2931_codeset_vals
[] = {
342 { 0x00, "Q.2931 information elements" },
343 { 0x04, "Information elements for ISO/IEC use" },
344 { 0x05, "Information elements for national use" },
345 { 0x06, "Information elements specific to the local network" },
346 { 0x07, "User-specific information elements" },
350 static const true_false_string tfs_q2931_handling_instructions
= { "Follow explicit error handling instructions",
351 "Regular error handling procedures apply" };
354 dissect_q2931_shift_ie(tvbuff_t
*tvb
, int offset
, int len
,
355 proto_tree
*tree
, uint8_t info_element
)
357 bool non_locking_shift
;
362 non_locking_shift
= (info_element
== Q2931_IE_BBAND_NLOCKING_SHIFT
);
363 codeset
= tvb_get_uint8(tvb
, offset
) & 0x07;
364 proto_tree_add_uint_format(tree
, hf_q2931_locking_codeset
, tvb
, offset
, 1, codeset
,
365 "%s shift to codeset %u: %s",
366 (non_locking_shift
? "Non-locking" : "Locking"),
367 codeset
, val_to_str(codeset
, q2931_codeset_vals
, "Unknown (0x%02X)"));
371 * Dissect an ATM adaptation layer parameters information element.
373 #define Q2931_AAL_VOICE 0x00
374 #define Q2931_AAL1 0x01
375 #define Q2931_AAL2 0x02
376 #define Q2931_AAL3_4 0x03
377 #define Q2931_AAL5 0x05
378 #define Q2931_USER_DEFINED_AAL 0x10
380 static const value_string q9231_aal_type_vals
[] = {
381 { 0x00, "AAL for voice" },
382 { 0x01, "AAL type 1" },
383 { 0x02, "AAL type 2" },
384 { 0x03, "AAL type 3/4" },
385 { 0x05, "AAL type 5" },
386 { 0x10, "User-defined AAL" },
390 static const value_string q9231_aal1_subtype_vals
[] = {
392 { 0x01, "64 kbit/s voice-band signal transport (G.711/G.722)" },
393 { 0x02, "Circuit transport (I.363)" },
394 { 0x03, "Circuit emulation (asynchronous)" },
395 { 0x04, "High-quality audio signal transport (I.363)" },
396 { 0x05, "Video signal transport (I.363)" },
400 #define Q2931_AAL1_nx64_KBIT_S 0x40
401 #define Q2931_AAL1_nx8_KBIT_S 0x41
403 static const value_string q9231_aal1_cbr_rate_vals
[] = {
404 { 0x01, "64 kbit/s" },
405 { 0x04, "1544 kbit/s" },
406 { 0x05, "6312 kbit/s" },
407 { 0x06, "32064 kbit/s" },
408 { 0x07, "44736 kbit/s" },
409 { 0x08, "97728 kbit/s" },
410 { 0x10, "2048 kbit/s" },
411 { 0x11, "8448 kibt/s" },
412 { 0x12, "34368 kbit/s" },
413 { 0x13, "139264 kbit/s" },
414 { Q2931_AAL1_nx64_KBIT_S
, "nx64 kbit/s" },
415 { Q2931_AAL1_nx8_KBIT_S
, "nx8 kbit/s" },
419 static const value_string q2931_aal1_src_clk_rec_meth_vals
[] = {
420 { 0x00, "Null (synchronous circuit transport)" },
421 { 0x01, "SRTS method (asynchronous circuit transport" },
422 { 0x02, "Adaptive clock method" },
426 static const value_string q2931_aal1_err_correction_method_vals
[] = {
428 { 0x01, "FEC method for less sensitive signal transport" },
429 { 0x02, "FEC method for delay-sensitive signal transport" },
433 static const value_string q2931_aal_mode_vals
[] = {
435 { 0x02, "Streaming" },
439 static const value_string q2931_sscs_type_vals
[] = {
441 { 0x01, "Data SSCS based on SSCOP (assured operation)" },
442 { 0x02, "Data SSCS based on SSCOP (non-assured operation)" },
443 { 0x04, "Frame relay SSCS" },
448 dissect_q2931_aal_parameters_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
454 uint32_t low_mid
, high_mid
;
459 aal_type
= tvb_get_uint8(tvb
, offset
);
460 proto_tree_add_item(tree
, hf_q2931_aal_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
465 * Now get the rest of the IE.
467 if (aal_type
== 0x40) {
473 proto_tree_add_item(tree
, hf_q2931_user_defined_aal_information
, tvb
, offset
, len
, ENC_NA
);
478 identifier
= tvb_get_uint8(tvb
, offset
);
479 ti
= proto_tree_add_item(tree
, hf_q2931_aal_parameter_identifier
, tvb
, offset
, 1, ENC_NA
);
482 switch (identifier
) {
484 case 0x85: /* Subtype identifier for AAL1 */
487 proto_tree_add_item(tree
, hf_q2931_aal1_subtype
, tvb
, offset
, 1, ENC_NA
);
492 case 0x86: /* CBR identifier for AAL1 */
495 proto_tree_add_item(tree
, hf_q2931_aal1_cbr_rate
, tvb
, offset
, 1, ENC_NA
);
500 case 0x87: /* Multiplier identifier for AAL1 */
503 proto_tree_add_item(tree
, hf_q2931_aal1_multiplier
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
508 case 0x88: /* Source clock frequency recovery method identifier for AAL1 */
511 proto_tree_add_item(tree
, hf_q2931_aal1_source_clock_frequency_recovery_method
, tvb
, offset
, 1, ENC_NA
);
516 case 0x89: /* Error correction method identifier for AAL1 */
519 proto_tree_add_item(tree
, hf_q2931_aal1_error_correction_method
, tvb
, offset
, 1, ENC_NA
);
524 case 0x8A: /* Structured data transfer block size identifier for AAL1 */
527 proto_tree_add_item(tree
, hf_q2931_aal1_structured_data_transfer_block_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
532 case 0x8B: /* Partially filled cells identifier for AAL1 */
535 value
= tvb_get_uint8(tvb
, offset
);
536 proto_tree_add_uint_format_value(tree
, hf_q2931_aal1_partially_filled_cells_method
, tvb
, offset
, 1,
537 value
, "%u octets", value
);
542 case 0x8C: /* Forward maximum CPCS-SDU size identifier for AAL3/4 and AAL5 */
545 proto_tree_add_item(tree
, hf_q2931_aal1_forward_max_cpcs_sdu_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
550 case 0x81: /* Backward maximum CPCS-SDU size identifier for AAL3/4 and AAL5 */
553 proto_tree_add_item(tree
, hf_q2931_aal1_backward_max_cpcs_sdu_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
558 case 0x82: /* MID range identifier for AAL3/4 */
561 low_mid
= tvb_get_ntohs(tvb
, offset
);
562 high_mid
= tvb_get_ntohs(tvb
, offset
+ 2);
563 proto_tree_add_uint_format_value(tree
, hf_q2931_midrange
, tvb
, offset
, 4, tvb_get_ntohl(tvb
, offset
),
564 "%u - %u", low_mid
, high_mid
);
569 case 0x83: /* Mode identifier for AAL3/4 and AAL5 */
572 proto_tree_add_item(tree
, hf_q2931_aal1_mode
, tvb
, offset
, 1, ENC_NA
);
577 case 0x84: /* SSCS type identifier for AAL3/4 and AAL5 */
580 proto_tree_add_item(tree
, hf_q2931_aal1_sscs_type
, tvb
, offset
, 1, ENC_NA
);
585 default: /* unknown AAL parameter */
586 expert_add_info(pinfo
, ti
, &ei_q2931_aal_parameter_identifier
);
587 return; /* give up */
593 * Dissect an ATM traffic descriptor information element.
595 #define Q2931_ATM_CR_FW_PEAK_CLP_0 0x82 /* Forward peak cell rate (CLP = 0) */
596 #define Q2931_ATM_CR_BW_PEAK_CLP_0 0x83 /* Backward peak cell rate (CLP = 0) */
597 #define Q2931_ATM_CR_FW_PEAK_CLP_0_1 0x84 /* Forward peak cell rate (CLP = 0 + 1) */
598 #define Q2931_ATM_CR_BW_PEAK_CLP_0_1 0x85 /* Backward peak cell rate (CLP = 0 + 1) */
599 #define Q2931_ATM_CR_FW_SUST_CLP_0 0x88 /* Forward sustainable cell rate (CLP = 0) */
600 #define Q2931_ATM_CR_BW_SUST_CLP_0 0x89 /* Backward sustainable cell rate (CLP = 0) */
601 #define Q2931_ATM_CR_FW_SUST_CLP_0_1 0x90 /* Forward sustainable cell rate (CLP = 0 + 1) */
602 #define Q2931_ATM_CR_BW_SUST_CLP_0_1 0x91 /* Backward sustainable cell rate (CLP = 0 + 1) */
603 #define Q2931_ATM_CR_FW_MAXB_CLP_0 0xA0 /* Forward maximum burst size (CLP = 0) */
604 #define Q2931_ATM_CR_BW_MAXB_CLP_0 0xA1 /* Backward maximum burst size (CLP = 0) */
605 #define Q2931_ATM_CR_FW_MAXB_CLP_0_1 0xB0 /* Forward maximum burst size (CLP = 0 + 1) */
606 #define Q2931_ATM_CR_BW_MAXB_CLP_0_1 0xB1 /* Backward maximum burst size (CLP = 0 + 1) */
607 #define Q2931_ATM_CR_BEST_EFFORT_IND 0xBE /* Best effort indicator */
608 #define Q2931_ATM_CR_TRAFFIC_MGMT_OPT 0xBF /* Traffic management options */
610 static const value_string q2931_atm_td_subfield_vals
[] = {
611 { Q2931_ATM_CR_FW_PEAK_CLP_0
, "Forward peak cell rate (CLP = 0)" },
612 { Q2931_ATM_CR_BW_PEAK_CLP_0
, "Backward peak cell rate (CLP = 0)" },
613 { Q2931_ATM_CR_FW_PEAK_CLP_0_1
, "Forward peak cell rate (CLP = 0 + 1)" },
614 { Q2931_ATM_CR_BW_PEAK_CLP_0_1
, "Backward peak cell rate (CLP = 0 + 1)" },
615 { Q2931_ATM_CR_FW_SUST_CLP_0
, "Forward sustainable cell rate (CLP = 0)" },
616 { Q2931_ATM_CR_BW_SUST_CLP_0
, "Backward sustainable cell rate (CLP = 0)" },
617 { Q2931_ATM_CR_FW_SUST_CLP_0_1
, "Forward sustainable cell rate (CLP = 0 + 1)" },
618 { Q2931_ATM_CR_BW_SUST_CLP_0_1
, "Backward sustainable cell rate (CLP = 0 + 1)" },
619 { Q2931_ATM_CR_FW_MAXB_CLP_0
, "Forward maximum burst size (CLP = 0)" },
620 { Q2931_ATM_CR_BW_MAXB_CLP_0
, "Backward maximum burst size (CLP = 0)" },
621 { Q2931_ATM_CR_FW_MAXB_CLP_0_1
, "Forward maximum burst size (CLP = 0 + 1)" },
622 { Q2931_ATM_CR_BW_MAXB_CLP_0_1
, "Backward maximum burst size (CLP = 0 + 1)" },
623 { Q2931_ATM_CR_BEST_EFFORT_IND
, "Best effort indicator" },
624 { Q2931_ATM_CR_TRAFFIC_MGMT_OPT
,"Traffic management options" },
628 static const unit_name_string units_cells_s
= { " cell/s", " cells/s" };
631 dissect_q2931_atm_cell_rate_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
639 identifier
= tvb_get_uint8(tvb
, offset
);
640 ti
= proto_tree_add_item(tree
, hf_q2931_atm_identifier
, tvb
, offset
, 1, ENC_NA
);
642 switch (identifier
) {
644 case Q2931_ATM_CR_FW_PEAK_CLP_0
:
645 case Q2931_ATM_CR_BW_PEAK_CLP_0
:
646 case Q2931_ATM_CR_FW_PEAK_CLP_0_1
:
647 case Q2931_ATM_CR_BW_PEAK_CLP_0_1
:
648 case Q2931_ATM_CR_FW_SUST_CLP_0
:
649 case Q2931_ATM_CR_BW_SUST_CLP_0
:
650 case Q2931_ATM_CR_FW_SUST_CLP_0_1
:
651 case Q2931_ATM_CR_BW_SUST_CLP_0_1
:
652 case Q2931_ATM_CR_FW_MAXB_CLP_0
:
653 case Q2931_ATM_CR_BW_MAXB_CLP_0
:
654 case Q2931_ATM_CR_FW_MAXB_CLP_0_1
:
655 case Q2931_ATM_CR_BW_MAXB_CLP_0_1
:
659 value
= tvb_get_ntoh24(tvb
, offset
+ 1);
660 proto_tree_add_uint(tree
, hf_q2931_atm_identifier_value
, tvb
, offset
+3, 3, value
);
665 case Q2931_ATM_CR_BEST_EFFORT_IND
:
666 /* Yes, its value *IS* 0xBE.... */
671 case Q2931_ATM_CR_TRAFFIC_MGMT_OPT
:
674 proto_tree_add_item(tree
, hf_q2931_frame_discard_forward_dir
, tvb
, offset
+ 1, 1, ENC_NA
);
675 proto_tree_add_item(tree
, hf_q2931_frame_discard_backward_dir
, tvb
, offset
+ 1, 1, ENC_NA
);
676 proto_tree_add_item(tree
, hf_q2931_tagging_backward_dir
, tvb
, offset
+ 1, 1, ENC_NA
);
677 proto_tree_add_item(tree
, hf_q2931_tagging_forward_dir
, tvb
, offset
+ 1, 1, ENC_NA
);
682 default: /* unknown ATM traffic descriptor element */
683 expert_add_info(pinfo
, ti
, &ei_q2931_atm_identifier
);
684 return; /* give up */
690 * Dissect a broadband bearer capability information element.
692 static const value_string q2931_bearer_class_vals
[] = {
696 { 0x18, "Transparent VP Service" },
700 static const value_string q2931_transfer_capability_vals
[] = {
701 { 0x00, "No bit rate indication" },
702 { 0x01, "No bit rate indication, end-to-end timing required" },
703 { 0x02, "No bit rate indication, end-to-end timing not required" },
705 { 0x05, "CBR, end-to-end timing required" },
706 { 0x06, "CBR, end-to-end timing not required" },
707 { 0x07, "CBR with CLR commitment on CLP=0+1" },
708 { 0x08, "VBR, no timing requirements indication" },
709 { 0x09, "Real time VBR" },
710 { 0x0A, "Non-real time VBR" },
711 { 0x0B, "Non-real time VBR with CLR commitment on CLP=0+1" },
716 static const value_string q2931_susc_clip_vals
[] = {
717 { 0, "Not susceptible to clipping" },
718 { 1, "Susceptible to clipping" },
722 static const value_string q2931_up_conn_config_vals
[] = {
723 { 0x00, "Point-to-point" },
724 { 0x01, "Point-to-multipoint" },
729 dissect_q2931_bband_bearer_cap_ie(tvbuff_t
*tvb
, int offset
, int len
,
736 octet
= tvb_get_uint8(tvb
, offset
);
737 proto_tree_add_item(tree
, hf_q2931_bearer_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
743 if (!(octet
& Q2931_IE_EXTENSION
)) {
744 proto_tree_add_item(tree
, hf_q2931_atm_transfer_capability
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
751 proto_tree_add_item(tree
, hf_q2931_susceptibility_to_clipping
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
752 proto_tree_add_item(tree
, hf_q2931_user_plane_connection_configuration
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
756 * Dissect a broadband high layer information information element.
758 static const value_string q2931_hi_layer_info_type_vals
[] = {
760 { 0x01, "User-specific" },
761 { 0x03, "Vendor-specific" },
762 { 0x04, "ITU-T SG 1 B-ISDN teleservice recommendation" },
767 dissect_q2931_bband_hi_layer_info_ie(tvbuff_t
*tvb
, int offset
, int len
,
773 proto_tree_add_item(tree
, hf_q2931_high_layer_information_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
779 * Dissect a Bearer capability or Low-layer compatibility information element.
781 #define Q2931_UIL2_USER_SPEC 0x10
783 static const value_string q2931_uil2_vals
[] = {
784 { 0x01, "Basic mode ISO 1745" },
785 { 0x02, "Q.921/I.441" }, /* LAPD */
786 { 0x06, "X.25, link layer" }, /* LAPB */
787 { 0x07, "X.25 multilink" }, /* or 0x0F? */
788 { 0x08, "T.71 Extended LAPB" },
789 { 0x09, "HDLC ARM" },
790 { 0x0A, "HDLC NRM" },
791 { 0x0B, "HDLC ABM" },
792 { 0x0C, "ISO 8802/2 LLC" },
793 { 0x0D, "X.75 Single Link Procedure" },
795 { Q2931_UIL2_USER_SPEC
, "User-specified" },
796 { 0x11, "ISO 7776 DTE-DTE operation" },
800 static const value_string q2931_mode_vals
[] = {
801 { 1, "Normal mode" },
802 { 2, "Extended mode" },
806 #define Q2931_UIL3_X25_PL 0x06
807 #define Q2931_UIL3_ISO_8208 0x07 /* X.25-based */
808 #define Q2931_UIL3_X223 0x08 /* X.25-based */
809 #define Q2931_UIL3_TR_9577 0x0B
810 #define Q2931_UIL3_USER_SPEC 0x10
812 static const value_string q2931_uil3_vals
[] = {
813 { Q2931_UIL3_X25_PL
, "X.25, packet layer" },
814 { Q2931_UIL3_ISO_8208
, "ISO/IEC 8208" },
815 { Q2931_UIL3_X223
, "X.223/ISO 8878" },
816 { 0x09, "ISO/IEC 8473" },
818 { Q2931_UIL3_TR_9577
, "ISO/IEC TR 9577" },
819 { Q2931_UIL3_USER_SPEC
, "User-specified" },
823 static const value_string lane_pid_vals
[] = {
824 { 0x0001, "LE Configuration Direct/Control Direct/Control Distribute" },
825 { 0x0002, "Ethernet/IEEE 002.3 LE Data Direct" },
826 { 0x0003, "IEEE 802.5 LE Data Direct" },
827 { 0x0004, "Ethernet/IEEE 802.3 LE Multicast Send/Multicast Forward" },
828 { 0x0005, "IEEE 802.5 LE Multicast Send/Multicast Forward" },
833 * Dissect a broadband low layer information information element.
836 dissect_q2931_bband_low_layer_info_ie(tvbuff_t
*tvb
, int offset
, int len
,
840 uint8_t uil2_protocol
;
841 uint8_t uil3_protocol
;
843 uint32_t organization_code
;
847 octet
= tvb_get_uint8(tvb
, offset
);
848 if ((octet
& 0x60) == 0x20) {
850 * Layer 1 information.
852 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_user_info_l1_proto
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
859 octet
= tvb_get_uint8(tvb
, offset
);
860 if ((octet
& 0x60) == 0x40) {
862 * Layer 2 information.
864 uil2_protocol
= octet
& 0x1F;
865 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_user_info_l2_proto
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
869 if (octet
& Q2931_IE_EXTENSION
)
873 octet
= tvb_get_uint8(tvb
, offset
);
874 if (uil2_protocol
== Q2931_UIL2_USER_SPEC
) {
875 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_user_specified_l2_proto
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
877 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
882 if (octet
& Q2931_IE_EXTENSION
)
886 octet
= tvb_get_uint8(tvb
, offset
);
887 proto_tree_add_uint_format_value(tree
, hf_q2931_bband_low_layer_info_window_size
, tvb
, offset
, 1,
888 octet
& 0x7F, "%u k", octet
& 0x7F);
897 octet
= tvb_get_uint8(tvb
, offset
);
898 if ((octet
& 0x60) == 0x60) {
900 * Layer 3 information.
902 uil3_protocol
= octet
& 0x1F;
903 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_user_info_l3_proto
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
909 * XXX - only in Low-layer compatibility information element.
911 if (octet
& Q2931_IE_EXTENSION
)
915 octet
= tvb_get_uint8(tvb
, offset
);
916 switch (uil3_protocol
) {
918 case Q2931_UIL3_X25_PL
:
919 case Q2931_UIL3_ISO_8208
:
920 case Q2931_UIL3_X223
:
921 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
925 if (octet
& Q2931_IE_EXTENSION
)
929 octet
= tvb_get_uint8(tvb
, offset
);
930 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_default_packet_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
934 if (octet
& Q2931_IE_EXTENSION
)
938 proto_tree_add_item(tree
, hf_q2931_bband_low_layer_info_packet_window_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
943 case Q2931_UIL3_USER_SPEC
:
944 proto_tree_add_uint(tree
, hf_q2931_bband_low_layer_info_default_packet_size
, tvb
, offset
, 1, 1 << (octet
& 0x0F));
949 case Q2931_UIL3_TR_9577
:
950 add_l3_info
= (octet
& 0x7F) << 1;
951 if (octet
& Q2931_IE_EXTENSION
)
955 add_l3_info
|= (tvb_get_uint8(tvb
, offset
+ 1) & 0x40) >> 6;
956 proto_tree_add_uint(tree
, hf_q2931_bband_low_layer_info_additional_l3_proto
, tvb
, offset
, 2, add_l3_info
);
959 if (add_l3_info
== NLPID_SNAP
) {
964 organization_code
= tvb_get_ntoh24(tvb
, offset
);
965 proto_tree_add_item(tree
, hf_q2931_organization_code
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
969 switch (organization_code
) {
971 case OUI_ENCAP_ETHER
:
972 proto_tree_add_item(tree
, hf_q2931_ethernet_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
976 proto_tree_add_item(tree
, hf_q2931_lane_protocol_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
980 proto_tree_add_item(tree
, hf_q2931_protocol_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
992 * Dissect a Cause information element.
994 static const value_string q2931_cause_location_vals
[] = {
995 { 0x00, "User (U)" },
996 { 0x01, "Private network serving the local user (LPN)" },
997 { 0x02, "Public network serving the local user (LN)" },
998 { 0x03, "Transit network (TN)" },
999 { 0x04, "Public network serving the remote user (RLN)" },
1000 { 0x05, "Private network serving the remote user (RPN)" },
1001 { 0x07, "International network (INTL)" },
1002 { 0x0A, "Network beyond interworking point (BI)" },
1007 * Cause codes for Cause.
1009 #define Q2931_CAUSE_UNALLOC_NUMBER 0x01
1010 #define Q2931_CAUSE_NO_ROUTE_TO_DEST 0x03
1011 #define Q2931_CAUSE_CALL_REJECTED 0x15
1012 #define Q2931_CAUSE_NUMBER_CHANGED 0x16
1013 #define Q2931_CAUSE_CELL_RATE_UNAVAIL 0x25
1014 #define Q2931_CAUSE_ACCESS_INFO_DISC 0x2B
1015 #define Q2931_CAUSE_QOS_UNAVAILABLE 0x31
1016 #define Q2931_CAUSE_CHAN_NONEXISTENT 0x52
1017 #define Q2931_CAUSE_INCOMPATIBLE_DEST 0x58
1018 #define Q2931_CAUSE_MAND_IE_MISSING 0x60
1019 #define Q2931_CAUSE_MT_NONEX_OR_UNIMPL 0x61
1020 #define Q2931_CAUSE_IE_NONEX_OR_UNIMPL 0x63
1021 #define Q2931_CAUSE_INVALID_IE_CONTENTS 0x64
1022 #define Q2931_CAUSE_MSG_INCOMPAT_W_CS 0x65
1023 #define Q2931_CAUSE_REC_TIMER_EXP 0x66
1025 static const value_string q2931_cause_code_vals
[] = {
1026 { Q2931_CAUSE_UNALLOC_NUMBER
, "Unallocated (unassigned) number" },
1027 { 0x02, "No route to specified transit network" },
1028 { Q2931_CAUSE_NO_ROUTE_TO_DEST
, "No route to destination" },
1029 { 0x04, "Send special information tone" },
1030 { 0x05, "Misdialled trunk prefix" },
1031 { 0x06, "Channel unacceptable" },
1032 { 0x07, "Call awarded and being delivered in an established channel" },
1033 { 0x08, "Preemption" },
1034 { 0x09, "Preemption - circuit reserved for reuse" },
1035 { 0x0E, "QoR: ported number" },
1036 { 0x10, "Normal call clearing" },
1037 { 0x11, "User busy" },
1038 { 0x12, "No user responding" },
1039 { 0x13, "No answer from user (user alerted)" },
1040 { 0x14, "Subscriber absent" },
1041 { Q2931_CAUSE_CALL_REJECTED
, "Call rejected" },
1042 { Q2931_CAUSE_NUMBER_CHANGED
, "Number changed" },
1043 { 0x17, "Redirection to new destination" },
1044 { 0x18, "Call rejected due to feature at the destination" },
1045 { 0x19, "Exchange routing error" },
1046 { 0x1A, "Non-selected user clearing" },
1047 { 0x1B, "Destination out of order" },
1048 { 0x1C, "Invalid number format (incomplete number)" },
1049 { 0x1E, "Response to STATUS ENQUIRY" },
1050 { 0x1F, "Normal unspecified" },
1051 { 0x20, "Too many pending add party request" },
1052 { 0x23, "Requested VPCI/VCI not available" },
1053 { 0x24, "VPCI/VCI assignment failure" },
1054 { Q2931_CAUSE_CELL_RATE_UNAVAIL
,"User cell rate not available" },
1055 { 0x26, "Network out of order" },
1056 { 0x27, "Permanent frame mode connection out of service" },
1057 { 0x28, "Permanent frame mode connection operational" },
1058 { 0x29, "Temporary failure" },
1059 { 0x2A, "Switching equipment congestion" },
1060 { Q2931_CAUSE_ACCESS_INFO_DISC
, "Access information discarded" },
1061 { 0x2C, "Requested circuit/channel not available" },
1062 { 0x2D, "No VPCI/VCI available" },
1063 { 0x2F, "Resources unavailable, unspecified" },
1064 { Q2931_CAUSE_QOS_UNAVAILABLE
, "Quality of service unavailable" },
1065 { 0x32, "Requested facility not subscribed" },
1066 { 0x35, "Outgoing calls barred within CUG" },
1067 { 0x37, "Incoming calls barred within CUG" },
1068 { 0x39, "Bearer capability not authorized" },
1069 { 0x3A, "Bearer capability not presently available" },
1070 { 0x3E, "Inconsistency in designated outgoing access information and subscriber class" },
1071 { 0x3F, "Service or option not available, unspecified" },
1072 { 0x41, "Bearer capability not implemented" },
1073 { 0x42, "Channel type not implemented" },
1074 { 0x45, "Requested facility not implemented" },
1075 { 0x46, "Only restricted digital information bearer capability is available" },
1076 { 0x49, "Unsupported combination of traffic parameters" },
1077 { 0x4E, "AAL parameters cannot be supported" },
1078 { 0x4F, "Service or option not implemented, unspecified" },
1079 { 0x51, "Invalid call reference value" },
1080 { Q2931_CAUSE_CHAN_NONEXISTENT
, "Identified channel does not exist" },
1081 { 0x53, "Call identity does not exist for suspended call" },
1082 { 0x54, "Call identity in use" },
1083 { 0x55, "No call suspended" },
1084 { 0x56, "Call having the requested call identity has been cleared" },
1085 { 0x57, "Called user not member of CUG" },
1086 { Q2931_CAUSE_INCOMPATIBLE_DEST
,"Incompatible destination" },
1087 { 0x59, "Invalid endpoint reference" },
1088 { 0x5A, "Non-existent CUG" },
1089 { 0x5B, "Invalid transit network selection" },
1090 { 0x5C, "Too many pending ADD PARTY requests" },
1091 { 0x5D, "AAL parameters cannot be supported" },
1092 { 0x5F, "Invalid message, unspecified" },
1093 { Q2931_CAUSE_MAND_IE_MISSING
, "Mandatory information element is missing" },
1094 { Q2931_CAUSE_MT_NONEX_OR_UNIMPL
,"Message type non-existent or not implemented" },
1095 { 0x62, "Message not compatible with call state or message type non-existent or not implemented" },
1096 { Q2931_CAUSE_IE_NONEX_OR_UNIMPL
,"Information element non-existent or not implemented" },
1097 { Q2931_CAUSE_INVALID_IE_CONTENTS
,"Invalid information element contents" },
1098 { Q2931_CAUSE_MSG_INCOMPAT_W_CS
,"Message not compatible with call state" },
1099 { Q2931_CAUSE_REC_TIMER_EXP
, "Recovery on timer expiry" },
1100 { 0x67, "Parameter non-existent or not implemented - passed on" },
1101 { 0x68, "Incorrect message length" },
1102 { 0x6E, "Message with unrecognized parameter discarded" },
1103 { 0x6F, "Protocol error, unspecified" },
1104 { 0x7F, "Internetworking, unspecified" },
1108 static value_string_ext q2931_cause_code_vals_ext
= VALUE_STRING_EXT_INIT(q2931_cause_code_vals
);
1110 static const value_string q2931_cause_condition_vals
[] = {
1111 { 0x00, "Unknown" },
1112 { 0x01, "Permanent" },
1113 { 0x02, "Transient" },
1117 #define Q2931_REJ_USER_SPECIFIC 0x00
1118 #define Q2931_REJ_IE_MISSING 0x04
1119 #define Q2931_REJ_IE_INSUFFICIENT 0x08
1121 static const value_string q2931_rejection_reason_vals
[] = {
1122 { 0x00, "User specific" },
1123 { 0x04, "Information element missing" },
1124 { 0x08, "Information element contents are not sufficient" },
1128 static const true_false_string tfs_abnormal_normal
= { "Abnormal", "Normal" };
1131 // NOLINTNEXTLINE(misc-no-recursion)
1132 dissect_q2931_cause_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
1136 uint8_t cause_value
;
1137 uint8_t rejection_reason
;
1138 uint8_t info_element
;
1139 uint8_t info_element_ext
;
1140 uint16_t info_element_len
;
1144 proto_tree_add_item(tree
, hf_q2931_cause_location
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1150 octet
= tvb_get_uint8(tvb
, offset
);
1151 cause_value
= octet
& 0x7F;
1152 proto_tree_add_item(tree
, hf_q2931_cause_value
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1158 switch (cause_value
) {
1160 case Q2931_CAUSE_UNALLOC_NUMBER
:
1161 case Q2931_CAUSE_NO_ROUTE_TO_DEST
:
1162 case Q2931_CAUSE_QOS_UNAVAILABLE
:
1163 proto_tree_add_item(tree
, hf_q2931_cause_network_service
, tvb
, offset
, 1, ENC_NA
);
1164 proto_tree_add_item(tree
, hf_q2931_cause_network_behavior
, tvb
, offset
, 1, ENC_NA
);
1165 proto_tree_add_item(tree
, hf_q2931_cause_rejection_condition
, tvb
, offset
, 1, ENC_NA
);
1168 case Q2931_CAUSE_CALL_REJECTED
:
1169 rejection_reason
= octet
& 0x7C;
1170 proto_tree_add_item(tree
, hf_q2931_cause_rejection_reason
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1171 proto_tree_add_item(tree
, hf_q2931_cause_rejection_condition
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1177 switch (rejection_reason
) {
1179 case Q2931_REJ_USER_SPECIFIC
:
1180 proto_tree_add_item(tree
, hf_q2931_cause_rejection_user_specific_diagnostic
, tvb
, offset
, len
, ENC_NA
);
1183 case Q2931_REJ_IE_MISSING
:
1184 proto_tree_add_item(tree
, hf_q2931_cause_rejection_missing_information_element
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1187 case Q2931_REJ_IE_INSUFFICIENT
:
1188 proto_tree_add_item(tree
, hf_q2931_cause_rejection_insufficient_information_element
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1192 proto_tree_add_item(tree
, hf_q2931_cause_rejection_diagnostic
, tvb
, offset
, len
, ENC_NA
);
1197 case Q2931_CAUSE_NUMBER_CHANGED
:
1199 * UNI 3.1 claims this "is formatted as the called party
1200 * number information element, including information
1201 * element identifier.
1203 info_element
= tvb_get_uint8(tvb
, offset
);
1204 info_element_ext
= tvb_get_uint8(tvb
, offset
+ 1);
1205 info_element_len
= tvb_get_ntohs(tvb
, offset
+ 2);
1206 // We recurse here, but we'll run out of packet before we run out of stack.
1207 dissect_q2931_ie(tvb
, pinfo
, offset
, info_element_len
, tree
,
1208 info_element
, info_element_ext
);
1211 case Q2931_CAUSE_ACCESS_INFO_DISC
:
1212 case Q2931_CAUSE_INCOMPATIBLE_DEST
:
1213 case Q2931_CAUSE_MAND_IE_MISSING
:
1214 case Q2931_CAUSE_IE_NONEX_OR_UNIMPL
:
1215 case Q2931_CAUSE_INVALID_IE_CONTENTS
:
1217 proto_tree_add_item(tree
, hf_q2931_cause_information_element
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1223 case Q2931_CAUSE_CELL_RATE_UNAVAIL
:
1225 proto_tree_add_item(tree
, hf_q2931_cause_cell_rate_subfield_identifier
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1231 case Q2931_CAUSE_CHAN_NONEXISTENT
:
1234 proto_tree_add_item(tree
, hf_q2931_cause_vpci
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1240 proto_tree_add_item(tree
, hf_q2931_cause_vci
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1243 case Q2931_CAUSE_MT_NONEX_OR_UNIMPL
:
1244 case Q2931_CAUSE_MSG_INCOMPAT_W_CS
:
1245 proto_tree_add_item(tree
, hf_q2931_cause_message_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1248 case Q2931_CAUSE_REC_TIMER_EXP
:
1251 proto_tree_add_item(tree
, hf_q2931_cause_timer
, tvb
, offset
, 3, ENC_ASCII
);
1255 proto_tree_add_item(tree
, hf_q2931_cause_rejection_diagnostic
, tvb
, offset
, len
, ENC_NA
);
1260 * Dissect a Call state information element.
1262 static const value_string q2931_call_state_vals
[] = {
1264 { 0x01, "Call initiated" },
1265 { 0x02, "Overlap sending" },
1266 { 0x03, "Outgoing call proceeding" },
1267 { 0x04, "Call delivered" },
1268 { 0x06, "Call present" },
1269 { 0x07, "Call received" },
1270 { 0x09, "Connect request" },
1271 { 0x0A, "Incoming call proceeding" },
1273 { 0x0C, "Disconnect request" },
1274 { 0x0F, "Disconnect indication" },
1275 { 0x11, "Suspend request" },
1276 { 0x13, "Resume request" },
1277 { 0x16, "Release request" },
1278 { 0x19, "Overlap receiving" },
1279 { 0x3D, "Restart request" },
1280 { 0x3E, "Restart" },
1285 dissect_q2931_call_state_ie(tvbuff_t
*tvb
, int offset
, int len
,
1291 proto_tree_add_item(tree
, hf_q2931_call_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1295 * Dissect a (phone) number information element.
1297 static const value_string q2931_number_type_vals
[] = {
1299 { 0x1, "International number" },
1300 { 0x2, "National number" },
1301 { 0x3, "Network specific number" },
1302 { 0x4, "Subscriber number" },
1303 { 0x6, "Abbreviated number" },
1307 #define Q2931_ISDN_NUMBERING 0x01
1308 #define Q2931_NSAP_ADDRESSING 0x02
1310 static const value_string q2931_numbering_plan_vals
[] = {
1311 { 0x00, "Unknown" },
1312 { Q2931_ISDN_NUMBERING
, "E.164 ISDN/telephony numbering" },
1313 { Q2931_NSAP_ADDRESSING
, "ISO/IEC 8348 NSAP addressing" },
1314 { 0x09, "Private numbering" },
1318 static const value_string q2931_presentation_indicator_vals
[] = {
1319 { 0, "Presentation allowed" },
1320 { 1, "Presentation restricted" },
1321 { 2, "Number not available" },
1325 static const value_string q2931_screening_indicator_vals
[] = {
1326 { 0x00, "User-provided, not screened" },
1327 { 0x01, "User-provided, verified and passed" },
1328 { 0x02, "User-provided, verified and failed" },
1329 { 0x03, "Network-provided" },
1334 dissect_q2931_number_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
1338 uint8_t numbering_plan
;
1339 proto_tree
*nsap_tree
;
1343 octet
= tvb_get_uint8(tvb
, offset
);
1344 proto_tree_add_item(tree
, hf_q2931_number_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1345 numbering_plan
= octet
& 0x0F;
1346 proto_tree_add_item(tree
, hf_q2931_number_plan
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1350 if (!(octet
& Q2931_IE_EXTENSION
)) {
1354 proto_tree_add_item(tree
, hf_q2931_number_presentation_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1355 proto_tree_add_item(tree
, hf_q2931_number_screening_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1362 switch (numbering_plan
) {
1364 case Q2931_ISDN_NUMBERING
:
1365 proto_tree_add_item(tree
, hf_q2931_number_string
, tvb
, offset
, len
, ENC_ASCII
);
1368 case Q2931_NSAP_ADDRESSING
:
1370 proto_tree_add_item(tree
, hf_q2931_nsap_address_number_short
, tvb
, offset
, len
, ENC_NA
);
1373 nsap_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, len
, ett_q2931_nsap
, NULL
, "Number");
1374 dissect_atm_nsap(tvb
, pinfo
, offset
, len
, nsap_tree
);
1378 proto_tree_add_item(tree
, hf_q2931_number_bytes
, tvb
, offset
, len
, ENC_NA
);
1384 * Dissect a party subaddress information element.
1386 static const value_string q2931_subaddress_type_vals
[] = {
1387 { 0, "X.213/ISO 8348 NSAP" },
1388 { 1, "User-specified ATM endsystem address" },
1389 { 2, "User-specified" },
1393 static const value_string q2931_odd_even_indicator_vals
[] = {
1394 { 0, "Even number of address signals" },
1395 { 1, "Odd number of address signals" },
1400 dissect_q2931_party_subaddr_ie(tvbuff_t
*tvb
, int offset
, int len
,
1406 proto_tree_add_item(tree
, hf_q2931_party_subaddr_type_of_subaddress
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1407 proto_tree_add_item(tree
, hf_q2931_party_subaddr_odd_even_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1413 proto_tree_add_item(tree
, hf_q2931_party_subaddr_subaddress
, tvb
, offset
, len
, ENC_NA
);
1417 * Dissect a connection identifier information element.
1419 static const value_string q2931_vp_associated_signalling_vals
[] = {
1421 { 1, "No - explicit indication of VPCI" },
1425 static const value_string q2931_preferred_exclusive_vals
[] = {
1426 { 0x00, "Exclusive VPCI; exclusive VCI" },
1427 { 0x01, "Exclusive VPCI; any VCI" },
1428 { 0x04, "Exclusive VPCI; no VCI" },
1433 dissect_q2931_connection_identifier_ie(tvbuff_t
*tvb
, int offset
, int len
,
1439 proto_tree_add_item(tree
, hf_q2931_conn_id_vp_associated_signalling
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1440 proto_tree_add_item(tree
, hf_q2931_conn_id_preferred_exclusive
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1446 proto_tree_add_item(tree
, hf_q2931_conn_id_vpci
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1452 proto_tree_add_item(tree
, hf_q2931_conn_id_vci
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1456 * Dissect an End-to-end transit delay information element.
1459 dissect_q2931_e2e_transit_delay_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
, proto_tree
*tree
)
1466 ti
= proto_tree_add_item(tree
, hf_q2931_e2e_transit_delay_identifier
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1467 identifier
= tvb_get_uint8(tvb
, offset
);
1469 value
= tvb_get_ntohs(tvb
, offset
);
1471 switch (identifier
) {
1473 case 0x01: /* Cumulative transit delay identifier */
1474 proto_tree_add_uint(tree
, hf_q2931_e2e_transit_delay_cumulative
, tvb
, offset
, 2, value
);
1477 case 0x03: /* Maximum transit delay identifier */
1478 if (value
== 0xFFFF) {
1479 proto_tree_add_uint_format_value(tree
, hf_q2931_e2e_transit_delay_maximum_end_to_end
, tvb
, offset
, 2,
1480 value
, "Any end-to-end transit delay value acceptable");
1482 proto_tree_add_uint_format_value(tree
, hf_q2931_e2e_transit_delay_maximum_end_to_end
, tvb
, offset
, 2,
1483 value
, "%u ms", value
);
1487 default: /* Unknown transit delay identifier */
1488 expert_add_info(pinfo
, ti
, &ei_q2931_e2e_transit_delay_identifier
);
1489 return; /* give up */
1495 * Dissect a Quality of Service parameter information element.
1497 static const value_string q2931_qos_parameter_vals
[] = {
1498 { 0x00, "Unspecified QOS class" },
1503 dissect_q2931_qos_parameter_ie(tvbuff_t
*tvb
, int offset
, int len
,
1509 proto_tree_add_item(tree
, hf_q2931_qos_class_forward
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1515 proto_tree_add_item(tree
, hf_q2931_qos_class_backward
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1519 * Dissect a broadband repeat indicator.
1521 static const value_string q2931_bband_rpt_indicator_vals
[] = {
1522 { 0x02, "Prioritized list for selecting one possibility (descending order)" },
1527 dissect_q2931_bband_rpt_indicator(tvbuff_t
*tvb
, int offset
, int len
,
1533 proto_tree_add_item(tree
, hf_q2931_broadband_repeat_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1537 * Dissect a restart indicator.
1539 static const value_string q2931_class_vals
[] = {
1540 { 0x00, "Indicated VC" },
1541 { 0x01, "All VC's in the indicated VPC controlled via this channel" },
1542 { 0x02, "All VC's controlled by the L3 entity that sent this message" },
1547 dissect_q2931_restart_indicator(tvbuff_t
*tvb
, int offset
, int len
,
1553 proto_tree_add_item(tree
, hf_q2931_restart_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1557 * Dissect an broadband sending complete information element.
1560 dissect_q2931_bband_sending_compl_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
1567 ti
= proto_tree_add_item(tree
, hf_q2931_bband_sending_complete_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1568 identifier
= tvb_get_uint8(tvb
, offset
);
1569 switch (identifier
) {
1571 case 0xA1: /* Sending complete indication */
1572 proto_tree_add_item(tree
, hf_q2931_bband_sending_complete
, tvb
, offset
, 1, ENC_NA
);
1577 default: /* unknown broadband sending complete element */
1578 expert_add_info(pinfo
, ti
, &ei_q2931_bband_sending_complete_id
);
1579 return; /* give up */
1585 * Dissect a Transit network selection information element.
1587 static const value_string q2931_netid_type_vals
[] = {
1588 { 0, "User specified" },
1589 { 2, "National network identification" },
1590 { 3, "International network identification" },
1594 static const value_string q2931_netid_plan_vals
[] = {
1595 { 0x00, "Unknown" },
1596 { 0x01, "Carrier Identification Code" },
1597 { 0x03, "X.121 data network identification code" },
1602 dissect_q2931_transit_network_sel_ie(tvbuff_t
*tvb
, int offset
, int len
,
1608 proto_tree_add_item(tree
, hf_q2931_transit_network_sel_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1609 proto_tree_add_item(tree
, hf_q2931_transit_network_sel_plan
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1615 proto_tree_add_item(tree
, hf_q2931_transit_network_sel_network_id
, tvb
, offset
, len
, ENC_NA
|ENC_ASCII
);
1619 * Dissect an OAM traffic descriptor information element.
1621 static const value_string q2931_shaping_indicator_vals
[] = {
1622 { 0, "No user specified requirement" },
1623 { 1, "Aggregate shaping of user and OAM cells not allowed" },
1627 static const value_string q2931_user_net_fault_mgmt_vals
[] = {
1628 { 0, "No user-originated fault management indications" },
1629 { 1, "User-originated fault management indications, cell rate 1 cell/s" },
1633 static const value_string q2931_fwd_e2e_oam_f5_flow_indicator_vals
[] = {
1634 { 0x00, "0% of the forward cell rate" },
1635 { 0x10, "0.1% of the forward cell rate" },
1636 { 0x40, "1% of the forward cell rate" },
1640 static const value_string q2931_bwd_e2e_oam_f5_flow_indicator_vals
[] = {
1641 { 0x00, "0% of the backward cell rate" },
1642 { 0x01, "0.1% of the backward cell rate" },
1643 { 0x04, "1% of the backward cell rate" },
1647 static const true_false_string tfs_mandatory_optional
= { "Mandatory", "Optional" };
1650 dissect_q2931_oam_traffic_descriptor_ie(tvbuff_t
*tvb
, int offset
, int len
,
1656 proto_tree_add_item(tree
, hf_q2931_oam_traffic_descriptor_shaping_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1657 proto_tree_add_item(tree
, hf_q2931_oam_end_to_end_f5_flow
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1658 proto_tree_add_item(tree
, hf_q2931_oam_traffic_descriptor_management_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1665 proto_tree_add_item(tree
, hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1666 proto_tree_add_item(tree
, hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1670 * Dissect an Endpoint reference information element.
1672 static const value_string q2931_endpoint_reference_type_vals
[] = {
1673 { 0x00, "Locally defined integer" },
1677 static const true_false_string tfs_endpoint_reference_flag
= { "Message sent to side that originates the endpoint reference",
1678 "Message sent from side that originates the endpoint reference" };
1681 dissect_q2931_endpoint_reference_ie(tvbuff_t
*tvb
, int offset
, int len
,
1687 proto_tree_add_item(tree
, hf_q2931_endpoint_reference_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1694 proto_tree_add_item(tree
, hf_q2931_endpoint_reference_flag
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1695 proto_tree_add_item(tree
, hf_q2931_endpoint_reference_identifier_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1699 * Dissect an Endpoint state information element.
1701 static const value_string q2931_endpoint_reference_party_state_vals
[] = {
1703 { 0x01, "ADD PARTY initiated" },
1704 { 0x06, "ADD PARTY received" },
1705 { 0x0B, "DROP PARTY initiated" },
1706 { 0x0C, "DROP PARTY received" },
1712 dissect_q2931_endpoint_state_ie(tvbuff_t
*tvb
, int offset
, int len
,
1718 proto_tree_add_item(tree
, hf_q2931_endpoint_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1722 // NOLINTNEXTLINE(misc-no-recursion)
1723 dissect_q2931_ie_contents(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
,
1724 proto_tree
*tree
, uint8_t info_element
)
1726 switch (info_element
) {
1728 case Q2931_IE_BBAND_LOCKING_SHIFT
:
1729 case Q2931_IE_BBAND_NLOCKING_SHIFT
:
1730 dissect_q2931_shift_ie(tvb
, offset
, len
, tree
, info_element
);
1733 case Q2931_IE_NBAND_BEARER_CAP
:
1734 case Q2931_IE_NBAND_LOW_LAYER_COMPAT
:
1735 dissect_q931_bearer_capability_ie(tvb
, offset
, len
, tree
);
1738 case Q2931_IE_NBAND_HIGH_LAYER_COMPAT
:
1739 dissect_q931_high_layer_compat_ie(tvb
, offset
, len
, tree
);
1742 case Q2931_IE_PROGRESS_INDICATOR
:
1743 dissect_q931_progress_indicator_ie(tvb
, offset
, len
, tree
);
1746 case Q2931_IE_AAL_PARAMETERS
:
1747 dissect_q2931_aal_parameters_ie(tvb
, pinfo
, offset
, len
, tree
);
1750 case Q2931_IE_ATM_USER_CELL_RATE
:
1751 dissect_q2931_atm_cell_rate_ie(tvb
, pinfo
, offset
, len
, tree
);
1754 case Q2931_IE_BBAND_BEARER_CAP
:
1755 dissect_q2931_bband_bearer_cap_ie(tvb
, offset
, len
, tree
);
1758 case Q2931_IE_BBAND_HI_LAYER_INFO
:
1759 dissect_q2931_bband_hi_layer_info_ie(tvb
, offset
, len
, tree
);
1762 case Q2931_IE_BBAND_LOW_LAYER_INFO
:
1763 dissect_q2931_bband_low_layer_info_ie(tvb
, offset
, len
, tree
);
1766 case Q2931_IE_CALL_STATE
:
1767 dissect_q2931_call_state_ie(tvb
, offset
, len
, tree
);
1770 case Q2931_IE_CALLED_PARTY_NUMBER
:
1771 case Q2931_IE_CALLING_PARTY_NUMBER
:
1772 dissect_q2931_number_ie(tvb
, pinfo
, offset
, len
, tree
);
1775 case Q2931_IE_CALLED_PARTY_SUBADDR
:
1776 case Q2931_IE_CALLING_PARTY_SUBADDR
:
1777 dissect_q2931_party_subaddr_ie(tvb
, offset
, len
, tree
);
1780 case Q2931_IE_CAUSE
:
1781 // We recurse here, but we'll run out of packet before we run out of stack.
1782 dissect_q2931_cause_ie(tvb
, pinfo
, offset
, len
, tree
);
1785 case Q2931_IE_CONNECTION_IDENTIFIER
:
1786 dissect_q2931_connection_identifier_ie(tvb
, offset
, len
, tree
);
1789 case Q2931_IE_E2E_TRANSIT_DELAY
:
1790 dissect_q2931_e2e_transit_delay_ie(tvb
, pinfo
, offset
, len
, tree
);
1793 case Q2931_IE_QOS_PARAMETER
:
1794 dissect_q2931_qos_parameter_ie(tvb
, offset
, len
, tree
);
1797 case Q2931_IE_BBAND_RPT_INDICATOR
:
1798 dissect_q2931_bband_rpt_indicator(tvb
, offset
, len
, tree
);
1801 case Q2931_IE_RESTART_INDICATOR
:
1802 dissect_q2931_restart_indicator(tvb
, offset
, len
, tree
);
1805 case Q2931_IE_BBAND_SENDING_COMPL
:
1806 dissect_q2931_bband_sending_compl_ie(tvb
, pinfo
, offset
, len
, tree
);
1809 case Q2931_IE_TRANSIT_NETWORK_SEL
:
1810 dissect_q2931_transit_network_sel_ie(tvb
, offset
, len
, tree
);
1813 case Q2931_IE_OAM_TRAFFIC_DESCRIPTOR
:
1814 dissect_q2931_oam_traffic_descriptor_ie(tvb
, offset
, len
, tree
);
1817 case Q2931_IE_ENDPOINT_REFERENCE
:
1818 dissect_q2931_endpoint_reference_ie(tvb
, offset
, len
, tree
);
1821 case Q2931_IE_ENDPOINT_STATE
:
1822 dissect_q2931_endpoint_state_ie(tvb
, offset
, len
, tree
);
1828 // NOLINTNEXTLINE(misc-no-recursion)
1829 dissect_q2931_ie(tvbuff_t
*tvb
, packet_info
* pinfo
, int offset
, int len
, proto_tree
*tree
,
1830 uint8_t info_element
, uint8_t info_element_ext
)
1833 proto_tree
*ie_tree
;
1834 proto_tree
*ie_ext_tree
;
1836 ie_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, 1+1+2+len
, ett_q2931_ie
, NULL
,
1837 val_to_str_ext(info_element
, &q2931_info_element_vals_ext
,
1838 "Unknown information element (0x%02X)"));
1839 proto_tree_add_uint(ie_tree
, hf_q2931_information_element
, tvb
, offset
, 1, info_element
);
1840 ti
= proto_tree_add_uint(ie_tree
, hf_q2931_information_element_extension
, tvb
, offset
+ 1, 1, info_element_ext
);
1841 ie_ext_tree
= proto_item_add_subtree(ti
, ett_q2931_ie_ext
);
1842 proto_tree_add_item(ie_ext_tree
, hf_q2931_ie_coding_standard
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1843 proto_tree_add_item(ie_ext_tree
, hf_q2931_ie_handling_instructions
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1844 if (info_element_ext
& Q2931_IE_COMPAT_FOLLOW_INST
) {
1845 proto_tree_add_item(ie_ext_tree
, hf_q2931_ie_action_indicator
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
1847 proto_tree_add_uint(ie_tree
, hf_q2931_information_element_length
, tvb
, offset
+ 2, 2, len
);
1849 if ((info_element_ext
& Q2931_IE_COMPAT_CODING_STD
)
1850 == Q2931_ITU_STANDARDIZED_CODING
) {
1851 // We recurse here, but we'll run out of packet before we run out of stack.
1852 dissect_q2931_ie_contents(tvb
, pinfo
, offset
+ 4,
1853 len
, ie_tree
, info_element
);
1856 * We don't know how it's encoded, so just
1857 * dump it as data and be done with it.
1859 proto_tree_add_item(ie_tree
, hf_q2931_information_element_data
, tvb
, offset
+ 4, len
, ENC_NA
);
1864 dissect_q2931(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1867 proto_tree
*q2931_tree
;
1869 uint32_t call_ref_len
;
1870 uint8_t call_ref
[16];
1871 uint8_t message_type
;
1872 uint8_t message_type_ext
;
1873 uint16_t message_len
;
1874 uint8_t info_element
;
1875 uint8_t info_element_ext
;
1876 uint16_t info_element_len
;
1879 bool non_locking_shift
;
1881 static int * const ext_flags
[] = {
1882 &hf_q2931_message_flag
,
1885 static int * const ext_flags_follow_inst
[] = {
1886 &hf_q2931_message_flag
,
1887 &hf_q2931_message_action_indicator
,
1891 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "Q.2931");
1893 ti
= proto_tree_add_item(tree
, proto_q2931
, tvb
, offset
, -1, ENC_NA
);
1894 q2931_tree
= proto_item_add_subtree(ti
, ett_q2931
);
1896 proto_tree_add_item(q2931_tree
, hf_q2931_discriminator
, tvb
, offset
, 1, ENC_NA
);
1899 proto_tree_add_item_ret_uint(q2931_tree
, hf_q2931_call_ref_len
, tvb
, offset
, 1, ENC_NA
, &call_ref_len
);
1901 if (call_ref_len
!= 0) {
1902 tvb_memcpy(tvb
, call_ref
, offset
, call_ref_len
);
1903 proto_tree_add_boolean(q2931_tree
, hf_q2931_call_ref_flag
,
1904 tvb
, offset
, 1, (call_ref
[0] & 0x80) != 0);
1905 call_ref
[0] &= 0x7F;
1906 proto_tree_add_bytes(q2931_tree
, hf_q2931_call_ref
, tvb
, offset
, call_ref_len
, call_ref
);
1907 offset
+= call_ref_len
;
1909 message_type
= tvb_get_uint8(tvb
, offset
);
1910 col_add_str(pinfo
->cinfo
, COL_INFO
,
1911 val_to_str_ext(message_type
, &q2931_message_type_vals_ext
,
1912 "Unknown message type (0x%02X)"));
1914 proto_tree_add_uint(q2931_tree
, hf_q2931_message_type
, tvb
, offset
, 1, message_type
);
1917 message_type_ext
= tvb_get_uint8(tvb
, offset
);
1918 if (message_type_ext
& Q2931_MSG_TYPE_EXT_FOLLOW_INST
) {
1919 proto_tree_add_bitmask(q2931_tree
, tvb
, offset
, hf_q2931_message_type_ext
, ett_q2931_ext
, ext_flags_follow_inst
, ENC_NA
);
1921 proto_tree_add_bitmask(q2931_tree
, tvb
, offset
, hf_q2931_message_type_ext
, ett_q2931_ext
, ext_flags
, ENC_NA
);
1925 message_len
= tvb_get_ntohs(tvb
, offset
);
1926 if (q2931_tree
!= NULL
)
1927 proto_tree_add_uint(q2931_tree
, hf_q2931_message_len
, tvb
, offset
, 2, message_len
);
1931 * And now for the information elements....
1934 codeset
= 0; /* start out in codeset 0 */
1935 non_locking_shift
= true;
1937 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1938 info_element
= tvb_get_uint8(tvb
, offset
);
1939 info_element_ext
= tvb_get_uint8(tvb
, offset
+ 1);
1940 info_element_len
= tvb_get_ntohs(tvb
, offset
+ 2);
1941 if (q2931_tree
!= NULL
) {
1942 dissect_q2931_ie(tvb
, pinfo
, offset
, info_element_len
,
1943 q2931_tree
, info_element
, info_element_ext
);
1945 #if 0 /* XXX: Is codeset & etc supposed to be used somehow ? */
1946 if (non_locking_shift
)
1951 switch (info_element
) {
1953 case Q2931_IE_BBAND_LOCKING_SHIFT
:
1954 if (info_element_len
>= 1) {
1955 non_locking_shift
= false;
1956 codeset
= tvb_get_uint8(tvb
, offset
+ 4) & 0x07;
1960 case Q2931_IE_BBAND_NLOCKING_SHIFT
:
1961 if (info_element_len
>= 1) {
1962 non_locking_shift
= true;
1963 codeset
= tvb_get_uint8(tvb
, offset
+ 4) & 0x07;
1968 offset
+= 1 + 1 + 2 + info_element_len
;
1970 return tvb_captured_length(tvb
);
1974 proto_register_q2931(void)
1976 static hf_register_info hf
[] = {
1977 { &hf_q2931_discriminator
,
1978 { "Protocol discriminator", "q2931.disc",
1979 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1983 { &hf_q2931_call_ref_len
,
1984 { "Call reference value length", "q2931.call_ref_len",
1985 FT_UINT8
, BASE_DEC
, NULL
, 0x0F,
1989 { &hf_q2931_call_ref_flag
,
1990 { "Call reference flag", "q2931.call_ref_flag",
1991 FT_BOOLEAN
, BASE_NONE
, TFS(&tfs_call_ref_flag
), 0x0,
1995 { &hf_q2931_call_ref
,
1996 { "Call reference value", "q2931.call_ref",
1997 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2001 { &hf_q2931_message_type
,
2002 { "Message type", "q2931.message_type",
2003 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_message_type_vals_ext
, 0x0,
2007 { &hf_q2931_message_type_ext
,
2008 { "Message type extension", "q2931.message_type_ext",
2009 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2013 { &hf_q2931_message_flag
,
2014 { "Flag", "q2931.message_flag",
2015 FT_BOOLEAN
, 8, TFS(&tos_msg_flag
), Q2931_MSG_TYPE_EXT_FOLLOW_INST
,
2019 { &hf_q2931_message_action_indicator
,
2020 { "Action indicator", "q2931.message_action_indicator",
2021 FT_UINT8
, BASE_DEC
, VALS(msg_action_ind_vals
), Q2931_MSG_TYPE_EXT_ACTION_IND
,
2025 { &hf_q2931_message_len
,
2026 { "Message length", "q2931.message_len",
2027 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2031 { &hf_q2931_ie_handling_instructions
,
2032 { "Handling Instructions", "q2931.ie_handling_instructions",
2033 FT_BOOLEAN
, 8, TFS(&tfs_q2931_handling_instructions
), Q2931_IE_COMPAT_FOLLOW_INST
,
2037 { &hf_q2931_ie_coding_standard
,
2038 { "Coding standard", "q2931.ie_coding_standard",
2039 FT_UINT8
, BASE_DEC
, VALS(coding_std_vals
), Q2931_IE_COMPAT_CODING_STD
,
2043 { &hf_q2931_ie_action_indicator
,
2044 { "Action indicator", "q2931.ie_action_indicator",
2045 FT_UINT8
, BASE_DEC
, VALS(ie_action_ind_vals
), Q2931_IE_COMPAT_ACTION_IND
,
2049 /* Generated from convert_proto_tree_add_text.pl */
2050 { &hf_q2931_aal_type
,
2051 { "AAL type", "q2931.aal_type",
2052 FT_UINT8
, BASE_HEX
, VALS(q9231_aal_type_vals
), 0x0,
2055 { &hf_q2931_user_defined_aal_information
,
2056 { "User defined AAL information", "q2931.user_defined_aal_information",
2057 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2060 { &hf_q2931_aal1_subtype
,
2061 { "Subtype", "q2931.aal1.subtype",
2062 FT_UINT8
, BASE_HEX
, VALS(q9231_aal1_subtype_vals
), 0x0,
2065 { &hf_q2931_aal1_cbr_rate
,
2066 { "CBR rate", "q2931.aal1.cbr_rate",
2067 FT_UINT8
, BASE_HEX
, VALS(q9231_aal1_cbr_rate_vals
), 0x0,
2070 { &hf_q2931_aal1_multiplier
,
2071 { "Multiplier", "q2931.aal1.multiplier",
2072 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2075 { &hf_q2931_aal1_source_clock_frequency_recovery_method
,
2076 { "Source clock frequency recovery method", "q2931.aal1.source_clock_frequency_recovery_method",
2077 FT_UINT8
, BASE_HEX
, VALS(q2931_aal1_src_clk_rec_meth_vals
), 0x0,
2080 { &hf_q2931_aal1_error_correction_method
,
2081 { "Error correction method", "q2931.aal1.error_correction_method",
2082 FT_UINT8
, BASE_HEX
, VALS(q2931_aal1_err_correction_method_vals
), 0x0,
2085 { &hf_q2931_aal1_structured_data_transfer_block_size
,
2086 { "Structured data transfer block size", "q2931.aal1.structured_data_transfer_block_size",
2087 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2090 { &hf_q2931_aal1_partially_filled_cells_method
,
2091 { "Partially filled cells method", "q2931.aal1.partially_filled_cells_method",
2092 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_octet_octets
), 0x0,
2095 { &hf_q2931_aal1_forward_max_cpcs_sdu_size
,
2096 { "Forward maximum CPCS-SDU size", "q2931.aal1.forward_max_cpcs_sdu_size",
2097 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2100 { &hf_q2931_aal1_backward_max_cpcs_sdu_size
,
2101 { "Backward maximum CPCS-SDU size", "q2931.aal1.backward_max_cpcs_sdu_size",
2102 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2105 { &hf_q2931_aal1_mode
,
2106 { "Mode", "q2931.aal1.mode",
2107 FT_UINT8
, BASE_HEX
, VALS(q2931_aal_mode_vals
), 0x0,
2110 { &hf_q2931_aal1_sscs_type
,
2111 { "SSCS type", "q2931.aal1.sscs_type",
2112 FT_UINT8
, BASE_HEX
, VALS(q2931_sscs_type_vals
), 0x0,
2115 { &hf_q2931_bearer_class
,
2116 { "Bearer class", "q2931.bearer_class",
2117 FT_UINT8
, BASE_HEX
, VALS(q2931_bearer_class_vals
), 0x1F,
2120 { &hf_q2931_atm_transfer_capability
,
2121 { "ATM Transfer Capability", "q2931.atm_transfer_capability",
2122 FT_UINT8
, BASE_HEX
, VALS(q2931_transfer_capability_vals
), 0x1F,
2125 { &hf_q2931_susceptibility_to_clipping
,
2126 { "Susceptibility to clipping", "q2931.susceptibility_to_clipping",
2127 FT_UINT8
, BASE_HEX
, VALS(q2931_susc_clip_vals
), 0x60,
2130 { &hf_q2931_user_plane_connection_configuration
,
2131 { "User-plane connection configuration", "q2931.user_plane_connection_configuration",
2132 FT_UINT8
, BASE_HEX
, VALS(q2931_up_conn_config_vals
), 0x03,
2135 { &hf_q2931_high_layer_information_type
,
2136 { "High layer information type", "q2931.high_layer_information_type",
2137 FT_UINT8
, BASE_HEX
, VALS(q2931_hi_layer_info_type_vals
), 0x7F,
2140 { &hf_q2931_bband_low_layer_info_user_info_l1_proto
,
2141 { "User information layer 1 protocol", "q2931.bband_low_layer_info.user_info_l1_proto",
2142 FT_UINT8
, BASE_HEX
, NULL
, 0x1F,
2145 { &hf_q2931_bband_low_layer_info_user_info_l2_proto
,
2146 { "User information layer 2 protocol", "q2931.bband_low_layer_info.user_info_l2_proto",
2147 FT_UINT8
, BASE_HEX
, VALS(q2931_uil2_vals
), 0x1F,
2150 { &hf_q2931_bband_low_layer_info_user_specified_l2_proto
,
2151 { "User-specified layer 2 protocol information", "q2931.bband_low_layer_info.user_specified_l2_proto",
2152 FT_UINT8
, BASE_HEX
, NULL
, 0x7F,
2155 { &hf_q2931_bband_low_layer_info_mode
,
2156 { "Mode", "q2931.bband_low_layer_info.mode",
2157 FT_UINT8
, BASE_HEX
, VALS(q2931_mode_vals
), 0x60,
2160 { &hf_q2931_bband_low_layer_info_window_size
,
2161 { "Window size", "q2931.bband_low_layer_info.window_size",
2162 FT_UINT8
, BASE_DEC
, NULL
, 0x7F,
2165 { &hf_q2931_bband_low_layer_info_user_info_l3_proto
,
2166 { "User information layer 3 protocol", "q2931.bband_low_layer_info.user_info_l3_proto",
2167 FT_UINT8
, BASE_HEX
, VALS(q2931_uil3_vals
), 0x1F,
2170 { &hf_q2931_bband_low_layer_info_default_packet_size
,
2171 { "Default packet size", "q2931.bband_low_layer_info.default_packet_size",
2172 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_octet_octets
), 0x0F,
2175 { &hf_q2931_bband_low_layer_info_packet_window_size
,
2176 { "Packet window size", "q2931.bband_low_layer_info.packet_window_size",
2177 FT_UINT8
, BASE_DEC
, NULL
, 0x7F,
2180 { &hf_q2931_bband_low_layer_info_additional_l3_proto
,
2181 { "Additional layer 3 protocol information", "q2931.bband_low_layer_info.additional_l3_proto",
2182 FT_UINT8
, BASE_HEX
, VALS(nlpid_vals
), 0x0,
2185 { &hf_q2931_organization_code
,
2186 { "Organization Code", "q2931.bband_low_layer_info.organization_code",
2187 FT_UINT24
, BASE_OUI
, NULL
, 0x0,
2190 { &hf_q2931_ethernet_type
,
2191 { "Ethernet type", "q2931.bband_low_layer_info.ethernet_type",
2192 FT_UINT16
, BASE_HEX
, VALS(etype_vals
), 0x0,
2195 { &hf_q2931_lane_protocol_id
,
2196 { "LANE Protocol ID", "q2931.bband_low_layer_info.lane_protocol_id",
2197 FT_UINT16
, BASE_HEX
, VALS(lane_pid_vals
), 0x0,
2200 { &hf_q2931_protocol_id
,
2201 { "Protocol ID", "q2931.bband_low_layer_info.protocol_id",
2202 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
2205 { &hf_q2931_cause_location
,
2206 { "Location", "q2931.cause.location",
2207 FT_UINT8
, BASE_HEX
, VALS(q2931_cause_location_vals
), 0x0F,
2210 { &hf_q2931_cause_value
,
2211 { "Cause value", "q2931.cause.value",
2212 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_cause_code_vals_ext
, 0x7F,
2215 { &hf_q2931_cause_rejection_reason
,
2216 { "Rejection reason", "q2931.cause.rejection.reason",
2217 FT_UINT8
, BASE_HEX
, VALS(q2931_rejection_reason_vals
), 0x7C,
2220 { &hf_q2931_cause_rejection_condition
,
2221 { "Condition", "q2931.cause.rejection.condition",
2222 FT_UINT8
, BASE_HEX
, VALS(q2931_cause_condition_vals
), 0x03,
2225 { &hf_q2931_cause_rejection_user_specific_diagnostic
,
2226 { "User specific diagnostic", "q2931.cause.rejection.user_specific_diagnostic",
2227 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2230 { &hf_q2931_cause_rejection_missing_information_element
,
2231 { "Missing information element", "q2931.cause.rejection.missing_information_element",
2232 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_info_element_vals_ext
, 0x0,
2235 { &hf_q2931_cause_rejection_insufficient_information_element
,
2236 { "Insufficient information element", "q2931.cause.rejection.insufficient_information_element",
2237 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_info_element_vals_ext
, 0x0,
2240 { &hf_q2931_cause_rejection_diagnostic
,
2241 { "Diagnostic", "q2931.cause.rejection.diagnostic",
2242 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2245 { &hf_q2931_cause_information_element
,
2246 { "Information element", "q2931.cause.information_element",
2247 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_info_element_vals_ext
, 0x0,
2250 { &hf_q2931_cause_cell_rate_subfield_identifier
,
2251 { "Cell rate subfield identifier", "q2931.cause.cell_rate_subfield_identifier",
2252 FT_UINT8
, BASE_HEX
, VALS(q2931_atm_td_subfield_vals
), 0x0,
2255 { &hf_q2931_cause_vpci
,
2256 { "VPCI", "q2931.cause.vpci",
2257 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2260 { &hf_q2931_cause_vci
,
2261 { "VCI", "q2931.cause.vci",
2262 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2265 { &hf_q2931_cause_message_type
,
2266 { "Message type", "q2931.cause.message_type",
2267 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_message_type_vals_ext
, 0x0,
2270 { &hf_q2931_cause_timer
,
2271 { "Timer", "q2931.cause.timer",
2272 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2275 { &hf_q2931_call_state
,
2276 { "Call state", "q2931.call_state",
2277 FT_UINT8
, BASE_HEX
, VALS(q2931_call_state_vals
), 0x3F,
2280 { &hf_q2931_number_type
,
2281 { "Type of number", "q2931.number.type",
2282 FT_UINT8
, BASE_HEX
, VALS(q2931_number_type_vals
), 0x70,
2285 { &hf_q2931_number_plan
,
2286 { "Numbering plan", "q2931.number.plan",
2287 FT_UINT8
, BASE_HEX
, VALS(q2931_numbering_plan_vals
), 0x0F,
2290 { &hf_q2931_number_presentation_indicator
,
2291 { "Presentation indicator", "q2931.number.presentation_indicator",
2292 FT_UINT8
, BASE_HEX
, VALS(q2931_presentation_indicator_vals
), 0x60,
2295 { &hf_q2931_number_screening_indicator
,
2296 { "Screening indicator", "q2931.number.screening_indicator",
2297 FT_UINT8
, BASE_HEX
, VALS(q2931_screening_indicator_vals
), 0x03,
2300 { &hf_q2931_number_string
,
2301 { "Number", "q2931.number.string",
2302 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2305 { &hf_q2931_number_bytes
,
2306 { "Number", "q2931.number.bytes",
2307 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2310 { &hf_q2931_party_subaddr_type_of_subaddress
,
2311 { "Type of subaddress", "q2931.party_subaddr.type_of_subaddress",
2312 FT_UINT8
, BASE_HEX
, VALS(q2931_subaddress_type_vals
), 0x70,
2315 { &hf_q2931_party_subaddr_odd_even_indicator
,
2316 { "Odd/even indicator", "q2931.party_subaddr.odd_even_indicator",
2317 FT_UINT8
, BASE_HEX
, VALS(q2931_odd_even_indicator_vals
), 0x10,
2320 { &hf_q2931_party_subaddr_subaddress
,
2321 { "Subaddress", "q2931.party_subaddr.subaddress",
2322 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2325 { &hf_q2931_conn_id_vp_associated_signalling
,
2326 { "VP-associated signalling", "q2931.conn_id.vp_associated_signalling",
2327 FT_UINT8
, BASE_HEX
, VALS(q2931_vp_associated_signalling_vals
), 0x18,
2330 { &hf_q2931_conn_id_preferred_exclusive
,
2331 { "Preferred/exclusive", "q2931.conn_id.preferred_exclusive",
2332 FT_UINT8
, BASE_HEX
, VALS(q2931_preferred_exclusive_vals
), 0x07,
2335 { &hf_q2931_conn_id_vpci
,
2336 { "VPCI", "q2931.conn_id.vpci",
2337 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2340 { &hf_q2931_conn_id_vci
,
2341 { "VCI", "q2931.conn_id.vci",
2342 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2345 { &hf_q2931_e2e_transit_delay_cumulative
,
2346 { "Cumulative transit delay", "q2931.e2e_transit_delay.cumulative",
2347 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0,
2350 { &hf_q2931_e2e_transit_delay_maximum_end_to_end
,
2351 { "Maximum end-to-end transit delay", "q2931.e2e_transit_delay.maximum_end_to_end",
2352 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2355 { &hf_q2931_qos_class_forward
,
2356 { "QOS class forward", "q2931.qos_class_forward",
2357 FT_UINT8
, BASE_HEX
, VALS(q2931_qos_parameter_vals
), 0x0,
2360 { &hf_q2931_qos_class_backward
,
2361 { "QOS class backward", "q2931.qos_class_backward",
2362 FT_UINT8
, BASE_HEX
, VALS(q2931_qos_parameter_vals
), 0x0,
2365 { &hf_q2931_broadband_repeat_indicator
,
2366 { "Broadband repeat indicator", "q2931.broadband_repeat_indicator",
2367 FT_UINT8
, BASE_HEX
, VALS(q2931_bband_rpt_indicator_vals
), 0x0F,
2370 { &hf_q2931_restart_indicator
,
2371 { "Restart indicator", "q2931.restart_indicator",
2372 FT_UINT8
, BASE_HEX
, VALS(q2931_class_vals
), 0x07,
2375 { &hf_q2931_transit_network_sel_type
,
2376 { "Type of network identification", "q2931.transit_network_sel.type",
2377 FT_UINT8
, BASE_HEX
, VALS(q2931_netid_type_vals
), 0x70,
2380 { &hf_q2931_transit_network_sel_plan
,
2381 { "Network identification plan", "q2931.transit_network_sel.plan",
2382 FT_UINT8
, BASE_HEX
, VALS(q2931_netid_plan_vals
), 0x0F,
2385 { &hf_q2931_transit_network_sel_network_id
,
2386 { "Network identification", "q2931.transit_network_sel.network_identification",
2387 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2390 { &hf_q2931_oam_traffic_descriptor_shaping_indicator
,
2391 { "Shaping indicator", "q2931.oam_traffic_descriptor.shaping_indicator",
2392 FT_UINT8
, BASE_HEX
, VALS(q2931_shaping_indicator_vals
), 0x60,
2395 { &hf_q2931_oam_end_to_end_f5_flow
,
2396 { "Use of end-to-end OAM F5 flow", "q2931.oam_end_to_end_f5_flow",
2397 FT_BOOLEAN
, 8, TFS(&tfs_mandatory_optional
), 0x10,
2400 { &hf_q2931_oam_traffic_descriptor_management_indicator
,
2401 { "User-Network fault management indicator", "q2931.oam_traffic_descriptor.management_indicator",
2402 FT_UINT8
, BASE_HEX
, VALS(q2931_user_net_fault_mgmt_vals
), 0x07,
2405 { &hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator
,
2406 { "Forward end-to-end OAM F5 flow indicator", "q2931.oam_traffic_descriptor.forward_f5_flow_indicator",
2407 FT_UINT8
, BASE_HEX
, VALS(q2931_fwd_e2e_oam_f5_flow_indicator_vals
), 0x70,
2410 { &hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator
,
2411 { "Backward end-to-end OAM F5 flow indicator", "q2931.oam_traffic_descriptor.backward_f5_flow_indicator",
2412 FT_UINT8
, BASE_HEX
, VALS(q2931_bwd_e2e_oam_f5_flow_indicator_vals
), 0x07,
2415 { &hf_q2931_endpoint_reference_type
,
2416 { "Endpoint reference type", "q2931.endpoint_reference.type",
2417 FT_UINT8
, BASE_HEX
, VALS(q2931_endpoint_reference_type_vals
), 0x0,
2420 { &hf_q2931_endpoint_reference_flag
,
2421 { "Endpoint reference identifier value", "q2931.endpoint_reference.flag",
2422 FT_BOOLEAN
, 16, TFS(&tfs_endpoint_reference_flag
), 0x8000,
2425 { &hf_q2931_endpoint_reference_identifier_value
,
2426 { "Endpoint reference identifier value", "q2931.endpoint_reference.identifier_value",
2427 FT_UINT16
, BASE_DEC
, NULL
, 0x7FFF,
2430 { &hf_q2931_endpoint_state
,
2431 { "Endpoint reference party-state", "q2931.endpoint_state",
2432 FT_UINT8
, BASE_HEX
, VALS(q2931_endpoint_reference_party_state_vals
), 0x3F,
2435 { &hf_q2931_information_element
,
2436 { "Information element", "q2931.information_element",
2437 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &q2931_info_element_vals_ext
, 0x0,
2440 { &hf_q2931_information_element_extension
,
2441 { "Information element extension", "q2931.information_element.extension",
2442 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2445 { &hf_q2931_information_element_length
,
2446 { "Length", "q2931.information_element.length",
2447 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2450 { &hf_q2931_information_element_data
,
2451 { "Data", "q2931.information_element.data",
2452 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2455 { &hf_q2931_frame_discard_forward_dir
,
2456 { "Frame discard in forward direction", "q2931.frame_discard_forward_dir",
2457 FT_BOOLEAN
, 8, TFS(&tfs_allowed_not_allowed
), 0x80,
2460 { &hf_q2931_frame_discard_backward_dir
,
2461 { "Frame discard in backward direction", "q2931.frame_discard_backward_dir",
2462 FT_BOOLEAN
, 8, TFS(&tfs_allowed_not_allowed
), 0x40,
2465 { &hf_q2931_tagging_backward_dir
,
2466 { "Tagging in backward direction", "q2931.tagging_backward_dir",
2467 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x02,
2470 { &hf_q2931_tagging_forward_dir
,
2471 { "Tagging in forward direction", "q2931.tagging_forward_dir",
2472 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x01,
2475 { &hf_q2931_midrange
,
2476 { "MID range", "q2931.midrange",
2477 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
2480 { &hf_q2931_cause_network_service
,
2481 { "Network service", "q2931.cause.network_service",
2482 FT_BOOLEAN
, 8, TFS(&tfs_user_provider
), 0x80,
2485 { &hf_q2931_cause_network_behavior
,
2486 { "Network behavior", "q2931.cause.network_behavior",
2487 FT_BOOLEAN
, 8, TFS(&tfs_abnormal_normal
), 0x40,
2490 { &hf_q2931_nsap_address_number_short
,
2491 { "Number (too short)", "q2931.nsap_address.number_short",
2492 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2495 { &hf_q2931_atm_identifier
,
2496 { "Identifier", "q2931.atm_identifier",
2497 FT_UINT8
, BASE_HEX
, VALS(q2931_atm_td_subfield_vals
), 0x0,
2500 { &hf_q2931_atm_identifier_value
,
2501 { "Value", "q2931.atm_identifier_value",
2502 FT_UINT24
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_cells_s
), 0x0,
2505 { &hf_q2931_aal_parameter_identifier
,
2506 { "Identifier", "q2931.aal.parameter_identifier",
2507 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2510 { &hf_q2931_e2e_transit_delay_identifier
,
2511 { "Identifier", "q2931.transit_delay.identifier",
2512 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2515 { &hf_q2931_bband_sending_complete_id
,
2516 { "Identifier", "q2931.bband_sending_complete.id",
2517 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
2520 { &hf_q2931_bband_sending_complete
,
2521 { "Broadband sending complete indication", "q2931.bband_sending_complete",
2522 FT_NONE
, BASE_NONE
, NULL
, 0x0,
2525 { &hf_q2931_locking_codeset
,
2526 { "Locking codeset", "q2931.locking_codeset",
2527 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2532 static int *ett
[] = {
2540 static ei_register_info ei
[] = {
2541 { &ei_q2931_atm_identifier
, { "q2931.atm_identifier.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown ATM traffic descriptor element", EXPFILL
}},
2542 { &ei_q2931_aal_parameter_identifier
, { "q2931.aal.parameter_identifier.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown AAL parameter", EXPFILL
}},
2543 { &ei_q2931_e2e_transit_delay_identifier
, { "q2931.transit_delay.parameter_identifier.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown transit delay identifier", EXPFILL
}},
2544 { &ei_q2931_bband_sending_complete_id
, { "q2931.bband_sending_complete.id.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown broadband sending complete element", EXPFILL
}},
2547 expert_module_t
* expert_q2931
;
2549 proto_q2931
= proto_register_protocol("Q.2931", "Q.2931", "q2931");
2550 proto_register_field_array (proto_q2931
, hf
, array_length(hf
));
2551 proto_register_subtree_array(ett
, array_length(ett
));
2552 expert_q2931
= expert_register_protocol(proto_q2931
);
2553 expert_register_field_array(expert_q2931
, ei
, array_length(ei
));
2555 register_dissector("q2931", dissect_q2931
, proto_q2931
);
2559 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2564 * indent-tabs-mode: t
2567 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2568 * :indentSize=8:tabSize=8:noTabs=false: