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 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <epan/packet.h>
28 #include <epan/nlpid.h>
29 #include <epan/etypes.h>
30 #include <epan/expert.h>
31 #include <wsutil/str_util.h>
32 #include "packet-q931.h"
33 #include "packet-arp.h"
38 * http://www.protocols.com/pbook/atmsig.htm
40 * for some information on Q.2931, although, alas, not the actual message
41 * type and information element values - those I got from the FreeBSD 3.2
42 * ATM code, and from Q.2931 (and Q.931) itself.
45 void proto_register_q2931(void);
47 static int proto_q2931 = -1;
48 static int hf_q2931_discriminator = -1;
49 static int hf_q2931_call_ref_len = -1;
50 static int hf_q2931_call_ref_flag = -1;
51 static int hf_q2931_call_ref = -1;
52 static int hf_q2931_message_type = -1;
53 static int hf_q2931_message_type_ext = -1;
54 static int hf_q2931_message_flag = -1;
55 static int hf_q2931_message_action_indicator = -1;
56 static int hf_q2931_message_len = -1;
57 static int hf_q2931_ie_handling_instructions = -1;
58 static int hf_q2931_ie_coding_standard = -1;
59 static int hf_q2931_ie_action_indicator = -1;
60 /* Generated from convert_proto_tree_add_text.pl */
61 static int hf_q2931_number_bytes = -1;
62 static int hf_q2931_conn_id_vci = -1;
63 static int hf_q2931_restart_indicator = -1;
64 static int hf_q2931_conn_id_vpci = -1;
65 static int hf_q2931_bband_low_layer_info_mode = -1;
66 static int hf_q2931_cause_rejection_insufficient_information_element = -1;
67 static int hf_q2931_bband_low_layer_info_user_info_l3_proto = -1;
68 static int hf_q2931_number_string = -1;
69 static int hf_q2931_aal1_backward_max_cpcs_sdu_size = -1;
70 static int hf_q2931_user_plane_connection_configuration = -1;
71 static int hf_q2931_party_subaddr_subaddress = -1;
72 static int hf_q2931_aal1_mode = -1;
73 static int hf_q2931_cause_location = -1;
74 static int hf_q2931_bband_low_layer_info_user_specified_l2_proto = -1;
75 static int hf_q2931_information_element = -1;
76 static int hf_q2931_conn_id_preferred_exclusive = -1;
77 static int hf_q2931_cause_vci = -1;
78 static int hf_q2931_cause_information_element = -1;
79 static int hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator = -1;
80 static int hf_q2931_cause_rejection_reason = -1;
81 static int hf_q2931_ethernet_type = -1;
82 static int hf_q2931_cause_value = -1;
83 static int hf_q2931_information_element_length = -1;
84 static int hf_q2931_cause_rejection_user_specific_diagnostic = -1;
85 static int hf_q2931_transit_network_sel_type = -1;
86 static int hf_q2931_user_defined_aal_information = -1;
87 static int hf_q2931_aal1_forward_max_cpcs_sdu_size = -1;
88 static int hf_q2931_atm_transfer_capability = -1;
89 static int hf_q2931_aal1_subtype = -1;
90 static int hf_q2931_information_element_extension = -1;
91 static int hf_q2931_party_subaddr_type_of_subaddress = -1;
92 static int hf_q2931_number_plan = -1;
93 static int hf_q2931_aal1_error_correction_method = -1;
94 static int hf_q2931_call_state = -1;
95 static int hf_q2931_bearer_class = -1;
96 static int hf_q2931_protocol_id = -1;
97 static int hf_q2931_information_element_data = -1;
98 static int hf_q2931_aal1_partially_filled_cells_method = -1;
99 static int hf_q2931_lane_protocol_id = -1;
100 static int hf_q2931_party_subaddr_odd_even_indicator = -1;
101 static int hf_q2931_qos_class_backward = -1;
102 static int hf_q2931_cause_rejection_condition = -1;
103 static int hf_q2931_aal1_source_clock_frequency_recovery_method = -1;
104 static int hf_q2931_broadband_repeat_indicator = -1;
105 static int hf_q2931_cause_rejection_missing_information_element = -1;
106 static int hf_q2931_e2e_transit_delay_maximum_end_to_end = -1;
107 static int hf_q2931_endpoint_reference_flag = -1;
108 static int hf_q2931_endpoint_reference_identifier_value = -1;
109 static int hf_q2931_cause_vpci = -1;
110 static int hf_q2931_endpoint_state = -1;
111 static int hf_q2931_high_layer_information_type = -1;
112 static int hf_q2931_transit_network_sel_network_id = -1;
113 static int hf_q2931_aal1_sscs_type = -1;
114 static int hf_q2931_bband_low_layer_info_packet_window_size = -1;
115 static int hf_q2931_aal1_structured_data_transfer_block_size = -1;
116 static int hf_q2931_cause_timer = -1;
117 static int hf_q2931_cause_message_type = -1;
118 static int hf_q2931_e2e_transit_delay_cumulative = -1;
119 static int hf_q2931_oam_traffic_descriptor_shaping_indicator = -1;
120 static int hf_q2931_oam_end_to_end_f5_flow = -1;
121 static int hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator = -1;
122 static int hf_q2931_organization_code = -1;
123 static int hf_q2931_bband_low_layer_info_additional_l3_proto = -1;
124 static int hf_q2931_transit_network_sel_plan = -1;
125 static int hf_q2931_bband_low_layer_info_user_info_l2_proto = -1;
126 static int hf_q2931_aal1_multiplier = -1;
127 static int hf_q2931_aal_type = -1;
128 static int hf_q2931_aal1_cbr_rate = -1;
129 static int hf_q2931_number_type = -1;
130 static int hf_q2931_cause_rejection_diagnostic = -1;
131 static int hf_q2931_bband_low_layer_info_default_packet_size = -1;
132 static int hf_q2931_susceptibility_to_clipping = -1;
133 static int hf_q2931_oam_traffic_descriptor_management_indicator = -1;
134 static int hf_q2931_qos_class_forward = -1;
135 static int hf_q2931_endpoint_reference_type = -1;
136 static int hf_q2931_number_presentation_indicator = -1;
137 static int hf_q2931_bband_low_layer_info_user_info_l1_proto = -1;
138 static int hf_q2931_number_screening_indicator = -1;
139 static int hf_q2931_bband_low_layer_info_window_size = -1;
140 static int hf_q2931_conn_id_vp_associated_signalling = -1;
141 static int hf_q2931_cause_cell_rate_subfield_identifier = -1;
142 static int hf_q2931_frame_discard_forward_dir = -1;
143 static int hf_q2931_frame_discard_backward_dir = -1;
144 static int hf_q2931_tagging_backward_dir = -1;
145 static int hf_q2931_tagging_forward_dir = -1;
146 static int hf_q2931_midrange = -1;
147 static int hf_q2931_cause_network_service = -1;
148 static int hf_q2931_cause_network_behavior = -1;
149 static int hf_q2931_nsap_address_number_short = -1;
150 static int hf_q2931_atm_identifier = -1;
151 static int hf_q2931_atm_identifier_value = -1;
152 static int hf_q2931_aal_parameter_identifier = -1;
153 static int hf_q2931_e2e_transit_delay_identifier = -1;
154 static int hf_q2931_bband_sending_complete_id = -1;
155 static int hf_q2931_bband_sending_complete = -1;
156 static int hf_q2931_locking_codeset = -1;
158 static gint ett_q2931 = -1;
159 static gint ett_q2931_ext = -1;
160 static gint ett_q2931_ie = -1;
161 static gint ett_q2931_ie_ext = -1;
162 static gint ett_q2931_nsap = -1;
164 static expert_field ei_q2931_atm_identifier = EI_INIT;
165 static expert_field ei_q2931_aal_parameter_identifier = EI_INIT;
166 static expert_field ei_q2931_e2e_transit_delay_identifier = EI_INIT;
167 static expert_field ei_q2931_bband_sending_complete_id = EI_INIT;
169 static void dissect_q2931_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
170 proto_tree *tree, guint8 info_element, guint8 info_element_ext);
173 * Q.2931 message types.
175 #define Q2931_ALERTING 0x01
176 #define Q2931_CALL_PROCEEDING 0x02
177 #define Q2931_PROGRESS 0x03
178 #define Q2931_SETUP 0x05
179 #define Q2931_CONNECT 0x07
180 #define Q2931_SETUP_ACK 0x0B
181 #define Q2931_CONNECT_ACK 0x0F
182 #define Q2931_RESTART 0x46
183 #define Q2931_RELEASE 0x4D
184 #define Q2931_RESTART_ACK 0x4E
185 #define Q2931_RELEASE_COMPLETE 0x5A
186 #define Q2931_NOTIFY 0x6E
187 #define Q2931_STATUS_ENQUIRY 0x75
188 #define Q2931_INFORMATION 0x7B
189 #define Q2931_STATUS 0x7D
190 #define Q2931_ADD_PARTY 0x80
191 #define Q2931_ADD_PARTY_ACK 0x81
192 #define Q2931_ADD_PARTY_REJ 0x82
193 #define Q2931_DROP_PARTY 0x83
194 #define Q2931_DROP_PARTY_ACK 0x84
195 #define Q2931_LEAF_SETUP_FAIL 0x90
196 #define Q2931_LEAF_SETUP_REQ 0x91
198 static const value_string q2931_message_type_vals[] = {
199 { Q2931_ALERTING, "ALERTING" },
200 { Q2931_CALL_PROCEEDING, "CALL PROCEEDING" },
201 { Q2931_PROGRESS, "PROGRESS" },
202 { Q2931_SETUP, "SETUP" },
203 { Q2931_CONNECT, "CONNECT" },
204 { Q2931_SETUP_ACK, "SETUP ACKNOWLEDGE" },
205 { Q2931_CONNECT_ACK, "CONNECT ACKNOWLEDGE" },
206 { Q2931_RESTART, "RESTART" },
207 { Q2931_RELEASE, "RELEASE" },
208 { Q2931_RESTART_ACK, "RESTART ACKNOWLEDGE" },
209 { Q2931_RELEASE_COMPLETE, "RELEASE COMPLETE" },
210 { Q2931_NOTIFY, "NOTIFY" },
211 { Q2931_STATUS_ENQUIRY, "STATUS ENQUIRY" },
212 { Q2931_INFORMATION, "INFORMATION" },
213 { Q2931_STATUS, "STATUS" },
214 { Q2931_ADD_PARTY, "ADD PARTY" },
215 { Q2931_ADD_PARTY_ACK, "ADD PARTY ACKNOWLEDGE" },
216 { Q2931_ADD_PARTY_REJ, "ADD PARTY REJECT" },
217 { Q2931_DROP_PARTY, "DROP PARTY" },
218 { Q2931_DROP_PARTY_ACK, "DROP PARTY ACKNOWLEDGE" },
219 { Q2931_LEAF_SETUP_FAIL, "LEAF SETUP FAILURE" },
220 { Q2931_LEAF_SETUP_REQ, "LEAF SETUP REQUEST" },
224 static value_string_ext q2931_message_type_vals_ext = VALUE_STRING_EXT_INIT(q2931_message_type_vals);
226 static const true_false_string tfs_call_ref_flag = {
227 "Message sent to originating side",
228 "Message sent from originating side"
232 * Bits in the message type extension.
234 #define Q2931_MSG_TYPE_EXT_FOLLOW_INST 0x10 /* follow instructions in action indicator */
235 #define Q2931_MSG_TYPE_EXT_ACTION_IND 0x03 /* said instructions */
237 static const true_false_string tos_msg_flag = {
238 "Regular error handling procedures apply",
239 "Follow explicit error handling instructions"
242 static const value_string msg_action_ind_vals[] = {
243 { 0x00, "Clear call" },
244 { 0x01, "Discard and ignore" },
245 { 0x02, "Discard and report status" },
250 * Bits in the compatibility instruction indicator octet of an
251 * information element.
253 #define Q2931_IE_COMPAT_CODING_STD 0x60 /* Coding standard */
254 #define Q2931_IE_COMPAT_FOLLOW_INST 0x10 /* follow instructions in action indicator */
255 #define Q2931_IE_COMPAT_ACTION_IND 0x07
258 * ITU-standardized coding.
260 #define Q2931_ITU_STANDARDIZED_CODING 0x00
262 static const value_string coding_std_vals[] = {
263 { 0x00, "ITU-T standardized coding" },
264 { 0x20, "ISO/IEC standard" },
265 { 0x40, "National standard" },
266 { 0x60, "Standard defined for the network" },
270 static const value_string ie_action_ind_vals[] = {
271 { 0x00, "Clear call" },
272 { 0x01, "Discard information element and proceed" },
273 { 0x02, "Discard information element, proceed, and report status" },
274 { 0x05, "Discard message, and ignore" },
275 { 0x06, "Discard message, and report status" },
280 * Information elements.
282 #define Q2931_IE_EXTENSION 0x80 /* Extension flag */
284 #define Q2931_IE_NBAND_BEARER_CAP 0x04 /* Narrowband bearer capability */
285 #define Q2931_IE_CAUSE 0x08
286 #define Q2931_IE_CALL_STATE 0x14
287 #define Q2931_IE_PROGRESS_INDICATOR 0x1E
288 #define Q2931_IE_NOTIFICATION_INDICATOR 0x27
289 #define Q2931_IE_E2E_TRANSIT_DELAY 0x42 /* End-to-end Transit Delay */
290 #define Q2931_IE_ENDPOINT_REFERENCE 0x54
291 #define Q2931_IE_ENDPOINT_STATE 0x55
292 #define Q2931_IE_AAL_PARAMETERS 0x58 /* ATM adaptation layer parameters */
293 #define Q2931_IE_ATM_USER_CELL_RATE 0x59 /* ATM traffic descriptor */
294 #define Q2931_IE_CONNECTION_IDENTIFIER 0x5A
295 #define Q2931_IE_OAM_TRAFFIC_DESCRIPTOR 0x5B
296 #define Q2931_IE_QOS_PARAMETER 0x5C /* Quality of Service parameter */
297 #define Q2931_IE_BBAND_HI_LAYER_INFO 0x5D /* Broadband high-layer information */
298 #define Q2931_IE_BBAND_BEARER_CAP 0x5E /* Broadband bearer capability */
299 #define Q2931_IE_BBAND_LOW_LAYER_INFO 0x5F /* Broadband low-layer information */
300 #define Q2931_IE_BBAND_LOCKING_SHIFT 0x60 /* Broadband locking shift */
301 #define Q2931_IE_BBAND_NLOCKING_SHIFT 0x61 /* Broadband non-locking shift */
302 #define Q2931_IE_BBAND_SENDING_COMPL 0x62 /* Broadband sending complete */
303 #define Q2931_IE_BBAND_RPT_INDICATOR 0x63 /* Broadband repeat indicator */
304 #define Q2931_IE_CALLING_PARTY_NUMBER 0x6C /* Calling Party Number */
305 #define Q2931_IE_CALLING_PARTY_SUBADDR 0x6D /* Calling Party Subaddress */
306 #define Q2931_IE_CALLED_PARTY_NUMBER 0x70 /* Called Party Number */
307 #define Q2931_IE_CALLED_PARTY_SUBADDR 0x71 /* Called Party Subaddress */
308 #define Q2931_IE_TRANSIT_NETWORK_SEL 0x78 /* Transit Network Selection */
309 #define Q2931_IE_RESTART_INDICATOR 0x79
310 #define Q2931_IE_NBAND_LOW_LAYER_COMPAT 0x7C /* Narrowband Low-Layer Compatibility */
311 #define Q2931_IE_NBAND_HIGH_LAYER_COMPAT 0x7D /* Narrowband High-Layer Compatibility */
312 #define Q2931_IE_GENERIC_IDENT_TRANSPORT 0x7F /* Generic identifier transport */
314 static const value_string q2931_info_element_vals[] = {
315 { Q2931_IE_NBAND_BEARER_CAP, "Narrowband bearer capability" },
316 { Q2931_IE_CAUSE, "Cause" },
317 { Q2931_IE_CALL_STATE, "Call state" },
318 { Q2931_IE_PROGRESS_INDICATOR, "Progress indicator" },
319 { Q2931_IE_NOTIFICATION_INDICATOR, "Notification indicator" },
320 { Q2931_IE_E2E_TRANSIT_DELAY, "End-to-end transit delay" },
321 { Q2931_IE_ENDPOINT_REFERENCE, "Endpoint reference" },
322 { Q2931_IE_ENDPOINT_STATE, "Endpoint state" },
323 { Q2931_IE_AAL_PARAMETERS, "AAL parameters" },
324 { Q2931_IE_ATM_USER_CELL_RATE, "ATM user cell rate" },
325 { Q2931_IE_CONNECTION_IDENTIFIER, "Connection identifier" },
326 { Q2931_IE_OAM_TRAFFIC_DESCRIPTOR, "OAM traffic descriptor" },
327 { Q2931_IE_QOS_PARAMETER, "Quality of service parameter" },
328 { Q2931_IE_BBAND_HI_LAYER_INFO, "Broadband high-layer information" },
329 { Q2931_IE_BBAND_BEARER_CAP, "Broadband bearer capability" },
330 { Q2931_IE_BBAND_LOW_LAYER_INFO, "Broadband low-layer information" },
331 { Q2931_IE_BBAND_LOCKING_SHIFT, "Broadband locking shift" },
332 { Q2931_IE_BBAND_NLOCKING_SHIFT, "Broadband non-locking shift" },
333 { Q2931_IE_BBAND_SENDING_COMPL, "Broadband sending complete" },
334 { Q2931_IE_BBAND_RPT_INDICATOR, "Broadband repeat indicator" },
335 { Q2931_IE_CALLING_PARTY_NUMBER, "Calling party number" },
336 { Q2931_IE_CALLING_PARTY_SUBADDR, "Calling party subaddress" },
337 { Q2931_IE_CALLED_PARTY_NUMBER, "Called party number" },
338 { Q2931_IE_CALLED_PARTY_SUBADDR, "Called party subaddress" },
339 { Q2931_IE_TRANSIT_NETWORK_SEL, "Transit network selection" },
340 { Q2931_IE_RESTART_INDICATOR, "Restart indicator" },
341 { Q2931_IE_NBAND_LOW_LAYER_COMPAT, "Narrowband low-layer compatibility" },
342 { Q2931_IE_NBAND_HIGH_LAYER_COMPAT, "Narrowband high-layer compatibility" },
343 { Q2931_IE_GENERIC_IDENT_TRANSPORT, "Generic identifier transport" },
347 static value_string_ext q2931_info_element_vals_ext = VALUE_STRING_EXT_INIT(q2931_info_element_vals);
350 * Dissect a locking or non-locking shift information element.
352 static const value_string q2931_codeset_vals[] = {
353 { 0x00, "Q.2931 information elements" },
354 { 0x04, "Information elements for ISO/IEC use" },
355 { 0x05, "Information elements for national use" },
356 { 0x06, "Information elements specific to the local network" },
357 { 0x07, "User-specific information elements" },
361 static const true_false_string tfs_q2931_handling_instructions = { "Follow explicit error handling instructions",
362 "Regular error handling procedures apply" };
365 dissect_q2931_shift_ie(tvbuff_t *tvb, int offset, int len,
366 proto_tree *tree, guint8 info_element)
368 gboolean non_locking_shift;
373 non_locking_shift = (info_element == Q2931_IE_BBAND_NLOCKING_SHIFT);
374 codeset = tvb_get_guint8(tvb, offset) & 0x07;
375 proto_tree_add_uint_format(tree, hf_q2931_locking_codeset, tvb, offset, 1, codeset,
376 "%s shift to codeset %u: %s",
377 (non_locking_shift ? "Non-locking" : "Locking"),
378 codeset, val_to_str(codeset, q2931_codeset_vals, "Unknown (0x%02X)"));
382 * Dissect an ATM adaptation layer parameters information element.
384 #define Q2931_AAL_VOICE 0x00
385 #define Q2931_AAL1 0x01
386 #define Q2931_AAL2 0x02
387 #define Q2931_AAL3_4 0x03
388 #define Q2931_AAL5 0x05
389 #define Q2931_USER_DEFINED_AAL 0x10
391 static const value_string q9231_aal_type_vals[] = {
392 { 0x00, "AAL for voice" },
393 { 0x01, "AAL type 1" },
394 { 0x02, "AAL type 2" },
395 { 0x03, "AAL type 3/4" },
396 { 0x05, "AAL type 5" },
397 { 0x10, "User-defined AAL" },
401 static const value_string q9231_aal1_subtype_vals[] = {
403 { 0x01, "64 kbit/s voice-band signal transport (G.711/G.722)" },
404 { 0x02, "Circuit transport (I.363)" },
405 { 0x03, "Circuit emulation (asynchronous)" },
406 { 0x04, "High-quality audio signal transport (I.363)" },
407 { 0x05, "Video signal transport (I.363)" },
411 #define Q2931_AAL1_nx64_KBIT_S 0x40
412 #define Q2931_AAL1_nx8_KBIT_S 0x41
414 static const value_string q9231_aal1_cbr_rate_vals[] = {
415 { 0x01, "64 kbit/s" },
416 { 0x04, "1544 kbit/s" },
417 { 0x05, "6312 kbit/s" },
418 { 0x06, "32064 kbit/s" },
419 { 0x07, "44736 kbit/s" },
420 { 0x08, "97728 kbit/s" },
421 { 0x10, "2048 kbit/s" },
422 { 0x11, "8448 kibt/s" },
423 { 0x12, "34368 kbit/s" },
424 { 0x13, "139264 kbit/s" },
425 { Q2931_AAL1_nx64_KBIT_S, "nx64 kbit/s" },
426 { Q2931_AAL1_nx8_KBIT_S, "nx8 kbit/s" },
430 static const value_string q2931_aal1_src_clk_rec_meth_vals[] = {
431 { 0x00, "Null (synchronous circuit transport)" },
432 { 0x01, "SRTS method (asynchronous circuit transport" },
433 { 0x02, "Adaptive clock method" },
437 static const value_string q2931_aal1_err_correction_method_vals[] = {
439 { 0x01, "FEC method for less sensitive signal transport" },
440 { 0x02, "FEC method for delay-sensitive signal transport" },
444 static const value_string q2931_aal_mode_vals[] = {
446 { 0x02, "Streaming" },
450 static const value_string q2931_sscs_type_vals[] = {
452 { 0x01, "Data SSCS based on SSCOP (assured operation)" },
453 { 0x02, "Data SSCS based on SSCOP (non-assured operation)" },
454 { 0x04, "Frame relay SSCS" },
459 dissect_q2931_aal_parameters_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
465 guint32 low_mid, high_mid;
470 aal_type = tvb_get_guint8(tvb, offset);
471 proto_tree_add_item(tree, hf_q2931_aal_type, tvb, offset, 1, ENC_BIG_ENDIAN);
476 * Now get the rest of the IE.
478 if (aal_type == 0x40) {
484 proto_tree_add_item(tree, hf_q2931_user_defined_aal_information, tvb, offset, len, ENC_NA);
489 identifier = tvb_get_guint8(tvb, offset);
490 ti = proto_tree_add_item(tree, hf_q2931_aal_parameter_identifier, tvb, offset, 1, ENC_NA);
493 switch (identifier) {
495 case 0x85: /* Subtype identifier for AAL1 */
498 proto_tree_add_item(tree, hf_q2931_aal1_subtype, tvb, offset, 1, ENC_NA);
503 case 0x86: /* CBR identifier for AAL1 */
506 proto_tree_add_item(tree, hf_q2931_aal1_cbr_rate, tvb, offset, 1, ENC_NA);
511 case 0x87: /* Multiplier identifier for AAL1 */
514 proto_tree_add_item(tree, hf_q2931_aal1_multiplier, tvb, offset, 2, ENC_BIG_ENDIAN);
519 case 0x88: /* Source clock frequency recovery method identifier for AAL1 */
522 proto_tree_add_item(tree, hf_q2931_aal1_source_clock_frequency_recovery_method, tvb, offset, 1, ENC_NA);
527 case 0x89: /* Error correction method identifier for AAL1 */
530 proto_tree_add_item(tree, hf_q2931_aal1_error_correction_method, tvb, offset, 1, ENC_NA);
535 case 0x8A: /* Structured data transfer block size identifier for AAL1 */
538 proto_tree_add_item(tree, hf_q2931_aal1_structured_data_transfer_block_size, tvb, offset, 2, ENC_BIG_ENDIAN);
543 case 0x8B: /* Partially filled cells identifier for AAL1 */
546 value = tvb_get_guint8(tvb, offset);
547 proto_tree_add_uint_format_value(tree, hf_q2931_aal1_partially_filled_cells_method, tvb, offset, 1,
548 value, "%u octets", value);
553 case 0x8C: /* Forward maximum CPCS-SDU size identifier for AAL3/4 and AAL5 */
556 proto_tree_add_item(tree, hf_q2931_aal1_forward_max_cpcs_sdu_size, tvb, offset, 2, ENC_BIG_ENDIAN);
561 case 0x81: /* Backward maximum CPCS-SDU size identifier for AAL3/4 and AAL5 */
564 proto_tree_add_item(tree, hf_q2931_aal1_backward_max_cpcs_sdu_size, tvb, offset, 2, ENC_BIG_ENDIAN);
569 case 0x82: /* MID range identifier for AAL3/4 */
572 low_mid = tvb_get_ntohs(tvb, offset);
573 high_mid = tvb_get_ntohs(tvb, offset + 2);
574 proto_tree_add_uint_format_value(tree, hf_q2931_midrange, tvb, offset, 4, tvb_get_ntohl(tvb, offset),
575 "%u - %u", low_mid, high_mid);
580 case 0x83: /* Mode identifier for AAL3/4 and AAL5 */
583 proto_tree_add_item(tree, hf_q2931_aal1_mode, tvb, offset, 1, ENC_NA);
588 case 0x84: /* SSCS type identifier for AAL3/4 and AAL5 */
591 proto_tree_add_item(tree, hf_q2931_aal1_sscs_type, tvb, offset, 1, ENC_NA);
596 default: /* unknown AAL parameter */
597 expert_add_info(pinfo, ti, &ei_q2931_aal_parameter_identifier);
598 return; /* give up */
604 * Dissect an ATM traffic descriptor information element.
606 #define Q2931_ATM_CR_FW_PEAK_CLP_0 0x82 /* Forward peak cell rate (CLP = 0) */
607 #define Q2931_ATM_CR_BW_PEAK_CLP_0 0x83 /* Backward peak cell rate (CLP = 0) */
608 #define Q2931_ATM_CR_FW_PEAK_CLP_0_1 0x84 /* Forward peak cell rate (CLP = 0 + 1) */
609 #define Q2931_ATM_CR_BW_PEAK_CLP_0_1 0x85 /* Backward peak cell rate (CLP = 0 + 1) */
610 #define Q2931_ATM_CR_FW_SUST_CLP_0 0x88 /* Forward sustainable cell rate (CLP = 0) */
611 #define Q2931_ATM_CR_BW_SUST_CLP_0 0x89 /* Backward sustainable cell rate (CLP = 0) */
612 #define Q2931_ATM_CR_FW_SUST_CLP_0_1 0x90 /* Forward sustainable cell rate (CLP = 0 + 1) */
613 #define Q2931_ATM_CR_BW_SUST_CLP_0_1 0x91 /* Backward sustainable cell rate (CLP = 0 + 1) */
614 #define Q2931_ATM_CR_FW_MAXB_CLP_0 0xA0 /* Forward maximum burst size (CLP = 0) */
615 #define Q2931_ATM_CR_BW_MAXB_CLP_0 0xA1 /* Backward maximum burst size (CLP = 0) */
616 #define Q2931_ATM_CR_FW_MAXB_CLP_0_1 0xB0 /* Forward maximum burst size (CLP = 0 + 1) */
617 #define Q2931_ATM_CR_BW_MAXB_CLP_0_1 0xB1 /* Backward maximum burst size (CLP = 0 + 1) */
618 #define Q2931_ATM_CR_BEST_EFFORT_IND 0xBE /* Best effort indicator */
619 #define Q2931_ATM_CR_TRAFFIC_MGMT_OPT 0xBF /* Traffic management options */
621 static const value_string q2931_atm_td_subfield_vals[] = {
622 { Q2931_ATM_CR_FW_PEAK_CLP_0, "Forward peak cell rate (CLP = 0)" },
623 { Q2931_ATM_CR_BW_PEAK_CLP_0, "Backward peak cell rate (CLP = 0)" },
624 { Q2931_ATM_CR_FW_PEAK_CLP_0_1, "Forward peak cell rate (CLP = 0 + 1)" },
625 { Q2931_ATM_CR_BW_PEAK_CLP_0_1, "Backward peak cell rate (CLP = 0 + 1)" },
626 { Q2931_ATM_CR_FW_SUST_CLP_0, "Forward sustainable cell rate (CLP = 0)" },
627 { Q2931_ATM_CR_BW_SUST_CLP_0, "Backward sustainable cell rate (CLP = 0)" },
628 { Q2931_ATM_CR_FW_SUST_CLP_0_1, "Forward sustainable cell rate (CLP = 0 + 1)" },
629 { Q2931_ATM_CR_BW_SUST_CLP_0_1, "Backward sustainable cell rate (CLP = 0 + 1)" },
630 { Q2931_ATM_CR_FW_MAXB_CLP_0, "Forward maximum burst size (CLP = 0)" },
631 { Q2931_ATM_CR_BW_MAXB_CLP_0, "Backward maximum burst size (CLP = 0)" },
632 { Q2931_ATM_CR_FW_MAXB_CLP_0_1, "Forward maximum burst size (CLP = 0 + 1)" },
633 { Q2931_ATM_CR_BW_MAXB_CLP_0_1, "Backward maximum burst size (CLP = 0 + 1)" },
634 { Q2931_ATM_CR_BEST_EFFORT_IND, "Best effort indicator" },
635 { Q2931_ATM_CR_TRAFFIC_MGMT_OPT,"Traffic management options" },
639 static const unit_name_string units_cells_s = { " cell/s", " cells/s" };
642 dissect_q2931_atm_cell_rate_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
650 identifier = tvb_get_guint8(tvb, offset);
651 ti = proto_tree_add_item(tree, hf_q2931_atm_identifier, tvb, offset, 1, ENC_NA);
653 switch (identifier) {
655 case Q2931_ATM_CR_FW_PEAK_CLP_0:
656 case Q2931_ATM_CR_BW_PEAK_CLP_0:
657 case Q2931_ATM_CR_FW_PEAK_CLP_0_1:
658 case Q2931_ATM_CR_BW_PEAK_CLP_0_1:
659 case Q2931_ATM_CR_FW_SUST_CLP_0:
660 case Q2931_ATM_CR_BW_SUST_CLP_0:
661 case Q2931_ATM_CR_FW_SUST_CLP_0_1:
662 case Q2931_ATM_CR_BW_SUST_CLP_0_1:
663 case Q2931_ATM_CR_FW_MAXB_CLP_0:
664 case Q2931_ATM_CR_BW_MAXB_CLP_0:
665 case Q2931_ATM_CR_FW_MAXB_CLP_0_1:
666 case Q2931_ATM_CR_BW_MAXB_CLP_0_1:
670 value = tvb_get_ntoh24(tvb, offset + 1);
671 proto_tree_add_uint(tree, hf_q2931_atm_identifier_value, tvb, offset+3, 3, value);
676 case Q2931_ATM_CR_BEST_EFFORT_IND:
677 /* Yes, its value *IS* 0xBE.... */
682 case Q2931_ATM_CR_TRAFFIC_MGMT_OPT:
685 proto_tree_add_item(tree, hf_q2931_frame_discard_forward_dir, tvb, offset + 1, 1, ENC_NA);
686 proto_tree_add_item(tree, hf_q2931_frame_discard_backward_dir, tvb, offset + 1, 1, ENC_NA);
687 proto_tree_add_item(tree, hf_q2931_tagging_backward_dir, tvb, offset + 1, 1, ENC_NA);
688 proto_tree_add_item(tree, hf_q2931_tagging_forward_dir, tvb, offset + 1, 1, ENC_NA);
693 default: /* unknown ATM traffic descriptor element */
694 expert_add_info(pinfo, ti, &ei_q2931_atm_identifier);
695 return; /* give up */
701 * Dissect a broadband bearer capability information element.
703 static const value_string q2931_bearer_class_vals[] = {
707 { 0x18, "Transparent VP Service" },
711 static const value_string q2931_transfer_capability_vals[] = {
712 { 0x00, "No bit rate indication" },
713 { 0x01, "No bit rate indication, end-to-end timing required" },
714 { 0x02, "No bit rate indication, end-to-end timing not required" },
716 { 0x05, "CBR, end-to-end timing required" },
717 { 0x06, "CBR, end-to-end timing not required" },
718 { 0x07, "CBR with CLR commitment on CLP=0+1" },
719 { 0x08, "VBR, no timing requirements indication" },
720 { 0x09, "Real time VBR" },
721 { 0x0A, "Non-real time VBR" },
722 { 0x0B, "Non-real time VBR with CLR commitment on CLP=0+1" },
727 static const value_string q2931_susc_clip_vals[] = {
728 { 0x00, "Not susceptible to clipping" },
729 { 0x20, "Susceptible to clipping" },
733 static const value_string q2931_up_conn_config_vals[] = {
734 { 0x00, "Point-to-point" },
735 { 0x01, "Point-to-multipoint" },
740 dissect_q2931_bband_bearer_cap_ie(tvbuff_t *tvb, int offset, int len,
747 octet = tvb_get_guint8(tvb, offset);
748 proto_tree_add_item(tree, hf_q2931_bearer_class, tvb, offset, 1, ENC_BIG_ENDIAN);
754 if (!(octet & Q2931_IE_EXTENSION)) {
755 proto_tree_add_item(tree, hf_q2931_atm_transfer_capability, tvb, offset, 1, ENC_BIG_ENDIAN);
762 proto_tree_add_item(tree, hf_q2931_susceptibility_to_clipping, tvb, offset, 1, ENC_BIG_ENDIAN);
763 proto_tree_add_item(tree, hf_q2931_user_plane_connection_configuration, tvb, offset, 1, ENC_BIG_ENDIAN);
767 * Dissect a broadband high layer information information element.
769 static const value_string q2931_hi_layer_info_type_vals[] = {
771 { 0x01, "User-specific" },
772 { 0x03, "Vendor-specific" },
773 { 0x04, "ITU-T SG 1 B-ISDN teleservice recommendation" },
778 dissect_q2931_bband_hi_layer_info_ie(tvbuff_t *tvb, int offset, int len,
784 proto_tree_add_item(tree, hf_q2931_high_layer_information_type, tvb, offset, 1, ENC_BIG_ENDIAN);
790 * Dissect a Bearer capability or Low-layer compatibility information element.
792 #define Q2931_UIL2_USER_SPEC 0x10
794 static const value_string q2931_uil2_vals[] = {
795 { 0x01, "Basic mode ISO 1745" },
796 { 0x02, "Q.921/I.441" }, /* LAPD */
797 { 0x06, "X.25, link layer" }, /* LAPB */
798 { 0x07, "X.25 multilink" }, /* or 0x0F? */
799 { 0x08, "T.71 Extended LAPB" },
800 { 0x09, "HDLC ARM" },
801 { 0x0A, "HDLC NRM" },
802 { 0x0B, "HDLC ABM" },
803 { 0x0C, "ISO 8802/2 LLC" },
804 { 0x0D, "X.75 Single Link Procedure" },
806 { Q2931_UIL2_USER_SPEC, "User-specified" },
807 { 0x11, "ISO 7776 DTE-DTE operation" },
811 static const value_string q2931_mode_vals[] = {
812 { 0x20, "Normal mode" },
813 { 0x40, "Extended mode" },
817 #define Q2931_UIL3_X25_PL 0x06
818 #define Q2931_UIL3_ISO_8208 0x07 /* X.25-based */
819 #define Q2931_UIL3_X223 0x08 /* X.25-based */
820 #define Q2931_UIL3_TR_9577 0x0B
821 #define Q2931_UIL3_USER_SPEC 0x10
823 static const value_string q2931_uil3_vals[] = {
824 { Q2931_UIL3_X25_PL, "X.25, packet layer" },
825 { Q2931_UIL3_ISO_8208, "ISO/IEC 8208" },
826 { Q2931_UIL3_X223, "X.223/ISO 8878" },
827 { 0x09, "ISO/IEC 8473" },
829 { Q2931_UIL3_TR_9577, "ISO/IEC TR 9577" },
830 { Q2931_UIL3_USER_SPEC, "User-specified" },
834 static const value_string lane_pid_vals[] = {
835 { 0x0001, "LE Configuration Direct/Control Direct/Control Distribute" },
836 { 0x0002, "Ethernet/IEEE 002.3 LE Data Direct" },
837 { 0x0003, "IEEE 802.5 LE Data Direct" },
838 { 0x0004, "Ethernet/IEEE 802.3 LE Multicast Send/Multicast Forward" },
839 { 0x0005, "IEEE 802.5 LE Multicast Send/Multicast Forward" },
844 * Dissect a broadband low layer information information element.
847 dissect_q2931_bband_low_layer_info_ie(tvbuff_t *tvb, int offset, int len,
851 guint8 uil2_protocol;
852 guint8 uil3_protocol;
854 guint32 organization_code;
858 octet = tvb_get_guint8(tvb, offset);
859 if ((octet & 0x60) == 0x20) {
861 * Layer 1 information.
863 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_info_l1_proto, tvb, offset, 1, ENC_BIG_ENDIAN);
870 octet = tvb_get_guint8(tvb, offset);
871 if ((octet & 0x60) == 0x40) {
873 * Layer 2 information.
875 uil2_protocol = octet & 0x1F;
876 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_info_l2_proto, tvb, offset, 1, ENC_BIG_ENDIAN);
880 if (octet & Q2931_IE_EXTENSION)
884 octet = tvb_get_guint8(tvb, offset);
885 if (uil2_protocol == Q2931_UIL2_USER_SPEC) {
886 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_specified_l2_proto, tvb, offset, 1, ENC_BIG_ENDIAN);
888 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
893 if (octet & Q2931_IE_EXTENSION)
897 octet = tvb_get_guint8(tvb, offset);
898 proto_tree_add_uint_format_value(tree, hf_q2931_bband_low_layer_info_window_size, tvb, offset, 1,
899 octet & 0x7F, "%u k", octet & 0x7F);
908 octet = tvb_get_guint8(tvb, offset);
909 if ((octet & 0x60) == 0x60) {
911 * Layer 3 information.
913 uil3_protocol = octet & 0x1F;
914 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_user_info_l3_proto, tvb, offset, 1, ENC_BIG_ENDIAN);
920 * XXX - only in Low-layer compatibility information element.
922 if (octet & Q2931_IE_EXTENSION)
926 octet = tvb_get_guint8(tvb, offset);
927 switch (uil3_protocol) {
929 case Q2931_UIL3_X25_PL:
930 case Q2931_UIL3_ISO_8208:
931 case Q2931_UIL3_X223:
932 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
936 if (octet & Q2931_IE_EXTENSION)
940 octet = tvb_get_guint8(tvb, offset);
941 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_default_packet_size, tvb, offset, 1, ENC_BIG_ENDIAN);
945 if (octet & Q2931_IE_EXTENSION)
949 proto_tree_add_item(tree, hf_q2931_bband_low_layer_info_packet_window_size, tvb, offset, 1, ENC_BIG_ENDIAN);
954 case Q2931_UIL3_USER_SPEC:
955 proto_tree_add_uint(tree, hf_q2931_bband_low_layer_info_default_packet_size, tvb, offset, 1, 1 << (octet & 0x0F));
960 case Q2931_UIL3_TR_9577:
961 add_l3_info = (octet & 0x7F) << 1;
962 if (octet & Q2931_IE_EXTENSION)
966 add_l3_info |= (tvb_get_guint8(tvb, offset + 1) & 0x40) >> 6;
967 proto_tree_add_uint(tree, hf_q2931_bband_low_layer_info_additional_l3_proto, tvb, offset, 2, add_l3_info);
970 if (add_l3_info == NLPID_SNAP) {
975 organization_code = tvb_get_ntoh24(tvb, offset);
976 proto_tree_add_item(tree, hf_q2931_organization_code, tvb, offset, 3, ENC_BIG_ENDIAN);
980 switch (organization_code) {
982 case OUI_ENCAP_ETHER:
983 proto_tree_add_item(tree, hf_q2931_ethernet_type, tvb, offset, 2, ENC_BIG_ENDIAN);
987 proto_tree_add_item(tree, hf_q2931_lane_protocol_id, tvb, offset, 2, ENC_BIG_ENDIAN);
991 proto_tree_add_item(tree, hf_q2931_protocol_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1003 * Dissect a Cause information element.
1005 static const value_string q2931_cause_location_vals[] = {
1006 { 0x00, "User (U)" },
1007 { 0x01, "Private network serving the local user (LPN)" },
1008 { 0x02, "Public network serving the local user (LN)" },
1009 { 0x03, "Transit network (TN)" },
1010 { 0x04, "Public network serving the remote user (RLN)" },
1011 { 0x05, "Private network serving the remote user (RPN)" },
1012 { 0x07, "International network (INTL)" },
1013 { 0x0A, "Network beyond interworking point (BI)" },
1018 * Cause codes for Cause.
1020 #define Q2931_CAUSE_UNALLOC_NUMBER 0x01
1021 #define Q2931_CAUSE_NO_ROUTE_TO_DEST 0x03
1022 #define Q2931_CAUSE_CALL_REJECTED 0x15
1023 #define Q2931_CAUSE_NUMBER_CHANGED 0x16
1024 #define Q2931_CAUSE_CELL_RATE_UNAVAIL 0x25
1025 #define Q2931_CAUSE_ACCESS_INFO_DISC 0x2B
1026 #define Q2931_CAUSE_QOS_UNAVAILABLE 0x31
1027 #define Q2931_CAUSE_CHAN_NONEXISTENT 0x52
1028 #define Q2931_CAUSE_INCOMPATIBLE_DEST 0x58
1029 #define Q2931_CAUSE_MAND_IE_MISSING 0x60
1030 #define Q2931_CAUSE_MT_NONEX_OR_UNIMPL 0x61
1031 #define Q2931_CAUSE_IE_NONEX_OR_UNIMPL 0x63
1032 #define Q2931_CAUSE_INVALID_IE_CONTENTS 0x64
1033 #define Q2931_CAUSE_MSG_INCOMPAT_W_CS 0x65
1034 #define Q2931_CAUSE_REC_TIMER_EXP 0x66
1036 static const value_string q2931_cause_code_vals[] = {
1037 { Q2931_CAUSE_UNALLOC_NUMBER, "Unallocated (unassigned) number" },
1038 { 0x02, "No route to specified transit network" },
1039 { Q2931_CAUSE_NO_ROUTE_TO_DEST, "No route to destination" },
1040 { 0x04, "Send special information tone" },
1041 { 0x05, "Misdialled trunk prefix" },
1042 { 0x06, "Channel unacceptable" },
1043 { 0x07, "Call awarded and being delivered in an established channel" },
1044 { 0x08, "Preemption" },
1045 { 0x09, "Preemption - circuit reserved for reuse" },
1046 { 0x0E, "QoR: ported number" },
1047 { 0x10, "Normal call clearing" },
1048 { 0x11, "User busy" },
1049 { 0x12, "No user responding" },
1050 { 0x13, "No answer from user (user alerted)" },
1051 { 0x14, "Subscriber absent" },
1052 { Q2931_CAUSE_CALL_REJECTED, "Call rejected" },
1053 { Q2931_CAUSE_NUMBER_CHANGED, "Number changed" },
1054 { 0x17, "Redirection to new destination" },
1055 { 0x18, "Call rejected due to feature at the destination" },
1056 { 0x19, "Exchange routing error" },
1057 { 0x1A, "Non-selected user clearing" },
1058 { 0x1B, "Destination out of order" },
1059 { 0x1C, "Invalid number format (incomplete number)" },
1060 { 0x1E, "Response to STATUS ENQUIRY" },
1061 { 0x1F, "Normal unspecified" },
1062 { 0x20, "Too many pending add party request" },
1063 { 0x23, "Requested VPCI/VCI not available" },
1064 { 0x24, "VPCI/VCI assignment failure" },
1065 { Q2931_CAUSE_CELL_RATE_UNAVAIL,"User cell rate not available" },
1066 { 0x26, "Network out of order" },
1067 { 0x27, "Permanent frame mode connection out of service" },
1068 { 0x28, "Permanent frame mode connection operational" },
1069 { 0x29, "Temporary failure" },
1070 { 0x2A, "Switching equipment congestion" },
1071 { Q2931_CAUSE_ACCESS_INFO_DISC, "Access information discarded" },
1072 { 0x2C, "Requested circuit/channel not available" },
1073 { 0x2D, "No VPCI/VCI available" },
1074 { 0x2F, "Resources unavailable, unspecified" },
1075 { Q2931_CAUSE_QOS_UNAVAILABLE, "Quality of service unavailable" },
1076 { 0x32, "Requested facility not subscribed" },
1077 { 0x35, "Outgoing calls barred within CUG" },
1078 { 0x37, "Incoming calls barred within CUG" },
1079 { 0x39, "Bearer capability not authorized" },
1080 { 0x3A, "Bearer capability not presently available" },
1081 { 0x3E, "Inconsistency in designated outgoing access information and subscriber class" },
1082 { 0x3F, "Service or option not available, unspecified" },
1083 { 0x41, "Bearer capability not implemented" },
1084 { 0x42, "Channel type not implemented" },
1085 { 0x45, "Requested facility not implemented" },
1086 { 0x46, "Only restricted digital information bearer capability is available" },
1087 { 0x49, "Unsupported combination of traffic parameters" },
1088 { 0x4E, "AAL parameters cannot be supported" },
1089 { 0x4F, "Service or option not implemented, unspecified" },
1090 { 0x51, "Invalid call reference value" },
1091 { Q2931_CAUSE_CHAN_NONEXISTENT, "Identified channel does not exist" },
1092 { 0x53, "Call identity does not exist for suspended call" },
1093 { 0x54, "Call identity in use" },
1094 { 0x55, "No call suspended" },
1095 { 0x56, "Call having the requested call identity has been cleared" },
1096 { 0x57, "Called user not member of CUG" },
1097 { Q2931_CAUSE_INCOMPATIBLE_DEST,"Incompatible destination" },
1098 { 0x59, "Invalid endpoint reference" },
1099 { 0x5A, "Non-existent CUG" },
1100 { 0x5B, "Invalid transit network selection" },
1101 { 0x5C, "Too many pending ADD PARTY requests" },
1102 { 0x5D, "AAL parameters cannot be supported" },
1103 { 0x5F, "Invalid message, unspecified" },
1104 { Q2931_CAUSE_MAND_IE_MISSING, "Mandatory information element is missing" },
1105 { Q2931_CAUSE_MT_NONEX_OR_UNIMPL,"Message type non-existent or not implemented" },
1106 { 0x62, "Message not compatible with call state or message type non-existent or not implemented" },
1107 { Q2931_CAUSE_IE_NONEX_OR_UNIMPL,"Information element non-existent or not implemented" },
1108 { Q2931_CAUSE_INVALID_IE_CONTENTS,"Invalid information element contents" },
1109 { Q2931_CAUSE_MSG_INCOMPAT_W_CS,"Message not compatible with call state" },
1110 { Q2931_CAUSE_REC_TIMER_EXP, "Recovery on timer expiry" },
1111 { 0x67, "Parameter non-existent or not implemented - passed on" },
1112 { 0x68, "Incorrect message length" },
1113 { 0x6E, "Message with unrecognized parameter discarded" },
1114 { 0x6F, "Protocol error, unspecified" },
1115 { 0x7F, "Internetworking, unspecified" },
1119 static value_string_ext q2931_cause_code_vals_ext = VALUE_STRING_EXT_INIT(q2931_cause_code_vals);
1121 static const value_string q2931_cause_condition_vals[] = {
1122 { 0x00, "Unknown" },
1123 { 0x01, "Permanent" },
1124 { 0x02, "Transient" },
1128 #define Q2931_REJ_USER_SPECIFIC 0x00
1129 #define Q2931_REJ_IE_MISSING 0x04
1130 #define Q2931_REJ_IE_INSUFFICIENT 0x08
1132 static const value_string q2931_rejection_reason_vals[] = {
1133 { 0x00, "User specific" },
1134 { 0x04, "Information element missing" },
1135 { 0x08, "Information element contents are not sufficient" },
1139 static const true_false_string tfs_user_provider = { "User", "Provider" };
1140 static const true_false_string tfs_abnormal_normal = { "Abnormal", "Normal" };
1143 dissect_q2931_cause_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
1148 guint8 rejection_reason;
1149 guint8 info_element;
1150 guint8 info_element_ext;
1151 guint16 info_element_len;
1155 proto_tree_add_item(tree, hf_q2931_cause_location, tvb, offset, 1, ENC_BIG_ENDIAN);
1161 octet = tvb_get_guint8(tvb, offset);
1162 cause_value = octet & 0x7F;
1163 proto_tree_add_item(tree, hf_q2931_cause_value, tvb, offset, 1, ENC_BIG_ENDIAN);
1169 switch (cause_value) {
1171 case Q2931_CAUSE_UNALLOC_NUMBER:
1172 case Q2931_CAUSE_NO_ROUTE_TO_DEST:
1173 case Q2931_CAUSE_QOS_UNAVAILABLE:
1174 proto_tree_add_item(tree, hf_q2931_cause_network_service, tvb, offset, 1, ENC_NA);
1175 proto_tree_add_item(tree, hf_q2931_cause_network_behavior, tvb, offset, 1, ENC_NA);
1176 proto_tree_add_item(tree, hf_q2931_cause_rejection_condition, tvb, offset, 1, ENC_NA);
1179 case Q2931_CAUSE_CALL_REJECTED:
1180 rejection_reason = octet & 0x7C;
1181 proto_tree_add_item(tree, hf_q2931_cause_rejection_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
1182 proto_tree_add_item(tree, hf_q2931_cause_rejection_condition, tvb, offset, 1, ENC_BIG_ENDIAN);
1188 switch (rejection_reason) {
1190 case Q2931_REJ_USER_SPECIFIC:
1191 proto_tree_add_item(tree, hf_q2931_cause_rejection_user_specific_diagnostic, tvb, offset, len, ENC_NA);
1194 case Q2931_REJ_IE_MISSING:
1195 proto_tree_add_item(tree, hf_q2931_cause_rejection_missing_information_element, tvb, offset, 1, ENC_BIG_ENDIAN);
1198 case Q2931_REJ_IE_INSUFFICIENT:
1199 proto_tree_add_item(tree, hf_q2931_cause_rejection_insufficient_information_element, tvb, offset, 1, ENC_BIG_ENDIAN);
1203 proto_tree_add_item(tree, hf_q2931_cause_rejection_diagnostic, tvb, offset, len, ENC_NA);
1208 case Q2931_CAUSE_NUMBER_CHANGED:
1210 * UNI 3.1 claims this "is formatted as the called party
1211 * number information element, including information
1212 * element identifier.
1214 info_element = tvb_get_guint8(tvb, offset);
1215 info_element_ext = tvb_get_guint8(tvb, offset + 1);
1216 info_element_len = tvb_get_ntohs(tvb, offset + 2);
1217 dissect_q2931_ie(tvb, pinfo, offset, info_element_len, tree,
1218 info_element, info_element_ext);
1221 case Q2931_CAUSE_ACCESS_INFO_DISC:
1222 case Q2931_CAUSE_INCOMPATIBLE_DEST:
1223 case Q2931_CAUSE_MAND_IE_MISSING:
1224 case Q2931_CAUSE_IE_NONEX_OR_UNIMPL:
1225 case Q2931_CAUSE_INVALID_IE_CONTENTS:
1227 proto_tree_add_item(tree, hf_q2931_cause_information_element, tvb, offset, 1, ENC_BIG_ENDIAN);
1233 case Q2931_CAUSE_CELL_RATE_UNAVAIL:
1235 proto_tree_add_item(tree, hf_q2931_cause_cell_rate_subfield_identifier, tvb, offset, 1, ENC_BIG_ENDIAN);
1241 case Q2931_CAUSE_CHAN_NONEXISTENT:
1244 proto_tree_add_item(tree, hf_q2931_cause_vpci, tvb, offset, 2, ENC_BIG_ENDIAN);
1250 proto_tree_add_item(tree, hf_q2931_cause_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
1253 case Q2931_CAUSE_MT_NONEX_OR_UNIMPL:
1254 case Q2931_CAUSE_MSG_INCOMPAT_W_CS:
1255 proto_tree_add_item(tree, hf_q2931_cause_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1258 case Q2931_CAUSE_REC_TIMER_EXP:
1261 proto_tree_add_item(tree, hf_q2931_cause_timer, tvb, offset, 3, ENC_ASCII|ENC_NA);
1265 proto_tree_add_item(tree, hf_q2931_cause_rejection_diagnostic, tvb, offset, len, ENC_NA);
1270 * Dissect a Call state information element.
1272 static const value_string q2931_call_state_vals[] = {
1274 { 0x01, "Call initiated" },
1275 { 0x02, "Overlap sending" },
1276 { 0x03, "Outgoing call proceeding" },
1277 { 0x04, "Call delivered" },
1278 { 0x06, "Call present" },
1279 { 0x07, "Call received" },
1280 { 0x09, "Connect request" },
1281 { 0x0A, "Incoming call proceeding" },
1283 { 0x0C, "Disconnect request" },
1284 { 0x0F, "Disconnect indication" },
1285 { 0x11, "Suspend request" },
1286 { 0x13, "Resume request" },
1287 { 0x16, "Release request" },
1288 { 0x19, "Overlap receiving" },
1289 { 0x3D, "Restart request" },
1290 { 0x3E, "Restart" },
1295 dissect_q2931_call_state_ie(tvbuff_t *tvb, int offset, int len,
1301 proto_tree_add_item(tree, hf_q2931_call_state, tvb, offset, 1, ENC_BIG_ENDIAN);
1305 * Dissect a (phone) number information element.
1307 static const value_string q2931_number_type_vals[] = {
1308 { 0x00, "Unknown" },
1309 { 0x10, "International number" },
1310 { 0x20, "National number" },
1311 { 0x30, "Network specific number" },
1312 { 0x40, "Subscriber number" },
1313 { 0x60, "Abbreviated number" },
1317 #define Q2931_ISDN_NUMBERING 0x01
1318 #define Q2931_NSAP_ADDRESSING 0x02
1320 static const value_string q2931_numbering_plan_vals[] = {
1321 { 0x00, "Unknown" },
1322 { Q2931_ISDN_NUMBERING, "E.164 ISDN/telephony numbering" },
1323 { Q2931_NSAP_ADDRESSING, "ISO/IEC 8348 NSAP addressing" },
1324 { 0x09, "Private numbering" },
1328 static const value_string q2931_presentation_indicator_vals[] = {
1329 { 0x00, "Presentation allowed" },
1330 { 0x20, "Presentation restricted" },
1331 { 0x40, "Number not available" },
1335 static const value_string q2931_screening_indicator_vals[] = {
1336 { 0x00, "User-provided, not screened" },
1337 { 0x01, "User-provided, verified and passed" },
1338 { 0x02, "User-provided, verified and failed" },
1339 { 0x03, "Network-provided" },
1344 dissect_q2931_number_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
1348 guint8 numbering_plan;
1349 proto_tree *nsap_tree;
1353 octet = tvb_get_guint8(tvb, offset);
1354 proto_tree_add_item(tree, hf_q2931_number_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1355 numbering_plan = octet & 0x0F;
1356 proto_tree_add_item(tree, hf_q2931_number_plan, tvb, offset, 1, ENC_BIG_ENDIAN);
1360 if (!(octet & Q2931_IE_EXTENSION)) {
1364 proto_tree_add_item(tree, hf_q2931_number_presentation_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1365 proto_tree_add_item(tree, hf_q2931_number_screening_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1372 switch (numbering_plan) {
1374 case Q2931_ISDN_NUMBERING:
1375 proto_tree_add_item(tree, hf_q2931_number_string, tvb, offset, len, ENC_ASCII|ENC_NA);
1378 case Q2931_NSAP_ADDRESSING:
1380 proto_tree_add_item(tree, hf_q2931_nsap_address_number_short, tvb, offset, len, ENC_NA);
1383 nsap_tree = proto_tree_add_subtree(tree, tvb, offset, len, ett_q2931_nsap, NULL, "Number");
1384 dissect_atm_nsap(tvb, pinfo, offset, len, nsap_tree);
1388 proto_tree_add_item(tree, hf_q2931_number_bytes, tvb, offset, len, ENC_NA);
1394 * Dissect a party subaddress information element.
1396 static const value_string q2931_subaddress_type_vals[] = {
1397 { 0x00, "X.213/ISO 8348 NSAP" },
1398 { 0x10, "User-specified ATM endsystem address" },
1399 { 0x20, "User-specified" },
1403 static const value_string q2931_odd_even_indicator_vals[] = {
1404 { 0x00, "Even number of address signals" },
1405 { 0x10, "Odd number of address signals" },
1410 dissect_q2931_party_subaddr_ie(tvbuff_t *tvb, int offset, int len,
1416 proto_tree_add_item(tree, hf_q2931_party_subaddr_type_of_subaddress, tvb, offset, 1, ENC_BIG_ENDIAN);
1417 proto_tree_add_item(tree, hf_q2931_party_subaddr_odd_even_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1423 proto_tree_add_item(tree, hf_q2931_party_subaddr_subaddress, tvb, offset, len, ENC_NA);
1427 * Dissect a connection identifier information element.
1429 static const value_string q2931_vp_associated_signalling_vals[] = {
1431 { 0x08, "No - explicit indication of VPCI" },
1435 static const value_string q2931_preferred_exclusive_vals[] = {
1436 { 0x00, "Exclusive VPCI; exclusive VCI" },
1437 { 0x01, "Exclusive VPCI; any VCI" },
1438 { 0x04, "Exclusive VPCI; no VCI" },
1443 dissect_q2931_connection_identifier_ie(tvbuff_t *tvb, int offset, int len,
1449 proto_tree_add_item(tree, hf_q2931_conn_id_vp_associated_signalling, tvb, offset, 1, ENC_BIG_ENDIAN);
1450 proto_tree_add_item(tree, hf_q2931_conn_id_preferred_exclusive, tvb, offset, 1, ENC_BIG_ENDIAN);
1456 proto_tree_add_item(tree, hf_q2931_conn_id_vpci, tvb, offset, 2, ENC_BIG_ENDIAN);
1462 proto_tree_add_item(tree, hf_q2931_conn_id_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
1466 * Dissect an End-to-end transit delay information element.
1469 dissect_q2931_e2e_transit_delay_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len, proto_tree *tree)
1476 ti = proto_tree_add_item(tree, hf_q2931_e2e_transit_delay_identifier, tvb, offset, 1, ENC_BIG_ENDIAN);
1477 identifier = tvb_get_guint8(tvb, offset);
1479 value = tvb_get_ntohs(tvb, offset);
1481 switch (identifier) {
1483 case 0x01: /* Cumulative transit delay identifier */
1484 proto_tree_add_uint(tree, hf_q2931_e2e_transit_delay_cumulative, tvb, offset, 2, value);
1487 case 0x03: /* Maximum transit delay identifier */
1488 if (value == 0xFFFF) {
1489 proto_tree_add_uint_format_value(tree, hf_q2931_e2e_transit_delay_maximum_end_to_end, tvb, offset, 2,
1490 value, "Any end-to-end transit delay value acceptable");
1492 proto_tree_add_uint_format_value(tree, hf_q2931_e2e_transit_delay_maximum_end_to_end, tvb, offset, 2,
1493 value, "%u ms", value);
1497 default: /* Unknown transit delay identifier */
1498 expert_add_info(pinfo, ti, &ei_q2931_e2e_transit_delay_identifier);
1499 return; /* give up */
1505 * Dissect a Quality of Service parameter information element.
1507 static const value_string q2931_qos_parameter_vals[] = {
1508 { 0x00, "Unspecified QOS class" },
1513 dissect_q2931_qos_parameter_ie(tvbuff_t *tvb, int offset, int len,
1519 proto_tree_add_item(tree, hf_q2931_qos_class_forward, tvb, offset, 1, ENC_BIG_ENDIAN);
1525 proto_tree_add_item(tree, hf_q2931_qos_class_backward, tvb, offset, 1, ENC_BIG_ENDIAN);
1529 * Dissect a broadband repeat indicator.
1531 static const value_string q2931_bband_rpt_indicator_vals[] = {
1532 { 0x02, "Prioritized list for selecting one possibility (descending order)" },
1537 dissect_q2931_bband_rpt_indicator(tvbuff_t *tvb, int offset, int len,
1543 proto_tree_add_item(tree, hf_q2931_broadband_repeat_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1547 * Dissect a restart indicator.
1549 static const value_string q2931_class_vals[] = {
1550 { 0x00, "Indicated VC" },
1551 { 0x01, "All VC's in the indicated VPC controlled via this channel" },
1552 { 0x02, "All VC's controlled by the L3 entity that sent this message" },
1557 dissect_q2931_restart_indicator(tvbuff_t *tvb, int offset, int len,
1563 proto_tree_add_item(tree, hf_q2931_restart_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1567 * Dissect an broadband sending complete information element.
1570 dissect_q2931_bband_sending_compl_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
1577 ti = proto_tree_add_item(tree, hf_q2931_bband_sending_complete_id, tvb, offset, 1, ENC_BIG_ENDIAN);
1578 identifier = tvb_get_guint8(tvb, offset);
1579 switch (identifier) {
1581 case 0xA1: /* Sending complete indication */
1582 proto_tree_add_item(tree, hf_q2931_bband_sending_complete, tvb, offset, 1, ENC_NA);
1587 default: /* unknown broadband sending complete element */
1588 expert_add_info(pinfo, ti, &ei_q2931_bband_sending_complete_id);
1589 return; /* give up */
1595 * Dissect a Transit network selection information element.
1597 static const value_string q2931_netid_type_vals[] = {
1598 { 0x00, "User specified" },
1599 { 0x20, "National network identification" },
1600 { 0x30, "International network identification" },
1604 static const value_string q2931_netid_plan_vals[] = {
1605 { 0x00, "Unknown" },
1606 { 0x01, "Carrier Identification Code" },
1607 { 0x03, "X.121 data network identification code" },
1612 dissect_q2931_transit_network_sel_ie(tvbuff_t *tvb, int offset, int len,
1618 proto_tree_add_item(tree, hf_q2931_transit_network_sel_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1619 proto_tree_add_item(tree, hf_q2931_transit_network_sel_plan, tvb, offset, 1, ENC_BIG_ENDIAN);
1625 proto_tree_add_item(tree, hf_q2931_transit_network_sel_network_id, tvb, offset, len, ENC_NA|ENC_ASCII);
1629 * Dissect an OAM traffic descriptor information element.
1631 static const value_string q2931_shaping_indicator_vals[] = {
1632 { 0x00, "No user specified requirement" },
1633 { 0x20, "Aggregate shaping of user and OAM cells not allowed" },
1637 static const value_string q2931_user_net_fault_mgmt_vals[] = {
1638 { 0x00, "No user-originated fault management indications" },
1639 { 0x01, "User-originated fault management indications, cell rate 1 cell/s" },
1643 static const value_string q2931_fwd_e2e_oam_f5_flow_indicator_vals[] = {
1644 { 0x00, "0% of the forward cell rate" },
1645 { 0x10, "0.1% of the forward cell rate" },
1646 { 0x40, "1% of the forward cell rate" },
1650 static const value_string q2931_bwd_e2e_oam_f5_flow_indicator_vals[] = {
1651 { 0x00, "0% of the backward cell rate" },
1652 { 0x01, "0.1% of the backward cell rate" },
1653 { 0x04, "1% of the backward cell rate" },
1657 static const true_false_string tfs_mandatory_optional = { "Mandatory", "Optional" };
1660 dissect_q2931_oam_traffic_descriptor_ie(tvbuff_t *tvb, int offset, int len,
1666 proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_shaping_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1667 proto_tree_add_item(tree, hf_q2931_oam_end_to_end_f5_flow, tvb, offset, 1, ENC_BIG_ENDIAN);
1668 proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_management_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1675 proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1676 proto_tree_add_item(tree, hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
1680 * Dissect an Endpoint reference information element.
1682 static const value_string q2931_endpoint_reference_type_vals[] = {
1683 { 0x00, "Locally defined integer" },
1687 static const true_false_string tfs_endpoint_reference_flag = { "Message sent to side that originates the endpoint reference",
1688 "Message sent from side that originates the endpoint reference" };
1691 dissect_q2931_endpoint_reference_ie(tvbuff_t *tvb, int offset, int len,
1697 proto_tree_add_item(tree, hf_q2931_endpoint_reference_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1704 proto_tree_add_item(tree, hf_q2931_endpoint_reference_flag, tvb, offset, 2, ENC_BIG_ENDIAN);
1705 proto_tree_add_item(tree, hf_q2931_endpoint_reference_identifier_value, tvb, offset, 2, ENC_BIG_ENDIAN);
1709 * Dissect an Endpoint state information element.
1711 static const value_string q2931_endpoint_reference_party_state_vals[] = {
1713 { 0x01, "ADD PARTY initiated" },
1714 { 0x06, "ADD PARTY received" },
1715 { 0x0B, "DROP PARTY initiated" },
1716 { 0x0C, "DROP PARTY received" },
1722 dissect_q2931_endpoint_state_ie(tvbuff_t *tvb, int offset, int len,
1728 proto_tree_add_item(tree, hf_q2931_endpoint_state, tvb, offset, 1, ENC_BIG_ENDIAN);
1732 dissect_q2931_ie_contents(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
1733 proto_tree *tree, guint8 info_element)
1735 switch (info_element) {
1737 case Q2931_IE_BBAND_LOCKING_SHIFT:
1738 case Q2931_IE_BBAND_NLOCKING_SHIFT:
1739 dissect_q2931_shift_ie(tvb, offset, len, tree, info_element);
1742 case Q2931_IE_NBAND_BEARER_CAP:
1743 case Q2931_IE_NBAND_LOW_LAYER_COMPAT:
1744 dissect_q931_bearer_capability_ie(tvb, offset, len, tree);
1747 case Q2931_IE_NBAND_HIGH_LAYER_COMPAT:
1748 dissect_q931_high_layer_compat_ie(tvb, offset, len, tree);
1751 case Q2931_IE_PROGRESS_INDICATOR:
1752 dissect_q931_progress_indicator_ie(tvb, offset, len, tree);
1755 case Q2931_IE_AAL_PARAMETERS:
1756 dissect_q2931_aal_parameters_ie(tvb, pinfo, offset, len, tree);
1759 case Q2931_IE_ATM_USER_CELL_RATE:
1760 dissect_q2931_atm_cell_rate_ie(tvb, pinfo, offset, len, tree);
1763 case Q2931_IE_BBAND_BEARER_CAP:
1764 dissect_q2931_bband_bearer_cap_ie(tvb, offset, len, tree);
1767 case Q2931_IE_BBAND_HI_LAYER_INFO:
1768 dissect_q2931_bband_hi_layer_info_ie(tvb, offset, len, tree);
1771 case Q2931_IE_BBAND_LOW_LAYER_INFO:
1772 dissect_q2931_bband_low_layer_info_ie(tvb, offset, len, tree);
1775 case Q2931_IE_CALL_STATE:
1776 dissect_q2931_call_state_ie(tvb, offset, len, tree);
1779 case Q2931_IE_CALLED_PARTY_NUMBER:
1780 case Q2931_IE_CALLING_PARTY_NUMBER:
1781 dissect_q2931_number_ie(tvb, pinfo, offset, len, tree);
1784 case Q2931_IE_CALLED_PARTY_SUBADDR:
1785 case Q2931_IE_CALLING_PARTY_SUBADDR:
1786 dissect_q2931_party_subaddr_ie(tvb, offset, len, tree);
1789 case Q2931_IE_CAUSE:
1790 dissect_q2931_cause_ie(tvb, pinfo, offset, len, tree);
1793 case Q2931_IE_CONNECTION_IDENTIFIER:
1794 dissect_q2931_connection_identifier_ie(tvb, offset, len, tree);
1797 case Q2931_IE_E2E_TRANSIT_DELAY:
1798 dissect_q2931_e2e_transit_delay_ie(tvb, pinfo, offset, len, tree);
1801 case Q2931_IE_QOS_PARAMETER:
1802 dissect_q2931_qos_parameter_ie(tvb, offset, len, tree);
1805 case Q2931_IE_BBAND_RPT_INDICATOR:
1806 dissect_q2931_bband_rpt_indicator(tvb, offset, len, tree);
1809 case Q2931_IE_RESTART_INDICATOR:
1810 dissect_q2931_restart_indicator(tvb, offset, len, tree);
1813 case Q2931_IE_BBAND_SENDING_COMPL:
1814 dissect_q2931_bband_sending_compl_ie(tvb, pinfo, offset, len, tree);
1817 case Q2931_IE_TRANSIT_NETWORK_SEL:
1818 dissect_q2931_transit_network_sel_ie(tvb, offset, len, tree);
1821 case Q2931_IE_OAM_TRAFFIC_DESCRIPTOR:
1822 dissect_q2931_oam_traffic_descriptor_ie(tvb, offset, len, tree);
1825 case Q2931_IE_ENDPOINT_REFERENCE:
1826 dissect_q2931_endpoint_reference_ie(tvb, offset, len, tree);
1829 case Q2931_IE_ENDPOINT_STATE:
1830 dissect_q2931_endpoint_state_ie(tvb, offset, len, tree);
1836 dissect_q2931_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len, proto_tree *tree,
1837 guint8 info_element, guint8 info_element_ext)
1840 proto_tree *ie_tree;
1841 proto_tree *ie_ext_tree;
1843 ie_tree = proto_tree_add_subtree(tree, tvb, offset, 1+1+2+len, ett_q2931_ie, NULL,
1844 val_to_str_ext(info_element, &q2931_info_element_vals_ext,
1845 "Unknown information element (0x%02X)"));
1846 proto_tree_add_uint(ie_tree, hf_q2931_information_element, tvb, offset, 1, info_element);
1847 ti = proto_tree_add_uint(ie_tree, hf_q2931_information_element_extension, tvb, offset + 1, 1, info_element_ext);
1848 ie_ext_tree = proto_item_add_subtree(ti, ett_q2931_ie_ext);
1849 proto_tree_add_item(ie_ext_tree, hf_q2931_ie_coding_standard, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1850 proto_tree_add_item(ie_ext_tree, hf_q2931_ie_handling_instructions, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1851 if (info_element_ext & Q2931_IE_COMPAT_FOLLOW_INST) {
1852 proto_tree_add_item(ie_ext_tree, hf_q2931_ie_action_indicator, tvb, offset+1, 1, ENC_BIG_ENDIAN);
1854 proto_tree_add_uint(ie_tree, hf_q2931_information_element_length, tvb, offset + 2, 2, len);
1856 if ((info_element_ext & Q2931_IE_COMPAT_CODING_STD)
1857 == Q2931_ITU_STANDARDIZED_CODING) {
1858 dissect_q2931_ie_contents(tvb, pinfo, offset + 4,
1859 len, ie_tree, info_element);
1862 * We don't know how it's encoded, so just
1863 * dump it as data and be done with it.
1865 proto_tree_add_item(ie_tree, hf_q2931_information_element_data, tvb, offset + 4, len, ENC_NA);
1870 dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
1873 proto_tree *q2931_tree = NULL;
1875 guint8 call_ref_len;
1876 guint8 call_ref[16];
1877 guint8 message_type;
1878 guint8 message_type_ext;
1879 guint16 message_len;
1880 guint8 info_element;
1881 guint8 info_element_ext;
1882 guint16 info_element_len;
1885 gboolean non_locking_shift;
1887 static const int * ext_flags[] = {
1888 &hf_q2931_message_flag,
1891 static const int * ext_flags_follow_inst[] = {
1892 &hf_q2931_message_flag,
1893 &hf_q2931_message_action_indicator,
1897 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.2931");
1900 ti = proto_tree_add_item(tree, proto_q2931, tvb, offset, -1,
1902 q2931_tree = proto_item_add_subtree(ti, ett_q2931);
1904 proto_tree_add_uint(q2931_tree, hf_q2931_discriminator, tvb, offset, 1, tvb_get_guint8(tvb, offset));
1907 call_ref_len = tvb_get_guint8(tvb, offset) & 0xF; /* XXX - do as a bit field? */
1908 if (q2931_tree != NULL)
1909 proto_tree_add_uint(q2931_tree, hf_q2931_call_ref_len, tvb, offset, 1, call_ref_len);
1911 if (call_ref_len != 0) {
1912 tvb_memcpy(tvb, call_ref, offset, call_ref_len);
1913 proto_tree_add_boolean(q2931_tree, hf_q2931_call_ref_flag,
1914 tvb, offset, 1, (call_ref[0] & 0x80) != 0);
1915 call_ref[0] &= 0x7F;
1916 proto_tree_add_bytes(q2931_tree, hf_q2931_call_ref, tvb, offset, call_ref_len, call_ref);
1917 offset += call_ref_len;
1919 message_type = tvb_get_guint8(tvb, offset);
1920 col_add_str(pinfo->cinfo, COL_INFO,
1921 val_to_str_ext(message_type, &q2931_message_type_vals_ext,
1922 "Unknown message type (0x%02X)"));
1924 proto_tree_add_uint(q2931_tree, hf_q2931_message_type, tvb, offset, 1, message_type);
1927 message_type_ext = tvb_get_guint8(tvb, offset);
1928 if (message_type_ext & Q2931_MSG_TYPE_EXT_FOLLOW_INST) {
1929 proto_tree_add_bitmask(q2931_tree, tvb, offset, hf_q2931_message_type_ext, ett_q2931_ext, ext_flags_follow_inst, ENC_NA);
1931 proto_tree_add_bitmask(q2931_tree, tvb, offset, hf_q2931_message_type_ext, ett_q2931_ext, ext_flags, ENC_NA);
1935 message_len = tvb_get_ntohs(tvb, offset);
1936 if (q2931_tree != NULL)
1937 proto_tree_add_uint(q2931_tree, hf_q2931_message_len, tvb, offset, 2, message_len);
1941 * And now for the information elements....
1944 codeset = 0; /* start out in codeset 0 */
1945 non_locking_shift = TRUE;
1947 while (tvb_reported_length_remaining(tvb, offset) > 0) {
1948 info_element = tvb_get_guint8(tvb, offset);
1949 info_element_ext = tvb_get_guint8(tvb, offset + 1);
1950 info_element_len = tvb_get_ntohs(tvb, offset + 2);
1951 if (q2931_tree != NULL) {
1952 dissect_q2931_ie(tvb, pinfo, offset, info_element_len,
1953 q2931_tree, info_element, info_element_ext);
1955 #if 0 /* XXX: Is codeset & etc supposed to be used somehow ? */
1956 if (non_locking_shift)
1961 switch (info_element) {
1963 case Q2931_IE_BBAND_LOCKING_SHIFT:
1964 if (info_element_len >= 1) {
1965 non_locking_shift = FALSE;
1966 codeset = tvb_get_guint8(tvb, offset + 4) & 0x07;
1970 case Q2931_IE_BBAND_NLOCKING_SHIFT:
1971 if (info_element_len >= 1) {
1972 non_locking_shift = TRUE;
1973 codeset = tvb_get_guint8(tvb, offset + 4) & 0x07;
1978 offset += 1 + 1 + 2 + info_element_len;
1980 return tvb_captured_length(tvb);
1984 proto_register_q2931(void)
1986 static hf_register_info hf[] = {
1987 { &hf_q2931_discriminator,
1988 { "Protocol discriminator", "q2931.disc",
1989 FT_UINT8, BASE_HEX, NULL, 0x0,
1993 { &hf_q2931_call_ref_len,
1994 { "Call reference value length", "q2931.call_ref_len",
1995 FT_UINT8, BASE_DEC, NULL, 0x0,
1999 { &hf_q2931_call_ref_flag,
2000 { "Call reference flag", "q2931.call_ref_flag",
2001 FT_BOOLEAN, BASE_NONE, TFS(&tfs_call_ref_flag), 0x0,
2005 { &hf_q2931_call_ref,
2006 { "Call reference value", "q2931.call_ref",
2007 FT_BYTES, BASE_NONE, NULL, 0x0,
2011 { &hf_q2931_message_type,
2012 { "Message type", "q2931.message_type",
2013 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_message_type_vals_ext, 0x0,
2017 { &hf_q2931_message_type_ext,
2018 { "Message type extension", "q2931.message_type_ext",
2019 FT_UINT8, BASE_HEX, NULL, 0x0,
2023 { &hf_q2931_message_flag,
2024 { "Flag", "q2931.message_flag",
2025 FT_BOOLEAN, 8, TFS(&tos_msg_flag), Q2931_MSG_TYPE_EXT_FOLLOW_INST,
2029 { &hf_q2931_message_action_indicator,
2030 { "Action indicator", "q2931.message_action_indicator",
2031 FT_UINT8, BASE_DEC, VALS(msg_action_ind_vals), Q2931_MSG_TYPE_EXT_ACTION_IND,
2035 { &hf_q2931_message_len,
2036 { "Message length", "q2931.message_len",
2037 FT_UINT16, BASE_DEC, NULL, 0x0,
2041 { &hf_q2931_ie_handling_instructions,
2042 { "Handling Instructions", "q2931.ie_handling_instructions",
2043 FT_BOOLEAN, 8, TFS(&tfs_q2931_handling_instructions), Q2931_IE_COMPAT_FOLLOW_INST,
2047 { &hf_q2931_ie_coding_standard,
2048 { "Coding standard", "q2931.ie_coding_standard",
2049 FT_UINT8, BASE_DEC, VALS(coding_std_vals), Q2931_IE_COMPAT_CODING_STD,
2053 { &hf_q2931_ie_action_indicator,
2054 { "Action indicator", "q2931.ie_action_indicator",
2055 FT_UINT8, BASE_DEC, VALS(ie_action_ind_vals), Q2931_IE_COMPAT_ACTION_IND,
2059 /* Generated from convert_proto_tree_add_text.pl */
2060 { &hf_q2931_aal_type,
2061 { "AAL type", "q2931.aal_type",
2062 FT_UINT8, BASE_HEX, VALS(q9231_aal_type_vals), 0x0,
2065 { &hf_q2931_user_defined_aal_information,
2066 { "User defined AAL information", "q2931.user_defined_aal_information",
2067 FT_BYTES, BASE_NONE, NULL, 0x0,
2070 { &hf_q2931_aal1_subtype,
2071 { "Subtype", "q2931.aal1.subtype",
2072 FT_UINT8, BASE_HEX, VALS(q9231_aal1_subtype_vals), 0x0,
2075 { &hf_q2931_aal1_cbr_rate,
2076 { "CBR rate", "q2931.aal1.cbr_rate",
2077 FT_UINT8, BASE_HEX, VALS(q9231_aal1_cbr_rate_vals), 0x0,
2080 { &hf_q2931_aal1_multiplier,
2081 { "Multiplier", "q2931.aal1.multiplier",
2082 FT_UINT16, BASE_DEC, NULL, 0x0,
2085 { &hf_q2931_aal1_source_clock_frequency_recovery_method,
2086 { "Source clock frequency recovery method", "q2931.aal1.source_clock_frequency_recovery_method",
2087 FT_UINT8, BASE_HEX, VALS(q2931_aal1_src_clk_rec_meth_vals), 0x0,
2090 { &hf_q2931_aal1_error_correction_method,
2091 { "Error correction method", "q2931.aal1.error_correction_method",
2092 FT_UINT8, BASE_HEX, VALS(q2931_aal1_err_correction_method_vals), 0x0,
2095 { &hf_q2931_aal1_structured_data_transfer_block_size,
2096 { "Structured data transfer block size", "q2931.aal1.structured_data_transfer_block_size",
2097 FT_UINT16, BASE_DEC, NULL, 0x0,
2100 { &hf_q2931_aal1_partially_filled_cells_method,
2101 { "Partially filled cells method", "q2931.aal1.partially_filled_cells_method",
2102 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_octet_octets, 0x0,
2105 { &hf_q2931_aal1_forward_max_cpcs_sdu_size,
2106 { "Forward maximum CPCS-SDU size", "q2931.aal1.forward_max_cpcs_sdu_size",
2107 FT_UINT16, BASE_DEC, NULL, 0x0,
2110 { &hf_q2931_aal1_backward_max_cpcs_sdu_size,
2111 { "Backward maximum CPCS-SDU size", "q2931.aal1.backward_max_cpcs_sdu_size",
2112 FT_UINT16, BASE_DEC, NULL, 0x0,
2115 { &hf_q2931_aal1_mode,
2116 { "Mode", "q2931.aal1.mode",
2117 FT_UINT8, BASE_HEX, VALS(q2931_aal_mode_vals), 0x0,
2120 { &hf_q2931_aal1_sscs_type,
2121 { "SSCS type", "q2931.aal1.sscs_type",
2122 FT_UINT8, BASE_HEX, VALS(q2931_sscs_type_vals), 0x0,
2125 { &hf_q2931_bearer_class,
2126 { "Bearer class", "q2931.bearer_class",
2127 FT_UINT8, BASE_HEX, VALS(q2931_bearer_class_vals), 0x1F,
2130 { &hf_q2931_atm_transfer_capability,
2131 { "ATM Transfer Capability", "q2931.atm_transfer_capability",
2132 FT_UINT8, BASE_HEX, VALS(q2931_transfer_capability_vals), 0x1F,
2135 { &hf_q2931_susceptibility_to_clipping,
2136 { "Susceptibility to clipping", "q2931.susceptibility_to_clipping",
2137 FT_UINT8, BASE_HEX, VALS(q2931_susc_clip_vals), 0x60,
2140 { &hf_q2931_user_plane_connection_configuration,
2141 { "User-plane connection configuration", "q2931.user_plane_connection_configuration",
2142 FT_UINT8, BASE_HEX, VALS(q2931_up_conn_config_vals), 0x03,
2145 { &hf_q2931_high_layer_information_type,
2146 { "High layer information type", "q2931.high_layer_information_type",
2147 FT_UINT8, BASE_HEX, VALS(q2931_hi_layer_info_type_vals), 0x7F,
2150 { &hf_q2931_bband_low_layer_info_user_info_l1_proto,
2151 { "User information layer 1 protocol", "q2931.bband_low_layer_info.user_info_l1_proto",
2152 FT_UINT8, BASE_HEX, NULL, 0x1F,
2155 { &hf_q2931_bband_low_layer_info_user_info_l2_proto,
2156 { "User information layer 2 protocol", "q2931.bband_low_layer_info.user_info_l2_proto",
2157 FT_UINT8, BASE_HEX, VALS(q2931_uil2_vals), 0x1F,
2160 { &hf_q2931_bband_low_layer_info_user_specified_l2_proto,
2161 { "User-specified layer 2 protocol information", "q2931.bband_low_layer_info.user_specified_l2_proto",
2162 FT_UINT8, BASE_HEX, NULL, 0x7F,
2165 { &hf_q2931_bband_low_layer_info_mode,
2166 { "Mode", "q2931.bband_low_layer_info.mode",
2167 FT_UINT8, BASE_HEX, VALS(q2931_mode_vals), 0x60,
2170 { &hf_q2931_bband_low_layer_info_window_size,
2171 { "Window size", "q2931.bband_low_layer_info.window_size",
2172 FT_UINT8, BASE_DEC, NULL, 0x7F,
2175 { &hf_q2931_bband_low_layer_info_user_info_l3_proto,
2176 { "User information layer 3 protocol", "q2931.bband_low_layer_info.user_info_l3_proto",
2177 FT_UINT8, BASE_HEX, VALS(q2931_uil3_vals), 0x1F,
2180 { &hf_q2931_bband_low_layer_info_default_packet_size,
2181 { "Default packet size", "q2931.bband_low_layer_info.default_packet_size",
2182 FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_octet_octets, 0x0F,
2185 { &hf_q2931_bband_low_layer_info_packet_window_size,
2186 { "Packet window size", "q2931.bband_low_layer_info.packet_window_size",
2187 FT_UINT8, BASE_DEC, NULL, 0x7F,
2190 { &hf_q2931_bband_low_layer_info_additional_l3_proto,
2191 { "Additional layer 3 protocol information", "q2931.bband_low_layer_info.additional_l3_proto",
2192 FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0,
2195 { &hf_q2931_organization_code,
2196 { "Organization Code", "q2931.bband_low_layer_info.organization_code",
2197 FT_UINT24, BASE_HEX, VALS(oui_vals), 0x0,
2200 { &hf_q2931_ethernet_type,
2201 { "Ethernet type", "q2931.bband_low_layer_info.ethernet_type",
2202 FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
2205 { &hf_q2931_lane_protocol_id,
2206 { "LANE Protocol ID", "q2931.bband_low_layer_info.lane_protocol_id",
2207 FT_UINT16, BASE_HEX, VALS(lane_pid_vals), 0x0,
2210 { &hf_q2931_protocol_id,
2211 { "Protocol ID", "q2931.bband_low_layer_info.protocol_id",
2212 FT_UINT16, BASE_HEX, NULL, 0x0,
2215 { &hf_q2931_cause_location,
2216 { "Location", "q2931.cause.location",
2217 FT_UINT8, BASE_HEX, VALS(q2931_cause_location_vals), 0x0F,
2220 { &hf_q2931_cause_value,
2221 { "Cause value", "q2931.cause.value",
2222 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_cause_code_vals_ext, 0x7F,
2225 { &hf_q2931_cause_rejection_reason,
2226 { "Rejection reason", "q2931.cause.rejection.reason",
2227 FT_UINT8, BASE_HEX, VALS(q2931_rejection_reason_vals), 0x7C,
2230 { &hf_q2931_cause_rejection_condition,
2231 { "Condition", "q2931.cause.rejection.condition",
2232 FT_UINT8, BASE_HEX, VALS(q2931_cause_condition_vals), 0x03,
2235 { &hf_q2931_cause_rejection_user_specific_diagnostic,
2236 { "User specific diagnostic", "q2931.cause.rejection.user_specific_diagnostic",
2237 FT_BYTES, BASE_NONE, NULL, 0x0,
2240 { &hf_q2931_cause_rejection_missing_information_element,
2241 { "Missing information element", "q2931.cause.rejection.missing_information_element",
2242 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0,
2245 { &hf_q2931_cause_rejection_insufficient_information_element,
2246 { "Insufficient information element", "q2931.cause.rejection.insufficient_information_element",
2247 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0,
2250 { &hf_q2931_cause_rejection_diagnostic,
2251 { "Diagnostic", "q2931.cause.rejection.diagnostic",
2252 FT_BYTES, BASE_NONE, NULL, 0x0,
2255 { &hf_q2931_cause_information_element,
2256 { "Information element", "q2931.cause.information_element",
2257 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0,
2260 { &hf_q2931_cause_cell_rate_subfield_identifier,
2261 { "Cell rate subfield identifier", "q2931.cause.cell_rate_subfield_identifier",
2262 FT_UINT8, BASE_HEX, VALS(q2931_atm_td_subfield_vals), 0x0,
2265 { &hf_q2931_cause_vpci,
2266 { "VPCI", "q2931.cause.vpci",
2267 FT_UINT16, BASE_DEC, NULL, 0x0,
2270 { &hf_q2931_cause_vci,
2271 { "VCI", "q2931.cause.vci",
2272 FT_UINT16, BASE_DEC, NULL, 0x0,
2275 { &hf_q2931_cause_message_type,
2276 { "Message type", "q2931.cause.message_type",
2277 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_message_type_vals_ext, 0x0,
2280 { &hf_q2931_cause_timer,
2281 { "Timer", "q2931.cause.timer",
2282 FT_STRING, BASE_NONE, NULL, 0x0,
2285 { &hf_q2931_call_state,
2286 { "Call state", "q2931.call_state",
2287 FT_UINT8, BASE_HEX, VALS(q2931_call_state_vals), 0x3F,
2290 { &hf_q2931_number_type,
2291 { "Type of number", "q2931.number.type",
2292 FT_UINT8, BASE_HEX, VALS(q2931_number_type_vals), 0x70,
2295 { &hf_q2931_number_plan,
2296 { "Numbering plan", "q2931.number.plan",
2297 FT_UINT8, BASE_HEX, VALS(q2931_numbering_plan_vals), 0x0F,
2300 { &hf_q2931_number_presentation_indicator,
2301 { "Presentation indicator", "q2931.number.presentation_indicator",
2302 FT_UINT8, BASE_HEX, VALS(q2931_presentation_indicator_vals), 0x60,
2305 { &hf_q2931_number_screening_indicator,
2306 { "Screening indicator", "q2931.number.screening_indicator",
2307 FT_UINT8, BASE_HEX, VALS(q2931_screening_indicator_vals), 0x03,
2310 { &hf_q2931_number_string,
2311 { "Number", "q2931.number.string",
2312 FT_STRING, BASE_NONE, NULL, 0x0,
2315 { &hf_q2931_number_bytes,
2316 { "Number", "q2931.number.bytes",
2317 FT_BYTES, BASE_NONE, NULL, 0x0,
2320 { &hf_q2931_party_subaddr_type_of_subaddress,
2321 { "Type of subaddress", "q2931.party_subaddr.type_of_subaddress",
2322 FT_UINT8, BASE_HEX, VALS(q2931_subaddress_type_vals), 0x70,
2325 { &hf_q2931_party_subaddr_odd_even_indicator,
2326 { "Odd/even indicator", "q2931.party_subaddr.odd_even_indicator",
2327 FT_UINT8, BASE_HEX, VALS(q2931_odd_even_indicator_vals), 0x10,
2330 { &hf_q2931_party_subaddr_subaddress,
2331 { "Subaddress", "q2931.party_subaddr.subaddress",
2332 FT_BYTES, BASE_NONE, NULL, 0x0,
2335 { &hf_q2931_conn_id_vp_associated_signalling,
2336 { "VP-associated signalling", "q2931.conn_id.vp_associated_signalling",
2337 FT_UINT8, BASE_HEX, VALS(q2931_vp_associated_signalling_vals), 0x18,
2340 { &hf_q2931_conn_id_preferred_exclusive,
2341 { "Preferred/exclusive", "q2931.conn_id.preferred_exclusive",
2342 FT_UINT8, BASE_HEX, VALS(q2931_preferred_exclusive_vals), 0x07,
2345 { &hf_q2931_conn_id_vpci,
2346 { "VPCI", "q2931.conn_id.vpci",
2347 FT_UINT16, BASE_DEC, NULL, 0x0,
2350 { &hf_q2931_conn_id_vci,
2351 { "VCI", "q2931.conn_id.vci",
2352 FT_UINT16, BASE_DEC, NULL, 0x0,
2355 { &hf_q2931_e2e_transit_delay_cumulative,
2356 { "Cumulative transit delay", "q2931.e2e_transit_delay.cumulative",
2357 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0,
2360 { &hf_q2931_e2e_transit_delay_maximum_end_to_end,
2361 { "Maximum end-to-end transit delay", "q2931.e2e_transit_delay.maximum_end_to_end",
2362 FT_UINT16, BASE_DEC, NULL, 0x0,
2365 { &hf_q2931_qos_class_forward,
2366 { "QOS class forward", "q2931.qos_class_forward",
2367 FT_UINT8, BASE_HEX, VALS(q2931_qos_parameter_vals), 0x0,
2370 { &hf_q2931_qos_class_backward,
2371 { "QOS class backward", "q2931.qos_class_backward",
2372 FT_UINT8, BASE_HEX, VALS(q2931_qos_parameter_vals), 0x0,
2375 { &hf_q2931_broadband_repeat_indicator,
2376 { "Broadband repeat indicator", "q2931.broadband_repeat_indicator",
2377 FT_UINT8, BASE_HEX, VALS(q2931_bband_rpt_indicator_vals), 0x0F,
2380 { &hf_q2931_restart_indicator,
2381 { "Restart indicator", "q2931.restart_indicator",
2382 FT_UINT8, BASE_HEX, VALS(q2931_class_vals), 0x07,
2385 { &hf_q2931_transit_network_sel_type,
2386 { "Type of network identification", "q2931.transit_network_sel.type",
2387 FT_UINT8, BASE_HEX, VALS(q2931_netid_type_vals), 0x70,
2390 { &hf_q2931_transit_network_sel_plan,
2391 { "Network identification plan", "q2931.transit_network_sel.plan",
2392 FT_UINT8, BASE_HEX, VALS(q2931_netid_plan_vals), 0x0F,
2395 { &hf_q2931_transit_network_sel_network_id,
2396 { "Network identification", "q2931.transit_network_sel.network_identification",
2397 FT_STRING, BASE_NONE, NULL, 0x0,
2400 { &hf_q2931_oam_traffic_descriptor_shaping_indicator,
2401 { "Shaping indicator", "q2931.oam_traffic_descriptor.shaping_indicator",
2402 FT_UINT8, BASE_HEX, VALS(q2931_shaping_indicator_vals), 0x60,
2405 { &hf_q2931_oam_end_to_end_f5_flow,
2406 { "Use of end-to-end OAM F5 flow", "q2931.oam_end_to_end_f5_flow",
2407 FT_BOOLEAN, 8, TFS(&tfs_mandatory_optional), 0x10,
2410 { &hf_q2931_oam_traffic_descriptor_management_indicator,
2411 { "User-Network fault management indicator", "q2931.oam_traffic_descriptor.management_indicator",
2412 FT_UINT8, BASE_HEX, VALS(q2931_user_net_fault_mgmt_vals), 0x07,
2415 { &hf_q2931_oam_traffic_descriptor_forward_f5_flow_indicator,
2416 { "Forward end-to-end OAM F5 flow indicator", "q2931.oam_traffic_descriptor.forward_f5_flow_indicator",
2417 FT_UINT8, BASE_HEX, VALS(q2931_fwd_e2e_oam_f5_flow_indicator_vals), 0x70,
2420 { &hf_q2931_oam_traffic_descriptor_backward_f5_flow_indicator,
2421 { "Backward end-to-end OAM F5 flow indicator", "q2931.oam_traffic_descriptor.backward_f5_flow_indicator",
2422 FT_UINT8, BASE_HEX, VALS(q2931_bwd_e2e_oam_f5_flow_indicator_vals), 0x07,
2425 { &hf_q2931_endpoint_reference_type,
2426 { "Endpoint reference type", "q2931.endpoint_reference.type",
2427 FT_UINT8, BASE_HEX, VALS(q2931_endpoint_reference_type_vals), 0x0,
2430 { &hf_q2931_endpoint_reference_flag,
2431 { "Endpoint reference identifier value", "q2931.endpoint_reference.flag",
2432 FT_BOOLEAN, 16, TFS(&tfs_endpoint_reference_flag), 0x8000,
2435 { &hf_q2931_endpoint_reference_identifier_value,
2436 { "Endpoint reference identifier value", "q2931.endpoint_reference.identifier_value",
2437 FT_UINT16, BASE_DEC, NULL, 0x7FFF,
2440 { &hf_q2931_endpoint_state,
2441 { "Endpoint reference party-state", "q2931.endpoint_state",
2442 FT_UINT8, BASE_HEX, VALS(q2931_endpoint_reference_party_state_vals), 0x3F,
2445 { &hf_q2931_information_element,
2446 { "Information element", "q2931.information_element",
2447 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &q2931_info_element_vals_ext, 0x0,
2450 { &hf_q2931_information_element_extension,
2451 { "Information element extension", "q2931.information_element.extension",
2452 FT_UINT8, BASE_HEX, NULL, 0x0,
2455 { &hf_q2931_information_element_length,
2456 { "Length", "q2931.information_element.length",
2457 FT_UINT16, BASE_DEC, NULL, 0x0,
2460 { &hf_q2931_information_element_data,
2461 { "Data", "q2931.information_element.data",
2462 FT_BYTES, BASE_NONE, NULL, 0x0,
2465 { &hf_q2931_frame_discard_forward_dir,
2466 { "Frame discard in forward direction", "q2931.frame_discard_forward_dir",
2467 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x80,
2470 { &hf_q2931_frame_discard_backward_dir,
2471 { "Frame discard in backward direction", "q2931.frame_discard_backward_dir",
2472 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x40,
2475 { &hf_q2931_tagging_backward_dir,
2476 { "Tagging in backward direction", "q2931.tagging_backward_dir",
2477 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x02,
2480 { &hf_q2931_tagging_forward_dir,
2481 { "Tagging in forward direction", "q2931.tagging_forward_dir",
2482 FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
2485 { &hf_q2931_midrange,
2486 { "MID range", "q2931.midrange",
2487 FT_UINT32, BASE_HEX, NULL, 0x0,
2490 { &hf_q2931_cause_network_service,
2491 { "Network service", "q2931.cause.network_service",
2492 FT_BOOLEAN, 8, TFS(&tfs_user_provider), 0x80,
2495 { &hf_q2931_cause_network_behavior,
2496 { "Network behavior", "q2931.cause.network_behavior",
2497 FT_BOOLEAN, 8, TFS(&tfs_abnormal_normal), 0x40,
2500 { &hf_q2931_nsap_address_number_short,
2501 { "Number (too short)", "q2931.nsap_address.number_short",
2502 FT_BYTES, BASE_NONE, NULL, 0x0,
2505 { &hf_q2931_atm_identifier,
2506 { "Identifier", "q2931.atm_identifier",
2507 FT_UINT8, BASE_HEX, VALS(q2931_atm_td_subfield_vals), 0x0,
2510 { &hf_q2931_atm_identifier_value,
2511 { "Value", "q2931.atm_identifier_value",
2512 FT_UINT24, BASE_DEC|BASE_UNIT_STRING, &units_cells_s, 0x0,
2515 { &hf_q2931_aal_parameter_identifier,
2516 { "Identifier", "q2931.aal.parameter_identifier",
2517 FT_UINT8, BASE_HEX, NULL, 0x0,
2520 { &hf_q2931_e2e_transit_delay_identifier,
2521 { "Identifier", "q2931.transit_delay.identifier",
2522 FT_UINT8, BASE_HEX, NULL, 0x0,
2525 { &hf_q2931_bband_sending_complete_id,
2526 { "Identifier", "q2931.bband_sending_complete.id",
2527 FT_UINT8, BASE_HEX, NULL, 0x0,
2530 { &hf_q2931_bband_sending_complete,
2531 { "Broadband sending complete indication", "q2931.bband_sending_complete",
2532 FT_NONE, BASE_NONE, NULL, 0x0,
2535 { &hf_q2931_locking_codeset,
2536 { "Locking codeset", "q2931.locking_codeset",
2537 FT_UINT8, BASE_DEC, NULL, 0x0,
2542 static gint *ett[] = {
2550 static ei_register_info ei[] = {
2551 { &ei_q2931_atm_identifier, { "q2931.atm_identifier.unknown", PI_PROTOCOL, PI_WARN, "Unknown ATM traffic descriptor element", EXPFILL }},
2552 { &ei_q2931_aal_parameter_identifier, { "q2931.aal.parameter_identifier.unknown", PI_PROTOCOL, PI_WARN, "Unknown AAL parameter", EXPFILL }},
2553 { &ei_q2931_e2e_transit_delay_identifier, { "q2931.transit_delay.parameter_identifier.unknown", PI_PROTOCOL, PI_WARN, "Unknown transit delay identifier", EXPFILL }},
2554 { &ei_q2931_bband_sending_complete_id, { "q2931.bband_sending_complete.id.unknown", PI_PROTOCOL, PI_WARN, "Unknown broadband sending complete element", EXPFILL }},
2557 expert_module_t* expert_q2931;
2559 proto_q2931 = proto_register_protocol("Q.2931", "Q.2931", "q2931");
2560 proto_register_field_array (proto_q2931, hf, array_length(hf));
2561 proto_register_subtree_array(ett, array_length(ett));
2562 expert_q2931 = expert_register_protocol(proto_q2931);
2563 expert_register_field_array(expert_q2931, ei, array_length(ei));
2565 register_dissector("q2931", dissect_q2931, proto_q2931);
2569 * Editor modelines - http://www.wireshark.org/tools/modelines.html
2574 * indent-tabs-mode: t
2577 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2578 * :indentSize=8:tabSize=8:noTabs=false: