2 * Routines for Q.931 frame disassembly
3 * Guy Harris <guy@alum.mit.edu>
5 * $Id: packet-q931.c,v 1.11 1999/11/25 22:49:01 guy Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@zing.org>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #ifdef HAVE_SYS_TYPES_H
32 # include <sys/types.h>
39 #include "packet-q931.h"
43 * http://www.acacia-net.com/Clarinet/Protocol/q9313svn.htm
44 * http://www.acacia-net.com/Clarinet/Protocol/q9311sc3.htm
45 * http://www.acacia-net.com/Clarinet/Protocol/q9317oz7.htm
46 * http://www.protocols.com/pbook/isdn.htm
47 * http://freesoft.org/CIE/Topics/126.htm
48 * http://noc.comstar.ru/miscdocs/ascend-faq-cause-codes.html
49 * http://www.andrews-arnold.co.uk/isdn/q931cause.html
50 * http://www.tulatelecom.ru/staff/german/DSSHelp/MessList/InfEl/InfElList.html
53 static int proto_q931 = -1;
54 static int hf_q931_discriminator = -1;
55 static int hf_q931_call_ref_len = -1;
56 static int hf_q931_call_ref = -1;
57 static int hf_q931_message_type = -1;
59 static gint ett_q931 = -1;
60 static gint ett_q931_ie = -1;
63 * Q.931 message types.
65 #define Q931_ALERTING 0x01
66 #define Q931_CALL_PROCEEDING 0x02
67 #define Q931_CONNECT 0x07
68 #define Q931_CONNECT_ACK 0x0F
69 #define Q931_PROGRESS 0x03
70 #define Q931_SETUP 0x05
71 #define Q931_SETUP_ACK 0x0B
72 #define Q931_HOLD 0x24
73 #define Q931_HOLD_ACK 0x28
74 #define Q931_HOLD_REJECT 0x30
75 #define Q931_RESUME 0x26
76 #define Q931_RESUME_ACK 0x2E
77 #define Q931_RESUME_REJECT 0x22
78 #define Q931_RETRIEVE 0x31
79 #define Q931_RETRIEVE_ACK 0x33
80 #define Q931_RETRIEVE_REJECT 0x37
81 #define Q931_SUSPEND 0x25
82 #define Q931_SUSPEND_ACK 0x2D
83 #define Q931_SUSPEND_REJECT 0x21
84 #define Q931_USER_INFORMATION 0x20
85 #define Q931_DISCONNECT 0x45
86 #define Q931_RELEASE 0x4D
87 #define Q931_RELEASE_COMPLETE 0x5A
88 #define Q931_RESTART 0x46
89 #define Q931_RESTART_ACK 0x4E
90 #define Q931_CONGESTION_CONTROL 0x79
91 #define Q931_FACILITY 0x62
92 #define Q931_INFORMATION 0x7B
93 #define Q931_NOTIFY 0x6E
94 #define Q931_REGISTER 0x64
95 #define Q931_SEGMENT 0x60
96 #define Q931_STATUS 0x7D
97 #define Q931_STATUS_ENQUIRY 0x75
99 static const value_string q931_message_type_vals[] = {
100 { Q931_ALERTING, "ALERTING" },
101 { Q931_CALL_PROCEEDING, "CALL PROCEEDING" },
102 { Q931_CONNECT, "CONNECT" },
103 { Q931_CONNECT_ACK, "CONNECT ACKNOWLEDGE" },
104 { Q931_PROGRESS, "PROGRESS" },
105 { Q931_SETUP, "SETUP" },
106 { Q931_SETUP_ACK, "SETUP ACKNOWLEDGE" },
107 { Q931_HOLD, "HOLD" },
108 { Q931_HOLD_ACK, "HOLD_ACKNOWLEDGE" },
109 { Q931_HOLD_REJECT, "HOLD_REJECT" },
110 { Q931_RESUME, "RESUME" },
111 { Q931_RESUME_ACK, "RESUME ACKNOWLEDGE" },
112 { Q931_RESUME_REJECT, "RESUME REJECT" },
113 { Q931_RETRIEVE, "RETRIEVE" },
114 { Q931_RETRIEVE_ACK, "RETRIEVE ACKNOWLEDGE" },
115 { Q931_RETRIEVE_REJECT, "RETRIEVE REJECT" },
116 { Q931_SUSPEND, "SUSPEND" },
117 { Q931_SUSPEND_ACK, "SUSPEND ACKNOWLEDGE" },
118 { Q931_SUSPEND_REJECT, "SUSPEND REJECT" },
119 { Q931_USER_INFORMATION, "USER INFORMATION" },
120 { Q931_DISCONNECT, "DISCONNECT" },
121 { Q931_RELEASE, "RELEASE" },
122 { Q931_RELEASE_COMPLETE, "RELEASE COMPLETE" },
123 { Q931_RESTART, "RESTART" },
124 { Q931_RESTART_ACK, "RESTART ACKNOWLEDGE" },
125 { Q931_CONGESTION_CONTROL, "CONGESTION CONTROL" },
126 { Q931_FACILITY, "FACILITY" },
127 { Q931_INFORMATION, "INFORMATION" },
128 { Q931_NOTIFY, "NOTIFY" },
129 { Q931_REGISTER, "REGISTER" },
130 { Q931_SEGMENT, "SEGMENT" },
131 { Q931_STATUS, "STATUS" },
132 { Q931_STATUS_ENQUIRY, "STATUS ENQUIRY" },
137 * Information elements.
143 #define Q931_IE_SO_IDENTIFIER_MASK 0x70 /* IE identifier mask */
144 #define Q931_IE_SO_IDENTIFIER_SHIFT 4 /* IE identifier shift */
145 #define Q931_IE_SO_IE_MASK 0x0F /* IE mask */
147 #define Q931_IE_SHIFT 0x90
148 #define Q931_IE_SHIFT_LOCKING 0x08 /* locking shift */
149 #define Q931_IE_SHIFT_CODESET 0x0F /* codeset */
151 #define Q931_IE_MORE_DATA_OR_SEND_COMP 0xA0 /* More Data or Sending Complete */
152 #define Q931_IE_MORE_DATA 0xA0
153 #define Q931_IE_SENDING_COMPLETE 0xA1
155 #define Q931_IE_CONGESTION_LEVEL 0xB0
156 #define Q931_IE_REPEAT_INDICATOR 0xD0
159 * Variable-length IEs.
161 #define Q931_IE_VL_EXTENSION 0x80 /* Extension flag */
164 * Codeset 0 (default).
166 #define Q931_IE_SEGMENTED_MESSAGE 0x00
167 #define Q931_IE_BEARER_CAPABILITY 0x04
168 #define Q931_IE_CAUSE 0x08
169 #define Q931_IE_CALL_IDENTITY 0x10
170 #define Q931_IE_CALL_STATE 0x14
171 #define Q931_IE_CHANNEL_IDENTIFICATION 0x18
172 #define Q931_IE_FACILITY 0x1C
173 #define Q931_IE_PROGRESS_INDICATOR 0x1E
174 #define Q931_IE_NETWORK_SPECIFIC_FACIL 0x20 /* Network Specific Facilities */
175 #define Q931_IE_NOTIFICATION_INDICATOR 0x27
176 #define Q931_IE_DISPLAY 0x28
177 #define Q931_IE_DATE_TIME 0x29
178 #define Q931_IE_KEYPAD_FACILITY 0x2C
179 #define Q931_IE_INFORMATION_REQUEST 0x32
180 #define Q931_IE_SIGNAL 0x34
181 #define Q931_IE_SWITCHHOOK 0x36
182 #define Q931_IE_FEATURE_ACTIVATION 0x38
183 #define Q931_IE_FEATURE_INDICATION 0x39
184 #define Q931_IE_ENDPOINT_IDENTIFIER 0x3B
185 #define Q931_IE_SERVICE_PROFILE_ID 0x3A
186 #define Q931_IE_INFORMATION_RATE 0x40
187 #define Q931_IE_E2E_TRANSIT_DELAY 0x42 /* End-to-end Transit Delay */
188 #define Q931_IE_TD_SELECTION_AND_INT 0x43 /* Transit Delay Selection and Indication */
189 #define Q931_IE_PL_BINARY_PARAMETERS 0x44 /* Packet layer binary parameters */
190 #define Q931_IE_PL_WINDOW_SIZE 0x45 /* Packet layer window size */
191 #define Q931_IE_PACKET_SIZE 0x46 /* Packet size */
192 #define Q931_IE_CUG 0x47 /* Closed user group */
193 #define Q931_IE_REVERSE_CHARGE_IND 0x4A /* Reverse charging indication */
194 #define Q931_IE_CALLING_PARTY_NUMBER 0x6C /* Calling Party Number */
195 #define Q931_IE_CALLING_PARTY_SUBADDR 0x6D /* Calling Party Subaddress */
196 #define Q931_IE_CALLED_PARTY_NUMBER 0x70 /* Called Party Number */
197 #define Q931_IE_CALLED_PARTY_SUBADDR 0x71 /* Called Party Subaddress */
198 #define Q931_IE_REDIRECTING_NUMBER 0x74
199 #define Q931_IE_REDIRECTION_NUMBER 0x76
200 #define Q931_IE_TRANSIT_NETWORK_SEL 0x78 /* Transit Network Selection */
201 #define Q931_IE_RESTART_INDICATOR 0x79
202 #define Q931_IE_LOW_LAYER_COMPAT 0x7C /* Low-Layer Compatibility */
203 #define Q931_IE_HIGH_LAYER_COMPAT 0x7D /* High-Layer Compatibility */
204 #define Q931_IE_USER_USER 0x7E /* User-User */
205 #define Q931_IE_ESCAPE 0x7F /* Escape for extension */
210 #define Q931_IE_CONNECTED_NUMBER 0x8C
211 #define Q931_IE_CONNECTED_SUBADDR 0x8D
214 * Codeset 5 (National-specific) Belgium.
216 #define Q931_IE_CHARGING_ADVICE 0x1A
219 * Codeset 5 (National-specific) Bellcore National ISDN.
221 #define Q931_IE_OPERATOR_SYSTEM_ACCESS 0x1D
224 * Codeset 6 (Network-specific) Belgium.
226 /* 0x1A is Charging Advice, as with Codeset 5 */
227 #define Q931_IE_REDIRECTING_NUMBER 0x74
230 * Codeset 6 (Network-specific) FT-Numeris.
232 /* 0x1D is User Capability */
235 * Codeset 6 (Network-specific) Bellcore National ISDN.
237 #define Q931_IE_REDIRECTING_SUBADDR 0x75 /* Redirecting Subaddress */
238 /* 0x76 is Redirection Number, but that's also Codeset 0 */
239 #define Q931_IE_CALL_APPEARANCE 0x7B
241 static const value_string q931_info_element_vals[] = {
242 { Q931_IE_SEGMENTED_MESSAGE, "Segmented message" },
243 { Q931_IE_BEARER_CAPABILITY, "Bearer capability" },
244 { Q931_IE_CAUSE, "Cause" },
245 { Q931_IE_CALL_IDENTITY, "Call identity" },
246 { Q931_IE_CALL_STATE, "Call state" },
247 { Q931_IE_CHANNEL_IDENTIFICATION, "Channel identification" },
248 { Q931_IE_FACILITY, "Facility" },
249 { Q931_IE_PROGRESS_INDICATOR, "Progress indicator" },
250 { Q931_IE_NETWORK_SPECIFIC_FACIL, "Network specific facilities" },
251 { Q931_IE_NOTIFICATION_INDICATOR, "Notification indicator" },
252 { Q931_IE_DISPLAY, "Display" },
253 { Q931_IE_DATE_TIME, "Date/Time" },
254 { Q931_IE_KEYPAD_FACILITY, "Keypad facility" },
255 { Q931_IE_INFORMATION_REQUEST, "Information request" },
256 { Q931_IE_SIGNAL, "Signal" },
257 { Q931_IE_SWITCHHOOK, "Switchhook" },
258 { Q931_IE_FEATURE_ACTIVATION, "Feature activation" },
259 { Q931_IE_FEATURE_INDICATION, "Feature Indication" },
260 { Q931_IE_ENDPOINT_IDENTIFIER, "Endpoint identifier" },
261 { Q931_IE_SERVICE_PROFILE_ID, "Service profile ID" },
262 { Q931_IE_INFORMATION_RATE, "Information rate" },
263 { Q931_IE_E2E_TRANSIT_DELAY, "End-to-end transit delay" },
264 { Q931_IE_TD_SELECTION_AND_INT, "Transit delay selection and indication" },
265 { Q931_IE_PL_BINARY_PARAMETERS, "Packet layer binary parameters" },
266 { Q931_IE_PL_WINDOW_SIZE, "Packet layer window size" },
267 { Q931_IE_PACKET_SIZE, "Packet size" },
268 { Q931_IE_CUG, "Closed user group" },
269 { Q931_IE_REVERSE_CHARGE_IND, "Reverse charging indication" },
270 { Q931_IE_CALLING_PARTY_NUMBER, "Calling party number" },
271 { Q931_IE_CALLING_PARTY_SUBADDR, "Calling party subaddress" },
272 { Q931_IE_CALLED_PARTY_NUMBER, "Called party number" },
273 { Q931_IE_CALLED_PARTY_SUBADDR, "Called party subaddress" },
274 { Q931_IE_REDIRECTING_NUMBER, "Redirecting number" },
275 { Q931_IE_REDIRECTION_NUMBER, "Redirection number" },
276 { Q931_IE_TRANSIT_NETWORK_SEL, "Transit network selection" },
277 { Q931_IE_RESTART_INDICATOR, "Restart indicator" },
278 { Q931_IE_LOW_LAYER_COMPAT, "Low-layer compatibility" },
279 { Q931_IE_HIGH_LAYER_COMPAT, "High-layer compatibility" },
280 { Q931_IE_USER_USER, "User-user" },
281 { Q931_IE_ESCAPE, "Escape" },
282 { Q931_IE_CONNECTED_NUMBER, "Connected number" },
283 { Q931_IE_CONNECTED_SUBADDR, "Connected subaddress" },
284 { Q931_IE_CHARGING_ADVICE, "Charging advice" },
285 { Q931_IE_OPERATOR_SYSTEM_ACCESS, "Operator system access" },
286 { Q931_IE_REDIRECTING_NUMBER, "Redirecting number" },
287 { Q931_IE_REDIRECTING_SUBADDR, "Redirecting subaddress" },
288 { Q931_IE_CALL_APPEARANCE, "Call appearance" },
292 static const value_string q931_congestion_level_vals[] = {
293 { 0x0, "Receiver ready" },
294 { 0xF, "Receiver not ready" },
298 static const value_string q931_repeat_indication_vals[] = {
299 { 0x2, "Prioritized list" },
304 * ITU-standardized coding.
306 #define Q931_ITU_STANDARDIZED_CODING 0x00
309 * Dissect a Segmented message information element.
312 dissect_q931_segmented_message_ie(const u_char *pd, int offset, int len,
316 proto_tree_add_text(tree, offset, len,
317 "Segmented message: length is %d, should be 2\n", len);
320 if (pd[offset] & 0x80) {
321 proto_tree_add_text(tree, offset, 1,
322 "First segment: %u segments remaining",
325 proto_tree_add_text(tree, offset, 1,
326 "Not first segment: %u segments remaining",
329 proto_tree_add_text(tree, offset + 1, 1,
330 "Segmented message type: %u\n", pd[offset + 1]);
334 * Dissect a Bearer capability or Low-layer compatibility information element.
336 static const value_string q931_bc_coding_standard_vals[] = {
337 { 0x00, "ITU-T standardized coding" },
338 { 0x20, "ISO/IEC standard" },
339 { 0x40, "National standard" },
340 { 0x60, "Standard defined for this particular network" },
344 static const value_string q931_information_transfer_capability_vals[] = {
346 { 0x08, "Unrestricted digital information" },
347 { 0x09, "Restricted digital information" },
348 { 0x10, "3.1 kHz audio" },
349 { 0x11, "Unrestricted digital information with tones/announcements" },
354 static const value_string q931_transfer_mode_vals[] = {
355 { 0x00, "Circuit mode" },
356 { 0x40, "Packet mode" },
360 #define Q931_IT_RATE_MULTIRATE 0x18
362 static const value_string q931_information_transfer_rate_vals[] = {
363 { 0x00, "Packet mode" },
364 { 0x10, "64 kbit/s" },
365 { 0x11, "2 x 64 kbit/s" },
366 { 0x13, "384 kbit/s" },
367 { 0x15, "1536 kbit/s" },
368 { 0x17, "1920 kbit/s" },
369 { Q931_IT_RATE_MULTIRATE, "Multirate (64 kbit/s base rate)" },
373 static const value_string q931_uil1_vals[] = {
374 { 0x01, "V.110/I.460/X.30 rate adaption" },
375 { 0x02, "Recommendation G.711 u-law" },
376 { 0x03, "Recommendation G.711 A-law" },
377 { 0x04, "Recommendation G.721 32 kbit/s ADPCM and Recommendation I.460" },
378 { 0x05, "Recommendation H.221 and H.242" },
379 { 0x06, "Recommendation H.223 and H.245" },
380 { 0x07, "Non-ITU-T-standardized rate adaption" },
381 { 0x08, "V.120 rate adaption" },
382 { 0x09, "X.31 HDLC flag stuffing" },
386 static const value_string q931_l1_user_rate_vals[] = {
387 { 0x00, "Rate indicated by E-bits" },
388 { 0x01, "0.6 kbit/s" },
389 { 0x02, "1.2 kbit/s" },
390 { 0x03, "2.4 kbit/s" },
391 { 0x04, "3.6 kbit/s" },
392 { 0x05, "4.8 kbit/s" },
393 { 0x06, "7.2 kbit/s" },
394 { 0x07, "8 kbit/s" },
395 { 0x08, "9.6 kbit/s" },
396 { 0x09, "14.4 kbit/s" },
397 { 0x0A, "16 kbit/s" },
398 { 0x0B, "19.2 kbit/s" },
399 { 0x0C, "32 kbit/s" },
400 { 0x0E, "48 kbit/s" },
401 { 0x0F, "56 kbit/s" },
402 { 0x10, "64 kbit/s "},
403 { 0x15, "0.1345 kbit/s" },
404 { 0x16, "0.100 kbit/s" },
405 { 0x17, "0.075/1.2 kbit/s" },
406 { 0x18, "1.2/0.075 kbit/s" },
407 { 0x19, "0.050 kbit/s" },
408 { 0x1A, "0.075 kbit/s" },
409 { 0x1B, "0.110 kbit/s" },
410 { 0x1C, "0.150 kbit/s" },
411 { 0x1D, "0.200 kbit/s" },
412 { 0x1E, "0.300 kbit/s" },
413 { 0x1F, "12 kbit/s" },
417 static const value_string q931_l1_intermediate_rate_vals[] = {
418 { 0x20, "8 kbit/s" },
419 { 0x40, "16 kbit/s" },
420 { 0x60, "32 kbit/s" },
424 static const value_string q931_l1_stop_bits_vals[] = {
431 static const value_string q931_l1_data_bits_vals[] = {
438 static const value_string q931_l1_parity_vals[] = {
442 { 0x04, "Forced to 0" },
443 { 0x05, "Forced to 1" },
447 static const value_string q931_l1_modem_type_vals[] = {
450 { 0x13, "V.22 bis" },
453 { 0x16, "V.26 bis" },
454 { 0x17, "V.26 ter" },
456 { 0x19, "V.27 bis" },
457 { 0x1A, "V.27 ter" },
464 #define Q931_UIL2_USER_SPEC 0x10
466 static const value_string q931_uil2_vals[] = {
467 { 0x01, "Basic mode ISO 1745" },
468 { 0x02, "Q.921/I.441" }, /* LAPD */
469 { 0x06, "X.25, link layer" }, /* LAPB */
470 { 0x07, "X.25 multilink" }, /* or 0x0F? */
471 { 0x08, "T.71 Extended LAPB" },
472 { 0x09, "HDLC ARM" },
473 { 0x0A, "HDLC NRM" },
474 { 0x0B, "HDLC ABM" },
475 { 0x0C, "ISO 8802/2 LLC" },
476 { 0x0D, "X.75 Single Link Procedure" },
478 { 0x0F, "Core aspects of Q.922" },
479 { Q931_UIL2_USER_SPEC, "User-specified" },
480 { 0x11, "ISO 7776 DTE-DTE operation" },
484 static const value_string q931_mode_vals[] = {
485 { 0x20, "Normal mode" },
486 { 0x40, "Extended mode" },
490 #define Q931_UIL3_X25_PL 0x06
491 #define Q931_UIL3_ISO_8208 0x07 /* X.25-based */
492 #define Q931_UIL3_X223 0x08 /* X.25-based */
493 #define Q931_UIL3_TR_9577 0x0B
494 #define Q931_UIL3_USER_SPEC 0x10
496 static const value_string q931_uil3_vals[] = {
497 { 0x02, "Q.931/I.451" },
498 { Q931_UIL3_X25_PL, "X.25, packet layer" },
499 { Q931_UIL3_ISO_8208, "ISO/IEC 8208" },
500 { Q931_UIL3_X223, "X.223/ISO 8878" },
501 { 0x09, "ISO/IEC 8473" },
503 { Q931_UIL3_TR_9577, "ISO/IEC TR 9577" },
504 { Q931_UIL3_USER_SPEC, "User-specified" },
508 static const value_string q931_uil3_tr_9577_vals[] = {
515 dissect_q931_bearer_capability_ie(const u_char *pd, int offset, int len,
519 guint8 coding_standard;
522 guint8 uil2_protocol;
523 guint8 uil3_protocol;
529 coding_standard = octet & 0x60;
530 proto_tree_add_text(tree, offset, 1,
531 "Coding standard: %s",
532 val_to_str(coding_standard, q931_bc_coding_standard_vals, NULL));
533 if (coding_standard != Q931_ITU_STANDARDIZED_CODING) {
535 * We don't know how the bearer capability is encoded,
536 * so just dump it as data and be done with it.
538 proto_tree_add_text(tree, offset,
539 len, "Data: %s", bytes_to_str(&pd[offset], len));
542 proto_tree_add_text(tree, offset, 1,
543 "Information transfer capability: %s",
544 val_to_str(octet & 0x1F, q931_information_transfer_capability_vals,
545 "Unknown (0x%02X)"));
550 * XXX - only in Low-layer compatibility information element.
552 if (!(octet & Q931_IE_VL_EXTENSION)) {
556 proto_tree_add_text(tree, offset, 1,
557 "Out-band negotiation %spossible",
558 (octet & 0x40) ? "" : "not ");
566 proto_tree_add_text(tree, offset, 1,
568 val_to_str(octet & 0x60, q931_transfer_mode_vals,
569 "Unknown (0x%02X)"));
570 it_rate = octet & 0x1F;
571 proto_tree_add_text(tree, offset, 1,
572 "Information transfer rate: %s",
573 val_to_str(it_rate, q931_information_transfer_rate_vals,
574 "Unknown (0x%02X)"));
578 if (it_rate == Q931_IT_RATE_MULTIRATE) {
581 proto_tree_add_text(tree, offset, 1, "Rate multiplier: %u", pd[offset]);
589 if ((octet & 0x60) == 0x20) {
591 * Layer 1 information.
593 proto_tree_add_text(tree, offset, 1,
594 "User information layer 1 protocol: %s",
595 val_to_str(octet & 0x1F, q931_uil1_vals,
596 "Unknown (0x%02X)"));
600 if (octet & Q931_IE_VL_EXTENSION)
605 proto_tree_add_text(tree, offset, 1,
607 (octet & 0x40) ? "Asynchronous" : "Synchronous");
608 proto_tree_add_text(tree, offset, 1,
609 "Layer 1 in-band negotiation is %spossible",
610 (octet & 0x20) ? "" : "not ");
611 proto_tree_add_text(tree, offset, 1,
613 val_to_str(octet & 0x1F, q931_l1_user_rate_vals,
614 "Unknown (0x%02X)"));
618 if (octet & Q931_IE_VL_EXTENSION)
623 proto_tree_add_text(tree, offset, 1,
624 "Intermediate rate: %s",
625 val_to_str(octet & 0x60, q931_l1_intermediate_rate_vals,
627 proto_tree_add_text(tree, offset, 1,
628 "%s to send data with network independent clock",
629 (octet & 0x10) ? "Required" : "Not required");
630 proto_tree_add_text(tree, offset, 1,
631 "%s accept data with network independent clock",
632 (octet & 0x08) ? "Can" : "Cannot");
633 proto_tree_add_text(tree, offset, 1,
634 "%s to send data with flow control mechanism",
635 (octet & 0x04) ? "Required" : "Not required");
636 proto_tree_add_text(tree, offset, 1,
637 "%s accept data with flow control mechanism",
638 (octet & 0x02) ? "Can" : "Cannot");
642 if (octet & Q931_IE_VL_EXTENSION)
647 proto_tree_add_text(tree, offset, 1,
648 "Rate adaption header %sincluded",
649 (octet & 0x40) ? "" : "not ");
650 proto_tree_add_text(tree, offset, 1,
651 "Multiple frame establishment %ssupported",
652 (octet & 0x20) ? "" : "not ");
653 proto_tree_add_text(tree, offset, 1,
654 "%s mode of operation",
655 (octet & 0x10) ? "Protocol sensitive" : "Bit transparent");
656 proto_tree_add_text(tree, offset, 1,
658 "Full protocol negotiation" : "LLI = 256 only");
659 proto_tree_add_text(tree, offset, 1,
660 "Message originator is %s",
661 (octet & 0x04) ? "Assignor only" : "Default assignee");
662 proto_tree_add_text(tree, offset, 1,
663 "Negotiation is done %s",
664 (octet & 0x02) ? "in-band" : "out-of-band");
668 if (octet & Q931_IE_VL_EXTENSION)
673 proto_tree_add_text(tree, offset, 1,
675 val_to_str(octet & 0x60, q931_l1_stop_bits_vals,
677 proto_tree_add_text(tree, offset, 1,
679 val_to_str(octet & 0x18, q931_l1_data_bits_vals,
681 proto_tree_add_text(tree, offset, 1,
683 val_to_str(octet & 0x08, q931_l1_parity_vals,
686 if (octet & Q931_IE_VL_EXTENSION)
691 proto_tree_add_text(tree, offset, 1,
693 (octet & 0x40) ? "Full" : "Half");
694 modem_type = octet & 0x3F;
695 if (modem_type <= 0x5 ||
696 (modem_type >= 0x20 && modem_type <= 0x2F)) {
697 proto_tree_add_text(tree, offset, 1,
698 "Modem type: National use 0x%02X", modem_type);
699 } else if (modem_type >= 0x30) {
700 proto_tree_add_text(tree, offset, 1,
701 "Modem type: User specified 0x%02X", modem_type);
703 proto_tree_add_text(tree, offset, 1,
705 val_to_str(modem_type, q931_l1_modem_type_vals,
717 if ((octet & 0x60) == 0x40) {
719 * Layer 2 information.
721 uil2_protocol = octet & 0x1F;
722 proto_tree_add_text(tree, offset, 1,
723 "User information layer 2 protocol: %s",
724 val_to_str(uil2_protocol, q931_uil2_vals,
725 "Unknown (0x%02X)"));
730 * XXX - only in Low-layer compatibility information element.
732 if (octet & Q931_IE_VL_EXTENSION)
737 if (uil2_protocol == Q931_UIL2_USER_SPEC) {
738 proto_tree_add_text(tree, offset, 1,
739 "User-specified layer 2 protocol information: 0x%02X",
742 proto_tree_add_text(tree, offset, 1,
744 val_to_str(octet & 0x60, q931_mode_vals,
745 "Unknown (0x%02X)"));
750 if (octet & Q931_IE_VL_EXTENSION)
755 proto_tree_add_text(tree, offset, 1,
756 "Window size: %u k", octet & 0x7F);
766 if ((octet & 0x60) == 0x60) {
768 * Layer 3 information.
770 uil3_protocol = octet & 0x1F;
771 proto_tree_add_text(tree, offset, 1,
772 "User information layer 3 protocol: %s",
773 val_to_str(uil3_protocol, q931_uil3_vals,
774 "Unknown (0x%02X)"));
780 * XXX - only in Low-layer compatibility information element.
782 if (octet & Q931_IE_VL_EXTENSION)
787 switch (uil3_protocol) {
789 case Q931_UIL3_X25_PL:
790 case Q931_UIL3_ISO_8208:
792 proto_tree_add_text(tree, offset, 1,
794 val_to_str(octet & 0x60, q931_mode_vals,
795 "Unknown (0x%02X)"));
799 if (octet & Q931_IE_VL_EXTENSION)
804 proto_tree_add_text(tree, offset, 1,
805 "Default packet size: %u", octet & 0x0F);
809 if (octet & Q931_IE_VL_EXTENSION)
814 proto_tree_add_text(tree, offset, 1,
815 "Packet window size: %u", octet & 0x7F);
820 case Q931_UIL3_USER_SPEC:
821 proto_tree_add_text(tree, offset, 1,
822 "Default packet size: %u octets",
823 1 << (octet & 0x0F));
828 case Q931_UIL3_TR_9577:
829 add_l3_info = (octet & 0x0F) << 4;
830 if (octet & Q931_IE_VL_EXTENSION)
834 octet = pd[offset + 1];
835 add_l3_info |= (octet & 0x0F);
836 proto_tree_add_text(tree, offset, 2,
837 "Additional layer 3 protocol information: %s",
838 val_to_str(add_l3_info, q931_uil3_tr_9577_vals,
839 "Unknown (0x%02X)"));
850 * Dissect a Cause information element.
852 static const value_string q931_cause_coding_standard_vals[] = {
853 { 0x00, "ITU-T standardized coding" },
854 { 0x20, "ISO/IEC standard" },
855 { 0x40, "National standard" },
856 { 0x60, "Standard specific to identified location" },
860 static const value_string q931_cause_location_vals[] = {
861 { 0x00, "User (U)" },
862 { 0x01, "Private network serving the local user (LPN)" },
863 { 0x02, "Public network serving the local user (LN)" },
864 { 0x03, "Transit network (TN)" },
865 { 0x04, "Public network serving the remote user (RLN)" },
866 { 0x05, "Private network serving the remote user (RPN)" },
867 { 0x07, "International network (INTL)" },
868 { 0x0A, "Network beyond interworking point (BI)" },
872 static const value_string q931_cause_recommendation_vals[] = {
876 { 0x05, "Q.1031/Q.1051" },
881 * Cause codes for Cause.
883 static const value_string q931_cause_code_vals[] = {
884 { 0x00, "Valid cause code not yet received" },
885 { 0x01, "Unallocated (unassigned) number" },
886 { 0x02, "No route to specified transit network" },
887 { 0x03, "No route to destination" },
888 { 0x04, "Send special information tone" },
889 { 0x05, "Misdialled trunk prefix" },
890 { 0x06, "Channel unacceptable" },
891 { 0x07, "Call awarded and being delivered in an established channel" },
892 { 0x08, "Prefix 0 dialed but not allowed" },
893 { 0x09, "Prefix 1 dialed but not allowed" },
894 { 0x0A, "Prefix 1 dialed but not required" },
895 { 0x0B, "More digits received than allowed, call is proceeding" },
896 { 0x10, "Normal call clearing" },
897 { 0x11, "User busy" },
898 { 0x12, "No user responding" },
899 { 0x13, "No answer from user (user alerted)" },
900 { 0x14, "Subscriber absent" },
901 { 0x15, "Call rejected" },
902 { 0x16, "Number changed" },
903 { 0x17, "Reverse charging rejected" },
904 { 0x18, "Call suspended" },
905 { 0x19, "Call resumed" },
906 { 0x1A, "Non-selected user clearing" },
907 { 0x1B, "Destination out of order" },
908 { 0x1C, "Invalid number format (incomplete number)" },
909 { 0x1D, "Facility rejected" },
910 { 0x1E, "Response to STATUS ENQUIRY" },
911 { 0x1F, "Normal unspecified" },
912 { 0x21, "Circuit out of order" },
913 { 0x22, "No circuit/channel available" },
914 { 0x23, "Destination unattainable" },
915 { 0x25, "Degraded service" },
916 { 0x26, "Network out of order" },
917 { 0x27, "Transit delay range cannot be achieved" },
918 { 0x28, "Throughput range cannot be achieved" },
919 { 0x29, "Temporary failure" },
920 { 0x2A, "Switching equipment congestion" },
921 { 0x2B, "Access information discarded" },
922 { 0x2C, "Requested circuit/channel not available" },
923 { 0x2D, "Pre-empted" },
924 { 0x2E, "Precedence call blocked" },
925 { 0x2F, "Resources unavailable, unspecified" },
926 { 0x31, "Quality of service unavailable" },
927 { 0x32, "Requested facility not subscribed" },
928 { 0x33, "Reverse charging not allowed" },
929 { 0x34, "Outgoing calls barred" },
930 { 0x35, "Outgoing calls barred within CUG" },
931 { 0x36, "Incoming calls barred" },
932 { 0x37, "Incoming calls barred within CUG" },
933 { 0x38, "Call waiting not subscribed" },
934 { 0x39, "Bearer capability not authorized" },
935 { 0x3A, "Bearer capability not presently available" },
936 { 0x3E, "Inconsistency in designated outgoing access information and subscriber class" },
937 { 0x3F, "Service or option not available, unspecified" },
938 { 0x41, "Bearer capability not implemented" },
939 { 0x42, "Channel type not implemented" },
940 { 0x43, "Transit network selection not implemented" },
941 { 0x44, "Message not implemented" },
942 { 0x45, "Requested facility not implemented" },
943 { 0x46, "Only restricted digital information bearer capability is available" },
944 { 0x4F, "Service or option not implemented, unspecified" },
945 { 0x51, "Invalid call reference value" },
946 { 0x52, "Identified channel does not exist" },
947 { 0x53, "Call identity does not exist for suspended call" },
948 { 0x54, "Call identity in use" },
949 { 0x55, "No call suspended" },
950 { 0x56, "Call having the requested call identity has been cleared" },
951 { 0x57, "Called user not member of CUG" },
952 { 0x58, "Incompatible destination" },
953 { 0x59, "Non-existent abbreviated address entry" },
954 { 0x5A, "Destination address missing, and direct call not subscribed" },
955 { 0x5B, "Invalid transit network selection (national use)" },
956 { 0x5C, "Invalid facility parameter" },
957 { 0x5D, "Mandatory information element is missing" },
958 { 0x5F, "Invalid message, unspecified" },
959 { 0x60, "Mandatory information element is missing" },
960 { 0x61, "Message type non-existent or not implemented" },
961 { 0x62, "Message not compatible with call state or message type non-existent or not implemented" },
962 { 0x63, "Information element nonexistant or not implemented" },
963 { 0x64, "Invalid information element contents" },
964 { 0x65, "Message not compatible with call state" },
965 { 0x66, "Recovery on timer expiry" },
966 { 0x67, "Parameter non-existent or not implemented - passed on" },
967 { 0x6E, "Message with unrecognized parameter discarded" },
968 { 0x6F, "Protocol error, unspecified" },
969 { 0x7F, "Internetworking, unspecified" },
974 dissect_q931_cause_ie(const u_char *pd, int offset, int len,
978 guint8 coding_standard;
983 coding_standard = octet & 0x60;
984 proto_tree_add_text(tree, offset, 1,
985 "Coding standard: %s",
986 val_to_str(coding_standard, q931_cause_coding_standard_vals, NULL));
987 if (coding_standard != Q931_ITU_STANDARDIZED_CODING) {
989 * We don't know how the cause is encoded,
990 * so just dump it as data and be done with it.
992 proto_tree_add_text(tree, offset,
993 len, "Data: %s", bytes_to_str(&pd[offset], len));
996 proto_tree_add_text(tree, offset, 1,
998 val_to_str(octet & 0x0F, q931_cause_location_vals,
1003 if (!(octet & Q931_IE_VL_EXTENSION)) {
1007 proto_tree_add_text(tree, offset, 1,
1008 "Recommendation: %s",
1009 val_to_str(octet & 0x7F, q931_cause_recommendation_vals,
1018 proto_tree_add_text(tree, offset, 1,
1020 val_to_str(octet & 0x7F, q931_cause_code_vals,
1027 proto_tree_add_text(tree, offset, len,
1029 bytes_to_str(&pd[offset], len));
1033 * Dissect a Call state information element.
1035 static const value_string q931_coding_standard_vals[] = {
1036 { 0x00, "ITU-T standardized coding" },
1037 { 0x20, "ISO/IEC standard" },
1038 { 0x40, "National standard" },
1039 { 0x60, "Standard defined for the network" },
1043 static const value_string q931_call_state_vals[] = {
1045 { 0x01, "Call initiated" },
1046 { 0x02, "Overlap sending" },
1047 { 0x03, "Outgoing call proceeding" },
1048 { 0x04, "Call delivered" },
1049 { 0x06, "Call present" },
1050 { 0x07, "Call received" },
1051 { 0x09, "Connect request" },
1052 { 0x0A, "Incoming call proceeding" },
1054 { 0x0C, "Disconnect request" },
1055 { 0x0F, "Disconnect indication" },
1056 { 0x11, "Suspend request" },
1057 { 0x13, "Resume request" },
1058 { 0x16, "Release request" },
1059 { 0x19, "Overlap receiving" },
1060 { 0x3D, "Restart request" },
1061 { 0x3E, "Restart" },
1066 dissect_q931_call_state_ie(const u_char *pd, int offset, int len,
1070 guint8 coding_standard;
1075 coding_standard = octet & 0x60;
1076 proto_tree_add_text(tree, offset, 1,
1077 "Coding standard: %s",
1078 val_to_str(coding_standard, q931_coding_standard_vals, NULL));
1079 if (coding_standard != Q931_ITU_STANDARDIZED_CODING) {
1081 * We don't know how the call state is encoded,
1082 * so just dump it as data and be done with it.
1084 proto_tree_add_text(tree, offset,
1085 len, "Data: %s", bytes_to_str(&pd[offset], len));
1088 proto_tree_add_text(tree, offset, 1,
1090 val_to_str(octet & 0x3F, q931_call_state_vals,
1091 "Unknown (0x%02X)"));
1095 * Dissect a Channel identification information element.
1097 #define Q931_INTERFACE_IDENTIFIED 0x40
1098 #define Q931_NOT_BASIC_CHANNEL 0x20
1100 static const value_string q931_basic_channel_selection_vals[] = {
1101 { 0x00, "No channel" },
1102 { 0x01, "B1 channel" },
1103 { 0x02, "B2 channel" },
1104 { 0x03, "Any channel" },
1108 static const value_string q931_not_basic_channel_selection_vals[] = {
1109 { 0x00, "No channel" },
1110 { 0x01, "Channel indicated in following octets" },
1111 { 0x03, "Any channel" },
1115 #define Q931_IS_SLOT_MAP 0x10
1117 static const value_string q931_element_type_vals[] = {
1118 { 0x03, "B-channel units" },
1119 { 0x06, "H0-channel units" },
1120 { 0x08, "H11-channel units" },
1121 { 0x09, "H12-channel units" },
1126 dissect_q931_channel_identification_ie(const u_char *pd, int offset, int len,
1130 int identifier_offset;
1132 guint8 coding_standard;
1137 proto_tree_add_text(tree, offset, 1,
1138 "Interface %s identified",
1139 (octet & Q931_INTERFACE_IDENTIFIED) ? "explicitly" : "implicitly");
1140 proto_tree_add_text(tree, offset, 1,
1142 (octet & Q931_NOT_BASIC_CHANNEL) ? "Not basic" : "Basic");
1143 proto_tree_add_text(tree, offset, 1,
1144 "Indicated channel is %s",
1145 (octet & 0x08) ? "required" : "preferred");
1146 proto_tree_add_text(tree, offset, 1,
1147 "Indicated channel is %sthe D-channel",
1148 (octet & 0x04) ? "" : "not ");
1149 if (octet & Q931_NOT_BASIC_CHANNEL) {
1150 proto_tree_add_text(tree, offset, 1,
1151 "Channel selection: %s",
1152 val_to_str(octet & 0x03, q931_not_basic_channel_selection_vals,
1155 proto_tree_add_text(tree, offset, 1,
1156 "Channel selection: %s",
1157 val_to_str(octet & 0x03, q931_basic_channel_selection_vals,
1163 if (octet & Q931_INTERFACE_IDENTIFIED) {
1164 identifier_offset = offset;
1173 } while (!(octet & Q931_IE_VL_EXTENSION));
1176 * XXX - do we want to strip off the 8th bit on the
1177 * last octet of the interface identifier?
1179 if (identifier_len != 0) {
1180 proto_tree_add_text(tree, identifier_offset,
1181 identifier_len, "Interface identifier: %s",
1182 bytes_to_str(&pd[identifier_offset],
1187 if (octet & Q931_NOT_BASIC_CHANNEL) {
1191 coding_standard = octet & 0x60;
1192 proto_tree_add_text(tree, offset, 1,
1193 "Coding standard: %s",
1194 val_to_str(coding_standard, q931_coding_standard_vals,
1196 if (coding_standard != Q931_ITU_STANDARDIZED_CODING) {
1198 * We don't know how the channel identifier is
1199 * encoded, so just dump it as data and be done
1202 proto_tree_add_text(tree, offset,
1203 len, "Data: %s", bytes_to_str(&pd[offset], len));
1206 proto_tree_add_text(tree, offset, 1,
1207 "Channel is indicated by %s",
1208 (octet & Q931_IS_SLOT_MAP) ? "slot map" : "number");
1209 proto_tree_add_text(tree, offset, 1,
1211 (octet & Q931_IS_SLOT_MAP) ? "Map element" : "Channel",
1212 val_to_str(octet & 0x0F, q931_element_type_vals,
1213 "Unknown (0x%02X)"));
1216 * XXX - dump the channel number or slot map.
1222 * Dissect a Progress indicator information element.
1224 static const value_string q931_progress_description_vals[] = {
1225 { 0x01, "Call is not end-to-end ISDN - progress information available in-band" },
1226 { 0x02, "Destination address is non-ISDN" },
1227 { 0x03, "Origination address is non-ISDN" },
1228 { 0x04, "Call has returned to the ISDN" },
1229 { 0x05, "Interworking has occurred and has resulted in a telecommunications service change" },
1230 { 0x08, "In-band information or an appropriate pattern is now available" },
1235 dissect_q931_progress_indicator_ie(const u_char *pd, int offset, int len,
1239 guint8 coding_standard;
1244 coding_standard = octet & 0x60;
1245 proto_tree_add_text(tree, offset, 1,
1246 "Coding standard: %s",
1247 val_to_str(coding_standard, q931_cause_coding_standard_vals, NULL));
1248 if (coding_standard != Q931_ITU_STANDARDIZED_CODING) {
1250 * We don't know how the progress indicator is encoded,
1251 * so just dump it as data and be done with it.
1253 proto_tree_add_text(tree, offset,
1254 len, "Data: %s", bytes_to_str(&pd[offset], len));
1257 proto_tree_add_text(tree, offset, 1,
1259 val_to_str(octet & 0x0F, q931_cause_location_vals,
1267 proto_tree_add_text(tree, offset, 1,
1268 "Progress description: %s",
1269 val_to_str(octet & 0x7F, q931_progress_description_vals,
1270 "Unknown (0x%02X)"));
1274 * Dissect a Network-specific facilities or Transit network selection
1275 * information element.
1277 static const value_string q931_netid_type_vals[] = {
1278 { 0x00, "User specified" },
1279 { 0x20, "National network identification" },
1280 { 0x30, "International network identification" },
1284 static const value_string q931_netid_plan_vals[] = {
1285 { 0x00, "Unknown" },
1286 { 0x01, "Carrier Identification Code" },
1287 { 0x03, "X.121 data network identification code" },
1292 dissect_q931_ns_facilities_ie(const u_char *pd, int offset, int len,
1301 netid_len = octet & 0x7F;
1302 proto_tree_add_text(tree, offset, 1,
1303 "Network identification length: %u",
1307 if (netid_len != 0) {
1311 proto_tree_add_text(tree, offset, 1,
1312 "Type of network identification: %s",
1313 val_to_str(octet & 0x70, q931_netid_type_vals,
1314 "Unknown (0x%02X)"));
1315 proto_tree_add_text(tree, offset, 1,
1316 "Network identification plan: %s",
1317 val_to_str(octet & 0x0F, q931_netid_plan_vals,
1318 "Unknown (0x%02X)"));
1325 if (netid_len > len)
1327 if (netid_len != 0) {
1328 proto_tree_add_text(tree, offset, netid_len,
1329 "Network identification: %.*s",
1330 netid_len, &pd[offset]);
1331 offset += netid_len;
1337 * Whatever is left is the network-specific facility
1342 proto_tree_add_text(tree, offset,
1343 len, "Network-specific facility specification: %s",
1344 bytes_to_str(&pd[offset], len));
1348 * Dissect a Notification indicator information element.
1350 static const value_string q931_notification_description_vals[] = {
1351 { 0x00, "User suspended" },
1352 { 0x01, "User resumed" },
1353 { 0x02, "Bearer service change" },
1358 dissect_q931_notification_indicator_ie(const u_char *pd, int offset, int len,
1366 proto_tree_add_text(tree, offset, 1,
1367 "Notification description: %s",
1368 val_to_str(octet & 0x7F, q931_notification_description_vals,
1369 "Unknown (0x%02X)"));
1373 * Dissect a Date/time information element.
1376 dissect_q931_date_time_ie(const u_char *pd, int offset, int len,
1380 proto_tree_add_text(tree, offset, len,
1381 "Date/time: length is %d, should be 6\n", len);
1385 * XXX - what is "year" relative to? Is "month" 0-origin or
1386 * 1-origin? Q.931 doesn't say....
1388 proto_tree_add_text(tree, offset, 6,
1389 "Date/time: %u-%u-%u %u:%u:%u",
1390 pd[offset + 0], pd[offset + 1], pd[offset + 2],
1391 pd[offset + 3], pd[offset + 4], pd[offset + 5]);
1395 * Dissect a Signal information element.
1397 static const value_string q931_signal_vals[] = {
1398 { 0x00, "Dial tone on" },
1399 { 0x01, "Ring tone on" },
1400 { 0x02, "Intercept tone on" },
1401 { 0x03, "Network congestion tone on" }, /* "fast busy" */
1402 { 0x04, "Busy tone on" },
1403 { 0x05, "Confirm tone on" },
1404 { 0x06, "Answer tone on" },
1405 { 0x07, "Call waiting tone on" },
1406 { 0x08, "Off-hoke warning tone on" },
1407 { 0x09, "Preemption tone on" },
1408 { 0x3F, "Tones off" },
1409 { 0x40, "Alerting on - pattern 0" },
1410 { 0x41, "Alerting on - pattern 1" },
1411 { 0x42, "Alerting on - pattern 2" },
1412 { 0x43, "Alerting on - pattern 3" },
1413 { 0x44, "Alerting on - pattern 4" },
1414 { 0x45, "Alerting on - pattern 5" },
1415 { 0x46, "Alerting on - pattern 6" },
1416 { 0x47, "Alerting on - pattern 7" },
1417 { 0x4F, "Alerting off" },
1422 dissect_q931_signal_ie(const u_char *pd, int offset, int len,
1426 proto_tree_add_text(tree, offset, len,
1427 "Signal: length is %d, should be 1\n", len);
1430 proto_tree_add_text(tree, offset, 1,
1432 val_to_str(pd[offset], q931_signal_vals, "Unknown (0x%02X)"));
1436 * Dissect an Information rate information element.
1438 static const value_string q931_throughput_class_vals[] = {
1439 { 0x03, "75 bit/s" },
1440 { 0x04, "150 bit/s" },
1441 { 0x05, "300 bit/s" },
1442 { 0x06, "600 bit/s" },
1443 { 0x07, "1200 bit/s" },
1444 { 0x08, "2400 bit/s" },
1445 { 0x09, "4800 bit/s" },
1446 { 0x0A, "9600 bit/s" },
1447 { 0x0B, "19200 bit/s" },
1448 { 0x0C, "48000 bit/s" },
1449 { 0x0D, "64000 bit/s" },
1454 dissect_q931_information_rate_ie(const u_char *pd, int offset, int len,
1458 proto_tree_add_text(tree, offset, len,
1459 "Information rate: length is %d, should be 4\n", len);
1462 proto_tree_add_text(tree, offset + 0, 1,
1463 "Incoming information rate: %s",
1464 val_to_str(pd[offset + 0] & 0x1F, q931_throughput_class_vals,
1465 "Unknown (0x%02X)"));
1466 proto_tree_add_text(tree, offset + 1, 1,
1467 "Outgoing information rate: %s",
1468 val_to_str(pd[offset + 1] & 0x1F, q931_throughput_class_vals,
1469 "Unknown (0x%02X)"));
1470 proto_tree_add_text(tree, offset + 2, 1,
1471 "Minimum incoming information rate: %s",
1472 val_to_str(pd[offset + 2] & 0x1F, q931_throughput_class_vals,
1473 "Unknown (0x%02X)"));
1474 proto_tree_add_text(tree, offset + 3, 1,
1475 "Minimum outgoing information rate: %s",
1476 val_to_str(pd[offset + 3] & 0x1F, q931_throughput_class_vals,
1477 "Unknown (0x%02X)"));
1481 dissect_q931_guint16_value(const u_char *pd, int offset, int len,
1482 proto_tree *tree, char *label)
1491 if (octet & Q931_IE_VL_EXTENSION) {
1493 * Only one octet long - error.
1497 value = (octet & 0x3) << 14;
1504 * We've reached the end of the information element - error.
1509 if (octet & Q931_IE_VL_EXTENSION) {
1511 * Only two octets long - error.
1515 value |= (octet & 0x7F) << 7;
1522 * We've reached the end of the information element - error.
1527 if (!(octet & Q931_IE_VL_EXTENSION)) {
1529 * More than three octets long - error.
1533 value |= (octet & 0x7F);
1538 proto_tree_add_text(tree, offset, value_len, "%s: %u ms", label,
1543 proto_tree_add_text(tree, offset, len,
1544 "%s goes past end of information element", label);
1548 proto_tree_add_text(tree, offset, len, "%s isn't 3 octets long",
1554 * Dissect an End-to-end transit delay information element.
1557 dissect_q931_e2e_transit_delay_ie(const u_char *pd, int offset, int len,
1564 value_len = dissect_q931_guint16_value(pd, offset, len, tree,
1565 "Cumulative transit delay");
1568 offset += value_len;
1573 value_len = dissect_q931_guint16_value(pd, offset, len, tree,
1574 "Requested end-to-end transit delay");
1577 offset += value_len;
1582 value_len = dissect_q931_guint16_value(pd, offset, len, tree,
1583 "Maximum end-to-end transit delay");
1587 * Dissect a Transit delay selection and indication information element.
1590 dissect_q931_td_selection_and_int_ie(const u_char *pd, int offset, int len,
1595 dissect_q931_guint16_value(pd, offset, len, tree,
1600 * Dissect a Packet layer binary parameters information element.
1602 static const value_string q931_fast_selected_vals[] = {
1603 { 0x00, "Fast select not requested" },
1604 { 0x08, "Fast select not requested" },
1605 { 0x10, "Fast select requested with no restriction of response" },
1606 { 0x18, "Fast select requested with restrictions of response" },
1611 dissect_q931_pl_binary_parameters_ie(const u_char *pd, int offset, int len,
1619 proto_tree_add_text(tree, offset, 1,
1621 val_to_str(octet & 0x18, q931_fast_selected_vals,
1623 proto_tree_add_text(tree, offset, 1,
1625 (octet & 0x04) ? "No request/request denied" :
1626 "Request indicated/request accepted");
1627 proto_tree_add_text(tree, offset, 1,
1629 (octet & 0x02) ? "Link-by-link" : "End-to-end");
1630 proto_tree_add_text(tree, offset, 1,
1631 "Modulus %u sequencing",
1632 (octet & 0x01) ? 8 : 128);
1636 * Dissect a Packet layer window size information element.
1639 dissect_q931_pl_window_size_ie(const u_char *pd, int offset, int len,
1644 proto_tree_add_text(tree, offset, 1,
1645 "Forward value: %u", pd[offset] & 0x7F);
1651 proto_tree_add_text(tree, offset, 1,
1652 "Backward value: %u", pd[offset] & 0x7F);
1656 * Dissect a Packet size information element.
1659 dissect_q931_packet_size_ie(const u_char *pd, int offset, int len,
1664 proto_tree_add_text(tree, offset, 1,
1665 "Forward value: %u", pd[offset] & 0x7F);
1671 proto_tree_add_text(tree, offset, 1,
1672 "Backward value: %u", pd[offset] & 0x7F);
1676 * Dissect a Closed user group information element.
1678 static const value_string q931_cug_indication_vals[] = {
1679 { 0x01, "Closed user group selection" },
1680 { 0x02, "Closed user group with outgoing access selection and indication" },
1685 dissect_q931_cug_ie(const u_char *pd, int offset, int len, proto_tree *tree)
1689 proto_tree_add_text(tree, offset, 1,
1690 "CUG indication: %s",
1691 val_to_str(pd[offset] & 0x07, q931_cug_indication_vals,
1692 "Unknown (0x%02X)"));
1698 proto_tree_add_text(tree, offset, len, "CUG index code: %.*s", len,
1703 * Dissect a Reverse charging indication information element.
1705 static const value_string q931_reverse_charging_indication_vals[] = {
1706 { 0x01, "Reverse charging requested" },
1711 dissect_q931_reverse_charge_ind_ie(const u_char *pd, int offset, int len,
1716 proto_tree_add_text(tree, offset, 1,
1717 "Reverse charging indication: %s",
1718 val_to_str(pd[offset] & 0x07, q931_reverse_charging_indication_vals,
1719 "Unknown (0x%02X)"));
1723 * Dissect a (phone) number information element.
1725 static const value_string q931_number_type_vals[] = {
1726 { 0x00, "Unknown" },
1727 { 0x10, "International number" },
1728 { 0x20, "National number" },
1729 { 0x30, "Network specific number" },
1730 { 0x40, "Subscriber number" },
1731 { 0x60, "Abbreviated number" },
1735 static const value_string q931_numbering_plan_vals[] = {
1736 { 0x00, "Unknown" },
1737 { 0x01, "E.164 ISDN/telephony numbering" },
1738 { 0x03, "X.121 data numbering" },
1739 { 0x04, "F.69 Telex numbering" },
1740 { 0x08, "National standard numbering" },
1741 { 0x09, "Private numbering" },
1745 static const value_string q931_presentation_indicator_vals[] = {
1746 { 0x00, "Presentation allowed" },
1747 { 0x20, "Presentation restricted" },
1748 { 0x40, "Number not available due to interworking" },
1752 static const value_string q931_screening_indicator_vals[] = {
1753 { 0x00, "User-provided, not screened" },
1754 { 0x01, "User-provided, verified and passed" },
1755 { 0x02, "User-provided, verified and failed" },
1756 { 0x03, "Network-provided" },
1760 static const value_string q931_redirection_reason_vals[] = {
1761 { 0x00, "Unknown" },
1762 { 0x01, "Call forwarding busy or called DTE busy" },
1763 { 0x02, "Call forwarding no reply" },
1764 { 0x04, "Call deflection" },
1765 { 0x09, "Called DTE out of order" },
1766 { 0x0A, "Call forwarding by the called DTE" },
1767 { 0x0F, "Call forwarding unconditional or systematic call redirection" },
1772 dissect_q931_number_ie(const u_char *pd, int offset, int len,
1780 proto_tree_add_text(tree, offset, 1,
1781 "Type of number: %s",
1782 val_to_str(octet & 0x70, q931_number_type_vals,
1783 "Unknown (0x%02X)"));
1784 proto_tree_add_text(tree, offset, 1,
1785 "Numbering plan: %s",
1786 val_to_str(octet & 0x0F, q931_numbering_plan_vals,
1787 "Unknown (0x%02X)"));
1791 if (!(octet & Q931_IE_VL_EXTENSION)) {
1795 proto_tree_add_text(tree, offset, 1,
1796 "Presentation indicator: %s",
1797 val_to_str(octet & 0x60, q931_presentation_indicator_vals,
1799 proto_tree_add_text(tree, offset, 1,
1800 "Screening indicator: %s",
1801 val_to_str(octet & 0x03, q931_screening_indicator_vals,
1808 * XXX - only in a Redirecting number information element.
1810 if (!(octet & Q931_IE_VL_EXTENSION)) {
1814 proto_tree_add_text(tree, offset, 1,
1815 "Reason for redirection: %s",
1816 val_to_str(octet & 0x0F, q931_redirection_reason_vals,
1824 proto_tree_add_text(tree, offset, len, "Number: %.*s",
1829 * Dissect a party subaddress information element.
1831 static const value_string q931_subaddress_type_vals[] = {
1832 { 0x00, "X.213/ISO 8348 Add.2 NSAP" },
1833 { 0x20, "User-specified" },
1837 static const value_string q931_odd_even_indicator_vals[] = {
1838 { 0x00, "Even number of address signals" },
1839 { 0x10, "Odd number of address signals" },
1844 dissect_q931_party_subaddr_ie(const u_char *pd, int offset, int len,
1852 proto_tree_add_text(tree, offset, 1,
1853 "Type of subaddress: %s",
1854 val_to_str(octet & 0x70, q931_subaddress_type_vals,
1855 "Unknown (0x%02X)"));
1856 proto_tree_add_text(tree, offset, 1,
1857 "Odd/even indicator: %s",
1858 val_to_str(octet & 0x10, q931_odd_even_indicator_vals,
1865 proto_tree_add_text(tree, offset, len, "Subaddress: %s",
1866 bytes_to_str(&pd[offset], len));
1870 * Dissect a Restart indicator information element.
1872 static const value_string q931_restart_indicator_class_vals[] = {
1873 { 0x00, "Indicated channels" },
1874 { 0x06, "Single interface" },
1875 { 0x07, "All interfaces" },
1880 dissect_q931_restart_indicator_ie(const u_char *pd, int offset, int len,
1884 proto_tree_add_text(tree, offset, len,
1885 "Restart indicator: length is %d, should be 1\n", len);
1888 proto_tree_add_text(tree, offset, 1,
1889 "Restart indicator: %s",
1890 val_to_str(pd[offset] & 0x07, q931_restart_indicator_class_vals,
1891 "Unknown (0x%02X)"));
1895 * Dissect a High-layer compatibility information element.
1897 #define Q931_AUDIOVISUAL 0x60
1898 static const value_string q931_high_layer_characteristics_vals[] = {
1899 { 0x01, "Telephony" },
1900 { 0x04, "F.182 Facsimile Group 2/3" },
1901 { 0x21, "F.184 Facsimile Group 4 Class I" },
1902 { 0x24, "F.230 Teletex, basic and mixed mode, and F.184 Facsimile Group 4, Classes II and III" },
1903 { 0x28, "F.220 Teletex, basic and processable mode" },
1904 { 0x31, "F.200 Teletex, basic mode" },
1905 { 0x32, "F.300 and T.102 syntax-based Videotex" },
1906 { 0x33, "F.300 and T.101 international Videotex interworking" },
1907 { 0x35, "F.60 Telex" },
1908 { 0x38, "X.400 Message Handling Systems" },
1909 { 0x41, "X.200 OSI application" },
1910 { 0x42, "FTAM application" },
1911 { 0x5E, "Reserved for maintenance" },
1912 { 0x5F, "Reserved for management" },
1913 { Q931_AUDIOVISUAL, "F.720/F.821 and F.731 Profile 1a videotelephony" },
1914 { 0x61, "F.702 and F.731 Profile 1b videoconferencing" },
1915 { 0x62, "F.702 and F.731 audiographic conferencing" },
1919 static const value_string q931_audiovisual_characteristics_vals[] = {
1920 { 0x01, "Capability set of initial channel of H.221" },
1921 { 0x02, "Capability set of subsequent channel of H.221" },
1922 { 0x21, "Capability set of initial channel of an active 3.1kHz audio or speech call" },
1927 dissect_q931_high_layer_compat_ie(const u_char *pd, int offset, int len,
1931 guint8 coding_standard;
1932 guint8 characteristics;
1937 coding_standard = octet & 0x60;
1938 proto_tree_add_text(tree, offset, 1,
1939 "Coding standard: %s",
1940 val_to_str(coding_standard, q931_coding_standard_vals, NULL));
1941 if (coding_standard != Q931_ITU_STANDARDIZED_CODING) {
1943 * We don't know how the call state is encoded,
1944 * so just dump it as data and be done with it.
1946 proto_tree_add_text(tree, offset,
1947 len, "Data: %s", bytes_to_str(&pd[offset], len));
1954 characteristics = octet & 0x7F;
1955 proto_tree_add_text(tree, offset, 1,
1956 "High layer characteristics identification: %s",
1957 val_to_str(characteristics, q931_high_layer_characteristics_vals,
1962 if (!(octet & Q931_IE_VL_EXTENSION)) {
1966 if (characteristics == Q931_AUDIOVISUAL) {
1967 proto_tree_add_text(tree, offset, 1,
1968 "Extended audiovisual characteristics identification: %s",
1969 val_to_str(octet & 0x7F, q931_audiovisual_characteristics_vals,
1972 proto_tree_add_text(tree, offset, 1,
1973 "Extended high layer characteristics identification: %s",
1974 val_to_str(octet & 0x7F, q931_high_layer_characteristics_vals,
1982 * Dissect a User-user information element.
1984 #define Q931_PROTOCOL_DISCRIMINATOR_IA5 0x04
1986 static const value_string q931_protocol_discriminator_vals[] = {
1987 { 0x00, "User-specific protocol" },
1988 { 0x01, "OSI high layer protocols" },
1990 { Q931_PROTOCOL_DISCRIMINATOR_IA5, "IA5 characters" },
1991 { 0x05, "X.208 and X.209 coded user information" },
1992 { 0x07, "V.120 rate adaption" },
1993 { 0x08, "Q.931/I.451 user-network call control messages" },
1998 dissect_q931_user_user_ie(const u_char *pd, int offset, int len,
2006 proto_tree_add_text(tree, offset, 1,
2007 "Protocol discriminator: %s",
2008 val_to_str(octet, q931_protocol_discriminator_vals,
2009 "Unknown (0x%02x)"));
2017 case Q931_PROTOCOL_DISCRIMINATOR_IA5:
2018 proto_tree_add_text(tree, offset, len, "User information: %.*s",
2023 proto_tree_add_text(tree, offset, len, "User information: %s",
2024 bytes_to_str(&pd[offset], len));
2030 * Dissect information elements consisting of ASCII^H^H^H^H^HIA5 text.
2033 dissect_q931_ia5_ie(const u_char *pd, int offset, int len, proto_tree *tree,
2037 proto_tree_add_text(tree, offset, len, "%s: %.*s", label, len,
2042 static const value_string q931_codeset_vals[] = {
2043 { 0x00, "Q.931 information elements" },
2044 { 0x04, "Information elements for ISO/IEC use" },
2045 { 0x05, "Information elements for national use" },
2046 { 0x06, "Information elements specific to the local network" },
2047 { 0x07, "User-specific information elements" },
2052 dissect_q931(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
2054 proto_tree *q931_tree = NULL;
2056 proto_tree *ie_tree;
2057 guint8 call_ref_len;
2058 guint8 call_ref[15];
2059 guint8 message_type;
2060 guint8 info_element;
2061 guint8 info_element_len;
2063 gboolean non_locking_shift;
2065 if (check_col(fd, COL_PROTOCOL))
2066 col_add_str(fd, COL_PROTOCOL, "Q.931");
2069 ti = proto_tree_add_item(tree, proto_q931, offset,
2070 END_OF_FRAME, NULL);
2071 q931_tree = proto_item_add_subtree(ti, ett_q931);
2073 proto_tree_add_item(q931_tree, hf_q931_discriminator, offset, 1, pd[offset]);
2076 call_ref_len = pd[offset] & 0xF; /* XXX - do as a bit field? */
2077 if (q931_tree != NULL)
2078 proto_tree_add_item(q931_tree, hf_q931_call_ref_len, offset, 1, call_ref_len);
2080 if (call_ref_len != 0) {
2081 /* XXX - split this into flag and value */
2082 memcpy(call_ref, &pd[offset], call_ref_len);
2083 if (q931_tree != NULL)
2084 proto_tree_add_item(q931_tree, hf_q931_call_ref, offset, call_ref_len, call_ref);
2085 offset += call_ref_len;
2087 message_type = pd[offset];
2088 if (check_col(fd, COL_INFO)) {
2089 col_add_str(fd, COL_INFO,
2090 val_to_str(message_type, q931_message_type_vals,
2091 "Unknown message type (0x%02X)"));
2093 if (q931_tree != NULL)
2094 proto_tree_add_item(q931_tree, hf_q931_message_type, offset, 1, message_type);
2098 * And now for the information elements....
2100 codeset = 0; /* start out in codeset 0 */
2101 non_locking_shift = TRUE;
2102 while (IS_DATA_IN_FRAME(offset)) {
2103 info_element = pd[offset];
2106 * Check for the single-octet IEs.
2108 switch (info_element & Q931_IE_SO_IDENTIFIER_MASK) {
2112 !(info_element & Q931_IE_SHIFT_LOCKING);
2113 codeset = info_element & Q931_IE_SHIFT_CODESET;
2114 if (q931_tree != NULL) {
2115 proto_tree_add_text(q931_tree, offset, 1,
2116 "%s shift to codeset %u: %s",
2117 (non_locking_shift ? "Non-locking" : "Locking"),
2119 val_to_str(codeset, q931_codeset_vals,
2120 "Unknown (0x%02X)"));
2125 case Q931_IE_MORE_DATA_OR_SEND_COMP:
2126 switch (info_element) {
2128 case Q931_IE_MORE_DATA:
2129 if (q931_tree != NULL) {
2130 proto_tree_add_text(q931_tree, offset, 1,
2135 case Q931_IE_SENDING_COMPLETE:
2136 if (q931_tree != NULL) {
2137 proto_tree_add_text(q931_tree, offset, 1,
2138 "Sending complete");
2143 if (q931_tree != NULL) {
2144 proto_tree_add_text(q931_tree, offset, 1,
2145 "Unknown information element (0x%02X",
2151 if (non_locking_shift)
2155 case Q931_IE_CONGESTION_LEVEL:
2156 if (q931_tree != NULL) {
2157 proto_tree_add_text(q931_tree, offset, 1,
2158 "Congestion level: %s",
2159 val_to_str(info_element & Q931_IE_SO_IE_MASK,
2160 q931_congestion_level_vals,
2164 if (non_locking_shift)
2168 case Q931_IE_REPEAT_INDICATOR:
2169 if (q931_tree != NULL) {
2170 proto_tree_add_text(q931_tree, offset, 1,
2171 "Repeat indicator: %s",
2172 val_to_str(info_element & Q931_IE_SO_IE_MASK,
2173 q931_repeat_indication_vals,
2177 if (non_locking_shift)
2186 * Variable-length IE.
2188 if (!BYTES_ARE_IN_FRAME(offset + 1, 1))
2189 break; /* ran past end of frame */
2190 info_element_len = pd[offset + 1];
2191 if (!BYTES_ARE_IN_FRAME(offset + 2, info_element_len))
2192 break; /* ran past end of frame */
2193 if (q931_tree != NULL) {
2194 ti = proto_tree_add_text(q931_tree, offset,
2195 1+1+info_element_len, "%s",
2196 val_to_str(info_element, q931_info_element_vals,
2197 "Unknown information element (0x%02X)"));
2198 ie_tree = proto_item_add_subtree(ti, ett_q931_ie);
2199 proto_tree_add_text(ie_tree, offset, 1,
2200 "Information element: %s",
2201 val_to_str(info_element, q931_info_element_vals,
2202 "Unknown (0x%02X)"));
2203 proto_tree_add_text(ie_tree, offset + 1, 1,
2204 "Length: %u", info_element_len);
2206 switch (info_element) {
2208 case Q931_IE_SEGMENTED_MESSAGE:
2209 dissect_q931_segmented_message_ie(pd,
2210 offset + 2, info_element_len, ie_tree);
2213 case Q931_IE_BEARER_CAPABILITY:
2214 case Q931_IE_LOW_LAYER_COMPAT:
2215 dissect_q931_bearer_capability_ie(pd,
2216 offset + 2, info_element_len, ie_tree);
2220 dissect_q931_cause_ie(pd,
2221 offset + 2, info_element_len, ie_tree);
2224 case Q931_IE_CALL_STATE:
2225 dissect_q931_call_state_ie(pd,
2226 offset + 2, info_element_len, ie_tree);
2229 case Q931_IE_CHANNEL_IDENTIFICATION:
2230 dissect_q931_channel_identification_ie(pd,
2231 offset + 2, info_element_len, ie_tree);
2234 case Q931_IE_PROGRESS_INDICATOR:
2235 dissect_q931_progress_indicator_ie(pd,
2236 offset + 2, info_element_len, ie_tree);
2239 case Q931_IE_NETWORK_SPECIFIC_FACIL:
2240 case Q931_IE_TRANSIT_NETWORK_SEL:
2241 dissect_q931_ns_facilities_ie(pd,
2242 offset + 2, info_element_len, ie_tree);
2245 case Q931_IE_NOTIFICATION_INDICATOR:
2246 dissect_q931_notification_indicator_ie(pd,
2247 offset + 2, info_element_len, ie_tree);
2250 case Q931_IE_DISPLAY:
2251 dissect_q931_ia5_ie(pd, offset + 2,
2252 info_element_len, ie_tree,
2253 "Display information");
2256 case Q931_IE_DATE_TIME:
2257 dissect_q931_date_time_ie(pd,
2258 offset + 2, info_element_len, ie_tree);
2261 case Q931_IE_KEYPAD_FACILITY:
2262 dissect_q931_ia5_ie(pd, offset + 2,
2263 info_element_len, ie_tree,
2267 case Q931_IE_SIGNAL:
2268 dissect_q931_signal_ie(pd,
2269 offset + 2, info_element_len, ie_tree);
2272 case Q931_IE_INFORMATION_RATE:
2273 dissect_q931_information_rate_ie(pd,
2274 offset + 2, info_element_len, ie_tree);
2277 case Q931_IE_E2E_TRANSIT_DELAY:
2278 dissect_q931_e2e_transit_delay_ie(pd,
2279 offset + 2, info_element_len, ie_tree);
2282 case Q931_IE_TD_SELECTION_AND_INT:
2283 dissect_q931_td_selection_and_int_ie(pd,
2284 offset + 2, info_element_len, ie_tree);
2287 case Q931_IE_PL_BINARY_PARAMETERS:
2288 dissect_q931_pl_binary_parameters_ie(pd,
2289 offset + 2, info_element_len, ie_tree);
2292 case Q931_IE_PL_WINDOW_SIZE:
2293 dissect_q931_pl_window_size_ie(pd,
2294 offset + 2, info_element_len, ie_tree);
2297 case Q931_IE_PACKET_SIZE:
2298 dissect_q931_packet_size_ie(pd,
2299 offset + 2, info_element_len, ie_tree);
2303 dissect_q931_cug_ie(pd,
2304 offset + 2, info_element_len, ie_tree);
2307 case Q931_IE_REVERSE_CHARGE_IND:
2308 dissect_q931_reverse_charge_ind_ie(pd,
2309 offset + 2, info_element_len, ie_tree);
2312 case Q931_IE_CALLING_PARTY_NUMBER:
2313 case Q931_IE_CALLED_PARTY_NUMBER:
2314 case Q931_IE_REDIRECTING_NUMBER:
2315 dissect_q931_number_ie(pd,
2316 offset + 2, info_element_len, ie_tree);
2319 case Q931_IE_CALLING_PARTY_SUBADDR:
2320 case Q931_IE_CALLED_PARTY_SUBADDR:
2321 dissect_q931_party_subaddr_ie(pd,
2322 offset + 2, info_element_len, ie_tree);
2325 case Q931_IE_RESTART_INDICATOR:
2326 dissect_q931_restart_indicator_ie(pd,
2327 offset + 2, info_element_len, ie_tree);
2330 case Q931_IE_HIGH_LAYER_COMPAT:
2331 dissect_q931_high_layer_compat_ie(pd,
2332 offset + 2, info_element_len, ie_tree);
2335 case Q931_IE_USER_USER:
2336 dissect_q931_user_user_ie(pd,
2337 offset + 2, info_element_len, ie_tree);
2341 proto_tree_add_text(ie_tree, offset + 2,
2342 info_element_len, "Data: %s",
2343 bytes_to_str(&pd[offset + 2],
2348 offset += 1 + 1 + info_element_len;
2349 if (non_locking_shift)
2355 proto_register_q931(void)
2357 static hf_register_info hf[] = {
2358 { &hf_q931_discriminator,
2359 { "Protocol discriminator", "q931.disc", FT_UINT8, BASE_HEX, NULL, 0x0,
2362 { &hf_q931_call_ref_len,
2363 { "Call reference value length", "q931.call_ref_len", FT_UINT8, BASE_DEC, NULL, 0x0,
2366 { &hf_q931_call_ref,
2367 { "Call reference value", "q931.call_ref", FT_BYTES, BASE_HEX, NULL, 0x0,
2370 { &hf_q931_message_type,
2371 { "Message type", "q931.message_type", FT_UINT8, BASE_HEX, VALS(q931_message_type_vals), 0x0,
2375 static gint *ett[] = {
2380 proto_q931 = proto_register_protocol ("Q.931", "q931");
2381 proto_register_field_array (proto_q931, hf, array_length(hf));
2382 proto_register_subtree_array(ett, array_length(ett));