2 * Routines for Q.933 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.
27 #include <epan/packet.h>
28 #include <epan/strutil.h>
29 #include <epan/nlpid.h>
31 void proto_register_q933(void);
32 void proto_reg_handoff_q933(void);
34 static int proto_q933 = -1;
35 static int hf_q933_discriminator = -1;
36 static int hf_q933_coding_standard = -1;
37 static int hf_q933_information_transfer_capability = -1;
38 static int hf_q933_transfer_mode = -1;
39 static int hf_q933_uil1 = -1;
40 static int hf_q933_call_ref_len = -1;
41 static int hf_q933_call_ref_flag = -1;
42 static int hf_q933_call_ref = -1;
43 static int hf_q933_message_type = -1;
44 static int hf_q933_cause_location = -1;
45 static int hf_q933_cause_value = -1;
46 static int hf_q933_number_type = -1;
47 static int hf_q933_numbering_plan = -1;
48 static int hf_q933_extension_ind = -1;
49 static int hf_q933_calling_party_number = -1;
50 static int hf_q933_called_party_number = -1;
51 static int hf_q933_connected_number = -1;
52 /* static int hf_q933_redirecting_number = -1; */
53 static int hf_q933_screening_ind = -1;
54 static int hf_q933_presentation_ind = -1;
55 static int hf_q933_report_type = -1;
56 static int hf_q933_link_verf_txseq = -1;
57 static int hf_q933_link_verf_rxseq = -1;
59 static gint ett_q933 = -1;
60 static gint ett_q933_ie = -1;
63 * Q.933 message types.
65 #define Q933_ESCAPE 0x00
66 #define Q933_ALERTING 0x01
67 #define Q933_CALL_PROCEEDING 0x02
68 #define Q933_CONNECT 0x07
69 #define Q933_CONNECT_ACK 0x0F
70 #define Q933_PROGRESS 0x03
71 #define Q933_SETUP 0x05
72 #define Q933_DISCONNECT 0x45
73 #define Q933_RELEASE 0x4D
74 #define Q933_RELEASE_COMPLETE 0x5A
75 #define Q933_SEGMENT 0x60
76 #define Q933_STATUS 0x7D
77 #define Q933_STATUS_ENQUIRY 0x75
79 static const value_string q933_message_type_vals[] = {
80 { Q933_ESCAPE, "ESCAPE" },
81 { Q933_ALERTING, "ALERTING" },
82 { Q933_CALL_PROCEEDING, "CALL PROCEEDING" },
83 { Q933_CONNECT, "CONNECT" },
84 { Q933_CONNECT_ACK, "CONNECT ACKNOWLEDGE" },
85 { Q933_PROGRESS, "PROGRESS" },
86 { Q933_SETUP, "SETUP" },
87 { Q933_DISCONNECT, "DISCONNECT" },
88 { Q933_RELEASE, "RELEASE" },
89 { Q933_RELEASE_COMPLETE, "RELEASE COMPLETE" },
90 { Q933_SEGMENT, "SEGMENT" },
91 { Q933_STATUS, "STATUS" },
92 { Q933_STATUS_ENQUIRY, "STATUS ENQUIRY" },
96 static const true_false_string tfs_call_ref_flag = {
97 "Message sent to originating side",
98 "Message sent from originating side"
102 * Information elements.
105 /* Shifted codeset values */
115 #define Q933_IE_SO_MASK 0x80 /* single-octet/variable-length mask */
119 #define Q933_IE_SO_IDENTIFIER_MASK 0xf0 /* IE identifier mask */
120 #define Q933_IE_SO_IDENTIFIER_SHIFT 4 /* IE identifier shift */
121 #define Q933_IE_SO_IE_MASK 0x0F /* IE mask */
123 #define Q933_IE_SHIFT 0x90
124 #define Q933_IE_SHIFT_NON_LOCKING 0x08 /* non-locking shift */
125 #define Q933_IE_SHIFT_CODESET 0x07 /* codeset */
127 #define Q933_IE_REPEAT_INDICATOR 0xD0
130 * Variable-length IEs.
132 #define Q933_IE_VL_EXTENSION 0x80 /* Extension flag */
133 /* extension bit. The bit value "0" indicates that the octet continues through the */
134 /* next octet. The bit value "1" indicates that this octet is the last octet */
136 static const true_false_string q933_extension_ind_value = {
138 "information continues through the next octet",
144 * Codeset 0 (default).
146 #define Q933_IE_SEGMENTED_MESSAGE 0x00
147 #define Q933_IE_BEARER_CAPABILITY 0x04
148 #define Q933_IE_CAUSE 0x08
149 #define Q933_IE_CALL_STATE 0x14
150 #define Q933_IE_CHANNEL_IDENTIFICATION 0x18
151 #define Q933_IE_DLCI 0x19
152 #define Q933_IE_PROGRESS_INDICATOR 0x1E
153 #define Q933_IE_NETWORK_SPECIFIC_FACIL 0x20 /* Network Specific Facilities */
154 #define Q933_IE_DISPLAY 0x28
155 #define Q933_IE_E2E_TRANSIT_DELAY 0x42 /* End-to-end Transit Delay */
156 #define Q933_IE_TD_SELECTION_AND_INT 0x43 /* Transit Delay Selection and Indication */
157 #define Q933_IE_PL_BINARY_PARAMETERS 0x44 /* Packet layer binary parameters */
158 #define Q933_IE_LL_CORE_PARAMETERS 0x48 /* Link layer core parameters */
159 #define Q933_IE_LL_PROTOCOL_PARAMETERS 0x49 /* Link layer protocol parameters */
160 #define Q933_IE_REVERSE_CHARGE_IND 0x4A /* Reverse charging indication */
161 #define Q933_IE_CONNECTED_NUMBER 0x4C /* Connected Number */
162 #define Q933_IE_CONNECTED_SUBADDR 0x4D /* Connected sub-address */
163 #define Q933_IE_X_213_PRIORITY 0x50 /* X.213 priority */
164 #define Q933_IE_REPORT_TYPE 0x51
165 #define Q933_IE_LINK_INTEGRITY_VERF 0x53 /* Link integrity verification */
166 #define Q933_IE_PVC_STATUS 0x57
167 #define Q933_IE_CALLING_PARTY_NUMBER 0x6C /* Calling Party Number */
168 #define Q933_IE_CALLING_PARTY_SUBADDR 0x6D /* Calling Party Subaddress */
169 #define Q933_IE_CALLED_PARTY_NUMBER 0x70 /* Called Party Number */
170 #define Q933_IE_CALLED_PARTY_SUBADDR 0x71 /* Called Party Subaddress */
171 #define Q933_IE_TRANSIT_NETWORK_SEL 0x78 /* Transit Network Selection */
172 #define Q933_IE_LOW_LAYER_COMPAT 0x7C /* Low-Layer Compatibility */
173 #define Q933_IE_HIGH_LAYER_COMPAT 0x7D /* High-Layer Compatibility */
174 #define Q933_IE_USER_USER 0x7E /* User-User */
175 #define Q933_IE_ESCAPE 0x7F /* Escape for extension */
178 static const value_string q933_info_element_vals0[] = {
179 { Q933_IE_SEGMENTED_MESSAGE, "Segmented message" },
180 { Q933_IE_BEARER_CAPABILITY, "Bearer capability" },
181 { Q933_IE_CAUSE, "Cause" },
182 { Q933_IE_CALL_STATE, "Call state" },
183 { Q933_IE_CHANNEL_IDENTIFICATION, "Channel identification" },
184 { Q933_IE_DLCI, "Data link connection identifier" },
185 { Q933_IE_PROGRESS_INDICATOR, "Progress indicator" },
186 { Q933_IE_NETWORK_SPECIFIC_FACIL, "Network specific facilities" },
187 { Q933_IE_E2E_TRANSIT_DELAY, "End-to-end transit delay" },
188 { Q933_IE_TD_SELECTION_AND_INT, "Transit delay selection and indication" },
189 { Q933_IE_PL_BINARY_PARAMETERS, "Packet layer binary parameters" },
190 { Q933_IE_LL_CORE_PARAMETERS, "Link layer core parameters" },
191 { Q933_IE_LL_PROTOCOL_PARAMETERS, "Link layer protocol parameters" },
192 { Q933_IE_REVERSE_CHARGE_IND, "Reverse charging indication" },
193 { Q933_IE_CONNECTED_NUMBER, "Connected number" },
194 { Q933_IE_CONNECTED_SUBADDR, "Connected subaddress" },
195 { Q933_IE_X_213_PRIORITY, "X.213 priority" },
196 { Q933_IE_REPORT_TYPE, "Report type" },
197 { Q933_IE_LINK_INTEGRITY_VERF, "Link integrity verification" },
198 { Q933_IE_PVC_STATUS, "PVC status" },
199 { Q933_IE_CALLING_PARTY_NUMBER, "Calling party number" },
200 { Q933_IE_CALLING_PARTY_SUBADDR, "Calling party subaddress" },
201 { Q933_IE_CALLED_PARTY_NUMBER, "Called party number" },
202 { Q933_IE_CALLED_PARTY_SUBADDR, "Called party subaddress" },
203 { Q933_IE_TRANSIT_NETWORK_SEL, "Transit network selection" },
204 { Q933_IE_LOW_LAYER_COMPAT, "Low-layer compatibility" },
205 { Q933_IE_HIGH_LAYER_COMPAT, "High-layer compatibility" },
206 { Q933_IE_USER_USER, "User-user" },
207 { Q933_IE_ESCAPE, "Escape" },
211 static const value_string q933_info_element_vals1[] = {
215 static const value_string q933_info_element_vals2[] = {
219 static const value_string q933_info_element_vals3[] = {
223 static const value_string q933_info_element_vals4[] = {
228 #define Q933_IE_ANSI_REPORT_TYPE 0x01
229 #define Q933_IE_ANSI_LINK_INTEGRITY_VERF 0x03
230 #define Q933_IE_ANSI_PVC_STATUS 0x07
233 static const value_string q933_info_element_vals5[] = {
234 { Q933_IE_ANSI_REPORT_TYPE, "Report type (ANSI)" },
235 { Q933_IE_REPORT_TYPE, "Report type (CCITT)" },
236 { Q933_IE_ANSI_LINK_INTEGRITY_VERF, "Keep Alive (ANSI)" },
237 { Q933_IE_LINK_INTEGRITY_VERF, "Keep Alive (CCITT)" },
238 { Q933_IE_ANSI_PVC_STATUS, "PVC Status (ANSI)" },
239 { Q933_IE_PVC_STATUS, "PVC Status (CCITT)" },
243 static const value_string q933_info_element_vals6[] = {
247 static const value_string q933_info_element_vals7[] = {
252 #define NUM_INFO_ELEMENT_VALS (Q933_IE_SHIFT_CODESET+1)
253 static const value_string *q933_info_element_vals[NUM_INFO_ELEMENT_VALS] = {
254 q933_info_element_vals0,
255 q933_info_element_vals1,
256 q933_info_element_vals2,
257 q933_info_element_vals3,
258 q933_info_element_vals4,
259 q933_info_element_vals5,
260 q933_info_element_vals6,
261 q933_info_element_vals7,
264 static const value_string q933_repeat_indication_vals[] = {
265 { 0x2, "Prioritized list" },
270 * ITU-standardized coding.
272 #define Q933_ITU_STANDARDIZED_CODING 0x00
275 * Dissect a Segmented message information element.
278 dissect_q933_segmented_message_ie(tvbuff_t *tvb, int offset, int len,
282 proto_tree_add_text(tree, tvb, offset, len,
283 "Segmented message: length is %d, should be 2", len);
286 if (tvb_get_guint8(tvb, offset) & 0x80) {
287 proto_tree_add_text(tree, tvb, offset, 1,
288 "First segment: %u segments remaining",
289 tvb_get_guint8(tvb, offset) & 0x7F);
291 proto_tree_add_text(tree, tvb, offset, 1,
292 "Not first segment: %u segments remaining",
293 tvb_get_guint8(tvb, offset) & 0x7F);
295 proto_tree_add_text(tree, tvb, offset + 1, 1,
296 "Segmented message type: %u", tvb_get_guint8(tvb, offset + 1));
300 * Dissect a Bearer capability or Low-layer compatibility information element.
302 static const value_string q933_coding_standard_vals[] = {
303 { 0x0, "ITU-T standardized coding" },
304 { 0x1, "ISO/IEC standard" },
305 { 0x2, "National standard" },
306 { 0x3, "Standard defined for this particular network" },
310 static const value_string q933_information_transfer_capability_vals[] = {
311 { 0x08, "Unrestricted digital information" },
315 static const value_string q933_transfer_mode_vals[] = {
316 { 0x01, "Frame mode" },
320 static const value_string q933_uil1_vals[] = {
321 { 0x01, "V.110/I.460/X.30 rate adaption" },
322 { 0x02, "Recommendation G.711 u-law" },
323 { 0x03, "Recommendation G.711 A-law" },
324 { 0x04, "Recommendation G.721 32 kbit/s ADPCM and Recommendation I.460" },
325 { 0x05, "Recommendation H.221 and H.242" },
326 { 0x06, "Recommendation H.223 and H.245" },
327 { 0x07, "Non-ITU-T-standardized rate adaption" },
328 { 0x08, "V.120 rate adaption" },
329 { 0x09, "X.31 HDLC flag stuffing" },
333 static const value_string q933_l1_user_rate_vals[] = {
334 { 0x00, "Rate indicated by E-bits" },
335 { 0x01, "0.6 kbit/s" },
336 { 0x02, "1.2 kbit/s" },
337 { 0x03, "2.4 kbit/s" },
338 { 0x04, "3.6 kbit/s" },
339 { 0x05, "4.8 kbit/s" },
340 { 0x06, "7.2 kbit/s" },
341 { 0x07, "8 kbit/s" },
342 { 0x08, "9.6 kbit/s" },
343 { 0x09, "14.4 kbit/s" },
344 { 0x0A, "16 kbit/s" },
345 { 0x0B, "19.2 kbit/s" },
346 { 0x0C, "32 kbit/s" },
347 { 0x0E, "48 kbit/s" },
348 { 0x0F, "56 kbit/s" },
349 { 0x10, "64 kbit/s "},
350 { 0x15, "0.1345 kbit/s" },
351 { 0x16, "0.100 kbit/s" },
352 { 0x17, "0.075/1.2 kbit/s" },
353 { 0x18, "1.2/0.075 kbit/s" },
354 { 0x19, "0.050 kbit/s" },
355 { 0x1A, "0.075 kbit/s" },
356 { 0x1B, "0.110 kbit/s" },
357 { 0x1C, "0.150 kbit/s" },
358 { 0x1D, "0.200 kbit/s" },
359 { 0x1E, "0.300 kbit/s" },
360 { 0x1F, "12 kbit/s" },
364 static const value_string q933_l1_stop_bits_vals[] = {
371 static const value_string q933_l1_data_bits_vals[] = {
378 static const value_string q933_l1_parity_vals[] = {
382 { 0x04, "Forced to 0" },
383 { 0x05, "Forced to 1" },
387 #define Q933_UIL2_USER_SPEC 0x10
389 static const value_string q933_uil2_vals[] = {
390 { 0x01, "Basic mode ISO 1745" },
391 { 0x06, "X.25, link level" },
392 { 0x07, "X.25 multilink" },
393 { 0x08, "T.71 Extended LAPB" },
394 { 0x09, "HDLC ARM" },
395 { 0x0A, "HDLC NRM" },
396 { 0x0B, "HDLC ABM" },
397 { 0x0C, "ISO 8802/2 LLC" },
398 { 0x0D, "X.75 Single Link Procedure" },
400 { 0x0F, "Core aspects of Q.922" },
401 { Q933_UIL2_USER_SPEC, "User-specified" },
402 { 0x11, "ISO 7776 DTE-DTE operation" },
406 static const value_string q933_address_inclusion_vals[] = {
407 { 0x01, "Address included" },
408 { 0x02, "Encapsulation of logical control frame" },
412 static const value_string q933_mode_vals[] = {
413 { 0x20, "Normal mode" },
414 { 0x40, "Extended mode" },
418 #define Q933_UIL3_X25_PL 0x06
419 #define Q933_UIL3_ISO_8208 0x07 /* X.25-based */
420 #define Q933_UIL3_X223 0x08 /* X.25-based */
421 #define Q933_UIL3_TR_9577 0x0B
422 #define Q933_UIL3_USER_SPEC 0x10
424 static const value_string q933_uil3_vals[] = {
425 { Q933_UIL3_X25_PL, "X.25, packet layer" },
426 { Q933_UIL3_ISO_8208, "ISO/IEC 8208" },
427 { Q933_UIL3_X223, "X.223/ISO 8878" },
428 { 0x09, "ISO/IEC 8473" },
430 { Q933_UIL3_TR_9577, "ISO/IEC TR 9577" },
431 { Q933_UIL3_USER_SPEC, "User-specified" },
436 dissect_q933_protocol_discriminator(tvbuff_t *tvb, int offset, proto_tree *tree)
438 unsigned int discriminator = tvb_get_guint8(tvb, offset);
440 if (discriminator == NLPID_Q_933) {
441 proto_tree_add_uint_format_value(tree, hf_q933_discriminator,
442 tvb, offset, 1, discriminator,
444 } else if (discriminator == NLPID_Q_2931) {
445 proto_tree_add_uint_format_value(tree, hf_q933_discriminator,
446 tvb, offset, 1, discriminator,
448 } else if ((discriminator >= 16 && discriminator < 63)
449 || ((discriminator >= 80) && (discriminator < 254))) {
450 proto_tree_add_uint_format_value(tree, hf_q933_discriminator,
451 tvb, offset, 1, discriminator,
452 "Network layer or layer 3 protocol (0x%02X)",
454 } else if (discriminator >= 64 && discriminator <= 79) {
455 proto_tree_add_uint_format_value(tree, hf_q933_discriminator,
456 tvb, offset, 1, discriminator,
457 "National use (0x%02X)",
460 proto_tree_add_uint_format_value(tree, hf_q933_discriminator,
461 tvb, offset, 1, discriminator,
468 dissect_q933_bearer_capability_ie(tvbuff_t *tvb, int offset, int len,
472 guint8 coding_standard;
474 guint8 uil2_protocol;
475 guint8 uil3_protocol;
480 octet = tvb_get_guint8(tvb, offset);
481 coding_standard = octet & 0x60;
482 if (coding_standard != Q933_ITU_STANDARDIZED_CODING) {
484 * We don't know how the bearer capability is encoded,
485 * so just dump it as data and be done with it.
487 proto_tree_add_text(tree, tvb, offset,
489 tvb_bytes_to_ep_str(tvb, offset, len));
490 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
491 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
494 proto_tree_add_uint(tree, hf_q933_information_transfer_capability, tvb, offset, 1, octet);
495 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
496 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
501 * XXX - only in Low-layer compatibility information element.
503 if (!(octet & Q933_IE_VL_EXTENSION)) {
506 octet = tvb_get_guint8(tvb, offset);
507 proto_tree_add_text(tree, tvb, offset, 1,
508 "Out-band negotiation %spossible",
509 (octet & 0x40) ? "" : "not ");
516 octet = tvb_get_guint8(tvb, offset);
517 proto_tree_add_uint(tree, hf_q933_transfer_mode, tvb, offset, 1, octet);
518 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
524 octet = tvb_get_guint8(tvb, offset);
525 if ((octet & 0x60) == 0x20) {
527 * Layer 1 information.
529 proto_tree_add_uint(tree, hf_q933_uil1, tvb, offset, 1, octet);
530 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
534 if (octet & Q933_IE_VL_EXTENSION)
538 octet = tvb_get_guint8(tvb, offset);
539 proto_tree_add_text(tree, tvb, offset, 1,
541 (octet & 0x40) ? "Asynchronous" : "Synchronous");
542 proto_tree_add_text(tree, tvb, offset, 1,
544 val_to_str(octet & 0x1F, q933_l1_user_rate_vals,
545 "Unknown (0x%02X)"));
549 if (octet & Q933_IE_VL_EXTENSION)
553 octet = tvb_get_guint8(tvb, offset);
554 proto_tree_add_text(tree, tvb, offset, 1,
555 "Rate adaption header %sincluded",
556 (octet & 0x40) ? "" : "not ");
557 proto_tree_add_text(tree, tvb, offset, 1,
558 "Multiple frame establishment %ssupported",
559 (octet & 0x20) ? "" : "not ");
560 proto_tree_add_text(tree, tvb, offset, 1,
561 "%s mode of operation",
562 (octet & 0x10) ? "Protocol sensitive" : "Bit transparent");
566 if (octet & Q933_IE_VL_EXTENSION)
570 octet = tvb_get_guint8(tvb, offset);
571 proto_tree_add_text(tree, tvb, offset, 1,
573 val_to_str(octet & 0x60, q933_l1_stop_bits_vals,
575 proto_tree_add_text(tree, tvb, offset, 1,
577 val_to_str(octet & 0x18, q933_l1_data_bits_vals,
579 proto_tree_add_text(tree, tvb, offset, 1,
581 val_to_str(octet & 0x07, q933_l1_parity_vals,
586 if (octet & Q933_IE_VL_EXTENSION)
590 octet = tvb_get_guint8(tvb, offset);
591 proto_tree_add_text(tree, tvb, offset, 1,
593 (octet & 0x40) ? "Full" : "Half");
594 modem_type = octet & 0x3F;
595 proto_tree_add_text(tree, tvb, offset, 1,
596 "Modem type: Network-specific rules 0x%02X", modem_type);
605 octet = tvb_get_guint8(tvb, offset);
606 if ((octet & 0x60) == 0x40) {
608 * Layer 2 information.
610 uil2_protocol = octet & 0x1F;
611 proto_tree_add_text(tree, tvb, offset, 1,
612 "User information layer 2 protocol: %s",
613 val_to_str(uil2_protocol, q933_uil2_vals,
614 "Unknown (0x%02X)"));
619 * XXX - only in Low-layer compatibility information element.
621 if (octet & Q933_IE_VL_EXTENSION)
625 octet = tvb_get_guint8(tvb, offset);
626 if (uil2_protocol == Q933_UIL2_USER_SPEC) {
627 proto_tree_add_text(tree, tvb, offset, 1,
628 "User-specified layer 2 protocol information: 0x%02X",
631 proto_tree_add_text(tree, tvb, offset, 1,
632 "Address inclusion: %s",
633 val_to_str(octet & 0x03, q933_address_inclusion_vals,
634 "Unknown (0x%02X)"));
644 octet = tvb_get_guint8(tvb, offset);
645 if ((octet & 0x60) == 0x60) {
647 * Layer 3 information.
649 uil3_protocol = octet & 0x1F;
650 proto_tree_add_text(tree, tvb, offset, 1,
651 "User information layer 3 protocol: %s",
652 val_to_str(uil3_protocol, q933_uil3_vals,
653 "Unknown (0x%02X)"));
659 * XXX - only in Low-layer compatibility information element.
661 if (octet & Q933_IE_VL_EXTENSION)
665 octet = tvb_get_guint8(tvb, offset);
666 switch (uil3_protocol) {
668 case Q933_UIL3_X25_PL:
669 case Q933_UIL3_ISO_8208:
671 proto_tree_add_text(tree, tvb, offset, 1,
673 val_to_str(octet & 0x60, q933_mode_vals,
674 "Unknown (0x%02X)"));
678 if (octet & Q933_IE_VL_EXTENSION)
682 octet = tvb_get_guint8(tvb, offset);
683 proto_tree_add_text(tree, tvb, offset, 1,
684 "Default packet size: %u", octet & 0x0F);
688 if (octet & Q933_IE_VL_EXTENSION)
692 octet = tvb_get_guint8(tvb, offset);
693 proto_tree_add_text(tree, tvb, offset, 1,
694 "Packet window size: %u", octet & 0x7F);
699 case Q933_UIL3_USER_SPEC:
700 proto_tree_add_text(tree, tvb, offset, 1,
701 "Default packet size: %u octets",
702 1 << (octet & 0x0F));
707 case Q933_UIL3_TR_9577:
708 add_l3_info = (octet & 0x0F) << 4;
709 if (octet & Q933_IE_VL_EXTENSION)
711 #if 0 /* XXX: len is always >0 at this point; is field always 2 bytes (if not Q933_IE_VL_EXTENSION) ? */
715 octet = tvb_get_guint8(tvb, offset + 1);
716 add_l3_info |= (octet & 0x0F);
717 proto_tree_add_text(tree, tvb, offset, 2,
718 "Additional layer 3 protocol information: %s",
719 val_to_str(add_l3_info, nlpid_vals,
720 "Unknown (0x%02X)"));
731 * Dissect a Cause information element.
735 const value_string q933_cause_location_vals[] = {
736 { 0x00, "User (U)" },
737 { 0x01, "Private network serving the local user (LPN)" },
738 { 0x02, "Public network serving the local user (LN)" },
739 { 0x03, "Transit network (TN)" },
740 { 0x04, "Public network serving the remote user (RLN)" },
741 { 0x05, "Private network serving the remote user (RPN)" },
742 { 0x07, "International network (INTL)" },
743 { 0x0A, "Network beyond interworking point (BI)" },
747 static const value_string q933_cause_recommendation_vals[] = {
751 { 0x05, "Q.1031/Q.1051" },
756 * Cause codes for Cause.
758 #define Q933_CAUSE_UNALLOC_NUMBER 0x01
759 #define Q933_CAUSE_NO_ROUTE_TO_DEST 0x03
760 #define Q933_CAUSE_CALL_REJECTED 0x15
761 #define Q933_CAUSE_NUMBER_CHANGED 0x16
762 #define Q933_CAUSE_ACCESS_INFO_DISC 0x2B
763 #define Q933_CAUSE_QOS_UNAVAILABLE 0x31
764 #define Q933_CAUSE_CHAN_NONEXISTENT 0x52
765 #define Q933_CAUSE_INCOMPATIBLE_DEST 0x58
766 #define Q933_CAUSE_MAND_IE_MISSING 0x60
767 #define Q933_CAUSE_MT_NONEX_OR_UNIMPL 0x61
768 #define Q933_CAUSE_IE_NONEX_OR_UNIMPL 0x63
769 #define Q933_CAUSE_INVALID_IE_CONTENTS 0x64
770 #define Q933_CAUSE_MSG_INCOMPAT_W_CS 0x65
771 #define Q933_CAUSE_REC_TIMER_EXP 0x66
773 const value_string q933_cause_code_vals[] = {
774 { 0x00, "Valid cause code not yet received" },
775 { Q933_CAUSE_UNALLOC_NUMBER, "Unallocated (unassigned) number" },
776 { 0x02, "No route to specified transit network" },
777 { Q933_CAUSE_NO_ROUTE_TO_DEST, "No route to destination" },
778 { 0x04, "Send special information tone" },
779 { 0x05, "Misdialled trunk prefix" },
780 { 0x06, "Channel unacceptable" },
781 { 0x07, "Call awarded and being delivered in an established channel" },
782 { 0x08, "Prefix 0 dialed but not allowed" },
783 /* Q.850 - "Preemption" */
784 { 0x09, "Prefix 1 dialed but not allowed" },
785 /* Q.850 - "Preemption - circuit reserved for reuse" */
786 { 0x0A, "Prefix 1 dialed but not required" },
787 { 0x0B, "More digits received than allowed, call is proceeding" },
788 { 0x0E, "QoR: ported number" },
789 { 0x10, "Normal call clearing" },
790 { 0x11, "User busy" },
791 { 0x12, "No user responding" },
792 { 0x13, "No answer from user (user alerted)" },
793 { 0x14, "Subscriber absent" },
794 { Q933_CAUSE_CALL_REJECTED, "Call rejected" },
795 { Q933_CAUSE_NUMBER_CHANGED, "Number changed" },
796 { 0x17, "Reverse charging rejected" },
797 /* Q.850 - "Redirection to new destination" */
798 { 0x18, "Call suspended" },
799 /* Q.850 Amendment 1 - "Call rejected due to feature at the destination" */
800 { 0x19, "Call resumed" },
801 /* Q.850 - "Exchange routing error */
802 { 0x1A, "Non-selected user clearing" },
803 { 0x1B, "Destination out of order" },
804 { 0x1C, "Invalid number format (incomplete number)" },
805 { 0x1D, "Facility rejected" },
806 { 0x1E, "Response to STATUS ENQUIRY" },
807 { 0x1F, "Normal unspecified" },
808 { 0x21, "Circuit out of order" },
809 { 0x22, "No circuit/channel available" },
810 { 0x23, "Destination unattainable" },
811 { 0x25, "Degraded service" },
812 { 0x26, "Network out of order" },
813 { 0x27, "Transit delay range cannot be achieved" },
814 /* Q.850 - "Permanent frame mode connection out of service" */
815 { 0x28, "Throughput range cannot be achieved" },
816 /* Q.850 - "Permanent frame mode connection operational" */
817 { 0x29, "Temporary failure" },
818 { 0x2A, "Switching equipment congestion" },
819 { Q933_CAUSE_ACCESS_INFO_DISC, "Access information discarded" },
820 { 0x2C, "Requested circuit/channel not available" },
821 { 0x2D, "Pre-empted" },
822 { 0x2E, "Precedence call blocked" },
823 { 0x2F, "Resources unavailable, unspecified" },
824 { Q933_CAUSE_QOS_UNAVAILABLE, "Quality of service unavailable" },
825 { 0x32, "Requested facility not subscribed" },
826 { 0x33, "Reverse charging not allowed" },
827 { 0x34, "Outgoing calls barred" },
828 { 0x35, "Outgoing calls barred within CUG" },
829 { 0x36, "Incoming calls barred" },
830 { 0x37, "Incoming calls barred within CUG" },
831 { 0x38, "Call waiting not subscribed" },
832 { 0x39, "Bearer capability not authorized" },
833 { 0x3A, "Bearer capability not presently available" },
834 { 0x3E, "Inconsistency in designated outgoing access information and subscriber class" },
835 { 0x3F, "Service or option not available, unspecified" },
836 { 0x41, "Bearer capability not implemented" },
837 { 0x42, "Channel type not implemented" },
838 { 0x43, "Transit network selection not implemented" },
839 { 0x44, "Message not implemented" },
840 { 0x45, "Requested facility not implemented" },
841 { 0x46, "Only restricted digital information bearer capability is available" },
842 { 0x4F, "Service or option not implemented, unspecified" },
843 { 0x51, "Invalid call reference value" },
844 { Q933_CAUSE_CHAN_NONEXISTENT, "Identified channel does not exist" },
845 { 0x53, "Call identity does not exist for suspended call" },
846 { 0x54, "Call identity in use" },
847 { 0x55, "No call suspended" },
848 { 0x56, "Call having the requested call identity has been cleared" },
849 { 0x57, "Called user not member of CUG" },
850 { Q933_CAUSE_INCOMPATIBLE_DEST, "Incompatible destination" },
851 { 0x59, "Non-existent abbreviated address entry" },
852 { 0x5A, "Destination address missing, and direct call not subscribed" },
853 /* Q.850 - "Non-existent CUG" */
854 { 0x5B, "Invalid transit network selection (national use)" },
855 { 0x5C, "Invalid facility parameter" },
856 { 0x5D, "Mandatory information element is missing" },
857 { 0x5F, "Invalid message, unspecified" },
858 { Q933_CAUSE_MAND_IE_MISSING, "Mandatory information element is missing" },
859 { Q933_CAUSE_MT_NONEX_OR_UNIMPL,"Message type non-existent or not implemented" },
860 { 0x62, "Message not compatible with call state or message type non-existent or not implemented" },
861 { Q933_CAUSE_IE_NONEX_OR_UNIMPL,"Information element non-existent or not implemented" },
862 { Q933_CAUSE_INVALID_IE_CONTENTS,"Invalid information element contents" },
863 { Q933_CAUSE_MSG_INCOMPAT_W_CS, "Message not compatible with call state" },
864 { Q933_CAUSE_REC_TIMER_EXP, "Recovery on timer expiry" },
865 { 0x67, "Parameter non-existent or not implemented - passed on" },
866 { 0x6E, "Message with unrecognized parameter discarded" },
867 { 0x6F, "Protocol error, unspecified" },
868 { 0x7F, "Internetworking, unspecified" },
872 static const value_string q933_cause_condition_vals[] = {
874 { 0x01, "Permanent" },
875 { 0x02, "Transient" },
879 #define Q933_REJ_USER_SPECIFIC 0x00
880 #define Q933_REJ_IE_MISSING 0x04
881 #define Q933_REJ_IE_INSUFFICIENT 0x08
883 static const value_string q933_rejection_reason_vals[] = {
884 { 0x00, "User specific" },
885 { 0x04, "Information element missing" },
886 { 0x08, "Information element contents are not sufficient" },
891 dissect_q933_cause_ie(tvbuff_t *tvb, int offset, int len,
892 proto_tree *tree, int hf_cause_value)
896 guint8 coding_standard;
897 guint8 rejection_reason;
901 octet = tvb_get_guint8(tvb, offset);
902 coding_standard = octet & 0x60;
903 if (coding_standard != Q933_ITU_STANDARDIZED_CODING) {
905 * We don't know how the cause is encoded,
906 * so just dump it as data and be done with it.
908 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
909 proto_tree_add_text(tree, tvb, offset,
911 tvb_bytes_to_ep_str(tvb, offset, len));
914 proto_tree_add_uint(tree, hf_q933_cause_location, tvb, offset, 1, octet);
915 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
916 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
920 if (!(octet & Q933_IE_VL_EXTENSION)) {
923 octet = tvb_get_guint8(tvb, offset);
924 proto_tree_add_text(tree, tvb, offset, 1,
925 "Recommendation: %s",
926 val_to_str(octet & 0x7F, q933_cause_recommendation_vals,
927 "Unknown (0x%02X)"));
928 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
935 octet = tvb_get_guint8(tvb, offset);
936 cause_value = octet & 0x7F;
937 proto_tree_add_uint(tree, hf_cause_value, tvb, offset, 1, cause_value);
938 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
944 switch (cause_value) {
946 case Q933_CAUSE_UNALLOC_NUMBER:
947 case Q933_CAUSE_NO_ROUTE_TO_DEST:
948 case Q933_CAUSE_QOS_UNAVAILABLE:
949 octet = tvb_get_guint8(tvb, offset);
950 proto_tree_add_text(tree, tvb, offset, 1,
951 "Network service: %s",
952 (octet & 0x80) ? "User" : "Provider");
953 proto_tree_add_text(tree, tvb, offset, 1,
955 (octet & 0x40) ? "Abnormal" : "Normal");
956 proto_tree_add_text(tree, tvb, offset, 1,
958 val_to_str(octet & 0x03, q933_cause_condition_vals,
962 case Q933_CAUSE_CALL_REJECTED:
963 rejection_reason = octet & 0x7C;
964 proto_tree_add_text(tree, tvb, offset, 1,
965 "Rejection reason: %s",
966 val_to_str(octet & 0x7C, q933_rejection_reason_vals,
968 proto_tree_add_text(tree, tvb, offset, 1,
970 val_to_str(octet & 0x03, q933_cause_condition_vals,
977 switch (rejection_reason) {
979 case Q933_REJ_USER_SPECIFIC:
980 proto_tree_add_text(tree, tvb, offset, len,
981 "User specific diagnostic: %s",
982 tvb_bytes_to_ep_str(tvb, offset, len));
985 case Q933_REJ_IE_MISSING:
986 proto_tree_add_text(tree, tvb, offset, 1,
987 "Missing information element: %s",
988 val_to_str(tvb_get_guint8(tvb, offset), q933_info_element_vals0,
989 "Unknown (0x%02X)"));
992 case Q933_REJ_IE_INSUFFICIENT:
993 proto_tree_add_text(tree, tvb, offset, 1,
994 "Insufficient information element: %s",
995 val_to_str(tvb_get_guint8(tvb, offset), q933_info_element_vals0,
996 "Unknown (0x%02X)"));
1000 proto_tree_add_text(tree, tvb, offset, len,
1002 tvb_bytes_to_ep_str(tvb, offset, len));
1007 case Q933_CAUSE_ACCESS_INFO_DISC:
1008 case Q933_CAUSE_INCOMPATIBLE_DEST:
1009 case Q933_CAUSE_MAND_IE_MISSING:
1010 case Q933_CAUSE_IE_NONEX_OR_UNIMPL:
1011 case Q933_CAUSE_INVALID_IE_CONTENTS:
1013 proto_tree_add_text(tree, tvb, offset, 1,
1014 "Information element: %s",
1015 val_to_str(tvb_get_guint8(tvb, offset), q933_info_element_vals0,
1016 "Unknown (0x%02X)"));
1022 case Q933_CAUSE_MT_NONEX_OR_UNIMPL:
1023 case Q933_CAUSE_MSG_INCOMPAT_W_CS:
1024 proto_tree_add_text(tree, tvb, offset, 1,
1026 val_to_str(tvb_get_guint8(tvb, offset), q933_message_type_vals,
1027 "Unknown (0x%02X)"));
1030 case Q933_CAUSE_REC_TIMER_EXP:
1033 proto_tree_add_text(tree, tvb, offset, 3,
1034 "Timer: %.3s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 3, ENC_ASCII));
1038 proto_tree_add_text(tree, tvb, offset, len,
1040 tvb_bytes_to_ep_str(tvb, offset, len));
1045 * Dissect a Call state information element.
1047 static const value_string q933_call_state_vals[] = {
1049 { 0x01, "Call initiated" },
1050 { 0x02, "Overlap sending" },
1051 { 0x03, "Outgoing call proceeding" },
1052 { 0x04, "Call delivered" },
1053 { 0x06, "Call present" },
1054 { 0x07, "Call received" },
1055 { 0x08, "Connect request" },
1056 { 0x09, "Incoming call proceeding" },
1058 { 0x0B, "Disconnect request" },
1059 { 0x0C, "Disconnect indication" },
1060 { 0x0F, "Suspend request" },
1061 { 0x12, "Resume request" },
1062 { 0x13, "Release request" },
1063 { 0x16, "Call abort"},
1064 { 0x19, "Overlap receiving" },
1065 { 0x3D, "Restart request" },
1066 { 0x3E, "Restart" },
1071 dissect_q933_call_state_ie(tvbuff_t *tvb, int offset, int len,
1075 guint8 coding_standard;
1079 octet = tvb_get_guint8(tvb, offset);
1080 coding_standard = octet & 0x60;
1081 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
1082 if (coding_standard != Q933_ITU_STANDARDIZED_CODING) {
1084 * We don't know how the call state is encoded,
1085 * so just dump it as data and be done with it.
1087 proto_tree_add_text(tree, tvb, offset,
1089 tvb_bytes_to_ep_str(tvb, offset, len));
1092 proto_tree_add_text(tree, tvb, offset, 1,
1094 val_to_str(octet & 0x3F, q933_call_state_vals,
1095 "Unknown (0x%02X)"));
1099 * Dissect a Report Type information element.
1101 #define Q933_IE_REPORT_TYPE_FULL_STATUS 0x00
1102 #define Q933_IE_REPORT_TYPE_LINK_VERIFY 0x01
1103 #define Q933_IE_REPORT_TYPE_ASYNC_PVC_STATUS 0x02
1105 static const value_string q933_report_type_vals[] = {
1106 { Q933_IE_REPORT_TYPE_FULL_STATUS, "Full Status" },
1107 { Q933_IE_REPORT_TYPE_LINK_VERIFY, "Link verify" },
1108 { Q933_IE_REPORT_TYPE_ASYNC_PVC_STATUS, "Async PVC Status" },
1113 dissect_q933_report_type_ie(tvbuff_t *tvb, int offset, int len,
1121 report_type = tvb_get_guint8(tvb, offset);
1122 proto_tree_add_uint(tree, hf_q933_report_type, tvb, offset, 1, report_type);
1126 * Dissect a Link Integrity Verification information element.
1129 dissect_q933_link_integrity_verf_ie(tvbuff_t *tvb, int offset, int len,
1137 txseq = tvb_get_guint8(tvb, offset);
1138 rxseq = tvb_get_guint8(tvb, offset+1);
1140 proto_tree_add_uint(tree, hf_q933_link_verf_txseq, tvb, offset, 1, txseq);
1141 proto_tree_add_uint(tree, hf_q933_link_verf_rxseq, tvb, offset+1, 1, rxseq);
1146 * Dissect a PVC status information element.
1148 static const value_string q933_pvc_status_vals[] = {
1152 {0x0a, "New, Active"},
1157 dissect_q933_pvc_status_ie(tvbuff_t *tvb, int offset, int len,
1161 guint8 dlci_status,dlci_len=2;
1166 dlci = ((tvb_get_guint8(tvb, offset) & 0x3F) << 4) |
1167 ((tvb_get_guint8(tvb, offset+1) & 0x78) >> 3);
1169 /* first determine the DLCI field length */
1171 dlci = (dlci << 6) | ((tvb_get_guint8(tvb, offset+2) & 0x7E) >> 1);
1173 } else if (len == 5) {
1174 dlci = (dlci << 13) | (tvb_get_guint8(tvb, offset+3) & 0x7F) |
1175 ((tvb_get_guint8(tvb, offset+4) & 0x7E) >> 1);
1178 dlci_status=tvb_get_guint8(tvb, offset+dlci_len)&0x0a;
1180 proto_tree_add_text(tree, tvb, offset, dlci_len, "DLCI: %u", dlci);
1181 proto_tree_add_text(tree, tvb, offset+dlci_len, 1, "Status: %s",
1182 val_to_str_const(dlci_status, q933_pvc_status_vals, "Unknown"));
1186 * Dissect a Channel identification information element.
1188 #define Q933_INTERFACE_IDENTIFIED 0x40
1189 #define Q933_NOT_BASIC_CHANNEL 0x20
1191 static const value_string q933_basic_channel_selection_vals[] = {
1192 { 0x00, "No channel" },
1193 { 0x01, "B1 channel" },
1194 { 0x02, "B2 channel" },
1195 { 0x03, "Any channel" },
1199 static const value_string q933_not_basic_channel_selection_vals[] = {
1200 { 0x00, "No channel" },
1201 { 0x01, "Channel indicated in following octets" },
1202 { 0x03, "Any channel" },
1206 #define Q933_IS_SLOT_MAP 0x10
1208 static const value_string q933_element_type_vals[] = {
1209 { 0x03, "B-channel units" },
1210 { 0x06, "H0-channel units" },
1211 { 0x08, "H11-channel units" },
1212 { 0x09, "H12-channel units" },
1217 dissect_q933_channel_identification_ie(tvbuff_t *tvb, int offset, int len,
1221 int identifier_offset;
1223 guint8 coding_standard;
1227 octet = tvb_get_guint8(tvb, offset);
1228 proto_tree_add_text(tree, tvb, offset, 1,
1229 "Interface %s identified",
1230 (octet & Q933_INTERFACE_IDENTIFIED) ? "explicitly" : "implicitly");
1231 proto_tree_add_text(tree, tvb, offset, 1,
1233 (octet & Q933_NOT_BASIC_CHANNEL) ? "Not basic" : "Basic");
1234 proto_tree_add_text(tree, tvb, offset, 1,
1235 "Indicated channel is %s",
1236 (octet & 0x08) ? "required" : "preferred");
1237 proto_tree_add_text(tree, tvb, offset, 1,
1238 "Indicated channel is %sthe D-channel",
1239 (octet & 0x04) ? "" : "not ");
1240 if (octet & Q933_NOT_BASIC_CHANNEL) {
1241 proto_tree_add_text(tree, tvb, offset, 1,
1242 "Channel selection: %s",
1243 val_to_str(octet & 0x03, q933_not_basic_channel_selection_vals,
1246 proto_tree_add_text(tree, tvb, offset, 1,
1247 "Channel selection: %s",
1248 val_to_str(octet & 0x03, q933_basic_channel_selection_vals,
1254 if (octet & Q933_INTERFACE_IDENTIFIED) {
1255 identifier_offset = offset;
1260 octet = tvb_get_guint8(tvb, offset);
1264 } while (!(octet & Q933_IE_VL_EXTENSION));
1267 * XXX - do we want to strip off the 8th bit on the
1268 * last octet of the interface identifier?
1270 if (identifier_len != 0) {
1271 proto_tree_add_text(tree, tvb, identifier_offset,
1272 identifier_len, "Interface identifier: %s",
1273 tvb_bytes_to_ep_str(tvb, identifier_offset, identifier_len));
1277 if (octet & Q933_NOT_BASIC_CHANNEL) {
1280 octet = tvb_get_guint8(tvb, offset);
1281 coding_standard = octet & 0x60;
1282 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
1283 if (coding_standard != Q933_ITU_STANDARDIZED_CODING) {
1285 * We don't know how the channel identifier is
1286 * encoded, so just dump it as data and be done
1289 proto_tree_add_text(tree, tvb, offset,
1291 tvb_bytes_to_ep_str(tvb, offset, len));
1294 proto_tree_add_text(tree, tvb, offset, 1,
1295 "Channel is indicated by %s",
1296 (octet & Q933_IS_SLOT_MAP) ? "slot map" : "number");
1297 proto_tree_add_text(tree, tvb, offset, 1,
1299 (octet & Q933_IS_SLOT_MAP) ? "Map element" : "Channel",
1300 val_to_str(octet & 0x0F, q933_element_type_vals,
1301 "Unknown (0x%02X)"));
1304 * XXX - dump the channel number or slot map.
1310 * Dissect a Progress indicator information element.
1312 static const value_string q933_progress_description_vals[] = {
1313 { 0x01, "Call is not end-to-end ISDN - progress information available in-band" },
1314 { 0x02, "Destination address is non-ISDN" },
1315 { 0x03, "Origination address is non-ISDN" },
1316 { 0x04, "Call has returned to the ISDN" },
1317 { 0x05, "Interworking has occurred and has resulted in a telecommunications service change" },
1318 { 0x08, "In-band information or an appropriate pattern is now available" },
1323 dissect_q933_progress_indicator_ie(tvbuff_t *tvb, int offset, int len,
1327 guint8 coding_standard;
1331 octet = tvb_get_guint8(tvb, offset);
1332 coding_standard = octet & 0x60;
1333 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
1334 if (coding_standard != Q933_ITU_STANDARDIZED_CODING) {
1336 * We don't know how the progress indicator is encoded,
1337 * so just dump it as data and be done with it.
1339 proto_tree_add_text(tree, tvb, offset,
1341 tvb_bytes_to_ep_str(tvb, offset, len));
1344 proto_tree_add_text(tree, tvb, offset, 1,
1346 val_to_str(octet & 0x0F, q933_cause_location_vals,
1353 octet = tvb_get_guint8(tvb, offset);
1354 proto_tree_add_text(tree, tvb, offset, 1,
1355 "Progress description: %s",
1356 val_to_str(octet & 0x7F, q933_progress_description_vals,
1357 "Unknown (0x%02X)"));
1361 * Dissect a Network-specific facilities or Transit network selection
1362 * information element.
1364 static const value_string q933_netid_type_vals[] = {
1365 { 0x00, "User specified" },
1366 { 0x20, "National network identification" },
1367 { 0x30, "International network identification" },
1371 static const value_string q933_netid_plan_vals[] = {
1372 { 0x00, "Unknown" },
1373 { 0x01, "Carrier Identification Code" },
1374 { 0x03, "X.121 data network identification code" },
1379 dissect_q933_ns_facilities_ie(tvbuff_t *tvb, int offset, int len,
1387 octet = tvb_get_guint8(tvb, offset);
1388 netid_len = octet & 0x7F;
1389 proto_tree_add_text(tree, tvb, offset, 1,
1390 "Network identification length: %u",
1394 if (netid_len != 0) {
1397 octet = tvb_get_guint8(tvb, offset);
1398 proto_tree_add_text(tree, tvb, offset, 1,
1399 "Type of network identification: %s",
1400 val_to_str(octet & 0x70, q933_netid_type_vals,
1401 "Unknown (0x%02X)"));
1402 proto_tree_add_text(tree, tvb, offset, 1,
1403 "Network identification plan: %s",
1404 val_to_str(octet & 0x0F, q933_netid_plan_vals,
1405 "Unknown (0x%02X)"));
1412 if (netid_len > len)
1414 if (netid_len != 0) {
1415 proto_tree_add_text(tree, tvb, offset, netid_len,
1416 "Network identification: %s",
1417 tvb_format_text(tvb, offset, netid_len));
1418 offset += netid_len;
1424 * Whatever is left is the network-specific facility
1429 proto_tree_add_text(tree, tvb, offset,
1430 len, "Network-specific facility specification: %s",
1431 tvb_bytes_to_ep_str(tvb, offset, len));
1435 dissect_q933_guint16_value(tvbuff_t *tvb, int offset, int len,
1436 proto_tree *tree, const char *label)
1444 octet = tvb_get_guint8(tvb, offset);
1445 if (octet & Q933_IE_VL_EXTENSION) {
1447 * Only one octet long - error.
1451 value = (octet & 0x3) << 14;
1458 * We've reached the end of the information element - error.
1462 octet = tvb_get_guint8(tvb, offset);
1463 if (octet & Q933_IE_VL_EXTENSION) {
1465 * Only two octets long - error.
1469 value |= (octet & 0x7F) << 7;
1476 * We've reached the end of the information element - error.
1480 octet = tvb_get_guint8(tvb, offset);
1481 if (!(octet & Q933_IE_VL_EXTENSION)) {
1483 * More than three octets long - error.
1487 value |= (octet & 0x7F);
1492 proto_tree_add_text(tree, tvb, offset, value_len, "%s: %u ms", label,
1497 proto_tree_add_text(tree, tvb, offset, len,
1498 "%s goes past end of information element", label);
1502 proto_tree_add_text(tree, tvb, offset, len, "%s isn't 3 octets long",
1508 * Dissect an End-to-end transit delay information element.
1511 dissect_q933_e2e_transit_delay_ie(tvbuff_t *tvb, int offset, int len,
1518 value_len = dissect_q933_guint16_value(tvb, offset, len, tree,
1519 "Cumulative transit delay");
1522 offset += value_len;
1527 value_len = dissect_q933_guint16_value(tvb, offset, len, tree,
1528 "Requested end-to-end transit delay");
1531 offset += value_len;
1536 /*value_len = */dissect_q933_guint16_value(tvb, offset, len, tree,
1537 "Maximum end-to-end transit delay");
1541 * Dissect a Transit delay selection and indication information element.
1544 dissect_q933_td_selection_and_int_ie(tvbuff_t *tvb, int offset, int len,
1549 dissect_q933_guint16_value(tvb, offset, len, tree,
1554 dissect_q933_pl_binary_parameters_ie(tvbuff_t *tvb, int offset, int len,
1561 octet = tvb_get_guint8(tvb, offset);
1562 proto_tree_add_text(tree, tvb, offset, 1,
1564 (octet & 0x04) ? "No request/request denied" :
1565 "Request indicated/request accepted");
1566 proto_tree_add_text(tree, tvb, offset, 1,
1568 (octet & 0x02) ? "Link-by-link" : "End-to-end");
1572 * Dissect a Reverse charging indication information element.
1574 static const value_string q933_reverse_charging_indication_vals[] = {
1575 { 0x01, "Reverse charging requested" },
1580 dissect_q933_reverse_charge_ind_ie(tvbuff_t *tvb, int offset, int len,
1585 proto_tree_add_text(tree, tvb, offset, 1,
1586 "Reverse charging indication: %s",
1587 val_to_str(tvb_get_guint8(tvb, offset) & 0x07,
1588 q933_reverse_charging_indication_vals, "Unknown (0x%02X)"));
1592 * Dissect a (phone) number information element.
1594 static const value_string q933_number_type_vals[] = {
1596 { 0x1, "International number" },
1597 { 0x2, "National number" },
1598 { 0x3, "Network specific number" },
1599 { 0x4, "Subscriber number" },
1600 { 0x6, "Abbreviated number" },
1604 static const value_string q933_numbering_plan_vals[] = {
1605 { 0x00, "Unknown" },
1606 { 0x01, "E.164 ISDN/telephony numbering" },
1607 { 0x03, "X.121 data numbering" },
1608 { 0x04, "F.69 Telex numbering" },
1609 { 0x08, "National standard numbering" },
1610 { 0x09, "Private numbering" },
1614 static const value_string q933_presentation_indicator_vals[] = {
1615 { 0x00, "Presentation allowed" },
1616 { 0x01, "Presentation restricted" },
1617 { 0x02, "Number not available due to interworking" },
1621 static const value_string q933_screening_indicator_vals[] = {
1622 { 0x00, "User-provided, not screened" },
1623 { 0x01, "User-provided, verified and passed" },
1624 { 0x02, "User-provided, verified and failed" },
1625 { 0x03, "Network-provided" },
1629 static const value_string q933_redirection_reason_vals[] = {
1630 { 0x00, "Unknown" },
1631 { 0x01, "Call forwarding busy or called DTE busy" },
1632 { 0x02, "Call forwarding no reply" },
1633 { 0x04, "Call deflection" },
1634 { 0x09, "Called DTE out of order" },
1635 { 0x0A, "Call forwarding by the called DTE" },
1636 { 0x0F, "Call forwarding unconditional or systematic call redirection" },
1641 dissect_q933_number_ie(tvbuff_t *tvb, int offset, int len,
1642 proto_tree *tree, int hfindex)
1648 octet = tvb_get_guint8(tvb, offset);
1649 proto_tree_add_uint(tree, hf_q933_numbering_plan, tvb, offset, 1, octet);
1650 proto_tree_add_uint(tree, hf_q933_number_type, tvb, offset, 1, octet);
1651 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
1656 if (!(octet & Q933_IE_VL_EXTENSION)) {
1659 octet = tvb_get_guint8(tvb, offset);
1660 proto_tree_add_uint(tree, hf_q933_screening_ind, tvb, offset, 1, octet);
1661 proto_tree_add_uint(tree, hf_q933_presentation_ind, tvb, offset, 1, octet);
1662 proto_tree_add_boolean(tree, hf_q933_extension_ind, tvb, offset, 1, octet);
1668 * XXX - only in a Redirecting number information element.
1670 if (!(octet & Q933_IE_VL_EXTENSION)) {
1673 octet = tvb_get_guint8(tvb, offset);
1674 proto_tree_add_text(tree, tvb, offset, 1,
1675 "Reason for redirection: %s",
1676 val_to_str(octet & 0x0F, q933_redirection_reason_vals,
1684 proto_tree_add_item(tree, hfindex, tvb, offset, len, ENC_ASCII|ENC_NA);
1688 * Dissect a party subaddress information element.
1690 static const value_string q933_subaddress_type_vals[] = {
1691 { 0x00, "X.213/ISO 8348 Add.2 NSAP" },
1692 { 0x20, "User-specified" },
1696 static const value_string q933_odd_even_indicator_vals[] = {
1697 { 0x00, "Even number of address signals" },
1698 { 0x10, "Odd number of address signals" },
1703 dissect_q933_party_subaddr_ie(tvbuff_t *tvb, int offset, int len,
1710 octet = tvb_get_guint8(tvb, offset);
1711 proto_tree_add_text(tree, tvb, offset, 1,
1712 "Type of subaddress: %s",
1713 val_to_str(octet & 0x70, q933_subaddress_type_vals,
1714 "Unknown (0x%02X)"));
1715 proto_tree_add_text(tree, tvb, offset, 1,
1716 "Odd/even indicator: %s",
1717 val_to_str(octet & 0x10, q933_odd_even_indicator_vals,
1718 "Unknown (0x%02X)"));
1724 proto_tree_add_text(tree, tvb, offset, len, "Subaddress: %s",
1725 tvb_bytes_to_ep_str(tvb, offset, len));
1729 * Dissect a High-layer compatibility information element.
1731 #define Q933_AUDIOVISUAL 0x60
1732 static const value_string q933_high_layer_characteristics_vals[] = {
1733 { 0x01, "Telephony" },
1734 { 0x04, "F.182 Facsimile Group 2/3" },
1735 { 0x21, "F.184 Facsimile Group 4 Class I" },
1736 { 0x24, "F.230 Teletex, basic and mixed mode, and F.184 Facsimile Group 4, Classes II and III" },
1737 { 0x28, "F.220 Teletex, basic and processable mode" },
1738 { 0x31, "F.200 Teletex, basic mode" },
1739 { 0x32, "F.300 and T.102 syntax-based Videotex" },
1740 { 0x33, "F.300 and T.101 international Videotex interworking" },
1741 { 0x35, "F.60 Telex" },
1742 { 0x38, "X.400 Message Handling Systems" },
1743 { 0x41, "X.200 OSI application" },
1744 { 0x42, "FTAM application" },
1745 { 0x5E, "Reserved for maintenance" },
1746 { 0x5F, "Reserved for management" },
1747 { Q933_AUDIOVISUAL, "F.720/F.821 and F.731 Profile 1a videotelephony" },
1748 { 0x61, "F.702 and F.731 Profile 1b videoconferencing" },
1749 { 0x62, "F.702 and F.731 audiographic conferencing" },
1753 static const value_string q933_audiovisual_characteristics_vals[] = {
1754 { 0x01, "Capability set of initial channel of H.221" },
1755 { 0x02, "Capability set of subsequent channel of H.221" },
1756 { 0x21, "Capability set of initial channel of an active 3.1kHz audio or speech call" },
1761 dissect_q933_high_layer_compat_ie(tvbuff_t *tvb, int offset, int len,
1765 guint8 coding_standard;
1766 guint8 characteristics;
1770 octet = tvb_get_guint8(tvb, offset);
1771 coding_standard = octet & 0x60;
1772 proto_tree_add_uint(tree, hf_q933_coding_standard, tvb, offset, 1, octet);
1775 if (coding_standard != Q933_ITU_STANDARDIZED_CODING) {
1777 * We don't know how the call state is encoded,
1778 * so just dump it as data and be done with it.
1780 proto_tree_add_text(tree, tvb, offset,
1782 tvb_bytes_to_ep_str(tvb, offset, len));
1788 octet = tvb_get_guint8(tvb, offset);
1789 characteristics = octet & 0x7F;
1790 proto_tree_add_text(tree, tvb, offset, 1,
1791 "High layer characteristics identification: %s",
1792 val_to_str(characteristics, q933_high_layer_characteristics_vals,
1793 "Unknown (0x%02X)"));
1797 if (!(octet & Q933_IE_VL_EXTENSION)) {
1800 octet = tvb_get_guint8(tvb, offset);
1801 if (characteristics == Q933_AUDIOVISUAL) {
1802 proto_tree_add_text(tree, tvb, offset, 1,
1803 "Extended audiovisual characteristics identification: %s",
1804 val_to_str(octet & 0x7F,
1805 q933_audiovisual_characteristics_vals,
1806 "Unknown (0x%02X)"));
1808 proto_tree_add_text(tree, tvb, offset, 1,
1809 "Extended high layer characteristics identification: %s",
1810 val_to_str(octet & 0x7F,
1811 q933_high_layer_characteristics_vals,
1812 "Unknown (0x%02X)"));
1819 * Dissect a User-user information element.
1821 #define Q933_PROTOCOL_DISCRIMINATOR_IA5 0x04
1822 #define Q933_PROTOCOL_DISCRIMINATOR_ASN1 0x05
1824 static const value_string q933_protocol_discriminator_vals[] = {
1825 { 0x00, "User-specific protocol" },
1826 { 0x01, "OSI high layer protocols" },
1828 { Q933_PROTOCOL_DISCRIMINATOR_IA5, "IA5 characters" },
1829 { Q933_PROTOCOL_DISCRIMINATOR_ASN1, "X.208 and X.209 coded user information" },
1830 { 0x07, "V.120 rate adaption" },
1831 { 0x08, "Q.933/I.451 user-network call control messages" },
1836 dissect_q933_user_user_ie(tvbuff_t *tvb, int offset, int len,
1843 octet = tvb_get_guint8(tvb, offset);
1844 proto_tree_add_text(tree, tvb, offset, 1,
1845 "Protocol discriminator: %s",
1846 val_to_str(octet, q933_protocol_discriminator_vals,
1847 "Unknown (0x%02x)"));
1855 case Q933_PROTOCOL_DISCRIMINATOR_IA5:
1856 proto_tree_add_text(tree, tvb, offset, len, "User information: %s",
1857 tvb_format_text(tvb, offset, len));
1861 proto_tree_add_text(tree, tvb, offset, len, "User information: %s",
1862 tvb_bytes_to_ep_str(tvb, offset, len));
1868 * Dissect information elements consisting of ASCII^H^H^H^H^HIA5 text.
1871 dissect_q933_ia5_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
1875 proto_tree_add_text(tree, tvb, offset, len, "%s: %s", label,
1876 tvb_format_text(tvb, offset, len));
1880 static const value_string q933_codeset_vals[] = {
1881 { 0x00, "Q.933 information elements" },
1882 { 0x04, "Information elements for ISO/IEC use" },
1883 { 0x05, "Information elements for national use" },
1884 { 0x06, "Information elements specific to the local network" },
1885 { 0x07, "User-specific information elements" },
1890 dissect_q933(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1893 proto_tree *q933_tree = NULL;
1895 proto_tree *ie_tree = NULL;
1896 guint8 call_ref_len;
1897 guint8 call_ref[15];
1898 guint8 message_type;
1899 guint8 info_element;
1900 guint16 info_element_len;
1901 int codeset, locked_codeset;
1902 gboolean non_locking_shift;
1904 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.933");
1907 ti = proto_tree_add_item(tree, proto_q933, tvb, offset, -1,
1909 q933_tree = proto_item_add_subtree(ti, ett_q933);
1911 dissect_q933_protocol_discriminator(tvb, offset, q933_tree);
1914 call_ref_len = tvb_get_guint8(tvb, offset) & 0xF; /* XXX - do as a bit field? */
1915 if (q933_tree != NULL)
1916 proto_tree_add_uint(q933_tree, hf_q933_call_ref_len, tvb, offset, 1, call_ref_len);
1918 if (call_ref_len != 0) {
1919 tvb_memcpy(tvb, call_ref, offset, call_ref_len);
1920 if (q933_tree != NULL) {
1921 proto_tree_add_boolean(q933_tree, hf_q933_call_ref_flag,
1922 tvb, offset, 1, (call_ref[0] & 0x80) != 0);
1923 call_ref[0] &= 0x7F;
1924 proto_tree_add_bytes(q933_tree, hf_q933_call_ref,
1925 tvb, offset, call_ref_len, call_ref);
1927 offset += call_ref_len;
1929 message_type = tvb_get_guint8(tvb, offset);
1930 col_add_str(pinfo->cinfo, COL_INFO,
1931 val_to_str(message_type, q933_message_type_vals,
1932 "Unknown message type (0x%02X)"));
1934 proto_tree_add_uint(q933_tree, hf_q933_message_type, tvb, offset, 1, message_type);
1938 * And now for the information elements....
1940 codeset = locked_codeset = 0; /* start out in codeset 0 */
1941 while (tvb_reported_length_remaining(tvb, offset) > 0) {
1942 info_element = tvb_get_guint8(tvb, offset);
1944 /* Check for the codeset shift */
1945 if ((info_element & Q933_IE_SO_MASK) &&
1946 ((info_element & Q933_IE_SO_IDENTIFIER_MASK) == Q933_IE_SHIFT)) {
1947 non_locking_shift = info_element & Q933_IE_SHIFT_NON_LOCKING;
1948 codeset = info_element & Q933_IE_SHIFT_CODESET;
1949 if (!non_locking_shift)
1950 locked_codeset = codeset;
1951 if (q933_tree != NULL) {
1952 proto_tree_add_text(q933_tree, tvb, offset, 1,
1953 "%s shift to codeset %u: %s",
1954 (non_locking_shift ? "Non-locking" : "Locking"),
1956 val_to_str(codeset, q933_codeset_vals,
1957 "Unknown (0x%02X)"));
1964 * Check for the single-octet IEs.
1966 if (info_element & Q933_IE_SO_MASK) {
1967 switch ((codeset << 8) | (info_element & Q933_IE_SO_IDENTIFIER_MASK)) {
1969 case CS0 | Q933_IE_REPEAT_INDICATOR:
1970 if (q933_tree != NULL) {
1971 proto_tree_add_text(q933_tree, tvb, offset, 1,
1972 "Repeat indicator: %s",
1973 val_to_str(info_element & Q933_IE_SO_IE_MASK,
1974 q933_repeat_indication_vals,
1980 if (q933_tree != NULL) {
1981 proto_tree_add_text(q933_tree, tvb, offset, 1,
1982 "Unknown information element (0x%02X)",
1988 codeset = locked_codeset;
1993 * Variable-length IE.
1995 info_element_len = tvb_get_guint8(tvb, offset + 1);
1996 if (q933_tree != NULL) {
1997 ti = proto_tree_add_text(q933_tree, tvb, offset,
1998 1+1+info_element_len, "%s",
1999 val_to_str(info_element, q933_info_element_vals[codeset],
2000 "Unknown information element (0x%02X)"));
2001 ie_tree = proto_item_add_subtree(ti, ett_q933_ie);
2002 proto_tree_add_text(ie_tree, tvb, offset, 1,
2003 "Information element: %s",
2004 val_to_str(info_element, q933_info_element_vals[codeset],
2005 "Unknown (0x%02X)"));
2006 proto_tree_add_text(ie_tree, tvb, offset + 1, 1,
2007 "Length: %u", info_element_len);
2009 switch ((codeset << 8) | info_element) {
2011 case CS0 | Q933_IE_SEGMENTED_MESSAGE:
2012 dissect_q933_segmented_message_ie(tvb,
2013 offset + 2, info_element_len,
2017 case CS0 | Q933_IE_BEARER_CAPABILITY:
2018 case CS0 | Q933_IE_LOW_LAYER_COMPAT:
2019 dissect_q933_bearer_capability_ie(tvb,
2020 offset + 2, info_element_len,
2024 case CS0 | Q933_IE_CAUSE:
2025 dissect_q933_cause_ie(tvb,
2026 offset + 2, info_element_len,
2028 hf_q933_cause_value);
2031 case CS0 | Q933_IE_CALL_STATE:
2032 dissect_q933_call_state_ie(tvb,
2033 offset + 2, info_element_len,
2037 case CS0 | Q933_IE_CHANNEL_IDENTIFICATION:
2038 dissect_q933_channel_identification_ie(
2039 tvb, offset + 2, info_element_len,
2043 case CS0 | Q933_IE_PROGRESS_INDICATOR:
2044 dissect_q933_progress_indicator_ie(tvb,
2045 offset + 2, info_element_len,
2049 case CS0 | Q933_IE_NETWORK_SPECIFIC_FACIL:
2050 case CS0 | Q933_IE_TRANSIT_NETWORK_SEL:
2051 dissect_q933_ns_facilities_ie(tvb,
2052 offset + 2, info_element_len,
2056 case CS0 | Q933_IE_DISPLAY:
2057 dissect_q933_ia5_ie(tvb, offset + 2,
2058 info_element_len, ie_tree,
2059 "Display information");
2062 case CS0 | Q933_IE_E2E_TRANSIT_DELAY:
2063 dissect_q933_e2e_transit_delay_ie(tvb,
2064 offset + 2, info_element_len,
2068 case CS0 | Q933_IE_TD_SELECTION_AND_INT:
2069 dissect_q933_td_selection_and_int_ie(
2070 tvb, offset + 2, info_element_len,
2074 case CS0 | Q933_IE_PL_BINARY_PARAMETERS:
2075 dissect_q933_pl_binary_parameters_ie(
2076 tvb, offset + 2, info_element_len,
2080 case CS0 | Q933_IE_REVERSE_CHARGE_IND:
2081 dissect_q933_reverse_charge_ind_ie(tvb,
2082 offset + 2, info_element_len,
2086 case CS0 | Q933_IE_CALLING_PARTY_NUMBER:
2087 dissect_q933_number_ie(tvb,
2088 offset + 2, info_element_len,
2090 hf_q933_calling_party_number);
2093 case CS0 | Q933_IE_CONNECTED_NUMBER:
2094 dissect_q933_number_ie(tvb,
2095 offset + 2, info_element_len,
2097 hf_q933_connected_number);
2100 case CS0 | Q933_IE_CALLED_PARTY_NUMBER:
2101 dissect_q933_number_ie(tvb,
2102 offset + 2, info_element_len,
2104 hf_q933_called_party_number);
2107 case CS0 | Q933_IE_CALLING_PARTY_SUBADDR:
2108 case CS0 | Q933_IE_CALLED_PARTY_SUBADDR:
2109 dissect_q933_party_subaddr_ie(tvb,
2110 offset + 2, info_element_len,
2114 case CS0 | Q933_IE_HIGH_LAYER_COMPAT:
2115 dissect_q933_high_layer_compat_ie(tvb,
2116 offset + 2, info_element_len,
2120 case CS0 | Q933_IE_USER_USER:
2121 dissect_q933_user_user_ie(tvb,
2122 offset + 2, info_element_len,
2127 case CS0 | Q933_IE_REPORT_TYPE:
2128 case CS5 | Q933_IE_REPORT_TYPE:
2129 case CS5 | Q933_IE_ANSI_REPORT_TYPE:
2130 dissect_q933_report_type_ie(tvb,
2131 offset + 2, info_element_len,
2135 case CS5 | Q933_IE_LINK_INTEGRITY_VERF:
2136 case CS5 | Q933_IE_ANSI_LINK_INTEGRITY_VERF:
2137 dissect_q933_link_integrity_verf_ie(tvb,
2138 offset + 2, info_element_len,
2142 case CS5 | Q933_IE_PVC_STATUS:
2143 case CS5 | Q933_IE_ANSI_PVC_STATUS:
2144 dissect_q933_pvc_status_ie(tvb,
2145 offset + 2, info_element_len,
2150 proto_tree_add_text(ie_tree, tvb,
2151 offset + 2, info_element_len,
2153 tvb_bytes_to_ep_str(tvb, offset + 2,
2158 offset += 1 + 1 + info_element_len;
2159 codeset = locked_codeset;
2164 proto_register_q933(void)
2166 static hf_register_info hf[] = {
2167 { &hf_q933_discriminator,
2168 { "Protocol discriminator", "q933.disc", FT_UINT8, BASE_HEX, NULL, 0x0,
2171 { &hf_q933_call_ref_flag,
2172 { "Call reference flag", "q933.call_ref_flag", FT_BOOLEAN, BASE_NONE, TFS(&tfs_call_ref_flag), 0x0,
2175 { &hf_q933_call_ref,
2176 { "Call reference value", "q933.call_ref", FT_BYTES, BASE_NONE, NULL, 0x0,
2180 { &hf_q933_coding_standard,
2181 { "Coding standard", "q933.coding_standard", FT_UINT8, BASE_HEX,
2182 VALS(q933_coding_standard_vals), 0x60,NULL, HFILL }},
2184 { &hf_q933_information_transfer_capability,
2185 { "Information transfer capability", "q933.information_transfer_capability", FT_UINT8, BASE_HEX,
2186 VALS(q933_information_transfer_capability_vals), 0x1f,NULL, HFILL }},
2188 { &hf_q933_transfer_mode,
2189 { "Transfer mode", "q933.transfer_mode", FT_UINT8, BASE_HEX,
2190 VALS(q933_transfer_mode_vals), 0x60,NULL, HFILL }},
2193 { "User information layer 1 protocol", "q933.uil1", FT_UINT8, BASE_HEX,
2194 VALS(q933_uil1_vals), 0x1f,NULL, HFILL }},
2196 { &hf_q933_call_ref_len,
2197 { "Call reference value length", "q933.call_ref_len", FT_UINT8, BASE_DEC, NULL, 0x0,
2200 { &hf_q933_message_type,
2201 { "Message type", "q933.message_type", FT_UINT8, BASE_HEX, VALS(q933_message_type_vals), 0x0,
2204 { &hf_q933_cause_location,
2205 { "Cause location", "q933.cause_location", FT_UINT8, BASE_DEC, VALS(q933_cause_location_vals), 0x0f,
2208 { &hf_q933_cause_value,
2209 { "Cause value", "q933.cause_value", FT_UINT8, BASE_DEC, VALS(q933_cause_code_vals), 0x7f,
2212 { &hf_q933_number_type,
2213 { "Number type", "q933.number_type", FT_UINT8, BASE_HEX, VALS(q933_number_type_vals), 0x70,
2216 { &hf_q933_numbering_plan,
2217 { "numbering plan", "q933.numbering_plan", FT_UINT8, BASE_HEX, VALS(q933_numbering_plan_vals), 0x0f,
2220 { &hf_q933_screening_ind,
2221 { "Screening indicator", "q933.screening_ind", FT_UINT8, BASE_HEX, VALS(q933_screening_indicator_vals), 0x03,
2224 { &hf_q933_presentation_ind,
2225 { "Presentation indicator", "q933.presentation_ind", FT_UINT8, BASE_HEX, VALS(q933_presentation_indicator_vals), 0x60,
2228 { &hf_q933_extension_ind,
2229 { "Extension indicator", "q933.extension_ind",
2230 FT_BOOLEAN, 8, TFS(&q933_extension_ind_value), 0x80,
2233 { &hf_q933_calling_party_number,
2234 { "Calling party number digits", "q933.calling_party_number.digits", FT_STRING, BASE_NONE, NULL, 0x0,
2237 { &hf_q933_called_party_number,
2238 { "Called party number digits", "q933.called_party_number.digits", FT_STRING, BASE_NONE, NULL, 0x0,
2241 { &hf_q933_connected_number,
2242 { "Connected party number digits", "q933.connected_number.digits", FT_STRING, BASE_NONE, NULL, 0x0,
2246 { &hf_q933_redirecting_number,
2247 { "Redirecting party number digits", "q933.redirecting_number.digits", FT_STRING, BASE_NONE, NULL, 0x0,
2250 { &hf_q933_report_type,
2251 { "Report type", "q933.report_type", FT_UINT8, BASE_DEC, VALS(q933_report_type_vals), 0x0,
2253 { &hf_q933_link_verf_txseq,
2254 { "TX Sequence", "q933.link_verification.txseq", FT_UINT8, BASE_DEC, NULL, 0x0,
2256 { &hf_q933_link_verf_rxseq,
2257 { "RX Sequence", "q933.link_verification.rxseq", FT_UINT8, BASE_DEC, NULL, 0x0,
2261 static gint *ett[] = {
2266 proto_q933 = proto_register_protocol("Q.933", "Q.933", "q933");
2267 proto_register_field_array (proto_q933, hf, array_length(hf));
2268 proto_register_subtree_array(ett, array_length(ett));
2270 register_dissector("q933", dissect_q933, proto_q933);
2274 proto_reg_handoff_q933(void)
2276 dissector_handle_t q933_handle;
2278 q933_handle = find_dissector("q933");
2279 dissector_add_uint("fr.osinl", NLPID_Q_933, q933_handle);