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.
44 #include <epan/packet.h>
45 #include <epan/prefs.h>
47 #include <epan/strutil.h>
48 #include <epan/emem.h>
49 #include <epan/expert.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;
661 static int ansi_a_tap = -1;
663 static int hf_ansi_a_none = -1;
664 static int hf_ansi_a_bsmap_msgtype = -1;
665 static int hf_ansi_a_dtap_msgtype = -1;
666 static int hf_ansi_a_length = -1;
667 static int hf_ansi_a_elem_id = -1;
668 static int hf_ansi_a_esn = -1;
669 static int hf_ansi_a_imsi = -1;
670 static int hf_ansi_a_min = -1;
671 static int hf_ansi_a_meid = -1;
672 static int hf_ansi_a_cld_party_bcd_num = -1;
673 static int hf_ansi_a_clg_party_bcd_num = -1;
674 static int hf_ansi_a_cld_party_ascii_num = -1;
675 static int hf_ansi_a_clg_party_ascii_num = -1;
676 static int hf_ansi_a_cell_ci = -1;
677 static int hf_ansi_a_cell_lac = -1;
678 static int hf_ansi_a_cell_mscid = -1;
679 static int hf_ansi_a_pdsn_ip_addr = -1;
680 static int hf_ansi_a_s_pdsn_ip_addr = -1;
681 static int hf_ansi_a_anchor_ip_addr = -1;
682 static int hf_ansi_a_anchor_pp_ip_addr = -1;
683 static int hf_ansi_a_a2p_bearer_ipv4_addr = -1;
684 static int hf_ansi_a_a2p_bearer_ipv6_addr = -1;
685 static int hf_ansi_a_a2p_bearer_udp_port = -1;
686 static int hf_ansi_a_so = -1;
687 static int hf_ansi_a_cause_1 = -1; /* 1 octet cause */
688 static int hf_ansi_a_cause_2 = -1; /* 2 octet cause */
689 static int hf_ansi_a_meid_configured = -1;
692 /* Initialize the subtree pointers */
693 static gint ett_bsmap = -1;
694 static gint ett_dtap = -1;
695 static gint ett_elems = -1;
696 static gint ett_elem = -1;
697 static gint ett_dtap_oct_1 = -1;
698 static gint ett_cm_srvc_type = -1;
699 static gint ett_ansi_ms_info_rec_reserved = -1;
700 static gint ett_ansi_enc_info = -1;
701 static gint ett_scm = -1;
702 static gint ett_cell_list = -1;
703 static gint ett_bearer_list = -1;
704 static gint ett_re_list = -1;
705 static gint ett_so_list = -1;
706 static gint ett_adds_user_part = -1;
707 static gint ett_scr = -1;
708 static gint ett_srvc_con_rec = -1;
709 static gint ett_cm2_band_class = -1;
710 static gint ett_vp_algs = -1;
712 static char a_bigbuf[1024];
713 static dissector_handle_t rtp_handle=NULL;
714 static dissector_handle_t data_handle;
715 static dissector_handle_t dtap_handle;
716 static dissector_table_t is637_dissector_table; /* IS-637-A Transport Layer (SMS) */
717 static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */
718 static dissector_table_t is801_dissector_table; /* IS-801 (PLD) */
719 static proto_tree *g_tree;
720 static address rtp_src_addr;
721 static guint32 rtp_ipv4_addr;
722 static struct e_in6_addr rtp_ipv6_addr;
723 static guint16 rtp_port;
724 static gboolean a_meid_configured = FALSE;
727 typedef struct ansi_a_dgt_set_t
730 * would typically be 15 but to allow MEID decoding this
731 * needs to have room for full hexadecimal representation
733 unsigned char out[16];
738 * As per A.S0001 Called Party BCD Number
740 static ansi_a_dgt_set_t Dgt_tbcd = {
742 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
743 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c', 0
747 static ansi_a_dgt_set_t Dgt_msid = {
749 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
750 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?', 0
754 static ansi_a_dgt_set_t Dgt_meid = {
756 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
757 '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
764 * Unpack BCD input pattern into output ASCII pattern
766 * Input Pattern is supplied using the same format as the digits
768 * Returns: length of unpacked pattern
772 char *out, /* ASCII pattern out */
773 guchar *in, /* packed pattern in */
774 int num_octs, /* Number of octets to unpack */
775 ansi_a_dgt_set_t *dgt /* Digit definitions */
784 * unpack first value in byte
787 *out++ = dgt->out[i & 0x0f];
791 * unpack second value in byte
795 if ((num_octs == 1) && (i == 0x0f)) /* odd number bytes - hit filler */
798 *out++ = dgt->out[i];
809 ansi_a_so_int_to_str(
812 const gchar *str = NULL;
816 case 1: str = "Basic Variable Rate Voice Service (8 kbps)"; break;
817 case 2: str = "Mobile Station Loopback (8 kbps)"; break;
818 case 3: str = "(EVRC) Enhanced Variable Rate Voice Service (8 kbps)"; break;
819 case 4: str = "Asynchronous Data Service (9.6 kbps)"; break;
820 case 5: str = "Group 3 Facsimile (9.6 kbps)"; break;
821 case 6: str = "Short Message Services (Rate Set 1)"; break;
822 case 7: str = "Packet Data Service: Internet or ISO Protocol Stack (9.6 kbps)"; break;
823 case 8: str = "Packet Data Service: CDPD Protocol Stack (9.6 kbps)"; break;
824 case 9: str = "Mobile Station Loopback (13 kbps)"; break;
825 case 10: str = "STU-III Transparent Service"; break;
826 case 11: str = "STU-III Non-Transparent Service"; break;
827 case 12: str = "Asynchronous Data Service (14.4 or 9.6 kbps)"; break;
828 case 13: str = "Group 3 Facsimile (14.4 or 9.6 kbps)"; break;
829 case 14: str = "Short Message Services (Rate Set 2)"; break;
830 case 15: str = "Packet Data Service: Internet or ISO Protocol Stack (14.4 kbps)"; break;
831 case 16: str = "Packet Data Service: CDPD Protocol Stack (14.4 kbps)"; break;
832 case 17: str = "High Rate Voice Service (13 kbps)"; break;
833 case 32768: str = "QCELP (13 kbps)"; break;
834 case 32798: /* 0x801e */ str = "Qualcomm Loopback"; break;
835 case 32799: /* 0x801f */ str = "Qualcomm Markov 8 kbps Loopback"; break;
836 case 32800: /* 0x8020 */ str = "Qualcomm Packet Data"; break;
837 case 32801: /* 0x8021 */ str = "Qualcomm Async Data"; break;
838 case 18: str = "Over-the-Air Parameter Administration (Rate Set 1)"; break;
839 case 19: str = "Over-the-Air Parameter Administration (Rate Set 2)"; break;
840 case 20: str = "Group 3 Analog Facsimile (Rate Set 1)"; break;
841 case 21: str = "Group 3 Analog Facsimile (Rate Set 2)"; break;
842 case 22: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS1 reverse)"; break;
843 case 23: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS2 reverse)"; break;
844 case 24: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS1 reverse)"; break;
845 case 25: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS2 reverse)"; break;
846 case 26: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS1 reverse)"; break;
847 case 27: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS2 reverse)"; break;
848 case 28: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS1 reverse)"; break;
849 case 29: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS2 reverse)"; break;
850 case 30: str = "Supplemental Channel Loopback Test for Rate Set 1"; break;
851 case 31: str = "Supplemental Channel Loopback Test for Rate Set 2"; break;
852 case 32: str = "Test Data Service Option (TDSO)"; break;
853 case 33: str = "cdma2000 High Speed Packet Data Service, Internet or ISO Protocol Stack"; break;
854 case 34: str = "cdma2000 High Speed Packet Data Service, CDPD Protocol Stack"; break;
855 case 35: str = "Location Services (PDS), Rate Set 1 (9.6 kbps)"; break;
856 case 36: str = "Location Services (PDS), Rate Set 2 (14.4 kbps)"; break;
857 case 37: str = "ISDN Interworking Service (64 kbps)"; break;
858 case 38: str = "GSM Voice"; break;
859 case 39: str = "GSM Circuit Data"; break;
860 case 40: str = "GSM Packet Data"; break;
861 case 41: str = "GSM Short Message Service"; break;
862 case 42: str = "None Reserved for MC-MAP standard service options"; break;
863 case 54: str = "Markov Service Option (MSO)"; break;
864 case 55: str = "Loopback Service Option (LSO)"; break;
865 case 56: str = "Selectable Mode Vocoder"; break;
866 case 57: str = "32 kbps Circuit Video Conferencing"; break;
867 case 58: str = "64 kbps Circuit Video Conferencing"; break;
868 case 59: str = "HRPD Accounting Records Identifier"; break;
869 case 60: str = "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Removal"; break;
870 case 61: str = "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Compression"; break;
871 case 62: str = "- 4099 None Reserved for standard service options"; break;
872 case 68: str = "(EVRC-B NB) Enhanced Variable Rate Voice Service"; break;
873 case 70: str = "(EVRC-B WB) Enhanced Variable Rate Voice Service"; break;
874 case 73: str = "(EVRC-NW) Enhanced Variable Rate Voice Service"; break;
875 case 4100: str = "Asynchronous Data Service, Revision 1 (9.6 or 14.4 kbps)"; break;
876 case 4101: str = "Group 3 Facsimile, Revision 1 (9.6 or 14.4 kbps)"; break;
877 case 4102: str = "Reserved for standard service option"; break;
878 case 4103: str = "Packet Data Service: Internet or ISO Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
879 case 4104: str = "Packet Data Service: CDPD Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
881 if ((so >= 4105) && (so <= 32767)) { str = "Reserved for standard service options"; }
882 else if ((so >= 32769) && (so <= 32771)) { str = "Proprietary QUALCOMM Incorporated"; }
883 else if ((so >= 32772) && (so <= 32775)) { str = "Proprietary OKI Telecom"; }
884 else if ((so >= 32776) && (so <= 32779)) { str = "Proprietary Lucent Technologies"; }
885 else if ((so >= 32780) && (so <=32783)) { str = "Nokia"; }
886 else if ((so >= 32784) && (so <=32787)) { str = "NORTEL NETWORKS"; }
887 else if ((so >= 32788) && (so <=32791)) { str = "Sony Electronics Inc."; }
888 else if ((so >= 32792) && (so <=32795)) { str = "Motorola"; }
889 else if ((so >= 32796) && (so <=32799)) { str = "QUALCOMM Incorporated"; }
890 else if ((so >= 32800) && (so <=32803)) { str = "QUALCOMM Incorporated"; }
891 else if ((so >= 32804) && (so <=32807)) { str = "QUALCOMM Incorporated"; }
892 else if ((so >= 32808) && (so <=32811)) { str = "QUALCOMM Incorporated"; }
893 else if ((so >= 32812) && (so <=32815)) { str = "Lucent Technologies"; }
894 else if ((so >= 32816) && (so <=32819)) { str = "Denso International"; }
895 else if ((so >= 32820) && (so <=32823)) { str = "Motorola"; }
896 else if ((so >= 32824) && (so <=32827)) { str = "Denso International"; }
897 else if ((so >= 32828) && (so <=32831)) { str = "Denso International"; }
898 else if ((so >= 32832) && (so <=32835)) { str = "Denso International"; }
899 else if ((so >= 32836) && (so <=32839)) { str = "NEC America"; }
900 else if ((so >= 32840) && (so <=32843)) { str = "Samsung Electronics"; }
901 else if ((so >= 32844) && (so <=32847)) { str = "Texas Instruments Incorporated"; }
902 else if ((so >= 32848) && (so <=32851)) { str = "Toshiba Corporation"; }
903 else if ((so >= 32852) && (so <=32855)) { str = "LG Electronics Inc."; }
904 else if ((so >= 32856) && (so <=32859)) { str = "VIA Telecom Inc."; }
905 else { str = "Reserved"; }
913 /* ELEMENT FUNCTIONS */
915 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
916 if ((edc_len) > (edc_max_len)) \
918 proto_tree_add_text(tree, tvb, \
919 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
920 curr_offset += ((edc_len) - (edc_max_len)); \
923 #define EXTRANEOUS_DATA_CHECK_EXPERT(edc_len, edc_max_len) \
924 if ((edc_len) > (edc_max_len)) \
926 proto_item *expert_item; \
927 expert_item = proto_tree_add_text(tree, tvb, \
928 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data, dissector bug or later version spec(report to wireshark.org)"); \
929 expert_add_info_format(pinfo, expert_item, PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)"); \
930 curr_offset += ((edc_len) - (edc_max_len)); \
933 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
934 if ((sdc_len) < (sdc_min_len)) \
936 proto_tree_add_text(tree, tvb, \
937 curr_offset, (sdc_len), "Short Data (?)"); \
938 curr_offset += (sdc_len); \
939 return(curr_offset - offset); \
942 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
943 if ((edc_len) != (edc_eq_len)) \
945 proto_tree_add_text(tree, tvb, \
946 asn1->offset, (edc_len), "Unexpected Data Length"); \
947 asn1->offset += (edc_len); \
951 #define NO_MORE_DATA_CHECK(nmdc_len) \
952 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
959 elem_chan_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
964 curr_offset = offset;
966 value = tvb_get_ntohs(tvb, curr_offset);
968 switch (global_a_variant)
970 case A_VARIANT_IOS401:
971 proto_tree_add_text(tree,
973 "Channel Number: %u",
976 g_snprintf(add_string, string_len, " - (%u)", value);
979 case A_VARIANT_IOS501:
980 other_decode_bitfield_value(a_bigbuf, value >> 8, 0xf8, 8);
981 proto_tree_add_text(tree,
986 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x07, 8);
987 proto_tree_add_text(tree, tvb, curr_offset, 1,
988 "%s : ARFCN (MSB): %u",
992 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
993 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
997 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value & 0x07ff);
1003 /* no length check possible */
1005 return(curr_offset - offset);
1012 elem_chan_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1015 guint32 curr_offset;
1016 const gchar *str = NULL;
1019 curr_offset = offset;
1022 oct = tvb_get_guint8(tvb, curr_offset);
1026 case 0: str = "No Alert"; break;
1027 case 1: str = "Speech"; break;
1028 case 2: str = "Data"; data = TRUE; break;
1029 case 3: str = "Signaling"; break;
1035 proto_tree_add_text(tree,
1036 tvb, curr_offset, 1,
1037 "Speech or Data Indicator: %s",
1040 g_snprintf(add_string, string_len, " - (%s)", str);
1044 NO_MORE_DATA_CHECK(len);
1046 oct = tvb_get_guint8(tvb, curr_offset);
1050 case 0: str = "Reserved (invalid)"; break;
1051 case 1: str = "DCCH"; break;
1052 case 2: str = "Reserved for future use (invalid)"; break;
1053 case 8: str = "Full rate TCH channel Bm"; break;
1054 case 9: str = "Half rate TCH channel Lm"; break;
1060 proto_tree_add_text(tree,
1061 tvb, curr_offset, 1,
1062 "Channel Rate and Type: %s",
1067 NO_MORE_DATA_CHECK(len);
1069 oct = tvb_get_guint8(tvb, curr_offset);
1073 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1074 proto_tree_add_text(tree,
1075 tvb, curr_offset, 1,
1079 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1080 proto_tree_add_text(tree,
1081 tvb, curr_offset, 1,
1082 "%s : %sTransparent service",
1084 (oct & 0x40) ? "Non-" : "");
1086 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
1087 proto_tree_add_text(tree,
1088 tvb, curr_offset, 1,
1096 case 0: str = "No Resources Required (invalid)"; break;
1097 case 1: str = "Reserved"; break;
1098 case 2: str = "Reserved"; break;
1099 case 3: str = "TIA/EIA-IS-2000 8 kb/s vocoder"; break;
1100 case 4: str = "8 kb/s enhanced vocoder (EVRC)"; break;
1101 case 5: str = "13 kb/s vocoder"; break;
1102 case 6: str = "ADPCM"; break;
1108 proto_tree_add_text(tree,
1109 tvb, curr_offset, 1,
1110 "Speech Encoding Algorithm/data rate + Transparency Indicator: %s",
1116 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1118 return(curr_offset - offset);
1125 elem_return_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1129 guint32 curr_offset;
1131 curr_offset = offset;
1133 oct = tvb_get_guint8(tvb, curr_offset);
1135 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1136 proto_tree_add_text(tree, tvb, curr_offset, 1,
1142 case 0: str = "Normal access"; break;
1143 case 1: str = "Service redirection failed as a result of system not found"; break;
1144 case 2: str = "Service redirection failed as a result of protocol mismatch"; break;
1145 case 3: str = "Service redirection failed as a result of registration rejection"; break;
1146 case 4: str = "Service redirection failed as a result of wrong SID"; break;
1147 case 5: str = "Service redirection failed as a result of wrong NID"; break;
1153 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1154 proto_tree_add_text(tree, tvb, curr_offset, 1,
1155 "%s : Return Cause: %s",
1161 /* no length check possible */
1163 return(curr_offset - offset);
1170 elem_rf_chan_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
1174 guint32 curr_offset;
1176 curr_offset = offset;
1178 proto_tree_add_text(tree, tvb, curr_offset, 1,
1183 oct = tvb_get_guint8(tvb, curr_offset);
1185 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1186 proto_tree_add_text(tree, tvb, curr_offset, 1,
1190 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1191 proto_tree_add_text(tree, tvb, curr_offset, 1,
1195 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1196 proto_tree_add_text(tree, tvb, curr_offset, 1,
1197 "%s : ANSI/EIA/TIA-553",
1202 oct = tvb_get_guint8(tvb, curr_offset);
1204 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1205 proto_tree_add_text(tree, tvb, curr_offset, 1,
1209 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1210 proto_tree_add_text(tree, tvb, curr_offset, 1,
1211 "%s : Timeslot Number",
1216 value = tvb_get_ntohs(tvb, curr_offset);
1218 other_decode_bitfield_value(a_bigbuf, value >> 8, 0xf8, 8);
1219 proto_tree_add_text(tree, tvb, curr_offset, 1,
1223 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x07, 8);
1224 proto_tree_add_text(tree, tvb, curr_offset, 1,
1225 "%s : ARFCN (MSB): %u",
1229 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1230 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
1234 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value & 0x07ff);
1238 /* no length check possible */
1240 return(curr_offset - offset);
1247 elem_sr_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1250 guint32 curr_offset;
1252 curr_offset = offset;
1254 oct = tvb_get_guint8(tvb, curr_offset);
1256 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
1257 proto_tree_add_text(tree,
1258 tvb, curr_offset, 1,
1262 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1263 proto_tree_add_text(tree,
1264 tvb, curr_offset, 1,
1269 g_snprintf(add_string, string_len, " - (%u)", oct);
1273 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1275 return(curr_offset - offset);
1282 elem_sid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
1285 guint32 curr_offset;
1287 curr_offset = offset;
1289 value = tvb_get_ntohs(tvb, curr_offset);
1291 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x80, 8);
1292 proto_tree_add_text(tree, tvb, curr_offset, 1,
1296 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x7f, 8);
1297 proto_tree_add_text(tree, tvb, curr_offset, 1,
1298 "%s : SID (MSB), %u",
1302 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1303 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
1307 g_snprintf(add_string, string_len, " - (SID: %u)", value & 0x7fff);
1311 /* no length check possible */
1313 return(curr_offset - offset);
1320 elem_is95_chan_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1324 guint32 curr_offset;
1326 curr_offset = offset;
1328 oct = tvb_get_guint8(tvb, curr_offset);
1330 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1331 proto_tree_add_text(tree, tvb, curr_offset, 1,
1332 "%s : Hard Handoff",
1335 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1336 proto_tree_add_text(tree, tvb, curr_offset, 1,
1337 "%s : Number of Channels to Add: %u",
1341 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1342 proto_tree_add_text(tree, tvb, curr_offset, 1,
1343 "%s : Frame Offset: (%u), %.2f ms",
1346 (oct & 0x0f) * 1.25);
1350 NO_MORE_DATA_CHECK(len);
1352 SHORT_DATA_CHECK(len - (curr_offset - offset), 4);
1356 oct = tvb_get_guint8(tvb, curr_offset);
1358 proto_tree_add_text(tree, tvb, curr_offset, 1,
1359 "Walsh Code Channel Index: %u",
1364 oct = tvb_get_guint8(tvb, curr_offset);
1366 other_decode_bitfield_value(a_bigbuf, oct, 0xff, 8);
1367 proto_tree_add_text(tree, tvb, curr_offset, 1,
1368 "%s : Pilot PN Code (LSB)",
1374 oct = tvb_get_guint8(tvb, curr_offset);
1375 value |= ((guint32) (oct & 0x80)) << 1;
1377 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1378 proto_tree_add_text(tree, tvb, curr_offset, 1,
1379 "%s : Pilot PN Code (MSB): %u",
1383 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1384 proto_tree_add_text(tree, tvb, curr_offset, 1,
1385 "%s : Power Combined",
1388 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1389 proto_tree_add_text(tree, tvb, curr_offset, 1,
1390 "%s : Frequency Included",
1393 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1394 proto_tree_add_text(tree, tvb, curr_offset, 1,
1398 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
1400 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1401 proto_tree_add_text(tree, tvb, curr_offset, 1,
1402 "%s : ARFCN (MSB): %u",
1408 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1409 proto_tree_add_text(tree, tvb, curr_offset, 1,
1413 if (add_string[0] == '\0')
1415 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value);
1420 while ((len - (curr_offset - offset)) >= 4);
1422 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1424 return(curr_offset - offset);
1436 elem_enc_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1440 guint32 curr_offset;
1443 proto_tree *subtree;
1446 curr_offset = offset;
1450 while ((len - (curr_offset - offset)) >= 2)
1454 oct = tvb_get_guint8(tvb, curr_offset);
1456 switch ((oct & 0x7c) >> 2)
1458 case 0: str = "Not Used - Invalid value"; break;
1459 case 1: str = "SME Key: Signaling Message Encryption Key"; break;
1460 case 2: str = "Reserved (VPM: Voice Privacy Mask)"; break;
1461 case 3: str = "Reserved"; break;
1462 case 4: str = "Private Longcode"; break;
1463 case 5: str = "Data Key (ORYX)"; break;
1464 case 6: str = "Initial RAND"; break;
1471 proto_tree_add_text(tree,
1472 tvb, curr_offset, 1,
1473 "Encryption Info [%u]: (%u) %s",
1478 subtree = proto_item_add_subtree(item, ett_ansi_enc_info);
1480 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1481 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1485 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
1486 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1487 "%s : Encryption Parameter Identifier: (%u) %s",
1492 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1493 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1496 (oct & 0x02) ? "active" : "inactive");
1498 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1499 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1500 "%s : Available: algorithm is %savailable",
1502 (oct & 0x01) ? "" : "not ");
1506 oct_len = tvb_get_guint8(tvb, curr_offset);
1508 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
1509 curr_offset, 1, oct_len);
1515 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
1517 proto_tree_add_text(subtree, tvb, curr_offset, oct_len,
1518 "Encryption Parameter value");
1520 curr_offset += oct_len;
1524 g_snprintf(add_string, string_len, " - %u record%s",
1525 num_recs, plurality(num_recs, "", "s"));
1527 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1529 return(curr_offset - offset);
1534 * NO ASSOCIATED DATA
1546 elem_cm_info_type_2(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1549 guint8 num_bands, band_class_count;
1550 guint32 curr_offset;
1552 proto_tree *subtree;
1556 curr_offset = offset;
1558 oct = tvb_get_guint8(tvb, curr_offset);
1560 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
1561 proto_tree_add_text(tree, tvb, curr_offset, 1,
1562 "%s : Mobile P_REV: %u",
1566 g_snprintf(add_string, string_len, " - P_REV (%u)", (oct & 0xe0) >> 5);
1568 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1569 proto_tree_add_text(tree, tvb, curr_offset, 1,
1573 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1574 proto_tree_add_text(tree, tvb, curr_offset, 1,
1575 "%s : See List of Entries",
1580 case 0: str = "Class 1, vehicle and portable"; break;
1581 case 1: str = "Class 2, portable"; break;
1582 case 2: str = "Class 3, handheld"; break;
1583 case 3: str = "Class 4, handheld"; break;
1584 case 4: str = "Class 5, handheld"; break;
1585 case 5: str = "Class 6, handheld"; break;
1586 case 6: str = "Class 7, handheld"; break;
1588 str = "Class 8, handheld";
1592 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1593 proto_tree_add_text(tree, tvb, curr_offset, 1,
1594 "%s : RF Power Capability: %s",
1600 proto_tree_add_text(tree, tvb, curr_offset, 1,
1605 oct = tvb_get_guint8(tvb, curr_offset);
1607 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1608 proto_tree_add_text(tree, tvb, curr_offset, 1,
1609 "%s : NAR_AN_CAP: N-AMPS %ssupported",
1611 (oct & 0x80) ? "" : "not ");
1613 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1614 proto_tree_add_text(tree, tvb, curr_offset, 1,
1615 "%s : IS-95: %ssupported",
1617 (oct & 0x40) ? "" : "not ");
1619 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1620 proto_tree_add_text(tree, tvb, curr_offset, 1,
1621 "%s : Slotted: mobile is %sin slotted mode",
1623 (oct & 0x20) ? "" : "not ");
1625 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1626 proto_tree_add_text(tree, tvb, curr_offset, 1,
1630 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1631 proto_tree_add_text(tree, tvb, curr_offset, 1,
1632 "%s : DTX: mobile is %scapable of DTX",
1634 (oct & 0x04) ? "" : "not ");
1636 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1637 proto_tree_add_text(tree, tvb, curr_offset, 1,
1638 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1640 (oct & 0x02) ? "" : "not ");
1642 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1643 proto_tree_add_text(tree, tvb, curr_offset, 1,
1649 NO_MORE_DATA_CHECK(len);
1651 proto_tree_add_text(tree, tvb, curr_offset, 1,
1656 NO_MORE_DATA_CHECK(len);
1658 oct = tvb_get_guint8(tvb, curr_offset);
1660 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1661 proto_tree_add_text(tree, tvb, curr_offset, 1,
1665 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1666 proto_tree_add_text(tree, tvb, curr_offset, 1,
1667 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1669 (oct & 0x02) ? "" : "not ");
1671 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1672 proto_tree_add_text(tree, tvb, curr_offset, 1,
1673 "%s : PACA Supported Indicator (PSI): mobile station %s PACA",
1675 (oct & 0x01) ? "supports" : "does not support");
1679 NO_MORE_DATA_CHECK(len);
1681 oct = tvb_get_guint8(tvb, curr_offset);
1683 proto_tree_add_text(tree, tvb, curr_offset, 1,
1689 oct = tvb_get_guint8(tvb, curr_offset);
1692 proto_tree_add_text(tree, tvb, curr_offset, 1,
1693 "Station Class Mark: %u",
1697 * following SCM decode is from:
1698 * 3GPP2 C.S0005-0 section 2.3.3
1699 * 3GPP2 C.S0072-0 section 2.1.2
1701 subtree = proto_item_add_subtree(item, ett_scm);
1703 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1704 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1705 "%s : Extended SCM Indicator: %s",
1707 (oct & 0x80) ? "Band Classes 1,4" : "Other bands");
1709 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1710 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1713 (oct & 0x40) ? "Dual Mode" : "CDMA Only");
1715 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1716 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1719 (oct & 0x20) ? "Slotted" : "Non-Slotted");
1724 g_strlcat(add_string, " (MEID configured)", string_len);
1725 a_meid_configured = TRUE;
1732 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1733 proto_tree_add_boolean_format(subtree, hf_ansi_a_meid_configured, tvb,
1734 curr_offset, 1, a_meid_configured,
1735 "%s : MEID %sconfigured",
1739 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1740 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1741 "%s : 25 MHz Bandwidth",
1744 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1745 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1746 "%s : %s Transmission",
1748 (oct & 0x04) ? "Discontinuous" : "Continuous");
1752 case 0x00: str = "Class I"; break;
1753 case 0x01: str = "Class II"; break;
1754 case 0x02: str = "Class III"; break;
1755 case 0x03: str = "Reserved"; break;
1758 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1759 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1760 "%s : Power Class for Band Class 0 Analog Operation: %s",
1766 NO_MORE_DATA_CHECK(len);
1768 band_class_count = tvb_get_guint8(tvb, curr_offset);
1770 proto_tree_add_text(tree, tvb, curr_offset, 1,
1771 "Count of Band Class Entries: %u",
1776 oct = tvb_get_guint8(tvb, curr_offset);
1778 proto_tree_add_text(tree, tvb, curr_offset, 1,
1779 "Band Class Entry Length: %u",
1784 NO_MORE_DATA_CHECK(len);
1788 SHORT_DATA_CHECK(len - (curr_offset - offset), 3);
1794 proto_tree_add_text(tree, tvb, curr_offset, 3,
1795 "Band Class Entry [%u]",
1798 subtree = proto_item_add_subtree(item, ett_cm2_band_class);
1800 oct = tvb_get_guint8(tvb, curr_offset);
1802 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
1803 proto_tree_add_text(subtree,
1804 tvb, curr_offset, 1,
1808 band_class = oct & 0x1f;
1809 if ((band_class < 0) || (band_class >= (gint) NUM_BAND_CLASS_STR))
1815 str = band_class_str[band_class];
1818 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
1819 proto_tree_add_text(subtree,
1820 tvb, curr_offset, 1,
1821 "%s : Band Class: %s",
1827 oct2 = tvb_get_guint8(tvb, curr_offset);
1828 oct = tvb_get_guint8(tvb, curr_offset+1);
1832 other_decode_bitfield_value(a_bigbuf, oct2, 0x80, 8);
1833 proto_tree_add_text(subtree,
1834 tvb, curr_offset, 1,
1835 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode in Band Class 1 and Band Class 4)",
1838 other_decode_bitfield_value(a_bigbuf, oct2, 0x40, 8);
1839 proto_tree_add_text(subtree,
1840 tvb, curr_offset, 1,
1841 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode in Band Class 0 and Band Class 3)",
1844 other_decode_bitfield_value(a_bigbuf, oct2, 0x20, 8);
1845 proto_tree_add_text(subtree,
1846 tvb, curr_offset, 1,
1847 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1850 other_decode_bitfield_value(a_bigbuf, oct2, 0x10, 8);
1851 proto_tree_add_text(subtree,
1852 tvb, curr_offset, 1,
1853 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1856 other_decode_bitfield_value(a_bigbuf, oct2, 0x08, 8);
1857 proto_tree_add_text(subtree,
1858 tvb, curr_offset, 1,
1859 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1864 other_decode_bitfield_value(a_bigbuf, oct2, 0x80, 8);
1865 proto_tree_add_text(subtree,
1866 tvb, curr_offset, 1,
1867 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode)",
1870 other_decode_bitfield_value(a_bigbuf, oct2, 0x40, 8);
1871 proto_tree_add_text(subtree,
1872 tvb, curr_offset, 1,
1873 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode)",
1876 other_decode_bitfield_value(a_bigbuf, oct2, 0x20, 8);
1877 proto_tree_add_text(subtree,
1878 tvb, curr_offset, 1,
1879 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1882 other_decode_bitfield_value(a_bigbuf, oct2, 0x10, 8);
1883 proto_tree_add_text(subtree,
1884 tvb, curr_offset, 1,
1885 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1888 other_decode_bitfield_value(a_bigbuf, oct2, 0x08, 8);
1889 proto_tree_add_text(subtree,
1890 tvb, curr_offset, 1,
1891 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1895 other_decode_bitfield_value(a_bigbuf, oct2, 0x07, 8);
1896 proto_tree_add_text(subtree,
1897 tvb, curr_offset, 1,
1903 proto_tree_add_text(subtree,
1904 tvb, curr_offset, 1,
1905 "Band Class MS Protocol Level: %u",
1910 proto_item_append_text(item, ": (%d)", band_class);
1914 while (((len - (curr_offset - offset)) >= 3) &&
1915 (num_bands < band_class_count));
1918 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1920 return(curr_offset - offset);
1927 elem_mid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1932 guint32 curr_offset;
1935 curr_offset = offset;
1937 oct = tvb_get_guint8(tvb, curr_offset);
1942 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1943 proto_tree_add_text(tree,
1944 tvb, curr_offset, 1,
1945 "%s : MEID Hex Digit 1: %X",
1949 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1950 proto_tree_add_text(tree,
1951 tvb, curr_offset, 1,
1952 "%s : Odd/Even Indicator: %s",
1954 (oct & 0x08) ? "ODD" : "EVEN");
1956 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1957 proto_tree_add_text(tree,
1958 tvb, curr_offset, 1,
1959 "%s : Type of Identity: MEID",
1962 a_bigbuf[0] = Dgt_meid.out[(oct & 0xf0) >> 4];
1965 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
1967 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
1970 curr_offset += len - (curr_offset - offset);
1972 proto_tree_add_string_format(tree,
1974 tvb, offset + 1, len - 1,
1979 g_snprintf(add_string, string_len, " - %s (%s)",
1985 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
1986 proto_tree_add_text(tree,
1987 tvb, curr_offset, 1,
1991 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1992 proto_tree_add_text(tree,
1993 tvb, curr_offset, 1,
1994 "%s : Type of Identity: Broadcast",
1999 oct = tvb_get_guint8(tvb, curr_offset);
2001 switch ((oct & 0xc0) >> 6)
2003 case 0: str = "Normal"; break;
2004 case 1: str = "Interactive"; break;
2005 case 2: str = "Urgent"; break;
2011 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2012 proto_tree_add_text(tree,
2013 tvb, curr_offset, 1,
2014 "%s : Priority: %s",
2018 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
2019 proto_tree_add_text(tree,
2020 tvb, curr_offset, 1,
2021 "%s : Message ID: %u",
2027 oct = tvb_get_guint8(tvb, curr_offset);
2029 proto_tree_add_text(tree,
2030 tvb, curr_offset, 1,
2034 g_snprintf(add_string, string_len, " - Broadcast (Zone ID: %u)", oct);
2038 value = tvb_get_ntohs(tvb, curr_offset);
2042 case 0x0000: str = "Unknown or unspecified"; break;
2043 case 0x0001: str = "Emergency Broadcasts"; break;
2044 case 0x0002: str = "Administrative"; break;
2045 case 0x0003: str = "Maintenance"; break;
2046 case 0x0004: str = "General News - Local"; break;
2047 case 0x0005: str = "General News - Regional"; break;
2048 case 0x0006: str = "General News - National"; break;
2049 case 0x0007: str = "General News - International"; break;
2050 case 0x0008: str = "Business/Financial News - Local"; break;
2051 case 0x0009: str = "Business/Financial News - Regional"; break;
2052 case 0x000A: str = "Business/Financial News - National"; break;
2053 case 0x000B: str = "Business/Financial News - International"; break;
2054 case 0x000C: str = "Sports News - Local"; break;
2055 case 0x000D: str = "Sports News - Regional"; break;
2056 case 0x000E: str = "Sports News - National"; break;
2057 case 0x000F: str = "Sports News - International"; break;
2058 case 0x0010: str = "Entertainment News - Local"; break;
2059 case 0x0011: str = "Entertainment News - Regional"; break;
2060 case 0x0012: str = "Entertainment News - National"; break;
2061 case 0x0013: str = "Entertainment News - International"; break;
2062 case 0x0014: str = "Local Weather"; break;
2063 case 0x0015: str = "Area Traffic Reports"; break;
2064 case 0x0016: str = "Local Airport Flight Schedules"; break;
2065 case 0x0017: str = "Restaurants"; break;
2066 case 0x0018: str = "Lodgings"; break;
2067 case 0x0019: str = "Retail Directory"; break;
2068 case 0x001A: str = "Advertisements"; break;
2069 case 0x001B: str = "Stock Quotes"; break;
2070 case 0x001C: str = "Employment Opportunities"; break;
2071 case 0x001D: str = "Medical/Health/Hospitals"; break;
2072 case 0x001E: str = "Technology News"; break;
2073 case 0x001F: str = "Multi-category"; break;
2075 if ((value >= 0x0020) && (value <= 0x8000)) { str = "Reserved for standard service categories"; }
2076 else { str = "Reserved for proprietary service categories"; }
2080 proto_tree_add_text(tree,
2081 tvb, curr_offset, 2,
2088 oct = tvb_get_guint8(tvb, curr_offset);
2092 case 0: str = "Unknown or unspecified"; break;
2093 case 1: str = "English"; break;
2094 case 2: str = "French"; break;
2095 case 3: str = "Spanish"; break;
2096 case 4: str = "Japanese"; break;
2097 case 5: str = "Korean"; break;
2098 case 6: str = "Chinese"; break;
2099 case 7: str = "Hebrew"; break;
2105 proto_tree_add_text(tree,
2106 tvb, curr_offset, 1,
2107 "Language: (%u) %s",
2115 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2116 proto_tree_add_text(tree,
2117 tvb, curr_offset, 1,
2121 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2122 proto_tree_add_text(tree,
2123 tvb, curr_offset, 1,
2124 "%s : Odd/Even Indicator: %s",
2126 (oct & 0x08) ? "ODD" : "EVEN");
2128 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2129 proto_tree_add_text(tree,
2130 tvb, curr_offset, 1,
2131 "%s : Type of Identity: No Identity Code",
2134 g_snprintf(add_string, string_len, " - No Identity Code");
2140 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2141 "Format not supported");
2144 curr_offset += len - 1;
2148 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2149 proto_tree_add_text(tree,
2150 tvb, curr_offset, 1,
2151 "%s : Identity Digit 1: %c",
2153 Dgt_msid.out[(oct & 0xf0) >> 4]);
2155 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2156 proto_tree_add_text(tree,
2157 tvb, curr_offset, 1,
2158 "%s : Odd/Even Indicator: %s",
2160 (oct & 0x08) ? "ODD" : "EVEN");
2162 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2163 proto_tree_add_text(tree,
2164 tvb, curr_offset, 1,
2165 "%s : Type of Identity: %s",
2167 ((oct & 0x07) == 1) ? "MIN" : "IMSI");
2169 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2172 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
2174 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2177 proto_tree_add_string_format(tree,
2178 ((oct & 0x07) == 1) ? hf_ansi_a_min : hf_ansi_a_imsi,
2179 tvb, curr_offset, len - (curr_offset - offset),
2184 g_snprintf(add_string, string_len, " - %s (%s)",
2185 ((oct & 0x07) == 1) ? "MIN" : "IMSI",
2188 curr_offset += len - (curr_offset - offset);
2192 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2193 proto_tree_add_text(tree,
2194 tvb, curr_offset, 1,
2198 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2199 proto_tree_add_text(tree,
2200 tvb, curr_offset, 1,
2201 "%s : Odd/Even Indicator: %s",
2203 (oct & 0x08) ? "ODD" : "EVEN");
2205 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2206 proto_tree_add_text(tree,
2207 tvb, curr_offset, 1,
2208 "%s : Type of Identity: Interface Directory Number",
2211 g_snprintf(add_string, string_len, " - Interface Directory Number");
2217 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2218 "Format not supported");
2221 curr_offset += len - 1;
2225 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2226 proto_tree_add_text(tree,
2227 tvb, curr_offset, 1,
2231 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2232 proto_tree_add_text(tree,
2233 tvb, curr_offset, 1,
2234 "%s : Odd/Even Indicator: %s",
2236 (oct & 0x08) ? "ODD" : "EVEN");
2238 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2239 proto_tree_add_text(tree,
2240 tvb, curr_offset, 1,
2241 "%s : Type of Identity: TMSI",
2244 g_snprintf(add_string, string_len, " - TMSI");
2250 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2251 "Format not supported");
2254 curr_offset += len - 1;
2258 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2259 proto_tree_add_text(tree,
2260 tvb, curr_offset, 1,
2264 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2265 proto_tree_add_text(tree,
2266 tvb, curr_offset, 1,
2267 "%s : Odd/Even Indicator: %s",
2269 (oct & 0x08) ? "ODD" : "EVEN");
2271 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2272 proto_tree_add_text(tree,
2273 tvb, curr_offset, 1,
2274 "%s : Type of Identity: ESN",
2279 value = tvb_get_ntohl(tvb, curr_offset);
2281 proto_tree_add_uint(tree, hf_ansi_a_esn,
2282 tvb, curr_offset, 4,
2285 g_snprintf(add_string, string_len, " - %sESN (0x%04x)",
2286 a_meid_configured ? "p" : "",
2293 proto_tree_add_text(tree, tvb, curr_offset, len,
2296 g_snprintf(add_string, string_len, " - Format Unknown");
2302 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2304 return(curr_offset - offset);
2311 elem_sci(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
2314 guint32 curr_offset;
2316 curr_offset = offset;
2318 oct = tvb_get_guint8(tvb, curr_offset);
2320 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
2321 proto_tree_add_text(tree,
2322 tvb, curr_offset, 1,
2326 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2327 proto_tree_add_text(tree,
2328 tvb, curr_offset, 1,
2329 "%s : Slot Cycle Index: %u",
2333 g_snprintf(add_string, string_len, " - (%u)", oct & 0x07);
2337 /* no length check possible */
2339 return(curr_offset - offset);
2346 elem_prio(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2349 guint32 curr_offset;
2351 curr_offset = offset;
2353 oct = tvb_get_guint8(tvb, curr_offset);
2355 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2356 proto_tree_add_text(tree,
2357 tvb, curr_offset, 1,
2361 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
2362 proto_tree_add_text(tree,
2363 tvb, curr_offset, 1,
2364 "%s : Call Priority Level: %u",
2368 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2369 proto_tree_add_text(tree,
2370 tvb, curr_offset, 1,
2371 "%s : Queuing %sallowed",
2373 (oct & 0x02) ? "" : "not ");
2375 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2376 proto_tree_add_text(tree,
2377 tvb, curr_offset, 1,
2378 "%s : Preemption %sallowed",
2380 (oct & 0x01) ? "" : "not ");
2382 g_snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
2386 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2388 return(curr_offset - offset);
2395 elem_p_rev(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2398 guint32 curr_offset;
2400 curr_offset = offset;
2402 oct = tvb_get_guint8(tvb, curr_offset);
2404 proto_tree_add_text(tree, tvb, curr_offset, 1,
2407 g_snprintf(add_string, string_len, " - (%u)", oct);
2411 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2413 return(curr_offset - offset);
2420 elem_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2424 guint32 curr_offset;
2425 const gchar *str = NULL;
2427 curr_offset = offset;
2429 oct = tvb_get_guint8(tvb, curr_offset);
2431 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2432 proto_tree_add_text(tree,
2433 tvb, curr_offset, 1,
2441 if ((oct & 0x0f) == 0x00)
2443 /* national cause */
2444 switch ((oct & 0x70) >> 4)
2446 case 0: str = "Normal Event"; break;
2447 case 1: str = "Normal Event"; break;
2448 case 2: str = "Resource Unavailable"; break;
2449 case 3: str = "Service or option not available"; break;
2450 case 4: str = "Service or option not implemented"; break;
2451 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
2452 case 6: str = "Protocol error"; break;
2454 str = "Interworking";
2458 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2459 proto_tree_add_text(tree,
2460 tvb, curr_offset, 1,
2461 "%s : Cause Class: %s",
2465 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2466 proto_tree_add_text(tree,
2467 tvb, curr_offset, 1,
2468 "%s : National Cause",
2473 value = tvb_get_guint8(tvb, curr_offset);
2475 proto_tree_add_uint_format(tree, hf_ansi_a_cause_2, tvb,
2477 ((oct & 0x7f) << 8) | value,
2482 g_snprintf(add_string, string_len, " - (National Cause)");
2486 value = tvb_get_guint8(tvb, curr_offset + 1);
2488 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2490 proto_tree_add_uint_format(tree, hf_ansi_a_cause_2, tvb,
2492 ((oct & 0x7f) << 8) | value,
2493 "%s : Cause (MSB): %u",
2495 ((oct & 0x7f) << 8) | value);
2499 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
2500 proto_tree_add_text(tree, tvb, curr_offset, 1,
2511 case 0x00: str = "Radio interface message failure"; break;
2512 case 0x01: str = "Radio interface failure"; break;
2513 case 0x02: str = "Uplink Quality"; break;
2514 case 0x03: str = "Uplink strength"; break;
2515 case 0x04: str = "Downlink quality"; break;
2516 case 0x05: str = "Downlink strength"; break;
2517 case 0x06: str = "Distance"; break;
2518 case 0x07: str = "OAM&P intervention"; break;
2519 case 0x08: str = "MS busy"; break;
2520 case 0x09: str = "Call processing"; break;
2521 case 0x0A: str = "Reversion to old channel"; break;
2522 case 0x0B: str = "Handoff successful"; break;
2523 case 0x0C: str = "No response from MS"; break;
2524 case 0x0D: str = "Timer expired"; break;
2525 case 0x0E: str = "Better cell (power budget)"; break;
2526 case 0x0F: str = "Interference"; break;
2527 case 0x10: str = "Packet call going dormant"; break;
2528 case 0x11: str = "Service option not available"; break;
2530 case 0x12: str = "Invalid Call"; break;
2531 case 0x13: str = "Successful operation"; break;
2532 case 0x14: str = "Normal call release"; break;
2535 case 0x15: str = "Short data burst authentication failure"; break;
2536 case 0x17: str = "Time critical relocation/handoff"; break;
2537 case 0x18: str = "Network optimization"; break;
2538 case 0x19: str = "Power down from dormant state"; break;
2539 case 0x1A: str = "Authentication failure"; break;
2541 case 0x1B: str = "Inter-BS Soft Handoff Drop Target"; break;
2542 case 0x1D: str = "Intra-BS Soft Handoff Drop Target"; break;
2545 case 0x1E: str = "Autonomous Registration by the Network"; break;
2547 case 0x20: str = "Equipment failure"; break;
2548 case 0x21: str = "No radio resource available"; break;
2549 case 0x22: str = "Requested terrestrial resource unavailable"; break;
2552 case 0x23: str = "A2p RTP Payload Type not available"; break;
2553 case 0x24: str = "A2p Bearer Format Address Type not available"; break;
2555 case 0x25: str = "BS not equipped"; break;
2556 case 0x26: str = "MS not equipped (or incapable)"; break;
2559 case 0x27: str = "2G only sector"; break;
2560 case 0x28: str = "3G only sector"; break;
2562 case 0x29: str = "PACA Call Queued"; break;
2565 case 0x2A: str = "Handoff Blocked"; break;
2567 case 0x2B: str = "Alternate signaling type reject"; break;
2570 case 0x2C: str = "A2p Resource not available"; break;
2572 case 0x2D: str = "PACA Queue Overflow"; break;
2573 case 0x2E: str = "PACA Cancel Request Rejected"; break;
2574 case 0x30: str = "Requested transcoding/rate adaptation unavailable"; break;
2575 case 0x31: str = "Lower priority radio resources not available"; break;
2576 case 0x32: str = "PCF resources not available"; break; /* IOS 4 */
2577 case 0x33: str = "TFO Control request Failed"; break;
2580 case 0x34: str = "MS rejected order"; break;
2582 case 0x40: str = "Ciphering algorithm not supported"; break;
2583 case 0x41: str = "Private Long Code not available or not supported."; break;
2584 case 0x42: str = "Requested MUX option or rates not available."; break;
2585 case 0x43: str = "Requested Privacy Configuration unavailable"; break;
2588 case 0x45: str = "PDS-related capability not available or not supported"; break;
2590 case 0x50: str = "Terrestrial circuit already allocated"; break;
2591 case 0x60: str = "Protocol Error between BS and MSC"; break;
2592 case 0x71: str = "ADDS message too long for delivery on the paging channel"; break;
2593 case 0x72: str = "MS-to-IWF TCP connection failure"; break;
2594 case 0x73: str = "ATH0 (Modem hang up) Command"; break;
2595 case 0x74: str = "+FSH/+FHNG (Fax session ended) Command"; break;
2596 case 0x75: str = "No carrier"; break;
2597 case 0x76: str = "PPP protocol failure"; break;
2598 case 0x77: str = "PPP session closed by the MS"; break;
2599 case 0x78: str = "Do not notify MS"; break;
2600 case 0x79: str = "PCF (or PDSN) resources are not available"; break;
2601 case 0x7A: str = "Data ready to send"; break;
2604 case 0x7B: str = "Concurrent authentication"; break;
2606 case 0x7F: str = "Handoff procedure time-out"; break;
2608 str = "Reserved for future use";
2612 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2613 proto_tree_add_uint_format(tree, hf_ansi_a_cause_1, tvb,
2614 curr_offset, 1, oct,
2615 "%s : Cause: (%u) %s",
2622 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
2625 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2627 return(curr_offset - offset);
2632 * Formats everything after the discriminator, shared function.
2635 elem_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
2640 guint32 curr_offset;
2642 curr_offset = offset;
2647 value = tvb_get_ntohs(tvb, curr_offset);
2649 proto_tree_add_uint(tree, hf_ansi_a_cell_ci, tvb,
2650 curr_offset, 2, value);
2654 g_snprintf(add_string, string_len, " - CI (%u)", value);
2658 value = tvb_get_ntohs(tvb, curr_offset);
2660 proto_tree_add_uint(tree, hf_ansi_a_cell_lac, tvb,
2661 curr_offset, 2, value);
2665 g_snprintf(add_string, string_len, " - LAC (%u)", value);
2669 market_id = tvb_get_ntohs(tvb, curr_offset);
2670 switch_num = tvb_get_guint8(tvb, curr_offset + 2);
2672 value = tvb_get_ntoh24(tvb, curr_offset);
2674 proto_tree_add_uint_format(tree, hf_ansi_a_cell_mscid, tvb,
2675 curr_offset, 3, value,
2676 "Market ID %u Switch Number %u",
2677 market_id, switch_num);
2681 value = tvb_get_ntohs(tvb, curr_offset);
2683 proto_tree_add_uint(tree, hf_ansi_a_cell_ci, tvb,
2684 curr_offset, 2, value);
2688 g_snprintf(add_string, string_len, " - Market ID (%u) Switch Number (%u) CI (%u)",
2695 proto_tree_add_text(tree, tvb, curr_offset, len,
2696 "Cell ID - Non IOS format");
2702 return(curr_offset - offset);
2706 elem_cell_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2709 guint32 curr_offset;
2710 const gchar *str = NULL;
2712 curr_offset = offset;
2714 oct = tvb_get_guint8(tvb, curr_offset);
2716 if (oct >= (gint) NUM_CELL_DISC_STR)
2722 str = cell_disc_str[oct];
2725 proto_tree_add_text(tree,
2726 tvb, curr_offset, 1,
2727 "Cell Identification Discriminator: (%u) %s",
2734 elem_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, string_len, oct);
2736 /* no length check possible */
2738 return(curr_offset - offset);
2745 elem_cell_id_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2750 guint32 curr_offset;
2751 proto_item *item = NULL;
2752 proto_tree *subtree = NULL;
2753 const gchar *str = NULL;
2755 curr_offset = offset;
2757 oct = tvb_get_guint8(tvb, curr_offset);
2759 if (oct >= (gint) NUM_CELL_DISC_STR)
2765 str = cell_disc_str[oct];
2768 proto_tree_add_text(tree,
2769 tvb, curr_offset, 1,
2770 "Cell Identification Discriminator: (%u) %s",
2776 NO_MORE_DATA_CHECK(len);
2782 proto_tree_add_text(tree,
2783 tvb, curr_offset, -1,
2787 subtree = proto_item_add_subtree(item, ett_cell_list);
2789 add_string[0] = '\0';
2791 elem_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len, oct);
2793 if (add_string[0] != '\0')
2795 proto_item_append_text(item, "%s", add_string);
2798 proto_item_set_len(item, consumed);
2800 curr_offset += consumed;
2804 while ((len - (curr_offset - offset)) > 0);
2806 g_snprintf(add_string, string_len, " - %u cell%s",
2807 num_cells, plurality(num_cells, "", "s"));
2809 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2811 return(curr_offset - offset);
2818 elem_cic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
2821 guint32 curr_offset;
2823 curr_offset = offset;
2825 value = tvb_get_ntohs(tvb, curr_offset);
2827 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
2828 proto_tree_add_text(tree,
2829 tvb, curr_offset, 2,
2830 "%s : PCM Multiplexer: %u",
2832 (value & 0xffe0) >> 5);
2834 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
2835 proto_tree_add_text(tree,
2836 tvb, curr_offset, 2,
2837 "%s : Timeslot: %u",
2843 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
2845 /* no length check possible */
2847 return(curr_offset - offset);
2854 elem_cic_ext(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
2858 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, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2920 guint32 curr_offset;
2922 curr_offset = offset;
2924 oct = tvb_get_guint8(tvb, curr_offset);
2926 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
2927 proto_tree_add_text(tree,
2928 tvb, curr_offset, 1,
2932 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2933 proto_tree_add_text(tree,
2934 tvb, curr_offset, 1,
2935 "%s : Mobile Originated Position Determination",
2938 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2939 proto_tree_add_text(tree,
2940 tvb, curr_offset, 1,
2941 "%s : Global Emergency Call Indication",
2946 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2948 return(curr_offset - offset);
2956 #define ANSI_A_CELL_ID_LEN(_disc) ((_disc == 7) ? 5 : 2)
2960 * Formats everything no length check
2963 elem_downlink_re_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2971 guint32 curr_offset;
2972 proto_item *item = NULL;
2973 proto_tree *subtree = NULL;
2976 curr_offset = offset;
2978 num_cells = tvb_get_guint8(tvb, curr_offset);
2980 proto_tree_add_text(tree, tvb, curr_offset, 1,
2981 "Number of Cells: %u",
2986 NO_MORE_DATA_CHECK(len);
2988 disc = tvb_get_guint8(tvb, curr_offset);
2990 if (disc >= (gint) NUM_CELL_DISC_STR)
2996 str = cell_disc_str[disc];
2999 proto_tree_add_text(tree,
3000 tvb, curr_offset, 1,
3001 "Cell Identification Discriminator: (%u) %s",
3007 NO_MORE_DATA_CHECK(len);
3009 SHORT_DATA_CHECK(len - (curr_offset - offset), (guint32) 3 + ANSI_A_CELL_ID_LEN(disc));
3018 proto_tree_add_text(tree,
3019 tvb, curr_offset, -1,
3023 subtree = proto_item_add_subtree(item, ett_cell_list);
3025 add_string[0] = '\0';
3027 elem_cell_id_aux(tvb, subtree, curr_offset,
3028 len - (curr_offset - offset), add_string, string_len, disc);
3030 if (add_string[0] != '\0')
3032 proto_item_append_text(item, "%s", add_string);
3035 proto_item_set_len(item, consumed);
3037 curr_offset += consumed;
3039 oct = tvb_get_guint8(tvb, curr_offset);
3041 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3042 proto_tree_add_text(tree, tvb, curr_offset, 1,
3046 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
3047 proto_tree_add_text(tree, tvb, curr_offset, 1,
3048 "%s : Downlink Signal Strength Raw: %u",
3054 value = tvb_get_ntohs(tvb, curr_offset);
3056 proto_tree_add_text(tree,
3057 tvb, curr_offset, 2,
3058 "CDMA Target One Way Delay: %u",
3063 while (curr_cell < num_cells);
3065 g_snprintf(add_string, string_len, " - %u cell%s",
3066 num_cells, plurality(num_cells, "", "s"));
3068 return(curr_offset - offset);
3075 elem_downlink_re(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3077 guint32 curr_offset;
3079 curr_offset = offset;
3082 elem_downlink_re_aux(tvb, tree, offset, len, add_string, string_len);
3084 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3086 return(curr_offset - offset);
3093 elem_downlink_re_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3098 guint32 curr_offset;
3099 proto_item *item = NULL;
3100 proto_tree *subtree = NULL;
3102 curr_offset = offset;
3106 while ((len - (curr_offset - offset)) > 0)
3111 proto_tree_add_text(tree,
3112 tvb, curr_offset, -1,
3116 subtree = proto_item_add_subtree(item, ett_re_list);
3118 oct_len = tvb_get_guint8(tvb, curr_offset);
3120 proto_tree_add_text(subtree,
3121 tvb, curr_offset, 1,
3122 "Environment Length: %u",
3127 add_string[0] = '\0';
3129 elem_downlink_re_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len);
3131 if (add_string[0] != '\0')
3133 proto_item_append_text(item, "%s", add_string);
3137 * +1 is for environment length
3139 proto_item_set_len(item, consumed + 1);
3141 curr_offset += consumed;
3144 g_snprintf(add_string, string_len, " - %u environment%s",
3145 num_envs, plurality(num_envs, "", "s"));
3147 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3149 return(curr_offset - offset);
3176 elem_pdsn_ip_addr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3178 guint32 curr_offset;
3180 curr_offset = offset;
3182 proto_tree_add_item(tree, hf_ansi_a_pdsn_ip_addr, tvb, curr_offset, len, ENC_BIG_ENDIAN);
3186 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3188 return(curr_offset - offset);
3195 elem_s_pdsn_ip_addr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3197 guint32 curr_offset;
3199 curr_offset = offset;
3201 proto_tree_add_item(tree, hf_ansi_a_s_pdsn_ip_addr, tvb, curr_offset, len, ENC_BIG_ENDIAN);
3205 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3207 return(curr_offset - offset);
3214 elem_ho_pow_lev(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3219 proto_item *item = NULL;
3220 proto_tree *subtree = NULL;
3221 guint32 curr_offset;
3223 curr_offset = offset;
3225 oct = tvb_get_guint8(tvb, curr_offset);
3227 proto_tree_add_text(tree, tvb, curr_offset, 1,
3228 "Number of Cells: %u",
3233 SHORT_DATA_CHECK(len - (curr_offset - offset), (guint32) 6);
3235 oct = tvb_get_guint8(tvb, curr_offset);
3237 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3238 proto_tree_add_text(tree, tvb, curr_offset, 1,
3242 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3243 proto_tree_add_text(tree, tvb, curr_offset, 1,
3248 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
3249 proto_tree_add_text(tree, tvb, curr_offset, 1,
3250 "%s : Handoff Power Level: %u",
3257 proto_tree_add_text(tree,
3258 tvb, curr_offset, -1,
3261 subtree = proto_item_add_subtree(item, ett_cell_list);
3263 add_string[0] = '\0';
3265 elem_cell_id_aux(tvb, subtree, curr_offset,
3266 len - (curr_offset - offset), add_string, string_len, 0x7);
3268 if (add_string[0] != '\0')
3270 proto_item_append_text(item, "%s", add_string);
3273 proto_item_set_len(item, consumed);
3275 curr_offset += consumed;
3279 while ((len - (curr_offset - offset)) >= 3)
3283 oct = tvb_get_guint8(tvb, curr_offset);
3285 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
3286 proto_tree_add_text(tree, tvb, curr_offset, 1,
3290 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
3291 proto_tree_add_text(tree, tvb, curr_offset, 1,
3292 "%s : Handoff Power Level: %u",
3299 proto_tree_add_text(tree,
3300 tvb, curr_offset, -1,
3304 subtree = proto_item_add_subtree(item, ett_cell_list);
3306 add_string[0] = '\0';
3308 elem_cell_id_aux(tvb, subtree, curr_offset,
3309 len - (curr_offset - offset), add_string, string_len, 0x2);
3311 if (add_string[0] != '\0')
3313 proto_item_append_text(item, "%s", add_string);
3316 proto_item_set_len(item, consumed);
3318 curr_offset += consumed;
3321 g_snprintf(add_string, string_len, " - %u cell%s",
3322 num_cells, plurality(num_cells, "", "s"));
3324 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3326 return(curr_offset - offset);
3333 elem_uz_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3336 guint32 curr_offset;
3338 curr_offset = offset;
3340 value = tvb_get_ntohs(tvb, curr_offset);
3342 proto_tree_add_text(tree, tvb, curr_offset, 2,
3348 g_snprintf(add_string, string_len, " - (%u)", value);
3350 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3352 return(curr_offset - offset);
3364 elem_info_rec_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3368 guint32 curr_offset;
3372 curr_offset = offset;
3376 while ((len - (curr_offset - offset)) > 0)
3380 rec_type = tvb_get_guint8(tvb, curr_offset);
3382 str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
3389 proto_tree_add_text(tree,
3390 tvb, curr_offset, 1,
3391 "Information Record Type - %u: (%u) %s",
3399 g_snprintf(add_string, string_len, " - %u request%s",
3400 num_recs, plurality(num_recs, "", "s"));
3402 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3404 return(curr_offset - offset);
3411 elem_is2000_chan_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3416 guint32 curr_offset;
3419 curr_offset = offset;
3421 oct = tvb_get_guint8(tvb, curr_offset);
3423 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3424 proto_tree_add_text(tree, tvb, curr_offset, 1,
3425 "%s : OTD: Mobile will %sbe using OTD",
3427 (oct & 0x80) ? "" : "not ");
3429 num_chan = (oct & 0x70) >> 4;
3431 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3432 proto_tree_add_text(tree, tvb, curr_offset, 1,
3433 "%s : Channel Count: %u",
3437 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3438 proto_tree_add_text(tree, tvb, curr_offset, 1,
3439 "%s : Frame Offset: (%u), %.2f ms",
3442 (oct & 0x0f) * 1.25);
3446 NO_MORE_DATA_CHECK(len);
3448 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
3452 oct = tvb_get_guint8(tvb, curr_offset);
3456 case 0x01: str = "Fundamental Channel (FCH) TIA/EIA/IS-2000"; break;
3457 case 0x02: str = "Dedicated Control Channel (DCCH) TIA/EIA/IS-2000"; break;
3458 case 0x03: str = "Supplemental Channel (SCH) TIA/EIA/IS-2000"; break;
3460 if ((oct >= 0x80) && (oct <= 0x9f)) { str = "Reserved for UMTS"; }
3461 else { str = "Reserved"; }
3465 proto_tree_add_text(tree, tvb, curr_offset, 1,
3466 "Physical Channel Type: %s",
3471 oct = tvb_get_guint8(tvb, curr_offset);
3473 switch (global_a_variant)
3475 case A_VARIANT_IOS401:
3476 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3477 proto_tree_add_text(tree, tvb, curr_offset, 1,
3482 case A_VARIANT_IOS501:
3483 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3484 proto_tree_add_text(tree, tvb, curr_offset, 1,
3485 "%s : Rev_FCH_Gating",
3490 switch ((oct & 0x60) >> 5)
3492 case 0: str = "Gating rate 1"; break;
3493 case 1: str = "Gating rate 1/2"; break;
3494 case 2: str = "Gating rate 1/4"; break;
3500 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3501 proto_tree_add_text(tree, tvb, curr_offset, 1,
3502 "%s : Pilot Gating Rate: %s",
3506 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
3507 proto_tree_add_text(tree, tvb, curr_offset, 1,
3511 value = tvb_get_guint8(tvb, curr_offset + 1);
3513 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3514 proto_tree_add_text(tree, tvb, curr_offset, 1,
3515 "%s : Walsh Code Channel Index (MSB): %u",
3517 ((guint32) (oct & 0x07) << 8) | value);
3521 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
3522 proto_tree_add_text(tree, tvb, curr_offset, 1,
3523 "%s : Walsh Code Channel Index (LSB)",
3528 oct = tvb_get_guint8(tvb, curr_offset);
3530 other_decode_bitfield_value(a_bigbuf, oct, 0xff, 8);
3531 proto_tree_add_text(tree, tvb, curr_offset, 1,
3532 "%s : Pilot PN Code (LSB)",
3538 oct = tvb_get_guint8(tvb, curr_offset);
3539 value |= ((guint32) (oct & 0x80)) << 1;
3541 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3542 proto_tree_add_text(tree, tvb, curr_offset, 1,
3543 "%s : Pilot PN Code (MSB): %u",
3547 switch (global_a_variant)
3549 case A_VARIANT_IOS401:
3550 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3551 proto_tree_add_text(tree, tvb, curr_offset, 1,
3556 case A_VARIANT_IOS501:
3557 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3558 proto_tree_add_text(tree, tvb, curr_offset, 1,
3562 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3563 proto_tree_add_text(tree, tvb, curr_offset, 1,
3564 "%s : Power Combined",
3569 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3570 proto_tree_add_text(tree, tvb, curr_offset, 1,
3571 "%s : Frequency Included",
3574 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
3576 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3577 proto_tree_add_text(tree, tvb, curr_offset, 1,
3578 "%s : ARFCN (MSB): %u",
3584 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
3585 proto_tree_add_text(tree, tvb, curr_offset, 1,
3591 while ((len - (curr_offset - offset)) >= 6);
3593 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3595 return(curr_offset - offset);
3600 * NO ASSOCIATED DATA
3607 elem_is95_ms_meas_chan_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3612 guint32 curr_offset;
3615 curr_offset = offset;
3617 oct = tvb_get_guint8(tvb, curr_offset);
3619 temp_int = (oct & 0xf8) >> 3;
3620 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
3626 str = band_class_str[temp_int];
3629 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
3630 proto_tree_add_text(tree,
3631 tvb, curr_offset, 1,
3632 "%s : Band Class: %s",
3636 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
3638 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3639 proto_tree_add_text(tree, tvb, curr_offset, 1,
3640 "%s : ARFCN (MSB): %u",
3646 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
3647 proto_tree_add_text(tree, tvb, curr_offset, 1,
3651 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value);
3655 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3657 return(curr_offset - offset);
3664 elem_clg_party_ascii_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3667 guint32 curr_offset;
3671 curr_offset = offset;
3673 oct = tvb_get_guint8(tvb, curr_offset);
3675 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3676 proto_tree_add_text(tree, tvb, curr_offset, 1,
3677 "%s : Extension: %s",
3679 (oct & 0x80) ? "Not extended" : "Extended");
3681 switch ((oct & 0x70) >> 4)
3683 case 0: str = "Unknown"; break;
3684 case 1: str = "International number"; break;
3685 case 2: str = "National number"; break;
3686 case 3: str = "Network-specific number"; break;
3687 case 4: str = "Dedicated PAD access, short code"; break;
3688 case 5: str = "Reserved"; break;
3689 case 6: str = "Reserved"; break;
3691 str = "Reserved for extension";
3695 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3696 proto_tree_add_text(tree, tvb, curr_offset, 1,
3697 "%s : Type of Number: %s",
3703 case 0x00: str = "Unknown"; break;
3704 case 0x01: str = "ISDN/Telephony Numbering (ITU recommendation E.164/E.163)"; break;
3705 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
3706 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
3707 case 0x07: str = "Reserved for extension"; break;
3708 case 0x08: str = "National Numbering"; break;
3709 case 0x09: str = "Private Numbering"; break;
3715 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3716 proto_tree_add_text(tree, tvb, curr_offset, 1,
3717 "%s : Number Plan Identification: %s",
3727 oct = tvb_get_guint8(tvb, curr_offset);
3729 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3730 proto_tree_add_text(tree, tvb, curr_offset, 1,
3734 switch ((oct & 0x60) >> 5)
3736 case 0: str = "Presentation allowed"; break;
3737 case 1: str = "Presentation restricted"; break;
3738 case 2: str = "Number not available due to interworking"; break;
3744 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3745 proto_tree_add_text(tree, tvb, curr_offset, 1,
3746 "%s : Presentation Indicator: %s",
3752 case 0: str = "User-provided, not screened"; break;
3753 case 1: str = "User-provided, verified and passed"; break;
3754 case 2: str = "User-provided, verified and failed"; break;
3756 str = "Network-provided";
3760 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
3761 proto_tree_add_text(tree, tvb, curr_offset, 1,
3765 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
3766 proto_tree_add_text(tree, tvb, curr_offset, 1,
3767 "%s : Screening Indicator: %s",
3774 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3776 proto_tree_add_string_format(tree, hf_ansi_a_clg_party_ascii_num,
3777 tvb, curr_offset, len - (curr_offset - offset),
3780 (gchar *) format_text(poctets, len - (curr_offset - offset)));
3782 curr_offset += len - (curr_offset - offset);
3784 g_snprintf(add_string, string_len, " - (%s)", poctets);
3786 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3788 return(curr_offset - offset);
3795 elem_l3_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3797 guint32 curr_offset;
3800 curr_offset = offset;
3802 proto_tree_add_text(tree, tvb, curr_offset, len,
3803 "Layer 3 Information");
3806 * dissect the embedded DTAP message
3808 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3810 call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
3814 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3816 return(curr_offset - offset);
3821 * Protocol Discriminator
3831 * Location Updating Type
3837 * Simple data no decode required
3844 elem_lai(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
3848 guint32 curr_offset;
3852 curr_offset = offset;
3854 oct = tvb_get_guint8(tvb, curr_offset);
3856 mcc[0] = Dgt_tbcd.out[oct & 0x0f];
3857 mcc[1] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3859 oct = tvb_get_guint8(tvb, curr_offset+1);
3861 mcc[2] = Dgt_tbcd.out[(oct & 0x0f)];
3864 mnc[2] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3866 oct = tvb_get_guint8(tvb, curr_offset+2);
3868 mnc[0] = Dgt_tbcd.out[(oct & 0x0f)];
3869 mnc[1] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3872 proto_tree_add_text(tree,
3873 tvb, curr_offset, 3,
3874 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3880 value = tvb_get_ntohs(tvb, curr_offset);
3882 proto_tree_add_text(tree,
3883 tvb, curr_offset, 2,
3884 "Location Area Code (LAC): 0x%04x (%u)",
3890 /* no length check possible */
3892 return(curr_offset - offset);
3899 elem_rej_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
3902 guint32 curr_offset;
3905 curr_offset = offset;
3907 oct = tvb_get_guint8(tvb, curr_offset);
3911 case 0x01: str = "Reserved"; break;
3912 case 0x02: str = "MIN/IMSI unknown in HLR"; break;
3913 case 0x03: str = "Illegal MS"; break;
3914 case 0x04: str = "TMSI/IMSI/MIN unknown in VLR"; break;
3915 case 0x05: str = "Reserved"; break;
3916 case 0x0b: str = "Roaming not allowed"; break;
3917 case 0x0c: str = "Location area not allowed"; break;
3918 case 0x20: str = "Service option not supported"; break;
3919 case 0x21: str = "Requested service option not subscribed"; break;
3920 case 0x22: str = "Service option temporarily out of order"; break;
3921 case 0x26: str = "Call cannot be identified"; break;
3922 case 0x51: str = "Network failure"; break;
3923 case 0x56: str = "Congestion"; break;
3924 case 0x62: str = "Message type non-existent or not implemented"; break;
3925 case 0x63: str = "Information element non-existent or not implemented"; break;
3926 case 0x64: str = "Invalid information element contents"; break;
3927 case 0x65: str = "Message not compatible with the call state"; break;
3928 case 0x66: str = "Protocol error, unspecified"; break;
3929 case 0x6e: str = "Invalid message, unspecified"; break;
3930 case 0x6f: str = "Mandatory information element error"; break;
3936 proto_tree_add_text(tree,
3937 tvb, curr_offset, 1,
3938 "Reject Cause Value: (%u) %s",
3944 g_snprintf(add_string, string_len, " - (%s)", str);
3946 /* no length check possible */
3948 return(curr_offset - offset);
3955 elem_anchor_pdsn_addr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3957 guint32 curr_offset;
3959 curr_offset = offset;
3961 proto_tree_add_item(tree, hf_ansi_a_anchor_ip_addr, tvb, curr_offset, len, ENC_BIG_ENDIAN);
3965 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3967 return(curr_offset - offset);
3974 elem_anchor_pp_addr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3976 guint32 curr_offset;
3978 curr_offset = offset;
3980 proto_tree_add_item(tree, hf_ansi_a_anchor_pp_ip_addr, tvb, curr_offset, len, ENC_BIG_ENDIAN);
3984 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3986 return(curr_offset - offset);
3993 elem_auth_chlg_param(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3996 guint32 curr_offset;
3999 curr_offset = offset;
4001 oct = tvb_get_guint8(tvb, curr_offset);
4003 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4004 proto_tree_add_text(tree,
4005 tvb, curr_offset, 1,
4011 case 1: str = "RAND 32 bits"; break;
4012 case 2: str = "RANDU 24 bits"; break;
4013 case 4: str = "RANDSSD 56 bits"; break;
4014 case 8: str = "RANDBS 32 bits"; break;
4020 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4021 proto_tree_add_text(tree,
4022 tvb, curr_offset, 1,
4023 "%s : Random Number Type: (%u) %s",
4030 proto_tree_add_text(tree,
4031 tvb, curr_offset, len - (curr_offset - offset),
4032 "RAND/RANDU/RANDBS/RANDSSD Value");
4034 g_snprintf(add_string, string_len, " - (%s)", str);
4036 curr_offset += len - (curr_offset - offset);
4038 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4040 return(curr_offset - offset);
4047 elem_auth_resp_param(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4050 guint32 curr_offset;
4053 curr_offset = offset;
4055 oct = tvb_get_guint8(tvb, curr_offset);
4057 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4058 proto_tree_add_text(tree,
4059 tvb, curr_offset, 1,
4065 case 1: str = "AUTHR"; break;
4066 case 2: str = "AUTHU"; break;
4067 case 4: str = "AUTHBS"; break;
4073 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4074 proto_tree_add_text(tree,
4075 tvb, curr_offset, 1,
4076 "%s : Auth Signature Type: (%u) %s",
4083 proto_tree_add_text(tree,
4084 tvb, curr_offset, len - (curr_offset - offset),
4087 g_snprintf(add_string, string_len, " - (%s)", str);
4089 curr_offset += len - (curr_offset - offset);
4091 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4093 return(curr_offset - offset);
4100 elem_auth_param_count(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
4103 guint32 curr_offset;
4105 curr_offset = offset;
4107 oct = tvb_get_guint8(tvb, curr_offset);
4109 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
4110 proto_tree_add_text(tree,
4111 tvb, curr_offset, 1,
4115 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
4116 proto_tree_add_text(tree,
4117 tvb, curr_offset, 1,
4124 g_snprintf(add_string, string_len, " - (%u)", oct & 0x3f);
4126 /* no length check possible */
4128 return(curr_offset - offset);
4135 elem_mwi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
4138 guint32 curr_offset;
4140 curr_offset = offset;
4142 oct = tvb_get_guint8(tvb, curr_offset);
4144 proto_tree_add_text(tree,
4145 tvb, curr_offset, 1,
4146 "Number of Messages: %u",
4151 g_snprintf(add_string, string_len, " - (%u)", oct);
4153 /* no length check possible */
4155 return(curr_offset - offset);
4161 * UNUSED in SPEC and no IEI!
4168 elem_signal(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
4171 guint32 curr_offset;
4174 curr_offset = offset;
4176 oct = tvb_get_guint8(tvb, curr_offset);
4180 case 0x00: str = "Dial tone on"; break;
4181 case 0x01: str = "Ring back tone on"; break;
4182 case 0x02: str = "Intercept tone on"; break;
4183 case 0x03: str = "Network congestion (reorder) tone on"; break;
4184 case 0x04: str = "Busy tone on"; break;
4185 case 0x05: str = "Confirm tone on"; break;
4186 case 0x06: str = "Answer tone on"; break;
4187 case 0x07: str = "Call waiting tone on"; break;
4188 case 0x08: str = "Off-hook warning tone on"; break;
4189 case 0x3f: str = "Tones off"; break;
4190 case 0x40: str = "Normal Alerting"; break;
4191 case 0x41: str = "Inter-group Alerting"; break;
4192 case 0x42: str = "Special/Priority Alerting"; break;
4193 case 0x43: str = "Reserved (ISDN Alerting pattern 3)"; break;
4194 case 0x44: str = "Ping Ring (abbreviated alert)"; break;
4195 case 0x45: str = "Reserved (ISDN Alerting pattern 5)"; break;
4196 case 0x46: str = "Reserved (ISDN Alerting pattern 6)"; break;
4197 case 0x47: str = "Reserved (ISDN Alerting pattern 7)"; break;
4198 case 0x63: str = "Abbreviated intercept"; break;
4199 case 0x65: str = "Abbreviated reorder"; break;
4200 case 0x4f: str = "Alerting off"; break;
4206 proto_tree_add_text(tree,
4207 tvb, curr_offset, 1,
4208 "Signal Value: (%u) %s",
4212 g_snprintf(add_string, string_len, " - (%s)", str);
4216 oct = tvb_get_guint8(tvb, curr_offset);
4218 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
4219 proto_tree_add_text(tree,
4220 tvb, curr_offset, 1,
4226 case 0: str = "Medium pitch (standard alert)"; break;
4227 case 1: str = "High pitch"; break;
4228 case 2: str = "Low pitch"; break;
4234 proto_tree_add_text(tree,
4235 tvb, curr_offset, 1,
4236 "%s : Alert Pitch: %s",
4242 /* no length check possible */
4244 return(curr_offset - offset);
4256 elem_cld_party_bcd_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4260 guint32 curr_offset;
4263 curr_offset = offset;
4265 oct = tvb_get_guint8(tvb, curr_offset);
4267 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4268 proto_tree_add_text(tree,
4269 tvb, curr_offset, 1,
4273 switch ((oct & 0x70) >> 4)
4275 case 0: str = "Unknown"; break;
4276 case 1: str = "International number"; break;
4277 case 2: str = "National number"; break;
4278 case 3: str = "Network specific number"; break;
4279 case 4: str = "Dedicated PAD access, short code"; break;
4280 case 7: str = "Reserved for extension"; break;
4286 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4287 proto_tree_add_text(tree,
4288 tvb, curr_offset, 1,
4289 "%s : Type of Number: %s",
4295 case 0x00: str = "Unknown"; break;
4296 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4297 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
4298 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
4299 case 0x07: str = "Reserved for extension"; break;
4300 case 0x08: str = "National numbering plan"; break;
4301 case 0x09: str = "Private numbering plan"; break;
4307 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4308 proto_tree_add_text(tree,
4309 tvb, curr_offset, 1,
4310 "%s : Numbering Plan Identification: %s",
4316 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
4318 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
4321 proto_tree_add_string_format(tree, hf_ansi_a_cld_party_bcd_num,
4322 tvb, curr_offset, len - (curr_offset - offset),
4327 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
4329 curr_offset += len - (curr_offset - offset);
4331 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4333 return(curr_offset - offset);
4338 * UNUSED in SPEC and no IEI!
4340 #ifdef MAYBE_USED_FOR_OLDER_CODECS
4342 elem_clg_party_bcd_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4346 guint32 curr_offset;
4349 curr_offset = offset;
4351 oct = tvb_get_guint8(tvb, curr_offset);
4353 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4354 proto_tree_add_text(tree, tvb, curr_offset, 1,
4355 "%s : Extension: %s",
4357 (oct & 0x80) ? "Not extended" : "Extended");
4359 switch ((oct & 0x70) >> 4)
4361 case 0: str = "Unknown"; break;
4362 case 1: str = "International number"; break;
4363 case 2: str = "National number"; break;
4364 case 3: str = "Network specific number"; break;
4365 case 4: str = "Dedicated PAD access, short code"; break;
4366 case 7: str = "Reserved for extension"; break;
4372 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4373 proto_tree_add_text(tree,
4374 tvb, curr_offset, 1,
4375 "%s : Type of Number: %s",
4381 case 0x00: str = "Unknown"; break;
4382 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4383 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
4384 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
4385 case 0x07: str = "Reserved for extension"; break;
4386 case 0x08: str = "National numbering plan"; break;
4387 case 0x09: str = "Private numbering plan"; break;
4393 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4394 proto_tree_add_text(tree,
4395 tvb, curr_offset, 1,
4396 "%s : Numbering Plan Identification: %s",
4406 oct = tvb_get_guint8(tvb, curr_offset);
4408 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4409 proto_tree_add_text(tree, tvb, curr_offset, 1,
4413 switch ((oct & 0x60) >> 5)
4415 case 0: str = "Presentation allowed"; break;
4416 case 1: str = "Presentation restricted"; break;
4417 case 2: str = "Number not available due to interworking"; break;
4423 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4424 proto_tree_add_text(tree, tvb, curr_offset, 1,
4425 "%s : Presentation Indicator: %s",
4431 case 0: str = "User-provided, not screened"; break;
4432 case 1: str = "User-provided, verified and passed"; break;
4433 case 2: str = "User-provided, verified and failed"; break;
4435 str = "Network-provided";
4439 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
4440 proto_tree_add_text(tree, tvb, curr_offset, 1,
4444 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4445 proto_tree_add_text(tree, tvb, curr_offset, 1,
4446 "%s : Screening Indicator: %s",
4453 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
4455 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
4458 proto_tree_add_string_format(tree, hf_ansi_a_clg_party_bcd_num,
4459 tvb, curr_offset, len - (curr_offset - offset),
4464 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
4466 curr_offset += len - (curr_offset - offset);
4468 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4470 return(curr_offset - offset);
4478 elem_qos_params(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4481 guint32 curr_offset;
4483 curr_offset = offset;
4485 oct = tvb_get_guint8(tvb, curr_offset);
4487 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4488 proto_tree_add_text(tree,
4489 tvb, curr_offset, 1,
4493 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4494 proto_tree_add_text(tree,
4495 tvb, curr_offset, 1,
4496 "%s : Packet Priority: %u",
4500 g_snprintf(add_string, string_len, " - (%u)", oct & 0x0f);
4504 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4506 return(curr_offset - offset);
4513 elem_cause_l3(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4516 guint32 curr_offset;
4517 const gchar *str = NULL;
4519 curr_offset = offset;
4521 oct = tvb_get_guint8(tvb, curr_offset);
4523 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4524 proto_tree_add_text(tree,
4525 tvb, curr_offset, 1,
4529 switch ((oct & 0x60) >> 5)
4531 case 0: str = "Standard as described in ITU Recommendation Q.931"; break;
4532 case 1: str = "Reserved for other international standards"; break;
4533 case 2: str = "National standard"; break;
4535 str = "Reserved for other international standards";
4539 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4540 proto_tree_add_text(tree,
4541 tvb, curr_offset, 1,
4542 "%s : Coding Standard: %s",
4546 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4547 proto_tree_add_text(tree,
4548 tvb, curr_offset, 1,
4554 case 0: str = "User"; break;
4555 case 1: str = "Private network serving the local user"; break;
4556 case 2: str = "Public network serving the local user"; break;
4557 case 3: str = "Transit network"; break;
4558 case 4: str = "Public network serving the remote user"; break;
4559 case 5: str = "Private network serving the remote user"; break;
4560 case 7: str = "International network"; break;
4561 case 10: str = "Network beyond interworking point"; break;
4567 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4568 proto_tree_add_text(tree,
4569 tvb, curr_offset, 1,
4570 "%s : Location: %s",
4576 oct = tvb_get_guint8(tvb, curr_offset);
4578 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4579 proto_tree_add_text(tree,
4580 tvb, curr_offset, 1,
4584 switch ((oct & 0x70) >> 4)
4586 case 0: str = "normal event"; break;
4587 case 1: str = "normal event"; break;
4588 case 2: str = "resource unavailable"; break;
4589 case 3: str = "service or option not available"; break;
4590 case 4: str = "service or option not implemented"; break;
4591 case 5: str = "invalid message (e.g., parameter out of range)"; break;
4592 case 6: str = "protocol error (e.g., unknown message)"; break;
4594 str = "interworking";
4598 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4599 proto_tree_add_text(tree,
4600 tvb, curr_offset, 1,
4601 "%s : Class: (%u) %s",
4608 case 0x01: str = "Unassigned (unallocated) number"; break;
4609 case 0x03: str = "No route to destination"; break;
4610 case 0x06: str = "Channel unacceptable"; break;
4611 case 0x0F: str = "Procedure failed"; break;
4612 case 0x10: str = "Normal Clearing"; break;
4613 case 0x11: str = "User busy"; break;
4614 case 0x12: str = "No user responding"; break;
4615 case 0x13: str = "User alerting, no answer"; break;
4616 case 0x15: str = "Call rejected"; break;
4617 case 0x16: str = "Number changed New destination"; break;
4618 case 0x1A: str = "Non selected user clearing"; break;
4619 case 0x1B: str = "Destination out of order"; break;
4620 case 0x1C: str = "Invalid number format (incomplete number)"; break;
4621 case 0x1D: str = "Facility rejected"; break;
4622 case 0x1F: str = "Normal, unspecified"; break;
4623 case 0x22: str = "No circuit/channel available"; break;
4624 case 0x26: str = "Network out of order"; break;
4625 case 0x29: str = "Temporary failure"; break;
4626 case 0x2A: str = "Switching equipment congestion"; break;
4627 case 0x2B: str = "Access information discarded information element ids"; break;
4628 case 0x2C: str = "requested circuit/channel not available"; break;
4629 case 0x2F: str = "Resources unavailable, unspecified"; break;
4630 case 0x31: str = "Quality of service unavailable"; break;
4631 case 0x32: str = "Requested facility not subscribed"; break;
4632 case 0x33: str = "Request MUX option or rates unavailable"; break;
4633 case 0x39: str = "Bearer capability not authorized"; break;
4634 case 0x3A: str = "Bearer capability not presently available"; break;
4635 case 0x3B: str = "SSD Update Rejected"; break;
4636 case 0x3F: str = "Service or option not available, unspecified"; break;
4637 case 0x41: str = "Bearer service not implemented"; break;
4638 case 0x45: str = "Requested facility not implement"; break;
4639 case 0x46: str = "Only restricted digital information bearer capability is available"; break;
4640 case 0x4F: str = "Service or option not implemented, unspecified"; break;
4641 case 0x51: str = "Reserved"; break;
4642 case 0x58: str = "Incompatible destination incompatible parameter"; break;
4643 case 0x5B: str = "Invalid transit network selection"; break;
4644 case 0x5F: str = "Invalid message, unspecified"; break;
4645 case 0x60: str = "Mandatory information element error information element identifier(s)"; break;
4646 case 0x61: str = "Message type nonexistent or not implemented message type"; break;
4647 case 0x62: str = "Message not compatible with control state message type or message type nonexistent or not implemented"; break;
4648 case 0x64: str = "Invalid information element contents Information element Identifier(s)"; break;
4649 case 0x65: str = "Message not compatible with call state message type"; break;
4650 case 0x6F: str = "Protocol error, unspecified"; break;
4651 case 0x7F: str = "Interworking, unspecified"; break;
4657 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4658 proto_tree_add_text(tree,
4659 tvb, curr_offset, 1,
4664 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
4668 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4670 return(curr_offset - offset);
4687 elem_xmode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4690 guint32 curr_offset;
4692 curr_offset = offset;
4694 oct = tvb_get_guint8(tvb, curr_offset);
4696 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
4697 proto_tree_add_text(tree,
4698 tvb, curr_offset, 1,
4702 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4703 proto_tree_add_text(tree,
4704 tvb, curr_offset, 1,
4705 "%s : TFO Mode: %s",
4707 (oct & 0x01) ? "TFO" : "tandem");
4709 g_snprintf(add_string, string_len, " - (%s)",
4710 (oct & 0x01) ? "TFO" : "tandem");
4714 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4716 return(curr_offset - offset);
4726 * NO ASSOCIATED DATA
4733 elem_reg_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
4736 guint32 curr_offset;
4739 curr_offset = offset;
4741 oct = tvb_get_guint8(tvb, curr_offset);
4745 case 0x00: str = "Timer-based"; break;
4746 case 0x01: str = "Power-up"; break;
4747 case 0x02: str = "Zone-based"; break;
4748 case 0x03: str = "Power-down"; break;
4749 case 0x04: str = "Parameter-change"; break;
4750 case 0x05: str = "Ordered"; break;
4751 case 0x06: str = "Distance-based"; break;
4752 case 0x07: str = "User Zone-based"; break;
4753 case 0x09: str = "BCMC Registration"; break;
4759 proto_tree_add_text(tree,
4760 tvb, curr_offset, 1,
4761 "Location Registration Type: %s",
4764 g_snprintf(add_string, string_len, " - (%s)", str);
4768 /* no length check possible */
4770 return(curr_offset - offset);
4777 elem_tag(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
4780 guint32 curr_offset;
4782 curr_offset = offset;
4784 value = tvb_get_ntohl(tvb, curr_offset);
4786 proto_tree_add_text(tree,
4787 tvb, curr_offset, 4,
4791 g_snprintf(add_string, string_len, " - (%u)", value);
4795 /* no length check possible */
4797 return(curr_offset - offset);
4804 elem_hho_params(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
4808 guint32 curr_offset;
4811 curr_offset = offset;
4813 oct = tvb_get_guint8(tvb, curr_offset);
4815 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4816 proto_tree_add_text(tree,
4817 tvb, curr_offset, 1,
4821 temp_int = oct & 0x1f;
4822 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
4828 str = band_class_str[temp_int];
4831 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4832 proto_tree_add_text(tree,
4833 tvb, curr_offset, 1,
4834 "%s : Band Class: %s",
4840 g_snprintf(add_string, string_len, " - (%s)", str);
4842 oct = tvb_get_guint8(tvb, curr_offset);
4844 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4845 proto_tree_add_text(tree,
4846 tvb, curr_offset, 1,
4847 "%s : Number of Preamble Frames: %u",
4851 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4852 proto_tree_add_text(tree,
4853 tvb, curr_offset, 1,
4854 "%s : Reset L2: %s Layer 2 Acknowledgement",
4856 (oct & 0x10) ? "Reset" : "Do not reset");
4858 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4859 proto_tree_add_text(tree,
4860 tvb, curr_offset, 1,
4861 "%s : Reset FPC: %s counters",
4863 (oct & 0x10) ? "Reset" : "Do not reset");
4865 switch ((oct & 0x06) >> 1)
4867 case 0: str = "Encryption disabled"; break;
4868 case 1: str = "Encryption enabled"; break;
4874 other_decode_bitfield_value(a_bigbuf, oct, 0x06, 8);
4875 proto_tree_add_text(tree,
4876 tvb, curr_offset, 1,
4877 "%s : Encryption Mode: %s",
4881 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4882 proto_tree_add_text(tree,
4883 tvb, curr_offset, 1,
4884 "%s : Private LCM: %s Private Long Code Mask",
4886 (oct & 0x01) ? "Use" : "Do not use");
4890 oct = tvb_get_guint8(tvb, curr_offset);
4892 switch (global_a_variant)
4894 case A_VARIANT_IOS401:
4895 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4896 proto_tree_add_text(tree,
4897 tvb, curr_offset, 1,
4902 case A_VARIANT_IOS501:
4903 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4904 proto_tree_add_text(tree,
4905 tvb, curr_offset, 1,
4906 "%s : Rev_Pwr_Cntl_Delay_Incl",
4909 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4910 proto_tree_add_text(tree, tvb, curr_offset, 1,
4911 "%s : Rev_Pwr_Cntl_Delay",
4916 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4917 proto_tree_add_text(tree,
4918 tvb, curr_offset, 1,
4922 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4923 proto_tree_add_text(tree,
4924 tvb, curr_offset, 1,
4931 oct = tvb_get_guint8(tvb, curr_offset);
4933 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
4934 proto_tree_add_text(tree,
4935 tvb, curr_offset, 1,
4939 other_decode_bitfield_value(a_bigbuf, oct, 0x3e, 8);
4940 proto_tree_add_text(tree,
4941 tvb, curr_offset, 1,
4942 "%s : FPC Subchannel Information: %u",
4946 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4947 proto_tree_add_text(tree,
4948 tvb, curr_offset, 1,
4949 "%s : FPC Subchannel Information Included",
4954 oct = tvb_get_guint8(tvb, curr_offset);
4956 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4957 proto_tree_add_text(tree,
4958 tvb, curr_offset, 1,
4962 other_decode_bitfield_value(a_bigbuf, oct, 0x0e, 8);
4963 proto_tree_add_text(tree,
4964 tvb, curr_offset, 1,
4965 "%s : Power Control Step: %u",
4969 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4970 proto_tree_add_text(tree,
4971 tvb, curr_offset, 1,
4972 "%s : Power Control Step Included",
4977 /* no length check possible */
4979 return(curr_offset - offset);
4991 elem_sw_ver(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4993 guint8 major, minor, point;
4994 guint32 curr_offset;
4996 curr_offset = offset;
4998 major = tvb_get_guint8(tvb, curr_offset);
5000 proto_tree_add_text(tree,
5001 tvb, curr_offset, 1,
5002 "IOS Major Revision Level: %u",
5007 minor = tvb_get_guint8(tvb, curr_offset);
5009 proto_tree_add_text(tree,
5010 tvb, curr_offset, 1,
5011 "IOS Minor Revision Level: %u",
5016 point = tvb_get_guint8(tvb, curr_offset);
5018 proto_tree_add_text(tree,
5019 tvb, curr_offset, 1,
5020 "IOS Point Revision Level: %u",
5025 g_snprintf(add_string, string_len, " - (IOS %u.%u.%u)", major, minor, point);
5029 proto_tree_add_text(tree, tvb, curr_offset, len - 3,
5030 "Manufacturer/Carrier Software Information");
5032 curr_offset += len - 3;
5035 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5037 return(curr_offset - offset);
5044 elem_so(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
5047 guint32 curr_offset;
5049 curr_offset = offset;
5051 value = tvb_get_ntohs(tvb, curr_offset);
5053 other_decode_bitfield_value(a_bigbuf, value, 0x8000, 16);
5054 proto_tree_add_text(tree,
5055 tvb, curr_offset, 2,
5056 "%s : Proprietary Indicator",
5059 other_decode_bitfield_value(a_bigbuf, value, 0x7000, 16);
5060 proto_tree_add_text(tree,
5061 tvb, curr_offset, 2,
5062 "%s : Service Option Revision",
5065 other_decode_bitfield_value(a_bigbuf, value, 0x0fff, 16);
5066 proto_tree_add_text(tree,
5067 tvb, curr_offset, 2,
5068 "%s : Base Service Option Number",
5071 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
5073 proto_tree_add_uint_format(tree, hf_ansi_a_so, tvb,
5074 curr_offset, 2, value,
5077 ansi_a_so_int_to_str(value));
5081 /* no length check possible */
5083 return(curr_offset - offset);
5090 elem_soci(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5093 guint32 curr_offset;
5095 curr_offset = offset;
5097 oct = tvb_get_guint8(tvb, curr_offset);
5099 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5100 proto_tree_add_text(tree,
5101 tvb, curr_offset, 1,
5105 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5106 proto_tree_add_text(tree,
5107 tvb, curr_offset, 1,
5112 g_snprintf(add_string, string_len, " - (%u)", oct);
5116 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5118 return(curr_offset - offset);
5125 elem_so_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5130 guint32 curr_offset;
5132 proto_tree *subtree;
5134 curr_offset = offset;
5136 num_so = tvb_get_guint8(tvb, curr_offset);
5138 proto_tree_add_text(tree, tvb, curr_offset, 1,
5139 "Number of Service Option instances: %u",
5143 * this is in case we leave the function before the
5144 * loop through the instances
5146 g_snprintf(add_string, string_len, " - %u service options", num_so);
5150 NO_MORE_DATA_CHECK(len);
5152 SHORT_DATA_CHECK(len - (curr_offset - offset), 3);
5159 proto_tree_add_text(tree,
5160 tvb, curr_offset, 1,
5161 "Service Option Instance [%u]",
5164 subtree = proto_item_add_subtree(item, ett_so_list);
5166 oct = tvb_get_guint8(tvb, curr_offset);
5168 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5169 proto_tree_add_text(subtree,
5170 tvb, curr_offset, 1,
5174 other_decode_bitfield_value(a_bigbuf, oct, 0x38, 8);
5175 proto_tree_add_text(subtree,
5176 tvb, curr_offset, 1,
5181 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5182 proto_tree_add_text(subtree,
5183 tvb, curr_offset, 1,
5190 curr_offset += elem_so(tvb, pinfo, subtree, curr_offset, len, add_string, string_len);
5191 add_string[0] = '\0';
5195 while ((len - (curr_offset - offset)) >= 3);
5198 * this is because 'add_string' was used by 'elem_so()'
5200 g_snprintf(add_string, string_len, " - %u service options", num_so);
5202 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5204 return(curr_offset - offset);
5211 elem_acc_net_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5214 guint32 sid, nid, pzid;
5215 guint32 curr_offset;
5217 curr_offset = offset;
5219 value = tvb_get_ntohs(tvb, curr_offset);
5220 sid = value & 0x7fff;
5222 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x80, 8);
5223 proto_tree_add_text(tree, tvb, curr_offset, 1,
5227 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x7f, 8);
5228 proto_tree_add_text(tree, tvb, curr_offset, 1,
5229 "%s : SID (MSB), %u",
5233 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
5234 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
5240 nid = tvb_get_ntohs(tvb, curr_offset);
5242 proto_tree_add_text(tree,
5243 tvb, curr_offset, 2,
5249 pzid = tvb_get_ntohs(tvb, curr_offset);
5251 proto_tree_add_text(tree,
5252 tvb, curr_offset, 2,
5258 g_snprintf(add_string, string_len, " - (SID/NID/PZID: %u/%u/%u)", sid, nid, pzid);
5260 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5262 return(curr_offset - offset);
5266 #define ADDS_APP_UNKNOWN 0x00
5267 #define ADDS_APP_ADS 0x01
5268 #define ADDS_APP_FAX 0x02
5269 #define ADDS_APP_SMS 0x03
5270 #define ADDS_APP_OTA 0x04
5271 #define ADDS_APP_PDS 0x05 /* aka PLD */
5272 #define ADDS_APP_SDB 0x06
5273 #define ADDS_APP_HRPD 0x07
5274 #define ADDS_APP_EXT_INTL 0x3E
5275 #define ADDS_APP_EXT 0x3F
5277 static const value_string ansi_a_adds_strings[] = {
5278 { ADDS_APP_UNKNOWN, "UNKNOWN" },
5279 { ADDS_APP_ADS, "ADS" },
5280 { ADDS_APP_FAX, "FAX" },
5281 { ADDS_APP_SMS, "SMS" },
5282 { ADDS_APP_OTA, "OTA" },
5283 { ADDS_APP_PDS, "PDS" },
5284 { ADDS_APP_SDB, "SDB" },
5285 { ADDS_APP_HRPD, "HRPD" },
5286 { ADDS_APP_EXT_INTL, "EXT_INTL" },
5287 { ADDS_APP_EXT, "EXT" },
5295 elem_adds_user_part(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5300 guint32 curr_offset;
5304 proto_tree *subtree;
5307 curr_offset = offset;
5310 oct = tvb_get_guint8(tvb, curr_offset);
5312 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5313 proto_tree_add_text(tree,
5314 tvb, curr_offset, 1,
5318 adds_app = oct & 0x3f;
5320 str = match_strval_idx((guint32) adds_app, ansi_a_adds_strings, &idx);
5325 g_snprintf(add_string, string_len, " - (%s)", str);
5327 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
5328 proto_tree_add_text(tree,
5329 tvb, curr_offset, 1,
5330 "%s : Data Burst Type: %s",
5337 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
5338 "Application Data Message");
5340 subtree = proto_item_add_subtree(item, ett_adds_user_part);
5345 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5347 dissector_try_uint(is637_dissector_table,
5348 0, adds_tvb, pinfo, g_tree);
5350 curr_offset += (len - 1);
5354 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5356 dissector_try_uint(is683_dissector_table,
5357 (pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, pinfo, g_tree);
5359 curr_offset += (len - 1);
5363 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5365 dissector_try_uint(is801_dissector_table,
5366 (pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, pinfo, g_tree);
5368 curr_offset += (len - 1);
5373 * no SDB dissector, push to GRE/A11 dissector ?
5375 curr_offset += (len - 1);
5378 case ADDS_APP_EXT_INTL:
5380 * no generic External International dissector
5382 value = tvb_get_ntohs(tvb, curr_offset);
5384 proto_tree_add_text(subtree,
5385 tvb, curr_offset, 2,
5386 "Extended Burst Type - International: 0x%04x", value);
5390 proto_tree_add_text(tree, tvb, curr_offset, len - (curr_offset - offset),
5393 curr_offset += len - (curr_offset - offset);
5397 value = tvb_get_ntohs(tvb, curr_offset);
5399 proto_tree_add_text(subtree,
5400 tvb, curr_offset, 2,
5401 "Extended Burst Type: 0x%04x", value);
5405 proto_tree_add_text(subtree, tvb, curr_offset, len - (curr_offset - offset),
5408 curr_offset += len - (curr_offset - offset);
5415 curr_offset += (len - 1);
5419 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5421 return(curr_offset - offset);
5428 elem_amps_hho_param(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5431 guint32 curr_offset;
5433 curr_offset = offset;
5435 oct = tvb_get_guint8(tvb, curr_offset);
5437 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
5438 proto_tree_add_text(tree, tvb, curr_offset, 1,
5442 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5443 proto_tree_add_text(tree, tvb, curr_offset, 1,
5444 "%s : Encryption Mode: (%u) %s",
5447 (oct & 0x03) ? "enabled" : "disabled");
5451 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5453 return(curr_offset - offset);
5460 elem_is2000_scr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5462 guint8 oct, num_con_rec, i;
5463 guint8 bit_mask, bit_offset;
5464 guint32 curr_offset, saved_offset;
5466 guint is2000_portion_len;
5467 proto_tree *scr_subtree, *subtree;
5468 proto_item *item = NULL;
5469 const gchar *str = NULL;
5471 curr_offset = offset;
5473 oct = tvb_get_guint8(tvb, curr_offset);
5475 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5476 proto_tree_add_text(tree, tvb, curr_offset, 1,
5480 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5481 proto_tree_add_text(tree, tvb, curr_offset, 1,
5482 "%s : Bit-Exact Length Fill Bits: %u",
5488 is2000_portion_len = len - (curr_offset - offset);
5491 * the following decode was modified from the packet-ansi_map.c version
5494 SHORT_DATA_CHECK(is2000_portion_len, 7);
5496 saved_offset = curr_offset;
5499 proto_tree_add_text(tree, tvb, curr_offset,
5501 "IS-2000 Service Configuration Record Content");
5504 proto_item_add_subtree(item, ett_scr);
5506 proto_tree_add_text(scr_subtree, tvb,
5508 "FOR_MUX_OPTION: Forward Traffic Channel multiplex option");
5512 proto_tree_add_text(scr_subtree, tvb,
5514 "REV_MUX_OPTION: Reverse Traffic Channel multiplex option");
5518 proto_tree_add_text(scr_subtree, tvb,
5520 "FOR_RATES: Transmission rates of the Forward Fundamental Channel");
5524 proto_tree_add_text(scr_subtree, tvb,
5526 "REV_RATES: Transmission rates of the Reverse Fundamental Channel");
5530 num_con_rec = tvb_get_guint8(tvb, curr_offset);
5532 proto_tree_add_text(scr_subtree, tvb,
5534 "NUM_CON_REC: Number of service option connection records, %u",
5539 for (i=1; i <= num_con_rec; i++)
5541 oct = tvb_get_guint8(tvb, curr_offset);
5544 proto_tree_add_text(scr_subtree, tvb,
5545 curr_offset, oct /* oct already includes the length octet itself */,
5546 "Service option connection record [%u]",
5550 proto_item_add_subtree(item, ett_srvc_con_rec);
5554 oct = tvb_get_guint8(tvb, curr_offset);
5556 proto_tree_add_text(subtree, tvb,
5558 "CON_REF: Service option connection reference, %u",
5563 value = tvb_get_ntohs(tvb, curr_offset);
5565 proto_tree_add_text(subtree, tvb,
5567 "SERVICE_OPTION: %s",
5568 ansi_a_so_int_to_str(value));
5572 oct = tvb_get_guint8(tvb, curr_offset);
5574 switch ((oct & 0xf0) >> 4)
5576 case 0x00: str = "The service option connection does not use Forward Traffic Channel traffic."; break;
5577 case 0x01: str = "The service option connection uses primary traffic on the Forward Traffic Channel."; break;
5578 case 0x02: str = "The service option connection uses secondary traffic on the Forward Traffic Channel."; break;
5579 default: str = "Reserved"; break;
5582 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5583 proto_tree_add_text(subtree, tvb,
5585 "%s : FOR_TRAFFIC: Forward Traffic Channel traffic type, %s",
5591 case 0x00: str = "The service option connection does not use Reverse Traffic Channel traffic."; break;
5592 case 0x01: str = "The service option connection uses primary traffic on the Reverse Traffic Channel."; break;
5593 case 0x02: str = "The service option connection uses secondary traffic on the Reverse Traffic Channel."; break;
5594 default: str = "Reserved"; break;
5597 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5598 proto_tree_add_text(subtree, tvb,
5600 "%s : REV_TRAFFIC: Reverse Traffic Channel traffic type, %s",
5606 oct = tvb_get_guint8(tvb, curr_offset);
5608 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5609 proto_tree_add_text(subtree, tvb,
5611 "%s : UI_ENCRYPT_MODE: Encryption mode indicator for user information privacy",
5614 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
5615 proto_tree_add_text(subtree, tvb,
5617 "%s : SR_ID: Service reference identifier",
5620 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5621 proto_tree_add_text(subtree, tvb,
5623 "%s : RLP_INFO_INCL: RLP information included indicator",
5628 value = (oct & 0x01) << 3;
5629 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5633 oct = tvb_get_guint8(tvb, curr_offset);
5635 value |= (oct & 0xe0) >> 5;
5637 proto_tree_add_text(subtree, tvb,
5639 "%s : RLP_BLOB_LEN (MSB), %u",
5643 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5644 proto_tree_add_text(subtree, tvb,
5646 "%s : RLP_BLOB_LEN (LSB)",
5649 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5650 proto_tree_add_text(subtree, tvb,
5652 "%s : RLP_BLOB (MSB)",
5659 proto_tree_add_text(subtree, tvb,
5660 curr_offset, value - 1,
5663 curr_offset += value - 1;
5666 oct = tvb_get_guint8(tvb, curr_offset);
5668 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5669 proto_tree_add_text(subtree, tvb,
5671 "%s : RLP_BLOB (LSB)",
5674 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5675 proto_tree_add_text(subtree, tvb,
5682 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5683 proto_tree_add_text(subtree, tvb,
5692 oct = tvb_get_guint8(tvb, curr_offset);
5694 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5695 proto_tree_add_text(scr_subtree, tvb,
5697 "%s : FCH_CC_INCL: Channel configuration for the Fundamental Channel included indicator",
5702 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5703 proto_tree_add_text(scr_subtree, tvb,
5705 "%s : FCH_FRAME_SIZE: Fundamental Channel frame size supported indicator",
5708 other_decode_bitfield_value(a_bigbuf, oct, 0x3e, 8);
5709 proto_tree_add_text(scr_subtree, tvb,
5711 "%s : FOR_FCH_RC: Forward Fundamental Channel Radio Configuration, %u",
5715 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5716 value = (oct & 0x01) << 4;
5720 oct = tvb_get_guint8(tvb, curr_offset);
5722 value |= (oct & 0xf0) >> 4;
5724 proto_tree_add_text(scr_subtree, tvb,
5726 "%s : REV_FCH_RC: Reverse Fundamental Channel Radio Configuration (MSB), %u",
5730 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5731 proto_tree_add_text(scr_subtree, tvb,
5733 "%s : REV_FCH_RC: (LSB)",
5745 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5746 proto_tree_add_text(scr_subtree, tvb,
5748 "%s : DCCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5753 /* can't be bothered to do the rest of the decode */
5755 proto_tree_add_text(scr_subtree, tvb,
5756 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5757 "DCCH + ? + Reserved");
5759 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5766 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5767 proto_tree_add_text(scr_subtree, tvb,
5769 "%s : FOR_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5774 /* can't be bothered to do the rest of the decode */
5776 proto_tree_add_text(scr_subtree, tvb,
5777 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5778 "FOR_SCH + ? + Reserved");
5780 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5787 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5788 proto_tree_add_text(scr_subtree, tvb,
5790 "%s : REV_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5795 /* can't be bothered to do the rest of the decode */
5797 proto_tree_add_text(scr_subtree, tvb,
5798 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5799 "REV_SCH + ? + Reserved");
5801 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5805 bit_mask = (0xff << (8 - bit_offset));
5806 bit_mask >>= (8 - bit_offset);
5808 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5809 proto_tree_add_text(scr_subtree, tvb,
5819 EXTRANEOUS_DATA_CHECK_EXPERT(len, curr_offset - offset);
5821 return(curr_offset - offset);
5828 elem_is2000_nn_scr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5831 guint32 curr_offset;
5832 guint is2000_portion_len;
5834 curr_offset = offset;
5836 oct = tvb_get_guint8(tvb, curr_offset);
5838 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5839 proto_tree_add_text(tree, tvb, curr_offset, 1,
5843 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5844 proto_tree_add_text(tree, tvb, curr_offset, 1,
5845 "%s : Bit-Exact Length Fill Bits: %u",
5851 is2000_portion_len = len - (curr_offset - offset);
5855 NO_MORE_DATA_CHECK(len);
5857 if (is2000_portion_len > 0)
5859 SHORT_DATA_CHECK(len - (curr_offset - offset), is2000_portion_len);
5861 proto_tree_add_text(tree, tvb, curr_offset, is2000_portion_len,
5862 "IS-2000 Non-Negotiable Service Configuration Record Content");
5864 curr_offset += is2000_portion_len;
5872 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5874 return(curr_offset - offset);
5881 elem_is2000_mob_cap(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5885 guint32 curr_offset;
5886 proto_tree *subtree;
5887 proto_item *item = NULL;
5890 curr_offset = offset;
5892 oct = tvb_get_guint8(tvb, curr_offset);
5894 switch (global_a_variant)
5896 case A_VARIANT_IOS401:
5897 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5898 proto_tree_add_text(tree, tvb, curr_offset, 1,
5903 case A_VARIANT_IOS501:
5904 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5905 proto_tree_add_text(tree, tvb, curr_offset, 1,
5906 "%s : REV_PDCH Supported: IS-2000 R-PDCH %ssupported",
5908 (oct & 0x80) ? "" : "not ");
5910 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5911 proto_tree_add_text(tree, tvb, curr_offset, 1,
5912 "%s : FOR_PDCH Supported: IS-2000 F-PDCH %ssupported",
5914 (oct & 0x40) ? "" : "not ");
5916 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
5917 proto_tree_add_text(tree, tvb, curr_offset, 1,
5918 "%s : ERAM Supported: Enhanced Rate Adaptation Mode %ssupported",
5920 (oct & 0x20) ? "" : "not ");
5924 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5925 proto_tree_add_text(tree, tvb, curr_offset, 1,
5926 "%s : DCCH Supported: IS-2000 DCCH %ssupported",
5928 (oct & 0x10) ? "" : "not ");
5930 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5931 proto_tree_add_text(tree, tvb, curr_offset, 1,
5932 "%s : FCH Supported: IS-2000 FCH %ssupported",
5934 (oct & 0x08) ? "" : "not ");
5936 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
5937 proto_tree_add_text(tree, tvb, curr_offset, 1,
5938 "%s : OTD Supported: Orthogonal Transmit Diversity %ssupported",
5940 (oct & 0x04) ? "" : "not ");
5942 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5943 proto_tree_add_text(tree, tvb, curr_offset, 1,
5944 "%s : Enhanced RC CFG Supported: Radio configuration in radio class 2 %ssupported",
5946 (oct & 0x02) ? "" : "not ");
5948 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5949 proto_tree_add_text(tree, tvb, curr_offset, 1,
5950 "%s : QPCH Supported: Quick Paging Channel %ssupported",
5952 (oct & 0x01) ? "" : "not ");
5956 NO_MORE_DATA_CHECK(len);
5958 oct_len = tvb_get_guint8(tvb, curr_offset);
5960 proto_tree_add_text(tree,
5961 tvb, curr_offset, 1,
5962 "FCH Information: Bit-Exact Length Octet Count: %u",
5967 NO_MORE_DATA_CHECK(len);
5969 oct = tvb_get_guint8(tvb, curr_offset);
5971 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5972 proto_tree_add_text(tree, tvb, curr_offset, 1,
5976 switch ((oct & 0x70) >> 4)
5978 case 0: str = "No mobile assisted geo-location capabilities"; break;
5979 case 1: str = "IS801 capable (Advanced Forward Link Triangulation only (AFLT))"; break;
5980 case 2: str = "IS801 capable (Advanced Forward Link Triangulation and Global Positioning Systems"; break;
5981 case 3: str = "Global Positioning Systems Only"; break;
5987 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
5988 proto_tree_add_text(tree, tvb, curr_offset, 1,
5989 "%s : Geo Location Type: %s",
5993 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5994 proto_tree_add_text(tree, tvb, curr_offset, 1,
5995 "%s : Geo Location Included",
5998 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5999 proto_tree_add_text(tree, tvb, curr_offset, 1,
6000 "%s : FCH Information: Bit-Exact Length Fill Bits: %u",
6006 NO_MORE_DATA_CHECK(len);
6010 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6012 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6013 "FCH Information Content");
6015 curr_offset += oct_len;
6017 NO_MORE_DATA_CHECK(len);
6023 oct_len = tvb_get_guint8(tvb, curr_offset);
6025 proto_tree_add_text(tree,
6026 tvb, curr_offset, 1,
6027 "DCCH Information: Bit-Exact Length Octet Count: %u",
6032 NO_MORE_DATA_CHECK(len);
6034 oct = tvb_get_guint8(tvb, curr_offset);
6036 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6037 proto_tree_add_text(tree, tvb, curr_offset, 1,
6041 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6042 proto_tree_add_text(tree, tvb, curr_offset, 1,
6043 "%s : DCCH Information: Bit-Exact Length Fill Bits: %u",
6049 NO_MORE_DATA_CHECK(len);
6053 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6055 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6056 "DCCH Information Content");
6058 curr_offset += oct_len;
6060 NO_MORE_DATA_CHECK(len);
6066 oct_len = tvb_get_guint8(tvb, curr_offset);
6068 proto_tree_add_text(tree,
6069 tvb, curr_offset, 1,
6070 "FOR_PDCH Information: Bit-Exact Length Octet Count: %u",
6075 NO_MORE_DATA_CHECK(len);
6077 oct = tvb_get_guint8(tvb, curr_offset);
6079 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6080 proto_tree_add_text(tree, tvb, curr_offset, 1,
6084 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6085 proto_tree_add_text(tree, tvb, curr_offset, 1,
6086 "%s : FOR_PDCH Information: Bit-Exact Length Fill Bits: %u",
6092 NO_MORE_DATA_CHECK(len);
6096 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6098 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6099 "FOR_PDCH Information Content");
6101 curr_offset += oct_len;
6103 NO_MORE_DATA_CHECK(len);
6109 oct_len = tvb_get_guint8(tvb, curr_offset);
6111 proto_tree_add_text(tree,
6112 tvb, curr_offset, 1,
6113 "REV_PDCH Information: Bit-Exact Length Octet Count: %u",
6118 NO_MORE_DATA_CHECK(len);
6120 oct = tvb_get_guint8(tvb, curr_offset);
6122 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6123 proto_tree_add_text(tree, tvb, curr_offset, 1,
6127 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6128 proto_tree_add_text(tree, tvb, curr_offset, 1,
6129 "%s : REV_PDCH Information: Bit-Exact Length Fill Bits: %u",
6135 NO_MORE_DATA_CHECK(len);
6139 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6141 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6142 "REV_PDCH Information Content");
6144 curr_offset += oct_len;
6146 NO_MORE_DATA_CHECK(len);
6149 oct = tvb_get_guint8(tvb, curr_offset);
6152 proto_tree_add_text(tree, tvb,
6154 "VP Algorithms Supported%s",
6155 oct ? "" : ": No voice privacy supported");
6160 proto_item_add_subtree(item, ett_vp_algs);
6162 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6163 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6166 (oct & 0x80) ? "No extension" : "Extended");
6168 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6169 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6170 "%s : A7: Reserved",
6173 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6174 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6175 "%s : A6: Reserved",
6178 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6179 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6180 "%s : A5: Reserved",
6183 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6184 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6185 "%s : A4: Reserved",
6188 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6189 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6190 "%s : A3: Reserved",
6193 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6194 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6195 "%s : A2: Advanced Encryption Standard (AES)",
6198 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6199 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6200 "%s : A1: Private long code",
6204 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6206 return(curr_offset - offset);
6213 elem_ptype(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6216 guint32 curr_offset;
6219 curr_offset = offset;
6221 value = tvb_get_ntohs(tvb, curr_offset);
6225 case 0x880b: str = "PPP"; break;
6226 case 0x8881: str = "Unstructured Byte Stream"; break;
6232 proto_tree_add_text(tree,
6233 tvb, curr_offset, 2,
6238 g_snprintf(add_string, string_len, " - (%s)", str);
6242 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6244 return(curr_offset - offset);
6251 elem_fwd_ms_info_recs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6258 guint32 curr_offset;
6260 gint ett_elem_idx, idx, i;
6261 proto_tree *subtree;
6264 curr_offset = offset;
6268 while ((len - (curr_offset - offset)) >= 2)
6272 rec_type = tvb_get_guint8(tvb, curr_offset);
6274 str = match_strval_idx((guint32) rec_type, ansi_fwd_ms_info_rec_str, &idx);
6279 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
6283 ett_elem_idx = ett_ansi_fwd_ms_info_rec[idx];
6287 proto_tree_add_text(tree,
6288 tvb, curr_offset, 1,
6289 "Information Record Type [%u]: (%u) %s",
6294 subtree = proto_item_add_subtree(item, ett_elem_idx);
6298 oct_len = tvb_get_guint8(tvb, curr_offset);
6300 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
6301 curr_offset, 1, oct_len);
6307 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6311 case ANSI_FWD_MS_INFO_REC_CLD_PN:
6312 oct = tvb_get_guint8(tvb, curr_offset);
6314 switch ((oct & 0xe0) >> 5)
6316 case 0: str = "Unknown"; break;
6317 case 1: str = "International number"; break;
6318 case 2: str = "National number"; break;
6319 case 3: str = "Network-specific number"; break;
6320 case 4: str = "Subscriber number"; break;
6321 case 5: str = "Reserved"; break;
6322 case 6: str = "Abbreviated number"; break;
6324 str = "Reserved for extension";
6328 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
6329 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6330 "%s : Number Type: %s",
6334 switch ((oct & 0x1e) >> 1)
6336 case 0x00: str = "Unknown"; break;
6337 case 0x01: str = "ISDN/Telephony Numbering"; break;
6338 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6339 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6340 case 0x09: str = "Private Numbering"; break;
6341 case 0x0f: str = "Reserved for extension"; break;
6347 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6348 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6349 "%s : Number Plan: %s",
6355 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6356 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6357 "%s : MSB of first digit",
6362 for (i=0; i < (oct_len - 1); i++)
6364 a_bigbuf[i] = (oct & 0x01) << 7;
6366 oct = tvb_get_guint8(tvb, curr_offset + i);
6368 a_bigbuf[i] |= (oct & 0xfe) >> 1;
6372 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 1,
6376 curr_offset += (oct_len - 2);
6379 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6380 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6387 case ANSI_FWD_MS_INFO_REC_CLG_PN:
6388 value = tvb_get_ntohs(tvb, curr_offset);
6390 oct = (value & 0xff00) >> 8;
6392 switch ((oct & 0xe0) >> 5)
6394 case 0: str = "Unknown"; break;
6395 case 1: str = "International number"; break;
6396 case 2: str = "National number"; break;
6397 case 3: str = "Network-specific number"; break;
6398 case 4: str = "Subscriber number"; break;
6399 case 5: str = "Reserved"; break;
6400 case 6: str = "Abbreviated number"; break;
6402 str = "Reserved for extension";
6406 other_decode_bitfield_value(a_bigbuf, value, 0xe000, 16);
6407 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6408 "%s : Number Type: %s",
6412 switch ((oct & 0x1e) >> 1)
6414 case 0x00: str = "Unknown"; break;
6415 case 0x01: str = "ISDN/Telephony Numbering"; break;
6416 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6417 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6418 case 0x09: str = "Private Numbering"; break;
6419 case 0x0f: str = "Reserved for extension"; break;
6425 other_decode_bitfield_value(a_bigbuf, value, 0x1e00, 16);
6426 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6427 "%s : Number Plan: %s",
6431 switch ((value & 0x0180) >> 7)
6433 case 0: str = "Presentation allowed"; break;
6434 case 1: str = "Presentation restricted"; break;
6435 case 2: str = "Number not available"; break;
6441 other_decode_bitfield_value(a_bigbuf, value, 0x0180, 16);
6442 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6443 "%s : Presentation Indicator (PI): %s",
6447 switch ((value & 0x0060) >> 5)
6449 case 0: str = "User-provided, not screened"; break;
6450 case 1: str = "User-provided, verified and passed"; break;
6451 case 2: str = "User-provided, verified and failed"; break;
6453 str = "Network-provided";
6457 other_decode_bitfield_value(a_bigbuf, value, 0x0060, 16);
6458 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6459 "%s : Screening Indicator (SI): %s",
6465 oct = (value & 0x00ff);
6467 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6468 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6469 "%s : MSB of first digit",
6474 for (i=0; i < (oct_len - 2); i++)
6476 a_bigbuf[i] = (oct & 0x1f) << 3;
6478 oct = tvb_get_guint8(tvb, curr_offset + i);
6480 a_bigbuf[i] |= (oct & 0xe0) >> 5;
6484 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 2,
6488 curr_offset += (oct_len - 3);
6490 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6491 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6499 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6500 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6508 case ANSI_FWD_MS_INFO_REC_MW:
6509 oct = tvb_get_guint8(tvb, curr_offset);
6511 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6512 "Number of messages waiting: %u",
6519 proto_tree_add_text(subtree,
6520 tvb, curr_offset, oct_len,
6523 curr_offset += oct_len;
6529 g_snprintf(add_string, string_len, " - %u record%s",
6530 num_recs, plurality(num_recs, "", "s"));
6532 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6534 return(curr_offset - offset);
6541 elem_rev_ms_info_recs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6548 guint32 curr_offset, saved_offset;
6550 gint ett_elem_idx, idx, i;
6551 proto_tree *subtree, *subtree2;
6555 curr_offset = offset;
6559 while ((len - (curr_offset - offset)) >= 2)
6563 rec_type = tvb_get_guint8(tvb, curr_offset);
6565 str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
6570 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
6574 ett_elem_idx = ett_ansi_rev_ms_info_rec[idx];
6578 proto_tree_add_text(tree,
6579 tvb, curr_offset, 1,
6580 "Information Record Type [%u]: (%u) %s",
6585 subtree = proto_item_add_subtree(item, ett_elem_idx);
6589 oct_len = tvb_get_guint8(tvb, curr_offset);
6591 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
6592 curr_offset, 1, oct_len);
6598 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6602 case ANSI_REV_MS_INFO_REC_KEYPAD_FAC:
6603 poctets = tvb_get_ephemeral_string(tvb, curr_offset, oct_len);
6605 proto_tree_add_string_format(subtree, hf_ansi_a_cld_party_ascii_num,
6606 tvb, curr_offset, oct_len,
6609 (gchar *) format_text(poctets, oct_len));
6611 curr_offset += oct_len;
6614 case ANSI_REV_MS_INFO_REC_CLD_PN:
6615 oct = tvb_get_guint8(tvb, curr_offset);
6617 switch ((oct & 0xe0) >> 5)
6619 case 0: str = "Unknown"; break;
6620 case 1: str = "International number"; break;
6621 case 2: str = "National number"; break;
6622 case 3: str = "Network-specific number"; break;
6623 case 4: str = "Subscriber number"; break;
6624 case 5: str = "Reserved"; break;
6625 case 6: str = "Abbreviated number"; break;
6627 str = "Reserved for extension";
6631 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
6632 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6633 "%s : Number Type: %s",
6637 switch ((oct & 0x1e) >> 1)
6639 case 0x00: str = "Unknown"; break;
6640 case 0x01: str = "ISDN/Telephony Numbering"; break;
6641 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6642 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6643 case 0x09: str = "Private Numbering"; break;
6644 case 0x0f: str = "Reserved for extension"; break;
6650 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6651 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6652 "%s : Number Plan: %s",
6658 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6659 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6660 "%s : MSB of first digit",
6665 for (i=0; i < (oct_len - 1); i++)
6667 a_bigbuf[i] = (oct & 0x01) << 7;
6669 oct = tvb_get_guint8(tvb, curr_offset + i);
6671 a_bigbuf[i] |= (oct & 0xfe) >> 1;
6675 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 1,
6679 curr_offset += (oct_len - 2);
6682 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6683 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6690 case ANSI_REV_MS_INFO_REC_CLG_PN:
6691 value = tvb_get_ntohs(tvb, curr_offset);
6693 oct = (value & 0xff00) >> 8;
6695 switch ((oct & 0xe0) >> 5)
6697 case 0: str = "Unknown"; break;
6698 case 1: str = "International number"; break;
6699 case 2: str = "National number"; break;
6700 case 3: str = "Network-specific number"; break;
6701 case 4: str = "Subscriber number"; break;
6702 case 5: str = "Reserved"; break;
6703 case 6: str = "Abbreviated number"; break;
6705 str = "Reserved for extension";
6709 other_decode_bitfield_value(a_bigbuf, value, 0xe000, 16);
6710 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6711 "%s : Number Type: %s",
6715 switch ((oct & 0x1e) >> 1)
6717 case 0x00: str = "Unknown"; break;
6718 case 0x01: str = "ISDN/Telephony Numbering"; break;
6719 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6720 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6721 case 0x09: str = "Private Numbering"; break;
6722 case 0x0f: str = "Reserved for extension"; break;
6728 other_decode_bitfield_value(a_bigbuf, value, 0x1e00, 16);
6729 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6730 "%s : Number Plan: %s",
6734 switch ((value & 0x0180) >> 7)
6736 case 0: str = "Presentation allowed"; break;
6737 case 1: str = "Presentation restricted"; break;
6738 case 2: str = "Number not available"; break;
6744 other_decode_bitfield_value(a_bigbuf, value, 0x0180, 16);
6745 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6746 "%s : Presentation Indicator (PI): %s",
6750 switch ((value & 0x0060) >> 5)
6752 case 0: str = "User-provided, not screened"; break;
6753 case 1: str = "User-provided, verified and passed"; break;
6754 case 2: str = "User-provided, verified and failed"; break;
6756 str = "Network-provided";
6760 other_decode_bitfield_value(a_bigbuf, value, 0x0060, 16);
6761 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6762 "%s : Screening Indicator (SI): %s",
6768 oct = (value & 0x00ff);
6770 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6771 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6772 "%s : MSB of first digit",
6777 for (i=0; i < (oct_len - 2); i++)
6779 a_bigbuf[i] = (oct & 0x1f) << 3;
6781 oct = tvb_get_guint8(tvb, curr_offset + i);
6783 a_bigbuf[i] |= (oct & 0xe0) >> 5;
6787 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 2,
6791 curr_offset += (oct_len - 3);
6793 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6794 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6802 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6803 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6811 case ANSI_REV_MS_INFO_REC_SO_INFO:
6813 saved_offset = curr_offset;
6815 while ((oct_len - (curr_offset - saved_offset)) > 2)
6818 proto_tree_add_text(subtree,
6819 tvb, curr_offset, 3,
6820 "Service Option [%u]",
6823 subtree2 = proto_item_add_subtree(item, ett_so_list);
6825 oct = tvb_get_guint8(tvb, curr_offset);
6827 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
6828 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6832 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6833 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6834 "%s : Forward Support: %s",
6836 (oct & 0x02) ? "TRUE" : "FALSE");
6838 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6839 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6840 "%s : Reverse Support: %s",
6842 (oct & 0x01) ? "TRUE" : "FALSE");
6846 value = tvb_get_ntohs(tvb, curr_offset);
6848 str = ansi_a_so_int_to_str(value);
6849 proto_tree_add_text(subtree2, tvb, curr_offset, 2,
6850 "Service Option: %s (%u)",
6854 proto_item_append_text(item, " - (%u) %s", value, str);
6862 proto_tree_add_text(subtree,
6863 tvb, curr_offset, oct_len,
6866 curr_offset += oct_len;
6872 g_snprintf(add_string, string_len, " - %u record%s",
6873 num_recs, plurality(num_recs, "", "s"));
6875 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6877 return(curr_offset - offset);
6884 elem_ext_ho_dir_params(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
6888 guint32 curr_offset;
6891 curr_offset = offset;
6893 oct = tvb_get_guint8(tvb, curr_offset);
6895 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6896 proto_tree_add_text(tree, tvb, curr_offset, 1,
6897 "%s : Search Window A Size (Srch_Win_A): %u",
6901 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6902 proto_tree_add_text(tree, tvb, curr_offset, 1,
6903 "%s : Search Window N Size (Srch_Win_N): %u",
6909 NO_MORE_DATA_CHECK(len);
6911 oct = tvb_get_guint8(tvb, curr_offset);
6913 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6914 proto_tree_add_text(tree, tvb, curr_offset, 1,
6915 "%s : Search Window R Size (Srch_Win_R): %u",
6919 value = tvb_get_guint8(tvb, curr_offset + 1);
6921 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6922 proto_tree_add_text(tree, tvb, curr_offset, 1,
6923 "%s : Add Pilot Threshold (T_Add) (MSB): %u",
6925 (oct & 0x0f) << 2 | (value & 0xc0) >> 6);
6931 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
6932 proto_tree_add_text(tree, tvb, curr_offset, 1,
6933 "%s : Add Pilot Threshold (T_Add) (LSB)",
6936 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
6937 proto_tree_add_text(tree, tvb, curr_offset, 1,
6938 "%s : Drop Pilot Threshold (T_Drop): %u",
6944 NO_MORE_DATA_CHECK(len);
6946 oct = tvb_get_guint8(tvb, curr_offset);
6948 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6949 proto_tree_add_text(tree, tvb, curr_offset, 1,
6950 "%s : Compare Threshold (T_Comp): %u",
6954 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6955 proto_tree_add_text(tree, tvb, curr_offset, 1,
6956 "%s : Drop Timer Value (T_TDrop): %u",
6962 NO_MORE_DATA_CHECK(len);
6964 oct = tvb_get_guint8(tvb, curr_offset);
6966 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6967 proto_tree_add_text(tree, tvb, curr_offset, 1,
6968 "%s : Neighbor Max Age (Nghbor_Max_AGE): %u",
6972 switch (global_a_variant)
6974 case A_VARIANT_IOS401:
6975 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6976 proto_tree_add_text(tree, tvb, curr_offset, 1,
6981 case A_VARIANT_IOS501:
6982 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
6983 proto_tree_add_text(tree, tvb, curr_offset, 1,
6989 case 0: str = "Only Search Window A Size is valid"; break;
6990 case 1: str = "Subset is valid"; break;
6991 case 2: str = "All fields valid"; break;
6997 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
6998 proto_tree_add_text(tree, tvb, curr_offset, 1,
6999 "%s : Target BS Values Included: %s",
7007 NO_MORE_DATA_CHECK(len);
7009 oct = tvb_get_guint8(tvb, curr_offset);
7011 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7012 proto_tree_add_text(tree, tvb, curr_offset, 1,
7016 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7017 proto_tree_add_text(tree, tvb, curr_offset, 1,
7018 "%s : SOFT_SLOPE: %u",
7024 NO_MORE_DATA_CHECK(len);
7026 oct = tvb_get_guint8(tvb, curr_offset);
7028 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7029 proto_tree_add_text(tree, tvb, curr_offset, 1,
7033 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7034 proto_tree_add_text(tree, tvb, curr_offset, 1,
7035 "%s : ADD_INTERCEPT: %u",
7041 NO_MORE_DATA_CHECK(len);
7043 oct = tvb_get_guint8(tvb, curr_offset);
7045 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7046 proto_tree_add_text(tree, tvb, curr_offset, 1,
7050 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7051 proto_tree_add_text(tree, tvb, curr_offset, 1,
7052 "%s : DROP_INTERCEPT: %u",
7058 NO_MORE_DATA_CHECK(len);
7060 oct = tvb_get_guint8(tvb, curr_offset);
7062 proto_tree_add_text(tree, tvb, curr_offset, 1,
7063 "Target BS P_REV: %u",
7068 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7070 return(curr_offset - offset);
7075 * UNUSED in SPEC and no IEI!
7080 * UNUSED in SPEC and no IEI!
7090 * UNUSED in SPEC and no IEI!
7095 * UNUSED in SPEC and no IEI!
7102 elem_cdma_sowd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7106 guint32 curr_offset;
7107 const gchar *str = NULL;
7109 curr_offset = offset;
7111 curr_offset += elem_cell_id(tvb, pinfo, tree, offset, len, add_string, string_len);
7112 add_string[0] = '\0';
7114 value = tvb_get_ntohs(tvb, curr_offset);
7116 proto_tree_add_text(tree,
7117 tvb, curr_offset, 2,
7118 "CDMA Serving One Way Delay: %u",
7123 oct = tvb_get_guint8(tvb, curr_offset);
7125 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
7126 proto_tree_add_text(tree,
7127 tvb, curr_offset, 1,
7133 case 0: str = "100 nsec"; break;
7134 case 1: str = "50 nsec"; break;
7135 case 2: str = "1/16 CDMA PN Chip"; break;
7136 case 3: str = "Reserved"; break;
7139 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7140 proto_tree_add_text(tree,
7141 tvb, curr_offset, 1,
7142 "%s : Resolution: %s",
7148 if ((len - (curr_offset - offset)) > 1)
7150 proto_tree_add_text(tree,
7151 tvb, curr_offset, 2,
7157 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7159 return(curr_offset - offset);
7176 elem_re_res(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
7179 guint32 curr_offset;
7182 curr_offset = offset;
7184 oct = tvb_get_guint8(tvb, curr_offset);
7186 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7187 proto_tree_add_text(tree,
7188 tvb, curr_offset, 1,
7192 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
7193 proto_tree_add_text(tree,
7194 tvb, curr_offset, 1,
7195 "%s : Include Priority: MSC %s include priority in Assignment Request",
7197 (oct & 0x40) ? "should" : "does not need to");
7199 switch ((oct & 0x30) >> 4)
7201 case 0: str = "Not reported"; break;
7202 case 1: str = "radio environment is acceptable"; break;
7203 case 2: str = "radio environment is marginally acceptable"; break;
7205 str = "radio environment is poor";
7209 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
7210 proto_tree_add_text(tree,
7211 tvb, curr_offset, 1,
7216 switch ((oct & 0x0c) >> 2)
7218 case 0: str = "Not reported"; break;
7219 case 1: str = "radio environment is acceptable"; break;
7220 case 2: str = "radio environment is marginally acceptable"; break;
7222 str = "radio environment is poor";
7226 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
7227 proto_tree_add_text(tree,
7228 tvb, curr_offset, 1,
7233 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7234 proto_tree_add_text(tree,
7235 tvb, curr_offset, 1,
7236 "%s : Alloc: resources are %sallocated",
7238 (oct & 0x02) ? "" : "not ");
7240 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7241 proto_tree_add_text(tree,
7242 tvb, curr_offset, 1,
7243 "%s : Avail: resources are %savailable",
7245 (oct & 0x01) ? "" : "not ");
7249 /* no length check possible */
7251 return(curr_offset - offset);
7256 * UNUSED in SPEC and no IEI!
7291 * UNUSED in SPEC and no IEI!
7368 elem_cld_party_ascii_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7371 guint32 curr_offset;
7375 curr_offset = offset;
7377 oct = tvb_get_guint8(tvb, curr_offset);
7379 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7380 proto_tree_add_text(tree, tvb, curr_offset, 1,
7384 switch ((oct & 0x70) >> 4)
7386 case 0: str = "Unknown"; break;
7387 case 1: str = "International number"; break;
7388 case 2: str = "National number"; break;
7389 case 3: str = "Network specific number"; break;
7390 case 4: str = "Dedicated PAD access, short code"; break;
7391 case 7: str = "Reserved for extension"; break;
7397 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7398 proto_tree_add_text(tree,
7399 tvb, curr_offset, 1,
7400 "%s : Type of Number: %s",
7406 case 0x00: str = "Unknown"; break;
7407 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
7408 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
7409 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
7410 case 0x07: str = "Reserved for extension"; break;
7411 case 0x08: str = "National numbering plan"; break;
7412 case 0x09: str = "Private numbering plan"; break;
7418 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7419 proto_tree_add_text(tree,
7420 tvb, curr_offset, 1,
7421 "%s : Numbering Plan Identification: %s",
7427 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7429 proto_tree_add_string_format(tree, hf_ansi_a_cld_party_ascii_num,
7430 tvb, curr_offset, len - (curr_offset - offset),
7433 (gchar *) format_text(poctets, len - (curr_offset - offset)));
7435 curr_offset += len - (curr_offset - offset);
7437 g_snprintf(add_string, string_len, " - (%s)", poctets);
7439 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7441 return(curr_offset - offset);
7448 elem_band_class(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7451 guint32 curr_offset;
7455 curr_offset = offset;
7457 oct = tvb_get_guint8(tvb, curr_offset);
7459 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
7460 proto_tree_add_text(tree,
7461 tvb, curr_offset, 1,
7465 temp_int = oct & 0x1f;
7466 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
7472 str = band_class_str[temp_int];
7475 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
7476 proto_tree_add_text(tree,
7477 tvb, curr_offset, 1,
7478 "%s : Band Class: %s",
7484 g_snprintf(add_string, string_len, " - (%s)", str);
7486 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7488 return(curr_offset - offset);
7510 elem_is2000_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7512 guint32 curr_offset;
7514 curr_offset = offset;
7516 proto_tree_add_text(tree, tvb, curr_offset, len, "IS-95/IS-2000 Cause Information");
7520 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7522 return(curr_offset - offset);
7544 elem_auth_event(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7547 guint32 curr_offset;
7550 curr_offset = offset;
7554 oct = tvb_get_guint8(tvb, curr_offset);
7558 case 0x01: str = "Event: Authentication parameters were NOT received from mobile"; break;
7559 case 0x02: str = "Event: RANDC mis-match"; break;
7560 case 0x03: str = "Event: Recently requested"; break;
7561 case 0x04: str = "Event: Direct channel assignment"; break;
7567 proto_tree_add_text(tree, tvb, curr_offset, len,
7572 proto_tree_add_text(tree, tvb, curr_offset, len, "Event");
7577 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7579 return(curr_offset - offset);
7694 * Generic decode is good enough
7701 elem_psmm_count(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7704 guint32 curr_offset;
7706 curr_offset = offset;
7708 oct = tvb_get_guint8(tvb, curr_offset);
7710 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
7711 proto_tree_add_text(tree,
7712 tvb, curr_offset, 1,
7716 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7717 proto_tree_add_text(tree,
7718 tvb, curr_offset, 1,
7719 "%s : PSMM Count: %u",
7725 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7727 return(curr_offset - offset);
7734 elem_geo_loc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7736 guint32 curr_offset;
7738 curr_offset = offset;
7740 proto_tree_add_text(tree, tvb, curr_offset, len, "Calling Geodetic Location");
7744 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7746 return(curr_offset - offset);
7793 elem_cct_group(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7797 guint32 curr_offset;
7799 curr_offset = offset;
7801 oct = tvb_get_guint8(tvb, curr_offset);
7803 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
7804 proto_tree_add_text(tree,
7805 tvb, curr_offset, 1,
7809 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7810 proto_tree_add_text(tree,
7811 tvb, curr_offset, 1,
7812 "%s : All Circuits",
7815 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7816 proto_tree_add_text(tree,
7817 tvb, curr_offset, 1,
7823 NO_MORE_DATA_CHECK(len);
7825 oct = tvb_get_guint8(tvb, curr_offset);
7827 proto_tree_add_text(tree,
7828 tvb, curr_offset, 1,
7829 "Count: %u circuit%s",
7830 oct, plurality(oct, "", "s"));
7832 g_snprintf(add_string, string_len, " - %u circuit%s",
7833 oct, plurality(oct, "", "s"));
7837 value = tvb_get_ntohs(tvb, curr_offset);
7839 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
7840 proto_tree_add_text(tree,
7841 tvb, curr_offset, 2,
7842 "%s : PCM Multiplexer: %u",
7844 (value & 0xffe0) >> 5);
7846 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
7847 proto_tree_add_text(tree,
7848 tvb, curr_offset, 2,
7849 "%s : Timeslot: %u",
7855 NO_MORE_DATA_CHECK(len);
7857 proto_tree_add_text(tree,
7858 tvb, curr_offset, len - (curr_offset - offset),
7861 curr_offset += len - (curr_offset - offset);
7863 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7865 return(curr_offset - offset);
7872 elem_paca_ts(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7874 guint32 curr_offset;
7876 curr_offset = offset;
7878 proto_tree_add_text(tree, tvb, curr_offset, len, "PACA Queuing Time");
7882 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7884 return(curr_offset - offset);
7891 elem_paca_order(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7894 guint32 curr_offset;
7897 curr_offset = offset;
7899 oct = tvb_get_guint8(tvb, curr_offset);
7901 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
7902 proto_tree_add_text(tree,
7903 tvb, curr_offset, 1,
7909 case 0: str = "Reserved"; break;
7910 case 1: str = "Update Queue Position and notify MS"; break;
7911 case 2: str = "Remove MS from the queue and release MS"; break;
7912 case 3: str = "Remove MS from the queue"; break;
7913 case 4: str = "MS Requested PACA Cancel"; break;
7914 case 5: str = "BS Requested PACA Cancel"; break;
7920 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7921 proto_tree_add_text(tree,
7922 tvb, curr_offset, 1,
7923 "%s : PACA Action Required: %s",
7929 g_snprintf(add_string, string_len, " - (%s)", str);
7931 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7933 return(curr_offset - offset);
7940 elem_paca_reoi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7943 guint32 curr_offset;
7945 curr_offset = offset;
7947 oct = tvb_get_guint8(tvb, curr_offset);
7949 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
7950 proto_tree_add_text(tree,
7951 tvb, curr_offset, 1,
7955 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7956 proto_tree_add_text(tree,
7957 tvb, curr_offset, 1,
7958 "%s : PACA Reorigination Indicator (PRI)",
7963 g_snprintf(add_string, string_len, " - (%sReorigination)", (oct & 0x01) ? "" : "Not ");
7965 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7967 return(curr_offset - offset);
7974 elem_a2p_bearer_session(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7977 guint32 curr_offset;
7979 curr_offset = offset;
7981 oct = tvb_get_guint8(tvb, curr_offset);
7983 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7984 proto_tree_add_text(tree,
7985 tvb, curr_offset, 1,
7989 other_decode_bitfield_value(a_bigbuf, oct, 0x38, 8);
7990 proto_tree_add_text(tree,
7991 tvb, curr_offset, 1,
7992 "%s : Max Frames: %u",
7996 other_decode_bitfield_value(a_bigbuf, oct, 0x06, 8);
7997 proto_tree_add_text(tree,
7998 tvb, curr_offset, 1,
7999 "%s : Session IP Address Type: Internet Protocol IPv%s",
8001 ((oct & 0x06) >> 1) ? "6" : "4");
8003 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
8004 proto_tree_add_text(tree,
8005 tvb, curr_offset, 1,
8006 "%s : Session Address Flag",
8013 /* session address included */
8015 if ((oct & 0x06) >> 1)
8017 SHORT_DATA_CHECK(len - (curr_offset - offset), 18);
8019 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_ipv6_addr,
8020 tvb, curr_offset, 16, ENC_NA);
8022 rtp_src_addr.type = AT_IPv6;
8023 rtp_src_addr.len = 16;
8024 rtp_src_addr.data = (guint8 *) &rtp_ipv6_addr;
8026 tvb_get_ipv6(tvb, curr_offset, &rtp_ipv6_addr);
8032 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
8034 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_ipv4_addr,
8035 tvb, curr_offset, 4, ENC_BIG_ENDIAN);
8037 rtp_src_addr.type = AT_IPv4;
8038 rtp_src_addr.len = 4;
8039 rtp_src_addr.data = (guint8 *) &rtp_ipv4_addr;
8041 rtp_ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
8046 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_udp_port,
8047 tvb, curr_offset, 2, ENC_BIG_ENDIAN);
8049 rtp_port = tvb_get_ntohs(tvb, curr_offset);
8054 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8056 return(curr_offset - offset);
8060 free_encoding_name_str(void *ptr)
8062 encoding_name_and_rate_t *encoding_name_and_rate = (encoding_name_and_rate_t *) ptr;
8064 if (encoding_name_and_rate->encoding_name)
8066 g_free(encoding_name_and_rate->encoding_name);
8074 elem_a2p_bearer_format(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8078 proto_tree *subtree;
8080 guint32 curr_offset, orig_offset;
8081 guint8 ip_addr_type;
8085 const gchar *mime_type;
8087 gboolean format_assigned;
8088 gboolean in_band_format_assigned;
8089 gboolean first_assigned_found;
8090 gboolean rtp_dyn_payload_used;
8091 guint8 rtp_payload_type;
8092 GHashTable *rtp_dyn_payload;
8094 encoding_name_and_rate_t *encoding_name_and_rate;
8096 rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, free_encoding_name_str);
8097 rtp_dyn_payload_used = FALSE;
8099 first_assigned_found = FALSE;
8101 curr_offset = offset;
8103 oct = tvb_get_guint8(tvb, curr_offset);
8105 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
8106 proto_tree_add_text(tree,
8107 tvb, curr_offset, 1,
8108 "%s : Number of Bearer Formats: %u",
8112 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8113 proto_tree_add_text(tree,
8114 tvb, curr_offset, 1,
8115 "%s : Session IP Address Type: Internet Protocol IPv%s",
8117 (oct & 0x03) ? "6" : "4");
8119 ip_addr_type = (oct & 0x03);
8125 while ((len - (curr_offset - offset)) > 0)
8127 orig_offset = curr_offset;
8130 proto_tree_add_text(tree,
8131 tvb, curr_offset, -1,
8132 "Bearer Format [%u]",
8135 subtree = proto_item_add_subtree(item, ett_bearer_list);
8137 oct = tvb_get_guint8(tvb, curr_offset);
8139 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8140 "Bearer Format Length: %u",
8145 NO_MORE_DATA_CHECK(len);
8147 oct = tvb_get_guint8(tvb, curr_offset);
8149 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8150 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8154 ext = (oct & 0x80) ? TRUE : FALSE;
8156 format_assigned = FALSE;
8157 in_band_format_assigned = FALSE;
8159 switch ((oct & 0x70) >> 4)
8161 case 0: str = "Unknown"; break;
8163 str = "In-band signaling";
8164 in_band_format_assigned = TRUE;
8168 format_assigned = TRUE;
8170 case 3: str = "Unassigned"; break;
8171 case 4: str = "Transcoded"; break;
8177 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8178 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8179 "%s : Bearer Format Tag Type: %s",
8184 * assuming default sampling rate of 8000Hz
8190 case 0: mime_type = str = "PCMU"; break;
8191 case 1: mime_type = str = "PCMA"; break;
8193 str = "13K Vocoder";
8194 mime_type = "QCELP";
8196 case 3: mime_type = str = "EVRC"; break;
8197 case 4: mime_type = str = "EVRC0"; break;
8198 case 5: mime_type = str = "SMV"; break;
8199 case 6: mime_type = str = "SMV0"; break;
8200 case 7: mime_type = str = "telephone-event"; break;
8201 case 8: mime_type = str = "EVRCB"; break;
8202 case 9: mime_type = str = "EVRCB0"; break;
8203 case 10: mime_type = str = "EVRCWB"; sample_rate = 16000; break;
8204 case 11: mime_type = str = "EVRCWB0"; sample_rate = 16000; break;
8205 case 12: mime_type = str = "EVRCNW"; sample_rate = 16000; break;
8206 case 13: mime_type = str = "EVRCNW0"; sample_rate = 16000; break;
8208 mime_type = str = "Reserved";
8212 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8213 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8214 "%s : Bearer Format ID: %s",
8218 proto_item_append_text(item, " - (%s)", str);
8222 NO_MORE_DATA_CHECK(len);
8224 oct = tvb_get_guint8(tvb, curr_offset);
8226 rtp_payload_type = (oct & 0xfe) >> 1;
8228 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
8229 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8230 "%s : RTP Payload Type: %u",
8234 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
8235 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8236 "%s : Bearer Address Flag",
8243 /* bearer address included */
8245 if (ip_addr_type != 0)
8247 SHORT_DATA_CHECK(len - (curr_offset - offset), 18);
8249 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_ipv6_addr,
8250 tvb, curr_offset, 16, ENC_NA);
8252 if (format_assigned)
8254 rtp_src_addr.type = AT_IPv6;
8255 rtp_src_addr.len = 16;
8256 rtp_src_addr.data = (guint8 *) &rtp_ipv6_addr;
8258 tvb_get_ipv6(tvb, curr_offset, &rtp_ipv6_addr);
8265 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
8267 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_ipv4_addr,
8268 tvb, curr_offset, 4, ENC_BIG_ENDIAN);
8270 if (format_assigned)
8272 rtp_src_addr.type = AT_IPv4;
8273 rtp_src_addr.len = 4;
8274 rtp_src_addr.data = (guint8 *) &rtp_ipv4_addr;
8276 rtp_ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
8282 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_udp_port,
8283 tvb, curr_offset, 2, ENC_BIG_ENDIAN);
8285 if (format_assigned)
8287 rtp_port = tvb_get_ntohs(tvb, curr_offset);
8295 SHORT_DATA_CHECK(len - (curr_offset - offset), 1);
8297 oct = tvb_get_guint8(tvb, curr_offset);
8299 ext_len = (oct & 0xf0) >> 4;
8301 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8302 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8303 "%s : Extension Length: %u",
8307 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8308 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8309 "%s : Extension ID: %u",
8317 SHORT_DATA_CHECK(len - (curr_offset - offset), ext_len);
8319 proto_tree_add_text(subtree, tvb, curr_offset, ext_len,
8320 "Extension Parameter value");
8322 curr_offset += ext_len;
8326 proto_item_set_len(item, curr_offset - orig_offset);
8330 (first_assigned_found == FALSE))
8332 key = (gint *) g_malloc(sizeof(gint));
8333 *key = rtp_payload_type;
8335 encoding_name_and_rate = g_malloc(sizeof(encoding_name_and_rate_t));
8336 encoding_name_and_rate->encoding_name = g_strdup(mime_type);
8337 encoding_name_and_rate->sample_rate = sample_rate;
8339 g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
8340 rtp_dyn_payload_used = TRUE;
8342 first_assigned_found = TRUE;
8343 rtp_add_address(pinfo, &rtp_src_addr, rtp_port, 0, "IOS5",
8344 pinfo->fd->num, FALSE, rtp_dyn_payload);
8347 if (in_band_format_assigned)
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("telephone-event");
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;
8363 if (rtp_dyn_payload_used == FALSE)
8365 rtp_free_hash_dyn_payload(rtp_dyn_payload);
8368 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8370 return(curr_offset - offset);
8377 elem_ms_des_freq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8382 guint32 curr_offset;
8385 curr_offset = offset;
8387 oct = tvb_get_guint8(tvb, curr_offset);
8389 temp_int = (oct & 0xf8) >> 3;
8390 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
8396 str = band_class_str[temp_int];
8399 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
8400 proto_tree_add_text(tree,
8401 tvb, curr_offset, 1,
8402 "%s : Band Class: %s",
8406 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
8408 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8409 proto_tree_add_text(tree, tvb, curr_offset, 1,
8410 "%s : CDMA Channel (MSB): %u",
8416 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
8417 proto_tree_add_text(tree, tvb, curr_offset, 1,
8418 "%s : CDMA Channel (LSB)",
8421 g_snprintf(add_string, string_len, " - (CDMA Channel: %u)", value);
8425 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8427 return(curr_offset - offset);
8434 elem_plcm_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8437 guint32 curr_offset;
8440 curr_offset = offset;
8442 oct = tvb_get_guint8(tvb, curr_offset);
8445 * from C.S0005-D v1.0 L3 Table 3.7.2.3.2.21-5
8447 switch ((oct & 0xf0) >> 4)
8449 case 0x00: str = "PLCM derived from ESN or MEID"; break;
8450 case 0x01: str = "PLCM specified by the base station"; break;
8451 case 0x02: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_M"; break;
8452 case 0x03: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_T"; break;
8458 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8459 proto_tree_add_text(tree,
8460 tvb, curr_offset, 1,
8461 "%s : PLCM_TYPE: %s",
8465 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
8466 proto_tree_add_text(tree,
8467 tvb, curr_offset, 1,
8471 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8472 proto_tree_add_text(tree, tvb, curr_offset, 1,
8473 "%s : PLCM_42 (MSB)",
8478 proto_tree_add_text(tree, tvb, curr_offset, 5, "PLCM_42");
8482 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8484 return(curr_offset - offset);
8498 * ORDER MUST BE MAINTAINED
8500 * The value of this enum is used as an index into
8506 ANSI_A_E_ACC_NET_ID, /* Access Network Identifiers */
8507 ANSI_A_E_ADDS_USER_PART, /* ADDS User Part */
8508 ANSI_A_E_AMPS_HHO_PARAM, /* AMPS Hard Handoff Parameters */
8509 ANSI_A_E_ANCH_PDSN_ADDR, /* Anchor PDSN Address */
8510 ANSI_A_E_ANCH_PP_ADDR, /* Anchor P-P Address */
8511 ANSI_A_E_AUTH_CHLG_PARAM, /* Authentication Challenge Parameter */
8512 ANSI_A_E_AUTH_CNF_PARAM, /* Authentication Confirmation Parameter (RANDC) */
8513 ANSI_A_E_AUTH_DATA, /* Authentication Data */
8514 ANSI_A_E_AUTH_EVENT, /* Authentication Event */
8515 ANSI_A_E_AUTH_PARAM_COUNT, /* Authentication Parameter COUNT */
8516 ANSI_A_E_AUTH_RESP_PARAM, /* Authentication Response Parameter */
8517 ANSI_A_E_BAND_CLASS, /* Band Class */
8518 ANSI_A_E_CLD_PARTY_ASCII_NUM, /* Called Party ASCII Number */
8519 ANSI_A_E_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
8520 ANSI_A_E_CLG_PARTY_ASCII_NUM, /* Calling Party ASCII Number */
8521 ANSI_A_E_CAUSE, /* Cause */
8522 ANSI_A_E_CAUSE_L3, /* Cause Layer 3 */
8523 ANSI_A_E_CDMA_SOWD, /* CDMA Serving One Way Delay */
8524 ANSI_A_E_CELL_ID, /* Cell Identifier */
8525 ANSI_A_E_CELL_ID_LIST, /* Cell Identifier List */
8526 ANSI_A_E_CHAN_NUM, /* Channel Number */
8527 ANSI_A_E_CHAN_TYPE, /* Channel Type */
8528 ANSI_A_E_CCT_GROUP, /* Circuit Group */
8529 ANSI_A_E_CIC, /* Circuit Identity Code */
8530 ANSI_A_E_CIC_EXT, /* Circuit Identity Code Extension */
8531 ANSI_A_E_CM_INFO_TYPE_2, /* Classmark Information Type 2 */
8532 ANSI_A_E_DOWNLINK_RE, /* Downlink Radio Environment */
8533 ANSI_A_E_DOWNLINK_RE_LIST, /* Downlink Radio Environment List */
8534 ANSI_A_E_ENC_INFO, /* Encryption Information */
8535 ANSI_A_E_EXT_HO_DIR_PARAMS, /* Extended Handoff Direction Parameters */
8536 ANSI_A_E_GEO_LOC, /* Geographic Location */
8537 ANSI_A_E_SSCI, /* Special Service Call Indicator */
8538 ANSI_A_E_HO_POW_LEV, /* Handoff Power Level */
8539 ANSI_A_E_HHO_PARAMS, /* Hard Handoff Parameters */
8540 ANSI_A_E_IE_REQD, /* Information Element Requested */
8541 ANSI_A_E_IS2000_CHAN_ID, /* IS-2000 Channel Identity */
8542 ANSI_A_E_IS2000_CHAN_ID_3X, /* IS-2000 Channel Identity 3X */
8543 ANSI_A_E_IS2000_MOB_CAP, /* IS-2000 Mobile Capabilities */
8544 ANSI_A_E_IS2000_NN_SCR, /* IS-2000 Non-Negotiable Service Configuration Record */
8545 ANSI_A_E_IS2000_SCR, /* IS-2000 Service Configuration Record */
8546 ANSI_A_E_IS2000_CAUSE, /* IS-95/IS-2000 Cause Value */
8547 ANSI_A_E_IS2000_RED_RECORD, /* IS-2000 Redirection Record */
8548 ANSI_A_E_IS95_CHAN_ID, /* IS-95 Channel Identity */
8549 ANSI_A_E_IS95_MS_MEAS_CHAN_ID, /* IS-95 MS Measured Channel Identity */
8550 ANSI_A_E_L3_INFO, /* Layer 3 Information */
8551 ANSI_A_E_LAI, /* Location Area Information */
8552 ANSI_A_E_MWI, /* Message Waiting Indication */
8553 ANSI_A_E_MID, /* Mobile Identity */
8554 ANSI_A_E_FWD_MS_INFO_RECS, /* (Forward) MS Information Records */
8555 ANSI_A_E_ORIG_CI, /* Origination Continuation Indicator */
8556 ANSI_A_E_PACA_ORDER, /* PACA Order */
8557 ANSI_A_E_PACA_REOI, /* PACA Reorigination Indicator */
8558 ANSI_A_E_PACA_TS, /* PACA Timestamp */
8559 ANSI_A_E_PSP, /* Packet Session Parameters */
8560 ANSI_A_E_PDSN_IP_ADDR, /* PDSN IP Address */
8561 ANSI_A_E_PDI, /* Power Down Indicator */
8562 ANSI_A_E_PRIO, /* Priority */
8563 ANSI_A_E_P_REV, /* Protocol Revision */
8564 ANSI_A_E_PTYPE, /* Protocol Type */
8565 ANSI_A_E_PSMM_COUNT, /* PSMM Count */
8566 ANSI_A_E_QOS_PARAMS, /* Quality of Service Parameters */
8567 ANSI_A_E_RE_RES, /* Radio Environment and Resources */
8568 ANSI_A_E_REG_TYPE, /* Registration Type */
8569 ANSI_A_E_REJ_CAUSE, /* Reject Cause */
8570 ANSI_A_E_RESP_REQ, /* Response Request */
8571 ANSI_A_E_RETURN_CAUSE, /* Return Cause */
8572 ANSI_A_E_RF_CHAN_ID, /* RF Channel Identity */
8573 ANSI_A_E_SO, /* Service Option */
8574 ANSI_A_E_SOCI, /* Service Option Connection Identifier (SOCI) */
8575 ANSI_A_E_SO_LIST, /* Service Option List */
8576 ANSI_A_E_S_RED_INFO, /* Service Redirection Info */
8577 ANSI_A_E_SR_ID, /* Service Reference Identifier (SR_ID) */
8578 ANSI_A_E_SID, /* SID */
8579 ANSI_A_E_SIGNAL, /* Signal */
8580 ANSI_A_E_SCI, /* Slot Cycle Index */
8581 ANSI_A_E_SW_VER, /* Software Version */
8582 ANSI_A_E_SRNC_TRNC_TC, /* Source RNC to Target RNC Transparent Container */
8583 ANSI_A_E_S_PDSN_ADDR, /* Source PDSN Address */
8584 ANSI_A_E_TAG, /* Tag */
8585 ANSI_A_E_TRNC_SRNC_TC, /* Target RNC to Source RNC Transparent Container */
8586 ANSI_A_E_XMODE, /* Transcoder Mode */
8587 ANSI_A_E_UZ_ID, /* User Zone ID */
8588 ANSI_A_E_VP_REQ, /* Voice Privacy Request */
8589 ANSI_A_E_A2P_BEARER_SESSION, /* A2p Bearer Session-Level Parameters */
8590 ANSI_A_E_A2P_BEARER_FORMAT, /* A2p Bearer Format-Specific Parameters */
8591 ANSI_A_E_MS_DES_FREQ, /* MS Designated Frequency */
8592 ANSI_A_E_MOB_SUB_INFO, /* Mobile Subscription Information */
8593 ANSI_A_E_PLCM_ID, /* Public Long Code Mask Identifier */
8594 ANSI_A_E_REV_MS_INFO_RECS, /* (Reverse) MS Information Records */
8595 ANSI_A_E_NONE /* NONE */
8598 static elem_idx_t ansi_a_elem_1_max = 0;
8600 #define MAX_IOS401_NUM_ELEM_1 (sizeof(ansi_a_ios401_elem_1_strings)/sizeof(ext_value_string_t))
8601 #define MAX_IOS501_NUM_ELEM_1 (sizeof(ansi_a_ios501_elem_1_strings)/sizeof(ext_value_string_t))
8602 static gint ett_ansi_elem_1[MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)];
8603 static guint8 (*elem_1_fcn[])(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) =
8605 elem_acc_net_id, /* Access Network Identifiers */
8606 elem_adds_user_part, /* ADDS User Part */
8607 elem_amps_hho_param, /* AMPS Hard Handoff Parameters */
8608 elem_anchor_pdsn_addr, /* Anchor PDSN Address */
8609 elem_anchor_pp_addr, /* Anchor P-P Address */
8610 elem_auth_chlg_param, /* Authentication Challenge Parameter */
8611 NULL /* no decode required */, /* Authentication Confirmation Parameter (RANDC) */
8612 NULL /* no decode required */, /* Authentication Data */
8613 elem_auth_event, /* Authentication Event */
8614 elem_auth_param_count, /* Authentication Parameter COUNT */
8615 elem_auth_resp_param, /* Authentication Response Parameter */
8616 elem_band_class, /* Band Class */
8617 elem_cld_party_ascii_num, /* Called Party ASCII Number */
8618 elem_cld_party_bcd_num, /* Called Party BCD Number */
8619 elem_clg_party_ascii_num, /* Calling Party ASCII Number */
8620 elem_cause, /* Cause */
8621 elem_cause_l3, /* Cause Layer 3 */
8622 elem_cdma_sowd, /* CDMA Serving One Way Delay */
8623 elem_cell_id, /* Cell Identifier */
8624 elem_cell_id_list, /* Cell Identifier List */
8625 elem_chan_num, /* Channel Number */
8626 elem_chan_type, /* Channel Type */
8627 elem_cct_group, /* Circuit Group */
8628 elem_cic, /* Circuit Identity Code */
8629 elem_cic_ext, /* Circuit Identity Code Extension */
8630 elem_cm_info_type_2, /* Classmark Information Type 2 */
8631 elem_downlink_re, /* Downlink Radio Environment */
8632 elem_downlink_re_list, /* Downlink Radio Environment List */
8633 elem_enc_info, /* Encryption Information */
8634 elem_ext_ho_dir_params, /* Extended Handoff Direction Parameters */
8635 elem_geo_loc, /* Geographic Location */
8636 elem_ssci, /* Special Service Call Indicator */
8637 elem_ho_pow_lev, /* Handoff Power Level */
8638 elem_hho_params, /* Hard Handoff Parameters */
8639 elem_info_rec_req, /* Information Element Requested */
8640 elem_is2000_chan_id, /* IS-2000 Channel Identity */
8641 NULL, /* IS-2000 Channel Identity 3X */
8642 elem_is2000_mob_cap, /* IS-2000 Mobile Capabilities */
8643 elem_is2000_nn_scr, /* IS-2000 Non-Negotiable Service Configuration Record */
8644 elem_is2000_scr, /* IS-2000 Service Configuration Record */
8645 elem_is2000_cause, /* IS-95/IS-2000 Cause Value */
8646 NULL, /* IS-2000 Redirection Record */
8647 elem_is95_chan_id, /* IS-95 Channel Identity */
8648 elem_is95_ms_meas_chan_id, /* IS-95 MS Measured Channel Identity */
8649 elem_l3_info, /* Layer 3 Information */
8650 elem_lai, /* Location Area Information */
8651 elem_mwi, /* Message Waiting Indication */
8652 elem_mid, /* Mobile Identity */
8653 elem_fwd_ms_info_recs, /* (Forward) MS Information Records */
8654 NULL /* no associated data */, /* Origination Continuation Indicator */
8655 elem_paca_order, /* PACA Order */
8656 elem_paca_reoi, /* PACA Reorigination Indicator */
8657 elem_paca_ts, /* PACA Timestamp */
8658 NULL, /* Packet Session Parameters */
8659 elem_pdsn_ip_addr, /* PDSN IP Address */
8660 NULL /* no associated data */, /* Power Down Indicator */
8661 elem_prio, /* Priority */
8662 elem_p_rev, /* Protocol Revision */
8663 elem_ptype, /* Protocol Type */
8664 elem_psmm_count, /* PSMM Count */
8665 elem_qos_params, /* Quality of Service Parameters */
8666 elem_re_res, /* Radio Environment and Resources */
8667 elem_reg_type, /* Registration Type */
8668 elem_rej_cause, /* Reject Cause */
8669 NULL /* no associated data */, /* Response Request */
8670 elem_return_cause, /* Return Cause */
8671 elem_rf_chan_id, /* RF Channel Identity */
8672 elem_so, /* Service Option */
8673 elem_soci, /* Service Option Connection Identifier (SOCI) */
8674 elem_so_list, /* Service Option List */
8675 NULL, /* Service Redirection Info */
8676 elem_sr_id, /* Service Reference Identifier (SR_ID) */
8678 elem_signal, /* Signal */
8679 elem_sci, /* Slot Cycle Index */
8680 elem_sw_ver, /* Software Version */
8681 NULL /* transparent */, /* Source RNC to Target RNC Transparent Container */
8682 elem_s_pdsn_ip_addr, /* Source PDSN Address */
8684 NULL /* transparent */, /* Target RNC to Source RNC Transparent Container */
8685 elem_xmode, /* Transcoder Mode */
8686 elem_uz_id, /* User Zone ID */
8687 NULL /* no associated data */, /* Voice Privacy Request */
8688 elem_a2p_bearer_session, /* A2p Bearer Session-Level Parameters */
8689 elem_a2p_bearer_format, /* A2p Bearer Format-Specific Parameters */
8690 elem_ms_des_freq, /* MS Designated Frequency */
8691 NULL, /* Mobile Subscription Information */
8692 elem_plcm_id, /* Public Long Code Mask Identification */
8693 elem_rev_ms_info_recs, /* (Reverse) MS Information Records */
8697 /* MESSAGE FUNCTIONS */
8700 * Type Length Value (TLV) element dissector
8703 elem_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guint32 offset, guint len _U_, const gchar *name_add)
8705 guint8 oct, parm_len;
8707 guint32 curr_offset;
8708 proto_tree *subtree;
8712 curr_offset = offset;
8715 if ((int)idx < 0 || idx >= ansi_a_elem_1_max-1)
8717 /* Unknown index, skip the element */
8718 return tvb_length_remaining(tvb, offset) ;
8721 oct = tvb_get_guint8(tvb, curr_offset);
8723 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8725 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8727 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
8730 proto_tree_add_text(tree,
8731 tvb, curr_offset, parm_len + 2,
8733 ansi_a_elem_1_strings[idx].strptr,
8734 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8736 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8738 proto_tree_add_uint_format(subtree, hf_ansi_a_elem_id, tvb,
8739 curr_offset, 1, oct,
8742 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
8743 curr_offset + 1, 1, parm_len);
8747 if (elem_1_fcn[dec_idx] == NULL)
8749 proto_tree_add_text(subtree,
8750 tvb, curr_offset + 2, parm_len,
8753 consumed = parm_len;
8757 gchar *a_add_string;
8759 a_add_string = (gchar *) ep_alloc(1024);
8760 a_add_string[0] = '\0';
8762 (*elem_1_fcn[dec_idx])(tvb, pinfo, subtree, curr_offset + 2,
8763 parm_len, a_add_string, 1024);
8765 if (a_add_string[0] != '\0')
8767 proto_item_append_text(item, "%s", a_add_string);
8779 * Type Value (TV) element dissector
8781 * Length cannot be used in these functions, big problem if a element dissector
8782 * is not defined for these.
8785 elem_tv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guint32 offset, const gchar *name_add)
8789 guint32 curr_offset;
8790 proto_tree *subtree;
8795 curr_offset = offset;
8798 if ((int)idx < 0 || idx >= ansi_a_elem_1_max-1)
8800 /* Unknown index, skip the element */
8801 return tvb_length_remaining(tvb, offset) ;
8804 oct = tvb_get_guint8(tvb, curr_offset);
8806 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8808 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8811 proto_tree_add_text(tree,
8812 tvb, curr_offset, -1,
8814 ansi_a_elem_1_strings[idx].strptr,
8815 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8817 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8819 proto_tree_add_uint_format(subtree, hf_ansi_a_elem_id, tvb,
8820 curr_offset, 1, oct,
8823 if (elem_1_fcn[dec_idx] == NULL)
8825 /* BAD THING, CANNOT DETERMINE LENGTH */
8827 proto_tree_add_text(subtree,
8828 tvb, curr_offset + 1, 1,
8829 "No element dissector, rest of dissection may be incorrect");
8835 gchar *a_add_string;
8837 a_add_string = (gchar *) ep_alloc(1024);
8838 a_add_string[0] = '\0';
8839 consumed = (*elem_1_fcn[dec_idx])(tvb, pinfo, subtree, curr_offset + 1, -1, a_add_string, 1024);
8841 if (a_add_string[0] != '\0')
8843 proto_item_append_text(item, "%s", a_add_string);
8849 proto_item_set_len(item, consumed);
8856 * Type (T) element dissector
8858 * Length cannot be used in these functions, big problem if a element dissector
8859 * is not defined for these.
8862 elem_t(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, elem_idx_t idx, guint32 offset, const gchar *name_add)
8865 guint32 curr_offset;
8869 curr_offset = offset;
8872 if ((int)idx < 0 || idx >= ansi_a_elem_1_max-1)
8874 /* Unknown index, skip the element */
8875 return tvb_length_remaining(tvb, offset) ;
8878 oct = tvb_get_guint8(tvb, curr_offset);
8880 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8882 proto_tree_add_uint_format(tree, hf_ansi_a_elem_id, tvb, curr_offset, 1, oct,
8884 ansi_a_elem_1_strings[idx].strptr,
8885 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8894 * Length Value (LV) element dissector
8897 elem_lv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guint32 offset, guint len _U_, const gchar *name_add)
8901 guint32 curr_offset;
8902 proto_tree *subtree;
8907 curr_offset = offset;
8910 if ((int)idx < 0 || idx >= ansi_a_elem_1_max-1)
8912 /* Unknown index, skip the element */
8913 return tvb_length_remaining(tvb, offset) ;
8916 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8918 parm_len = tvb_get_guint8(tvb, curr_offset);
8921 proto_tree_add_text(tree,
8922 tvb, curr_offset, parm_len + 1,
8924 ansi_a_elem_1_strings[idx].strptr,
8925 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8927 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8929 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
8930 curr_offset, 1, parm_len);
8934 if (elem_1_fcn[dec_idx] == NULL)
8936 proto_tree_add_text(subtree,
8937 tvb, curr_offset + 1, parm_len,
8940 consumed = parm_len;
8944 gchar *a_add_string;
8946 a_add_string = (gchar *) ep_alloc(1024);
8947 a_add_string[0] = '\0';
8949 (*elem_1_fcn[dec_idx])(tvb, pinfo, subtree, curr_offset + 1,
8950 parm_len, a_add_string, 1024);
8952 if (a_add_string[0] != '\0')
8954 proto_item_append_text(item, "%s", a_add_string);
8959 return(consumed + 1);
8963 * Value (V) element dissector
8965 * Length cannot be used in these functions, big problem if a element dissector
8966 * is not defined for these.
8969 elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guint32 offset)
8972 guint32 curr_offset;
8975 curr_offset = offset;
8978 if ((int)idx < 0 || idx >= ansi_a_elem_1_max-1)
8980 /* Unknown index, skip the element */
8981 return tvb_length_remaining(tvb, offset) ;
8984 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8986 if (elem_1_fcn[dec_idx] == NULL)
8988 /* BAD THING, CANNOT DETERMINE LENGTH */
8990 proto_tree_add_text(tree,
8991 tvb, curr_offset, 1,
8992 "No element dissector, rest of dissection may be incorrect");
8998 gchar *a_add_string;
9000 a_add_string = (gchar *) ep_alloc(1024);
9001 a_add_string[0] = '\0';
9002 consumed = (*elem_1_fcn[dec_idx])(tvb, pinfo, tree, curr_offset, -1, a_add_string, 1024);
9009 #define ELEM_MAND_TLV(elem_idx, elem_name_addition) \
9011 if ((consumed = elem_tlv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9013 curr_offset += consumed; \
9014 curr_len -= consumed; \
9018 proto_tree_add_text(tree, \
9019 tvb, curr_offset, 0, \
9020 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9021 ansi_a_elem_1_strings[elem_idx].value, \
9022 ansi_a_elem_1_strings[elem_idx].strptr, \
9023 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9026 if (curr_len <= 0) return; \
9029 #define ELEM_OPT_TLV(elem_idx, elem_name_addition) \
9031 if ((consumed = elem_tlv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9033 curr_offset += consumed; \
9034 curr_len -= consumed; \
9036 if (curr_len <= 0) return; \
9039 #define ELEM_MAND_TV(elem_idx, elem_name_addition) \
9041 if ((consumed = elem_tv(tvb, pinfo, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9043 curr_offset += consumed; \
9044 curr_len -= consumed; \
9048 proto_tree_add_text(tree, \
9049 tvb, curr_offset, 0, \
9050 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9051 ansi_a_elem_1_strings[elem_idx].value, \
9052 ansi_a_elem_1_strings[elem_idx].strptr, \
9053 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9056 if (curr_len <= 0) return; \
9059 #define ELEM_OPT_TV(elem_idx, elem_name_addition) \
9061 if ((consumed = elem_tv(tvb, pinfo, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9063 curr_offset += consumed; \
9064 curr_len -= consumed; \
9066 if (curr_len <= 0) return; \
9069 #define ELEM_OPT_T(elem_idx, elem_name_addition) \
9071 if ((consumed = elem_t(tvb, pinfo, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9073 curr_offset += consumed; \
9074 curr_len -= consumed; \
9076 if (curr_len <= 0) return; \
9079 #define ELEM_MAND_LV(elem_idx, elem_name_addition) \
9081 if ((consumed = elem_lv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9083 curr_offset += consumed; \
9084 curr_len -= consumed; \
9088 /* Mandatory, but nothing we can do */ \
9090 if (curr_len <= 0) return; \
9093 #define ELEM_MAND_V(elem_idx) \
9095 if ((consumed = elem_v(tvb, pinfo, tree, elem_idx, curr_offset)) > 0) \
9097 curr_offset += consumed; \
9098 curr_len -= consumed; \
9102 /* Mandatory, but nothing we can do */ \
9104 if (curr_len <= 0) return; \
9112 bsmap_cl3_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9115 guint32 curr_offset;
9118 curr_offset = offset;
9121 ELEM_MAND_TLV(ANSI_A_E_CELL_ID, "");
9123 ELEM_MAND_TLV(ANSI_A_E_L3_INFO, "");
9125 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9132 dtap_cm_srvc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9134 guint32 curr_offset;
9138 proto_tree *subtree;
9142 curr_offset = offset;
9146 * special dissection for CM Service Type
9148 oct = tvb_get_guint8(tvb, curr_offset);
9152 case 0x01: str = "Mobile Originating Call"; break;
9159 proto_tree_add_text(tree,
9160 tvb, curr_offset, 1,
9161 "CM Service Type: %s",
9164 subtree = proto_item_add_subtree(item, ett_cm_srvc_type);
9166 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
9167 proto_tree_add_text(subtree,
9168 tvb, curr_offset, 1,
9172 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
9173 proto_tree_add_text(subtree,
9174 tvb, curr_offset, 1,
9175 "%s : Service Type: (%u) %s",
9183 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2, "");
9185 ELEM_MAND_LV(ANSI_A_E_MID, "");
9187 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9189 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9191 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9193 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9195 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9197 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9199 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9201 ELEM_OPT_TV(ANSI_A_E_SO, "");
9203 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9205 ELEM_OPT_TV(ANSI_A_E_RE_RES, "");
9207 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9209 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9211 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9213 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA, "");
9215 ELEM_OPT_TLV(ANSI_A_E_PACA_REOI, "");
9217 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
9219 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9221 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
9223 switch (global_a_variant)
9225 case A_VARIANT_IOS501:
9226 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9228 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9230 ELEM_OPT_T(ANSI_A_E_ORIG_CI, "");
9232 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE, "");
9234 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9236 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9238 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9240 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9244 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9251 dtap_cm_srvc_req_cont(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9253 guint32 curr_offset;
9257 curr_offset = offset;
9260 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9262 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9264 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
9266 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9273 bsmap_page_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9275 guint32 curr_offset;
9279 curr_offset = offset;
9282 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9284 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9286 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
9288 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9290 ELEM_OPT_TV(ANSI_A_E_SO, "");
9292 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9294 switch (global_a_variant)
9296 case A_VARIANT_IOS501:
9297 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9299 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9301 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9303 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9305 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9309 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9316 dtap_page_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9318 guint32 curr_offset;
9322 curr_offset = offset;
9325 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2, "");
9327 ELEM_MAND_LV(ANSI_A_E_MID, "");
9329 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9331 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9333 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9335 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9337 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9339 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9341 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9343 ELEM_OPT_TV(ANSI_A_E_SO, "");
9345 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9347 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9349 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9351 ELEM_OPT_TV(ANSI_A_E_RE_RES, "");
9353 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
9355 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9357 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
9359 switch (global_a_variant)
9361 case A_VARIANT_IOS501:
9362 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9364 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9366 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9368 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9372 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9379 dtap_progress(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9381 guint32 curr_offset;
9385 curr_offset = offset;
9388 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9390 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9392 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9394 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9401 dtap_srvc_redirection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9403 guint32 curr_offset;
9407 curr_offset = offset;
9410 ELEM_MAND_TLV(ANSI_A_E_IS2000_RED_RECORD, "");
9412 ELEM_MAND_TLV(ANSI_A_E_S_RED_INFO, "");
9414 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9416 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9418 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9420 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9422 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9429 dtap_srvc_release(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9431 guint32 curr_offset;
9435 curr_offset = offset;
9438 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9440 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9442 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9444 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9451 dtap_srvc_release_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9453 guint32 curr_offset;
9457 curr_offset = offset;
9460 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9462 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9469 bsmap_ass_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9472 guint32 curr_offset;
9475 curr_offset = offset;
9478 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE, "");
9480 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9482 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
9484 ELEM_OPT_TV(ANSI_A_E_SO, "");
9486 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9488 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9490 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9492 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9494 ELEM_OPT_TLV(ANSI_A_E_PACA_TS, "");
9496 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
9498 switch (global_a_variant)
9500 case A_VARIANT_IOS501:
9501 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9503 ELEM_OPT_TLV(ANSI_A_E_SR_ID, "");
9505 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9507 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9509 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9511 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9515 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9522 bsmap_ass_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9525 guint32 curr_offset;
9528 curr_offset = offset;
9531 ELEM_MAND_TV(ANSI_A_E_CHAN_NUM, "");
9533 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
9535 ELEM_OPT_TV(ANSI_A_E_SO, "");
9537 switch (global_a_variant)
9539 case A_VARIANT_IOS501:
9540 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9542 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9544 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9546 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9550 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9557 bsmap_ass_failure(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9560 guint32 curr_offset;
9563 curr_offset = offset;
9566 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9568 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9570 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9577 bsmap_clr_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9580 guint32 curr_offset;
9583 curr_offset = offset;
9586 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9588 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9590 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9597 bsmap_clr_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9600 guint32 curr_offset;
9603 curr_offset = offset;
9606 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9608 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9610 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9617 bsmap_clr_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9620 guint32 curr_offset;
9623 curr_offset = offset;
9626 ELEM_OPT_T(ANSI_A_E_PDI, "");
9628 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9630 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9637 dtap_alert_with_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9639 guint32 curr_offset;
9643 curr_offset = offset;
9646 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9648 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9650 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9657 bsmap_bs_srvc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9659 guint32 curr_offset;
9663 curr_offset = offset;
9666 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9668 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9670 ELEM_OPT_TV(ANSI_A_E_SO, "");
9672 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9674 ELEM_OPT_TLV(ANSI_A_E_ADDS_USER_PART, "");
9676 ELEM_OPT_TLV(ANSI_A_E_SR_ID, "");
9678 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9680 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9687 bsmap_bs_srvc_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9689 guint32 curr_offset;
9693 curr_offset = offset;
9696 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9698 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9700 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9702 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9704 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9706 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9713 bsmap_add_srvc_noti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9715 guint32 curr_offset;
9719 curr_offset = offset;
9722 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9724 ELEM_MAND_TV(ANSI_A_E_SO, "");
9726 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9728 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9735 dtap_add_srvc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9737 guint32 curr_offset;
9741 curr_offset = offset;
9744 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9746 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9748 ELEM_MAND_TV(ANSI_A_E_SO, "");
9750 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9752 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9754 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9756 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9758 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9760 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9762 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9769 dtap_connect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9771 guint32 curr_offset;
9775 curr_offset = offset;
9778 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9780 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9787 dtap_flash_with_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9789 guint32 curr_offset;
9793 curr_offset = offset;
9796 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9798 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9800 ELEM_OPT_TV(ANSI_A_E_MWI, "");
9802 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9804 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9806 if (pinfo->p2p_dir == P2P_DIR_RECV)
9808 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
9812 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9815 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9817 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9819 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9826 dtap_flash_with_info_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9828 guint32 curr_offset;
9832 curr_offset = offset;
9835 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9837 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9839 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9846 bsmap_feat_noti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9848 guint32 curr_offset;
9852 curr_offset = offset;
9855 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9857 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9859 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
9861 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9863 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9865 ELEM_OPT_TV(ANSI_A_E_MWI, "");
9867 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9869 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9871 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9873 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9875 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9877 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9879 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9886 bsmap_feat_noti_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9888 guint32 curr_offset;
9892 curr_offset = offset;
9895 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9897 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9899 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9906 bsmap_paca_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9908 guint32 curr_offset;
9912 curr_offset = offset;
9915 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9917 ELEM_OPT_TLV(ANSI_A_E_PACA_TS, "");
9919 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9926 bsmap_paca_command_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9928 guint32 curr_offset;
9932 curr_offset = offset;
9935 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9937 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9944 bsmap_paca_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9946 guint32 curr_offset;
9950 curr_offset = offset;
9953 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9955 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9957 ELEM_OPT_TLV(ANSI_A_E_PACA_ORDER, "");
9959 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9961 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9963 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9965 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9967 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9969 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9971 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9973 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9975 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9982 bsmap_paca_update_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
9984 guint32 curr_offset;
9988 curr_offset = offset;
9991 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9993 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9995 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9997 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10004 bsmap_rm_pos_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10006 guint32 curr_offset;
10010 curr_offset = offset;
10013 ELEM_MAND_TLV(ANSI_A_E_PSMM_COUNT, "");
10015 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10022 bsmap_rm_pos_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10024 guint32 curr_offset;
10028 curr_offset = offset;
10031 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10033 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10035 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE_LIST, "");
10037 ELEM_OPT_TLV(ANSI_A_E_GEO_LOC, "");
10039 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10046 bsmap_auth_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10048 guint32 curr_offset;
10052 curr_offset = offset;
10055 ELEM_MAND_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10057 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10059 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10061 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10063 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10065 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10067 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10069 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10071 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10073 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10077 dtap_auth_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10079 guint32 curr_offset;
10083 curr_offset = offset;
10086 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10088 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10090 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10097 bsmap_auth_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10099 guint32 curr_offset;
10103 curr_offset = offset;
10106 ELEM_MAND_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
10108 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10110 ELEM_MAND_TV(ANSI_A_E_TAG, "");
10112 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10114 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10116 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10124 bsmap_bearer_upd_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10126 guint32 curr_offset;
10130 curr_offset = offset;
10133 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10135 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10137 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10145 bsmap_bearer_upd_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10147 guint32 curr_offset;
10151 curr_offset = offset;
10154 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10156 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10158 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10160 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10168 bsmap_bearer_upd_reqd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10170 guint32 curr_offset;
10174 curr_offset = offset;
10177 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10179 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10181 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10183 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10187 dtap_auth_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10189 guint32 curr_offset;
10193 curr_offset = offset;
10196 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM, "");
10198 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10205 bsmap_user_zone_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10207 guint32 curr_offset;
10211 curr_offset = offset;
10214 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10216 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10223 dtap_user_zone_update_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10225 guint32 curr_offset;
10229 curr_offset = offset;
10232 ELEM_MAND_TLV(ANSI_A_E_UZ_ID, "");
10234 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10241 dtap_user_zone_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10243 guint32 curr_offset;
10247 curr_offset = offset;
10250 ELEM_MAND_TLV(ANSI_A_E_UZ_ID, "");
10252 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10259 bsmap_user_zone_reject(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10261 guint32 curr_offset;
10265 curr_offset = offset;
10268 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10270 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10272 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10274 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10276 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10278 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10280 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10282 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10284 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10291 dtap_user_zone_reject(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10293 guint32 curr_offset;
10297 curr_offset = offset;
10300 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10302 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10309 bsmap_reg_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10311 guint32 curr_offset;
10315 curr_offset = offset;
10318 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10320 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10322 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10324 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10326 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10328 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10330 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10332 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10339 bsmap_ms_reg_noti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10341 guint32 curr_offset;
10345 curr_offset = offset;
10348 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10350 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10357 bsmap_bs_auth_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10359 guint32 curr_offset;
10363 curr_offset = offset;
10366 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10368 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10375 bsmap_bs_auth_req_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10377 guint32 curr_offset;
10381 curr_offset = offset;
10384 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10386 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10393 dtap_ssd_update_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10395 guint32 curr_offset;
10399 curr_offset = offset;
10402 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10404 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10411 dtap_bs_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10413 guint32 curr_offset;
10417 curr_offset = offset;
10420 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10422 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10429 dtap_bs_challenge_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10431 guint32 curr_offset;
10435 curr_offset = offset;
10438 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM, "");
10440 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10447 dtap_ssd_update_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10449 guint32 curr_offset;
10453 curr_offset = offset;
10456 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
10458 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10465 dtap_lu_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10467 guint32 curr_offset;
10471 curr_offset = offset;
10474 ELEM_MAND_LV(ANSI_A_E_MID, "");
10476 ELEM_OPT_TV(ANSI_A_E_LAI, "");
10478 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10480 ELEM_OPT_TV(ANSI_A_E_REG_TYPE, "");
10482 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10484 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10486 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
10488 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
10490 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
10492 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10494 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
10496 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10498 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10500 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE, "");
10502 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10504 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10506 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10508 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10515 dtap_lu_accept(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10517 guint32 curr_offset;
10521 curr_offset = offset;
10524 switch (global_a_variant)
10526 case A_VARIANT_IOS401:
10527 ELEM_OPT_TV(ANSI_A_E_LAI, "");
10530 case A_VARIANT_IOS501:
10531 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10533 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10535 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10539 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10546 dtap_lu_reject(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10548 guint32 curr_offset;
10552 curr_offset = offset;
10555 ELEM_MAND_V(ANSI_A_E_REJ_CAUSE);
10557 switch (global_a_variant)
10559 case A_VARIANT_IOS501:
10560 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10562 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10566 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10573 bsmap_priv_mode_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10575 guint32 curr_offset;
10579 curr_offset = offset;
10582 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO, "");
10584 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10591 bsmap_priv_mode_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10593 guint32 curr_offset;
10597 curr_offset = offset;
10600 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
10602 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
10604 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10611 bsmap_status_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10613 guint32 curr_offset;
10617 curr_offset = offset;
10620 ELEM_MAND_TLV(ANSI_A_E_IE_REQD, "");
10622 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10624 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10626 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10628 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10630 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10632 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10634 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10636 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10638 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10640 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10642 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10649 dtap_status_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10651 guint32 curr_offset;
10655 curr_offset = offset;
10658 ELEM_MAND_LV(ANSI_A_E_IE_REQD, "");
10660 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10668 bsmap_status_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10670 guint32 curr_offset;
10674 curr_offset = offset;
10677 ELEM_MAND_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
10679 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10681 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10683 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10685 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10687 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10694 dtap_status_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10696 guint32 curr_offset;
10700 curr_offset = offset;
10703 ELEM_MAND_LV(ANSI_A_E_REV_MS_INFO_RECS, "");
10705 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10712 bsmap_ho_reqd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10714 guint32 curr_offset;
10718 curr_offset = offset;
10721 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10723 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST, " (Target)");
10725 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10727 ELEM_OPT_T(ANSI_A_E_RESP_REQ, "");
10729 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
10731 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10733 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10735 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE, "");
10737 ELEM_OPT_TV(ANSI_A_E_SO, "");
10739 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10741 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID, "");
10743 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10745 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
10747 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10749 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10751 switch (global_a_variant)
10753 case A_VARIANT_IOS401:
10754 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
10757 case A_VARIANT_IOS501:
10758 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
10762 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
10764 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
10766 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10768 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID, "");
10770 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10772 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10774 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10776 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR, "");
10778 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR, "");
10780 ELEM_OPT_TLV(ANSI_A_E_PSP, "");
10782 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10784 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10786 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10788 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10795 bsmap_ho_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10797 guint32 curr_offset;
10801 curr_offset = offset;
10804 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE, "");
10806 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO, "");
10808 ELEM_MAND_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10810 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST, "(Target)");
10812 ELEM_OPT_TLV(ANSI_A_E_CIC_EXT, "");
10814 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10816 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10818 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10820 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE, "");
10822 ELEM_OPT_TV(ANSI_A_E_SO, "");
10824 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10826 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID, "");
10828 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10830 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
10832 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10834 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10836 switch (global_a_variant)
10838 case A_VARIANT_IOS401:
10839 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
10842 case A_VARIANT_IOS501:
10843 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
10847 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
10849 switch (global_a_variant)
10851 case A_VARIANT_IOS501:
10852 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
10854 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10856 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID, "");
10858 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10860 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10862 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10864 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR, "");
10866 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR, "");
10868 ELEM_OPT_TLV(ANSI_A_E_PSP, "");
10870 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10872 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10874 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10876 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10878 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10882 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10889 bsmap_ho_req_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10891 guint32 curr_offset;
10895 curr_offset = offset;
10898 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10900 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10902 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
10904 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS, "");
10906 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10908 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10910 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10912 switch (global_a_variant)
10914 case A_VARIANT_IOS501:
10915 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
10917 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10919 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10921 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10923 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10925 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10927 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10931 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10938 bsmap_ho_failure(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10940 guint32 curr_offset;
10944 curr_offset = offset;
10947 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10949 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10956 bsmap_ho_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
10958 guint32 curr_offset;
10962 curr_offset = offset;
10965 ELEM_OPT_TV(ANSI_A_E_RF_CHAN_ID, "");
10967 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10969 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10971 ELEM_OPT_TLV(ANSI_A_E_HO_POW_LEV, "");
10973 ELEM_OPT_TV(ANSI_A_E_SID, "");
10975 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
10977 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS, "");
10979 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10981 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10983 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10985 switch (global_a_variant)
10987 case A_VARIANT_IOS501:
10988 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
10990 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10992 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10994 ELEM_OPT_TLV(ANSI_A_E_AMPS_HHO_PARAM, "");
10996 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10998 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
11002 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11009 bsmap_ho_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11011 guint32 curr_offset;
11015 curr_offset = offset;
11018 ELEM_OPT_TV(ANSI_A_E_SO, "");
11020 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11027 bsmap_ho_reqd_rej(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11029 guint32 curr_offset;
11033 curr_offset = offset;
11036 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11038 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11045 bsmap_ho_performed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11047 guint32 curr_offset;
11051 curr_offset = offset;
11054 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11056 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
11058 ELEM_OPT_TV(ANSI_A_E_CHAN_NUM, "");
11060 ELEM_OPT_TLV(ANSI_A_E_BAND_CLASS, "");
11062 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11064 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11071 bsmap_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11073 guint32 curr_offset;
11077 curr_offset = offset;
11080 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11082 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11084 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11086 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11093 bsmap_block_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11095 guint32 curr_offset;
11099 curr_offset = offset;
11102 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11104 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11111 bsmap_unblock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11113 guint32 curr_offset;
11117 curr_offset = offset;
11120 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11122 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11124 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11131 bsmap_unblock_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11133 guint32 curr_offset;
11137 curr_offset = offset;
11140 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11142 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11149 bsmap_reset(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11151 guint32 curr_offset;
11155 curr_offset = offset;
11158 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11160 ELEM_OPT_TLV(ANSI_A_E_SW_VER, "");
11162 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11169 bsmap_reset_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11171 guint32 curr_offset;
11175 curr_offset = offset;
11178 ELEM_OPT_TLV(ANSI_A_E_SW_VER, "");
11180 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11187 bsmap_reset_cct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11189 guint32 curr_offset;
11193 curr_offset = offset;
11196 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11198 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11200 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11202 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11209 bsmap_reset_cct_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11211 guint32 curr_offset;
11215 curr_offset = offset;
11218 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11220 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11227 bsmap_xmode_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11229 guint32 curr_offset;
11233 curr_offset = offset;
11236 ELEM_MAND_TLV(ANSI_A_E_XMODE, "");
11238 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11245 bsmap_xmode_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11247 guint32 curr_offset;
11251 curr_offset = offset;
11254 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11256 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11263 bsmap_adds_page(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11265 guint32 curr_offset;
11269 curr_offset = offset;
11272 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11274 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART, "");
11276 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11278 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
11280 ELEM_OPT_TV(ANSI_A_E_SCI, "");
11282 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11284 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
11286 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
11288 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11290 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11297 bsmap_adds_transfer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11299 guint32 curr_offset;
11303 curr_offset = offset;
11306 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11308 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART, "");
11310 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11312 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
11314 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
11316 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
11318 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
11320 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
11322 ELEM_OPT_TLV(ANSI_A_E_CELL_ID, "");
11324 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
11326 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA, "");
11328 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11330 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
11332 ELEM_OPT_TV(ANSI_A_E_SCI, "");
11334 ELEM_OPT_TV(ANSI_A_E_SO, "");
11336 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
11338 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11340 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11342 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11344 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11351 bsmap_adds_transfer_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11353 guint32 curr_offset;
11357 curr_offset = offset;
11360 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11362 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11364 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11366 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11373 dtap_adds_deliver(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11375 guint32 curr_offset;
11379 curr_offset = offset;
11382 ELEM_MAND_LV(ANSI_A_E_ADDS_USER_PART, "");
11384 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11386 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
11388 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11395 bsmap_adds_page_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11397 guint32 curr_offset;
11401 curr_offset = offset;
11404 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11406 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11408 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11410 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11412 ELEM_OPT_TLV(ANSI_A_E_CELL_ID, "");
11414 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11416 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11423 dtap_adds_deliver_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11425 guint32 curr_offset;
11429 curr_offset = offset;
11432 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11434 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11436 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11443 bsmap_rejection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11445 guint32 curr_offset;
11449 curr_offset = offset;
11452 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11454 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11456 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11458 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11460 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11464 dtap_rejection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11466 guint32 curr_offset;
11470 curr_offset = offset;
11473 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11475 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11477 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
11479 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11481 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11484 #define ANSI_A_IOS401_BSMAP_NUM_MSG (sizeof(ansi_a_ios401_bsmap_strings)/sizeof(ext_value_string_t))
11485 #define ANSI_A_IOS501_BSMAP_NUM_MSG (sizeof(ansi_a_ios501_bsmap_strings)/sizeof(ext_value_string_t))
11486 static gint ett_bsmap_msg[MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)];
11487 static void (*bsmap_msg_fcn[])(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len) =
11489 bsmap_add_srvc_noti, /* Additional Service Notification */
11490 bsmap_adds_page, /* ADDS Page */
11491 bsmap_adds_page_ack, /* ADDS Page Ack */
11492 bsmap_adds_transfer, /* ADDS Transfer */
11493 bsmap_adds_transfer_ack, /* ADDS Transfer Ack */
11494 bsmap_ass_complete, /* Assignment Complete */
11495 bsmap_ass_failure, /* Assignment Failure */
11496 bsmap_ass_req, /* Assignment Request */
11497 bsmap_auth_req, /* Authentication Request */
11498 bsmap_auth_resp, /* Authentication Response */
11499 NULL /* no BSMAP definition */, /* Base Station Challenge */
11500 NULL /* no BSMAP definition */, /* Base Station Challenge Response */
11501 bsmap_block, /* Block */
11502 bsmap_block_ack, /* Block Acknowledge */
11503 bsmap_bs_srvc_req, /* BS Service Request */
11504 bsmap_bs_srvc_resp, /* BS Service Response */
11505 bsmap_clr_command, /* Clear Command */
11506 bsmap_clr_complete, /* Clear Complete */
11507 bsmap_clr_req, /* Clear Request */
11508 bsmap_cl3_info, /* Complete Layer 3 Information */
11509 bsmap_feat_noti, /* Feature Notification */
11510 bsmap_feat_noti_ack, /* Feature Notification Ack */
11511 bsmap_ho_command, /* Handoff Command */
11512 NULL /* no associated data */, /* Handoff Commenced */
11513 bsmap_ho_complete, /* Handoff Complete */
11514 bsmap_ho_failure, /* Handoff Failure */
11515 bsmap_ho_performed, /* Handoff Performed */
11516 bsmap_ho_req, /* Handoff Request */
11517 bsmap_ho_req_ack, /* Handoff Request Acknowledge */
11518 bsmap_ho_reqd, /* Handoff Required */
11519 bsmap_ho_reqd_rej, /* Handoff Required Reject */
11520 bsmap_paca_command, /* PACA Command */
11521 bsmap_paca_command_ack, /* PACA Command Ack */
11522 bsmap_paca_update, /* PACA Update */
11523 bsmap_paca_update_ack, /* PACA Update Ack */
11524 bsmap_page_req, /* Paging Request */
11525 bsmap_priv_mode_command, /* Privacy Mode Command */
11526 bsmap_priv_mode_complete, /* Privacy Mode Complete */
11527 bsmap_rm_pos_req, /* Radio Measurements for Position Request */
11528 bsmap_rm_pos_resp, /* Radio Measurements for Position Response */
11529 bsmap_rejection, /* Rejection */
11530 bsmap_reg_req, /* Registration Request */
11531 bsmap_reset, /* Reset */
11532 bsmap_reset_ack, /* Reset Acknowledge */
11533 bsmap_reset_cct, /* Reset Circuit */
11534 bsmap_reset_cct_ack, /* Reset Circuit Acknowledge */
11535 NULL /* no BSMAP definition */, /* SSD Update Request */
11536 NULL /* no BSMAP definition */, /* SSD Update Response */
11537 bsmap_status_req, /* Status Request */
11538 bsmap_status_resp, /* Status Response */
11539 bsmap_xmode_ack, /* Transcoder Control Acknowledge */
11540 bsmap_xmode_req, /* Transcoder Control Request */
11541 bsmap_unblock, /* Unblock */
11542 bsmap_unblock_ack, /* Unblock Acknowledge */
11543 bsmap_user_zone_reject, /* User Zone Reject */
11544 bsmap_user_zone_update, /* User Zone Update */
11545 bsmap_bearer_upd_req, /* Bearer Update Request *//* IOS 5.0.1 */
11546 bsmap_bearer_upd_resp, /* Bearer Update Response *//* IOS 5.0.1 */
11547 bsmap_bearer_upd_reqd, /* Bearer Update Required *//* IOS 5.0.1 */
11548 bsmap_ms_reg_noti, /* Mobile Station Registered Notification *//* IOS 5.0.1 */
11549 bsmap_bs_auth_req, /* BS Authentication Request *//* IOS 5.0.1 */
11550 bsmap_bs_auth_req_ack, /* BS Authentication Request Ack *//* IOS 5.0.1 */
11554 #define ANSI_A_IOS401_DTAP_NUM_MSG (sizeof(ansi_a_ios401_dtap_strings)/sizeof(ext_value_string_t))
11555 #define ANSI_A_IOS501_DTAP_NUM_MSG (sizeof(ansi_a_ios501_dtap_strings)/sizeof(ext_value_string_t))
11556 static gint ett_dtap_msg[MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)];
11557 static void (*dtap_msg_fcn[])(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint len) =
11559 dtap_add_srvc_req, /* Additional Service Request */
11560 dtap_adds_deliver, /* ADDS Deliver */
11561 dtap_adds_deliver_ack, /* ADDS Deliver Ack */
11562 dtap_alert_with_info, /* Alert With Information */
11563 dtap_auth_req, /* Authentication Request */
11564 dtap_auth_resp, /* Authentication Response */
11565 dtap_bs_challenge, /* Base Station Challenge */
11566 dtap_bs_challenge_resp, /* Base Station Challenge Response */
11567 dtap_cm_srvc_req, /* CM Service Request */
11568 dtap_cm_srvc_req_cont, /* CM Service Request Continuation */
11569 dtap_connect, /* Connect */
11570 dtap_flash_with_info, /* Flash with Information */
11571 dtap_flash_with_info_ack, /* Flash with Information Ack */
11572 dtap_lu_accept, /* Location Updating Accept */
11573 dtap_lu_reject, /* Location Updating Reject */
11574 dtap_lu_req, /* Location Updating Request */
11575 dtap_page_resp, /* Paging Response */
11576 NULL /* no associated data */, /* Parameter Update Confirm */
11577 NULL /* no associated data */, /* Parameter Update Request */
11578 dtap_rejection, /* Rejection */
11579 dtap_progress, /* Progress */
11580 dtap_srvc_redirection, /* Service Redirection */
11581 dtap_srvc_release, /* Service Release */
11582 dtap_srvc_release_complete, /* Service Release Complete */
11583 dtap_ssd_update_req, /* SSD Update Request */
11584 dtap_ssd_update_resp, /* SSD Update Response */
11585 dtap_status_req, /* Status Request */
11586 dtap_status_resp, /* Status Response */
11587 dtap_user_zone_reject, /* User Zone Reject */
11588 dtap_user_zone_update, /* User Zone Update */
11589 dtap_user_zone_update_req, /* User Zone Update Request */
11593 /* Utillity function to dissect CDMA200 A1 elements in ANSI MAP messages */
11595 dissect_cdma2000_a1_elements(tvbuff_t *tvb, _U_ packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11597 guint32 curr_offset;
11603 curr_offset = offset;
11607 * require at least 2 octets for T(ype) and L(ength)
11609 while (curr_len > 1)
11612 * peeking at T(ype)
11614 oct = tvb_get_guint8(tvb, curr_offset);
11616 for (idx=0; idx < ansi_a_elem_1_max; idx++)
11618 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
11620 ELEM_OPT_TLV(idx, "");
11625 if (idx == ansi_a_elem_1_max)
11628 * didn't recognize the T(ype)
11629 * assuming it is in TLV form, step over
11631 consumed = 2 + tvb_get_guint8(tvb, curr_offset + 1);
11632 curr_offset += consumed;
11633 curr_len -= consumed;
11637 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len, 0);
11640 /* GENERIC DISSECTOR FUNCTIONS */
11643 dissect_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11645 static ansi_a_tap_rec_t tap_rec[16];
11646 static ansi_a_tap_rec_t *tap_p;
11647 static int tap_current=0;
11649 guint32 offset, saved_offset;
11652 proto_item *bsmap_item = NULL;
11653 proto_tree *bsmap_tree = NULL;
11654 const gchar *msg_str;
11657 col_append_str(pinfo->cinfo, COL_INFO, "(BSMAP) ");
11660 * set tap record pointer
11663 if (tap_current == array_length(tap_rec))
11667 tap_p = &tap_rec[tap_current];
11671 saved_offset = offset;
11675 len = tvb_length(tvb);
11678 * add BSMAP message name
11680 oct = tvb_get_guint8(tvb, offset++);
11682 msg_str = my_match_strval_idx((guint32) oct, ansi_a_bsmap_strings, &idx, &dec_idx);
11685 * create the a protocol tree
11687 if (msg_str == NULL)
11690 proto_tree_add_protocol_format(tree, proto_a_bsmap, tvb, 0, len,
11691 "ANSI A-I/F BSMAP - Unknown BSMAP Message Type (%u)",
11694 bsmap_tree = proto_item_add_subtree(bsmap_item, ett_bsmap);
11699 proto_tree_add_protocol_format(tree, proto_a_bsmap, tvb, 0, -1,
11700 "ANSI A-I/F BSMAP - %s",
11703 bsmap_tree = proto_item_add_subtree(bsmap_item, ett_bsmap_msg[dec_idx]);
11705 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
11709 * add BSMAP message name
11711 proto_tree_add_uint_format(bsmap_tree, hf_ansi_a_bsmap_msgtype,
11712 tvb, saved_offset, 1, oct, "Message Type");
11714 tap_p->pdu_type = BSSAP_PDU_TYPE_BSMAP;
11715 tap_p->message_type = oct;
11717 tap_queue_packet(ansi_a_tap, pinfo, tap_p);
11719 if (msg_str == NULL) return;
11721 if ((len - offset) <= 0) return;
11723 a_meid_configured = FALSE;
11728 if (bsmap_msg_fcn[dec_idx] == NULL)
11730 proto_tree_add_text(bsmap_tree,
11731 tvb, offset, len - offset,
11732 "Message Elements");
11736 (*bsmap_msg_fcn[dec_idx])(tvb, pinfo, bsmap_tree, offset, len - offset);
11741 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11743 static ansi_a_tap_rec_t tap_rec[16];
11744 static ansi_a_tap_rec_t *tap_p;
11745 static int tap_current=0;
11747 guint32 offset, saved_offset;
11749 guint32 oct_1, oct_2;
11751 proto_item *dtap_item = NULL;
11752 proto_tree *dtap_tree = NULL;
11753 proto_item *oct_1_item = NULL;
11754 proto_tree *oct_1_tree = NULL;
11755 const gchar *msg_str;
11759 len = tvb_length(tvb);
11764 * too short to be DTAP
11766 call_dissector(data_handle, tvb, pinfo, tree);
11770 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
11773 * set tap record pointer
11776 if (tap_current == array_length(tap_rec))
11780 tap_p = &tap_rec[tap_current];
11784 saved_offset = offset;
11789 * get protocol discriminator
11791 oct_1 = tvb_get_guint8(tvb, offset++);
11792 oct_2 = tvb_get_guint8(tvb, offset++);
11795 * add DTAP message name
11797 saved_offset = offset;
11798 oct = tvb_get_guint8(tvb, offset++);
11800 msg_str = my_match_strval_idx((guint32) oct, ansi_a_dtap_strings, &idx, &dec_idx);
11803 * create the a protocol tree
11805 if (msg_str == NULL)
11808 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
11809 "ANSI A-I/F DTAP - Unknown DTAP Message Type (%u)",
11812 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap);
11817 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
11818 "ANSI A-I/F DTAP - %s",
11821 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg[dec_idx]);
11823 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
11829 switch (oct_1 & 0x0f)
11831 case 3: str = "Call Control, call related SS"; break;
11832 case 5: str = "Mobility Management"; break;
11833 case 6: str = "Radio Resource Management"; break;
11834 case 9: str = "Facility Management"; break;
11835 case 11: str = "Other Signaling Procedures"; break;
11836 case 15: str = "Reserved for tests"; break;
11843 proto_tree_add_text(dtap_tree,
11845 "Protocol Discriminator: %s",
11848 oct_1_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
11850 other_decode_bitfield_value(a_bigbuf, oct_1, 0xf0, 8);
11851 proto_tree_add_text(oct_1_tree,
11856 other_decode_bitfield_value(a_bigbuf, oct_1, 0x0f, 8);
11857 proto_tree_add_text(oct_1_tree,
11859 "%s : Protocol Discriminator: %u",
11866 switch (global_a_variant)
11868 case A_VARIANT_IS634:
11869 other_decode_bitfield_value(a_bigbuf, oct_2, 0x80, 8);
11870 proto_tree_add_text(dtap_tree,
11872 "%s : Transaction Identifier (TI) Flag: %s",
11874 ((oct_2 & 0x80) ? "allocated by receiver" : "allocated by sender"));
11876 other_decode_bitfield_value(a_bigbuf, oct_2, 0x70, 8);
11877 proto_tree_add_text(dtap_tree,
11879 "%s : Transaction Identifier (TI): %u",
11881 (oct_2 & 0x70) >> 4);
11883 other_decode_bitfield_value(a_bigbuf, oct_2, 0x0f, 8);
11884 proto_tree_add_text(dtap_tree,
11891 proto_tree_add_text(dtap_tree,
11898 * add DTAP message name
11900 proto_tree_add_uint_format(dtap_tree, hf_ansi_a_dtap_msgtype,
11901 tvb, saved_offset, 1, oct,
11904 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
11905 tap_p->message_type = oct;
11907 tap_queue_packet(ansi_a_tap, pinfo, tap_p);
11909 if (msg_str == NULL) return;
11911 if ((len - offset) <= 0) return;
11913 a_meid_configured = FALSE;
11918 if (dtap_msg_fcn[dec_idx] == NULL)
11920 proto_tree_add_text(dtap_tree,
11921 tvb, offset, len - offset,
11922 "Message Elements");
11926 (*dtap_msg_fcn[dec_idx])(tvb, pinfo, dtap_tree, offset, len - offset);
11931 /* Register the protocol with Wireshark */
11933 proto_register_ansi_a(void)
11935 module_t *ansi_a_module;
11939 /* Setup list of header fields */
11941 static hf_register_info hf[] =
11943 { &hf_ansi_a_bsmap_msgtype,
11944 { "BSMAP Message Type", "ansi_a_bsmap.msgtype",
11945 FT_UINT8, BASE_HEX, NULL, 0x0,
11948 { &hf_ansi_a_dtap_msgtype,
11949 { "DTAP Message Type", "ansi_a_bsmap.dtap_msgtype",
11950 FT_UINT8, BASE_HEX, NULL, 0x0,
11953 { &hf_ansi_a_elem_id,
11954 { "Element ID", "ansi_a_bsmap.elem_id",
11955 FT_UINT8, BASE_DEC, NULL, 0,
11958 { &hf_ansi_a_length,
11959 { "Length", "ansi_a_bsmap.len",
11960 FT_UINT8, BASE_DEC, NULL, 0,
11964 { "Sub tree", "ansi_a_bsmap.none",
11965 FT_NONE, BASE_NONE, 0, 0,
11969 { "ESN", "ansi_a_bsmap.esn",
11970 FT_UINT32, BASE_HEX, 0, 0x0,
11974 { "IMSI", "ansi_a_bsmap.imsi",
11975 FT_STRING, BASE_NONE, 0, 0,
11979 { "MIN", "ansi_a_bsmap.min",
11980 FT_STRING, BASE_NONE, 0, 0,
11984 { "MEID", "ansi_a_bsmap.meid",
11985 FT_STRING, BASE_NONE, 0, 0,
11988 { &hf_ansi_a_cld_party_bcd_num,
11989 { "Called Party BCD Number", "ansi_a_bsmap.cld_party_bcd_num",
11990 FT_STRING, BASE_NONE, 0, 0,
11993 { &hf_ansi_a_clg_party_bcd_num,
11994 { "Calling Party BCD Number", "ansi_a_bsmap.clg_party_bcd_num",
11995 FT_STRING, BASE_NONE, 0, 0,
11998 { &hf_ansi_a_cld_party_ascii_num,
11999 { "Called Party ASCII Number", "ansi_a_bsmap.cld_party_ascii_num",
12000 FT_STRING, BASE_NONE, 0, 0,
12003 { &hf_ansi_a_clg_party_ascii_num,
12004 { "Calling Party ASCII Number", "ansi_a_bsmap.clg_party_ascii_num",
12005 FT_STRING, BASE_NONE, 0, 0,
12008 { &hf_ansi_a_cell_ci,
12009 { "Cell CI", "ansi_a_bsmap.cell_ci",
12010 FT_UINT16, BASE_HEX, 0, 0x0,
12013 { &hf_ansi_a_cell_lac,
12014 { "Cell LAC", "ansi_a_bsmap.cell_lac",
12015 FT_UINT16, BASE_HEX, 0, 0x0,
12018 { &hf_ansi_a_cell_mscid,
12019 { "Cell MSCID", "ansi_a_bsmap.cell_mscid",
12020 FT_UINT24, BASE_HEX, 0, 0x0,
12023 { &hf_ansi_a_pdsn_ip_addr,
12024 { "PDSN IP Address", "ansi_a_bsmap.pdsn_ip_addr",
12025 FT_IPv4, BASE_NONE, NULL, 0,
12026 "IP Address", HFILL }
12028 { &hf_ansi_a_s_pdsn_ip_addr,
12029 { "Source PDSN Address", "ansi_a_bsmap.s_pdsn_ip_addr",
12030 FT_IPv4, BASE_NONE, NULL, 0,
12031 "IP Address", HFILL }
12033 { &hf_ansi_a_anchor_ip_addr,
12034 { "Anchor PDSN Address", "ansi_a_bsmap.anchor_pdsn_ip_addr",
12035 FT_IPv4, BASE_NONE, NULL, 0,
12036 "IP Address", HFILL }
12038 { &hf_ansi_a_anchor_pp_ip_addr,
12039 { "Anchor P-P Address", "ansi_a_bsmap.anchor_pp_ip_addr",
12040 FT_IPv4, BASE_NONE, NULL, 0,
12041 "IP Address", HFILL }
12043 { &hf_ansi_a_a2p_bearer_ipv4_addr,
12044 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv4_addr",
12045 FT_IPv4, BASE_NONE, NULL, 0,
12048 { &hf_ansi_a_a2p_bearer_ipv6_addr,
12049 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv6_addr",
12050 FT_IPv6, BASE_NONE, NULL, 0,
12053 { &hf_ansi_a_a2p_bearer_udp_port,
12054 { "A2p Bearer UDP Port", "ansi_a_bsmap.a2p_bearer_udp_port",
12055 FT_UINT16, BASE_DEC, NULL, 0,
12059 { "Service Option", "ansi_a_bsmap.so",
12060 FT_UINT16, BASE_DEC, NULL, 0,
12063 { &hf_ansi_a_cause_1,
12064 { "Cause", "ansi_a_bsmap.cause_1",
12065 FT_UINT8, BASE_DEC, NULL, 0,
12068 { &hf_ansi_a_cause_2,
12069 { "Cause", "ansi_a_bsmap.cause_2",
12070 FT_UINT16, BASE_DEC, NULL, 0,
12073 { &hf_ansi_a_meid_configured,
12074 { "Is MEID configured", "ansi_a_bsmap.meid_configured",
12075 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
12080 static enum_val_t a_variant_options[] = {
12081 { "is-634-rev0", "IS-634 rev. 0", A_VARIANT_IS634 },
12082 { "tsb-80", "TSB-80", A_VARIANT_TSB80 },
12083 { "is-634-a", "IS-634-A", A_VARIANT_IS634A },
12084 { "ios-2.x", "IOS 2.x", A_VARIANT_IOS2 },
12085 { "ios-3.x", "IOS 3.x", A_VARIANT_IOS3 },
12086 { "ios-4.0.1", "IOS 4.0.1", A_VARIANT_IOS401 },
12087 { "ios-5.0.1", "IOS 5.0.1", A_VARIANT_IOS501 },
12092 /* Setup protocol subtree array */
12093 #define MAX_NUM_DTAP_MSG MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)
12094 #define MAX_NUM_BSMAP_MSG MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)
12095 #define MAX_NUM_ELEM_1 MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)
12096 #define NUM_INDIVIDUAL_ELEMS 18
12098 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 *);
12101 * XXX - at least one version of the HP C compiler apparently doesn't
12102 * recognize constant expressions using the "?" operator as being
12103 * constant expressions, so you can't use the expression that
12104 * initializes "ett_let" as an array size. Therefore, we dynamically
12105 * allocate the array instead.
12107 ett = (gint **) g_malloc(ett_len);
12109 memset((void *) ett_dtap_msg, -1, sizeof(ett_dtap_msg));
12110 memset((void *) ett_bsmap_msg, -1, sizeof(ett_bsmap_msg));
12111 memset((void *) ett_ansi_elem_1, -1, sizeof(ett_ansi_elem_1));
12112 memset((void *) ett_ansi_fwd_ms_info_rec, -1, sizeof(gint) * NUM_FWD_MS_INFO_REC);
12113 memset((void *) ett_ansi_rev_ms_info_rec, -1, sizeof(gint) * NUM_REV_MS_INFO_REC);
12115 ett[0] = &ett_bsmap;
12116 ett[1] = &ett_dtap;
12117 ett[2] = &ett_elems;
12118 ett[3] = &ett_elem;
12119 ett[4] = &ett_dtap_oct_1;
12120 ett[5] = &ett_cm_srvc_type;
12121 ett[6] = &ett_ansi_ms_info_rec_reserved;
12122 ett[7] = &ett_ansi_enc_info;
12123 ett[8] = &ett_cell_list;
12124 ett[9] = &ett_bearer_list;
12125 ett[10] = &ett_re_list;
12126 ett[11] = &ett_so_list;
12127 ett[12] = &ett_scm;
12128 ett[13] = &ett_adds_user_part;
12129 ett[14] = &ett_scr;
12130 ett[15] = &ett_srvc_con_rec;
12131 ett[16] = &ett_cm2_band_class;
12132 ett[17] = &ett_vp_algs;
12134 last_offset = NUM_INDIVIDUAL_ELEMS;
12136 for (i=0; i < MAX_NUM_DTAP_MSG; i++, last_offset++)
12138 ett[last_offset] = &ett_dtap_msg[i];
12141 for (i=0; i < MAX_NUM_BSMAP_MSG; i++, last_offset++)
12143 ett[last_offset] = &ett_bsmap_msg[i];
12146 for (i=0; i < MAX_NUM_ELEM_1; i++, last_offset++)
12148 ett[last_offset] = &ett_ansi_elem_1[i];
12151 for (i=0; i < NUM_FWD_MS_INFO_REC; i++, last_offset++)
12153 ett[last_offset] = &ett_ansi_fwd_ms_info_rec[i];
12156 for (i=0; i < NUM_REV_MS_INFO_REC; i++, last_offset++)
12158 ett[last_offset] = &ett_ansi_rev_ms_info_rec[i];
12161 /* Register the protocol name and description */
12164 proto_register_protocol("ANSI A-I/F BSMAP", "ANSI BSMAP", "ansi_a_bsmap");
12166 proto_register_field_array(proto_a_bsmap, hf, array_length(hf));
12169 proto_register_protocol("ANSI A-I/F DTAP", "ANSI DTAP", "ansi_a_dtap");
12171 is637_dissector_table =
12172 register_dissector_table("ansi_a.sms", "IS-637-A (SMS)",
12173 FT_UINT8, BASE_DEC);
12175 is683_dissector_table =
12176 register_dissector_table("ansi_a.ota", "IS-683-A (OTA)",
12177 FT_UINT8, BASE_DEC);
12179 is801_dissector_table =
12180 register_dissector_table("ansi_a.pld", "IS-801 (PLD)",
12181 FT_UINT8, BASE_DEC);
12183 proto_register_subtree_array(ett, ett_len / (int)sizeof(gint *));
12185 ansi_a_tap = register_tap("ansi_a");
12188 * setup for preferences
12190 ansi_a_module = prefs_register_protocol(proto_a_bsmap, proto_reg_handoff_ansi_a);
12192 prefs_register_enum_preference(ansi_a_module,
12195 "(if other than the default of IOS 4.0.1)",
12205 proto_reg_handoff_ansi_a(void)
12207 static gboolean ansi_a_prefs_initialized = FALSE;
12209 if (!ansi_a_prefs_initialized)
12211 dissector_handle_t bsmap_handle;
12212 bsmap_handle = create_dissector_handle(dissect_bsmap, proto_a_bsmap);
12213 dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
12214 data_handle = find_dissector("data");
12215 rtp_handle = find_dissector("rtp");
12217 dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
12218 dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
12220 ansi_a_prefs_initialized = TRUE;
12223 switch (global_a_variant)
12225 case A_VARIANT_IOS501:
12226 ansi_a_bsmap_strings = ansi_a_ios501_bsmap_strings;
12227 ansi_a_dtap_strings = ansi_a_ios501_dtap_strings;
12228 ansi_a_elem_1_strings = ansi_a_ios501_elem_1_strings;
12229 ansi_a_elem_1_max = MAX_IOS501_NUM_ELEM_1;
12233 ansi_a_bsmap_strings = ansi_a_ios401_bsmap_strings;
12234 ansi_a_dtap_strings = ansi_a_ios401_dtap_strings;
12235 ansi_a_elem_1_strings = ansi_a_ios401_elem_1_strings;
12236 ansi_a_elem_1_max = MAX_IOS401_NUM_ELEM_1;