2 * Routines for ANSI A Interface (IS-634/IOS) dissection
4 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5 * In association with Telos Technology Inc.
6 * Copyright 2008, Michael Lum <michael.lum [AT] utstar.com>
7 * In association with UTStarcom Inc.
8 * Copyright 2008, Michael Lum <michael.lum [AT] starsolutions.com>
9 * In association with Star Solutions
13 * Inter-operability Specification (IOS) for CDMA
14 * 2000 Access Network Interfaces
15 * 3GPP2 A.S0001-1 TIA/EIA-2001
19 * Wireshark - Network traffic analyzer
20 * By Gerald Combs <gerald@wireshark.org>
21 * Copyright 1998 Gerald Combs
23 * This program is free software; you can redistribute it and/or
24 * modify it under the terms of the GNU General Public License
25 * as published by the Free Software Foundation; either version 2
26 * of the License, or (at your option) any later version.
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
45 #include <epan/packet.h>
46 #include <epan/prefs.h>
48 #include <epan/strutil.h>
49 #include <epan/emem.h>
51 #include "packet-rtp.h"
52 #include "packet-bssap.h"
53 #include "packet-ansi_a.h"
56 * IOS 4, probably most common
58 static gint global_a_variant = A_VARIANT_IOS401;
61 /* PROTOTYPES/FORWARDS */
63 void proto_reg_handoff_ansi_a(void);
66 my_match_strval_idx(guint32 val, const ext_value_string_t *vs, gint *idx, gint *dec_idx)
72 if (vs[i].value == val)
75 *dec_idx = vs[i].dec_index;
87 const ext_value_string_t ansi_a_ios401_bsmap_strings[] =
89 { 0x69, "Additional Service Notification", 0 },
90 { 0x65, "ADDS Page", 1 },
91 { 0x66, "ADDS Page Ack", 2 },
92 { 0x67, "ADDS Transfer", 3 },
93 { 0x68, "ADDS Transfer Ack", 4 },
94 { 0x02, "Assignment Complete", 5 },
95 { 0x03, "Assignment Failure", 6 },
96 { 0x01, "Assignment Request", 7 },
97 { 0x45, "Authentication Request", 8 },
98 { 0x46, "Authentication Response", 9 },
99 { 0x48, "Base Station Challenge", 10 },
100 { 0x49, "Base Station Challenge Response", 11 },
101 { 0x40, "Block", 12 },
102 { 0x41, "Block Acknowledge", 13 },
103 { 0x09, "BS Service Request", 14 },
104 { 0x0A, "BS Service Response", 15 },
105 { 0x20, "Clear Command", 16 },
106 { 0x21, "Clear Complete", 17 },
107 { 0x22, "Clear Request", 18 },
108 { 0x57, "Complete Layer 3 Information", 19 },
109 { 0x60, "Feature Notification", 20 },
110 { 0x61, "Feature Notification Ack", 21 },
111 { 0x13, "Handoff Command", 22 },
112 { 0x15, "Handoff Commenced", 23 },
113 { 0x14, "Handoff Complete", 24 },
114 { 0x16, "Handoff Failure", 25 },
115 { 0x17, "Handoff Performed", 26 },
116 { 0x10, "Handoff Request", 27 },
117 { 0x12, "Handoff Request Acknowledge", 28 },
118 { 0x11, "Handoff Required", 29 },
119 { 0x1A, "Handoff Required Reject", 30 },
120 { 0x6C, "PACA Command", 31 },
121 { 0x6D, "PACA Command Ack", 32 },
122 { 0x6E, "PACA Update", 33 },
123 { 0x6F, "PACA Update Ack", 34 },
124 { 0x52, "Paging Request", 35 },
125 { 0x53, "Privacy Mode Command", 36 },
126 { 0x55, "Privacy Mode Complete", 37 },
127 { 0x23, "Radio Measurements for Position Request", 38 },
128 { 0x25, "Radio Measurements for Position Response", 39 },
129 { 0x56, "Rejection", 40 },
130 { 0x05, "Registration Request", 41 },
131 { 0x30, "Reset", 42 },
132 { 0x31, "Reset Acknowledge", 43 },
133 { 0x34, "Reset Circuit", 44 },
134 { 0x35, "Reset Circuit Acknowledge", 45 },
135 { 0x47, "SSD Update Request", 46 },
136 { 0x4A, "SSD Update Response", 47 },
137 { 0x6A, "Status Request", 48 },
138 { 0x6B, "Status Response", 49 },
139 { 0x39, "Transcoder Control Acknowledge", 50 },
140 { 0x38, "Transcoder Control Request", 51 },
141 { 0x42, "Unblock", 52 },
142 { 0x43, "Unblock Acknowledge", 53 },
143 { 0x0B, "User Zone Reject", 54 },
144 { 0x04, "User Zone Update", 55 },
148 const ext_value_string_t ansi_a_ios401_dtap_strings[] =
150 { 0x62, "Additional Service Request", 0 },
151 { 0x53, "ADDS Deliver", 1 },
152 { 0x54, "ADDS Deliver Ack", 2 },
153 { 0x26, "Alert With Information", 3 },
154 { 0x45, "Authentication Request", 4 },
155 { 0x46, "Authentication Response", 5 },
156 { 0x48, "Base Station Challenge", 6 },
157 { 0x49, "Base Station Challenge Response", 7 },
158 { 0x24, "CM Service Request", 8 },
159 { 0x25, "CM Service Request Continuation", 9 },
160 { 0x07, "Connect", 10 },
161 { 0x10, "Flash with Information", 11 },
162 { 0x50, "Flash with Information Ack", 12 },
163 { 0x02, "Location Updating Accept", 13 },
164 { 0x04, "Location Updating Reject", 14 },
165 { 0x08, "Location Updating Request", 15 },
166 { 0x27, "Paging Response", 16 },
167 { 0x2B, "Parameter Update Confirm", 17 },
168 { 0x2C, "Parameter Update Request", 18 },
169 { 0x56, "Rejection", 19 },
170 { 0x03, "Progress", 20 },
171 { 0x70, "Service Redirection", 21 },
172 { 0x2E, "Service Release", 22 },
173 { 0x2F, "Service Release Complete", 23 },
174 { 0x47, "SSD Update Request", 24 },
175 { 0x4A, "SSD Update Response", 25 },
176 { 0x6A, "Status Request", 26 },
177 { 0x6B, "Status Response", 27 },
178 { 0x0B, "User Zone Reject", 28 },
179 { 0x0C, "User Zone Update", 29 },
180 { 0x0D, "User Zone Update Request", 30 },
184 const ext_value_string_t ansi_a_ios401_elem_1_strings[] =
186 { 0x20, "Access Network Identifiers", 0 },
187 { 0x3D, "ADDS User Part", 1 },
188 { 0x25, "AMPS Hard Handoff Parameters", 2 },
189 { 0x30, "Anchor PDSN Address", 3 },
190 { 0x7C, "Anchor P-P Address", 4 },
191 { 0x41, "Authentication Challenge Parameter", 5 },
192 { 0x28, "Authentication Confirmation Parameter (RANDC)", 6 },
193 { 0x59, "Authentication Data", 7 },
194 { 0x4A, "Authentication Event", 8 },
195 { 0x40, "Authentication Parameter COUNT", 9 },
196 { 0x42, "Authentication Response Parameter", 10 },
197 { 0x37, "Band Class", 11 },
198 { 0x5B, "Called Party ASCII Number", 12 },
199 { 0x5E, "Called Party BCD Number", 13 },
200 { 0x4B, "Calling Party ASCII Number", 14 },
201 { 0x04, "Cause", 15 },
202 { 0x08, "Cause Layer 3", 16 },
203 { 0x0C, "CDMA Serving One Way Delay", 17 },
204 { 0x05, "Cell Identifier", 18 },
205 { 0x1A, "Cell Identifier List", 19 },
206 { 0x23, "Channel Number", 20 },
207 { 0x0B, "Channel Type", 21 },
208 { 0x19, "Circuit Group", 22 },
209 { 0x01, "Circuit Identity Code", 23 },
210 { 0x24, "Circuit Identity Code Extension", 24 },
211 { 0x12, "Classmark Information Type 2", 25 },
212 { 0x29, "Downlink Radio Environment", 26 },
213 { 0x2B, "Downlink Radio Environment List", 27 },
214 { 0x0A, "Encryption Information", 28 },
215 { 0x10, "Extended Handoff Direction Parameters", 29 },
216 { 0x2C, "Geographic Location", 30 },
217 { 0x5A, "Special Service Call Indicator", 31 },
218 { 0x26, "Handoff Power Level", 32 },
219 { 0x16, "Hard Handoff Parameters", 33 },
220 { 0x2E, "Information Element Requested", 34 },
221 { 0x09, "IS-2000 Channel Identity", 35 },
222 { 0x27, "IS-2000 Channel Identity 3X", 36 },
223 { 0x11, "IS-2000 Mobile Capabilities", 37 },
224 { 0x0F, "IS-2000 Non-Negotiable Service Configuration Record", 38 },
225 { 0x0E, "IS-2000 Service Configuration Record", 39 },
226 { 0x62, "IS-95/IS-2000 Cause Value", 40 },
227 { 0x67, "IS-2000 Redirection Record", 41 },
228 { 0x22, "IS-95 Channel Identity", 42 },
229 { 0x64, "IS-95 MS Measured Channel Identity", 43 },
230 { 0x17, "Layer 3 Information", 44 },
231 { 0x13, "Location Area Information", 45 },
232 { 0x38, "Message Waiting Indication", 46 },
233 { 0x0D, "Mobile Identity", 47 },
234 { 0x15, "MS Information Records (Forward)", 48 },
235 { 0xA0, "Origination Continuation Indicator", 49 },
236 { 0x5F, "PACA Order", 50 },
237 { 0x60, "PACA Reorigination Indicator", 51 },
238 { 0x4E, "PACA Timestamp", 52 },
239 { 0x70, "Packet Session Parameters", 53 },
240 { 0x14, "PDSN IP Address", 54 },
241 { 0xA2, "Power Down Indicator", 55 },
242 { 0x06, "Priority", 56 },
243 { 0x3B, "Protocol Revision", 57 },
244 { 0x18, "Protocol Type", 58 },
245 { 0x2D, "PSMM Count", 59 },
246 { 0x07, "Quality of Service Parameters", 60 },
247 { 0x1D, "Radio Environment and Resources", 61 },
248 { 0x1F, "Registration Type", 62 },
249 { 0x44, "Reject Cause", 63 },
250 { 0x1B, "Response Request", 64 },
251 { 0x68, "Return Cause", 65 },
252 { 0x21, "RF Channel Identity", 66 },
253 { 0x03, "Service Option", 67 },
254 { 0x1E, "Service Option Connection Identifier (SOCI)", 68 },
255 { 0x2A, "Service Option List", 69 },
256 { 0x69, "Service Redirection Info", 70 },
257 { 0x71, "Service Reference Identifier (SR_ID)", 71 },
259 { 0x34, "Signal", 73 },
260 { 0x35, "Slot Cycle Index", 74 },
261 { 0x31, "Software Version", 75 },
262 { 0x39, "Source RNC to Target RNC Transparent Container", 76 },
263 { 0x14, "Source PDSN Address", 77 },
265 { 0x3A, "Target RNC to Source RNC Transparent Container", 79 },
266 { 0x36, "Transcoder Mode", 80 }, /* XXX 0x1C in IOS 4.0.1 */
267 { 0x02, "User Zone ID", 81 },
268 { 0xA1, "Voice Privacy Request", 82 },
269 { 0x15, "MS Information Records (Reverse)", 88 },
273 const ext_value_string_t ansi_a_ios501_bsmap_strings[] =
275 { 0x69, "Additional Service Notification", 0 },
276 { 0x65, "ADDS Page", 1 },
277 { 0x66, "ADDS Page Ack", 2 },
278 { 0x67, "ADDS Transfer", 3 },
279 { 0x68, "ADDS Transfer Ack", 4 },
280 { 0x02, "Assignment Complete", 5 },
281 { 0x03, "Assignment Failure", 6 },
282 { 0x01, "Assignment Request", 7 },
283 { 0x45, "Authentication Request", 8 },
284 { 0x46, "Authentication Response", 9 },
285 { 0x48, "Base Station Challenge", 10 },
286 { 0x49, "Base Station Challenge Response", 11 },
287 { 0x40, "Block", 12 },
288 { 0x41, "Block Acknowledge", 13 },
289 { 0x09, "BS Service Request", 14 },
290 { 0x0A, "BS Service Response", 15 },
291 { 0x20, "Clear Command", 16 },
292 { 0x21, "Clear Complete", 17 },
293 { 0x22, "Clear Request", 18 },
294 { 0x57, "Complete Layer 3 Information", 19 },
295 { 0x60, "Feature Notification", 20 },
296 { 0x61, "Feature Notification Ack", 21 },
297 { 0x13, "Handoff Command", 22 },
298 { 0x15, "Handoff Commenced", 23 },
299 { 0x14, "Handoff Complete", 24 },
300 { 0x16, "Handoff Failure", 25 },
301 { 0x17, "Handoff Performed", 26 },
302 { 0x10, "Handoff Request", 27 },
303 { 0x12, "Handoff Request Acknowledge", 28 },
304 { 0x11, "Handoff Required", 29 },
305 { 0x1A, "Handoff Required Reject", 30 },
306 { 0x6C, "PACA Command", 31 },
307 { 0x6D, "PACA Command Ack", 32 },
308 { 0x6E, "PACA Update", 33 },
309 { 0x6F, "PACA Update Ack", 34 },
310 { 0x52, "Paging Request", 35 },
311 { 0x53, "Privacy Mode Command", 36 },
312 { 0x55, "Privacy Mode Complete", 37 },
313 { 0x23, "Radio Measurements for Position Request", 38 },
314 { 0x25, "Radio Measurements for Position Response", 39 },
315 { 0x56, "Rejection", 40 },
316 { 0x05, "Registration Request", 41 },
317 { 0x30, "Reset", 42 },
318 { 0x31, "Reset Acknowledge", 43 },
319 { 0x34, "Reset Circuit", 44 },
320 { 0x35, "Reset Circuit Acknowledge", 45 },
321 { 0x47, "SSD Update Request", 46 },
322 { 0x4A, "SSD Update Response", 47 },
323 { 0x6A, "Status Request", 48 },
324 { 0x6B, "Status Response", 49 },
325 { 0x39, "Transcoder Control Acknowledge", 50 },
326 { 0x38, "Transcoder Control Request", 51 },
327 { 0x42, "Unblock", 52 },
328 { 0x43, "Unblock Acknowledge", 53 },
329 { 0x0B, "User Zone Reject", 54 },
330 { 0x04, "User Zone Update", 55 },
331 { 0x58, "Bearer Update Request", 56 },
332 { 0x59, "Bearer Update Response", 58 },
333 { 0x5A, "Bearer Update Required", 57 },
334 { 0x71, "Mobile Station Registered Notification", 59 },
335 { 0x07, "BS Authentication Request", 60 },
336 { 0x08, "BS Authentication Request Ack", 61 },
340 const ext_value_string_t ansi_a_ios501_dtap_strings[] =
342 { 0x62, "Additional Service Request", 0 },
343 { 0x53, "ADDS Deliver", 1 },
344 { 0x54, "ADDS Deliver Ack", 2 },
345 { 0x26, "Alert With Information", 3 },
346 { 0x45, "Authentication Request", 4 },
347 { 0x46, "Authentication Response", 5 },
348 { 0x48, "Base Station Challenge", 6 },
349 { 0x49, "Base Station Challenge Response", 7 },
350 { 0x24, "CM Service Request", 8 },
351 { 0x25, "CM Service Request Continuation", 9 },
352 { 0x07, "Connect", 10 },
353 { 0x10, "Flash with Information", 11 },
354 { 0x50, "Flash with Information Ack", 12 },
355 { 0x02, "Location Updating Accept", 13 },
356 { 0x04, "Location Updating Reject", 14 },
357 { 0x08, "Location Updating Request", 15 },
358 { 0x27, "Paging Response", 16 },
359 { 0x2B, "Parameter Update Confirm", 17 },
360 { 0x2C, "Parameter Update Request", 18 },
361 { 0x56, "Rejection", 19 },
362 { 0x03, "Progress", 20 },
363 { 0x70, "Service Redirection", 21 },
364 { 0x2E, "Service Release", 22 },
365 { 0x2F, "Service Release Complete", 23 },
366 { 0x47, "SSD Update Request", 24 },
367 { 0x4A, "SSD Update Response", 25 },
368 { 0x6A, "Status Request", 26 },
369 { 0x6B, "Status Response", 27 },
370 { 0x0B, "User Zone Reject", 28 },
371 { 0x0C, "User Zone Update", 29 },
372 { 0x0D, "User Zone Update Request", 30 },
378 * ansi_a_ios401_elem_1_strings when the same element
379 * is being described.
381 const ext_value_string_t ansi_a_ios501_elem_1_strings[] =
383 { 0x20, "Access Network Identifiers", 0 },
384 { 0x3D, "ADDS User Part", 1 },
385 { 0x25, "AMPS Hard Handoff Parameters", 2 },
386 { 0x30, "Anchor PDSN Address", 3 },
387 { 0x7C, "Anchor P-P Address", 4 },
388 { 0x41, "Authentication Challenge Parameter", 5 },
389 { 0x28, "Authentication Confirmation Parameter (RANDC)", 6 },
390 { 0x59, "Authentication Data", 7 },
391 { 0x4A, "Authentication Event", 8 },
392 { 0x40, "Authentication Parameter COUNT", 9 },
393 { 0x42, "Authentication Response Parameter", 10 },
394 { 0x37, "Band Class", 11 },
395 { 0x5B, "Called Party ASCII Number", 12 },
396 { 0x5E, "Called Party BCD Number", 13 },
397 { 0x4B, "Calling Party ASCII Number", 14 },
398 { 0x04, "Cause", 15 },
399 { 0x08, "Cause Layer 3", 16 },
400 { 0x0C, "CDMA Serving One Way Delay", 17 },
401 { 0x05, "Cell Identifier", 18 },
402 { 0x1A, "Cell Identifier List", 19 },
403 { 0x23, "Channel Number", 20 },
404 { 0x0B, "Channel Type", 21 },
405 { 0x19, "Circuit Group", 22 },
406 { 0x01, "Circuit Identity Code", 23 },
407 { 0x24, "Circuit Identity Code Extension", 24 },
408 { 0x12, "Classmark Information Type 2", 25 },
409 { 0x29, "Downlink Radio Environment", 26 },
410 { 0x2B, "Downlink Radio Environment List", 27 },
411 { 0x0A, "Encryption Information", 28 },
412 { 0x10, "Extended Handoff Direction Parameters", 29 },
413 { 0x2C, "Geographic Location", 30 },
414 { 0x5A, "Special Service Call Indicator", 31 },
415 { 0x26, "Handoff Power Level", 32 },
416 { 0x16, "Hard Handoff Parameters", 33 },
417 { 0x2E, "Information Element Requested", 34 },
418 { 0x09, "IS-2000 Channel Identity", 35 },
419 { 0x27, "IS-2000 Channel Identity 3X", 36 },
420 { 0x11, "IS-2000 Mobile Capabilities", 37 },
421 { 0x0F, "IS-2000 Non-Negotiable Service Configuration Record", 38 },
422 { 0x0E, "IS-2000 Service Configuration Record", 39 },
423 { 0x62, "IS-95/IS-2000 Cause Value", 40 },
424 { 0x67, "IS-2000 Redirection Record", 41 },
425 { 0x22, "IS-95 Channel Identity", 42 },
426 { 0x64, "IS-95 MS Measured Channel Identity", 43 },
427 { 0x17, "Layer 3 Information", 44 },
428 { 0x13, "Location Area Information", 45 },
429 { 0x38, "Message Waiting Indication", 46 },
430 { 0x0D, "Mobile Identity", 47 },
431 { 0x15, "MS Information Records (Forward)", 48 },
432 { 0xA0, "Origination Continuation Indicator", 49 },
433 { 0x5F, "PACA Order", 50 },
434 { 0x60, "PACA Reorigination Indicator", 51 },
435 { 0x4E, "PACA Timestamp", 52 },
436 { 0x70, "Packet Session Parameters", 53 },
437 { 0x14, "PDSN IP Address", 54 },
438 { 0xA2, "Power Down Indicator", 55 },
439 { 0x06, "Priority", 56 },
440 { 0x3B, "Protocol Revision", 57 },
441 { 0x18, "Protocol Type", 58 },
442 { 0x2D, "PSMM Count", 59 },
443 { 0x07, "Quality of Service Parameters", 60 },
444 { 0x1D, "Radio Environment and Resources", 61 },
445 { 0x1F, "Registration Type", 62 },
446 { 0x44, "Reject Cause", 63 },
447 { 0x1B, "Response Request", 64 },
448 { 0x68, "Return Cause", 65 },
449 { 0x21, "RF Channel Identity", 66 },
450 { 0x03, "Service Option", 67 },
451 { 0x1E, "Service Option Connection Identifier (SOCI)", 68 },
452 { 0x2A, "Service Option List", 69 },
453 { 0x69, "Service Redirection Info", 70 },
454 { 0x71, "Service Reference Identifier (SR_ID)", 71 },
456 { 0x34, "Signal", 73 },
457 { 0x35, "Slot Cycle Index", 74 },
458 { 0x31, "Software Version", 75 },
459 { 0x39, "Source RNC to Target RNC Transparent Container", 76 },
460 { 0x14, "Source PDSN Address", 77 },
462 { 0x3A, "Target RNC to Source RNC Transparent Container", 79 },
463 { 0x36, "Transcoder Mode", 80 }, /* XXX 0x1C in IOS 4.0.1 */
464 { 0x02, "User Zone ID", 81 },
465 { 0xA1, "Voice Privacy Request", 82 },
466 { 0x45, "A2p Bearer Session-Level Parameters", 83 },
467 { 0x46, "A2p Bearer Format-Specific Parameters", 84 },
468 { 0x73, "MS Designated Frequency", 85 },
469 { 0x7D, "Mobile Subscription Information", 86 },
470 { 0x72, "Public Long Code Mask Identification", 87 },
471 { 0x15, "MS Information Records (Reverse)", 88 },
476 * From Table 3.7.5-1 C.S0005-D v1.0 L3
478 #define ANSI_FWD_MS_INFO_REC_DISPLAY 0x01
479 #define ANSI_FWD_MS_INFO_REC_CLD_PN 0x02
480 #define ANSI_FWD_MS_INFO_REC_CLG_PN 0x03
481 #define ANSI_FWD_MS_INFO_REC_CONN_N 0x04
482 #define ANSI_FWD_MS_INFO_REC_SIGNAL 0x05
483 #define ANSI_FWD_MS_INFO_REC_MW 0x06
484 #define ANSI_FWD_MS_INFO_REC_SC 0x07
485 #define ANSI_FWD_MS_INFO_REC_CLD_PSA 0x08
486 #define ANSI_FWD_MS_INFO_REC_CLG_PSA 0x09
487 #define ANSI_FWD_MS_INFO_REC_CONN_SA 0x0a
488 #define ANSI_FWD_MS_INFO_REC_RED_N 0x0b
489 #define ANSI_FWD_MS_INFO_REC_RED_SA 0x0c
490 #define ANSI_FWD_MS_INFO_REC_MP 0x0d
491 #define ANSI_FWD_MS_INFO_REC_PA 0x0e
492 #define ANSI_FWD_MS_INFO_REC_LC 0x0f
493 #define ANSI_FWD_MS_INFO_REC_EDISPLAY 0x10
494 #define ANSI_FWD_MS_INFO_REC_NNSC 0x13
495 #define ANSI_FWD_MS_INFO_REC_MC_EDISPLAY 0x14
496 #define ANSI_FWD_MS_INFO_REC_CWI 0x15
497 #define ANSI_FWD_MS_INFO_REC_EMC_EDISPLAY 0x16
498 #define ANSI_FWD_MS_INFO_REC_ERTI 0xfe
500 static const value_string ansi_fwd_ms_info_rec_str[] = {
501 { ANSI_FWD_MS_INFO_REC_DISPLAY, "Display" },
502 { ANSI_FWD_MS_INFO_REC_CLD_PN, "Called Party Number" },
503 { ANSI_FWD_MS_INFO_REC_CLG_PN, "Calling Party Number" },
504 { ANSI_FWD_MS_INFO_REC_CONN_N, "Connected Number" },
505 { ANSI_FWD_MS_INFO_REC_SIGNAL, "Signal" },
506 { ANSI_FWD_MS_INFO_REC_MW, "Message Waiting" },
507 { ANSI_FWD_MS_INFO_REC_SC, "Service Configuration" },
508 { ANSI_FWD_MS_INFO_REC_CLD_PSA, "Called Party Subaddress" },
509 { ANSI_FWD_MS_INFO_REC_CLG_PSA, "Calling Party Subaddress" },
510 { ANSI_FWD_MS_INFO_REC_CONN_SA, "Connected Subaddress" },
511 { ANSI_FWD_MS_INFO_REC_RED_N, "Redirecting Number" },
512 { ANSI_FWD_MS_INFO_REC_RED_SA, "Redirecting Subaddress" },
513 { ANSI_FWD_MS_INFO_REC_MP, "Meter Pulses" },
514 { ANSI_FWD_MS_INFO_REC_PA, "Parametric Alerting" },
515 { ANSI_FWD_MS_INFO_REC_LC, "Line Control" },
516 { ANSI_FWD_MS_INFO_REC_EDISPLAY, "Extended Display" },
517 { ANSI_FWD_MS_INFO_REC_NNSC, "Non-Negotiable Service Configuration" },
518 { ANSI_FWD_MS_INFO_REC_MC_EDISPLAY, "Multiple Character Extended Display" },
519 { ANSI_FWD_MS_INFO_REC_CWI, "Call Waiting Indicator" },
520 { ANSI_FWD_MS_INFO_REC_EMC_EDISPLAY, "Enhanced Multiple Character Extended Display" },
521 { ANSI_FWD_MS_INFO_REC_ERTI, "Extended Record Type International" },
524 #define NUM_FWD_MS_INFO_REC (sizeof(ansi_fwd_ms_info_rec_str)/sizeof(value_string))
525 static gint ett_ansi_fwd_ms_info_rec[NUM_FWD_MS_INFO_REC];
528 * From Table 2.7.4-1 C.S0005-D v1.0 L3
530 #define ANSI_REV_MS_INFO_REC_KEYPAD_FAC 0x03
531 #define ANSI_REV_MS_INFO_REC_CLD_PN 0x04
532 #define ANSI_REV_MS_INFO_REC_CLG_PN 0x05
533 #define ANSI_REV_MS_INFO_REC_CALL_MODE 0x07
534 #define ANSI_REV_MS_INFO_REC_TERM_INFO 0x08
535 #define ANSI_REV_MS_INFO_REC_ROAM_INFO 0x09
536 #define ANSI_REV_MS_INFO_REC_SECUR_STS 0x0a
537 #define ANSI_REV_MS_INFO_REC_CONN_N 0x0b
538 #define ANSI_REV_MS_INFO_REC_IMSI 0x0c
539 #define ANSI_REV_MS_INFO_REC_ESN 0x0d
540 #define ANSI_REV_MS_INFO_REC_BAND_INFO 0x0e
541 #define ANSI_REV_MS_INFO_REC_POWER_INFO 0x0f
542 #define ANSI_REV_MS_INFO_REC_OP_MODE_INFO 0x10
543 #define ANSI_REV_MS_INFO_REC_SO_INFO 0x11
544 #define ANSI_REV_MS_INFO_REC_MO_INFO 0x12
545 #define ANSI_REV_MS_INFO_REC_SC_INFO 0x13
546 #define ANSI_REV_MS_INFO_REC_CLD_PSA 0x14
547 #define ANSI_REV_MS_INFO_REC_CLG_PSA 0x15
548 #define ANSI_REV_MS_INFO_REC_CONN_SA 0x16
549 #define ANSI_REV_MS_INFO_REC_PCI 0x17
550 #define ANSI_REV_MS_INFO_REC_IMSI_M 0x18
551 #define ANSI_REV_MS_INFO_REC_IMSI_T 0x19
552 #define ANSI_REV_MS_INFO_REC_CAP_INFO 0x1a
553 #define ANSI_REV_MS_INFO_REC_CCC_INFO 0x1b
554 #define ANSI_REV_MS_INFO_REC_EMO_INFO 0x1c
555 #define ANSI_REV_MS_INFO_REC_GEO_CAP 0x1e
556 #define ANSI_REV_MS_INFO_REC_BAND_SUB 0x1f
557 #define ANSI_REV_MS_INFO_REC_GECO 0x20
558 #define ANSI_REV_MS_INFO_REC_HOOK 0x21
559 #define ANSI_REV_MS_INFO_REC_QOS_PARAM 0x22
560 #define ANSI_REV_MS_INFO_REC_ENCRYPT_CAP 0x23
561 #define ANSI_REV_MS_INFO_REC_SMI_CAP 0x24
562 #define ANSI_REV_MS_INFO_REC_UIM_ID 0x25
563 #define ANSI_REV_MS_INFO_REC_ESN_ME 0x26
564 #define ANSI_REV_MS_INFO_REC_MEID 0x27
565 #define ANSI_REV_MS_INFO_REC_EKEYPAD_FAC 0x28
566 #define ANSI_REV_MS_INFO_REC_SYNC_ID 0x29
567 #define ANSI_REV_MS_INFO_REC_ERTI 0xfe
569 static const value_string ansi_rev_ms_info_rec_str[] = {
570 { ANSI_REV_MS_INFO_REC_KEYPAD_FAC, "Keypad Facility" },
571 { ANSI_REV_MS_INFO_REC_CLD_PN, "Called Party Number" },
572 { ANSI_REV_MS_INFO_REC_CLG_PN, "Calling Party Number" },
573 { ANSI_REV_MS_INFO_REC_CALL_MODE, "Call Mode" },
574 { ANSI_REV_MS_INFO_REC_TERM_INFO, "Terminal Information" },
575 { ANSI_REV_MS_INFO_REC_ROAM_INFO, "Roaming Information" },
576 { ANSI_REV_MS_INFO_REC_SECUR_STS, "Security Status" },
577 { ANSI_REV_MS_INFO_REC_CONN_N, "Connected Number" },
578 { ANSI_REV_MS_INFO_REC_IMSI, "IMSI" },
579 { ANSI_REV_MS_INFO_REC_ESN, "ESN" },
580 { ANSI_REV_MS_INFO_REC_BAND_INFO, "Band Class Information" },
581 { ANSI_REV_MS_INFO_REC_POWER_INFO, "Power Class Information" },
582 { ANSI_REV_MS_INFO_REC_OP_MODE_INFO, "Operating Mode Information" },
583 { ANSI_REV_MS_INFO_REC_SO_INFO, "Service Option Information" },
584 { ANSI_REV_MS_INFO_REC_MO_INFO, "Multiplex Option Information" },
585 { ANSI_REV_MS_INFO_REC_SC_INFO, "Service Configuration Information" },
586 { ANSI_REV_MS_INFO_REC_CLD_PSA, "Called Party Subaddress" },
587 { ANSI_REV_MS_INFO_REC_CLG_PSA, "Calling Party Subaddress" },
588 { ANSI_REV_MS_INFO_REC_CONN_SA, "Connected Subaddress" },
589 { ANSI_REV_MS_INFO_REC_PCI, "Power Control Information" },
590 { ANSI_REV_MS_INFO_REC_IMSI_M, "IMSI_M" },
591 { ANSI_REV_MS_INFO_REC_IMSI_T, "IMSI_T" },
592 { ANSI_REV_MS_INFO_REC_CAP_INFO, "Capability Information" },
593 { ANSI_REV_MS_INFO_REC_CCC_INFO, "Channel Configuration Capability Information" },
594 { ANSI_REV_MS_INFO_REC_EMO_INFO, "Extended Multiplex Option Information" },
595 { ANSI_REV_MS_INFO_REC_GEO_CAP, "Geo-Location Capability" },
596 { ANSI_REV_MS_INFO_REC_BAND_SUB, "Band Subclass Information" },
597 { ANSI_REV_MS_INFO_REC_GECO, "Global Emergency Call" },
598 { ANSI_REV_MS_INFO_REC_HOOK, "Hook Status" },
599 { ANSI_REV_MS_INFO_REC_QOS_PARAM, "QoS Parameters" },
600 { ANSI_REV_MS_INFO_REC_ENCRYPT_CAP, "Encryption Capability" },
601 { ANSI_REV_MS_INFO_REC_SMI_CAP, "Signaling Message Integrity Capability" },
602 { ANSI_REV_MS_INFO_REC_UIM_ID, "UIM_ID" },
603 { ANSI_REV_MS_INFO_REC_ESN_ME, "ESN_ME" },
604 { ANSI_REV_MS_INFO_REC_MEID, "MEID" },
605 { ANSI_REV_MS_INFO_REC_EKEYPAD_FAC, "Extended Keypad Facility" },
606 { ANSI_REV_MS_INFO_REC_SYNC_ID, "SYNC_ID" },
607 { ANSI_REV_MS_INFO_REC_ERTI, "Extended Record Type International" },
610 #define NUM_REV_MS_INFO_REC (sizeof(ansi_rev_ms_info_rec_str)/sizeof(value_string))
611 static gint ett_ansi_rev_ms_info_rec[NUM_REV_MS_INFO_REC];
614 * C.S0057 Table 1.5-1
616 static const gchar *band_class_str[] = {
617 "800 MHz Cellular System",
618 "1.850 to 1.990 GHz Broadband PCS",
619 "872 to 960 MHz TACS Band",
620 "832 to 925 MHz JTACS Band",
621 "1.750 to 1.870 GHz Korean PCS",
625 "1.710 to 1.880 GHz PCS",
628 "400 MHz European PAMR",
629 "800 MHz European PAMR",
630 "2.5 GHz IMT-2000 Extension",
634 "US 2.5 GHz Forward Link Only",
635 "700 MHz Public Safety",
638 #define NUM_BAND_CLASS_STR (sizeof(band_class_str)/sizeof(gchar *))
640 static const gchar *cell_disc_str[] = {
641 "whole Cell Global Identification (CGI)",
643 "Cell Identity (CI)",
645 "Location Area Identification (LAI)",
646 "Location Area Code (LAC)",
648 "IS-41 whole Cell Global Identification (ICGI)",
649 "Enhanced whole Cell Global Identification (ECGI)"
651 #define NUM_CELL_DISC_STR (sizeof(cell_disc_str)/sizeof(gchar *))
653 /* Initialize the protocol and registered fields */
654 static int proto_a_bsmap = -1;
655 static int proto_a_dtap = -1;
657 const ext_value_string_t *ansi_a_bsmap_strings = NULL;
658 const ext_value_string_t *ansi_a_dtap_strings = NULL;
659 const ext_value_string_t *ansi_a_elem_1_strings = NULL;
660 static guint ansi_a_elem_1_max = 0;
662 static int ansi_a_tap = -1;
664 static int hf_ansi_a_none = -1;
665 static int hf_ansi_a_bsmap_msgtype = -1;
666 static int hf_ansi_a_dtap_msgtype = -1;
667 static int hf_ansi_a_length = -1;
668 static int hf_ansi_a_elem_id = -1;
669 static int hf_ansi_a_esn = -1;
670 static int hf_ansi_a_imsi = -1;
671 static int hf_ansi_a_min = -1;
672 static int hf_ansi_a_meid = -1;
673 static int hf_ansi_a_cld_party_bcd_num = -1;
674 static int hf_ansi_a_clg_party_bcd_num = -1;
675 static int hf_ansi_a_cld_party_ascii_num = -1;
676 static int hf_ansi_a_clg_party_ascii_num = -1;
677 static int hf_ansi_a_cell_ci = -1;
678 static int hf_ansi_a_cell_lac = -1;
679 static int hf_ansi_a_cell_mscid = -1;
680 static int hf_ansi_a_pdsn_ip_addr = -1;
681 static int hf_ansi_a_s_pdsn_ip_addr = -1;
682 static int hf_ansi_a_anchor_ip_addr = -1;
683 static int hf_ansi_a_anchor_pp_ip_addr = -1;
684 static int hf_ansi_a_a2p_bearer_ipv4_addr = -1;
685 static int hf_ansi_a_a2p_bearer_ipv6_addr = -1;
686 static int hf_ansi_a_a2p_bearer_udp_port = -1;
687 static int hf_ansi_a_so = -1;
688 static int hf_ansi_a_cause_1 = -1; /* 1 octet cause */
689 static int hf_ansi_a_cause_2 = -1; /* 2 octet cause */
690 static int hf_ansi_a_meid_configured = -1;
693 /* Initialize the subtree pointers */
694 static gint ett_bsmap = -1;
695 static gint ett_dtap = -1;
696 static gint ett_elems = -1;
697 static gint ett_elem = -1;
698 static gint ett_dtap_oct_1 = -1;
699 static gint ett_cm_srvc_type = -1;
700 static gint ett_ansi_ms_info_rec_reserved = -1;
701 static gint ett_ansi_enc_info = -1;
702 static gint ett_scm = -1;
703 static gint ett_cell_list = -1;
704 static gint ett_bearer_list = -1;
705 static gint ett_re_list = -1;
706 static gint ett_so_list = -1;
707 static gint ett_adds_user_part = -1;
708 static gint ett_scr = -1;
709 static gint ett_srvc_con_rec = -1;
710 static gint ett_cm2_band_class = -1;
711 static gint ett_vp_algs = -1;
713 static char a_bigbuf[1024];
714 static dissector_handle_t rtp_handle=NULL;
715 static dissector_handle_t data_handle;
716 static dissector_handle_t dtap_handle;
717 static dissector_table_t is637_dissector_table; /* IS-637-A Transport Layer (SMS) */
718 static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */
719 static dissector_table_t is801_dissector_table; /* IS-801 (PLD) */
720 static packet_info *g_pinfo;
721 static proto_tree *g_tree;
722 static address rtp_src_addr;
723 static guint32 rtp_ipv4_addr;
724 static struct e_in6_addr rtp_ipv6_addr;
725 static guint16 rtp_port;
726 static gboolean a_meid_configured = FALSE;
729 typedef struct ansi_a_dgt_set_t
732 * would typically be 15 but to allow MEID decoding this
733 * needs to have room for full hexadecimal representation
735 unsigned char out[16];
740 * As per A.S0001 Called Party BCD Number
742 static ansi_a_dgt_set_t Dgt_tbcd = {
744 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
745 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c', 0
749 static ansi_a_dgt_set_t Dgt_msid = {
751 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
752 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?', 0
756 static ansi_a_dgt_set_t Dgt_meid = {
758 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
759 '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
766 * Unpack BCD input pattern into output ASCII pattern
768 * Input Pattern is supplied using the same format as the digits
770 * Returns: length of unpacked pattern
774 char *out, /* ASCII pattern out */
775 guchar *in, /* packed pattern in */
776 int num_octs, /* Number of octets to unpack */
777 ansi_a_dgt_set_t *dgt /* Digit definitions */
786 * unpack first value in byte
789 *out++ = dgt->out[i & 0x0f];
793 * unpack second value in byte
797 if ((num_octs == 1) && (i == 0x0f)) /* odd number bytes - hit filler */
800 *out++ = dgt->out[i];
811 ansi_a_so_int_to_str(
814 const gchar *str = NULL;
818 case 1: str = "Basic Variable Rate Voice Service (8 kbps)"; break;
819 case 2: str = "Mobile Station Loopback (8 kbps)"; break;
820 case 3: str = "(EVRC) Enhanced Variable Rate Voice Service (8 kbps)"; break;
821 case 4: str = "Asynchronous Data Service (9.6 kbps)"; break;
822 case 5: str = "Group 3 Facsimile (9.6 kbps)"; break;
823 case 6: str = "Short Message Services (Rate Set 1)"; break;
824 case 7: str = "Packet Data Service: Internet or ISO Protocol Stack (9.6 kbps)"; break;
825 case 8: str = "Packet Data Service: CDPD Protocol Stack (9.6 kbps)"; break;
826 case 9: str = "Mobile Station Loopback (13 kbps)"; break;
827 case 10: str = "STU-III Transparent Service"; break;
828 case 11: str = "STU-III Non-Transparent Service"; break;
829 case 12: str = "Asynchronous Data Service (14.4 or 9.6 kbps)"; break;
830 case 13: str = "Group 3 Facsimile (14.4 or 9.6 kbps)"; break;
831 case 14: str = "Short Message Services (Rate Set 2)"; break;
832 case 15: str = "Packet Data Service: Internet or ISO Protocol Stack (14.4 kbps)"; break;
833 case 16: str = "Packet Data Service: CDPD Protocol Stack (14.4 kbps)"; break;
834 case 17: str = "High Rate Voice Service (13 kbps)"; break;
835 case 32768: str = "QCELP (13 kbps)"; break;
836 case 32798: /* 0x801e */ str = "Qualcomm Loopback"; break;
837 case 32799: /* 0x801f */ str = "Qualcomm Markov 8 kbps Loopback"; break;
838 case 32800: /* 0x8020 */ str = "Qualcomm Packet Data"; break;
839 case 32801: /* 0x8021 */ str = "Qualcomm Async Data"; break;
840 case 18: str = "Over-the-Air Parameter Administration (Rate Set 1)"; break;
841 case 19: str = "Over-the-Air Parameter Administration (Rate Set 2)"; break;
842 case 20: str = "Group 3 Analog Facsimile (Rate Set 1)"; break;
843 case 21: str = "Group 3 Analog Facsimile (Rate Set 2)"; break;
844 case 22: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS1 reverse)"; break;
845 case 23: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS2 reverse)"; break;
846 case 24: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS1 reverse)"; break;
847 case 25: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS2 reverse)"; break;
848 case 26: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS1 reverse)"; break;
849 case 27: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS2 reverse)"; break;
850 case 28: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS1 reverse)"; break;
851 case 29: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS2 reverse)"; break;
852 case 30: str = "Supplemental Channel Loopback Test for Rate Set 1"; break;
853 case 31: str = "Supplemental Channel Loopback Test for Rate Set 2"; break;
854 case 32: str = "Test Data Service Option (TDSO)"; break;
855 case 33: str = "cdma2000 High Speed Packet Data Service, Internet or ISO Protocol Stack"; break;
856 case 34: str = "cdma2000 High Speed Packet Data Service, CDPD Protocol Stack"; break;
857 case 35: str = "Location Services (PDS), Rate Set 1 (9.6 kbps)"; break;
858 case 36: str = "Location Services (PDS), Rate Set 2 (14.4 kbps)"; break;
859 case 37: str = "ISDN Interworking Service (64 kbps)"; break;
860 case 38: str = "GSM Voice"; break;
861 case 39: str = "GSM Circuit Data"; break;
862 case 40: str = "GSM Packet Data"; break;
863 case 41: str = "GSM Short Message Service"; break;
864 case 42: str = "None Reserved for MC-MAP standard service options"; break;
865 case 54: str = "Markov Service Option (MSO)"; break;
866 case 55: str = "Loopback Service Option (LSO)"; break;
867 case 56: str = "Selectable Mode Vocoder"; break;
868 case 57: str = "32 kbps Circuit Video Conferencing"; break;
869 case 58: str = "64 kbps Circuit Video Conferencing"; break;
870 case 59: str = "HRPD Accounting Records Identifier"; break;
871 case 60: str = "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Removal"; break;
872 case 61: str = "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Compression"; break;
873 case 62: str = "- 4099 None Reserved for standard service options"; break;
874 case 68: str = "(EVRC-B NB) Enhanced Variable Rate Voice Service"; break;
875 case 70: str = "(EVRC-B WB) Enhanced Variable Rate Voice Service"; break;
876 case 73: str = "(EVRC-NW) Enhanced Variable Rate Voice Service"; break;
877 case 4100: str = "Asynchronous Data Service, Revision 1 (9.6 or 14.4 kbps)"; break;
878 case 4101: str = "Group 3 Facsimile, Revision 1 (9.6 or 14.4 kbps)"; break;
879 case 4102: str = "Reserved for standard service option"; break;
880 case 4103: str = "Packet Data Service: Internet or ISO Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
881 case 4104: str = "Packet Data Service: CDPD Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
883 if ((so >= 4105) && (so <= 32767)) { str = "Reserved for standard service options"; }
884 else if ((so >= 32769) && (so <= 32771)) { str = "Proprietary QUALCOMM Incorporated"; }
885 else if ((so >= 32772) && (so <= 32775)) { str = "Proprietary OKI Telecom"; }
886 else if ((so >= 32776) && (so <= 32779)) { str = "Proprietary Lucent Technologies"; }
887 else if ((so >= 32780) && (so <=32783)) { str = "Nokia"; }
888 else if ((so >= 32784) && (so <=32787)) { str = "NORTEL NETWORKS"; }
889 else if ((so >= 32788) && (so <=32791)) { str = "Sony Electronics Inc."; }
890 else if ((so >= 32792) && (so <=32795)) { str = "Motorola"; }
891 else if ((so >= 32796) && (so <=32799)) { str = "QUALCOMM Incorporated"; }
892 else if ((so >= 32800) && (so <=32803)) { str = "QUALCOMM Incorporated"; }
893 else if ((so >= 32804) && (so <=32807)) { str = "QUALCOMM Incorporated"; }
894 else if ((so >= 32808) && (so <=32811)) { str = "QUALCOMM Incorporated"; }
895 else if ((so >= 32812) && (so <=32815)) { str = "Lucent Technologies"; }
896 else if ((so >= 32816) && (so <=32819)) { str = "Denso International"; }
897 else if ((so >= 32820) && (so <=32823)) { str = "Motorola"; }
898 else if ((so >= 32824) && (so <=32827)) { str = "Denso International"; }
899 else if ((so >= 32828) && (so <=32831)) { str = "Denso International"; }
900 else if ((so >= 32832) && (so <=32835)) { str = "Denso International"; }
901 else if ((so >= 32836) && (so <=32839)) { str = "NEC America"; }
902 else if ((so >= 32840) && (so <=32843)) { str = "Samsung Electronics"; }
903 else if ((so >= 32844) && (so <=32847)) { str = "Texas Instruments Incorporated"; }
904 else if ((so >= 32848) && (so <=32851)) { str = "Toshiba Corporation"; }
905 else if ((so >= 32852) && (so <=32855)) { str = "LG Electronics Inc."; }
906 else if ((so >= 32856) && (so <=32859)) { str = "VIA Telecom Inc."; }
907 else { str = "Reserved"; }
915 /* ELEMENT FUNCTIONS */
917 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
918 if ((edc_len) > (edc_max_len)) \
920 proto_tree_add_text(tree, tvb, \
921 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
922 curr_offset += ((edc_len) - (edc_max_len)); \
925 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
926 if ((sdc_len) < (sdc_min_len)) \
928 proto_tree_add_text(tree, tvb, \
929 curr_offset, (sdc_len), "Short Data (?)"); \
930 curr_offset += (sdc_len); \
931 return(curr_offset - offset); \
934 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
935 if ((edc_len) != (edc_eq_len)) \
937 proto_tree_add_text(tree, tvb, \
938 asn1->offset, (edc_len), "Unexpected Data Length"); \
939 asn1->offset += (edc_len); \
943 #define NO_MORE_DATA_CHECK(nmdc_len) \
944 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
951 elem_chan_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
957 curr_offset = offset;
959 value = tvb_get_ntohs(tvb, curr_offset);
961 switch (global_a_variant)
963 case A_VARIANT_IOS401:
964 proto_tree_add_text(tree,
966 "Channel Number: %u",
969 g_snprintf(add_string, string_len, " - (%u)", value);
972 case A_VARIANT_IOS501:
973 other_decode_bitfield_value(a_bigbuf, value >> 8, 0xf8, 8);
974 proto_tree_add_text(tree,
979 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x07, 8);
980 proto_tree_add_text(tree, tvb, curr_offset, 1,
981 "%s : ARFCN (MSB): %u",
985 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
986 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
990 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value & 0x07ff);
996 /* no length check possible */
998 return(curr_offset - offset);
1005 elem_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1008 guint32 curr_offset;
1009 const gchar *str = NULL;
1012 curr_offset = offset;
1015 oct = tvb_get_guint8(tvb, curr_offset);
1019 case 0: str = "No Alert"; break;
1020 case 1: str = "Speech"; break;
1021 case 2: str = "Data"; data = TRUE; break;
1022 case 3: str = "Signaling"; break;
1028 proto_tree_add_text(tree,
1029 tvb, curr_offset, 1,
1030 "Speech or Data Indicator: %s",
1033 g_snprintf(add_string, string_len, " - (%s)", str);
1037 NO_MORE_DATA_CHECK(len);
1039 oct = tvb_get_guint8(tvb, curr_offset);
1043 case 0: str = "Reserved (invalid)"; break;
1044 case 1: str = "DCCH"; break;
1045 case 2: str = "Reserved for future use (invalid)"; break;
1046 case 8: str = "Full rate TCH channel Bm"; break;
1047 case 9: str = "Half rate TCH channel Lm"; break;
1053 proto_tree_add_text(tree,
1054 tvb, curr_offset, 1,
1055 "Channel Rate and Type: %s",
1060 NO_MORE_DATA_CHECK(len);
1062 oct = tvb_get_guint8(tvb, curr_offset);
1066 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1067 proto_tree_add_text(tree,
1068 tvb, curr_offset, 1,
1072 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1073 proto_tree_add_text(tree,
1074 tvb, curr_offset, 1,
1075 "%s : %sTransparent service",
1077 (oct & 0x40) ? "Non-" : "");
1079 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
1080 proto_tree_add_text(tree,
1081 tvb, curr_offset, 1,
1089 case 0: str = "No Resources Required (invalid)"; break;
1090 case 1: str = "Reserved"; break;
1091 case 2: str = "Reserved"; break;
1092 case 3: str = "TIA/EIA-IS-2000 8 kb/s vocoder"; break;
1093 case 4: str = "8 kb/s enhanced vocoder (EVRC)"; break;
1094 case 5: str = "13 kb/s vocoder"; break;
1095 case 6: str = "ADPCM"; break;
1101 proto_tree_add_text(tree,
1102 tvb, curr_offset, 1,
1103 "Speech Encoding Algorithm/data rate + Transparency Indicator: %s",
1109 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1111 return(curr_offset - offset);
1118 elem_return_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1122 guint32 curr_offset;
1124 curr_offset = offset;
1126 oct = tvb_get_guint8(tvb, curr_offset);
1128 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1129 proto_tree_add_text(tree, tvb, curr_offset, 1,
1135 case 0: str = "Normal access"; break;
1136 case 1: str = "Service redirection failed as a result of system not found"; break;
1137 case 2: str = "Service redirection failed as a result of protocol mismatch"; break;
1138 case 3: str = "Service redirection failed as a result of registration rejection"; break;
1139 case 4: str = "Service redirection failed as a result of wrong SID"; break;
1140 case 5: str = "Service redirection failed as a result of wrong NID"; break;
1146 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1147 proto_tree_add_text(tree, tvb, curr_offset, 1,
1148 "%s : Return Cause: %s",
1154 /* no length check possible */
1156 return(curr_offset - offset);
1163 elem_rf_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1167 guint32 curr_offset;
1170 curr_offset = offset;
1172 proto_tree_add_text(tree, tvb, curr_offset, 1,
1177 oct = tvb_get_guint8(tvb, curr_offset);
1179 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1180 proto_tree_add_text(tree, tvb, curr_offset, 1,
1184 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1185 proto_tree_add_text(tree, tvb, curr_offset, 1,
1189 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1190 proto_tree_add_text(tree, tvb, curr_offset, 1,
1191 "%s : ANSI/EIA/TIA-553",
1196 oct = tvb_get_guint8(tvb, curr_offset);
1198 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1199 proto_tree_add_text(tree, tvb, curr_offset, 1,
1203 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1204 proto_tree_add_text(tree, tvb, curr_offset, 1,
1205 "%s : Timeslot Number",
1210 value = tvb_get_ntohs(tvb, curr_offset);
1212 other_decode_bitfield_value(a_bigbuf, value >> 8, 0xf8, 8);
1213 proto_tree_add_text(tree, tvb, curr_offset, 1,
1217 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x07, 8);
1218 proto_tree_add_text(tree, tvb, curr_offset, 1,
1219 "%s : ARFCN (MSB): %u",
1223 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1224 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
1228 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value & 0x07ff);
1232 /* no length check possible */
1234 return(curr_offset - offset);
1241 elem_sr_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1244 guint32 curr_offset;
1246 curr_offset = offset;
1248 oct = tvb_get_guint8(tvb, curr_offset);
1250 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
1251 proto_tree_add_text(tree,
1252 tvb, curr_offset, 1,
1256 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1257 proto_tree_add_text(tree,
1258 tvb, curr_offset, 1,
1263 g_snprintf(add_string, string_len, " - (%u)", oct);
1267 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1269 return(curr_offset - offset);
1276 elem_sid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1279 guint32 curr_offset;
1282 curr_offset = offset;
1284 value = tvb_get_ntohs(tvb, curr_offset);
1286 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x80, 8);
1287 proto_tree_add_text(tree, tvb, curr_offset, 1,
1291 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x7f, 8);
1292 proto_tree_add_text(tree, tvb, curr_offset, 1,
1293 "%s : SID (MSB), %u",
1297 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1298 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
1302 g_snprintf(add_string, string_len, " - (SID: %u)", value & 0x7fff);
1306 /* no length check possible */
1308 return(curr_offset - offset);
1315 elem_is95_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1319 guint32 curr_offset;
1321 curr_offset = offset;
1323 oct = tvb_get_guint8(tvb, curr_offset);
1325 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1326 proto_tree_add_text(tree, tvb, curr_offset, 1,
1327 "%s : Hard Handoff",
1330 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1331 proto_tree_add_text(tree, tvb, curr_offset, 1,
1332 "%s : Number of Channels to Add: %u",
1336 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1337 proto_tree_add_text(tree, tvb, curr_offset, 1,
1338 "%s : Frame Offset: (%u), %.2f ms",
1341 (oct & 0x0f) * 1.25);
1345 NO_MORE_DATA_CHECK(len);
1347 SHORT_DATA_CHECK(len - (curr_offset - offset), 4);
1351 oct = tvb_get_guint8(tvb, curr_offset);
1353 proto_tree_add_text(tree, tvb, curr_offset, 1,
1354 "Walsh Code Channel Index: %u",
1359 oct = tvb_get_guint8(tvb, curr_offset);
1361 other_decode_bitfield_value(a_bigbuf, oct, 0xff, 8);
1362 proto_tree_add_text(tree, tvb, curr_offset, 1,
1363 "%s : Pilot PN Code (LSB)",
1369 oct = tvb_get_guint8(tvb, curr_offset);
1370 value |= ((guint32) (oct & 0x80)) << 1;
1372 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1373 proto_tree_add_text(tree, tvb, curr_offset, 1,
1374 "%s : Pilot PN Code (MSB): %u",
1378 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1379 proto_tree_add_text(tree, tvb, curr_offset, 1,
1380 "%s : Power Combined",
1383 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1384 proto_tree_add_text(tree, tvb, curr_offset, 1,
1385 "%s : Frequency Included",
1388 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1389 proto_tree_add_text(tree, tvb, curr_offset, 1,
1393 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
1395 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1396 proto_tree_add_text(tree, tvb, curr_offset, 1,
1397 "%s : ARFCN (MSB): %u",
1403 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1404 proto_tree_add_text(tree, tvb, curr_offset, 1,
1408 if (add_string[0] == '\0')
1410 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value);
1415 while ((len - (curr_offset - offset)) >= 4);
1417 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1419 return(curr_offset - offset);
1431 elem_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1435 guint32 curr_offset;
1438 proto_tree *subtree;
1441 curr_offset = offset;
1445 while ((len - (curr_offset - offset)) >= 2)
1449 oct = tvb_get_guint8(tvb, curr_offset);
1451 switch ((oct & 0x7c) >> 2)
1453 case 0: str = "Not Used - Invalid value"; break;
1454 case 1: str = "SME Key: Signaling Message Encryption Key"; break;
1455 case 2: str = "Reserved (VPM: Voice Privacy Mask)"; break;
1456 case 3: str = "Reserved"; break;
1457 case 4: str = "Private Longcode"; break;
1458 case 5: str = "Data Key (ORYX)"; break;
1459 case 6: str = "Initial RAND"; break;
1466 proto_tree_add_text(tree,
1467 tvb, curr_offset, 1,
1468 "Encryption Info [%u]: (%u) %s",
1473 subtree = proto_item_add_subtree(item, ett_ansi_enc_info);
1475 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1476 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1480 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
1481 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1482 "%s : Encryption Parameter Identifier: (%u) %s",
1487 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1488 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1491 (oct & 0x02) ? "active" : "inactive");
1493 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1494 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1495 "%s : Available: algorithm is %savailable",
1497 (oct & 0x01) ? "" : "not ");
1501 oct_len = tvb_get_guint8(tvb, curr_offset);
1503 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
1504 curr_offset, 1, oct_len);
1510 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
1512 proto_tree_add_text(subtree, tvb, curr_offset, oct_len,
1513 "Encryption Parameter value");
1515 curr_offset += oct_len;
1519 g_snprintf(add_string, string_len, " - %u record%s",
1520 num_recs, plurality(num_recs, "", "s"));
1522 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1524 return(curr_offset - offset);
1529 * NO ASSOCIATED DATA
1541 elem_cm_info_type_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1544 guint8 num_bands, band_class_count;
1545 guint32 curr_offset;
1547 proto_tree *subtree;
1551 curr_offset = offset;
1553 oct = tvb_get_guint8(tvb, curr_offset);
1555 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
1556 proto_tree_add_text(tree, tvb, curr_offset, 1,
1557 "%s : Mobile P_REV: %u",
1561 g_snprintf(add_string, string_len, " - P_REV (%u)", (oct & 0xe0) >> 5);
1563 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1564 proto_tree_add_text(tree, tvb, curr_offset, 1,
1568 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1569 proto_tree_add_text(tree, tvb, curr_offset, 1,
1570 "%s : See List of Entries",
1575 case 0: str = "Class 1, vehicle and portable"; break;
1576 case 1: str = "Class 2, portable"; break;
1577 case 2: str = "Class 3, handheld"; break;
1578 case 3: str = "Class 4, handheld"; break;
1579 case 4: str = "Class 5, handheld"; break;
1580 case 5: str = "Class 6, handheld"; break;
1581 case 6: str = "Class 7, handheld"; break;
1583 str = "Class 8, handheld";
1587 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1588 proto_tree_add_text(tree, tvb, curr_offset, 1,
1589 "%s : RF Power Capability: %s",
1595 proto_tree_add_text(tree, tvb, curr_offset, 1,
1600 oct = tvb_get_guint8(tvb, curr_offset);
1602 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1603 proto_tree_add_text(tree, tvb, curr_offset, 1,
1604 "%s : NAR_AN_CAP: N-AMPS %ssupported",
1606 (oct & 0x80) ? "" : "not ");
1608 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1609 proto_tree_add_text(tree, tvb, curr_offset, 1,
1610 "%s : IS-95: %ssupported",
1612 (oct & 0x40) ? "" : "not ");
1614 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1615 proto_tree_add_text(tree, tvb, curr_offset, 1,
1616 "%s : Slotted: mobile is %sin slotted mode",
1618 (oct & 0x20) ? "" : "not ");
1620 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1621 proto_tree_add_text(tree, tvb, curr_offset, 1,
1625 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1626 proto_tree_add_text(tree, tvb, curr_offset, 1,
1627 "%s : DTX: mobile is %scapable of DTX",
1629 (oct & 0x04) ? "" : "not ");
1631 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1632 proto_tree_add_text(tree, tvb, curr_offset, 1,
1633 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1635 (oct & 0x02) ? "" : "not ");
1637 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1638 proto_tree_add_text(tree, tvb, curr_offset, 1,
1644 NO_MORE_DATA_CHECK(len);
1646 proto_tree_add_text(tree, tvb, curr_offset, 1,
1651 NO_MORE_DATA_CHECK(len);
1653 oct = tvb_get_guint8(tvb, curr_offset);
1655 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1656 proto_tree_add_text(tree, tvb, curr_offset, 1,
1660 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1661 proto_tree_add_text(tree, tvb, curr_offset, 1,
1662 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1664 (oct & 0x02) ? "" : "not ");
1666 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1667 proto_tree_add_text(tree, tvb, curr_offset, 1,
1668 "%s : PACA Supported Indicator (PSI): mobile station %s PACA",
1670 (oct & 0x01) ? "supports" : "does not support");
1674 NO_MORE_DATA_CHECK(len);
1676 oct = tvb_get_guint8(tvb, curr_offset);
1678 proto_tree_add_text(tree, tvb, curr_offset, 1,
1684 oct = tvb_get_guint8(tvb, curr_offset);
1687 proto_tree_add_text(tree, tvb, curr_offset, 1,
1688 "Station Class Mark: %u",
1692 * following SCM decode is from:
1693 * 3GPP2 C.S0005-0 section 2.3.3
1694 * 3GPP2 C.S0072-0 section 2.1.2
1696 subtree = proto_item_add_subtree(item, ett_scm);
1698 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1699 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1700 "%s : Extended SCM Indicator: %s",
1702 (oct & 0x80) ? "Band Classes 1,4" : "Other bands");
1704 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1705 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1708 (oct & 0x40) ? "Dual Mode" : "CDMA Only");
1710 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1711 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1714 (oct & 0x20) ? "Slotted" : "Non-Slotted");
1719 g_strlcat(add_string, " (MEID configured)", string_len);
1720 a_meid_configured = TRUE;
1727 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1728 proto_tree_add_boolean_format(subtree, hf_ansi_a_meid_configured, tvb,
1729 curr_offset, 1, a_meid_configured,
1730 "%s : MEID %sconfigured",
1734 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1735 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1736 "%s : 25 MHz Bandwidth",
1739 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1740 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1741 "%s : %s Transmission",
1743 (oct & 0x04) ? "Discontinuous" : "Continuous");
1747 case 0x00: str = "Class I"; break;
1748 case 0x01: str = "Class II"; break;
1749 case 0x02: str = "Class III"; break;
1750 case 0x03: str = "Reserved"; break;
1753 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1754 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1755 "%s : Power Class for Band Class 0 Analog Operation: %s",
1761 NO_MORE_DATA_CHECK(len);
1763 band_class_count = tvb_get_guint8(tvb, curr_offset);
1765 proto_tree_add_text(tree, tvb, curr_offset, 1,
1766 "Count of Band Class Entries: %u",
1771 oct = tvb_get_guint8(tvb, curr_offset);
1773 proto_tree_add_text(tree, tvb, curr_offset, 1,
1774 "Band Class Entry Length: %u",
1779 NO_MORE_DATA_CHECK(len);
1783 SHORT_DATA_CHECK(len - (curr_offset - offset), 3);
1789 proto_tree_add_text(tree, tvb, curr_offset, 3,
1790 "Band Class Entry [%u]",
1793 subtree = proto_item_add_subtree(item, ett_cm2_band_class);
1795 oct = tvb_get_guint8(tvb, curr_offset);
1797 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
1798 proto_tree_add_text(subtree,
1799 tvb, curr_offset, 1,
1803 band_class = oct & 0x1f;
1804 if ((band_class < 0) || (band_class >= (gint) NUM_BAND_CLASS_STR))
1810 str = band_class_str[band_class];
1813 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
1814 proto_tree_add_text(subtree,
1815 tvb, curr_offset, 1,
1816 "%s : Band Class: %s",
1822 oct2 = tvb_get_guint8(tvb, curr_offset);
1823 oct = tvb_get_guint8(tvb, curr_offset+1);
1827 other_decode_bitfield_value(a_bigbuf, oct2, 0x80, 8);
1828 proto_tree_add_text(subtree,
1829 tvb, curr_offset, 1,
1830 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode in Band Class 1 and Band Class 4)",
1833 other_decode_bitfield_value(a_bigbuf, oct2, 0x40, 8);
1834 proto_tree_add_text(subtree,
1835 tvb, curr_offset, 1,
1836 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode in Band Class 0 and Band Class 3)",
1839 other_decode_bitfield_value(a_bigbuf, oct2, 0x20, 8);
1840 proto_tree_add_text(subtree,
1841 tvb, curr_offset, 1,
1842 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1845 other_decode_bitfield_value(a_bigbuf, oct2, 0x10, 8);
1846 proto_tree_add_text(subtree,
1847 tvb, curr_offset, 1,
1848 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1851 other_decode_bitfield_value(a_bigbuf, oct2, 0x08, 8);
1852 proto_tree_add_text(subtree,
1853 tvb, curr_offset, 1,
1854 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1859 other_decode_bitfield_value(a_bigbuf, oct2, 0x80, 8);
1860 proto_tree_add_text(subtree,
1861 tvb, curr_offset, 1,
1862 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode)",
1865 other_decode_bitfield_value(a_bigbuf, oct2, 0x40, 8);
1866 proto_tree_add_text(subtree,
1867 tvb, curr_offset, 1,
1868 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode)",
1871 other_decode_bitfield_value(a_bigbuf, oct2, 0x20, 8);
1872 proto_tree_add_text(subtree,
1873 tvb, curr_offset, 1,
1874 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1877 other_decode_bitfield_value(a_bigbuf, oct2, 0x10, 8);
1878 proto_tree_add_text(subtree,
1879 tvb, curr_offset, 1,
1880 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1883 other_decode_bitfield_value(a_bigbuf, oct2, 0x08, 8);
1884 proto_tree_add_text(subtree,
1885 tvb, curr_offset, 1,
1886 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1890 other_decode_bitfield_value(a_bigbuf, oct2, 0x07, 8);
1891 proto_tree_add_text(subtree,
1892 tvb, curr_offset, 1,
1898 proto_tree_add_text(subtree,
1899 tvb, curr_offset, 1,
1900 "Band Class MS Protocol Level: %u",
1905 proto_item_append_text(item, ": (%d)", band_class);
1909 while (((len - (curr_offset - offset)) >= 3) &&
1910 (num_bands < band_class_count));
1913 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1915 return(curr_offset - offset);
1922 elem_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1927 guint32 curr_offset;
1930 curr_offset = offset;
1932 oct = tvb_get_guint8(tvb, curr_offset);
1937 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1938 proto_tree_add_text(tree,
1939 tvb, curr_offset, 1,
1940 "%s : MEID Hex Digit 1: %X",
1944 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1945 proto_tree_add_text(tree,
1946 tvb, curr_offset, 1,
1947 "%s : Odd/Even Indicator: %s",
1949 (oct & 0x08) ? "ODD" : "EVEN");
1951 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1952 proto_tree_add_text(tree,
1953 tvb, curr_offset, 1,
1954 "%s : Type of Identity: MEID",
1957 a_bigbuf[0] = Dgt_meid.out[(oct & 0xf0) >> 4];
1960 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
1962 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
1965 curr_offset += len - (curr_offset - offset);
1967 proto_tree_add_string_format(tree,
1969 tvb, offset + 1, len - 1,
1974 g_snprintf(add_string, string_len, " - %s (%s)",
1980 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
1981 proto_tree_add_text(tree,
1982 tvb, curr_offset, 1,
1986 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1987 proto_tree_add_text(tree,
1988 tvb, curr_offset, 1,
1989 "%s : Type of Identity: Broadcast",
1994 oct = tvb_get_guint8(tvb, curr_offset);
1996 switch ((oct & 0xc0) >> 6)
1998 case 0: str = "Normal"; break;
1999 case 1: str = "Interactive"; break;
2000 case 2: str = "Urgent"; break;
2006 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2007 proto_tree_add_text(tree,
2008 tvb, curr_offset, 1,
2009 "%s : Priority: %s",
2013 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
2014 proto_tree_add_text(tree,
2015 tvb, curr_offset, 1,
2016 "%s : Message ID: %u",
2022 oct = tvb_get_guint8(tvb, curr_offset);
2024 proto_tree_add_text(tree,
2025 tvb, curr_offset, 1,
2029 g_snprintf(add_string, string_len, " - Broadcast (Zone ID: %u)", oct);
2033 value = tvb_get_ntohs(tvb, curr_offset);
2037 case 0x0000: str = "Unknown or unspecified"; break;
2038 case 0x0001: str = "Emergency Broadcasts"; break;
2039 case 0x0002: str = "Administrative"; break;
2040 case 0x0003: str = "Maintenance"; break;
2041 case 0x0004: str = "General News - Local"; break;
2042 case 0x0005: str = "General News - Regional"; break;
2043 case 0x0006: str = "General News - National"; break;
2044 case 0x0007: str = "General News - International"; break;
2045 case 0x0008: str = "Business/Financial News - Local"; break;
2046 case 0x0009: str = "Business/Financial News - Regional"; break;
2047 case 0x000A: str = "Business/Financial News - National"; break;
2048 case 0x000B: str = "Business/Financial News - International"; break;
2049 case 0x000C: str = "Sports News - Local"; break;
2050 case 0x000D: str = "Sports News - Regional"; break;
2051 case 0x000E: str = "Sports News - National"; break;
2052 case 0x000F: str = "Sports News - International"; break;
2053 case 0x0010: str = "Entertainment News - Local"; break;
2054 case 0x0011: str = "Entertainment News - Regional"; break;
2055 case 0x0012: str = "Entertainment News - National"; break;
2056 case 0x0013: str = "Entertainment News - International"; break;
2057 case 0x0014: str = "Local Weather"; break;
2058 case 0x0015: str = "Area Traffic Reports"; break;
2059 case 0x0016: str = "Local Airport Flight Schedules"; break;
2060 case 0x0017: str = "Restaurants"; break;
2061 case 0x0018: str = "Lodgings"; break;
2062 case 0x0019: str = "Retail Directory"; break;
2063 case 0x001A: str = "Advertisements"; break;
2064 case 0x001B: str = "Stock Quotes"; break;
2065 case 0x001C: str = "Employment Opportunities"; break;
2066 case 0x001D: str = "Medical/Health/Hospitals"; break;
2067 case 0x001E: str = "Technology News"; break;
2068 case 0x001F: str = "Multi-category"; break;
2070 if ((value >= 0x0020) && (value <= 0x8000)) { str = "Reserved for standard service categories"; }
2071 else { str = "Reserved for proprietary service categories"; }
2075 proto_tree_add_text(tree,
2076 tvb, curr_offset, 2,
2083 oct = tvb_get_guint8(tvb, curr_offset);
2087 case 0: str = "Unknown or unspecified"; break;
2088 case 1: str = "English"; break;
2089 case 2: str = "French"; break;
2090 case 3: str = "Spanish"; break;
2091 case 4: str = "Japanese"; break;
2092 case 5: str = "Korean"; break;
2093 case 6: str = "Chinese"; break;
2094 case 7: str = "Hebrew"; break;
2100 proto_tree_add_text(tree,
2101 tvb, curr_offset, 1,
2102 "Language: (%u) %s",
2110 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2111 proto_tree_add_text(tree,
2112 tvb, curr_offset, 1,
2116 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2117 proto_tree_add_text(tree,
2118 tvb, curr_offset, 1,
2119 "%s : Odd/Even Indicator: %s",
2121 (oct & 0x08) ? "ODD" : "EVEN");
2123 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2124 proto_tree_add_text(tree,
2125 tvb, curr_offset, 1,
2126 "%s : Type of Identity: No Identity Code",
2129 g_snprintf(add_string, string_len, " - No Identity Code");
2135 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2136 "Format not supported");
2139 curr_offset += len - 1;
2143 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2144 proto_tree_add_text(tree,
2145 tvb, curr_offset, 1,
2146 "%s : Identity Digit 1: %c",
2148 Dgt_msid.out[(oct & 0xf0) >> 4]);
2150 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2151 proto_tree_add_text(tree,
2152 tvb, curr_offset, 1,
2153 "%s : Odd/Even Indicator: %s",
2155 (oct & 0x08) ? "ODD" : "EVEN");
2157 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2158 proto_tree_add_text(tree,
2159 tvb, curr_offset, 1,
2160 "%s : Type of Identity: %s",
2162 ((oct & 0x07) == 1) ? "MIN" : "IMSI");
2164 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2167 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
2169 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2172 proto_tree_add_string_format(tree,
2173 ((oct & 0x07) == 1) ? hf_ansi_a_min : hf_ansi_a_imsi,
2174 tvb, curr_offset, len - (curr_offset - offset),
2179 g_snprintf(add_string, string_len, " - %s (%s)",
2180 ((oct & 0x07) == 1) ? "MIN" : "IMSI",
2183 curr_offset += len - (curr_offset - offset);
2187 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2188 proto_tree_add_text(tree,
2189 tvb, curr_offset, 1,
2193 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2194 proto_tree_add_text(tree,
2195 tvb, curr_offset, 1,
2196 "%s : Odd/Even Indicator: %s",
2198 (oct & 0x08) ? "ODD" : "EVEN");
2200 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2201 proto_tree_add_text(tree,
2202 tvb, curr_offset, 1,
2203 "%s : Type of Identity: Interface Directory Number",
2206 g_snprintf(add_string, string_len, " - Interface Directory Number");
2212 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2213 "Format not supported");
2216 curr_offset += len - 1;
2220 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2221 proto_tree_add_text(tree,
2222 tvb, curr_offset, 1,
2226 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2227 proto_tree_add_text(tree,
2228 tvb, curr_offset, 1,
2229 "%s : Odd/Even Indicator: %s",
2231 (oct & 0x08) ? "ODD" : "EVEN");
2233 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2234 proto_tree_add_text(tree,
2235 tvb, curr_offset, 1,
2236 "%s : Type of Identity: TMSI",
2239 g_snprintf(add_string, string_len, " - TMSI");
2245 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2246 "Format not supported");
2249 curr_offset += len - 1;
2253 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2254 proto_tree_add_text(tree,
2255 tvb, curr_offset, 1,
2259 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2260 proto_tree_add_text(tree,
2261 tvb, curr_offset, 1,
2262 "%s : Odd/Even Indicator: %s",
2264 (oct & 0x08) ? "ODD" : "EVEN");
2266 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2267 proto_tree_add_text(tree,
2268 tvb, curr_offset, 1,
2269 "%s : Type of Identity: ESN",
2274 value = tvb_get_ntohl(tvb, curr_offset);
2276 proto_tree_add_uint(tree, hf_ansi_a_esn,
2277 tvb, curr_offset, 4,
2280 g_snprintf(add_string, string_len, " - %sESN (0x%04x)",
2281 a_meid_configured ? "p" : "",
2288 proto_tree_add_text(tree, tvb, curr_offset, len,
2291 g_snprintf(add_string, string_len, " - Format Unknown");
2297 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2299 return(curr_offset - offset);
2306 elem_sci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2309 guint32 curr_offset;
2312 curr_offset = offset;
2314 oct = tvb_get_guint8(tvb, curr_offset);
2316 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
2317 proto_tree_add_text(tree,
2318 tvb, curr_offset, 1,
2322 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2323 proto_tree_add_text(tree,
2324 tvb, curr_offset, 1,
2325 "%s : Slot Cycle Index: %u",
2329 g_snprintf(add_string, string_len, " - (%u)", oct & 0x07);
2333 /* no length check possible */
2335 return(curr_offset - offset);
2342 elem_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2345 guint32 curr_offset;
2347 curr_offset = offset;
2349 oct = tvb_get_guint8(tvb, curr_offset);
2351 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2352 proto_tree_add_text(tree,
2353 tvb, curr_offset, 1,
2357 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
2358 proto_tree_add_text(tree,
2359 tvb, curr_offset, 1,
2360 "%s : Call Priority Level: %u",
2364 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2365 proto_tree_add_text(tree,
2366 tvb, curr_offset, 1,
2367 "%s : Queuing %sallowed",
2369 (oct & 0x02) ? "" : "not ");
2371 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2372 proto_tree_add_text(tree,
2373 tvb, curr_offset, 1,
2374 "%s : Preemption %sallowed",
2376 (oct & 0x01) ? "" : "not ");
2378 g_snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
2382 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2384 return(curr_offset - offset);
2391 elem_p_rev(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2394 guint32 curr_offset;
2396 curr_offset = offset;
2398 oct = tvb_get_guint8(tvb, curr_offset);
2400 proto_tree_add_text(tree, tvb, curr_offset, 1,
2403 g_snprintf(add_string, string_len, " - (%u)", oct);
2407 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2409 return(curr_offset - offset);
2416 elem_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2420 guint32 curr_offset;
2421 const gchar *str = NULL;
2423 curr_offset = offset;
2425 oct = tvb_get_guint8(tvb, curr_offset);
2427 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2428 proto_tree_add_text(tree,
2429 tvb, curr_offset, 1,
2437 if ((oct & 0x0f) == 0x00)
2439 /* national cause */
2440 switch ((oct & 0x70) >> 4)
2442 case 0: str = "Normal Event"; break;
2443 case 1: str = "Normal Event"; break;
2444 case 2: str = "Resource Unavailable"; break;
2445 case 3: str = "Service or option not available"; break;
2446 case 4: str = "Service or option not implemented"; break;
2447 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
2448 case 6: str = "Protocol error"; break;
2450 str = "Interworking";
2454 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2455 proto_tree_add_text(tree,
2456 tvb, curr_offset, 1,
2457 "%s : Cause Class: %s",
2461 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2462 proto_tree_add_text(tree,
2463 tvb, curr_offset, 1,
2464 "%s : National Cause",
2469 value = tvb_get_guint8(tvb, curr_offset);
2471 proto_tree_add_uint_format(tree, hf_ansi_a_cause_2, tvb,
2473 ((oct & 0x7f) << 8) | value,
2478 g_snprintf(add_string, string_len, " - (National Cause)");
2482 value = tvb_get_guint8(tvb, curr_offset + 1);
2484 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2486 proto_tree_add_uint_format(tree, hf_ansi_a_cause_2, tvb,
2488 ((oct & 0x7f) << 8) | value,
2489 "%s : Cause (MSB): %u",
2491 ((oct & 0x7f) << 8) | value);
2495 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
2496 proto_tree_add_text(tree, tvb, curr_offset, 1,
2507 case 0x00: str = "Radio interface message failure"; break;
2508 case 0x01: str = "Radio interface failure"; break;
2509 case 0x02: str = "Uplink Quality"; break;
2510 case 0x03: str = "Uplink strength"; break;
2511 case 0x04: str = "Downlink quality"; break;
2512 case 0x05: str = "Downlink strength"; break;
2513 case 0x06: str = "Distance"; break;
2514 case 0x07: str = "OAM&P intervention"; break;
2515 case 0x08: str = "MS busy"; break;
2516 case 0x09: str = "Call processing"; break;
2517 case 0x0A: str = "Reversion to old channel"; break;
2518 case 0x0B: str = "Handoff successful"; break;
2519 case 0x0C: str = "No response from MS"; break;
2520 case 0x0D: str = "Timer expired"; break;
2521 case 0x0E: str = "Better cell (power budget)"; break;
2522 case 0x0F: str = "Interference"; break;
2523 case 0x10: str = "Packet call going dormant"; break;
2524 case 0x11: str = "Service option not available"; break;
2526 case 0x12: str = "Invalid Call"; break;
2527 case 0x13: str = "Successful operation"; break;
2528 case 0x14: str = "Normal call release"; break;
2531 case 0x15: str = "Short data burst authentication failure"; break;
2532 case 0x17: str = "Time critical relocation/handoff"; break;
2533 case 0x18: str = "Network optimization"; break;
2534 case 0x19: str = "Power down from dormant state"; break;
2535 case 0x1A: str = "Authentication failure"; break;
2537 case 0x1B: str = "Inter-BS Soft Handoff Drop Target"; break;
2538 case 0x1D: str = "Intra-BS Soft Handoff Drop Target"; break;
2541 case 0x1E: str = "Autonomous Registration by the Network"; break;
2543 case 0x20: str = "Equipment failure"; break;
2544 case 0x21: str = "No radio resource available"; break;
2545 case 0x22: str = "Requested terrestrial resource unavailable"; break;
2548 case 0x23: str = "A2p RTP Payload Type not available"; break;
2549 case 0x24: str = "A2p Bearer Format Address Type not available"; break;
2551 case 0x25: str = "BS not equipped"; break;
2552 case 0x26: str = "MS not equipped (or incapable)"; break;
2555 case 0x27: str = "2G only sector"; break;
2556 case 0x28: str = "3G only sector"; break;
2558 case 0x29: str = "PACA Call Queued"; break;
2561 case 0x2A: str = "Handoff Blocked"; break;
2563 case 0x2B: str = "Alternate signaling type reject"; break;
2566 case 0x2C: str = "A2p Resource not available"; break;
2568 case 0x2D: str = "PACA Queue Overflow"; break;
2569 case 0x2E: str = "PACA Cancel Request Rejected"; break;
2570 case 0x30: str = "Requested transcoding/rate adaptation unavailable"; break;
2571 case 0x31: str = "Lower priority radio resources not available"; break;
2572 case 0x32: str = "PCF resources not available"; break; /* IOS 4 */
2573 case 0x33: str = "TFO Control request Failed"; break;
2576 case 0x34: str = "MS rejected order"; break;
2578 case 0x40: str = "Ciphering algorithm not supported"; break;
2579 case 0x41: str = "Private Long Code not available or not supported."; break;
2580 case 0x42: str = "Requested MUX option or rates not available."; break;
2581 case 0x43: str = "Requested Privacy Configuration unavailable"; break;
2584 case 0x45: str = "PDS-related capability not available or not supported"; break;
2586 case 0x50: str = "Terrestrial circuit already allocated"; break;
2587 case 0x60: str = "Protocol Error between BS and MSC"; break;
2588 case 0x71: str = "ADDS message too long for delivery on the paging channel"; break;
2589 case 0x72: str = "MS-to-IWF TCP connection failure"; break;
2590 case 0x73: str = "ATH0 (Modem hang up) Command"; break;
2591 case 0x74: str = "+FSH/+FHNG (Fax session ended) Command"; break;
2592 case 0x75: str = "No carrier"; break;
2593 case 0x76: str = "PPP protocol failure"; break;
2594 case 0x77: str = "PPP session closed by the MS"; break;
2595 case 0x78: str = "Do not notify MS"; break;
2596 case 0x79: str = "PCF (or PDSN) resources are not available"; break;
2597 case 0x7A: str = "Data ready to send"; break;
2600 case 0x7B: str = "Concurrent authentication"; break;
2602 case 0x7F: str = "Handoff procedure time-out"; break;
2604 str = "Reserved for future use";
2608 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2609 proto_tree_add_uint_format(tree, hf_ansi_a_cause_1, tvb,
2610 curr_offset, 1, oct,
2611 "%s : Cause: (%u) %s",
2618 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
2621 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2623 return(curr_offset - offset);
2628 * Formats everything after the discriminator, shared function.
2631 elem_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
2636 guint32 curr_offset;
2638 curr_offset = offset;
2643 value = tvb_get_ntohs(tvb, curr_offset);
2645 proto_tree_add_uint(tree, hf_ansi_a_cell_ci, tvb,
2646 curr_offset, 2, value);
2650 g_snprintf(add_string, string_len, " - CI (%u)", value);
2654 value = tvb_get_ntohs(tvb, curr_offset);
2656 proto_tree_add_uint(tree, hf_ansi_a_cell_lac, tvb,
2657 curr_offset, 2, value);
2661 g_snprintf(add_string, string_len, " - LAC (%u)", value);
2665 market_id = tvb_get_ntohs(tvb, curr_offset);
2666 switch_num = tvb_get_guint8(tvb, curr_offset + 2);
2668 value = tvb_get_ntoh24(tvb, curr_offset);
2670 proto_tree_add_uint_format(tree, hf_ansi_a_cell_mscid, tvb,
2671 curr_offset, 3, value,
2672 "Market ID %u Switch Number %u",
2673 market_id, switch_num);
2677 value = tvb_get_ntohs(tvb, curr_offset);
2679 proto_tree_add_uint(tree, hf_ansi_a_cell_ci, tvb,
2680 curr_offset, 2, value);
2684 g_snprintf(add_string, string_len, " - Market ID (%u) Switch Number (%u) CI (%u)",
2691 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2692 "Cell ID - Non IOS format");
2694 curr_offset += (len - 1);
2698 return(curr_offset - offset);
2702 elem_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2705 guint32 curr_offset;
2706 const gchar *str = NULL;
2709 add_string = add_string;
2710 curr_offset = offset;
2712 oct = tvb_get_guint8(tvb, curr_offset);
2714 if (oct >= (gint) NUM_CELL_DISC_STR)
2720 str = cell_disc_str[oct];
2723 proto_tree_add_text(tree,
2724 tvb, curr_offset, 1,
2725 "Cell Identification Discriminator: (%u) %s",
2732 elem_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, string_len, oct);
2734 /* no length check possible */
2736 return(curr_offset - offset);
2743 elem_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2748 guint32 curr_offset;
2749 proto_item *item = NULL;
2750 proto_tree *subtree = NULL;
2751 const gchar *str = NULL;
2753 curr_offset = offset;
2755 oct = tvb_get_guint8(tvb, curr_offset);
2757 if (oct >= (gint) NUM_CELL_DISC_STR)
2763 str = cell_disc_str[oct];
2766 proto_tree_add_text(tree,
2767 tvb, curr_offset, 1,
2768 "Cell Identification Discriminator: (%u) %s",
2774 NO_MORE_DATA_CHECK(len);
2780 proto_tree_add_text(tree,
2781 tvb, curr_offset, -1,
2785 subtree = proto_item_add_subtree(item, ett_cell_list);
2787 add_string[0] = '\0';
2789 elem_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len, oct);
2791 if (add_string[0] != '\0')
2793 proto_item_append_text(item, "%s", add_string);
2796 proto_item_set_len(item, consumed);
2798 curr_offset += consumed;
2802 while ((len - (curr_offset - offset)) > 0);
2804 g_snprintf(add_string, string_len, " - %u cell%s",
2805 num_cells, plurality(num_cells, "", "s"));
2807 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2809 return(curr_offset - offset);
2816 elem_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2819 guint32 curr_offset;
2822 curr_offset = offset;
2824 value = tvb_get_ntohs(tvb, curr_offset);
2826 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
2827 proto_tree_add_text(tree,
2828 tvb, curr_offset, 2,
2829 "%s : PCM Multiplexer: %u",
2831 (value & 0xffe0) >> 5);
2833 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
2834 proto_tree_add_text(tree,
2835 tvb, curr_offset, 2,
2836 "%s : Timeslot: %u",
2842 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
2844 /* no length check possible */
2846 return(curr_offset - offset);
2853 elem_cic_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2857 guint32 curr_offset;
2861 curr_offset = offset;
2863 value = tvb_get_ntohs(tvb, curr_offset);
2865 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
2866 proto_tree_add_text(tree,
2867 tvb, curr_offset, 2,
2868 "%s : PCM Multiplexer: %u",
2870 (value & 0xffe0) >> 5);
2872 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
2873 proto_tree_add_text(tree,
2874 tvb, curr_offset, 2,
2875 "%s : Timeslot: %u",
2881 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
2883 oct = tvb_get_guint8(tvb, curr_offset);
2885 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2886 proto_tree_add_text(tree,
2887 tvb, curr_offset, 1,
2893 case 0x00: str = "Full-rate"; break;
2899 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2900 proto_tree_add_text(tree,
2901 tvb, curr_offset, 1,
2902 "%s : Circuit Mode: %s",
2908 /* no length check possible */
2910 return(curr_offset - offset);
2917 elem_ssci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2920 guint32 curr_offset;
2923 curr_offset = offset;
2925 oct = tvb_get_guint8(tvb, curr_offset);
2927 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
2928 proto_tree_add_text(tree,
2929 tvb, curr_offset, 1,
2933 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2934 proto_tree_add_text(tree,
2935 tvb, curr_offset, 1,
2936 "%s : Mobile Originated Position Determination",
2939 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2940 proto_tree_add_text(tree,
2941 tvb, curr_offset, 1,
2942 "%s : Global Emergency Call Indication",
2947 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2949 return(curr_offset - offset);
2957 #define ANSI_A_CELL_ID_LEN(_disc) ((_disc == 7) ? 5 : 2)
2961 * Formats everything no length check
2964 elem_downlink_re_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2972 guint32 curr_offset;
2973 proto_item *item = NULL;
2974 proto_tree *subtree = NULL;
2977 curr_offset = offset;
2979 num_cells = tvb_get_guint8(tvb, curr_offset);
2981 proto_tree_add_text(tree, tvb, curr_offset, 1,
2982 "Number of Cells: %u",
2987 NO_MORE_DATA_CHECK(len);
2989 disc = tvb_get_guint8(tvb, curr_offset);
2991 if (disc >= (gint) NUM_CELL_DISC_STR)
2997 str = cell_disc_str[disc];
3000 proto_tree_add_text(tree,
3001 tvb, curr_offset, 1,
3002 "Cell Identification Discriminator: (%u) %s",
3008 NO_MORE_DATA_CHECK(len);
3010 SHORT_DATA_CHECK(len - (curr_offset - offset), (guint32) 3 + ANSI_A_CELL_ID_LEN(disc));
3019 proto_tree_add_text(tree,
3020 tvb, curr_offset, -1,
3024 subtree = proto_item_add_subtree(item, ett_cell_list);
3026 add_string[0] = '\0';
3028 elem_cell_id_aux(tvb, subtree, curr_offset,
3029 len - (curr_offset - offset), add_string, string_len, disc);
3031 if (add_string[0] != '\0')
3033 proto_item_append_text(item, "%s", add_string);
3036 proto_item_set_len(item, consumed);
3038 curr_offset += consumed;
3040 oct = tvb_get_guint8(tvb, curr_offset);
3042 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3043 proto_tree_add_text(tree, tvb, curr_offset, 1,
3047 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
3048 proto_tree_add_text(tree, tvb, curr_offset, 1,
3049 "%s : Downlink Signal Strength Raw: %u",
3055 value = tvb_get_ntohs(tvb, curr_offset);
3057 proto_tree_add_text(tree,
3058 tvb, curr_offset, 2,
3059 "CDMA Target One Way Delay: %u",
3064 while (curr_cell < num_cells);
3066 g_snprintf(add_string, string_len, " - %u cell%s",
3067 num_cells, plurality(num_cells, "", "s"));
3069 return(curr_offset - offset);
3076 elem_downlink_re(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3078 guint32 curr_offset;
3080 curr_offset = offset;
3083 elem_downlink_re_aux(tvb, tree, offset, len, add_string, string_len);
3085 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3087 return(curr_offset - offset);
3094 elem_downlink_re_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3099 guint32 curr_offset;
3100 proto_item *item = NULL;
3101 proto_tree *subtree = NULL;
3103 curr_offset = offset;
3107 while ((len - (curr_offset - offset)) > 0)
3112 proto_tree_add_text(tree,
3113 tvb, curr_offset, -1,
3117 subtree = proto_item_add_subtree(item, ett_re_list);
3119 oct_len = tvb_get_guint8(tvb, curr_offset);
3121 proto_tree_add_text(subtree,
3122 tvb, curr_offset, 1,
3123 "Environment Length: %u",
3128 add_string[0] = '\0';
3130 elem_downlink_re_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len);
3132 if (add_string[0] != '\0')
3134 proto_item_append_text(item, "%s", add_string);
3138 * +1 is for environment length
3140 proto_item_set_len(item, consumed + 1);
3142 curr_offset += consumed;
3145 g_snprintf(add_string, string_len, " - %u environment%s",
3146 num_envs, plurality(num_envs, "", "s"));
3148 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3150 return(curr_offset - offset);
3177 elem_pdsn_ip_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3179 guint32 curr_offset;
3181 curr_offset = offset;
3183 proto_tree_add_item(tree, hf_ansi_a_pdsn_ip_addr, tvb, curr_offset, len, FALSE);
3187 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3189 return(curr_offset - offset);
3196 elem_s_pdsn_ip_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3198 guint32 curr_offset;
3200 curr_offset = offset;
3202 proto_tree_add_item(tree, hf_ansi_a_s_pdsn_ip_addr, tvb, curr_offset, len, FALSE);
3206 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3208 return(curr_offset - offset);
3215 elem_ho_pow_lev(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3220 proto_item *item = NULL;
3221 proto_tree *subtree = NULL;
3222 guint32 curr_offset;
3224 curr_offset = offset;
3226 oct = tvb_get_guint8(tvb, curr_offset);
3228 proto_tree_add_text(tree, tvb, curr_offset, 1,
3229 "Number of Cells: %u",
3234 SHORT_DATA_CHECK(len - (curr_offset - offset), (guint32) 6);
3236 oct = tvb_get_guint8(tvb, curr_offset);
3238 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3239 proto_tree_add_text(tree, tvb, curr_offset, 1,
3243 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3244 proto_tree_add_text(tree, tvb, curr_offset, 1,
3249 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
3250 proto_tree_add_text(tree, tvb, curr_offset, 1,
3251 "%s : Handoff Power Level: %u",
3258 proto_tree_add_text(tree,
3259 tvb, curr_offset, -1,
3262 subtree = proto_item_add_subtree(item, ett_cell_list);
3264 add_string[0] = '\0';
3266 elem_cell_id_aux(tvb, subtree, curr_offset,
3267 len - (curr_offset - offset), add_string, string_len, 0x7);
3269 if (add_string[0] != '\0')
3271 proto_item_append_text(item, "%s", add_string);
3274 proto_item_set_len(item, consumed);
3276 curr_offset += consumed;
3280 while ((len - (curr_offset - offset)) >= 3)
3284 oct = tvb_get_guint8(tvb, curr_offset);
3286 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
3287 proto_tree_add_text(tree, tvb, curr_offset, 1,
3291 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
3292 proto_tree_add_text(tree, tvb, curr_offset, 1,
3293 "%s : Handoff Power Level: %u",
3300 proto_tree_add_text(tree,
3301 tvb, curr_offset, -1,
3305 subtree = proto_item_add_subtree(item, ett_cell_list);
3307 add_string[0] = '\0';
3309 elem_cell_id_aux(tvb, subtree, curr_offset,
3310 len - (curr_offset - offset), add_string, string_len, 0x2);
3312 if (add_string[0] != '\0')
3314 proto_item_append_text(item, "%s", add_string);
3317 proto_item_set_len(item, consumed);
3319 curr_offset += consumed;
3322 g_snprintf(add_string, string_len, " - %u cell%s",
3323 num_cells, plurality(num_cells, "", "s"));
3325 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3327 return(curr_offset - offset);
3334 elem_uz_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3337 guint32 curr_offset;
3339 curr_offset = offset;
3341 value = tvb_get_ntohs(tvb, curr_offset);
3343 proto_tree_add_text(tree, tvb, curr_offset, 2,
3349 g_snprintf(add_string, string_len, " - (%u)", value);
3351 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3353 return(curr_offset - offset);
3365 elem_info_rec_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3369 guint32 curr_offset;
3371 gint ett_elem_idx, idx;
3373 curr_offset = offset;
3377 while ((len - (curr_offset - offset)) > 0)
3381 rec_type = tvb_get_guint8(tvb, curr_offset);
3383 str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
3388 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
3392 ett_elem_idx = ett_ansi_rev_ms_info_rec[idx];
3395 proto_tree_add_text(tree,
3396 tvb, curr_offset, 1,
3397 "Information Record Type - %u: (%u) %s",
3405 g_snprintf(add_string, string_len, " - %u request%s",
3406 num_recs, plurality(num_recs, "", "s"));
3408 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3410 return(curr_offset - offset);
3417 elem_is2000_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3422 guint32 curr_offset;
3425 curr_offset = offset;
3427 oct = tvb_get_guint8(tvb, curr_offset);
3429 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3430 proto_tree_add_text(tree, tvb, curr_offset, 1,
3431 "%s : OTD: Mobile will %sbe using OTD",
3433 (oct & 0x80) ? "" : "not ");
3435 num_chan = (oct & 0x70) >> 4;
3437 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3438 proto_tree_add_text(tree, tvb, curr_offset, 1,
3439 "%s : Channel Count: %u",
3443 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3444 proto_tree_add_text(tree, tvb, curr_offset, 1,
3445 "%s : Frame Offset: (%u), %.2f ms",
3448 (oct & 0x0f) * 1.25);
3452 NO_MORE_DATA_CHECK(len);
3454 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
3458 oct = tvb_get_guint8(tvb, curr_offset);
3462 case 0x01: str = "Fundamental Channel (FCH) TIA/EIA/IS-2000"; break;
3463 case 0x02: str = "Dedicated Control Channel (DCCH) TIA/EIA/IS-2000"; break;
3464 case 0x03: str = "Supplemental Channel (SCH) TIA/EIA/IS-2000"; break;
3466 if ((oct >= 0x80) && (oct <= 0x9f)) { str = "Reserved for UMTS"; }
3467 else { str = "Reserved"; }
3471 proto_tree_add_text(tree, tvb, curr_offset, 1,
3472 "Physical Channel Type: %s",
3477 oct = tvb_get_guint8(tvb, curr_offset);
3479 switch (global_a_variant)
3481 case A_VARIANT_IOS401:
3482 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3483 proto_tree_add_text(tree, tvb, curr_offset, 1,
3488 case A_VARIANT_IOS501:
3489 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3490 proto_tree_add_text(tree, tvb, curr_offset, 1,
3491 "%s : Rev_FCH_Gating",
3496 switch ((oct & 0x60) >> 5)
3498 case 0: str = "Gating rate 1"; break;
3499 case 1: str = "Gating rate 1/2"; break;
3500 case 2: str = "Gating rate 1/4"; break;
3506 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3507 proto_tree_add_text(tree, tvb, curr_offset, 1,
3508 "%s : Pilot Gating Rate: %s",
3512 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
3513 proto_tree_add_text(tree, tvb, curr_offset, 1,
3517 value = tvb_get_guint8(tvb, curr_offset + 1);
3519 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3520 proto_tree_add_text(tree, tvb, curr_offset, 1,
3521 "%s : Walsh Code Channel Index (MSB): %u",
3523 ((guint32) (oct & 0x07) << 8) | value);
3527 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
3528 proto_tree_add_text(tree, tvb, curr_offset, 1,
3529 "%s : Walsh Code Channel Index (LSB)",
3534 oct = tvb_get_guint8(tvb, curr_offset);
3536 other_decode_bitfield_value(a_bigbuf, oct, 0xff, 8);
3537 proto_tree_add_text(tree, tvb, curr_offset, 1,
3538 "%s : Pilot PN Code (LSB)",
3544 oct = tvb_get_guint8(tvb, curr_offset);
3545 value |= ((guint32) (oct & 0x80)) << 1;
3547 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3548 proto_tree_add_text(tree, tvb, curr_offset, 1,
3549 "%s : Pilot PN Code (MSB): %u",
3553 switch (global_a_variant)
3555 case A_VARIANT_IOS401:
3556 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3557 proto_tree_add_text(tree, tvb, curr_offset, 1,
3562 case A_VARIANT_IOS501:
3563 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3564 proto_tree_add_text(tree, tvb, curr_offset, 1,
3568 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3569 proto_tree_add_text(tree, tvb, curr_offset, 1,
3570 "%s : Power Combined",
3575 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3576 proto_tree_add_text(tree, tvb, curr_offset, 1,
3577 "%s : Frequency Included",
3580 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
3582 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3583 proto_tree_add_text(tree, tvb, curr_offset, 1,
3584 "%s : ARFCN (MSB): %u",
3590 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
3591 proto_tree_add_text(tree, tvb, curr_offset, 1,
3597 while ((len - (curr_offset - offset)) >= 6);
3599 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3601 return(curr_offset - offset);
3606 * NO ASSOCIATED DATA
3613 elem_is95_ms_meas_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3618 guint32 curr_offset;
3621 curr_offset = offset;
3623 oct = tvb_get_guint8(tvb, curr_offset);
3625 temp_int = (oct & 0xf8) >> 3;
3626 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
3632 str = band_class_str[temp_int];
3635 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
3636 proto_tree_add_text(tree,
3637 tvb, curr_offset, 1,
3638 "%s : Band Class: %s",
3642 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
3644 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3645 proto_tree_add_text(tree, tvb, curr_offset, 1,
3646 "%s : ARFCN (MSB): %u",
3652 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
3653 proto_tree_add_text(tree, tvb, curr_offset, 1,
3657 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value);
3661 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3663 return(curr_offset - offset);
3670 elem_clg_party_ascii_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3673 guint32 curr_offset;
3677 curr_offset = offset;
3679 oct = tvb_get_guint8(tvb, curr_offset);
3681 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3682 proto_tree_add_text(tree, tvb, curr_offset, 1,
3683 "%s : Extension: %s",
3685 (oct & 0x80) ? "Not extended" : "Extended");
3687 switch ((oct & 0x70) >> 4)
3689 case 0: str = "Unknown"; break;
3690 case 1: str = "International number"; break;
3691 case 2: str = "National number"; break;
3692 case 3: str = "Network-specific number"; break;
3693 case 4: str = "Dedicated PAD access, short code"; break;
3694 case 5: str = "Reserved"; break;
3695 case 6: str = "Reserved"; break;
3697 str = "Reserved for extension";
3701 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3702 proto_tree_add_text(tree, tvb, curr_offset, 1,
3703 "%s : Type of Number: %s",
3709 case 0x00: str = "Unknown"; break;
3710 case 0x01: str = "ISDN/Telephony Numbering (ITU recommendation E.164/E.163)"; break;
3711 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
3712 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
3713 case 0x07: str = "Reserved for extension"; break;
3714 case 0x08: str = "National Numbering"; break;
3715 case 0x09: str = "Private Numbering"; break;
3721 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3722 proto_tree_add_text(tree, tvb, curr_offset, 1,
3723 "%s : Number Plan Identification: %s",
3733 oct = tvb_get_guint8(tvb, curr_offset);
3735 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3736 proto_tree_add_text(tree, tvb, curr_offset, 1,
3740 switch ((oct & 0x60) >> 5)
3742 case 0: str = "Presentation allowed"; break;
3743 case 1: str = "Presentation restricted"; break;
3744 case 2: str = "Number not available due to interworking"; break;
3750 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3751 proto_tree_add_text(tree, tvb, curr_offset, 1,
3752 "%s : Presentation Indicator: %s",
3758 case 0: str = "User-provided, not screened"; break;
3759 case 1: str = "User-provided, verified and passed"; break;
3760 case 2: str = "User-provided, verified and failed"; break;
3762 str = "Network-provided";
3766 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
3767 proto_tree_add_text(tree, tvb, curr_offset, 1,
3771 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
3772 proto_tree_add_text(tree, tvb, curr_offset, 1,
3773 "%s : Screening Indicator: %s",
3780 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3782 proto_tree_add_string_format(tree, hf_ansi_a_clg_party_ascii_num,
3783 tvb, curr_offset, len - (curr_offset - offset),
3786 (gchar *) format_text(poctets, len - (curr_offset - offset)));
3788 curr_offset += len - (curr_offset - offset);
3790 g_snprintf(add_string, string_len, " - (%s)", poctets);
3792 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3794 return(curr_offset - offset);
3801 elem_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3803 guint32 curr_offset;
3806 curr_offset = offset;
3808 proto_tree_add_text(tree, tvb, curr_offset, len,
3809 "Layer 3 Information");
3812 * dissect the embedded DTAP message
3814 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3816 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
3820 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3822 return(curr_offset - offset);
3827 * Protocol Discriminator
3837 * Location Updating Type
3843 * Simple data no decode required
3850 elem_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3854 guint32 curr_offset;
3859 curr_offset = offset;
3861 oct = tvb_get_guint8(tvb, curr_offset);
3863 mcc[0] = Dgt_tbcd.out[oct & 0x0f];
3864 mcc[1] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3866 oct = tvb_get_guint8(tvb, curr_offset+1);
3868 mcc[2] = Dgt_tbcd.out[(oct & 0x0f)];
3871 mnc[2] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3873 oct = tvb_get_guint8(tvb, curr_offset+2);
3875 mnc[0] = Dgt_tbcd.out[(oct & 0x0f)];
3876 mnc[1] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3879 proto_tree_add_text(tree,
3880 tvb, curr_offset, 3,
3881 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3887 value = tvb_get_ntohs(tvb, curr_offset);
3889 proto_tree_add_text(tree,
3890 tvb, curr_offset, 2,
3891 "Location Area Code (LAC): 0x%04x (%u)",
3897 /* no length check possible */
3899 return(curr_offset - offset);
3906 elem_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3909 guint32 curr_offset;
3913 curr_offset = offset;
3915 oct = tvb_get_guint8(tvb, curr_offset);
3919 case 0x01: str = "Reserved"; break;
3920 case 0x02: str = "MIN/IMSI unknown in HLR"; break;
3921 case 0x03: str = "Illegal MS"; break;
3922 case 0x04: str = "TMSI/IMSI/MIN unknown in VLR"; break;
3923 case 0x05: str = "Reserved"; break;
3924 case 0x0b: str = "Roaming not allowed"; break;
3925 case 0x0c: str = "Location area not allowed"; break;
3926 case 0x20: str = "Service option not supported"; break;
3927 case 0x21: str = "Requested service option not subscribed"; break;
3928 case 0x22: str = "Service option temporarily out of order"; break;
3929 case 0x26: str = "Call cannot be identified"; break;
3930 case 0x51: str = "Network failure"; break;
3931 case 0x56: str = "Congestion"; break;
3932 case 0x62: str = "Message type non-existent or not implemented"; break;
3933 case 0x63: str = "Information element non-existent or not implemented"; break;
3934 case 0x64: str = "Invalid information element contents"; break;
3935 case 0x65: str = "Message not compatible with the call state"; break;
3936 case 0x66: str = "Protocol error, unspecified"; break;
3937 case 0x6e: str = "Invalid message, unspecified"; break;
3938 case 0x6f: str = "Mandatory information element error"; break;
3944 proto_tree_add_text(tree,
3945 tvb, curr_offset, 1,
3946 "Reject Cause Value: (%u) %s",
3952 g_snprintf(add_string, string_len, " - (%s)", str);
3954 /* no length check possible */
3956 return(curr_offset - offset);
3963 elem_anchor_pdsn_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3965 guint32 curr_offset;
3967 curr_offset = offset;
3969 proto_tree_add_item(tree, hf_ansi_a_anchor_ip_addr, tvb, curr_offset, len, FALSE);
3973 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3975 return(curr_offset - offset);
3982 elem_anchor_pp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3984 guint32 curr_offset;
3986 curr_offset = offset;
3988 proto_tree_add_item(tree, hf_ansi_a_anchor_pp_ip_addr, tvb, curr_offset, len, FALSE);
3992 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3994 return(curr_offset - offset);
4001 elem_auth_chlg_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4004 guint32 curr_offset;
4007 curr_offset = offset;
4009 oct = tvb_get_guint8(tvb, curr_offset);
4011 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4012 proto_tree_add_text(tree,
4013 tvb, curr_offset, 1,
4019 case 1: str = "RAND 32 bits"; break;
4020 case 2: str = "RANDU 24 bits"; break;
4021 case 4: str = "RANDSSD 56 bits"; break;
4022 case 8: str = "RANDBS 32 bits"; break;
4028 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4029 proto_tree_add_text(tree,
4030 tvb, curr_offset, 1,
4031 "%s : Random Number Type: (%u) %s",
4038 proto_tree_add_text(tree,
4039 tvb, curr_offset, len - (curr_offset - offset),
4040 "RAND/RANDU/RANDBS/RANDSSD Value");
4042 g_snprintf(add_string, string_len, " - (%s)", str);
4044 curr_offset += len - (curr_offset - offset);
4046 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4048 return(curr_offset - offset);
4055 elem_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4058 guint32 curr_offset;
4061 curr_offset = offset;
4063 oct = tvb_get_guint8(tvb, curr_offset);
4065 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4066 proto_tree_add_text(tree,
4067 tvb, curr_offset, 1,
4073 case 1: str = "AUTHR"; break;
4074 case 2: str = "AUTHU"; break;
4075 case 4: str = "AUTHBS"; break;
4081 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4082 proto_tree_add_text(tree,
4083 tvb, curr_offset, 1,
4084 "%s : Auth Signature Type: (%u) %s",
4091 proto_tree_add_text(tree,
4092 tvb, curr_offset, len - (curr_offset - offset),
4095 g_snprintf(add_string, string_len, " - (%s)", str);
4097 curr_offset += len - (curr_offset - offset);
4099 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4101 return(curr_offset - offset);
4108 elem_auth_param_count(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4111 guint32 curr_offset;
4114 curr_offset = offset;
4116 oct = tvb_get_guint8(tvb, curr_offset);
4118 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
4119 proto_tree_add_text(tree,
4120 tvb, curr_offset, 1,
4124 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
4125 proto_tree_add_text(tree,
4126 tvb, curr_offset, 1,
4133 g_snprintf(add_string, string_len, " - (%u)", oct & 0x3f);
4135 /* no length check possible */
4137 return(curr_offset - offset);
4144 elem_mwi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4147 guint32 curr_offset;
4150 curr_offset = offset;
4152 oct = tvb_get_guint8(tvb, curr_offset);
4154 proto_tree_add_text(tree,
4155 tvb, curr_offset, 1,
4156 "Number of Messages: %u",
4161 g_snprintf(add_string, string_len, " - (%u)", oct);
4163 /* no length check possible */
4165 return(curr_offset - offset);
4171 * UNUSED in SPEC and no IEI!
4178 elem_signal(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4181 guint32 curr_offset;
4185 curr_offset = offset;
4187 oct = tvb_get_guint8(tvb, curr_offset);
4191 case 0x00: str = "Dial tone on"; break;
4192 case 0x01: str = "Ring back tone on"; break;
4193 case 0x02: str = "Intercept tone on"; break;
4194 case 0x03: str = "Network congestion (reorder) tone on"; break;
4195 case 0x04: str = "Busy tone on"; break;
4196 case 0x05: str = "Confirm tone on"; break;
4197 case 0x06: str = "Answer tone on"; break;
4198 case 0x07: str = "Call waiting tone on"; break;
4199 case 0x08: str = "Off-hook warning tone on"; break;
4200 case 0x3f: str = "Tones off"; break;
4201 case 0x40: str = "Normal Alerting"; break;
4202 case 0x41: str = "Inter-group Alerting"; break;
4203 case 0x42: str = "Special/Priority Alerting"; break;
4204 case 0x43: str = "Reserved (ISDN Alerting pattern 3)"; break;
4205 case 0x44: str = "Ping Ring (abbreviated alert)"; break;
4206 case 0x45: str = "Reserved (ISDN Alerting pattern 5)"; break;
4207 case 0x46: str = "Reserved (ISDN Alerting pattern 6)"; break;
4208 case 0x47: str = "Reserved (ISDN Alerting pattern 7)"; break;
4209 case 0x63: str = "Abbreviated intercept"; break;
4210 case 0x65: str = "Abbreviated reorder"; break;
4211 case 0x4f: str = "Alerting off"; break;
4217 proto_tree_add_text(tree,
4218 tvb, curr_offset, 1,
4219 "Signal Value: (%u) %s",
4223 g_snprintf(add_string, string_len, " - (%s)", str);
4227 oct = tvb_get_guint8(tvb, curr_offset);
4229 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
4230 proto_tree_add_text(tree,
4231 tvb, curr_offset, 1,
4237 case 0: str = "Medium pitch (standard alert)"; break;
4238 case 1: str = "High pitch"; break;
4239 case 2: str = "Low pitch"; break;
4245 proto_tree_add_text(tree,
4246 tvb, curr_offset, 1,
4247 "%s : Alert Pitch: %s",
4253 /* no length check possible */
4255 return(curr_offset - offset);
4267 elem_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4271 guint32 curr_offset;
4274 curr_offset = offset;
4276 oct = tvb_get_guint8(tvb, curr_offset);
4278 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4279 proto_tree_add_text(tree,
4280 tvb, curr_offset, 1,
4284 switch ((oct & 0x70) >> 4)
4286 case 0: str = "Unknown"; break;
4287 case 1: str = "International number"; break;
4288 case 2: str = "National number"; break;
4289 case 3: str = "Network specific number"; break;
4290 case 4: str = "Dedicated PAD access, short code"; break;
4291 case 7: str = "Reserved for extension"; break;
4297 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4298 proto_tree_add_text(tree,
4299 tvb, curr_offset, 1,
4300 "%s : Type of Number: %s",
4306 case 0x00: str = "Unknown"; break;
4307 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4308 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
4309 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
4310 case 0x07: str = "Reserved for extension"; break;
4311 case 0x08: str = "National numbering plan"; break;
4312 case 0x09: str = "Private numbering plan"; break;
4318 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4319 proto_tree_add_text(tree,
4320 tvb, curr_offset, 1,
4321 "%s : Numbering Plan Identification: %s",
4327 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
4329 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
4332 proto_tree_add_string_format(tree, hf_ansi_a_cld_party_bcd_num,
4333 tvb, curr_offset, len - (curr_offset - offset),
4338 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
4340 curr_offset += len - (curr_offset - offset);
4342 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4344 return(curr_offset - offset);
4349 * UNUSED in SPEC and no IEI!
4351 #ifdef MAYBE_USED_FOR_OLDER_CODECS
4353 elem_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4357 guint32 curr_offset;
4360 curr_offset = offset;
4362 oct = tvb_get_guint8(tvb, curr_offset);
4364 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4365 proto_tree_add_text(tree, tvb, curr_offset, 1,
4366 "%s : Extension: %s",
4368 (oct & 0x80) ? "Not extended" : "Extended");
4370 switch ((oct & 0x70) >> 4)
4372 case 0: str = "Unknown"; break;
4373 case 1: str = "International number"; break;
4374 case 2: str = "National number"; break;
4375 case 3: str = "Network specific number"; break;
4376 case 4: str = "Dedicated PAD access, short code"; break;
4377 case 7: str = "Reserved for extension"; break;
4383 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4384 proto_tree_add_text(tree,
4385 tvb, curr_offset, 1,
4386 "%s : Type of Number: %s",
4392 case 0x00: str = "Unknown"; break;
4393 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4394 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
4395 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
4396 case 0x07: str = "Reserved for extension"; break;
4397 case 0x08: str = "National numbering plan"; break;
4398 case 0x09: str = "Private numbering plan"; break;
4404 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4405 proto_tree_add_text(tree,
4406 tvb, curr_offset, 1,
4407 "%s : Numbering Plan Identification: %s",
4417 oct = tvb_get_guint8(tvb, curr_offset);
4419 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4420 proto_tree_add_text(tree, tvb, curr_offset, 1,
4424 switch ((oct & 0x60) >> 5)
4426 case 0: str = "Presentation allowed"; break;
4427 case 1: str = "Presentation restricted"; break;
4428 case 2: str = "Number not available due to interworking"; break;
4434 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4435 proto_tree_add_text(tree, tvb, curr_offset, 1,
4436 "%s : Presentation Indicator: %s",
4442 case 0: str = "User-provided, not screened"; break;
4443 case 1: str = "User-provided, verified and passed"; break;
4444 case 2: str = "User-provided, verified and failed"; break;
4446 str = "Network-provided";
4450 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
4451 proto_tree_add_text(tree, tvb, curr_offset, 1,
4455 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4456 proto_tree_add_text(tree, tvb, curr_offset, 1,
4457 "%s : Screening Indicator: %s",
4464 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
4466 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
4469 proto_tree_add_string_format(tree, hf_ansi_a_clg_party_bcd_num,
4470 tvb, curr_offset, len - (curr_offset - offset),
4475 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
4477 curr_offset += len - (curr_offset - offset);
4479 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4481 return(curr_offset - offset);
4489 elem_qos_params(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4492 guint32 curr_offset;
4494 curr_offset = offset;
4496 oct = tvb_get_guint8(tvb, curr_offset);
4498 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4499 proto_tree_add_text(tree,
4500 tvb, curr_offset, 1,
4504 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4505 proto_tree_add_text(tree,
4506 tvb, curr_offset, 1,
4507 "%s : Packet Priority: %u",
4511 g_snprintf(add_string, string_len, " - (%u)", oct & 0x0f);
4515 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4517 return(curr_offset - offset);
4524 elem_cause_l3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4527 guint32 curr_offset;
4528 const gchar *str = NULL;
4530 curr_offset = offset;
4532 oct = tvb_get_guint8(tvb, curr_offset);
4534 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4535 proto_tree_add_text(tree,
4536 tvb, curr_offset, 1,
4540 switch ((oct & 0x60) >> 5)
4542 case 0: str = "Standard as described in ITU Recommendation Q.931"; break;
4543 case 1: str = "Reserved for other international standards"; break;
4544 case 2: str = "National standard"; break;
4546 str = "Reserved for other international standards";
4550 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4551 proto_tree_add_text(tree,
4552 tvb, curr_offset, 1,
4553 "%s : Coding Standard: %s",
4557 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4558 proto_tree_add_text(tree,
4559 tvb, curr_offset, 1,
4565 case 0: str = "User"; break;
4566 case 1: str = "Private network serving the local user"; break;
4567 case 2: str = "Public network serving the local user"; break;
4568 case 3: str = "Transit network"; break;
4569 case 4: str = "Public network serving the remote user"; break;
4570 case 5: str = "Private network serving the remote user"; break;
4571 case 7: str = "International network"; break;
4572 case 10: str = "Network beyond interworking point"; break;
4574 str = "Reserved"; break;
4578 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4579 proto_tree_add_text(tree,
4580 tvb, curr_offset, 1,
4581 "%s : Location: %s",
4587 oct = tvb_get_guint8(tvb, curr_offset);
4589 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4590 proto_tree_add_text(tree,
4591 tvb, curr_offset, 1,
4595 switch ((oct & 0x70) >> 4)
4597 case 0: str = "normal event"; break;
4598 case 1: str = "normal event"; break;
4599 case 2: str = "resource unavailable"; break;
4600 case 3: str = "service or option not available"; break;
4601 case 4: str = "service or option not implemented"; break;
4602 case 5: str = "invalid message (e.g., parameter out of range)"; break;
4603 case 6: str = "protocol error (e.g., unknown message)"; break;
4605 str = "interworking";
4609 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4610 proto_tree_add_text(tree,
4611 tvb, curr_offset, 1,
4612 "%s : Class: (%u) %s",
4619 case 0x01: str = "Unassigned (unallocated) number"; break;
4620 case 0x03: str = "No route to destination"; break;
4621 case 0x06: str = "Channel unacceptable"; break;
4622 case 0x0F: str = "Procedure failed"; break;
4623 case 0x10: str = "Normal Clearing"; break;
4624 case 0x11: str = "User busy"; break;
4625 case 0x12: str = "No user responding"; break;
4626 case 0x13: str = "User alerting, no answer"; break;
4627 case 0x15: str = "Call rejected"; break;
4628 case 0x16: str = "Number changed New destination"; break;
4629 case 0x1A: str = "Non selected user clearing"; break;
4630 case 0x1B: str = "Destination out of order"; break;
4631 case 0x1C: str = "Invalid number format (incomplete number)"; break;
4632 case 0x1D: str = "Facility rejected"; break;
4633 case 0x1F: str = "Normal, unspecified"; break;
4634 case 0x22: str = "No circuit/channel available"; break;
4635 case 0x26: str = "Network out of order"; break;
4636 case 0x29: str = "Temporary failure"; break;
4637 case 0x2A: str = "Switching equipment congestion"; break;
4638 case 0x2B: str = "Access information discarded information element ids"; break;
4639 case 0x2C: str = "requested circuit/channel not available"; break;
4640 case 0x2F: str = "Resources unavailable, unspecified"; break;
4641 case 0x31: str = "Quality of service unavailable"; break;
4642 case 0x32: str = "Requested facility not subscribed"; break;
4643 case 0x33: str = "Request MUX option or rates unavailable"; break;
4644 case 0x39: str = "Bearer capability not authorized"; break;
4645 case 0x3A: str = "Bearer capability not presently available"; break;
4646 case 0x3B: str = "SSD Update Rejected"; break;
4647 case 0x3F: str = "Service or option not available, unspecified"; break;
4648 case 0x41: str = "Bearer service not implemented"; break;
4649 case 0x45: str = "Requested facility not implement"; break;
4650 case 0x46: str = "Only restricted digital information bearer capability is available"; break;
4651 case 0x4F: str = "Service or option not implemented, unspecified"; break;
4652 case 0x51: str = "Reserved"; break;
4653 case 0x58: str = "Incompatible destination incompatible parameter"; break;
4654 case 0x5B: str = "Invalid transit network selection"; break;
4655 case 0x5F: str = "Invalid message, unspecified"; break;
4656 case 0x60: str = "Mandatory information element error information element identifier(s)"; break;
4657 case 0x61: str = "Message type nonexistent or not implemented message type"; break;
4658 case 0x62: str = "Message not compatible with control state message type or message type nonexistent or not implemented"; break;
4659 case 0x64: str = "Invalid information element contents Information element Identifier(s)"; break;
4660 case 0x65: str = "Message not compatible with call state message type"; break;
4661 case 0x6F: str = "Protocol error, unspecified"; break;
4662 case 0x7F: str = "Interworking, unspecified"; break;
4668 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4669 proto_tree_add_text(tree,
4670 tvb, curr_offset, 1,
4675 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
4679 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4681 return(curr_offset - offset);
4698 elem_xmode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4701 guint32 curr_offset;
4703 curr_offset = offset;
4705 oct = tvb_get_guint8(tvb, curr_offset);
4707 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
4708 proto_tree_add_text(tree,
4709 tvb, curr_offset, 1,
4713 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4714 proto_tree_add_text(tree,
4715 tvb, curr_offset, 1,
4716 "%s : TFO Mode: %s",
4718 (oct & 0x01) ? "TFO" : "tandem");
4720 g_snprintf(add_string, string_len, " - (%s)",
4721 (oct & 0x01) ? "TFO" : "tandem");
4725 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4727 return(curr_offset - offset);
4737 * NO ASSOCIATED DATA
4744 elem_reg_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4747 guint32 curr_offset;
4751 curr_offset = offset;
4753 oct = tvb_get_guint8(tvb, curr_offset);
4757 case 0x00: str = "Timer-based"; break;
4758 case 0x01: str = "Power-up"; break;
4759 case 0x02: str = "Zone-based"; break;
4760 case 0x03: str = "Power-down"; break;
4761 case 0x04: str = "Parameter-change"; break;
4762 case 0x05: str = "Ordered"; break;
4763 case 0x06: str = "Distance-based"; break;
4764 case 0x07: str = "User Zone-based"; break;
4765 case 0x09: str = "BCMC Registration"; break;
4771 proto_tree_add_text(tree,
4772 tvb, curr_offset, 1,
4773 "Location Registration Type: %s",
4776 g_snprintf(add_string, string_len, " - (%s)", str);
4780 /* no length check possible */
4782 return(curr_offset - offset);
4789 elem_tag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4792 guint32 curr_offset;
4795 curr_offset = offset;
4797 value = tvb_get_ntohl(tvb, curr_offset);
4799 proto_tree_add_text(tree,
4800 tvb, curr_offset, 4,
4804 g_snprintf(add_string, string_len, " - (%u)", value);
4808 /* no length check possible */
4810 return(curr_offset - offset);
4817 elem_hho_params(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4821 guint32 curr_offset;
4825 curr_offset = offset;
4827 oct = tvb_get_guint8(tvb, curr_offset);
4829 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4830 proto_tree_add_text(tree,
4831 tvb, curr_offset, 1,
4835 temp_int = oct & 0x1f;
4836 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
4842 str = band_class_str[temp_int];
4845 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4846 proto_tree_add_text(tree,
4847 tvb, curr_offset, 1,
4848 "%s : Band Class: %s",
4854 g_snprintf(add_string, string_len, " - (%s)", str);
4856 oct = tvb_get_guint8(tvb, curr_offset);
4858 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4859 proto_tree_add_text(tree,
4860 tvb, curr_offset, 1,
4861 "%s : Number of Preamble Frames: %u",
4865 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4866 proto_tree_add_text(tree,
4867 tvb, curr_offset, 1,
4868 "%s : Reset L2: %s Layer 2 Acknowledgement",
4870 (oct & 0x10) ? "Reset" : "Do not reset");
4872 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4873 proto_tree_add_text(tree,
4874 tvb, curr_offset, 1,
4875 "%s : Reset FPC: %s counters",
4877 (oct & 0x10) ? "Reset" : "Do not reset");
4879 switch ((oct & 0x06) >> 1)
4881 case 0: str = "Encryption disabled"; break;
4882 case 1: str = "Encryption enabled"; break;
4888 other_decode_bitfield_value(a_bigbuf, oct, 0x06, 8);
4889 proto_tree_add_text(tree,
4890 tvb, curr_offset, 1,
4891 "%s : Encryption Mode: %s",
4895 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4896 proto_tree_add_text(tree,
4897 tvb, curr_offset, 1,
4898 "%s : Private LCM: %s Private Long Code Mask",
4900 (oct & 0x01) ? "Use" : "Do not use");
4904 oct = tvb_get_guint8(tvb, curr_offset);
4906 switch (global_a_variant)
4908 case A_VARIANT_IOS401:
4909 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4910 proto_tree_add_text(tree,
4911 tvb, curr_offset, 1,
4916 case A_VARIANT_IOS501:
4917 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4918 proto_tree_add_text(tree,
4919 tvb, curr_offset, 1,
4920 "%s : Rev_Pwr_Cntl_Delay_Incl",
4923 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4924 proto_tree_add_text(tree, tvb, curr_offset, 1,
4925 "%s : Rev_Pwr_Cntl_Delay",
4930 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4931 proto_tree_add_text(tree,
4932 tvb, curr_offset, 1,
4936 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4937 proto_tree_add_text(tree,
4938 tvb, curr_offset, 1,
4945 oct = tvb_get_guint8(tvb, curr_offset);
4947 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
4948 proto_tree_add_text(tree,
4949 tvb, curr_offset, 1,
4953 other_decode_bitfield_value(a_bigbuf, oct, 0x3e, 8);
4954 proto_tree_add_text(tree,
4955 tvb, curr_offset, 1,
4956 "%s : FPC Subchannel Information: %u",
4960 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4961 proto_tree_add_text(tree,
4962 tvb, curr_offset, 1,
4963 "%s : FPC Subchannel Information Included",
4968 oct = tvb_get_guint8(tvb, curr_offset);
4970 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4971 proto_tree_add_text(tree,
4972 tvb, curr_offset, 1,
4976 other_decode_bitfield_value(a_bigbuf, oct, 0x0e, 8);
4977 proto_tree_add_text(tree,
4978 tvb, curr_offset, 1,
4979 "%s : Power Control Step: %u",
4983 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4984 proto_tree_add_text(tree,
4985 tvb, curr_offset, 1,
4986 "%s : Power Control Step Included",
4991 /* no length check possible */
4993 return(curr_offset - offset);
5005 elem_sw_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5007 guint8 major, minor, point;
5008 guint32 curr_offset;
5010 curr_offset = offset;
5012 major = tvb_get_guint8(tvb, curr_offset);
5014 proto_tree_add_text(tree,
5015 tvb, curr_offset, 1,
5016 "IOS Major Revision Level: %u",
5021 minor = tvb_get_guint8(tvb, curr_offset);
5023 proto_tree_add_text(tree,
5024 tvb, curr_offset, 1,
5025 "IOS Minor Revision Level: %u",
5030 point = tvb_get_guint8(tvb, curr_offset);
5032 proto_tree_add_text(tree,
5033 tvb, curr_offset, 1,
5034 "IOS Point Revision Level: %u",
5039 g_snprintf(add_string, string_len, " - (IOS %u.%u.%u)", major, minor, point);
5043 proto_tree_add_text(tree, tvb, curr_offset, len - 3,
5044 "Manufacturer/Carrier Software Information");
5046 curr_offset += len - 3;
5049 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5051 return(curr_offset - offset);
5058 elem_so(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5061 guint32 curr_offset;
5064 curr_offset = offset;
5066 value = tvb_get_ntohs(tvb, curr_offset);
5068 other_decode_bitfield_value(a_bigbuf, value, 0x8000, 16);
5069 proto_tree_add_text(tree,
5070 tvb, curr_offset, 2,
5071 "%s : Proprietary Indicator",
5074 other_decode_bitfield_value(a_bigbuf, value, 0x7000, 16);
5075 proto_tree_add_text(tree,
5076 tvb, curr_offset, 2,
5077 "%s : Service Option Revision",
5080 other_decode_bitfield_value(a_bigbuf, value, 0x0fff, 16);
5081 proto_tree_add_text(tree,
5082 tvb, curr_offset, 2,
5083 "%s : Base Service Option Number",
5086 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
5088 proto_tree_add_uint_format(tree, hf_ansi_a_so, tvb,
5089 curr_offset, 2, value,
5092 ansi_a_so_int_to_str(value));
5096 /* no length check possible */
5098 return(curr_offset - offset);
5105 elem_soci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5108 guint32 curr_offset;
5110 curr_offset = offset;
5112 oct = tvb_get_guint8(tvb, curr_offset);
5114 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5115 proto_tree_add_text(tree,
5116 tvb, curr_offset, 1,
5120 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5121 proto_tree_add_text(tree,
5122 tvb, curr_offset, 1,
5127 g_snprintf(add_string, string_len, " - (%u)", oct);
5131 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5133 return(curr_offset - offset);
5140 elem_so_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5145 guint32 curr_offset;
5147 proto_tree *subtree;
5149 curr_offset = offset;
5151 num_so = tvb_get_guint8(tvb, curr_offset);
5153 proto_tree_add_text(tree, tvb, curr_offset, 1,
5154 "Number of Service Option instances: %u",
5158 * this is in case we leave the function before the
5159 * loop through the instances
5161 g_snprintf(add_string, string_len, " - %u service options", num_so);
5165 NO_MORE_DATA_CHECK(len);
5167 SHORT_DATA_CHECK(len - (curr_offset - offset), 3);
5174 proto_tree_add_text(tree,
5175 tvb, curr_offset, 1,
5176 "Service Option Instance [%u]",
5179 subtree = proto_item_add_subtree(item, ett_so_list);
5181 oct = tvb_get_guint8(tvb, curr_offset);
5183 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5184 proto_tree_add_text(subtree,
5185 tvb, curr_offset, 1,
5189 other_decode_bitfield_value(a_bigbuf, oct, 0x38, 8);
5190 proto_tree_add_text(subtree,
5191 tvb, curr_offset, 1,
5196 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5197 proto_tree_add_text(subtree,
5198 tvb, curr_offset, 1,
5205 curr_offset += elem_so(tvb, subtree, curr_offset, len, add_string, string_len);
5206 add_string[0] = '\0';
5210 while ((len - (curr_offset - offset)) >= 3);
5213 * this is because 'add_string' was used by 'elem_so()'
5215 g_snprintf(add_string, string_len, " - %u service options", num_so);
5217 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5219 return(curr_offset - offset);
5226 elem_acc_net_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5229 guint32 sid, nid, pzid;
5230 guint32 curr_offset;
5232 curr_offset = offset;
5234 value = tvb_get_ntohs(tvb, curr_offset);
5235 sid = value & 0x7fff;
5237 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x80, 8);
5238 proto_tree_add_text(tree, tvb, curr_offset, 1,
5242 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x7f, 8);
5243 proto_tree_add_text(tree, tvb, curr_offset, 1,
5244 "%s : SID (MSB), %u",
5248 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
5249 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
5255 nid = tvb_get_ntohs(tvb, curr_offset);
5257 proto_tree_add_text(tree,
5258 tvb, curr_offset, 2,
5264 pzid = tvb_get_ntohs(tvb, curr_offset);
5266 proto_tree_add_text(tree,
5267 tvb, curr_offset, 2,
5273 g_snprintf(add_string, string_len, " - (SID/NID/PZID: %u/%u/%u)", sid, nid, pzid);
5275 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5277 return(curr_offset - offset);
5281 #define ADDS_APP_UNKNOWN 0x00
5282 #define ADDS_APP_ADS 0x01
5283 #define ADDS_APP_FAX 0x02
5284 #define ADDS_APP_SMS 0x03
5285 #define ADDS_APP_OTA 0x04
5286 #define ADDS_APP_PDS 0x05 /* aka PLD */
5287 #define ADDS_APP_SDB 0x06
5288 #define ADDS_APP_HRPD 0x07
5289 #define ADDS_APP_EXT_INTL 0x3E
5290 #define ADDS_APP_EXT 0x3F
5292 static const value_string ansi_a_adds_strings[] = {
5293 { ADDS_APP_UNKNOWN, "UNKNOWN" },
5294 { ADDS_APP_ADS, "ADS" },
5295 { ADDS_APP_FAX, "FAX" },
5296 { ADDS_APP_SMS, "SMS" },
5297 { ADDS_APP_OTA, "OTA" },
5298 { ADDS_APP_PDS, "PDS" },
5299 { ADDS_APP_SDB, "SDB" },
5300 { ADDS_APP_HRPD, "HRPD" },
5301 { ADDS_APP_EXT_INTL, "EXT_INTL" },
5302 { ADDS_APP_EXT, "EXT" },
5310 elem_adds_user_part(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5315 guint32 curr_offset;
5319 proto_tree *subtree;
5322 curr_offset = offset;
5325 oct = tvb_get_guint8(tvb, curr_offset);
5327 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5328 proto_tree_add_text(tree,
5329 tvb, curr_offset, 1,
5333 adds_app = oct & 0x3f;
5335 str = match_strval_idx((guint32) adds_app, ansi_a_adds_strings, &idx);
5340 g_snprintf(add_string, string_len, " - (%s)", str);
5342 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
5343 proto_tree_add_text(tree,
5344 tvb, curr_offset, 1,
5345 "%s : Data Burst Type: %s",
5352 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
5353 "Application Data Message");
5355 subtree = proto_item_add_subtree(item, ett_adds_user_part);
5360 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5362 dissector_try_uint(is637_dissector_table,
5363 0, adds_tvb, g_pinfo, g_tree);
5365 curr_offset += (len - 1);
5369 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5371 dissector_try_uint(is683_dissector_table,
5372 (g_pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, g_pinfo, g_tree);
5374 curr_offset += (len - 1);
5378 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5380 dissector_try_uint(is801_dissector_table,
5381 (g_pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, g_pinfo, g_tree);
5383 curr_offset += (len - 1);
5388 * no SDB dissector, push to GRE/A11 dissector ?
5390 curr_offset += (len - 1);
5393 case ADDS_APP_EXT_INTL:
5395 * no generic External International dissector
5397 value = tvb_get_ntohs(tvb, curr_offset);
5399 proto_tree_add_text(subtree,
5400 tvb, curr_offset, 2,
5401 "Extended Burst Type - International: 0x%04x", value);
5405 proto_tree_add_text(tree, tvb, curr_offset, len - (curr_offset - offset),
5408 curr_offset += len - (curr_offset - offset);
5412 value = tvb_get_ntohs(tvb, curr_offset);
5414 proto_tree_add_text(subtree,
5415 tvb, curr_offset, 2,
5416 "Extended Burst Type: 0x%04x", value);
5420 proto_tree_add_text(subtree, tvb, curr_offset, len - (curr_offset - offset),
5423 curr_offset += len - (curr_offset - offset);
5430 curr_offset += (len - 1);
5434 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5436 return(curr_offset - offset);
5443 elem_amps_hho_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5446 guint32 curr_offset;
5448 curr_offset = offset;
5450 oct = tvb_get_guint8(tvb, curr_offset);
5452 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
5453 proto_tree_add_text(tree, tvb, curr_offset, 1,
5457 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5458 proto_tree_add_text(tree, tvb, curr_offset, 1,
5459 "%s : Encryption Mode: (%u) %s",
5462 (oct & 0x03) ? "enabled" : "disabled");
5466 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5468 return(curr_offset - offset);
5475 elem_is2000_scr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5477 guint8 oct, num_con_rec, i;
5478 guint8 bit_mask, bit_offset;
5479 guint32 curr_offset, saved_offset;
5481 guint is2000_portion_len;
5482 proto_tree *scr_subtree, *subtree;
5483 proto_item *item = NULL;
5484 const gchar *str = NULL;
5486 curr_offset = offset;
5488 oct = tvb_get_guint8(tvb, curr_offset);
5490 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5491 proto_tree_add_text(tree, tvb, curr_offset, 1,
5495 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5496 proto_tree_add_text(tree, tvb, curr_offset, 1,
5497 "%s : Bit-Exact Length Fill Bits: %u",
5503 is2000_portion_len = len - (curr_offset - offset);
5506 * the following decode was modified from the packet-ansi_map.c version
5509 SHORT_DATA_CHECK(is2000_portion_len, 7);
5511 saved_offset = curr_offset;
5514 proto_tree_add_text(tree, tvb, curr_offset,
5516 "IS-2000 Service Configuration Record Content");
5519 proto_item_add_subtree(item, ett_scr);
5521 proto_tree_add_text(scr_subtree, tvb,
5523 "FOR_MUX_OPTION: Forward Traffic Channel multiplex option");
5527 proto_tree_add_text(scr_subtree, tvb,
5529 "REV_MUX_OPTION: Reverse Traffic Channel multiplex option");
5533 proto_tree_add_text(scr_subtree, tvb,
5535 "FOR_RATES: Transmission rates of the Forward Fundamental Channel");
5539 proto_tree_add_text(scr_subtree, tvb,
5541 "REV_RATES: Transmission rates of the Reverse Fundamental Channel");
5545 num_con_rec = tvb_get_guint8(tvb, curr_offset);
5547 proto_tree_add_text(scr_subtree, tvb,
5549 "NUM_CON_REC: Number of service option connection records, %u",
5554 for (i=1; i <= num_con_rec; i++)
5556 oct = tvb_get_guint8(tvb, curr_offset);
5559 proto_tree_add_text(scr_subtree, tvb,
5560 curr_offset, oct /* oct already includes the length octet itself */,
5561 "Service option connection record [%u]",
5565 proto_item_add_subtree(item, ett_srvc_con_rec);
5569 oct = tvb_get_guint8(tvb, curr_offset);
5571 proto_tree_add_text(subtree, tvb,
5573 "CON_REF: Service option connection reference, %u",
5578 value = tvb_get_ntohs(tvb, curr_offset);
5580 proto_tree_add_text(subtree, tvb,
5582 "SERVICE_OPTION: %s",
5583 ansi_a_so_int_to_str(value));
5587 oct = tvb_get_guint8(tvb, curr_offset);
5589 switch ((oct & 0xf0) >> 4)
5591 case 0x00: str = "The service option connection does not use Forward Traffic Channel traffic."; break;
5592 case 0x01: str = "The service option connection uses primary traffic on the Forward Traffic Channel."; break;
5593 case 0x02: str = "The service option connection uses secondary traffic on the Forward Traffic Channel."; break;
5594 default: str = "Reserved"; break;
5597 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5598 proto_tree_add_text(subtree, tvb,
5600 "%s : FOR_TRAFFIC: Forward Traffic Channel traffic type, %s",
5606 case 0x00: str = "The service option connection does not use Reverse Traffic Channel traffic."; break;
5607 case 0x01: str = "The service option connection uses primary traffic on the Reverse Traffic Channel."; break;
5608 case 0x02: str = "The service option connection uses secondary traffic on the Reverse Traffic Channel."; break;
5609 default: str = "Reserved"; break;
5612 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5613 proto_tree_add_text(subtree, tvb,
5615 "%s : REV_TRAFFIC: Reverse Traffic Channel traffic type, %s",
5621 oct = tvb_get_guint8(tvb, curr_offset);
5623 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5624 proto_tree_add_text(subtree, tvb,
5626 "%s : UI_ENCRYPT_MODE: Encryption mode indicator for user information privacy",
5629 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
5630 proto_tree_add_text(subtree, tvb,
5632 "%s : SR_ID: Service reference identifier",
5635 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5636 proto_tree_add_text(subtree, tvb,
5638 "%s : RLP_INFO_INCL: RLP information included indicator",
5643 value = (oct & 0x01) << 3;
5644 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5648 oct = tvb_get_guint8(tvb, curr_offset);
5650 value |= (oct & 0xe0) >> 5;
5652 proto_tree_add_text(subtree, tvb,
5654 "%s : RLP_BLOB_LEN (MSB), %u",
5658 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5659 proto_tree_add_text(subtree, tvb,
5661 "%s : RLP_BLOB_LEN (LSB)",
5664 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5665 proto_tree_add_text(subtree, tvb,
5667 "%s : RLP_BLOB (MSB)",
5674 proto_tree_add_text(subtree, tvb,
5675 curr_offset, value - 1,
5678 curr_offset += value - 1;
5681 oct = tvb_get_guint8(tvb, curr_offset);
5683 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5684 proto_tree_add_text(subtree, tvb,
5686 "%s : RLP_BLOB (LSB)",
5689 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5690 proto_tree_add_text(subtree, tvb,
5697 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5698 proto_tree_add_text(subtree, tvb,
5707 oct = tvb_get_guint8(tvb, curr_offset);
5709 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5710 proto_tree_add_text(scr_subtree, tvb,
5712 "%s : FCH_CC_INCL: Channel configuration for the Fundamental Channel included indicator",
5717 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5718 proto_tree_add_text(scr_subtree, tvb,
5720 "%s : FCH_FRAME_SIZE: Fundamental Channel frame size supported indicator",
5723 other_decode_bitfield_value(a_bigbuf, oct, 0x3e, 8);
5724 proto_tree_add_text(scr_subtree, tvb,
5726 "%s : FOR_FCH_RC: Forward Fundamental Channel Radio Configuration, %u",
5730 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5731 value = (oct & 0x01) << 4;
5735 oct = tvb_get_guint8(tvb, curr_offset);
5737 value |= (oct & 0xf0) >> 4;
5739 proto_tree_add_text(scr_subtree, tvb,
5741 "%s : REV_FCH_RC: Reverse Fundamental Channel Radio Configuration (MSB), %u",
5745 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5746 proto_tree_add_text(scr_subtree, tvb,
5748 "%s : REV_FCH_RC: (LSB)",
5760 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5761 proto_tree_add_text(scr_subtree, tvb,
5763 "%s : DCCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5768 /* can't be bothered to do the rest of the decode */
5770 proto_tree_add_text(scr_subtree, tvb,
5771 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5772 "DCCH + ? + Reserved");
5774 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5781 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5782 proto_tree_add_text(scr_subtree, tvb,
5784 "%s : FOR_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5789 /* can't be bothered to do the rest of the decode */
5791 proto_tree_add_text(scr_subtree, tvb,
5792 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5793 "FOR_SCH + ? + Reserved");
5795 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5802 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5803 proto_tree_add_text(scr_subtree, tvb,
5805 "%s : REV_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5810 /* can't be bothered to do the rest of the decode */
5812 proto_tree_add_text(scr_subtree, tvb,
5813 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5814 "REV_SCH + ? + Reserved");
5816 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5820 bit_mask = (0xff << (8 - bit_offset));
5821 bit_mask >>= (8 - bit_offset);
5823 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5824 proto_tree_add_text(scr_subtree, tvb,
5834 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5836 return(curr_offset - offset);
5843 elem_is2000_nn_scr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5846 guint32 curr_offset;
5847 guint is2000_portion_len;
5849 curr_offset = offset;
5851 oct = tvb_get_guint8(tvb, curr_offset);
5853 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5854 proto_tree_add_text(tree, tvb, curr_offset, 1,
5858 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5859 proto_tree_add_text(tree, tvb, curr_offset, 1,
5860 "%s : Bit-Exact Length Fill Bits: %u",
5866 is2000_portion_len = len - (curr_offset - offset);
5870 NO_MORE_DATA_CHECK(len);
5872 if (is2000_portion_len > 0)
5874 SHORT_DATA_CHECK(len - (curr_offset - offset), is2000_portion_len);
5876 proto_tree_add_text(tree, tvb, curr_offset, is2000_portion_len,
5877 "IS-2000 Non-Negotiable Service Configuration Record Content");
5879 curr_offset += is2000_portion_len;
5887 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5889 return(curr_offset - offset);
5896 elem_is2000_mob_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5900 guint32 curr_offset;
5901 proto_tree *subtree;
5902 proto_item *item = NULL;
5905 curr_offset = offset;
5907 oct = tvb_get_guint8(tvb, curr_offset);
5909 switch (global_a_variant)
5911 case A_VARIANT_IOS401:
5912 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5913 proto_tree_add_text(tree, tvb, curr_offset, 1,
5918 case A_VARIANT_IOS501:
5919 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5920 proto_tree_add_text(tree, tvb, curr_offset, 1,
5921 "%s : REV_PDCH Supported: IS-2000 R-PDCH %ssupported",
5923 (oct & 0x80) ? "" : "not ");
5925 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5926 proto_tree_add_text(tree, tvb, curr_offset, 1,
5927 "%s : FOR_PDCH Supported: IS-2000 F-PDCH %ssupported",
5929 (oct & 0x40) ? "" : "not ");
5931 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
5932 proto_tree_add_text(tree, tvb, curr_offset, 1,
5933 "%s : ERAM Supported: Enhanced Rate Adaptation Mode %ssupported",
5935 (oct & 0x20) ? "" : "not ");
5939 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5940 proto_tree_add_text(tree, tvb, curr_offset, 1,
5941 "%s : DCCH Supported: IS-2000 DCCH %ssupported",
5943 (oct & 0x10) ? "" : "not ");
5945 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5946 proto_tree_add_text(tree, tvb, curr_offset, 1,
5947 "%s : FCH Supported: IS-2000 FCH %ssupported",
5949 (oct & 0x08) ? "" : "not ");
5951 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
5952 proto_tree_add_text(tree, tvb, curr_offset, 1,
5953 "%s : OTD Supported: Orthogonal Transmit Diversity %ssupported",
5955 (oct & 0x04) ? "" : "not ");
5957 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5958 proto_tree_add_text(tree, tvb, curr_offset, 1,
5959 "%s : Enhanced RC CFG Supported: Radio configuration in radio class 2 %ssupported",
5961 (oct & 0x02) ? "" : "not ");
5963 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5964 proto_tree_add_text(tree, tvb, curr_offset, 1,
5965 "%s : QPCH Supported: Quick Paging Channel %ssupported",
5967 (oct & 0x01) ? "" : "not ");
5971 NO_MORE_DATA_CHECK(len);
5973 oct_len = tvb_get_guint8(tvb, curr_offset);
5975 proto_tree_add_text(tree,
5976 tvb, curr_offset, 1,
5977 "FCH Information: Bit-Exact Length Octet Count: %u",
5982 NO_MORE_DATA_CHECK(len);
5984 oct = tvb_get_guint8(tvb, curr_offset);
5986 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5987 proto_tree_add_text(tree, tvb, curr_offset, 1,
5991 switch ((oct & 0x70) >> 4)
5993 case 0: str = "No mobile assisted geo-location capabilities"; break;
5994 case 1: str = "IS801 capable (Advanced Forward Link Triangulation only (AFLT))"; break;
5995 case 2: str = "IS801 capable (Advanced Forward Link Triangulation and Global Positioning Systems"; break;
5996 case 3: str = "Global Positioning Systems Only"; break;
6002 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
6003 proto_tree_add_text(tree, tvb, curr_offset, 1,
6004 "%s : Geo Location Type: %s",
6008 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6009 proto_tree_add_text(tree, tvb, curr_offset, 1,
6010 "%s : Geo Location Included",
6013 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6014 proto_tree_add_text(tree, tvb, curr_offset, 1,
6015 "%s : FCH Information: Bit-Exact Length Fill Bits: %u",
6021 NO_MORE_DATA_CHECK(len);
6025 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6027 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6028 "FCH Information Content");
6030 curr_offset += oct_len;
6032 NO_MORE_DATA_CHECK(len);
6038 oct_len = tvb_get_guint8(tvb, curr_offset);
6040 proto_tree_add_text(tree,
6041 tvb, curr_offset, 1,
6042 "DCCH Information: Bit-Exact Length Octet Count: %u",
6047 NO_MORE_DATA_CHECK(len);
6049 oct = tvb_get_guint8(tvb, curr_offset);
6051 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6052 proto_tree_add_text(tree, tvb, curr_offset, 1,
6056 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6057 proto_tree_add_text(tree, tvb, curr_offset, 1,
6058 "%s : DCCH Information: Bit-Exact Length Fill Bits: %u",
6064 NO_MORE_DATA_CHECK(len);
6068 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6070 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6071 "DCCH Information Content");
6073 curr_offset += oct_len;
6075 NO_MORE_DATA_CHECK(len);
6081 oct_len = tvb_get_guint8(tvb, curr_offset);
6083 proto_tree_add_text(tree,
6084 tvb, curr_offset, 1,
6085 "FOR_PDCH Information: Bit-Exact Length Octet Count: %u",
6090 NO_MORE_DATA_CHECK(len);
6092 oct = tvb_get_guint8(tvb, curr_offset);
6094 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6095 proto_tree_add_text(tree, tvb, curr_offset, 1,
6099 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6100 proto_tree_add_text(tree, tvb, curr_offset, 1,
6101 "%s : FOR_PDCH Information: Bit-Exact Length Fill Bits: %u",
6107 NO_MORE_DATA_CHECK(len);
6111 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6113 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6114 "FOR_PDCH Information Content");
6116 curr_offset += oct_len;
6118 NO_MORE_DATA_CHECK(len);
6124 oct_len = tvb_get_guint8(tvb, curr_offset);
6126 proto_tree_add_text(tree,
6127 tvb, curr_offset, 1,
6128 "REV_PDCH Information: Bit-Exact Length Octet Count: %u",
6133 NO_MORE_DATA_CHECK(len);
6135 oct = tvb_get_guint8(tvb, curr_offset);
6137 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6138 proto_tree_add_text(tree, tvb, curr_offset, 1,
6142 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6143 proto_tree_add_text(tree, tvb, curr_offset, 1,
6144 "%s : REV_PDCH Information: Bit-Exact Length Fill Bits: %u",
6150 NO_MORE_DATA_CHECK(len);
6154 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6156 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6157 "REV_PDCH Information Content");
6159 curr_offset += oct_len;
6161 NO_MORE_DATA_CHECK(len);
6164 oct = tvb_get_guint8(tvb, curr_offset);
6167 proto_tree_add_text(tree, tvb,
6169 "VP Algorithms Supported%s",
6170 oct ? "" : ": No voice privacy supported");
6175 proto_item_add_subtree(item, ett_vp_algs);
6177 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6178 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6181 (oct & 0x80) ? "No extension" : "Extended");
6183 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6184 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6185 "%s : A7: Reserved",
6188 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6189 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6190 "%s : A6: Reserved",
6193 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6194 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6195 "%s : A5: Reserved",
6198 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6199 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6200 "%s : A4: Reserved",
6203 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6204 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6205 "%s : A3: Reserved",
6208 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6209 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6210 "%s : A2: Advanced Encryption Standard (AES)",
6213 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6214 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6215 "%s : A1: Private long code",
6219 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6221 return(curr_offset - offset);
6228 elem_ptype(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6231 guint32 curr_offset;
6234 curr_offset = offset;
6236 value = tvb_get_ntohs(tvb, curr_offset);
6240 case 0x880b: str = "PPP"; break;
6241 case 0x8881: str = "Unstructured Byte Stream"; break;
6247 proto_tree_add_text(tree,
6248 tvb, curr_offset, 2,
6253 g_snprintf(add_string, string_len, " - (%s)", str);
6257 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6259 return(curr_offset - offset);
6266 elem_fwd_ms_info_recs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6273 guint32 curr_offset;
6275 gint ett_elem_idx, idx, i;
6276 proto_tree *subtree;
6279 curr_offset = offset;
6283 while ((len - (curr_offset - offset)) >= 2)
6287 rec_type = tvb_get_guint8(tvb, curr_offset);
6289 str = match_strval_idx((guint32) rec_type, ansi_fwd_ms_info_rec_str, &idx);
6294 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
6298 ett_elem_idx = ett_ansi_fwd_ms_info_rec[idx];
6302 proto_tree_add_text(tree,
6303 tvb, curr_offset, 1,
6304 "Information Record Type [%u]: (%u) %s",
6309 subtree = proto_item_add_subtree(item, ett_elem_idx);
6313 oct_len = tvb_get_guint8(tvb, curr_offset);
6315 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
6316 curr_offset, 1, oct_len);
6322 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6326 case ANSI_FWD_MS_INFO_REC_CLD_PN:
6327 oct = tvb_get_guint8(tvb, curr_offset);
6329 switch ((oct & 0xe0) >> 5)
6331 case 0: str = "Unknown"; break;
6332 case 1: str = "International number"; break;
6333 case 2: str = "National number"; break;
6334 case 3: str = "Network-specific number"; break;
6335 case 4: str = "Subscriber number"; break;
6336 case 5: str = "Reserved"; break;
6337 case 6: str = "Abbreviated number"; break;
6339 str = "Reserved for extension";
6343 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
6344 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6345 "%s : Number Type: %s",
6349 switch ((oct & 0x1e) >> 1)
6351 case 0x00: str = "Unknown"; break;
6352 case 0x01: str = "ISDN/Telephony Numbering"; break;
6353 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6354 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6355 case 0x09: str = "Private Numbering"; break;
6356 case 0x0f: str = "Reserved for extension"; break;
6362 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6363 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6364 "%s : Number Plan: %s",
6370 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6371 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6372 "%s : MSB of first digit",
6377 for (i=0; i < (oct_len - 1); i++)
6379 a_bigbuf[i] = (oct & 0x01) << 7;
6381 oct = tvb_get_guint8(tvb, curr_offset + i);
6383 a_bigbuf[i] |= (oct & 0xfe) >> 1;
6387 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 1,
6391 curr_offset += (oct_len - 2);
6394 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6395 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6402 case ANSI_FWD_MS_INFO_REC_CLG_PN:
6403 value = tvb_get_ntohs(tvb, curr_offset);
6405 oct = (value & 0xff00) >> 8;
6407 switch ((oct & 0xe0) >> 5)
6409 case 0: str = "Unknown"; break;
6410 case 1: str = "International number"; break;
6411 case 2: str = "National number"; break;
6412 case 3: str = "Network-specific number"; break;
6413 case 4: str = "Subscriber number"; break;
6414 case 5: str = "Reserved"; break;
6415 case 6: str = "Abbreviated number"; break;
6417 str = "Reserved for extension";
6421 other_decode_bitfield_value(a_bigbuf, value, 0xe000, 16);
6422 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6423 "%s : Number Type: %s",
6427 switch ((oct & 0x1e) >> 1)
6429 case 0x00: str = "Unknown"; break;
6430 case 0x01: str = "ISDN/Telephony Numbering"; break;
6431 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6432 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6433 case 0x09: str = "Private Numbering"; break;
6434 case 0x0f: str = "Reserved for extension"; break;
6440 other_decode_bitfield_value(a_bigbuf, value, 0x1e00, 16);
6441 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6442 "%s : Number Plan: %s",
6446 switch ((value & 0x0180) >> 7)
6448 case 0: str = "Presentation allowed"; break;
6449 case 1: str = "Presentation restricted"; break;
6450 case 2: str = "Number not available"; break;
6456 other_decode_bitfield_value(a_bigbuf, value, 0x0180, 16);
6457 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6458 "%s : Presentation Indicator (PI): %s",
6462 switch ((value & 0x0060) >> 5)
6464 case 0: str = "User-provided, not screened"; break;
6465 case 1: str = "User-provided, verified and passed"; break;
6466 case 2: str = "User-provided, verified and failed"; break;
6468 str = "Network-provided";
6472 other_decode_bitfield_value(a_bigbuf, value, 0x0060, 16);
6473 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6474 "%s : Screening Indicator (SI): %s",
6480 oct = (value & 0x00ff);
6482 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6483 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6484 "%s : MSB of first digit",
6489 for (i=0; i < (oct_len - 2); i++)
6491 a_bigbuf[i] = (oct & 0x1f) << 3;
6493 oct = tvb_get_guint8(tvb, curr_offset + i);
6495 a_bigbuf[i] |= (oct & 0xe0) >> 5;
6499 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 2,
6503 curr_offset += (oct_len - 3);
6505 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6506 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6514 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6515 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6523 case ANSI_FWD_MS_INFO_REC_MW:
6524 oct = tvb_get_guint8(tvb, curr_offset);
6526 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6527 "Number of messages waiting: %u",
6534 proto_tree_add_text(subtree,
6535 tvb, curr_offset, oct_len,
6538 curr_offset += oct_len;
6544 g_snprintf(add_string, string_len, " - %u record%s",
6545 num_recs, plurality(num_recs, "", "s"));
6547 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6549 return(curr_offset - offset);
6556 elem_rev_ms_info_recs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6563 guint32 curr_offset, saved_offset;
6565 gint ett_elem_idx, idx, i;
6566 proto_tree *subtree, *subtree2;
6570 curr_offset = offset;
6574 while ((len - (curr_offset - offset)) >= 2)
6578 rec_type = tvb_get_guint8(tvb, curr_offset);
6580 str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
6585 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
6589 ett_elem_idx = ett_ansi_rev_ms_info_rec[idx];
6593 proto_tree_add_text(tree,
6594 tvb, curr_offset, 1,
6595 "Information Record Type [%u]: (%u) %s",
6600 subtree = proto_item_add_subtree(item, ett_elem_idx);
6604 oct_len = tvb_get_guint8(tvb, curr_offset);
6606 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
6607 curr_offset, 1, oct_len);
6613 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6617 case ANSI_REV_MS_INFO_REC_KEYPAD_FAC:
6618 poctets = tvb_get_ephemeral_string(tvb, curr_offset, oct_len);
6620 proto_tree_add_string_format(subtree, hf_ansi_a_cld_party_ascii_num,
6621 tvb, curr_offset, oct_len,
6624 (gchar *) format_text(poctets, oct_len));
6626 curr_offset += oct_len;
6629 case ANSI_REV_MS_INFO_REC_CLD_PN:
6630 oct = tvb_get_guint8(tvb, curr_offset);
6632 switch ((oct & 0xe0) >> 5)
6634 case 0: str = "Unknown"; break;
6635 case 1: str = "International number"; break;
6636 case 2: str = "National number"; break;
6637 case 3: str = "Network-specific number"; break;
6638 case 4: str = "Subscriber number"; break;
6639 case 5: str = "Reserved"; break;
6640 case 6: str = "Abbreviated number"; break;
6642 str = "Reserved for extension";
6646 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
6647 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6648 "%s : Number Type: %s",
6652 switch ((oct & 0x1e) >> 1)
6654 case 0x00: str = "Unknown"; break;
6655 case 0x01: str = "ISDN/Telephony Numbering"; break;
6656 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6657 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6658 case 0x09: str = "Private Numbering"; break;
6659 case 0x0f: str = "Reserved for extension"; break;
6665 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6666 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6667 "%s : Number Plan: %s",
6673 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6674 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6675 "%s : MSB of first digit",
6680 for (i=0; i < (oct_len - 1); i++)
6682 a_bigbuf[i] = (oct & 0x01) << 7;
6684 oct = tvb_get_guint8(tvb, curr_offset + i);
6686 a_bigbuf[i] |= (oct & 0xfe) >> 1;
6690 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 1,
6694 curr_offset += (oct_len - 2);
6697 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6698 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6705 case ANSI_REV_MS_INFO_REC_CLG_PN:
6706 value = tvb_get_ntohs(tvb, curr_offset);
6708 oct = (value & 0xff00) >> 8;
6710 switch ((oct & 0xe0) >> 5)
6712 case 0: str = "Unknown"; break;
6713 case 1: str = "International number"; break;
6714 case 2: str = "National number"; break;
6715 case 3: str = "Network-specific number"; break;
6716 case 4: str = "Subscriber number"; break;
6717 case 5: str = "Reserved"; break;
6718 case 6: str = "Abbreviated number"; break;
6720 str = "Reserved for extension";
6724 other_decode_bitfield_value(a_bigbuf, value, 0xe000, 16);
6725 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6726 "%s : Number Type: %s",
6730 switch ((oct & 0x1e) >> 1)
6732 case 0x00: str = "Unknown"; break;
6733 case 0x01: str = "ISDN/Telephony Numbering"; break;
6734 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6735 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6736 case 0x09: str = "Private Numbering"; break;
6737 case 0x0f: str = "Reserved for extension"; break;
6743 other_decode_bitfield_value(a_bigbuf, value, 0x1e00, 16);
6744 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6745 "%s : Number Plan: %s",
6749 switch ((value & 0x0180) >> 7)
6751 case 0: str = "Presentation allowed"; break;
6752 case 1: str = "Presentation restricted"; break;
6753 case 2: str = "Number not available"; break;
6759 other_decode_bitfield_value(a_bigbuf, value, 0x0180, 16);
6760 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6761 "%s : Presentation Indicator (PI): %s",
6765 switch ((value & 0x0060) >> 5)
6767 case 0: str = "User-provided, not screened"; break;
6768 case 1: str = "User-provided, verified and passed"; break;
6769 case 2: str = "User-provided, verified and failed"; break;
6771 str = "Network-provided";
6775 other_decode_bitfield_value(a_bigbuf, value, 0x0060, 16);
6776 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6777 "%s : Screening Indicator (SI): %s",
6783 oct = (value & 0x00ff);
6785 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6786 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6787 "%s : MSB of first digit",
6792 for (i=0; i < (oct_len - 2); i++)
6794 a_bigbuf[i] = (oct & 0x1f) << 3;
6796 oct = tvb_get_guint8(tvb, curr_offset + i);
6798 a_bigbuf[i] |= (oct & 0xe0) >> 5;
6802 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 2,
6806 curr_offset += (oct_len - 3);
6808 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6809 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6817 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6818 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6826 case ANSI_REV_MS_INFO_REC_SO_INFO:
6828 saved_offset = curr_offset;
6830 while ((oct_len - (curr_offset - saved_offset)) > 2)
6833 proto_tree_add_text(subtree,
6834 tvb, curr_offset, 3,
6835 "Service Option [%u]",
6838 subtree2 = proto_item_add_subtree(item, ett_so_list);
6840 oct = tvb_get_guint8(tvb, curr_offset);
6842 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
6843 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6847 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6848 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6849 "%s : Forward Support: %s",
6851 (oct & 0x02) ? "TRUE" : "FALSE");
6853 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6854 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6855 "%s : Reverse Support: %s",
6857 (oct & 0x01) ? "TRUE" : "FALSE");
6861 value = tvb_get_ntohs(tvb, curr_offset);
6863 str = ansi_a_so_int_to_str(value);
6864 proto_tree_add_text(subtree2, tvb, curr_offset, 2,
6865 "Service Option: %s (%u)",
6869 proto_item_append_text(item, " - (%u) %s", value, str);
6877 proto_tree_add_text(subtree,
6878 tvb, curr_offset, oct_len,
6881 curr_offset += oct_len;
6887 g_snprintf(add_string, string_len, " - %u record%s",
6888 num_recs, plurality(num_recs, "", "s"));
6890 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6892 return(curr_offset - offset);
6899 elem_ext_ho_dir_params(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
6903 guint32 curr_offset;
6906 curr_offset = offset;
6908 oct = tvb_get_guint8(tvb, curr_offset);
6910 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6911 proto_tree_add_text(tree, tvb, curr_offset, 1,
6912 "%s : Search Window A Size (Srch_Win_A): %u",
6916 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6917 proto_tree_add_text(tree, tvb, curr_offset, 1,
6918 "%s : Search Window N Size (Srch_Win_N): %u",
6924 NO_MORE_DATA_CHECK(len);
6926 oct = tvb_get_guint8(tvb, curr_offset);
6928 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6929 proto_tree_add_text(tree, tvb, curr_offset, 1,
6930 "%s : Search Window R Size (Srch_Win_R): %u",
6934 value = tvb_get_guint8(tvb, curr_offset + 1);
6936 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6937 proto_tree_add_text(tree, tvb, curr_offset, 1,
6938 "%s : Add Pilot Threshold (T_Add) (MSB): %u",
6940 (oct & 0x0f) << 2 | (value & 0xc0) >> 6);
6946 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
6947 proto_tree_add_text(tree, tvb, curr_offset, 1,
6948 "%s : Add Pilot Threshold (T_Add) (LSB)",
6951 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
6952 proto_tree_add_text(tree, tvb, curr_offset, 1,
6953 "%s : Drop Pilot Threshold (T_Drop): %u",
6959 NO_MORE_DATA_CHECK(len);
6961 oct = tvb_get_guint8(tvb, curr_offset);
6963 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6964 proto_tree_add_text(tree, tvb, curr_offset, 1,
6965 "%s : Compare Threshold (T_Comp): %u",
6969 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6970 proto_tree_add_text(tree, tvb, curr_offset, 1,
6971 "%s : Drop Timer Value (T_TDrop): %u",
6977 NO_MORE_DATA_CHECK(len);
6979 oct = tvb_get_guint8(tvb, curr_offset);
6981 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6982 proto_tree_add_text(tree, tvb, curr_offset, 1,
6983 "%s : Neighbor Max Age (Nghbor_Max_AGE): %u",
6987 switch (global_a_variant)
6989 case A_VARIANT_IOS401:
6990 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6991 proto_tree_add_text(tree, tvb, curr_offset, 1,
6996 case A_VARIANT_IOS501:
6997 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
6998 proto_tree_add_text(tree, tvb, curr_offset, 1,
7004 case 0: str = "Only Search Window A Size is valid"; break;
7005 case 1: str = "Subset is valid"; break;
7006 case 2: str = "All fields valid"; break;
7012 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7013 proto_tree_add_text(tree, tvb, curr_offset, 1,
7014 "%s : Target BS Values Included: %s",
7022 NO_MORE_DATA_CHECK(len);
7024 oct = tvb_get_guint8(tvb, curr_offset);
7026 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7027 proto_tree_add_text(tree, tvb, curr_offset, 1,
7031 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7032 proto_tree_add_text(tree, tvb, curr_offset, 1,
7033 "%s : SOFT_SLOPE: %u",
7039 NO_MORE_DATA_CHECK(len);
7041 oct = tvb_get_guint8(tvb, curr_offset);
7043 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7044 proto_tree_add_text(tree, tvb, curr_offset, 1,
7048 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7049 proto_tree_add_text(tree, tvb, curr_offset, 1,
7050 "%s : ADD_INTERCEPT: %u",
7056 NO_MORE_DATA_CHECK(len);
7058 oct = tvb_get_guint8(tvb, curr_offset);
7060 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7061 proto_tree_add_text(tree, tvb, curr_offset, 1,
7065 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7066 proto_tree_add_text(tree, tvb, curr_offset, 1,
7067 "%s : DROP_INTERCEPT: %u",
7073 NO_MORE_DATA_CHECK(len);
7075 oct = tvb_get_guint8(tvb, curr_offset);
7077 proto_tree_add_text(tree, tvb, curr_offset, 1,
7078 "Target BS P_REV: %u",
7083 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7085 return(curr_offset - offset);
7090 * UNUSED in SPEC and no IEI!
7095 * UNUSED in SPEC and no IEI!
7105 * UNUSED in SPEC and no IEI!
7110 * UNUSED in SPEC and no IEI!
7117 elem_cdma_sowd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7121 guint32 curr_offset;
7122 const gchar *str = NULL;
7124 curr_offset = offset;
7126 curr_offset += elem_cell_id(tvb, tree, offset, len, add_string, string_len);
7127 add_string[0] = '\0';
7129 value = tvb_get_ntohs(tvb, curr_offset);
7131 proto_tree_add_text(tree,
7132 tvb, curr_offset, 2,
7133 "CDMA Serving One Way Delay: %u",
7138 oct = tvb_get_guint8(tvb, curr_offset);
7140 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
7141 proto_tree_add_text(tree,
7142 tvb, curr_offset, 1,
7148 case 0: str = "100 nsec"; break;
7149 case 1: str = "50 nsec"; break;
7150 case 2: str = "1/16 CDMA PN Chip"; break;
7151 case 3: str = "Reserved"; break;
7154 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7155 proto_tree_add_text(tree,
7156 tvb, curr_offset, 1,
7157 "%s : Resolution: %s",
7163 if ((len - (curr_offset - offset)) > 1)
7165 proto_tree_add_text(tree,
7166 tvb, curr_offset, 2,
7172 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7174 return(curr_offset - offset);
7191 elem_re_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7194 guint32 curr_offset;
7198 curr_offset = offset;
7200 oct = tvb_get_guint8(tvb, curr_offset);
7202 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7203 proto_tree_add_text(tree,
7204 tvb, curr_offset, 1,
7208 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
7209 proto_tree_add_text(tree,
7210 tvb, curr_offset, 1,
7211 "%s : Include Priority: MSC %s include priority in Assignment Request",
7213 (oct & 0x40) ? "should" : "does not need to");
7215 switch ((oct & 0x30) >> 4)
7217 case 0: str = "Not reported"; break;
7218 case 1: str = "radio environment is acceptable"; break;
7219 case 2: str = "radio environment is marginally acceptable"; break;
7221 str = "radio environment is poor";
7225 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
7226 proto_tree_add_text(tree,
7227 tvb, curr_offset, 1,
7232 switch ((oct & 0x0c) >> 2)
7234 case 0: str = "Not reported"; break;
7235 case 1: str = "radio environment is acceptable"; break;
7236 case 2: str = "radio environment is marginally acceptable"; break;
7238 str = "radio environment is poor";
7242 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
7243 proto_tree_add_text(tree,
7244 tvb, curr_offset, 1,
7249 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7250 proto_tree_add_text(tree,
7251 tvb, curr_offset, 1,
7252 "%s : Alloc: resources are %sallocated",
7254 (oct & 0x02) ? "" : "not ");
7256 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7257 proto_tree_add_text(tree,
7258 tvb, curr_offset, 1,
7259 "%s : Avail: resources are %savailable",
7261 (oct & 0x01) ? "" : "not ");
7265 /* no length check possible */
7267 return(curr_offset - offset);
7272 * UNUSED in SPEC and no IEI!
7307 * UNUSED in SPEC and no IEI!
7384 elem_cld_party_ascii_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7387 guint32 curr_offset;
7391 curr_offset = offset;
7393 oct = tvb_get_guint8(tvb, curr_offset);
7395 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7396 proto_tree_add_text(tree, tvb, curr_offset, 1,
7400 switch ((oct & 0x70) >> 4)
7402 case 0: str = "Unknown"; break;
7403 case 1: str = "International number"; break;
7404 case 2: str = "National number"; break;
7405 case 3: str = "Network specific number"; break;
7406 case 4: str = "Dedicated PAD access, short code"; break;
7407 case 7: str = "Reserved for extension"; break;
7413 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7414 proto_tree_add_text(tree,
7415 tvb, curr_offset, 1,
7416 "%s : Type of Number: %s",
7422 case 0x00: str = "Unknown"; break;
7423 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
7424 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
7425 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
7426 case 0x07: str = "Reserved for extension"; break;
7427 case 0x08: str = "National numbering plan"; break;
7428 case 0x09: str = "Private numbering plan"; break;
7434 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7435 proto_tree_add_text(tree,
7436 tvb, curr_offset, 1,
7437 "%s : Numbering Plan Identification: %s",
7443 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7445 proto_tree_add_string_format(tree, hf_ansi_a_cld_party_ascii_num,
7446 tvb, curr_offset, len - (curr_offset - offset),
7449 (gchar *) format_text(poctets, len - (curr_offset - offset)));
7451 curr_offset += len - (curr_offset - offset);
7453 g_snprintf(add_string, string_len, " - (%s)", poctets);
7455 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7457 return(curr_offset - offset);
7464 elem_band_class(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7467 guint32 curr_offset;
7471 curr_offset = offset;
7473 oct = tvb_get_guint8(tvb, curr_offset);
7475 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
7476 proto_tree_add_text(tree,
7477 tvb, curr_offset, 1,
7481 temp_int = oct & 0x1f;
7482 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
7488 str = band_class_str[temp_int];
7491 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
7492 proto_tree_add_text(tree,
7493 tvb, curr_offset, 1,
7494 "%s : Band Class: %s",
7500 g_snprintf(add_string, string_len, " - (%s)", str);
7502 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7504 return(curr_offset - offset);
7526 elem_is2000_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7528 guint32 curr_offset;
7530 add_string = add_string;
7531 curr_offset = offset;
7533 proto_tree_add_text(tree, tvb, curr_offset, len, "IS-95/IS-2000 Cause Information");
7537 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7539 return(curr_offset - offset);
7561 elem_auth_event(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7564 guint32 curr_offset;
7567 curr_offset = offset;
7571 oct = tvb_get_guint8(tvb, curr_offset);
7575 case 0x01: str = "Event: Authentication parameters were NOT received from mobile"; break;
7576 case 0x02: str = "Event: RANDC mis-match"; break;
7577 case 0x03: str = "Event: Recently requested"; break;
7578 case 0x04: str = "Event: Direct channel assignment"; break;
7584 proto_tree_add_text(tree, tvb, curr_offset, len,
7589 proto_tree_add_text(tree, tvb, curr_offset, len, "Event");
7594 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7596 return(curr_offset - offset);
7711 * Generic decode is good enough
7718 elem_psmm_count(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7721 guint32 curr_offset;
7723 curr_offset = offset;
7725 oct = tvb_get_guint8(tvb, curr_offset);
7727 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
7728 proto_tree_add_text(tree,
7729 tvb, curr_offset, 1,
7733 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7734 proto_tree_add_text(tree,
7735 tvb, curr_offset, 1,
7736 "%s : PSMM Count: %u",
7742 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7744 return(curr_offset - offset);
7751 elem_geo_loc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7753 guint32 curr_offset;
7755 curr_offset = offset;
7757 proto_tree_add_text(tree, tvb, curr_offset, len, "Calling Geodetic Location");
7761 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7763 return(curr_offset - offset);
7810 elem_cct_group(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7814 guint32 curr_offset;
7816 curr_offset = offset;
7818 oct = tvb_get_guint8(tvb, curr_offset);
7820 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
7821 proto_tree_add_text(tree,
7822 tvb, curr_offset, 1,
7826 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7827 proto_tree_add_text(tree,
7828 tvb, curr_offset, 1,
7829 "%s : All Circuits",
7832 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7833 proto_tree_add_text(tree,
7834 tvb, curr_offset, 1,
7840 NO_MORE_DATA_CHECK(len);
7842 oct = tvb_get_guint8(tvb, curr_offset);
7844 proto_tree_add_text(tree,
7845 tvb, curr_offset, 1,
7846 "Count: %u circuit%s",
7847 oct, plurality(oct, "", "s"));
7849 g_snprintf(add_string, string_len, " - %u circuit%s",
7850 oct, plurality(oct, "", "s"));
7854 value = tvb_get_ntohs(tvb, curr_offset);
7856 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
7857 proto_tree_add_text(tree,
7858 tvb, curr_offset, 2,
7859 "%s : PCM Multiplexer: %u",
7861 (value & 0xffe0) >> 5);
7863 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
7864 proto_tree_add_text(tree,
7865 tvb, curr_offset, 2,
7866 "%s : Timeslot: %u",
7872 NO_MORE_DATA_CHECK(len);
7874 proto_tree_add_text(tree,
7875 tvb, curr_offset, len - (curr_offset - offset),
7878 curr_offset += len - (curr_offset - offset);
7880 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7882 return(curr_offset - offset);
7889 elem_paca_ts(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7891 guint32 curr_offset;
7893 curr_offset = offset;
7895 proto_tree_add_text(tree, tvb, curr_offset, len, "PACA Queuing Time");
7899 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7901 return(curr_offset - offset);
7908 elem_paca_order(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7911 guint32 curr_offset;
7914 curr_offset = offset;
7916 oct = tvb_get_guint8(tvb, curr_offset);
7918 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
7919 proto_tree_add_text(tree,
7920 tvb, curr_offset, 1,
7926 case 0: str = "Reserved"; break;
7927 case 1: str = "Update Queue Position and notify MS"; break;
7928 case 2: str = "Remove MS from the queue and release MS"; break;
7929 case 3: str = "Remove MS from the queue"; break;
7930 case 4: str = "MS Requested PACA Cancel"; break;
7931 case 5: str = "BS Requested PACA Cancel"; break;
7937 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7938 proto_tree_add_text(tree,
7939 tvb, curr_offset, 1,
7940 "%s : PACA Action Required: %s",
7946 g_snprintf(add_string, string_len, " - (%s)", str);
7948 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7950 return(curr_offset - offset);
7957 elem_paca_reoi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7960 guint32 curr_offset;
7962 curr_offset = offset;
7964 oct = tvb_get_guint8(tvb, curr_offset);
7966 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
7967 proto_tree_add_text(tree,
7968 tvb, curr_offset, 1,
7972 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7973 proto_tree_add_text(tree,
7974 tvb, curr_offset, 1,
7975 "%s : PACA Reorigination Indicator (PRI)",
7980 g_snprintf(add_string, string_len, " - (%sReorigination)", (oct & 0x01) ? "" : "Not ");
7982 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7984 return(curr_offset - offset);
7991 elem_a2p_bearer_session(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7994 guint32 curr_offset;
7996 curr_offset = offset;
7998 oct = tvb_get_guint8(tvb, curr_offset);
8000 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
8001 proto_tree_add_text(tree,
8002 tvb, curr_offset, 1,
8006 other_decode_bitfield_value(a_bigbuf, oct, 0x38, 8);
8007 proto_tree_add_text(tree,
8008 tvb, curr_offset, 1,
8009 "%s : Max Frames: %u",
8013 other_decode_bitfield_value(a_bigbuf, oct, 0x06, 8);
8014 proto_tree_add_text(tree,
8015 tvb, curr_offset, 1,
8016 "%s : Session IP Address Type: Internet Protocol IPv%s",
8018 ((oct & 0x06) >> 1) ? "6" : "4");
8020 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
8021 proto_tree_add_text(tree,
8022 tvb, curr_offset, 1,
8023 "%s : Session Address Flag",
8030 /* session address included */
8032 if ((oct & 0x06) >> 1)
8034 SHORT_DATA_CHECK(len - (curr_offset - offset), 18);
8036 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_ipv6_addr,
8037 tvb, curr_offset, 16, FALSE);
8039 rtp_src_addr.type = AT_IPv6;
8040 rtp_src_addr.len = 16;
8041 rtp_src_addr.data = (guint8 *) &rtp_ipv6_addr;
8043 tvb_get_ipv6(tvb, curr_offset, &rtp_ipv6_addr);
8049 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
8051 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_ipv4_addr,
8052 tvb, curr_offset, 4, FALSE);
8054 rtp_src_addr.type = AT_IPv4;
8055 rtp_src_addr.len = 4;
8056 rtp_src_addr.data = (guint8 *) &rtp_ipv4_addr;
8058 rtp_ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
8063 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_udp_port,
8064 tvb, curr_offset, 2, FALSE);
8066 rtp_port = tvb_get_ntohs(tvb, curr_offset);
8071 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8073 return(curr_offset - offset);
8077 free_encoding_name_str(void *ptr)
8079 encoding_name_and_rate_t *encoding_name_and_rate = (encoding_name_and_rate_t *) ptr;
8081 if (encoding_name_and_rate->encoding_name)
8083 g_free(encoding_name_and_rate->encoding_name);
8091 elem_a2p_bearer_format(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8095 proto_tree *subtree;
8097 guint32 curr_offset, orig_offset;
8098 guint8 ip_addr_type;
8102 const gchar *mime_type;
8104 gboolean format_assigned;
8105 gboolean in_band_format_assigned;
8106 gboolean first_assigned_found;
8107 gboolean rtp_dyn_payload_used;
8108 guint8 rtp_payload_type;
8109 GHashTable *rtp_dyn_payload;
8111 encoding_name_and_rate_t *encoding_name_and_rate;
8113 rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, free_encoding_name_str);
8114 rtp_dyn_payload_used = FALSE;
8116 first_assigned_found = FALSE;
8118 curr_offset = offset;
8120 oct = tvb_get_guint8(tvb, curr_offset);
8122 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
8123 proto_tree_add_text(tree,
8124 tvb, curr_offset, 1,
8125 "%s : Number of Bearer Formats: %u",
8129 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8130 proto_tree_add_text(tree,
8131 tvb, curr_offset, 1,
8132 "%s : Session IP Address Type: Internet Protocol IPv%s",
8134 (oct & 0x03) ? "6" : "4");
8136 ip_addr_type = (oct & 0x03);
8142 while ((len - (curr_offset - offset)) > 0)
8144 orig_offset = curr_offset;
8147 proto_tree_add_text(tree,
8148 tvb, curr_offset, -1,
8149 "Bearer Format [%u]",
8152 subtree = proto_item_add_subtree(item, ett_bearer_list);
8154 oct = tvb_get_guint8(tvb, curr_offset);
8156 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8157 "Bearer Format Length: %u",
8162 NO_MORE_DATA_CHECK(len);
8164 oct = tvb_get_guint8(tvb, curr_offset);
8166 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8167 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8171 ext = (oct & 0x80) ? TRUE : FALSE;
8173 format_assigned = FALSE;
8174 in_band_format_assigned = FALSE;
8176 switch ((oct & 0x70) >> 4)
8178 case 0: str = "Unknown"; break;
8180 str = "In-band signaling";
8181 in_band_format_assigned = TRUE;
8185 format_assigned = TRUE;
8187 case 3: str = "Unassigned"; break;
8188 case 4: str = "Transcoded"; break;
8194 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8195 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8196 "%s : Bearer Format Tag Type: %s",
8201 * assuming default sampling rate of 8000Hz
8207 case 0: mime_type = str = "PCMU"; break;
8208 case 1: mime_type = str = "PCMA"; break;
8210 str = "13K Vocoder";
8211 mime_type = "QCELP";
8213 case 3: mime_type = str = "EVRC"; break;
8214 case 4: mime_type = str = "EVRC0"; break;
8215 case 5: mime_type = str = "SMV"; break;
8216 case 6: mime_type = str = "SMV0"; break;
8217 case 7: mime_type = str = "telephone-event"; break;
8218 case 8: mime_type = str = "EVRCB"; break;
8219 case 9: mime_type = str = "EVRCB0"; break;
8220 case 10: mime_type = str = "EVRCWB"; sample_rate = 16000; break;
8221 case 11: mime_type = str = "EVRCWB0"; sample_rate = 16000; break;
8222 case 12: mime_type = str = "EVRCNW"; sample_rate = 16000; break;
8223 case 13: mime_type = str = "EVRCNW0"; sample_rate = 16000; break;
8225 mime_type = str = "Reserved";
8229 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8230 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8231 "%s : Bearer Format ID: %s",
8235 proto_item_append_text(item, " - (%s)", str);
8239 NO_MORE_DATA_CHECK(len);
8241 oct = tvb_get_guint8(tvb, curr_offset);
8243 rtp_payload_type = (oct & 0xfe) >> 1;
8245 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
8246 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8247 "%s : RTP Payload Type: %u",
8251 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
8252 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8253 "%s : Bearer Address Flag",
8260 /* bearer address included */
8262 if (ip_addr_type != 0)
8264 SHORT_DATA_CHECK(len - (curr_offset - offset), 18);
8266 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_ipv6_addr,
8267 tvb, curr_offset, 16, FALSE);
8269 if (format_assigned)
8271 rtp_src_addr.type = AT_IPv6;
8272 rtp_src_addr.len = 16;
8273 rtp_src_addr.data = (guint8 *) &rtp_ipv6_addr;
8275 tvb_get_ipv6(tvb, curr_offset, &rtp_ipv6_addr);
8282 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
8284 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_ipv4_addr,
8285 tvb, curr_offset, 4, FALSE);
8287 if (format_assigned)
8289 rtp_src_addr.type = AT_IPv4;
8290 rtp_src_addr.len = 4;
8291 rtp_src_addr.data = (guint8 *) &rtp_ipv4_addr;
8293 rtp_ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
8299 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_udp_port,
8300 tvb, curr_offset, 2, FALSE);
8302 if (format_assigned)
8304 rtp_port = tvb_get_ntohs(tvb, curr_offset);
8312 SHORT_DATA_CHECK(len - (curr_offset - offset), 1);
8314 oct = tvb_get_guint8(tvb, curr_offset);
8316 ext_len = (oct & 0xf0) >> 4;
8318 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8319 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8320 "%s : Extension Length: %u",
8324 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8325 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8326 "%s : Extension ID: %u",
8334 SHORT_DATA_CHECK(len - (curr_offset - offset), ext_len);
8336 proto_tree_add_text(subtree, tvb, curr_offset, ext_len,
8337 "Extension Parameter value");
8339 curr_offset += ext_len;
8343 proto_item_set_len(item, curr_offset - orig_offset);
8347 (first_assigned_found == FALSE))
8349 key = (gint *) g_malloc(sizeof(gint));
8350 *key = rtp_payload_type;
8352 encoding_name_and_rate = g_malloc(sizeof(encoding_name_and_rate_t));
8353 encoding_name_and_rate->encoding_name = g_strdup(mime_type);
8354 encoding_name_and_rate->sample_rate = sample_rate;
8356 g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
8357 rtp_dyn_payload_used = TRUE;
8359 first_assigned_found = TRUE;
8360 rtp_add_address(g_pinfo, &rtp_src_addr, rtp_port, 0, "IOS5",
8361 g_pinfo->fd->num, FALSE, rtp_dyn_payload);
8364 if (in_band_format_assigned)
8366 key = (gint *) g_malloc(sizeof(gint));
8367 *key = rtp_payload_type;
8369 encoding_name_and_rate = g_malloc(sizeof(encoding_name_and_rate_t));
8370 encoding_name_and_rate->encoding_name = g_strdup("telephone-event");
8371 encoding_name_and_rate->sample_rate = sample_rate;
8373 g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
8374 rtp_dyn_payload_used = TRUE;
8380 if (rtp_dyn_payload_used == FALSE)
8382 rtp_free_hash_dyn_payload(rtp_dyn_payload);
8385 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8387 return(curr_offset - offset);
8394 elem_ms_des_freq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8399 guint32 curr_offset;
8402 curr_offset = offset;
8404 oct = tvb_get_guint8(tvb, curr_offset);
8406 temp_int = (oct & 0xf8) >> 3;
8407 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
8413 str = band_class_str[temp_int];
8416 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
8417 proto_tree_add_text(tree,
8418 tvb, curr_offset, 1,
8419 "%s : Band Class: %s",
8423 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
8425 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8426 proto_tree_add_text(tree, tvb, curr_offset, 1,
8427 "%s : CDMA Channel (MSB): %u",
8433 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
8434 proto_tree_add_text(tree, tvb, curr_offset, 1,
8435 "%s : CDMA Channel (LSB)",
8438 g_snprintf(add_string, string_len, " - (CDMA Channel: %u)", value);
8442 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8444 return(curr_offset - offset);
8451 elem_plcm_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8454 guint32 curr_offset;
8457 curr_offset = offset;
8459 oct = tvb_get_guint8(tvb, curr_offset);
8462 * from C.S0005-D v1.0 L3 Table 3.7.2.3.2.21-5
8464 switch ((oct & 0xf0) >> 4)
8466 case 0x00: str = "PLCM derived from ESN or MEID"; break;
8467 case 0x01: str = "PLCM specified by the base station"; break;
8468 case 0x02: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_M"; break;
8469 case 0x03: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_T"; break;
8475 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8476 proto_tree_add_text(tree,
8477 tvb, curr_offset, 1,
8478 "%s : PLCM_TYPE: %s",
8482 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
8483 proto_tree_add_text(tree,
8484 tvb, curr_offset, 1,
8488 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8489 proto_tree_add_text(tree, tvb, curr_offset, 1,
8490 "%s : PLCM_42 (MSB)",
8495 proto_tree_add_text(tree, tvb, curr_offset, 5, "PLCM_42");
8499 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8501 return(curr_offset - offset);
8515 * ORDER MUST BE MAINTAINED
8517 * The value of this enum is used as an index into
8523 ANSI_A_E_ACC_NET_ID, /* Access Network Identifiers */
8524 ANSI_A_E_ADDS_USER_PART, /* ADDS User Part */
8525 ANSI_A_E_AMPS_HHO_PARAM, /* AMPS Hard Handoff Parameters */
8526 ANSI_A_E_ANCH_PDSN_ADDR, /* Anchor PDSN Address */
8527 ANSI_A_E_ANCH_PP_ADDR, /* Anchor P-P Address */
8528 ANSI_A_E_AUTH_CHLG_PARAM, /* Authentication Challenge Parameter */
8529 ANSI_A_E_AUTH_CNF_PARAM, /* Authentication Confirmation Parameter (RANDC) */
8530 ANSI_A_E_AUTH_DATA, /* Authentication Data */
8531 ANSI_A_E_AUTH_EVENT, /* Authentication Event */
8532 ANSI_A_E_AUTH_PARAM_COUNT, /* Authentication Parameter COUNT */
8533 ANSI_A_E_AUTH_RESP_PARAM, /* Authentication Response Parameter */
8534 ANSI_A_E_BAND_CLASS, /* Band Class */
8535 ANSI_A_E_CLD_PARTY_ASCII_NUM, /* Called Party ASCII Number */
8536 ANSI_A_E_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
8537 ANSI_A_E_CLG_PARTY_ASCII_NUM, /* Calling Party ASCII Number */
8538 ANSI_A_E_CAUSE, /* Cause */
8539 ANSI_A_E_CAUSE_L3, /* Cause Layer 3 */
8540 ANSI_A_E_CDMA_SOWD, /* CDMA Serving One Way Delay */
8541 ANSI_A_E_CELL_ID, /* Cell Identifier */
8542 ANSI_A_E_CELL_ID_LIST, /* Cell Identifier List */
8543 ANSI_A_E_CHAN_NUM, /* Channel Number */
8544 ANSI_A_E_CHAN_TYPE, /* Channel Type */
8545 ANSI_A_E_CCT_GROUP, /* Circuit Group */
8546 ANSI_A_E_CIC, /* Circuit Identity Code */
8547 ANSI_A_E_CIC_EXT, /* Circuit Identity Code Extension */
8548 ANSI_A_E_CM_INFO_TYPE_2, /* Classmark Information Type 2 */
8549 ANSI_A_E_DOWNLINK_RE, /* Downlink Radio Environment */
8550 ANSI_A_E_DOWNLINK_RE_LIST, /* Downlink Radio Environment List */
8551 ANSI_A_E_ENC_INFO, /* Encryption Information */
8552 ANSI_A_E_EXT_HO_DIR_PARAMS, /* Extended Handoff Direction Parameters */
8553 ANSI_A_E_GEO_LOC, /* Geographic Location */
8554 ANSI_A_E_SSCI, /* Special Service Call Indicator */
8555 ANSI_A_E_HO_POW_LEV, /* Handoff Power Level */
8556 ANSI_A_E_HHO_PARAMS, /* Hard Handoff Parameters */
8557 ANSI_A_E_IE_REQD, /* Information Element Requested */
8558 ANSI_A_E_IS2000_CHAN_ID, /* IS-2000 Channel Identity */
8559 ANSI_A_E_IS2000_CHAN_ID_3X, /* IS-2000 Channel Identity 3X */
8560 ANSI_A_E_IS2000_MOB_CAP, /* IS-2000 Mobile Capabilities */
8561 ANSI_A_E_IS2000_NN_SCR, /* IS-2000 Non-Negotiable Service Configuration Record */
8562 ANSI_A_E_IS2000_SCR, /* IS-2000 Service Configuration Record */
8563 ANSI_A_E_IS2000_CAUSE, /* IS-95/IS-2000 Cause Value */
8564 ANSI_A_E_IS2000_RED_RECORD, /* IS-2000 Redirection Record */
8565 ANSI_A_E_IS95_CHAN_ID, /* IS-95 Channel Identity */
8566 ANSI_A_E_IS95_MS_MEAS_CHAN_ID, /* IS-95 MS Measured Channel Identity */
8567 ANSI_A_E_L3_INFO, /* Layer 3 Information */
8568 ANSI_A_E_LAI, /* Location Area Information */
8569 ANSI_A_E_MWI, /* Message Waiting Indication */
8570 ANSI_A_E_MID, /* Mobile Identity */
8571 ANSI_A_E_FWD_MS_INFO_RECS, /* (Forward) MS Information Records */
8572 ANSI_A_E_ORIG_CI, /* Origination Continuation Indicator */
8573 ANSI_A_E_PACA_ORDER, /* PACA Order */
8574 ANSI_A_E_PACA_REOI, /* PACA Reorigination Indicator */
8575 ANSI_A_E_PACA_TS, /* PACA Timestamp */
8576 ANSI_A_E_PSP, /* Packet Session Parameters */
8577 ANSI_A_E_PDSN_IP_ADDR, /* PDSN IP Address */
8578 ANSI_A_E_PDI, /* Power Down Indicator */
8579 ANSI_A_E_PRIO, /* Priority */
8580 ANSI_A_E_P_REV, /* Protocol Revision */
8581 ANSI_A_E_PTYPE, /* Protocol Type */
8582 ANSI_A_E_PSMM_COUNT, /* PSMM Count */
8583 ANSI_A_E_QOS_PARAMS, /* Quality of Service Parameters */
8584 ANSI_A_E_RE_RES, /* Radio Environment and Resources */
8585 ANSI_A_E_REG_TYPE, /* Registration Type */
8586 ANSI_A_E_REJ_CAUSE, /* Reject Cause */
8587 ANSI_A_E_RESP_REQ, /* Response Request */
8588 ANSI_A_E_RETURN_CAUSE, /* Return Cause */
8589 ANSI_A_E_RF_CHAN_ID, /* RF Channel Identity */
8590 ANSI_A_E_SO, /* Service Option */
8591 ANSI_A_E_SOCI, /* Service Option Connection Identifier (SOCI) */
8592 ANSI_A_E_SO_LIST, /* Service Option List */
8593 ANSI_A_E_S_RED_INFO, /* Service Redirection Info */
8594 ANSI_A_E_SR_ID, /* Service Reference Identifier (SR_ID) */
8595 ANSI_A_E_SID, /* SID */
8596 ANSI_A_E_SIGNAL, /* Signal */
8597 ANSI_A_E_SCI, /* Slot Cycle Index */
8598 ANSI_A_E_SW_VER, /* Software Version */
8599 ANSI_A_E_SRNC_TRNC_TC, /* Source RNC to Target RNC Transparent Container */
8600 ANSI_A_E_S_PDSN_ADDR, /* Source PDSN Address */
8601 ANSI_A_E_TAG, /* Tag */
8602 ANSI_A_E_TRNC_SRNC_TC, /* Target RNC to Source RNC Transparent Container */
8603 ANSI_A_E_XMODE, /* Transcoder Mode */
8604 ANSI_A_E_UZ_ID, /* User Zone ID */
8605 ANSI_A_E_VP_REQ, /* Voice Privacy Request */
8606 ANSI_A_E_A2P_BEARER_SESSION, /* A2p Bearer Session-Level Parameters */
8607 ANSI_A_E_A2P_BEARER_FORMAT, /* A2p Bearer Format-Specific Parameters */
8608 ANSI_A_E_MS_DES_FREQ, /* MS Designated Frequency */
8609 ANSI_A_E_MOB_SUB_INFO, /* Mobile Subscription Information */
8610 ANSI_A_E_PLCM_ID, /* Public Long Code Mask Identifier */
8611 ANSI_A_E_REV_MS_INFO_RECS, /* (Reverse) MS Information Records */
8612 ANSI_A_E_NONE /* NONE */
8616 #define MAX_IOS401_NUM_ELEM_1 (sizeof(ansi_a_ios401_elem_1_strings)/sizeof(ext_value_string_t))
8617 #define MAX_IOS501_NUM_ELEM_1 (sizeof(ansi_a_ios501_elem_1_strings)/sizeof(ext_value_string_t))
8618 static gint ett_ansi_elem_1[MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)];
8619 static guint8 (*elem_1_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) =
8621 elem_acc_net_id, /* Access Network Identifiers */
8622 elem_adds_user_part, /* ADDS User Part */
8623 elem_amps_hho_param, /* AMPS Hard Handoff Parameters */
8624 elem_anchor_pdsn_addr, /* Anchor PDSN Address */
8625 elem_anchor_pp_addr, /* Anchor P-P Address */
8626 elem_auth_chlg_param, /* Authentication Challenge Parameter */
8627 NULL /* no decode required */, /* Authentication Confirmation Parameter (RANDC) */
8628 NULL /* no decode required */, /* Authentication Data */
8629 elem_auth_event, /* Authentication Event */
8630 elem_auth_param_count, /* Authentication Parameter COUNT */
8631 elem_auth_resp_param, /* Authentication Response Parameter */
8632 elem_band_class, /* Band Class */
8633 elem_cld_party_ascii_num, /* Called Party ASCII Number */
8634 elem_cld_party_bcd_num, /* Called Party BCD Number */
8635 elem_clg_party_ascii_num, /* Calling Party ASCII Number */
8636 elem_cause, /* Cause */
8637 elem_cause_l3, /* Cause Layer 3 */
8638 elem_cdma_sowd, /* CDMA Serving One Way Delay */
8639 elem_cell_id, /* Cell Identifier */
8640 elem_cell_id_list, /* Cell Identifier List */
8641 elem_chan_num, /* Channel Number */
8642 elem_chan_type, /* Channel Type */
8643 elem_cct_group, /* Circuit Group */
8644 elem_cic, /* Circuit Identity Code */
8645 elem_cic_ext, /* Circuit Identity Code Extension */
8646 elem_cm_info_type_2, /* Classmark Information Type 2 */
8647 elem_downlink_re, /* Downlink Radio Environment */
8648 elem_downlink_re_list, /* Downlink Radio Environment List */
8649 elem_enc_info, /* Encryption Information */
8650 elem_ext_ho_dir_params, /* Extended Handoff Direction Parameters */
8651 elem_geo_loc, /* Geographic Location */
8652 elem_ssci, /* Special Service Call Indicator */
8653 elem_ho_pow_lev, /* Handoff Power Level */
8654 elem_hho_params, /* Hard Handoff Parameters */
8655 elem_info_rec_req, /* Information Element Requested */
8656 elem_is2000_chan_id, /* IS-2000 Channel Identity */
8657 NULL, /* IS-2000 Channel Identity 3X */
8658 elem_is2000_mob_cap, /* IS-2000 Mobile Capabilities */
8659 elem_is2000_nn_scr, /* IS-2000 Non-Negotiable Service Configuration Record */
8660 elem_is2000_scr, /* IS-2000 Service Configuration Record */
8661 elem_is2000_cause, /* IS-95/IS-2000 Cause Value */
8662 NULL, /* IS-2000 Redirection Record */
8663 elem_is95_chan_id, /* IS-95 Channel Identity */
8664 elem_is95_ms_meas_chan_id, /* IS-95 MS Measured Channel Identity */
8665 elem_l3_info, /* Layer 3 Information */
8666 elem_lai, /* Location Area Information */
8667 elem_mwi, /* Message Waiting Indication */
8668 elem_mid, /* Mobile Identity */
8669 elem_fwd_ms_info_recs, /* (Forward) MS Information Records */
8670 NULL /* no associated data */, /* Origination Continuation Indicator */
8671 elem_paca_order, /* PACA Order */
8672 elem_paca_reoi, /* PACA Reorigination Indicator */
8673 elem_paca_ts, /* PACA Timestamp */
8674 NULL, /* Packet Session Parameters */
8675 elem_pdsn_ip_addr, /* PDSN IP Address */
8676 NULL /* no associated data */, /* Power Down Indicator */
8677 elem_prio, /* Priority */
8678 elem_p_rev, /* Protocol Revision */
8679 elem_ptype, /* Protocol Type */
8680 elem_psmm_count, /* PSMM Count */
8681 elem_qos_params, /* Quality of Service Parameters */
8682 elem_re_res, /* Radio Environment and Resources */
8683 elem_reg_type, /* Registration Type */
8684 elem_rej_cause, /* Reject Cause */
8685 NULL /* no associated data */, /* Response Request */
8686 elem_return_cause, /* Return Cause */
8687 elem_rf_chan_id, /* RF Channel Identity */
8688 elem_so, /* Service Option */
8689 elem_soci, /* Service Option Connection Identifier (SOCI) */
8690 elem_so_list, /* Service Option List */
8691 NULL, /* Service Redirection Info */
8692 elem_sr_id, /* Service Reference Identifier (SR_ID) */
8694 elem_signal, /* Signal */
8695 elem_sci, /* Slot Cycle Index */
8696 elem_sw_ver, /* Software Version */
8697 NULL /* transparent */, /* Source RNC to Target RNC Transparent Container */
8698 elem_s_pdsn_ip_addr, /* Source PDSN Address */
8700 NULL /* transparent */, /* Target RNC to Source RNC Transparent Container */
8701 elem_xmode, /* Transcoder Mode */
8702 elem_uz_id, /* User Zone ID */
8703 NULL /* no associated data */, /* Voice Privacy Request */
8704 elem_a2p_bearer_session, /* A2p Bearer Session-Level Parameters */
8705 elem_a2p_bearer_format, /* A2p Bearer Format-Specific Parameters */
8706 elem_ms_des_freq, /* MS Designated Frequency */
8707 NULL, /* Mobile Subscription Information */
8708 elem_plcm_id, /* Public Long Code Mask Identification */
8709 elem_rev_ms_info_recs, /* (Reverse) MS Information Records */
8713 /* MESSAGE FUNCTIONS */
8716 * Type Length Value (TLV) element dissector
8719 elem_tlv(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, guint len, const gchar *name_add)
8721 guint8 oct, parm_len;
8723 guint32 curr_offset;
8724 proto_tree *subtree;
8729 curr_offset = offset;
8732 if ((unsigned) idx >= ansi_a_elem_1_max-1)
8734 /* Unknown index, skip the element */
8735 return tvb_length_remaining(tvb, offset) ;
8738 oct = tvb_get_guint8(tvb, curr_offset);
8740 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8742 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8744 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
8747 proto_tree_add_text(tree,
8748 tvb, curr_offset, parm_len + 2,
8750 ansi_a_elem_1_strings[idx].strptr,
8751 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8753 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8755 proto_tree_add_uint_format(subtree, hf_ansi_a_elem_id, tvb,
8756 curr_offset, 1, oct,
8759 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
8760 curr_offset + 1, 1, parm_len);
8764 if (elem_1_fcn[dec_idx] == NULL)
8766 proto_tree_add_text(subtree,
8767 tvb, curr_offset + 2, parm_len,
8770 consumed = parm_len;
8774 gchar *a_add_string;
8776 a_add_string = (gchar *) ep_alloc(1024);
8777 a_add_string[0] = '\0';
8779 (*elem_1_fcn[dec_idx])(tvb, subtree, curr_offset + 2,
8780 parm_len, a_add_string, 1024);
8782 if (a_add_string[0] != '\0')
8784 proto_item_append_text(item, "%s", a_add_string);
8796 * Type Value (TV) element dissector
8798 * Length cannot be used in these functions, big problem if a element dissector
8799 * is not defined for these.
8802 elem_tv(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, const gchar *name_add)
8806 guint32 curr_offset;
8807 proto_tree *subtree;
8812 curr_offset = offset;
8815 if ((unsigned) idx >= ansi_a_elem_1_max-1)
8817 /* Unknown index, skip the element */
8818 return tvb_length_remaining(tvb, offset) ;
8821 oct = tvb_get_guint8(tvb, curr_offset);
8823 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8825 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8828 proto_tree_add_text(tree,
8829 tvb, curr_offset, -1,
8831 ansi_a_elem_1_strings[idx].strptr,
8832 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8834 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8836 proto_tree_add_uint_format(subtree, hf_ansi_a_elem_id, tvb,
8837 curr_offset, 1, oct,
8840 if (elem_1_fcn[dec_idx] == NULL)
8842 /* BAD THING, CANNOT DETERMINE LENGTH */
8844 proto_tree_add_text(subtree,
8845 tvb, curr_offset + 1, 1,
8846 "No element dissector, rest of dissection may be incorrect");
8852 gchar *a_add_string;
8854 a_add_string = (gchar *) ep_alloc(1024);
8855 a_add_string[0] = '\0';
8856 consumed = (*elem_1_fcn[dec_idx])(tvb, subtree, curr_offset + 1, -1, a_add_string, 1024);
8858 if (a_add_string[0] != '\0')
8860 proto_item_append_text(item, "%s", a_add_string);
8866 proto_item_set_len(item, consumed);
8873 * Type (T) element dissector
8875 * Length cannot be used in these functions, big problem if a element dissector
8876 * is not defined for these.
8879 elem_t(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, const gchar *name_add)
8882 guint32 curr_offset;
8886 curr_offset = offset;
8889 if ((unsigned)idx >= ansi_a_elem_1_max-1)
8891 /* Unknown index, skip the element */
8892 return tvb_length_remaining(tvb, offset) ;
8895 oct = tvb_get_guint8(tvb, curr_offset);
8897 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8899 proto_tree_add_uint_format(tree, hf_ansi_a_elem_id, tvb, curr_offset, 1, oct,
8901 ansi_a_elem_1_strings[idx].strptr,
8902 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8911 * Length Value (LV) element dissector
8914 elem_lv(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, guint len _U_, const gchar *name_add)
8918 guint32 curr_offset;
8919 proto_tree *subtree;
8924 curr_offset = offset;
8927 if ((unsigned) idx >= ansi_a_elem_1_max-1)
8929 /* Unknown index, skip the element */
8930 return tvb_length_remaining(tvb, offset) ;
8933 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8935 parm_len = tvb_get_guint8(tvb, curr_offset);
8938 proto_tree_add_text(tree,
8939 tvb, curr_offset, parm_len + 1,
8941 ansi_a_elem_1_strings[idx].strptr,
8942 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8944 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8946 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
8947 curr_offset, 1, parm_len);
8951 if (elem_1_fcn[dec_idx] == NULL)
8953 proto_tree_add_text(subtree,
8954 tvb, curr_offset + 1, parm_len,
8957 consumed = parm_len;
8961 gchar *a_add_string;
8963 a_add_string = (gchar *) ep_alloc(1024);
8964 a_add_string[0] = '\0';
8966 (*elem_1_fcn[dec_idx])(tvb, subtree, curr_offset + 1,
8967 parm_len, a_add_string, 1024);
8969 if (a_add_string[0] != '\0')
8971 proto_item_append_text(item, "%s", a_add_string);
8976 return(consumed + 1);
8980 * Value (V) element dissector
8982 * Length cannot be used in these functions, big problem if a element dissector
8983 * is not defined for these.
8986 elem_v(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset)
8989 guint32 curr_offset;
8992 curr_offset = offset;
8995 if ((unsigned) idx >= ansi_a_elem_1_max-1)
8997 /* Unknown index, skip the element */
8998 return tvb_length_remaining(tvb, offset) ;
9001 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
9003 if (elem_1_fcn[dec_idx] == NULL)
9005 /* BAD THING, CANNOT DETERMINE LENGTH */
9007 proto_tree_add_text(tree,
9008 tvb, curr_offset, 1,
9009 "No element dissector, rest of dissection may be incorrect");
9015 gchar *a_add_string;
9017 a_add_string = (gchar *) ep_alloc(1024);
9018 a_add_string[0] = '\0';
9019 consumed = (*elem_1_fcn[dec_idx])(tvb, tree, curr_offset, -1, a_add_string, 1024);
9026 #define ELEM_MAND_TLV(elem_idx, elem_name_addition) \
9028 if ((consumed = elem_tlv(tvb, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9030 curr_offset += consumed; \
9031 curr_len -= consumed; \
9035 proto_tree_add_text(tree, \
9036 tvb, curr_offset, 0, \
9037 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9038 ansi_a_elem_1_strings[elem_idx].value, \
9039 ansi_a_elem_1_strings[elem_idx].strptr, \
9040 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9043 if (curr_len <= 0) return; \
9046 #define ELEM_OPT_TLV(elem_idx, elem_name_addition) \
9048 if ((consumed = elem_tlv(tvb, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9050 curr_offset += consumed; \
9051 curr_len -= consumed; \
9053 if (curr_len <= 0) return; \
9056 #define ELEM_MAND_TV(elem_idx, elem_name_addition) \
9058 if ((consumed = elem_tv(tvb, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9060 curr_offset += consumed; \
9061 curr_len -= consumed; \
9065 proto_tree_add_text(tree, \
9066 tvb, curr_offset, 0, \
9067 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9068 ansi_a_elem_1_strings[elem_idx].value, \
9069 ansi_a_elem_1_strings[elem_idx].strptr, \
9070 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9073 if (curr_len <= 0) return; \
9076 #define ELEM_OPT_TV(elem_idx, elem_name_addition) \
9078 if ((consumed = elem_tv(tvb, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9080 curr_offset += consumed; \
9081 curr_len -= consumed; \
9083 if (curr_len <= 0) return; \
9086 #define ELEM_OPT_T(elem_idx, elem_name_addition) \
9088 if ((consumed = elem_t(tvb, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9090 curr_offset += consumed; \
9091 curr_len -= consumed; \
9093 if (curr_len <= 0) return; \
9096 #define ELEM_MAND_LV(elem_idx, elem_name_addition) \
9098 if ((consumed = elem_lv(tvb, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9100 curr_offset += consumed; \
9101 curr_len -= consumed; \
9105 /* Mandatory, but nothing we can do */ \
9107 if (curr_len <= 0) return; \
9110 #define ELEM_MAND_V(elem_idx) \
9112 if ((consumed = elem_v(tvb, tree, elem_idx, curr_offset)) > 0) \
9114 curr_offset += consumed; \
9115 curr_len -= consumed; \
9119 /* Mandatory, but nothing we can do */ \
9121 if (curr_len <= 0) return; \
9129 bsmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9132 guint32 curr_offset;
9135 curr_offset = offset;
9138 ELEM_MAND_TLV(ANSI_A_E_CELL_ID, "");
9140 ELEM_MAND_TLV(ANSI_A_E_L3_INFO, "");
9142 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9149 dtap_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9151 guint32 curr_offset;
9155 proto_tree *subtree;
9159 curr_offset = offset;
9163 * special dissection for CM Service Type
9165 oct = tvb_get_guint8(tvb, curr_offset);
9169 case 0x01: str = "Mobile Originating Call"; break;
9176 proto_tree_add_text(tree,
9177 tvb, curr_offset, 1,
9178 "CM Service Type: %s",
9181 subtree = proto_item_add_subtree(item, ett_cm_srvc_type);
9183 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
9184 proto_tree_add_text(subtree,
9185 tvb, curr_offset, 1,
9189 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
9190 proto_tree_add_text(subtree,
9191 tvb, curr_offset, 1,
9192 "%s : Service Type: (%u) %s",
9200 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2, "");
9202 ELEM_MAND_LV(ANSI_A_E_MID, "");
9204 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9206 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9208 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9210 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9212 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9214 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9216 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9218 ELEM_OPT_TV(ANSI_A_E_SO, "");
9220 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9222 ELEM_OPT_TV(ANSI_A_E_RE_RES, "");
9224 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9226 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9228 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9230 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA, "");
9232 ELEM_OPT_TLV(ANSI_A_E_PACA_REOI, "");
9234 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
9236 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9238 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
9240 switch (global_a_variant)
9242 case A_VARIANT_IOS501:
9243 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9245 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9247 ELEM_OPT_T(ANSI_A_E_ORIG_CI, "");
9249 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE, "");
9251 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9253 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9255 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9257 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9261 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9268 dtap_cm_srvc_req_cont(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9270 guint32 curr_offset;
9274 curr_offset = offset;
9277 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9279 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9281 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
9283 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9290 bsmap_page_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9292 guint32 curr_offset;
9296 curr_offset = offset;
9299 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9301 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9303 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
9305 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9307 ELEM_OPT_TV(ANSI_A_E_SO, "");
9309 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9311 switch (global_a_variant)
9313 case A_VARIANT_IOS501:
9314 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9316 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9318 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9320 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9322 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9326 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9333 dtap_page_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9335 guint32 curr_offset;
9339 curr_offset = offset;
9342 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2, "");
9344 ELEM_MAND_LV(ANSI_A_E_MID, "");
9346 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9348 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9350 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9352 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9354 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9356 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9358 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9360 ELEM_OPT_TV(ANSI_A_E_SO, "");
9362 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9364 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9366 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9368 ELEM_OPT_TV(ANSI_A_E_RE_RES, "");
9370 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
9372 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9374 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
9376 switch (global_a_variant)
9378 case A_VARIANT_IOS501:
9379 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9381 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9383 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9385 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9389 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9396 dtap_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9398 guint32 curr_offset;
9402 curr_offset = offset;
9405 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9407 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9409 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9411 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9418 dtap_srvc_redirection(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9420 guint32 curr_offset;
9424 curr_offset = offset;
9427 ELEM_MAND_TLV(ANSI_A_E_IS2000_RED_RECORD, "");
9429 ELEM_MAND_TLV(ANSI_A_E_S_RED_INFO, "");
9431 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9433 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9435 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9437 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9439 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9446 dtap_srvc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9448 guint32 curr_offset;
9452 curr_offset = offset;
9455 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9457 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9459 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9461 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9468 dtap_srvc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9470 guint32 curr_offset;
9474 curr_offset = offset;
9477 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9479 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9486 bsmap_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9489 guint32 curr_offset;
9492 curr_offset = offset;
9495 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE, "");
9497 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9499 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
9501 ELEM_OPT_TV(ANSI_A_E_SO, "");
9503 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9505 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9507 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9509 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9511 ELEM_OPT_TLV(ANSI_A_E_PACA_TS, "");
9513 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
9515 switch (global_a_variant)
9517 case A_VARIANT_IOS501:
9518 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9520 ELEM_OPT_TLV(ANSI_A_E_SR_ID, "");
9522 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9524 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9526 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9528 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9532 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9539 bsmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9542 guint32 curr_offset;
9545 curr_offset = offset;
9548 ELEM_MAND_TV(ANSI_A_E_CHAN_NUM, "");
9550 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
9552 ELEM_OPT_TV(ANSI_A_E_SO, "");
9554 switch (global_a_variant)
9556 case A_VARIANT_IOS501:
9557 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9559 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9561 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9563 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9567 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9574 bsmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9577 guint32 curr_offset;
9580 curr_offset = offset;
9583 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9585 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9587 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9594 bsmap_clr_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9597 guint32 curr_offset;
9600 curr_offset = offset;
9603 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9605 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9607 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9614 bsmap_clr_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9617 guint32 curr_offset;
9620 curr_offset = offset;
9623 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9625 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9627 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9634 bsmap_clr_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9637 guint32 curr_offset;
9640 curr_offset = offset;
9643 ELEM_OPT_T(ANSI_A_E_PDI, "");
9645 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9647 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9654 dtap_alert_with_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9656 guint32 curr_offset;
9660 curr_offset = offset;
9663 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9665 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9667 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9674 bsmap_bs_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9676 guint32 curr_offset;
9680 curr_offset = offset;
9683 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9685 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9687 ELEM_OPT_TV(ANSI_A_E_SO, "");
9689 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9691 ELEM_OPT_TLV(ANSI_A_E_ADDS_USER_PART, "");
9693 ELEM_OPT_TLV(ANSI_A_E_SR_ID, "");
9695 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9697 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9704 bsmap_bs_srvc_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9706 guint32 curr_offset;
9710 curr_offset = offset;
9713 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9715 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9717 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9719 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9721 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9723 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9730 bsmap_add_srvc_noti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9732 guint32 curr_offset;
9736 curr_offset = offset;
9739 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9741 ELEM_MAND_TV(ANSI_A_E_SO, "");
9743 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9745 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9752 dtap_add_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9754 guint32 curr_offset;
9758 curr_offset = offset;
9761 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9763 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9765 ELEM_MAND_TV(ANSI_A_E_SO, "");
9767 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9769 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9771 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9773 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9775 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9777 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9779 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9786 dtap_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9788 guint32 curr_offset;
9792 curr_offset = offset;
9795 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9797 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9804 dtap_flash_with_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9806 guint32 curr_offset;
9810 curr_offset = offset;
9813 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9815 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9817 ELEM_OPT_TV(ANSI_A_E_MWI, "");
9819 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9821 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9823 if (g_pinfo->p2p_dir == P2P_DIR_RECV)
9825 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
9829 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9832 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9834 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9836 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9843 dtap_flash_with_info_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9845 guint32 curr_offset;
9849 curr_offset = offset;
9852 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9854 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9856 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9863 bsmap_feat_noti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9865 guint32 curr_offset;
9869 curr_offset = offset;
9872 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9874 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9876 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
9878 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9880 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9882 ELEM_OPT_TV(ANSI_A_E_MWI, "");
9884 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9886 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9888 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9890 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9892 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9894 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9896 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9903 bsmap_feat_noti_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9905 guint32 curr_offset;
9909 curr_offset = offset;
9912 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9914 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9916 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9923 bsmap_paca_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9925 guint32 curr_offset;
9929 curr_offset = offset;
9932 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9934 ELEM_OPT_TLV(ANSI_A_E_PACA_TS, "");
9936 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9943 bsmap_paca_command_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9945 guint32 curr_offset;
9949 curr_offset = offset;
9952 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9954 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9961 bsmap_paca_update(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9963 guint32 curr_offset;
9967 curr_offset = offset;
9970 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9972 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9974 ELEM_OPT_TLV(ANSI_A_E_PACA_ORDER, "");
9976 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9978 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9980 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9982 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9984 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9986 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9988 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9990 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9992 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9999 bsmap_paca_update_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10001 guint32 curr_offset;
10005 curr_offset = offset;
10008 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10010 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
10012 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10014 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10021 bsmap_rm_pos_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10023 guint32 curr_offset;
10027 curr_offset = offset;
10030 ELEM_MAND_TLV(ANSI_A_E_PSMM_COUNT, "");
10032 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10039 bsmap_rm_pos_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10041 guint32 curr_offset;
10045 curr_offset = offset;
10048 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10050 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10052 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE_LIST, "");
10054 ELEM_OPT_TLV(ANSI_A_E_GEO_LOC, "");
10056 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10063 bsmap_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10065 guint32 curr_offset;
10069 curr_offset = offset;
10072 ELEM_MAND_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10074 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10076 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10078 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10080 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10082 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10084 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10086 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10088 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10090 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10094 dtap_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10096 guint32 curr_offset;
10100 curr_offset = offset;
10103 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10105 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10107 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10114 bsmap_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10116 guint32 curr_offset;
10120 curr_offset = offset;
10123 ELEM_MAND_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
10125 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10127 ELEM_MAND_TV(ANSI_A_E_TAG, "");
10129 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10131 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10133 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10141 bsmap_bearer_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10143 guint32 curr_offset;
10147 curr_offset = offset;
10150 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10152 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10154 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10162 bsmap_bearer_upd_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10164 guint32 curr_offset;
10168 curr_offset = offset;
10171 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10173 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10175 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10177 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10185 bsmap_bearer_upd_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10187 guint32 curr_offset;
10191 curr_offset = offset;
10194 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10196 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10198 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10200 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10204 dtap_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10206 guint32 curr_offset;
10210 curr_offset = offset;
10213 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM, "");
10215 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10222 bsmap_user_zone_update(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10224 guint32 curr_offset;
10228 curr_offset = offset;
10231 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10233 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10240 dtap_user_zone_update_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10242 guint32 curr_offset;
10246 curr_offset = offset;
10249 ELEM_MAND_TLV(ANSI_A_E_UZ_ID, "");
10251 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10258 dtap_user_zone_update(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10260 guint32 curr_offset;
10264 curr_offset = offset;
10267 ELEM_MAND_TLV(ANSI_A_E_UZ_ID, "");
10269 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10276 bsmap_user_zone_reject(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10278 guint32 curr_offset;
10282 curr_offset = offset;
10285 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10287 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10289 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10291 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10293 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10295 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10297 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10299 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10301 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10308 dtap_user_zone_reject(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10310 guint32 curr_offset;
10314 curr_offset = offset;
10317 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10319 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10326 bsmap_reg_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10328 guint32 curr_offset;
10332 curr_offset = offset;
10335 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10337 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10339 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10341 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10343 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10345 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10347 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10349 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10356 bsmap_ms_reg_noti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10358 guint32 curr_offset;
10362 curr_offset = offset;
10365 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10367 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10374 bsmap_bs_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10376 guint32 curr_offset;
10380 curr_offset = offset;
10383 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10385 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10392 bsmap_bs_auth_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10394 guint32 curr_offset;
10398 curr_offset = offset;
10401 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10403 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10410 dtap_ssd_update_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10412 guint32 curr_offset;
10416 curr_offset = offset;
10419 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10421 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10428 dtap_bs_challenge(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10430 guint32 curr_offset;
10434 curr_offset = offset;
10437 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10439 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10446 dtap_bs_challenge_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10448 guint32 curr_offset;
10452 curr_offset = offset;
10455 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM, "");
10457 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10464 dtap_ssd_update_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10466 guint32 curr_offset;
10470 curr_offset = offset;
10473 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
10475 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10482 dtap_lu_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10484 guint32 curr_offset;
10488 curr_offset = offset;
10491 ELEM_MAND_LV(ANSI_A_E_MID, "");
10493 ELEM_OPT_TV(ANSI_A_E_LAI, "");
10495 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10497 ELEM_OPT_TV(ANSI_A_E_REG_TYPE, "");
10499 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10501 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10503 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
10505 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
10507 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
10509 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10511 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
10513 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10515 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10517 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE, "");
10519 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10521 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10523 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10525 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10532 dtap_lu_accept(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10534 guint32 curr_offset;
10538 curr_offset = offset;
10541 switch (global_a_variant)
10543 case A_VARIANT_IOS401:
10544 ELEM_OPT_TV(ANSI_A_E_LAI, "");
10547 case A_VARIANT_IOS501:
10548 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10550 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10552 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10556 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10563 dtap_lu_reject(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10565 guint32 curr_offset;
10569 curr_offset = offset;
10572 ELEM_MAND_V(ANSI_A_E_REJ_CAUSE);
10574 switch (global_a_variant)
10576 case A_VARIANT_IOS501:
10577 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10579 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10583 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10590 bsmap_priv_mode_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10592 guint32 curr_offset;
10596 curr_offset = offset;
10599 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO, "");
10601 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10608 bsmap_priv_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10610 guint32 curr_offset;
10614 curr_offset = offset;
10617 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
10619 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
10621 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10628 bsmap_status_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10630 guint32 curr_offset;
10634 curr_offset = offset;
10637 ELEM_MAND_TLV(ANSI_A_E_IE_REQD, "");
10639 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10641 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10643 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10645 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10647 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10649 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10651 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10653 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10655 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10657 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10659 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10666 dtap_status_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10668 guint32 curr_offset;
10672 curr_offset = offset;
10675 ELEM_MAND_LV(ANSI_A_E_IE_REQD, "");
10677 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10685 bsmap_status_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10687 guint32 curr_offset;
10691 curr_offset = offset;
10694 ELEM_MAND_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
10696 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10698 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10700 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10702 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10704 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10711 dtap_status_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10713 guint32 curr_offset;
10717 curr_offset = offset;
10720 ELEM_MAND_LV(ANSI_A_E_REV_MS_INFO_RECS, "");
10722 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10729 bsmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10731 guint32 curr_offset;
10735 curr_offset = offset;
10738 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10740 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST, " (Target)");
10742 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10744 ELEM_OPT_T(ANSI_A_E_RESP_REQ, "");
10746 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
10748 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10750 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10752 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE, "");
10754 ELEM_OPT_TV(ANSI_A_E_SO, "");
10756 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10758 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID, "");
10760 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10762 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
10764 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10766 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10768 switch (global_a_variant)
10770 case A_VARIANT_IOS401:
10771 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
10774 case A_VARIANT_IOS501:
10775 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
10779 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
10781 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
10783 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10785 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID, "");
10787 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10789 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10791 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10793 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR, "");
10795 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR, "");
10797 ELEM_OPT_TLV(ANSI_A_E_PSP, "");
10799 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10801 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10803 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10805 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10812 bsmap_ho_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10814 guint32 curr_offset;
10818 curr_offset = offset;
10821 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE, "");
10823 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO, "");
10825 ELEM_MAND_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10827 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST, "(Target)");
10829 ELEM_OPT_TLV(ANSI_A_E_CIC_EXT, "");
10831 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10833 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10835 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10837 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE, "");
10839 ELEM_OPT_TV(ANSI_A_E_SO, "");
10841 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10843 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID, "");
10845 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10847 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
10849 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10851 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10853 switch (global_a_variant)
10855 case A_VARIANT_IOS401:
10856 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
10859 case A_VARIANT_IOS501:
10860 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
10864 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
10866 switch (global_a_variant)
10868 case A_VARIANT_IOS501:
10869 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
10871 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10873 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID, "");
10875 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10877 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10879 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10881 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR, "");
10883 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR, "");
10885 ELEM_OPT_TLV(ANSI_A_E_PSP, "");
10887 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10889 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10891 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10893 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10895 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10899 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10906 bsmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10908 guint32 curr_offset;
10912 curr_offset = offset;
10915 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10917 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10919 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
10921 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS, "");
10923 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10925 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10927 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10929 switch (global_a_variant)
10931 case A_VARIANT_IOS501:
10932 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
10934 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10936 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10938 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10940 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10942 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10944 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10948 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10955 bsmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10957 guint32 curr_offset;
10961 curr_offset = offset;
10964 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10966 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10973 bsmap_ho_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10975 guint32 curr_offset;
10979 curr_offset = offset;
10982 ELEM_OPT_TV(ANSI_A_E_RF_CHAN_ID, "");
10984 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10986 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10988 ELEM_OPT_TLV(ANSI_A_E_HO_POW_LEV, "");
10990 ELEM_OPT_TV(ANSI_A_E_SID, "");
10992 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
10994 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS, "");
10996 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10998 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
11000 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
11002 switch (global_a_variant)
11004 case A_VARIANT_IOS501:
11005 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
11007 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
11009 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11011 ELEM_OPT_TLV(ANSI_A_E_AMPS_HHO_PARAM, "");
11013 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
11015 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
11019 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11026 bsmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11028 guint32 curr_offset;
11032 curr_offset = offset;
11035 ELEM_OPT_TV(ANSI_A_E_SO, "");
11037 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11044 bsmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11046 guint32 curr_offset;
11050 curr_offset = offset;
11053 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11055 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11062 bsmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11064 guint32 curr_offset;
11068 curr_offset = offset;
11071 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11073 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
11075 ELEM_OPT_TV(ANSI_A_E_CHAN_NUM, "");
11077 ELEM_OPT_TLV(ANSI_A_E_BAND_CLASS, "");
11079 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11081 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11088 bsmap_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11090 guint32 curr_offset;
11094 curr_offset = offset;
11097 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11099 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11101 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11103 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11110 bsmap_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11112 guint32 curr_offset;
11116 curr_offset = offset;
11119 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11121 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11128 bsmap_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11130 guint32 curr_offset;
11134 curr_offset = offset;
11137 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11139 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11141 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11148 bsmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11150 guint32 curr_offset;
11154 curr_offset = offset;
11157 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11159 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11166 bsmap_reset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11168 guint32 curr_offset;
11172 curr_offset = offset;
11175 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11177 ELEM_OPT_TLV(ANSI_A_E_SW_VER, "");
11179 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11186 bsmap_reset_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11188 guint32 curr_offset;
11192 curr_offset = offset;
11195 ELEM_OPT_TLV(ANSI_A_E_SW_VER, "");
11197 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11204 bsmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11206 guint32 curr_offset;
11210 curr_offset = offset;
11213 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11215 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11217 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11219 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11226 bsmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11228 guint32 curr_offset;
11232 curr_offset = offset;
11235 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11237 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11244 bsmap_xmode_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11246 guint32 curr_offset;
11250 curr_offset = offset;
11253 ELEM_MAND_TLV(ANSI_A_E_XMODE, "");
11255 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11262 bsmap_xmode_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11264 guint32 curr_offset;
11268 curr_offset = offset;
11271 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11273 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11280 bsmap_adds_page(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11282 guint32 curr_offset;
11286 curr_offset = offset;
11289 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11291 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART, "");
11293 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11295 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
11297 ELEM_OPT_TV(ANSI_A_E_SCI, "");
11299 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11301 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
11303 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
11305 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11307 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11314 bsmap_adds_transfer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11316 guint32 curr_offset;
11320 curr_offset = offset;
11323 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11325 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART, "");
11327 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11329 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
11331 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
11333 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
11335 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
11337 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
11339 ELEM_OPT_TLV(ANSI_A_E_CELL_ID, "");
11341 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
11343 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA, "");
11345 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11347 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
11349 ELEM_OPT_TV(ANSI_A_E_SCI, "");
11351 ELEM_OPT_TV(ANSI_A_E_SO, "");
11353 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
11355 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11357 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11359 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11361 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11368 bsmap_adds_transfer_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11370 guint32 curr_offset;
11374 curr_offset = offset;
11377 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11379 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11381 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11383 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11390 dtap_adds_deliver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11392 guint32 curr_offset;
11396 curr_offset = offset;
11399 ELEM_MAND_LV(ANSI_A_E_ADDS_USER_PART, "");
11401 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11403 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
11405 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11412 bsmap_adds_page_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11414 guint32 curr_offset;
11418 curr_offset = offset;
11421 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11423 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11425 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11427 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11429 ELEM_OPT_TLV(ANSI_A_E_CELL_ID, "");
11431 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11433 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11440 dtap_adds_deliver_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11442 guint32 curr_offset;
11446 curr_offset = offset;
11449 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11451 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11453 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11460 bsmap_rejection(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11462 guint32 curr_offset;
11466 curr_offset = offset;
11469 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11471 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11473 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11475 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11477 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11481 dtap_rejection(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11483 guint32 curr_offset;
11487 curr_offset = offset;
11490 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11492 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11494 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
11496 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11498 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11501 #define ANSI_A_IOS401_BSMAP_NUM_MSG (sizeof(ansi_a_ios401_bsmap_strings)/sizeof(ext_value_string_t))
11502 #define ANSI_A_IOS501_BSMAP_NUM_MSG (sizeof(ansi_a_ios501_bsmap_strings)/sizeof(ext_value_string_t))
11503 static gint ett_bsmap_msg[MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)];
11504 static void (*bsmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) =
11506 bsmap_add_srvc_noti, /* Additional Service Notification */
11507 bsmap_adds_page, /* ADDS Page */
11508 bsmap_adds_page_ack, /* ADDS Page Ack */
11509 bsmap_adds_transfer, /* ADDS Transfer */
11510 bsmap_adds_transfer_ack, /* ADDS Transfer Ack */
11511 bsmap_ass_complete, /* Assignment Complete */
11512 bsmap_ass_failure, /* Assignment Failure */
11513 bsmap_ass_req, /* Assignment Request */
11514 bsmap_auth_req, /* Authentication Request */
11515 bsmap_auth_resp, /* Authentication Response */
11516 NULL /* no BSMAP definition */, /* Base Station Challenge */
11517 NULL /* no BSMAP definition */, /* Base Station Challenge Response */
11518 bsmap_block, /* Block */
11519 bsmap_block_ack, /* Block Acknowledge */
11520 bsmap_bs_srvc_req, /* BS Service Request */
11521 bsmap_bs_srvc_resp, /* BS Service Response */
11522 bsmap_clr_command, /* Clear Command */
11523 bsmap_clr_complete, /* Clear Complete */
11524 bsmap_clr_req, /* Clear Request */
11525 bsmap_cl3_info, /* Complete Layer 3 Information */
11526 bsmap_feat_noti, /* Feature Notification */
11527 bsmap_feat_noti_ack, /* Feature Notification Ack */
11528 bsmap_ho_command, /* Handoff Command */
11529 NULL /* no associated data */, /* Handoff Commenced */
11530 bsmap_ho_complete, /* Handoff Complete */
11531 bsmap_ho_failure, /* Handoff Failure */
11532 bsmap_ho_performed, /* Handoff Performed */
11533 bsmap_ho_req, /* Handoff Request */
11534 bsmap_ho_req_ack, /* Handoff Request Acknowledge */
11535 bsmap_ho_reqd, /* Handoff Required */
11536 bsmap_ho_reqd_rej, /* Handoff Required Reject */
11537 bsmap_paca_command, /* PACA Command */
11538 bsmap_paca_command_ack, /* PACA Command Ack */
11539 bsmap_paca_update, /* PACA Update */
11540 bsmap_paca_update_ack, /* PACA Update Ack */
11541 bsmap_page_req, /* Paging Request */
11542 bsmap_priv_mode_command, /* Privacy Mode Command */
11543 bsmap_priv_mode_complete, /* Privacy Mode Complete */
11544 bsmap_rm_pos_req, /* Radio Measurements for Position Request */
11545 bsmap_rm_pos_resp, /* Radio Measurements for Position Response */
11546 bsmap_rejection, /* Rejection */
11547 bsmap_reg_req, /* Registration Request */
11548 bsmap_reset, /* Reset */
11549 bsmap_reset_ack, /* Reset Acknowledge */
11550 bsmap_reset_cct, /* Reset Circuit */
11551 bsmap_reset_cct_ack, /* Reset Circuit Acknowledge */
11552 NULL /* no BSMAP definition */, /* SSD Update Request */
11553 NULL /* no BSMAP definition */, /* SSD Update Response */
11554 bsmap_status_req, /* Status Request */
11555 bsmap_status_resp, /* Status Response */
11556 bsmap_xmode_ack, /* Transcoder Control Acknowledge */
11557 bsmap_xmode_req, /* Transcoder Control Request */
11558 bsmap_unblock, /* Unblock */
11559 bsmap_unblock_ack, /* Unblock Acknowledge */
11560 bsmap_user_zone_reject, /* User Zone Reject */
11561 bsmap_user_zone_update, /* User Zone Update */
11562 bsmap_bearer_upd_req, /* Bearer Update Request *//* IOS 5.0.1 */
11563 bsmap_bearer_upd_resp, /* Bearer Update Response *//* IOS 5.0.1 */
11564 bsmap_bearer_upd_reqd, /* Bearer Update Required *//* IOS 5.0.1 */
11565 bsmap_ms_reg_noti, /* Mobile Station Registered Notification *//* IOS 5.0.1 */
11566 bsmap_bs_auth_req, /* BS Authentication Request *//* IOS 5.0.1 */
11567 bsmap_bs_auth_req_ack, /* BS Authentication Request Ack *//* IOS 5.0.1 */
11571 #define ANSI_A_IOS401_DTAP_NUM_MSG (sizeof(ansi_a_ios401_dtap_strings)/sizeof(ext_value_string_t))
11572 #define ANSI_A_IOS501_DTAP_NUM_MSG (sizeof(ansi_a_ios501_dtap_strings)/sizeof(ext_value_string_t))
11573 static gint ett_dtap_msg[MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)];
11574 static void (*dtap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) =
11576 dtap_add_srvc_req, /* Additional Service Request */
11577 dtap_adds_deliver, /* ADDS Deliver */
11578 dtap_adds_deliver_ack, /* ADDS Deliver Ack */
11579 dtap_alert_with_info, /* Alert With Information */
11580 dtap_auth_req, /* Authentication Request */
11581 dtap_auth_resp, /* Authentication Response */
11582 dtap_bs_challenge, /* Base Station Challenge */
11583 dtap_bs_challenge_resp, /* Base Station Challenge Response */
11584 dtap_cm_srvc_req, /* CM Service Request */
11585 dtap_cm_srvc_req_cont, /* CM Service Request Continuation */
11586 dtap_connect, /* Connect */
11587 dtap_flash_with_info, /* Flash with Information */
11588 dtap_flash_with_info_ack, /* Flash with Information Ack */
11589 dtap_lu_accept, /* Location Updating Accept */
11590 dtap_lu_reject, /* Location Updating Reject */
11591 dtap_lu_req, /* Location Updating Request */
11592 dtap_page_resp, /* Paging Response */
11593 NULL /* no associated data */, /* Parameter Update Confirm */
11594 NULL /* no associated data */, /* Parameter Update Request */
11595 dtap_rejection, /* Rejection */
11596 dtap_progress, /* Progress */
11597 dtap_srvc_redirection, /* Service Redirection */
11598 dtap_srvc_release, /* Service Release */
11599 dtap_srvc_release_complete, /* Service Release Complete */
11600 dtap_ssd_update_req, /* SSD Update Request */
11601 dtap_ssd_update_resp, /* SSD Update Response */
11602 dtap_status_req, /* Status Request */
11603 dtap_status_resp, /* Status Response */
11604 dtap_user_zone_reject, /* User Zone Reject */
11605 dtap_user_zone_update, /* User Zone Update */
11606 dtap_user_zone_update_req, /* User Zone Update Request */
11610 /* Utillity function to dissect CDMA200 A1 elements in ANSI MAP messages */
11612 dissect_cdma2000_a1_elements(tvbuff_t *tvb, _U_ packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11614 guint32 curr_offset;
11620 curr_offset = offset;
11624 * require at least 2 octets for T(ype) and L(ength)
11626 while (curr_len > 1)
11629 * peeking at T(ype)
11631 oct = tvb_get_guint8(tvb, curr_offset);
11633 for (idx=0; idx < ansi_a_elem_1_max; idx++)
11635 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
11637 ELEM_OPT_TLV(idx, "");
11642 if (idx == ansi_a_elem_1_max)
11645 * didn't recognize the T(ype)
11646 * assuming it is in TLV form, step over
11648 consumed = 2 + tvb_get_guint8(tvb, curr_offset + 1);
11649 curr_offset += consumed;
11650 curr_len -= consumed;
11654 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11657 /* GENERIC DISSECTOR FUNCTIONS */
11660 dissect_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11662 static ansi_a_tap_rec_t tap_rec[16];
11663 static ansi_a_tap_rec_t *tap_p;
11664 static int tap_current=0;
11666 guint32 offset, saved_offset;
11669 proto_item *bsmap_item = NULL;
11670 proto_tree *bsmap_tree = NULL;
11671 const gchar *msg_str;
11674 col_append_str(pinfo->cinfo, COL_INFO, "(BSMAP) ");
11677 * set tap record pointer
11680 if (tap_current == array_length(tap_rec))
11684 tap_p = &tap_rec[tap_current];
11688 saved_offset = offset;
11693 len = tvb_length(tvb);
11696 * add BSMAP message name
11698 oct = tvb_get_guint8(tvb, offset++);
11700 msg_str = my_match_strval_idx((guint32) oct, ansi_a_bsmap_strings, &idx, &dec_idx);
11703 * create the a protocol tree
11705 if (msg_str == NULL)
11708 proto_tree_add_protocol_format(tree, proto_a_bsmap, tvb, 0, len,
11709 "ANSI A-I/F BSMAP - Unknown BSMAP Message Type (%u)",
11712 bsmap_tree = proto_item_add_subtree(bsmap_item, ett_bsmap);
11717 proto_tree_add_protocol_format(tree, proto_a_bsmap, tvb, 0, -1,
11718 "ANSI A-I/F BSMAP - %s",
11721 bsmap_tree = proto_item_add_subtree(bsmap_item, ett_bsmap_msg[dec_idx]);
11723 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
11727 * add BSMAP message name
11729 proto_tree_add_uint_format(bsmap_tree, hf_ansi_a_bsmap_msgtype,
11730 tvb, saved_offset, 1, oct, "Message Type");
11732 tap_p->pdu_type = BSSAP_PDU_TYPE_BSMAP;
11733 tap_p->message_type = oct;
11735 tap_queue_packet(ansi_a_tap, pinfo, tap_p);
11737 if (msg_str == NULL) return;
11739 if ((len - offset) <= 0) return;
11741 a_meid_configured = FALSE;
11746 if (bsmap_msg_fcn[dec_idx] == NULL)
11748 proto_tree_add_text(bsmap_tree,
11749 tvb, offset, len - offset,
11750 "Message Elements");
11754 (*bsmap_msg_fcn[dec_idx])(tvb, bsmap_tree, offset, len - offset);
11759 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11761 static ansi_a_tap_rec_t tap_rec[16];
11762 static ansi_a_tap_rec_t *tap_p;
11763 static int tap_current=0;
11765 guint32 offset, saved_offset;
11767 guint32 oct_1, oct_2;
11769 proto_item *dtap_item = NULL;
11770 proto_tree *dtap_tree = NULL;
11771 proto_item *oct_1_item = NULL;
11772 proto_tree *oct_1_tree = NULL;
11773 const gchar *msg_str;
11777 len = tvb_length(tvb);
11782 * too short to be DTAP
11784 call_dissector(data_handle, tvb, pinfo, tree);
11788 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
11791 * set tap record pointer
11794 if (tap_current == array_length(tap_rec))
11798 tap_p = &tap_rec[tap_current];
11802 saved_offset = offset;
11808 * get protocol discriminator
11810 oct_1 = tvb_get_guint8(tvb, offset++);
11811 oct_2 = tvb_get_guint8(tvb, offset++);
11814 * add DTAP message name
11816 saved_offset = offset;
11817 oct = tvb_get_guint8(tvb, offset++);
11819 msg_str = my_match_strval_idx((guint32) oct, ansi_a_dtap_strings, &idx, &dec_idx);
11822 * create the a protocol tree
11824 if (msg_str == NULL)
11827 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
11828 "ANSI A-I/F DTAP - Unknown DTAP Message Type (%u)",
11831 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap);
11836 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
11837 "ANSI A-I/F DTAP - %s",
11840 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg[dec_idx]);
11842 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
11848 switch (oct_1 & 0x0f)
11850 case 3: str = "Call Control, call related SS"; break;
11851 case 5: str = "Mobility Management"; break;
11852 case 6: str = "Radio Resource Management"; break;
11853 case 9: str = "Facility Management"; break;
11854 case 11: str = "Other Signaling Procedures"; break;
11855 case 15: str = "Reserved for tests"; break;
11862 proto_tree_add_text(dtap_tree,
11864 "Protocol Discriminator: %s",
11867 oct_1_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
11869 other_decode_bitfield_value(a_bigbuf, oct_1, 0xf0, 8);
11870 proto_tree_add_text(oct_1_tree,
11875 other_decode_bitfield_value(a_bigbuf, oct_1, 0x0f, 8);
11876 proto_tree_add_text(oct_1_tree,
11878 "%s : Protocol Discriminator: %u",
11885 switch (global_a_variant)
11887 case A_VARIANT_IS634:
11888 other_decode_bitfield_value(a_bigbuf, oct_2, 0x80, 8);
11889 proto_tree_add_text(dtap_tree,
11891 "%s : Transaction Identifier (TI) Flag: %s",
11893 ((oct_2 & 0x80) ? "allocated by receiver" : "allocated by sender"));
11895 other_decode_bitfield_value(a_bigbuf, oct_2, 0x70, 8);
11896 proto_tree_add_text(dtap_tree,
11898 "%s : Transaction Identifier (TI): %u",
11900 (oct_2 & 0x70) >> 4);
11902 other_decode_bitfield_value(a_bigbuf, oct_2, 0x0f, 8);
11903 proto_tree_add_text(dtap_tree,
11910 proto_tree_add_text(dtap_tree,
11917 * add DTAP message name
11919 proto_tree_add_uint_format(dtap_tree, hf_ansi_a_dtap_msgtype,
11920 tvb, saved_offset, 1, oct,
11923 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
11924 tap_p->message_type = oct;
11926 tap_queue_packet(ansi_a_tap, pinfo, tap_p);
11928 if (msg_str == NULL) return;
11930 if ((len - offset) <= 0) return;
11932 a_meid_configured = FALSE;
11937 if (dtap_msg_fcn[dec_idx] == NULL)
11939 proto_tree_add_text(dtap_tree,
11940 tvb, offset, len - offset,
11941 "Message Elements");
11945 (*dtap_msg_fcn[dec_idx])(tvb, dtap_tree, offset, len - offset);
11950 /* Register the protocol with Wireshark */
11952 proto_register_ansi_a(void)
11954 module_t *ansi_a_module;
11958 /* Setup list of header fields */
11960 static hf_register_info hf[] =
11962 { &hf_ansi_a_bsmap_msgtype,
11963 { "BSMAP Message Type", "ansi_a_bsmap.msgtype",
11964 FT_UINT8, BASE_HEX, NULL, 0x0,
11967 { &hf_ansi_a_dtap_msgtype,
11968 { "DTAP Message Type", "ansi_a_bsmap.dtap_msgtype",
11969 FT_UINT8, BASE_HEX, NULL, 0x0,
11972 { &hf_ansi_a_elem_id,
11973 { "Element ID", "ansi_a_bsmap.elem_id",
11974 FT_UINT8, BASE_DEC, NULL, 0,
11977 { &hf_ansi_a_length,
11978 { "Length", "ansi_a_bsmap.len",
11979 FT_UINT8, BASE_DEC, NULL, 0,
11983 { "Sub tree", "ansi_a_bsmap.none",
11984 FT_NONE, BASE_NONE, 0, 0,
11988 { "ESN", "ansi_a_bsmap.esn",
11989 FT_UINT32, BASE_HEX, 0, 0x0,
11993 { "IMSI", "ansi_a_bsmap.imsi",
11994 FT_STRING, BASE_NONE, 0, 0,
11998 { "MIN", "ansi_a_bsmap.min",
11999 FT_STRING, BASE_NONE, 0, 0,
12003 { "MEID", "ansi_a_bsmap.meid",
12004 FT_STRING, BASE_NONE, 0, 0,
12007 { &hf_ansi_a_cld_party_bcd_num,
12008 { "Called Party BCD Number", "ansi_a_bsmap.cld_party_bcd_num",
12009 FT_STRING, BASE_NONE, 0, 0,
12012 { &hf_ansi_a_clg_party_bcd_num,
12013 { "Calling Party BCD Number", "ansi_a_bsmap.clg_party_bcd_num",
12014 FT_STRING, BASE_NONE, 0, 0,
12017 { &hf_ansi_a_cld_party_ascii_num,
12018 { "Called Party ASCII Number", "ansi_a_bsmap.cld_party_ascii_num",
12019 FT_STRING, BASE_NONE, 0, 0,
12022 { &hf_ansi_a_clg_party_ascii_num,
12023 { "Calling Party ASCII Number", "ansi_a_bsmap.clg_party_ascii_num",
12024 FT_STRING, BASE_NONE, 0, 0,
12027 { &hf_ansi_a_cell_ci,
12028 { "Cell CI", "ansi_a_bsmap.cell_ci",
12029 FT_UINT16, BASE_HEX, 0, 0x0,
12032 { &hf_ansi_a_cell_lac,
12033 { "Cell LAC", "ansi_a_bsmap.cell_lac",
12034 FT_UINT16, BASE_HEX, 0, 0x0,
12037 { &hf_ansi_a_cell_mscid,
12038 { "Cell MSCID", "ansi_a_bsmap.cell_mscid",
12039 FT_UINT24, BASE_HEX, 0, 0x0,
12042 { &hf_ansi_a_pdsn_ip_addr,
12043 { "PDSN IP Address", "ansi_a_bsmap.pdsn_ip_addr",
12044 FT_IPv4, BASE_NONE, NULL, 0,
12045 "IP Address", HFILL }
12047 { &hf_ansi_a_s_pdsn_ip_addr,
12048 { "Source PDSN Address", "ansi_a_bsmap.s_pdsn_ip_addr",
12049 FT_IPv4, BASE_NONE, NULL, 0,
12050 "IP Address", HFILL }
12052 { &hf_ansi_a_anchor_ip_addr,
12053 { "Anchor PDSN Address", "ansi_a_bsmap.anchor_pdsn_ip_addr",
12054 FT_IPv4, BASE_NONE, NULL, 0,
12055 "IP Address", HFILL }
12057 { &hf_ansi_a_anchor_pp_ip_addr,
12058 { "Anchor P-P Address", "ansi_a_bsmap.anchor_pp_ip_addr",
12059 FT_IPv4, BASE_NONE, NULL, 0,
12060 "IP Address", HFILL }
12062 { &hf_ansi_a_a2p_bearer_ipv4_addr,
12063 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv4_addr",
12064 FT_IPv4, BASE_NONE, NULL, 0,
12067 { &hf_ansi_a_a2p_bearer_ipv6_addr,
12068 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv6_addr",
12069 FT_IPv6, BASE_NONE, NULL, 0,
12072 { &hf_ansi_a_a2p_bearer_udp_port,
12073 { "A2p Bearer UDP Port", "ansi_a_bsmap.a2p_bearer_udp_port",
12074 FT_UINT16, BASE_DEC, NULL, 0,
12078 { "Service Option", "ansi_a_bsmap.so",
12079 FT_UINT16, BASE_DEC, NULL, 0,
12082 { &hf_ansi_a_cause_1,
12083 { "Cause", "ansi_a_bsmap.cause_1",
12084 FT_UINT8, BASE_DEC, NULL, 0,
12087 { &hf_ansi_a_cause_2,
12088 { "Cause", "ansi_a_bsmap.cause_2",
12089 FT_UINT16, BASE_DEC, NULL, 0,
12092 { &hf_ansi_a_meid_configured,
12093 { "Is MEID configured", "ansi_a_bsmap.meid_configured",
12094 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
12099 static enum_val_t a_variant_options[] = {
12100 { "is-634-rev0", "IS-634 rev. 0", A_VARIANT_IS634 },
12101 { "tsb-80", "TSB-80", A_VARIANT_TSB80 },
12102 { "is-634-a", "IS-634-A", A_VARIANT_IS634A },
12103 { "ios-2.x", "IOS 2.x", A_VARIANT_IOS2 },
12104 { "ios-3.x", "IOS 3.x", A_VARIANT_IOS3 },
12105 { "ios-4.0.1", "IOS 4.0.1", A_VARIANT_IOS401 },
12106 { "ios-5.0.1", "IOS 5.0.1", A_VARIANT_IOS501 },
12111 /* Setup protocol subtree array */
12112 #define MAX_NUM_DTAP_MSG MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)
12113 #define MAX_NUM_BSMAP_MSG MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)
12114 #define MAX_NUM_ELEM_1 MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)
12115 #define NUM_INDIVIDUAL_ELEMS 18
12117 gint ett_len = (NUM_INDIVIDUAL_ELEMS+MAX_NUM_DTAP_MSG+MAX_NUM_BSMAP_MSG+MAX_NUM_ELEM_1+NUM_FWD_MS_INFO_REC+NUM_REV_MS_INFO_REC) * sizeof(gint *);
12120 * XXX - at least one version of the HP C compiler apparently doesn't
12121 * recognize constant expressions using the "?" operator as being
12122 * constant expressions, so you can't use the expression that
12123 * initializes "ett_let" as an array size. Therefore, we dynamically
12124 * allocate the array instead.
12126 ett = (gint **) g_malloc(ett_len);
12128 memset((void *) ett_dtap_msg, -1, sizeof(ett_dtap_msg));
12129 memset((void *) ett_bsmap_msg, -1, sizeof(ett_bsmap_msg));
12130 memset((void *) ett_ansi_elem_1, -1, sizeof(ett_ansi_elem_1));
12131 memset((void *) ett_ansi_fwd_ms_info_rec, -1, sizeof(gint) * NUM_FWD_MS_INFO_REC);
12132 memset((void *) ett_ansi_rev_ms_info_rec, -1, sizeof(gint) * NUM_REV_MS_INFO_REC);
12134 ett[0] = &ett_bsmap;
12135 ett[1] = &ett_dtap;
12136 ett[2] = &ett_elems;
12137 ett[3] = &ett_elem;
12138 ett[4] = &ett_dtap_oct_1;
12139 ett[5] = &ett_cm_srvc_type;
12140 ett[6] = &ett_ansi_ms_info_rec_reserved;
12141 ett[7] = &ett_ansi_enc_info;
12142 ett[8] = &ett_cell_list;
12143 ett[9] = &ett_bearer_list;
12144 ett[10] = &ett_re_list;
12145 ett[11] = &ett_so_list;
12146 ett[12] = &ett_scm;
12147 ett[13] = &ett_adds_user_part;
12148 ett[14] = &ett_scr;
12149 ett[15] = &ett_srvc_con_rec;
12150 ett[16] = &ett_cm2_band_class;
12151 ett[17] = &ett_vp_algs;
12153 last_offset = NUM_INDIVIDUAL_ELEMS;
12155 for (i=0; i < MAX_NUM_DTAP_MSG; i++, last_offset++)
12157 ett[last_offset] = &ett_dtap_msg[i];
12160 for (i=0; i < MAX_NUM_BSMAP_MSG; i++, last_offset++)
12162 ett[last_offset] = &ett_bsmap_msg[i];
12165 for (i=0; i < MAX_NUM_ELEM_1; i++, last_offset++)
12167 ett[last_offset] = &ett_ansi_elem_1[i];
12170 for (i=0; i < NUM_FWD_MS_INFO_REC; i++, last_offset++)
12172 ett[last_offset] = &ett_ansi_fwd_ms_info_rec[i];
12175 for (i=0; i < NUM_REV_MS_INFO_REC; i++, last_offset++)
12177 ett[last_offset] = &ett_ansi_rev_ms_info_rec[i];
12180 /* Register the protocol name and description */
12183 proto_register_protocol("ANSI A-I/F BSMAP", "ANSI BSMAP", "ansi_a_bsmap");
12185 proto_register_field_array(proto_a_bsmap, hf, array_length(hf));
12188 proto_register_protocol("ANSI A-I/F DTAP", "ANSI DTAP", "ansi_a_dtap");
12190 is637_dissector_table =
12191 register_dissector_table("ansi_a.sms", "IS-637-A (SMS)",
12192 FT_UINT8, BASE_DEC);
12194 is683_dissector_table =
12195 register_dissector_table("ansi_a.ota", "IS-683-A (OTA)",
12196 FT_UINT8, BASE_DEC);
12198 is801_dissector_table =
12199 register_dissector_table("ansi_a.pld", "IS-801 (PLD)",
12200 FT_UINT8, BASE_DEC);
12202 proto_register_subtree_array(ett, ett_len / (int)sizeof(gint *));
12204 ansi_a_tap = register_tap("ansi_a");
12207 * setup for preferences
12209 ansi_a_module = prefs_register_protocol(proto_a_bsmap, proto_reg_handoff_ansi_a);
12211 prefs_register_enum_preference(ansi_a_module,
12214 "(if other than the default of IOS 4.0.1)",
12224 proto_reg_handoff_ansi_a(void)
12226 static gboolean ansi_a_prefs_initialized = FALSE;
12228 if (!ansi_a_prefs_initialized)
12230 dissector_handle_t bsmap_handle;
12231 bsmap_handle = create_dissector_handle(dissect_bsmap, proto_a_bsmap);
12232 dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
12233 data_handle = find_dissector("data");
12234 rtp_handle = find_dissector("rtp");
12236 dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
12237 dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
12239 ansi_a_prefs_initialized = TRUE;
12242 switch (global_a_variant)
12244 case A_VARIANT_IOS501:
12245 ansi_a_bsmap_strings = ansi_a_ios501_bsmap_strings;
12246 ansi_a_dtap_strings = ansi_a_ios501_dtap_strings;
12247 ansi_a_elem_1_strings = ansi_a_ios501_elem_1_strings;
12248 ansi_a_elem_1_max = MAX_IOS501_NUM_ELEM_1;
12252 ansi_a_bsmap_strings = ansi_a_ios401_bsmap_strings;
12253 ansi_a_dtap_strings = ansi_a_ios401_dtap_strings;
12254 ansi_a_elem_1_strings = ansi_a_ios401_elem_1_strings;
12255 ansi_a_elem_1_max = MAX_IOS401_NUM_ELEM_1;