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.
46 #include <epan/packet.h>
47 #include <epan/prefs.h>
49 #include <epan/strutil.h>
50 #include <epan/emem.h>
52 #include "packet-rtp.h"
53 #include "packet-bssap.h"
54 #include "packet-ansi_a.h"
57 * IOS 4, probably most common
59 gint global_a_variant = A_VARIANT_IOS401;
62 /* PROTOTYPES/FORWARDS */
64 void proto_reg_handoff_ansi_a(void);
67 my_match_strval_idx(guint32 val, const ext_value_string_t *vs, gint *idx, gint *dec_idx)
73 if (vs[i].value == val)
76 *dec_idx = vs[i].dec_index;
88 const ext_value_string_t ansi_a_ios401_bsmap_strings[] =
90 { 0x69, "Additional Service Notification", 0 },
91 { 0x65, "ADDS Page", 1 },
92 { 0x66, "ADDS Page Ack", 2 },
93 { 0x67, "ADDS Transfer", 3 },
94 { 0x68, "ADDS Transfer Ack", 4 },
95 { 0x02, "Assignment Complete", 5 },
96 { 0x03, "Assignment Failure", 6 },
97 { 0x01, "Assignment Request", 7 },
98 { 0x45, "Authentication Request", 8 },
99 { 0x46, "Authentication Response", 9 },
100 { 0x48, "Base Station Challenge", 10 },
101 { 0x49, "Base Station Challenge Response", 11 },
102 { 0x40, "Block", 12 },
103 { 0x41, "Block Acknowledge", 13 },
104 { 0x09, "BS Service Request", 14 },
105 { 0x0A, "BS Service Response", 15 },
106 { 0x20, "Clear Command", 16 },
107 { 0x21, "Clear Complete", 17 },
108 { 0x22, "Clear Request", 18 },
109 { 0x57, "Complete Layer 3 Information", 19 },
110 { 0x60, "Feature Notification", 20 },
111 { 0x61, "Feature Notification Ack", 21 },
112 { 0x13, "Handoff Command", 22 },
113 { 0x15, "Handoff Commenced", 23 },
114 { 0x14, "Handoff Complete", 24 },
115 { 0x16, "Handoff Failure", 25 },
116 { 0x17, "Handoff Performed", 26 },
117 { 0x10, "Handoff Request", 27 },
118 { 0x12, "Handoff Request Acknowledge", 28 },
119 { 0x11, "Handoff Required", 29 },
120 { 0x1A, "Handoff Required Reject", 30 },
121 { 0x6C, "PACA Command", 31 },
122 { 0x6D, "PACA Command Ack", 32 },
123 { 0x6E, "PACA Update", 33 },
124 { 0x6F, "PACA Update Ack", 34 },
125 { 0x52, "Paging Request", 35 },
126 { 0x53, "Privacy Mode Command", 36 },
127 { 0x55, "Privacy Mode Complete", 37 },
128 { 0x23, "Radio Measurements for Position Request", 38 },
129 { 0x25, "Radio Measurements for Position Response", 39 },
130 { 0x56, "Rejection", 40 },
131 { 0x05, "Registration Request", 41 },
132 { 0x30, "Reset", 42 },
133 { 0x31, "Reset Acknowledge", 43 },
134 { 0x34, "Reset Circuit", 44 },
135 { 0x35, "Reset Circuit Acknowledge", 45 },
136 { 0x47, "SSD Update Request", 46 },
137 { 0x4A, "SSD Update Response", 47 },
138 { 0x6A, "Status Request", 48 },
139 { 0x6B, "Status Response", 49 },
140 { 0x39, "Transcoder Control Acknowledge", 50 },
141 { 0x38, "Transcoder Control Request", 51 },
142 { 0x42, "Unblock", 52 },
143 { 0x43, "Unblock Acknowledge", 53 },
144 { 0x0B, "User Zone Reject", 54 },
145 { 0x04, "User Zone Update", 55 },
149 const ext_value_string_t ansi_a_ios401_dtap_strings[] =
151 { 0x62, "Additional Service Request", 0 },
152 { 0x53, "ADDS Deliver", 1 },
153 { 0x54, "ADDS Deliver Ack", 2 },
154 { 0x26, "Alert With Information", 3 },
155 { 0x45, "Authentication Request", 4 },
156 { 0x46, "Authentication Response", 5 },
157 { 0x48, "Base Station Challenge", 6 },
158 { 0x49, "Base Station Challenge Response", 7 },
159 { 0x24, "CM Service Request", 8 },
160 { 0x25, "CM Service Request Continuation", 9 },
161 { 0x07, "Connect", 10 },
162 { 0x10, "Flash with Information", 11 },
163 { 0x50, "Flash with Information Ack", 12 },
164 { 0x02, "Location Updating Accept", 13 },
165 { 0x04, "Location Updating Reject", 14 },
166 { 0x08, "Location Updating Request", 15 },
167 { 0x27, "Paging Response", 16 },
168 { 0x2B, "Parameter Update Confirm", 17 },
169 { 0x2C, "Parameter Update Request", 18 },
170 { 0x56, "Rejection", 19 },
171 { 0x03, "Progress", 20 },
172 { 0x70, "Service Redirection", 21 },
173 { 0x2E, "Service Release", 22 },
174 { 0x2F, "Service Release Complete", 23 },
175 { 0x47, "SSD Update Request", 24 },
176 { 0x4A, "SSD Update Response", 25 },
177 { 0x6A, "Status Request", 26 },
178 { 0x6B, "Status Response", 27 },
179 { 0x0B, "User Zone Reject", 28 },
180 { 0x0C, "User Zone Update", 29 },
181 { 0x0D, "User Zone Update Request", 30 },
185 const ext_value_string_t ansi_a_ios401_elem_1_strings[] =
187 { 0x20, "Access Network Identifiers", 0 },
188 { 0x3D, "ADDS User Part", 1 },
189 { 0x25, "AMPS Hard Handoff Parameters", 2 },
190 { 0x30, "Anchor PDSN Address", 3 },
191 { 0x7C, "Anchor P-P Address", 4 },
192 { 0x41, "Authentication Challenge Parameter", 5 },
193 { 0x28, "Authentication Confirmation Parameter (RANDC)", 6 },
194 { 0x59, "Authentication Data", 7 },
195 { 0x4A, "Authentication Event", 8 },
196 { 0x40, "Authentication Parameter COUNT", 9 },
197 { 0x42, "Authentication Response Parameter", 10 },
198 { 0x37, "Band Class", 11 },
199 { 0x5B, "Called Party ASCII Number", 12 },
200 { 0x5E, "Called Party BCD Number", 13 },
201 { 0x4B, "Calling Party ASCII Number", 14 },
202 { 0x04, "Cause", 15 },
203 { 0x08, "Cause Layer 3", 16 },
204 { 0x0C, "CDMA Serving One Way Delay", 17 },
205 { 0x05, "Cell Identifier", 18 },
206 { 0x1A, "Cell Identifier List", 19 },
207 { 0x23, "Channel Number", 20 },
208 { 0x0B, "Channel Type", 21 },
209 { 0x19, "Circuit Group", 22 },
210 { 0x01, "Circuit Identity Code", 23 },
211 { 0x24, "Circuit Identity Code Extension", 24 },
212 { 0x12, "Classmark Information Type 2", 25 },
213 { 0x29, "Downlink Radio Environment", 26 },
214 { 0x2B, "Downlink Radio Environment List", 27 },
215 { 0x0A, "Encryption Information", 28 },
216 { 0x10, "Extended Handoff Direction Parameters", 29 },
217 { 0x2C, "Geographic Location", 30 },
218 { 0x5A, "Special Service Call Indicator", 31 },
219 { 0x26, "Handoff Power Level", 32 },
220 { 0x16, "Hard Handoff Parameters", 33 },
221 { 0x2E, "Information Element Requested", 34 },
222 { 0x09, "IS-2000 Channel Identity", 35 },
223 { 0x27, "IS-2000 Channel Identity 3X", 36 },
224 { 0x11, "IS-2000 Mobile Capabilities", 37 },
225 { 0x0F, "IS-2000 Non-Negotiable Service Configuration Record", 38 },
226 { 0x0E, "IS-2000 Service Configuration Record", 39 },
227 { 0x62, "IS-95/IS-2000 Cause Value", 40 },
228 { 0x67, "IS-2000 Redirection Record", 41 },
229 { 0x22, "IS-95 Channel Identity", 42 },
230 { 0x64, "IS-95 MS Measured Channel Identity", 43 },
231 { 0x17, "Layer 3 Information", 44 },
232 { 0x13, "Location Area Information", 45 },
233 { 0x38, "Message Waiting Indication", 46 },
234 { 0x0D, "Mobile Identity", 47 },
235 { 0x15, "MS Information Records (Forward)", 48 },
236 { 0xA0, "Origination Continuation Indicator", 49 },
237 { 0x5F, "PACA Order", 50 },
238 { 0x60, "PACA Reorigination Indicator", 51 },
239 { 0x4E, "PACA Timestamp", 52 },
240 { 0x70, "Packet Session Parameters", 53 },
241 { 0x14, "PDSN IP Address", 54 },
242 { 0xA2, "Power Down Indicator", 55 },
243 { 0x06, "Priority", 56 },
244 { 0x3B, "Protocol Revision", 57 },
245 { 0x18, "Protocol Type", 58 },
246 { 0x2D, "PSMM Count", 59 },
247 { 0x07, "Quality of Service Parameters", 60 },
248 { 0x1D, "Radio Environment and Resources", 61 },
249 { 0x1F, "Registration Type", 62 },
250 { 0x44, "Reject Cause", 63 },
251 { 0x1B, "Response Request", 64 },
252 { 0x68, "Return Cause", 65 },
253 { 0x21, "RF Channel Identity", 66 },
254 { 0x03, "Service Option", 67 },
255 { 0x1E, "Service Option Connection Identifier (SOCI)", 68 },
256 { 0x2A, "Service Option List", 69 },
257 { 0x69, "Service Redirection Info", 70 },
258 { 0x71, "Service Reference Identifier (SR_ID)", 71 },
260 { 0x34, "Signal", 73 },
261 { 0x35, "Slot Cycle Index", 74 },
262 { 0x31, "Software Version", 75 },
263 { 0x39, "Source RNC to Target RNC Transparent Container", 76 },
264 { 0x14, "Source PDSN Address", 77 },
266 { 0x3A, "Target RNC to Source RNC Transparent Container", 79 },
267 { 0x36, "Transcoder Mode", 80 }, /* XXX 0x1C in IOS 4.0.1 */
268 { 0x02, "User Zone ID", 81 },
269 { 0xA1, "Voice Privacy Request", 82 },
270 { 0x15, "MS Information Records (Reverse)", 88 },
274 const ext_value_string_t ansi_a_ios501_bsmap_strings[] =
276 { 0x69, "Additional Service Notification", 0 },
277 { 0x65, "ADDS Page", 1 },
278 { 0x66, "ADDS Page Ack", 2 },
279 { 0x67, "ADDS Transfer", 3 },
280 { 0x68, "ADDS Transfer Ack", 4 },
281 { 0x02, "Assignment Complete", 5 },
282 { 0x03, "Assignment Failure", 6 },
283 { 0x01, "Assignment Request", 7 },
284 { 0x45, "Authentication Request", 8 },
285 { 0x46, "Authentication Response", 9 },
286 { 0x48, "Base Station Challenge", 10 },
287 { 0x49, "Base Station Challenge Response", 11 },
288 { 0x40, "Block", 12 },
289 { 0x41, "Block Acknowledge", 13 },
290 { 0x09, "BS Service Request", 14 },
291 { 0x0A, "BS Service Response", 15 },
292 { 0x20, "Clear Command", 16 },
293 { 0x21, "Clear Complete", 17 },
294 { 0x22, "Clear Request", 18 },
295 { 0x57, "Complete Layer 3 Information", 19 },
296 { 0x60, "Feature Notification", 20 },
297 { 0x61, "Feature Notification Ack", 21 },
298 { 0x13, "Handoff Command", 22 },
299 { 0x15, "Handoff Commenced", 23 },
300 { 0x14, "Handoff Complete", 24 },
301 { 0x16, "Handoff Failure", 25 },
302 { 0x17, "Handoff Performed", 26 },
303 { 0x10, "Handoff Request", 27 },
304 { 0x12, "Handoff Request Acknowledge", 28 },
305 { 0x11, "Handoff Required", 29 },
306 { 0x1A, "Handoff Required Reject", 30 },
307 { 0x6C, "PACA Command", 31 },
308 { 0x6D, "PACA Command Ack", 32 },
309 { 0x6E, "PACA Update", 33 },
310 { 0x6F, "PACA Update Ack", 34 },
311 { 0x52, "Paging Request", 35 },
312 { 0x53, "Privacy Mode Command", 36 },
313 { 0x55, "Privacy Mode Complete", 37 },
314 { 0x23, "Radio Measurements for Position Request", 38 },
315 { 0x25, "Radio Measurements for Position Response", 39 },
316 { 0x56, "Rejection", 40 },
317 { 0x05, "Registration Request", 41 },
318 { 0x30, "Reset", 42 },
319 { 0x31, "Reset Acknowledge", 43 },
320 { 0x34, "Reset Circuit", 44 },
321 { 0x35, "Reset Circuit Acknowledge", 45 },
322 { 0x47, "SSD Update Request", 46 },
323 { 0x4A, "SSD Update Response", 47 },
324 { 0x6A, "Status Request", 48 },
325 { 0x6B, "Status Response", 49 },
326 { 0x39, "Transcoder Control Acknowledge", 50 },
327 { 0x38, "Transcoder Control Request", 51 },
328 { 0x42, "Unblock", 52 },
329 { 0x43, "Unblock Acknowledge", 53 },
330 { 0x0B, "User Zone Reject", 54 },
331 { 0x04, "User Zone Update", 55 },
332 { 0x58, "Bearer Update Request", 56 },
333 { 0x59, "Bearer Update Response", 58 },
334 { 0x5A, "Bearer Update Required", 57 },
335 { 0x71, "Mobile Station Registered Notification", 59 },
336 { 0x07, "BS Authentication Request", 60 },
337 { 0x08, "BS Authentication Request Ack", 61 },
341 const ext_value_string_t ansi_a_ios501_dtap_strings[] =
343 { 0x62, "Additional Service Request", 0 },
344 { 0x53, "ADDS Deliver", 1 },
345 { 0x54, "ADDS Deliver Ack", 2 },
346 { 0x26, "Alert With Information", 3 },
347 { 0x45, "Authentication Request", 4 },
348 { 0x46, "Authentication Response", 5 },
349 { 0x48, "Base Station Challenge", 6 },
350 { 0x49, "Base Station Challenge Response", 7 },
351 { 0x24, "CM Service Request", 8 },
352 { 0x25, "CM Service Request Continuation", 9 },
353 { 0x07, "Connect", 10 },
354 { 0x10, "Flash with Information", 11 },
355 { 0x50, "Flash with Information Ack", 12 },
356 { 0x02, "Location Updating Accept", 13 },
357 { 0x04, "Location Updating Reject", 14 },
358 { 0x08, "Location Updating Request", 15 },
359 { 0x27, "Paging Response", 16 },
360 { 0x2B, "Parameter Update Confirm", 17 },
361 { 0x2C, "Parameter Update Request", 18 },
362 { 0x56, "Rejection", 19 },
363 { 0x03, "Progress", 20 },
364 { 0x70, "Service Redirection", 21 },
365 { 0x2E, "Service Release", 22 },
366 { 0x2F, "Service Release Complete", 23 },
367 { 0x47, "SSD Update Request", 24 },
368 { 0x4A, "SSD Update Response", 25 },
369 { 0x6A, "Status Request", 26 },
370 { 0x6B, "Status Response", 27 },
371 { 0x0B, "User Zone Reject", 28 },
372 { 0x0C, "User Zone Update", 29 },
373 { 0x0D, "User Zone Update Request", 30 },
379 * ansi_a_ios401_elem_1_strings when the same element
380 * is being described.
382 const ext_value_string_t ansi_a_ios501_elem_1_strings[] =
384 { 0x20, "Access Network Identifiers", 0 },
385 { 0x3D, "ADDS User Part", 1 },
386 { 0x25, "AMPS Hard Handoff Parameters", 2 },
387 { 0x30, "Anchor PDSN Address", 3 },
388 { 0x7C, "Anchor P-P Address", 4 },
389 { 0x41, "Authentication Challenge Parameter", 5 },
390 { 0x28, "Authentication Confirmation Parameter (RANDC)", 6 },
391 { 0x59, "Authentication Data", 7 },
392 { 0x4A, "Authentication Event", 8 },
393 { 0x40, "Authentication Parameter COUNT", 9 },
394 { 0x42, "Authentication Response Parameter", 10 },
395 { 0x37, "Band Class", 11 },
396 { 0x5B, "Called Party ASCII Number", 12 },
397 { 0x5E, "Called Party BCD Number", 13 },
398 { 0x4B, "Calling Party ASCII Number", 14 },
399 { 0x04, "Cause", 15 },
400 { 0x08, "Cause Layer 3", 16 },
401 { 0x0C, "CDMA Serving One Way Delay", 17 },
402 { 0x05, "Cell Identifier", 18 },
403 { 0x1A, "Cell Identifier List", 19 },
404 { 0x23, "Channel Number", 20 },
405 { 0x0B, "Channel Type", 21 },
406 { 0x19, "Circuit Group", 22 },
407 { 0x01, "Circuit Identity Code", 23 },
408 { 0x24, "Circuit Identity Code Extension", 24 },
409 { 0x12, "Classmark Information Type 2", 25 },
410 { 0x29, "Downlink Radio Environment", 26 },
411 { 0x2B, "Downlink Radio Environment List", 27 },
412 { 0x0A, "Encryption Information", 28 },
413 { 0x10, "Extended Handoff Direction Parameters", 29 },
414 { 0x2C, "Geographic Location", 30 },
415 { 0x5A, "Special Service Call Indicator", 31 },
416 { 0x26, "Handoff Power Level", 32 },
417 { 0x16, "Hard Handoff Parameters", 33 },
418 { 0x2E, "Information Element Requested", 34 },
419 { 0x09, "IS-2000 Channel Identity", 35 },
420 { 0x27, "IS-2000 Channel Identity 3X", 36 },
421 { 0x11, "IS-2000 Mobile Capabilities", 37 },
422 { 0x0F, "IS-2000 Non-Negotiable Service Configuration Record", 38 },
423 { 0x0E, "IS-2000 Service Configuration Record", 39 },
424 { 0x62, "IS-95/IS-2000 Cause Value", 40 },
425 { 0x67, "IS-2000 Redirection Record", 41 },
426 { 0x22, "IS-95 Channel Identity", 42 },
427 { 0x64, "IS-95 MS Measured Channel Identity", 43 },
428 { 0x17, "Layer 3 Information", 44 },
429 { 0x13, "Location Area Information", 45 },
430 { 0x38, "Message Waiting Indication", 46 },
431 { 0x0D, "Mobile Identity", 47 },
432 { 0x15, "MS Information Records (Forward)", 48 },
433 { 0xA0, "Origination Continuation Indicator", 49 },
434 { 0x5F, "PACA Order", 50 },
435 { 0x60, "PACA Reorigination Indicator", 51 },
436 { 0x4E, "PACA Timestamp", 52 },
437 { 0x70, "Packet Session Parameters", 53 },
438 { 0x14, "PDSN IP Address", 54 },
439 { 0xA2, "Power Down Indicator", 55 },
440 { 0x06, "Priority", 56 },
441 { 0x3B, "Protocol Revision", 57 },
442 { 0x18, "Protocol Type", 58 },
443 { 0x2D, "PSMM Count", 59 },
444 { 0x07, "Quality of Service Parameters", 60 },
445 { 0x1D, "Radio Environment and Resources", 61 },
446 { 0x1F, "Registration Type", 62 },
447 { 0x44, "Reject Cause", 63 },
448 { 0x1B, "Response Request", 64 },
449 { 0x68, "Return Cause", 65 },
450 { 0x21, "RF Channel Identity", 66 },
451 { 0x03, "Service Option", 67 },
452 { 0x1E, "Service Option Connection Identifier (SOCI)", 68 },
453 { 0x2A, "Service Option List", 69 },
454 { 0x69, "Service Redirection Info", 70 },
455 { 0x71, "Service Reference Identifier (SR_ID)", 71 },
457 { 0x34, "Signal", 73 },
458 { 0x35, "Slot Cycle Index", 74 },
459 { 0x31, "Software Version", 75 },
460 { 0x39, "Source RNC to Target RNC Transparent Container", 76 },
461 { 0x14, "Source PDSN Address", 77 },
463 { 0x3A, "Target RNC to Source RNC Transparent Container", 79 },
464 { 0x36, "Transcoder Mode", 80 }, /* XXX 0x1C in IOS 4.0.1 */
465 { 0x02, "User Zone ID", 81 },
466 { 0xA1, "Voice Privacy Request", 82 },
467 { 0x45, "A2p Bearer Session-Level Parameters", 83 },
468 { 0x46, "A2p Bearer Format-Specific Parameters", 84 },
469 { 0x73, "MS Designated Frequency", 85 },
470 { 0x7D, "Mobile Subscription Information", 86 },
471 { 0x72, "Public Long Code Mask Identification", 87 },
472 { 0x15, "MS Information Records (Reverse)", 88 },
477 * From Table 3.7.5-1 C.S0005-D v1.0 L3
479 #define ANSI_FWD_MS_INFO_REC_DISPLAY 0x01
480 #define ANSI_FWD_MS_INFO_REC_CLD_PN 0x02
481 #define ANSI_FWD_MS_INFO_REC_CLG_PN 0x03
482 #define ANSI_FWD_MS_INFO_REC_CONN_N 0x04
483 #define ANSI_FWD_MS_INFO_REC_SIGNAL 0x05
484 #define ANSI_FWD_MS_INFO_REC_MW 0x06
485 #define ANSI_FWD_MS_INFO_REC_SC 0x07
486 #define ANSI_FWD_MS_INFO_REC_CLD_PSA 0x08
487 #define ANSI_FWD_MS_INFO_REC_CLG_PSA 0x09
488 #define ANSI_FWD_MS_INFO_REC_CONN_SA 0x0a
489 #define ANSI_FWD_MS_INFO_REC_RED_N 0x0b
490 #define ANSI_FWD_MS_INFO_REC_RED_SA 0x0c
491 #define ANSI_FWD_MS_INFO_REC_MP 0x0d
492 #define ANSI_FWD_MS_INFO_REC_PA 0x0e
493 #define ANSI_FWD_MS_INFO_REC_LC 0x0f
494 #define ANSI_FWD_MS_INFO_REC_EDISPLAY 0x10
495 #define ANSI_FWD_MS_INFO_REC_NNSC 0x13
496 #define ANSI_FWD_MS_INFO_REC_MC_EDISPLAY 0x14
497 #define ANSI_FWD_MS_INFO_REC_CWI 0x15
498 #define ANSI_FWD_MS_INFO_REC_EMC_EDISPLAY 0x16
499 #define ANSI_FWD_MS_INFO_REC_ERTI 0xfe
501 static const value_string ansi_fwd_ms_info_rec_str[] = {
502 { ANSI_FWD_MS_INFO_REC_DISPLAY, "Display" },
503 { ANSI_FWD_MS_INFO_REC_CLD_PN, "Called Party Number" },
504 { ANSI_FWD_MS_INFO_REC_CLG_PN, "Calling Party Number" },
505 { ANSI_FWD_MS_INFO_REC_CONN_N, "Connected Number" },
506 { ANSI_FWD_MS_INFO_REC_SIGNAL, "Signal" },
507 { ANSI_FWD_MS_INFO_REC_MW, "Message Waiting" },
508 { ANSI_FWD_MS_INFO_REC_SC, "Service Configuration" },
509 { ANSI_FWD_MS_INFO_REC_CLD_PSA, "Called Party Subaddress" },
510 { ANSI_FWD_MS_INFO_REC_CLG_PSA, "Calling Party Subaddress" },
511 { ANSI_FWD_MS_INFO_REC_CONN_SA, "Connected Subaddress" },
512 { ANSI_FWD_MS_INFO_REC_RED_N, "Redirecting Number" },
513 { ANSI_FWD_MS_INFO_REC_RED_SA, "Redirecting Subaddress" },
514 { ANSI_FWD_MS_INFO_REC_MP, "Meter Pulses" },
515 { ANSI_FWD_MS_INFO_REC_PA, "Parametric Alerting" },
516 { ANSI_FWD_MS_INFO_REC_LC, "Line Control" },
517 { ANSI_FWD_MS_INFO_REC_EDISPLAY, "Extended Display" },
518 { ANSI_FWD_MS_INFO_REC_NNSC, "Non-Negotiable Service Configuration" },
519 { ANSI_FWD_MS_INFO_REC_MC_EDISPLAY, "Multiple Character Extended Display" },
520 { ANSI_FWD_MS_INFO_REC_CWI, "Call Waiting Indicator" },
521 { ANSI_FWD_MS_INFO_REC_EMC_EDISPLAY, "Enhanced Multiple Character Extended Display" },
522 { ANSI_FWD_MS_INFO_REC_ERTI, "Extended Record Type International" },
525 #define NUM_FWD_MS_INFO_REC (sizeof(ansi_fwd_ms_info_rec_str)/sizeof(value_string))
526 static gint ett_ansi_fwd_ms_info_rec[NUM_FWD_MS_INFO_REC];
529 * From Table 2.7.4-1 C.S0005-D v1.0 L3
531 #define ANSI_REV_MS_INFO_REC_KEYPAD_FAC 0x03
532 #define ANSI_REV_MS_INFO_REC_CLD_PN 0x04
533 #define ANSI_REV_MS_INFO_REC_CLG_PN 0x05
534 #define ANSI_REV_MS_INFO_REC_CALL_MODE 0x07
535 #define ANSI_REV_MS_INFO_REC_TERM_INFO 0x08
536 #define ANSI_REV_MS_INFO_REC_ROAM_INFO 0x09
537 #define ANSI_REV_MS_INFO_REC_SECUR_STS 0x0a
538 #define ANSI_REV_MS_INFO_REC_CONN_N 0x0b
539 #define ANSI_REV_MS_INFO_REC_IMSI 0x0c
540 #define ANSI_REV_MS_INFO_REC_ESN 0x0d
541 #define ANSI_REV_MS_INFO_REC_BAND_INFO 0x0e
542 #define ANSI_REV_MS_INFO_REC_POWER_INFO 0x0f
543 #define ANSI_REV_MS_INFO_REC_OP_MODE_INFO 0x10
544 #define ANSI_REV_MS_INFO_REC_SO_INFO 0x11
545 #define ANSI_REV_MS_INFO_REC_MO_INFO 0x12
546 #define ANSI_REV_MS_INFO_REC_SC_INFO 0x13
547 #define ANSI_REV_MS_INFO_REC_CLD_PSA 0x14
548 #define ANSI_REV_MS_INFO_REC_CLG_PSA 0x15
549 #define ANSI_REV_MS_INFO_REC_CONN_SA 0x16
550 #define ANSI_REV_MS_INFO_REC_PCI 0x17
551 #define ANSI_REV_MS_INFO_REC_IMSI_M 0x18
552 #define ANSI_REV_MS_INFO_REC_IMSI_T 0x19
553 #define ANSI_REV_MS_INFO_REC_CAP_INFO 0x1a
554 #define ANSI_REV_MS_INFO_REC_CCC_INFO 0x1b
555 #define ANSI_REV_MS_INFO_REC_EMO_INFO 0x1c
556 #define ANSI_REV_MS_INFO_REC_GEO_CAP 0x1e
557 #define ANSI_REV_MS_INFO_REC_BAND_SUB 0x1f
558 #define ANSI_REV_MS_INFO_REC_GECO 0x20
559 #define ANSI_REV_MS_INFO_REC_HOOK 0x21
560 #define ANSI_REV_MS_INFO_REC_QOS_PARAM 0x22
561 #define ANSI_REV_MS_INFO_REC_ENCRYPT_CAP 0x23
562 #define ANSI_REV_MS_INFO_REC_SMI_CAP 0x24
563 #define ANSI_REV_MS_INFO_REC_UIM_ID 0x25
564 #define ANSI_REV_MS_INFO_REC_ESN_ME 0x26
565 #define ANSI_REV_MS_INFO_REC_MEID 0x27
566 #define ANSI_REV_MS_INFO_REC_EKEYPAD_FAC 0x28
567 #define ANSI_REV_MS_INFO_REC_SYNC_ID 0x29
568 #define ANSI_REV_MS_INFO_REC_ERTI 0xfe
570 static const value_string ansi_rev_ms_info_rec_str[] = {
571 { ANSI_REV_MS_INFO_REC_KEYPAD_FAC, "Keypad Facility" },
572 { ANSI_REV_MS_INFO_REC_CLD_PN, "Called Party Number" },
573 { ANSI_REV_MS_INFO_REC_CLG_PN, "Calling Party Number" },
574 { ANSI_REV_MS_INFO_REC_CALL_MODE, "Call Mode" },
575 { ANSI_REV_MS_INFO_REC_TERM_INFO, "Terminal Information" },
576 { ANSI_REV_MS_INFO_REC_ROAM_INFO, "Roaming Information" },
577 { ANSI_REV_MS_INFO_REC_SECUR_STS, "Security Status" },
578 { ANSI_REV_MS_INFO_REC_CONN_N, "Connected Number" },
579 { ANSI_REV_MS_INFO_REC_IMSI, "IMSI" },
580 { ANSI_REV_MS_INFO_REC_ESN, "ESN" },
581 { ANSI_REV_MS_INFO_REC_BAND_INFO, "Band Class Information" },
582 { ANSI_REV_MS_INFO_REC_POWER_INFO, "Power Class Information" },
583 { ANSI_REV_MS_INFO_REC_OP_MODE_INFO, "Operating Mode Information" },
584 { ANSI_REV_MS_INFO_REC_SO_INFO, "Service Option Information" },
585 { ANSI_REV_MS_INFO_REC_MO_INFO, "Multiplex Option Information" },
586 { ANSI_REV_MS_INFO_REC_SC_INFO, "Service Configuration Information" },
587 { ANSI_REV_MS_INFO_REC_CLD_PSA, "Called Party Subaddress" },
588 { ANSI_REV_MS_INFO_REC_CLG_PSA, "Calling Party Subaddress" },
589 { ANSI_REV_MS_INFO_REC_CONN_SA, "Connected Subaddress" },
590 { ANSI_REV_MS_INFO_REC_PCI, "Power Control Information" },
591 { ANSI_REV_MS_INFO_REC_IMSI_M, "IMSI_M" },
592 { ANSI_REV_MS_INFO_REC_IMSI_T, "IMSI_T" },
593 { ANSI_REV_MS_INFO_REC_CAP_INFO, "Capability Information" },
594 { ANSI_REV_MS_INFO_REC_CCC_INFO, "Channel Configuration Capability Information" },
595 { ANSI_REV_MS_INFO_REC_EMO_INFO, "Extended Multiplex Option Information" },
596 { ANSI_REV_MS_INFO_REC_GEO_CAP, "Geo-Location Capability" },
597 { ANSI_REV_MS_INFO_REC_BAND_SUB, "Band Subclass Information" },
598 { ANSI_REV_MS_INFO_REC_GECO, "Global Emergency Call" },
599 { ANSI_REV_MS_INFO_REC_HOOK, "Hook Status" },
600 { ANSI_REV_MS_INFO_REC_QOS_PARAM, "QoS Parameters" },
601 { ANSI_REV_MS_INFO_REC_ENCRYPT_CAP, "Encryption Capability" },
602 { ANSI_REV_MS_INFO_REC_SMI_CAP, "Signaling Message Integrity Capability" },
603 { ANSI_REV_MS_INFO_REC_UIM_ID, "UIM_ID" },
604 { ANSI_REV_MS_INFO_REC_ESN_ME, "ESN_ME" },
605 { ANSI_REV_MS_INFO_REC_MEID, "MEID" },
606 { ANSI_REV_MS_INFO_REC_EKEYPAD_FAC, "Extended Keypad Facility" },
607 { ANSI_REV_MS_INFO_REC_SYNC_ID, "SYNC_ID" },
608 { ANSI_REV_MS_INFO_REC_ERTI, "Extended Record Type International" },
611 #define NUM_REV_MS_INFO_REC (sizeof(ansi_rev_ms_info_rec_str)/sizeof(value_string))
612 static gint ett_ansi_rev_ms_info_rec[NUM_REV_MS_INFO_REC];
615 * C.S0057 Table 1.5-1
617 static const gchar *band_class_str[] = {
618 "800 MHz Cellular System",
619 "1.850 to 1.990 GHz Broadband PCS",
620 "872 to 960 MHz TACS Band",
621 "832 to 925 MHz JTACS Band",
622 "1.750 to 1.870 GHz Korean PCS",
626 "1.710 to 1.880 GHz PCS",
629 "400 MHz European PAMR",
630 "800 MHz European PAMR",
631 "2.5 GHz IMT-2000 Extension",
635 "US 2.5 GHz Forward Link Only",
636 "700 MHz Public Safety",
639 #define NUM_BAND_CLASS_STR (sizeof(band_class_str)/sizeof(gchar *))
641 static const gchar *cell_disc_str[] = {
642 "whole Cell Global Identification (CGI)",
644 "Cell Identity (CI)",
646 "Location Area Identification (LAI)",
647 "Location Area Code (LAC)",
649 "IS-41 whole Cell Global Identification (ICGI)",
650 "Enhanced whole Cell Global Identification (ECGI)"
652 #define NUM_CELL_DISC_STR (sizeof(cell_disc_str)/sizeof(gchar *))
654 /* Initialize the protocol and registered fields */
655 static int proto_a_bsmap = -1;
656 static int proto_a_dtap = -1;
658 const ext_value_string_t *ansi_a_bsmap_strings = NULL;
659 const ext_value_string_t *ansi_a_dtap_strings = NULL;
660 const ext_value_string_t *ansi_a_elem_1_strings = NULL;
662 static int ansi_a_tap = -1;
664 static int hf_ansi_a_none = -1;
665 static int hf_ansi_a_bsmap_msgtype = -1;
666 static int hf_ansi_a_dtap_msgtype = -1;
667 static int hf_ansi_a_length = -1;
668 static int hf_ansi_a_elem_id = -1;
669 static int hf_ansi_a_esn = -1;
670 static int hf_ansi_a_imsi = -1;
671 static int hf_ansi_a_min = -1;
672 static int hf_ansi_a_meid = -1;
673 static int hf_ansi_a_cld_party_bcd_num = -1;
674 static int hf_ansi_a_clg_party_bcd_num = -1;
675 static int hf_ansi_a_cld_party_ascii_num = -1;
676 static int hf_ansi_a_clg_party_ascii_num = -1;
677 static int hf_ansi_a_cell_ci = -1;
678 static int hf_ansi_a_cell_lac = -1;
679 static int hf_ansi_a_cell_mscid = -1;
680 static int hf_ansi_a_pdsn_ip_addr = -1;
681 static int hf_ansi_a_s_pdsn_ip_addr = -1;
682 static int hf_ansi_a_anchor_ip_addr = -1;
683 static int hf_ansi_a_anchor_pp_ip_addr = -1;
684 static int hf_ansi_a_a2p_bearer_ipv4_addr = -1;
685 static int hf_ansi_a_a2p_bearer_ipv6_addr = -1;
686 static int hf_ansi_a_a2p_bearer_udp_port = -1;
687 static int hf_ansi_a_so = -1;
688 static int hf_ansi_a_cause_1 = -1; /* 1 octet cause */
689 static int hf_ansi_a_cause_2 = -1; /* 2 octet cause */
690 static int hf_ansi_a_meid_configured = -1;
693 /* Initialize the subtree pointers */
694 static gint ett_bsmap = -1;
695 static gint ett_dtap = -1;
696 static gint ett_elems = -1;
697 static gint ett_elem = -1;
698 static gint ett_dtap_oct_1 = -1;
699 static gint ett_cm_srvc_type = -1;
700 static gint ett_ansi_ms_info_rec_reserved = -1;
701 static gint ett_ansi_enc_info = -1;
702 static gint ett_scm = -1;
703 static gint ett_cell_list = -1;
704 static gint ett_bearer_list = -1;
705 static gint ett_re_list = -1;
706 static gint ett_so_list = -1;
707 static gint ett_adds_user_part = -1;
708 static gint ett_scr = -1;
709 static gint ett_srvc_con_rec = -1;
710 static gint ett_cm2_band_class = -1;
711 static gint ett_vp_algs = -1;
713 static char a_bigbuf[1024];
714 static dissector_handle_t rtp_handle=NULL;
715 static dissector_handle_t data_handle;
716 static dissector_handle_t dtap_handle;
717 static dissector_table_t is637_dissector_table; /* IS-637-A Transport Layer (SMS) */
718 static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */
719 static dissector_table_t is801_dissector_table; /* IS-801 (PLD) */
720 static packet_info *g_pinfo;
721 static proto_tree *g_tree;
722 static address rtp_src_addr;
723 static guint32 rtp_ipv4_addr;
724 static struct e_in6_addr rtp_ipv6_addr;
725 static guint16 rtp_port;
726 static gboolean a_meid_configured = FALSE;
729 typedef struct dgt_set_t
731 unsigned char out[15];
736 * As per A.S0001 Called Party BCD Number
738 static dgt_set_t Dgt_tbcd = {
740 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
741 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c'
745 static dgt_set_t Dgt_msid = {
747 /* 0 1 2 3 4 5 6 7 8 9 a b c d e */
748 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
755 * Unpack BCD input pattern into output ASCII pattern
757 * Input Pattern is supplied using the same format as the digits
759 * Returns: length of unpacked pattern
763 char *out, /* ASCII pattern out */
764 guchar *in, /* packed pattern in */
765 int num_octs, /* Number of octets to unpack */
766 dgt_set_t *dgt /* Digit definitions */
775 * unpack first value in byte
778 *out++ = dgt->out[i & 0x0f];
782 * unpack second value in byte
786 if (i == 0x0f) /* odd number bytes - hit filler */
789 *out++ = dgt->out[i];
800 ansi_a_so_int_to_str(
803 const gchar *str = NULL;
807 case 1: str = "Basic Variable Rate Voice Service (8 kbps)"; break;
808 case 2: str = "Mobile Station Loopback (8 kbps)"; break;
809 case 3: str = "(EVRC) Enhanced Variable Rate Voice Service (8 kbps)"; break;
810 case 4: str = "Asynchronous Data Service (9.6 kbps)"; break;
811 case 5: str = "Group 3 Facsimile (9.6 kbps)"; break;
812 case 6: str = "Short Message Services (Rate Set 1)"; break;
813 case 7: str = "Packet Data Service: Internet or ISO Protocol Stack (9.6 kbps)"; break;
814 case 8: str = "Packet Data Service: CDPD Protocol Stack (9.6 kbps)"; break;
815 case 9: str = "Mobile Station Loopback (13 kbps)"; break;
816 case 10: str = "STU-III Transparent Service"; break;
817 case 11: str = "STU-III Non-Transparent Service"; break;
818 case 12: str = "Asynchronous Data Service (14.4 or 9.6 kbps)"; break;
819 case 13: str = "Group 3 Facsimile (14.4 or 9.6 kbps)"; break;
820 case 14: str = "Short Message Services (Rate Set 2)"; break;
821 case 15: str = "Packet Data Service: Internet or ISO Protocol Stack (14.4 kbps)"; break;
822 case 16: str = "Packet Data Service: CDPD Protocol Stack (14.4 kbps)"; break;
823 case 17: str = "High Rate Voice Service (13 kbps)"; break;
824 case 32768: str = "QCELP (13 kbps)"; break;
825 case 32798: /* 0x801e */ str = "Qualcomm Loopback"; break;
826 case 32799: /* 0x801f */ str = "Qualcomm Markov 8 kbps Loopback"; break;
827 case 32800: /* 0x8020 */ str = "Qualcomm Packet Data"; break;
828 case 32801: /* 0x8021 */ str = "Qualcomm Async Data"; break;
829 case 18: str = "Over-the-Air Parameter Administration (Rate Set 1)"; break;
830 case 19: str = "Over-the-Air Parameter Administration (Rate Set 2)"; break;
831 case 20: str = "Group 3 Analog Facsimile (Rate Set 1)"; break;
832 case 21: str = "Group 3 Analog Facsimile (Rate Set 2)"; break;
833 case 22: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS1 reverse)"; break;
834 case 23: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS2 reverse)"; break;
835 case 24: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS1 reverse)"; break;
836 case 25: str = "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS2 reverse)"; break;
837 case 26: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS1 reverse)"; break;
838 case 27: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS2 reverse)"; break;
839 case 28: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS1 reverse)"; break;
840 case 29: str = "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS2 reverse)"; break;
841 case 30: str = "Supplemental Channel Loopback Test for Rate Set 1"; break;
842 case 31: str = "Supplemental Channel Loopback Test for Rate Set 2"; break;
843 case 32: str = "Test Data Service Option (TDSO)"; break;
844 case 33: str = "cdma2000 High Speed Packet Data Service, Internet or ISO Protocol Stack"; break;
845 case 34: str = "cdma2000 High Speed Packet Data Service, CDPD Protocol Stack"; break;
846 case 35: str = "Location Services (PDS), Rate Set 1 (9.6 kbps)"; break;
847 case 36: str = "Location Services (PDS), Rate Set 2 (14.4 kbps)"; break;
848 case 37: str = "ISDN Interworking Service (64 kbps)"; break;
849 case 38: str = "GSM Voice"; break;
850 case 39: str = "GSM Circuit Data"; break;
851 case 40: str = "GSM Packet Data"; break;
852 case 41: str = "GSM Short Message Service"; break;
853 case 42: str = "None Reserved for MC-MAP standard service options"; break;
854 case 54: str = "Markov Service Option (MSO)"; break;
855 case 55: str = "Loopback Service Option (LSO)"; break;
856 case 56: str = "Selectable Mode Vocoder"; break;
857 case 57: str = "32 kbps Circuit Video Conferencing"; break;
858 case 58: str = "64 kbps Circuit Video Conferencing"; break;
859 case 59: str = "HRPD Accounting Records Identifier"; break;
860 case 60: str = "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Removal"; break;
861 case 61: str = "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Compression"; break;
862 case 62: str = "- 4099 None Reserved for standard service options"; break;
863 case 68: str = "(EVRC-B NB) Enhanced Variable Rate Voice Service"; break;
864 case 70: str = "(EVRC-B WB) Enhanced Variable Rate Voice Service"; break;
865 case 4100: str = "Asynchronous Data Service, Revision 1 (9.6 or 14.4 kbps)"; break;
866 case 4101: str = "Group 3 Facsimile, Revision 1 (9.6 or 14.4 kbps)"; break;
867 case 4102: str = "Reserved for standard service option"; break;
868 case 4103: str = "Packet Data Service: Internet or ISO Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
869 case 4104: str = "Packet Data Service: CDPD Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
871 if ((so >= 4105) && (so <= 32767)) { str = "Reserved for standard service options"; }
872 else if ((so >= 32769) && (so <= 32771)) { str = "Proprietary QUALCOMM Incorporated"; }
873 else if ((so >= 32772) && (so <= 32775)) { str = "Proprietary OKI Telecom"; }
874 else if ((so >= 32776) && (so <= 32779)) { str = "Proprietary Lucent Technologies"; }
875 else if ((so >= 32780) && (so <=32783)) { str = "Nokia"; }
876 else if ((so >= 32784) && (so <=32787)) { str = "NORTEL NETWORKS"; }
877 else if ((so >= 32788) && (so <=32791)) { str = "Sony Electronics Inc."; }
878 else if ((so >= 32792) && (so <=32795)) { str = "Motorola"; }
879 else if ((so >= 32796) && (so <=32799)) { str = "QUALCOMM Incorporated"; }
880 else if ((so >= 32800) && (so <=32803)) { str = "QUALCOMM Incorporated"; }
881 else if ((so >= 32804) && (so <=32807)) { str = "QUALCOMM Incorporated"; }
882 else if ((so >= 32808) && (so <=32811)) { str = "QUALCOMM Incorporated"; }
883 else if ((so >= 32812) && (so <=32815)) { str = "Lucent Technologies"; }
884 else if ((so >= 32816) && (so <=32819)) { str = "Denso International"; }
885 else if ((so >= 32820) && (so <=32823)) { str = "Motorola"; }
886 else if ((so >= 32824) && (so <=32827)) { str = "Denso International"; }
887 else if ((so >= 32828) && (so <=32831)) { str = "Denso International"; }
888 else if ((so >= 32832) && (so <=32835)) { str = "Denso International"; }
889 else if ((so >= 32836) && (so <=32839)) { str = "NEC America"; }
890 else if ((so >= 32840) && (so <=32843)) { str = "Samsung Electronics"; }
891 else if ((so >= 32844) && (so <=32847)) { str = "Texas Instruments Incorporated"; }
892 else if ((so >= 32848) && (so <=32851)) { str = "Toshiba Corporation"; }
893 else if ((so >= 32852) && (so <=32855)) { str = "LG Electronics Inc."; }
894 else if ((so >= 32856) && (so <=32859)) { str = "VIA Telecom Inc."; }
895 else { str = "Reserved"; }
903 /* ELEMENT FUNCTIONS */
905 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
906 if ((edc_len) > (edc_max_len)) \
908 proto_tree_add_text(tree, tvb, \
909 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
910 curr_offset += ((edc_len) - (edc_max_len)); \
913 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
914 if ((sdc_len) < (sdc_min_len)) \
916 proto_tree_add_text(tree, tvb, \
917 curr_offset, (sdc_len), "Short Data (?)"); \
918 curr_offset += (sdc_len); \
919 return(curr_offset - offset); \
922 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
923 if ((edc_len) != (edc_eq_len)) \
925 proto_tree_add_text(tree, tvb, \
926 asn1->offset, (edc_len), "Unexpected Data Length"); \
927 asn1->offset += (edc_len); \
931 #define NO_MORE_DATA_CHECK(nmdc_len) \
932 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
939 elem_chan_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
945 curr_offset = offset;
947 value = tvb_get_ntohs(tvb, curr_offset);
949 switch (global_a_variant)
951 case A_VARIANT_IOS401:
952 proto_tree_add_text(tree,
954 "Channel Number: %u",
957 g_snprintf(add_string, string_len, " - (%u)", value);
960 case A_VARIANT_IOS501:
961 other_decode_bitfield_value(a_bigbuf, value >> 8, 0xf8, 8);
962 proto_tree_add_text(tree,
967 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x07, 8);
968 proto_tree_add_text(tree, tvb, curr_offset, 1,
969 "%s : ARFCN (MSB): %u",
973 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
974 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
978 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value & 0x07ff);
984 /* no length check possible */
986 return(curr_offset - offset);
993 elem_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
997 const gchar *str = NULL;
1000 curr_offset = offset;
1003 oct = tvb_get_guint8(tvb, curr_offset);
1007 case 0: str = "No Alert"; break;
1008 case 1: str = "Speech"; break;
1009 case 2: str = "Data"; data = TRUE; break;
1010 case 3: str = "Signaling"; break;
1016 proto_tree_add_text(tree,
1017 tvb, curr_offset, 1,
1018 "Speech or Data Indicator: %s",
1021 g_snprintf(add_string, string_len, " - (%s)", str);
1025 NO_MORE_DATA_CHECK(len);
1027 oct = tvb_get_guint8(tvb, curr_offset);
1031 case 0: str = "Reserved (invalid)"; break;
1032 case 1: str = "DCCH"; break;
1033 case 2: str = "Reserved for future use (invalid)"; break;
1034 case 8: str = "Full rate TCH channel Bm"; break;
1035 case 9: str = "Half rate TCH channel Lm"; break;
1041 proto_tree_add_text(tree,
1042 tvb, curr_offset, 1,
1043 "Channel Rate and Type: %s",
1048 NO_MORE_DATA_CHECK(len);
1050 oct = tvb_get_guint8(tvb, curr_offset);
1054 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1055 proto_tree_add_text(tree,
1056 tvb, curr_offset, 1,
1060 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1061 proto_tree_add_text(tree,
1062 tvb, curr_offset, 1,
1063 "%s : %sTransparent service",
1065 (oct & 0x40) ? "Non-" : "");
1067 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
1068 proto_tree_add_text(tree,
1069 tvb, curr_offset, 1,
1077 case 0: str = "No Resources Required (invalid)"; break;
1078 case 1: str = "Reserved"; break;
1079 case 2: str = "Reserved"; break;
1080 case 3: str = "TIA/EIA-IS-2000 8 kb/s vocoder"; break;
1081 case 4: str = "8 kb/s enhanced vocoder (EVRC)"; break;
1082 case 5: str = "13 kb/s vocoder"; break;
1083 case 6: str = "ADPCM"; break;
1089 proto_tree_add_text(tree,
1090 tvb, curr_offset, 1,
1091 "Speech Encoding Algorithm/data rate + Transparency Indicator: %s",
1097 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1099 return(curr_offset - offset);
1106 elem_return_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
1110 guint32 curr_offset;
1112 curr_offset = offset;
1114 oct = tvb_get_guint8(tvb, curr_offset);
1116 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1117 proto_tree_add_text(tree, tvb, curr_offset, 1,
1123 case 0: str = "Normal access"; break;
1124 case 1: str = "Service redirection failed as a result of system not found"; break;
1125 case 2: str = "Service redirection failed as a result of protocol mismatch"; break;
1126 case 3: str = "Service redirection failed as a result of registration rejection"; break;
1127 case 4: str = "Service redirection failed as a result of wrong SID"; break;
1128 case 5: str = "Service redirection failed as a result of wrong NID"; break;
1134 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1135 proto_tree_add_text(tree, tvb, curr_offset, 1,
1136 "%s : Return Cause: %s",
1142 /* no length check possible */
1144 return(curr_offset - offset);
1151 elem_rf_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1155 guint32 curr_offset;
1158 curr_offset = offset;
1160 proto_tree_add_text(tree, tvb, curr_offset, 1,
1165 oct = tvb_get_guint8(tvb, curr_offset);
1167 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1168 proto_tree_add_text(tree, tvb, curr_offset, 1,
1172 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1173 proto_tree_add_text(tree, tvb, curr_offset, 1,
1177 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1178 proto_tree_add_text(tree, tvb, curr_offset, 1,
1179 "%s : ANSI/EIA/TIA-553",
1184 oct = tvb_get_guint8(tvb, curr_offset);
1186 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1187 proto_tree_add_text(tree, tvb, curr_offset, 1,
1191 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1192 proto_tree_add_text(tree, tvb, curr_offset, 1,
1193 "%s : Timeslot Number",
1198 value = tvb_get_ntohs(tvb, curr_offset);
1200 other_decode_bitfield_value(a_bigbuf, value >> 8, 0xf8, 8);
1201 proto_tree_add_text(tree, tvb, curr_offset, 1,
1205 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x07, 8);
1206 proto_tree_add_text(tree, tvb, curr_offset, 1,
1207 "%s : ARFCN (MSB): %u",
1211 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1212 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
1216 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value & 0x07ff);
1220 /* no length check possible */
1222 return(curr_offset - offset);
1229 elem_sr_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1232 guint32 curr_offset;
1234 curr_offset = offset;
1236 oct = tvb_get_guint8(tvb, curr_offset);
1238 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
1239 proto_tree_add_text(tree,
1240 tvb, curr_offset, 1,
1244 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1245 proto_tree_add_text(tree,
1246 tvb, curr_offset, 1,
1251 g_snprintf(add_string, string_len, " - (%u)", oct);
1255 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1257 return(curr_offset - offset);
1264 elem_sid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1267 guint32 curr_offset;
1270 curr_offset = offset;
1272 value = tvb_get_ntohs(tvb, curr_offset);
1274 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x80, 8);
1275 proto_tree_add_text(tree, tvb, curr_offset, 1,
1279 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x7f, 8);
1280 proto_tree_add_text(tree, tvb, curr_offset, 1,
1281 "%s : SID (MSB), %u",
1285 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1286 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
1290 g_snprintf(add_string, string_len, " - (SID: %u)", value & 0x7fff);
1294 /* no length check possible */
1296 return(curr_offset - offset);
1303 elem_is95_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1307 guint32 curr_offset;
1309 curr_offset = offset;
1311 oct = tvb_get_guint8(tvb, curr_offset);
1313 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1314 proto_tree_add_text(tree, tvb, curr_offset, 1,
1315 "%s : Hard Handoff",
1318 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
1319 proto_tree_add_text(tree, tvb, curr_offset, 1,
1320 "%s : Number of Channels to Add: %u",
1324 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
1325 proto_tree_add_text(tree, tvb, curr_offset, 1,
1326 "%s : Frame Offset: (%u), %.2f ms",
1329 (oct & 0x0f) * 1.25);
1333 NO_MORE_DATA_CHECK(len);
1335 SHORT_DATA_CHECK(len - (curr_offset - offset), 4);
1339 oct = tvb_get_guint8(tvb, curr_offset);
1341 proto_tree_add_text(tree, tvb, curr_offset, 1,
1342 "Walsh Code Channel Index: %u",
1347 oct = tvb_get_guint8(tvb, curr_offset);
1349 other_decode_bitfield_value(a_bigbuf, oct, 0xff, 8);
1350 proto_tree_add_text(tree, tvb, curr_offset, 1,
1351 "%s : Pilot PN Code (LSB)",
1357 oct = tvb_get_guint8(tvb, curr_offset);
1358 value |= ((guint32) (oct & 0x80)) << 1;
1360 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1361 proto_tree_add_text(tree, tvb, curr_offset, 1,
1362 "%s : Pilot PN Code (MSB): %u",
1366 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1367 proto_tree_add_text(tree, tvb, curr_offset, 1,
1368 "%s : Power Combined",
1371 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1372 proto_tree_add_text(tree, tvb, curr_offset, 1,
1373 "%s : Frequency Included",
1376 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1377 proto_tree_add_text(tree, tvb, curr_offset, 1,
1381 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
1383 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1384 proto_tree_add_text(tree, tvb, curr_offset, 1,
1385 "%s : ARFCN (MSB): %u",
1391 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
1392 proto_tree_add_text(tree, tvb, curr_offset, 1,
1396 if (add_string[0] == '\0')
1398 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value);
1403 while ((len - (curr_offset - offset)) >= 4);
1405 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1407 return(curr_offset - offset);
1419 elem_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1423 guint32 curr_offset;
1426 proto_tree *subtree;
1429 curr_offset = offset;
1433 while ((len - (curr_offset - offset)) >= 2)
1437 oct = tvb_get_guint8(tvb, curr_offset);
1439 switch ((oct & 0x7c) >> 2)
1441 case 0: str = "Not Used - Invalid value"; break;
1442 case 1: str = "SME Key: Signaling Message Encryption Key"; break;
1443 case 2: str = "Reserved (VPM: Voice Privacy Mask)"; break;
1444 case 3: str = "Reserved"; break;
1445 case 4: str = "Private Longcode"; break;
1446 case 5: str = "Data Key (ORYX)"; break;
1447 case 6: str = "Initial RAND"; break;
1454 proto_tree_add_text(tree,
1455 tvb, curr_offset, 1,
1456 "Encryption Info [%u]: (%u) %s",
1461 subtree = proto_item_add_subtree(item, ett_ansi_enc_info);
1463 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1464 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1468 other_decode_bitfield_value(a_bigbuf, oct, 0x7c, 8);
1469 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1470 "%s : Encryption Parameter Identifier: (%u) %s",
1475 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1476 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1479 (oct & 0x02) ? "active" : "inactive");
1481 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1482 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1483 "%s : Available: algorithm is %savailable",
1485 (oct & 0x01) ? "" : "not ");
1489 oct_len = tvb_get_guint8(tvb, curr_offset);
1491 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
1492 curr_offset, 1, oct_len);
1498 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
1500 proto_tree_add_text(subtree, tvb, curr_offset, oct_len,
1501 "Encryption Parameter value");
1503 curr_offset += oct_len;
1507 g_snprintf(add_string, string_len, " - %u record%s",
1508 num_recs, plurality(num_recs, "", "s"));
1510 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1512 return(curr_offset - offset);
1517 * NO ASSOCIATED DATA
1529 elem_cm_info_type_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1532 guint8 num_bands, band_class_count;
1533 guint32 curr_offset;
1535 proto_tree *subtree;
1539 curr_offset = offset;
1541 oct = tvb_get_guint8(tvb, curr_offset);
1543 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
1544 proto_tree_add_text(tree, tvb, curr_offset, 1,
1545 "%s : Mobile P_REV: %u",
1549 g_snprintf(add_string, string_len, " - P_REV (%u)", (oct & 0xe0) >> 5);
1551 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1552 proto_tree_add_text(tree, tvb, curr_offset, 1,
1556 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1557 proto_tree_add_text(tree, tvb, curr_offset, 1,
1558 "%s : See List of Entries",
1563 case 0: str = "Class 1, vehicle and portable"; break;
1564 case 1: str = "Class 2, portable"; break;
1565 case 2: str = "Class 3, handheld"; break;
1566 case 3: str = "Class 4, handheld"; break;
1567 case 4: str = "Class 5, handheld"; break;
1568 case 5: str = "Class 6, handheld"; break;
1569 case 6: str = "Class 7, handheld"; break;
1571 str = "Class 8, handheld";
1575 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1576 proto_tree_add_text(tree, tvb, curr_offset, 1,
1577 "%s : RF Power Capability: %s",
1583 proto_tree_add_text(tree, tvb, curr_offset, 1,
1588 oct = tvb_get_guint8(tvb, curr_offset);
1590 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1591 proto_tree_add_text(tree, tvb, curr_offset, 1,
1592 "%s : NAR_AN_CAP: N-AMPS %ssupported",
1594 (oct & 0x80) ? "" : "not ");
1596 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1597 proto_tree_add_text(tree, tvb, curr_offset, 1,
1598 "%s : IS-95: %ssupported",
1600 (oct & 0x40) ? "" : "not ");
1602 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1603 proto_tree_add_text(tree, tvb, curr_offset, 1,
1604 "%s : Slotted: mobile is %sin slotted mode",
1606 (oct & 0x20) ? "" : "not ");
1608 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
1609 proto_tree_add_text(tree, tvb, curr_offset, 1,
1613 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1614 proto_tree_add_text(tree, tvb, curr_offset, 1,
1615 "%s : DTX: mobile is %scapable of DTX",
1617 (oct & 0x04) ? "" : "not ");
1619 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1620 proto_tree_add_text(tree, tvb, curr_offset, 1,
1621 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1623 (oct & 0x02) ? "" : "not ");
1625 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1626 proto_tree_add_text(tree, tvb, curr_offset, 1,
1632 NO_MORE_DATA_CHECK(len);
1634 proto_tree_add_text(tree, tvb, curr_offset, 1,
1639 NO_MORE_DATA_CHECK(len);
1641 oct = tvb_get_guint8(tvb, curr_offset);
1643 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
1644 proto_tree_add_text(tree, tvb, curr_offset, 1,
1648 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
1649 proto_tree_add_text(tree, tvb, curr_offset, 1,
1650 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1652 (oct & 0x02) ? "" : "not ");
1654 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
1655 proto_tree_add_text(tree, tvb, curr_offset, 1,
1656 "%s : PACA Supported Indicator (PSI): mobile station %s PACA",
1658 (oct & 0x01) ? "supports" : "does not support");
1662 NO_MORE_DATA_CHECK(len);
1664 oct = tvb_get_guint8(tvb, curr_offset);
1666 proto_tree_add_text(tree, tvb, curr_offset, 1,
1672 oct = tvb_get_guint8(tvb, curr_offset);
1675 proto_tree_add_text(tree, tvb, curr_offset, 1,
1676 "Station Class Mark: %u",
1680 * following SCM decode is from:
1681 * 3GPP2 C.S0005-0 section 2.3.3
1682 * 3GPP2 C.S0072-0 section 2.1.2
1684 subtree = proto_item_add_subtree(item, ett_scm);
1686 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
1687 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1688 "%s : Extended SCM Indicator: %s",
1690 (oct & 0x80) ? "Band Classes 1,4" : "Other bands");
1692 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
1693 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1696 (oct & 0x40) ? "Dual Mode" : "CDMA Only");
1698 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
1699 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1702 (oct & 0x20) ? "Slotted" : "Non-Slotted");
1707 g_strlcat(add_string, " (MEID configured)", string_len);
1708 a_meid_configured = TRUE;
1715 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
1716 proto_tree_add_boolean_format(subtree, hf_ansi_a_meid_configured, tvb,
1717 curr_offset, 1, a_meid_configured,
1718 "%s : MEID %sconfigured",
1722 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1723 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1724 "%s : 25 MHz Bandwidth",
1727 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
1728 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1729 "%s : %s Transmission",
1731 (oct & 0x04) ? "Discontinuous" : "Continuous");
1735 case 0x00: str = "Class I"; break;
1736 case 0x01: str = "Class II"; break;
1737 case 0x02: str = "Class III"; break;
1738 case 0x03: str = "Reserved"; break;
1741 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
1742 proto_tree_add_text(subtree, tvb, curr_offset, 1,
1743 "%s : Power Class for Band Class 0 Analog Operation: %s",
1749 NO_MORE_DATA_CHECK(len);
1751 band_class_count = tvb_get_guint8(tvb, curr_offset);
1753 proto_tree_add_text(tree, tvb, curr_offset, 1,
1754 "Count of Band Class Entries: %u",
1759 oct = tvb_get_guint8(tvb, curr_offset);
1761 proto_tree_add_text(tree, tvb, curr_offset, 1,
1762 "Band Class Entry Length: %u",
1767 NO_MORE_DATA_CHECK(len);
1771 SHORT_DATA_CHECK(len - (curr_offset - offset), 3);
1777 proto_tree_add_text(tree, tvb, curr_offset, 3,
1778 "Band Class Entry [%u]",
1781 subtree = proto_item_add_subtree(item, ett_cm2_band_class);
1783 oct = tvb_get_guint8(tvb, curr_offset);
1785 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
1786 proto_tree_add_text(subtree,
1787 tvb, curr_offset, 1,
1791 band_class = oct & 0x1f;
1792 if ((band_class < 0) || (band_class >= (gint) NUM_BAND_CLASS_STR))
1798 str = band_class_str[band_class];
1801 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
1802 proto_tree_add_text(subtree,
1803 tvb, curr_offset, 1,
1804 "%s : Band Class: %s",
1810 oct2 = tvb_get_guint8(tvb, curr_offset);
1811 oct = tvb_get_guint8(tvb, curr_offset+1);
1815 other_decode_bitfield_value(a_bigbuf, oct2, 0x80, 8);
1816 proto_tree_add_text(subtree,
1817 tvb, curr_offset, 1,
1818 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode in Band Class 1 and Band Class 4)",
1821 other_decode_bitfield_value(a_bigbuf, oct2, 0x40, 8);
1822 proto_tree_add_text(subtree,
1823 tvb, curr_offset, 1,
1824 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode in Band Class 0 and Band Class 3)",
1827 other_decode_bitfield_value(a_bigbuf, oct2, 0x20, 8);
1828 proto_tree_add_text(subtree,
1829 tvb, curr_offset, 1,
1830 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1833 other_decode_bitfield_value(a_bigbuf, oct2, 0x10, 8);
1834 proto_tree_add_text(subtree,
1835 tvb, curr_offset, 1,
1836 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1839 other_decode_bitfield_value(a_bigbuf, oct2, 0x08, 8);
1840 proto_tree_add_text(subtree,
1841 tvb, curr_offset, 1,
1842 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1847 other_decode_bitfield_value(a_bigbuf, oct2, 0x80, 8);
1848 proto_tree_add_text(subtree,
1849 tvb, curr_offset, 1,
1850 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode)",
1853 other_decode_bitfield_value(a_bigbuf, oct2, 0x40, 8);
1854 proto_tree_add_text(subtree,
1855 tvb, curr_offset, 1,
1856 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode)",
1859 other_decode_bitfield_value(a_bigbuf, oct2, 0x20, 8);
1860 proto_tree_add_text(subtree,
1861 tvb, curr_offset, 1,
1862 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1865 other_decode_bitfield_value(a_bigbuf, oct2, 0x10, 8);
1866 proto_tree_add_text(subtree,
1867 tvb, curr_offset, 1,
1868 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1871 other_decode_bitfield_value(a_bigbuf, oct2, 0x08, 8);
1872 proto_tree_add_text(subtree,
1873 tvb, curr_offset, 1,
1874 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1878 other_decode_bitfield_value(a_bigbuf, oct2, 0x07, 8);
1879 proto_tree_add_text(subtree,
1880 tvb, curr_offset, 1,
1886 proto_tree_add_text(subtree,
1887 tvb, curr_offset, 1,
1888 "Band Class MS Protocol Level: %u",
1893 proto_item_append_text(item, ": (%d)", band_class);
1897 while (((len - (curr_offset - offset)) >= 3) &&
1898 (num_bands < band_class_count));
1901 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
1903 return(curr_offset - offset);
1910 elem_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
1915 guint32 curr_offset;
1919 curr_offset = offset;
1921 oct = tvb_get_guint8(tvb, curr_offset);
1926 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
1927 proto_tree_add_text(tree,
1928 tvb, curr_offset, 1,
1929 "%s : MEID Hex Digit 1: %hhX",
1933 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
1934 proto_tree_add_text(tree,
1935 tvb, curr_offset, 1,
1936 "%s : Odd/Even Indicator: %s",
1938 (oct & 0x08) ? "ODD" : "EVEN");
1940 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
1941 proto_tree_add_text(tree,
1942 tvb, curr_offset, 1,
1943 "%s : Type of Identity: MEID",
1949 nib = (oct & 0xf0) >> 4;
1952 a_bigbuf[i++] = nib + 0x30; /* + '0' */
1956 a_bigbuf[i++] = nib + 0x41; /* + 'A' */
1959 while ((len - (curr_offset - offset)) > 0)
1961 oct = tvb_get_guint8(tvb, curr_offset);
1966 a_bigbuf[i++] = nib + 0x30; /* + '0' */
1970 a_bigbuf[i++] = nib + 0x41; /* + 'A' */
1973 nib = (oct & 0xf0) >> 4;
1976 a_bigbuf[i++] = nib + 0x30; /* + '0' */
1980 a_bigbuf[i++] = nib + 0x41; /* + 'A' */
1987 proto_tree_add_string_format(tree,
1989 tvb, offset + 1, len - 1,
1994 g_snprintf(add_string, string_len, " - %s (%s)",
2000 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
2001 proto_tree_add_text(tree,
2002 tvb, curr_offset, 1,
2006 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2007 proto_tree_add_text(tree,
2008 tvb, curr_offset, 1,
2009 "%s : Type of Identity: Broadcast",
2014 oct = tvb_get_guint8(tvb, curr_offset);
2016 switch ((oct & 0xc0) >> 6)
2018 case 0: str = "Normal"; break;
2019 case 1: str = "Interactive"; break;
2020 case 2: str = "Urgent"; break;
2026 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2027 proto_tree_add_text(tree,
2028 tvb, curr_offset, 1,
2029 "%s : Priority: %s",
2033 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
2034 proto_tree_add_text(tree,
2035 tvb, curr_offset, 1,
2036 "%s : Message ID: %u",
2042 oct = tvb_get_guint8(tvb, curr_offset);
2044 proto_tree_add_text(tree,
2045 tvb, curr_offset, 1,
2049 g_snprintf(add_string, string_len, " - Broadcast (Zone ID: %u)", oct);
2053 value = tvb_get_ntohs(tvb, curr_offset);
2057 case 0x0000: str = "Unknown or unspecified"; break;
2058 case 0x0001: str = "Emergency Broadcasts"; break;
2059 case 0x0002: str = "Administrative"; break;
2060 case 0x0003: str = "Maintenance"; break;
2061 case 0x0004: str = "General News - Local"; break;
2062 case 0x0005: str = "General News - Regional"; break;
2063 case 0x0006: str = "General News - National"; break;
2064 case 0x0007: str = "General News - International"; break;
2065 case 0x0008: str = "Business/Financial News - Local"; break;
2066 case 0x0009: str = "Business/Financial News - Regional"; break;
2067 case 0x000A: str = "Business/Financial News - National"; break;
2068 case 0x000B: str = "Business/Financial News - International"; break;
2069 case 0x000C: str = "Sports News - Local"; break;
2070 case 0x000D: str = "Sports News - Regional"; break;
2071 case 0x000E: str = "Sports News - National"; break;
2072 case 0x000F: str = "Sports News - International"; break;
2073 case 0x0010: str = "Entertainment News - Local"; break;
2074 case 0x0011: str = "Entertainment News - Regional"; break;
2075 case 0x0012: str = "Entertainment News - National"; break;
2076 case 0x0013: str = "Entertainment News - International"; break;
2077 case 0x0014: str = "Local Weather"; break;
2078 case 0x0015: str = "Area Traffic Reports"; break;
2079 case 0x0016: str = "Local Airport Flight Schedules"; break;
2080 case 0x0017: str = "Restaurants"; break;
2081 case 0x0018: str = "Lodgings"; break;
2082 case 0x0019: str = "Retail Directory"; break;
2083 case 0x001A: str = "Advertisements"; break;
2084 case 0x001B: str = "Stock Quotes"; break;
2085 case 0x001C: str = "Employment Opportunities"; break;
2086 case 0x001D: str = "Medical/Health/Hospitals"; break;
2087 case 0x001E: str = "Technology News"; break;
2088 case 0x001F: str = "Multi-category"; break;
2090 if ((value >= 0x0020) && (value <= 0x8000)) { str = "Reserved for standard service categories"; }
2091 else { str = "Reserved for proprietary service categories"; }
2095 proto_tree_add_text(tree,
2096 tvb, curr_offset, 2,
2103 oct = tvb_get_guint8(tvb, curr_offset);
2107 case 0: str = "Unknown or unspecified"; break;
2108 case 1: str = "English"; break;
2109 case 2: str = "French"; break;
2110 case 3: str = "Spanish"; break;
2111 case 4: str = "Japanese"; break;
2112 case 5: str = "Korean"; break;
2113 case 6: str = "Chinese"; break;
2114 case 7: str = "Hebrew"; break;
2120 proto_tree_add_text(tree,
2121 tvb, curr_offset, 1,
2122 "Language: (%u) %s",
2130 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2131 proto_tree_add_text(tree,
2132 tvb, curr_offset, 1,
2136 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2137 proto_tree_add_text(tree,
2138 tvb, curr_offset, 1,
2139 "%s : Odd/Even Indicator: %s",
2141 (oct & 0x08) ? "ODD" : "EVEN");
2143 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2144 proto_tree_add_text(tree,
2145 tvb, curr_offset, 1,
2146 "%s : Type of Identity: No Identity Code",
2149 g_snprintf(add_string, string_len, " - No Identity Code");
2155 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2156 "Format not supported");
2159 curr_offset += len - 1;
2163 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2164 proto_tree_add_text(tree,
2165 tvb, curr_offset, 1,
2166 "%s : Identity Digit 1: %c",
2168 Dgt_msid.out[(oct & 0xf0) >> 4]);
2170 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2171 proto_tree_add_text(tree,
2172 tvb, curr_offset, 1,
2173 "%s : Odd/Even Indicator: %s",
2175 (oct & 0x08) ? "ODD" : "EVEN");
2177 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2178 proto_tree_add_text(tree,
2179 tvb, curr_offset, 1,
2180 "%s : Type of Identity: %s",
2182 ((oct & 0x07) == 1) ? "MIN" : "IMSI");
2184 a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
2187 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
2189 my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
2192 proto_tree_add_string_format(tree,
2193 ((oct & 0x07) == 1) ? hf_ansi_a_min : hf_ansi_a_imsi,
2194 tvb, curr_offset, len - (curr_offset - offset),
2199 g_snprintf(add_string, string_len, " - %s (%s)",
2200 ((oct & 0x07) == 1) ? "MIN" : "IMSI",
2203 curr_offset += len - (curr_offset - offset);
2207 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2208 proto_tree_add_text(tree,
2209 tvb, curr_offset, 1,
2213 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2214 proto_tree_add_text(tree,
2215 tvb, curr_offset, 1,
2216 "%s : Odd/Even Indicator: %s",
2218 (oct & 0x08) ? "ODD" : "EVEN");
2220 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2221 proto_tree_add_text(tree,
2222 tvb, curr_offset, 1,
2223 "%s : Type of Identity: Interface Directory Number",
2226 g_snprintf(add_string, string_len, " - Interface Directory Number");
2232 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2233 "Format not supported");
2236 curr_offset += len - 1;
2240 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2241 proto_tree_add_text(tree,
2242 tvb, curr_offset, 1,
2246 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2247 proto_tree_add_text(tree,
2248 tvb, curr_offset, 1,
2249 "%s : Odd/Even Indicator: %s",
2251 (oct & 0x08) ? "ODD" : "EVEN");
2253 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2254 proto_tree_add_text(tree,
2255 tvb, curr_offset, 1,
2256 "%s : Type of Identity: TMSI",
2259 g_snprintf(add_string, string_len, " - TMSI");
2265 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2266 "Format not supported");
2269 curr_offset += len - 1;
2273 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2274 proto_tree_add_text(tree,
2275 tvb, curr_offset, 1,
2279 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
2280 proto_tree_add_text(tree,
2281 tvb, curr_offset, 1,
2282 "%s : Odd/Even Indicator: %s",
2284 (oct & 0x08) ? "ODD" : "EVEN");
2286 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2287 proto_tree_add_text(tree,
2288 tvb, curr_offset, 1,
2289 "%s : Type of Identity: ESN",
2294 value = tvb_get_ntohl(tvb, curr_offset);
2296 proto_tree_add_uint(tree, hf_ansi_a_esn,
2297 tvb, curr_offset, 4,
2300 g_snprintf(add_string, string_len, " - %sESN (0x%04x)",
2301 a_meid_configured ? "p" : "",
2308 proto_tree_add_text(tree, tvb, curr_offset, len,
2311 g_snprintf(add_string, string_len, " - Format Unknown");
2317 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2319 return(curr_offset - offset);
2326 elem_sci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2329 guint32 curr_offset;
2332 curr_offset = offset;
2334 oct = tvb_get_guint8(tvb, curr_offset);
2336 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
2337 proto_tree_add_text(tree,
2338 tvb, curr_offset, 1,
2342 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
2343 proto_tree_add_text(tree,
2344 tvb, curr_offset, 1,
2345 "%s : Slot Cycle Index: %u",
2349 g_snprintf(add_string, string_len, " - (%u)", oct & 0x07);
2353 /* no length check possible */
2355 return(curr_offset - offset);
2362 elem_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2365 guint32 curr_offset;
2367 curr_offset = offset;
2369 oct = tvb_get_guint8(tvb, curr_offset);
2371 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
2372 proto_tree_add_text(tree,
2373 tvb, curr_offset, 1,
2377 other_decode_bitfield_value(a_bigbuf, oct, 0x3c, 8);
2378 proto_tree_add_text(tree,
2379 tvb, curr_offset, 1,
2380 "%s : Call Priority Level: %u",
2384 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2385 proto_tree_add_text(tree,
2386 tvb, curr_offset, 1,
2387 "%s : Queuing %sallowed",
2389 (oct & 0x02) ? "" : "not ");
2391 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2392 proto_tree_add_text(tree,
2393 tvb, curr_offset, 1,
2394 "%s : Preemption %sallowed",
2396 (oct & 0x01) ? "" : "not ");
2398 g_snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
2402 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2404 return(curr_offset - offset);
2411 elem_p_rev(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2414 guint32 curr_offset;
2416 curr_offset = offset;
2418 oct = tvb_get_guint8(tvb, curr_offset);
2420 proto_tree_add_text(tree, tvb, curr_offset, 1,
2423 g_snprintf(add_string, string_len, " - (%u)", oct);
2427 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2429 return(curr_offset - offset);
2436 elem_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2440 guint32 curr_offset;
2441 const gchar *str = NULL;
2443 curr_offset = offset;
2445 oct = tvb_get_guint8(tvb, curr_offset);
2447 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
2448 proto_tree_add_text(tree,
2449 tvb, curr_offset, 1,
2457 if ((oct & 0x0f) == 0x00)
2459 /* national cause */
2460 switch ((oct & 0x70) >> 4)
2462 case 0: str = "Normal Event"; break;
2463 case 1: str = "Normal Event"; break;
2464 case 2: str = "Resource Unavailable"; break;
2465 case 3: str = "Service or option not available"; break;
2466 case 4: str = "Service or option not implemented"; break;
2467 case 5: str = "Invalid message (e.g., parameter out of range)"; break;
2468 case 6: str = "Protocol error"; break;
2470 str = "Interworking";
2474 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
2475 proto_tree_add_text(tree,
2476 tvb, curr_offset, 1,
2477 "%s : Cause Class: %s",
2481 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2482 proto_tree_add_text(tree,
2483 tvb, curr_offset, 1,
2484 "%s : National Cause",
2489 value = tvb_get_guint8(tvb, curr_offset);
2491 proto_tree_add_uint_format(tree, hf_ansi_a_cause_2, tvb,
2493 ((oct & 0x7f) << 8) | value,
2498 g_snprintf(add_string, string_len, " - (National Cause)");
2502 value = tvb_get_guint8(tvb, curr_offset + 1);
2504 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2506 proto_tree_add_uint_format(tree, hf_ansi_a_cause_2, tvb,
2508 ((oct & 0x7f) << 8) | value,
2509 "%s : Cause (MSB): %u",
2511 ((oct & 0x7f) << 8) | value);
2515 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
2516 proto_tree_add_text(tree, tvb, curr_offset, 1,
2527 case 0x00: str = "Radio interface message failure"; break;
2528 case 0x01: str = "Radio interface failure"; break;
2529 case 0x02: str = "Uplink Quality"; break;
2530 case 0x03: str = "Uplink strength"; break;
2531 case 0x04: str = "Downlink quality"; break;
2532 case 0x05: str = "Downlink strength"; break;
2533 case 0x06: str = "Distance"; break;
2534 case 0x07: str = "OAM&P intervention"; break;
2535 case 0x08: str = "MS busy"; break;
2536 case 0x09: str = "Call processing"; break;
2537 case 0x0A: str = "Reversion to old channel"; break;
2538 case 0x0B: str = "Handoff successful"; break;
2539 case 0x0C: str = "No response from MS"; break;
2540 case 0x0D: str = "Timer expired"; break;
2541 case 0x0E: str = "Better cell (power budget)"; break;
2542 case 0x0F: str = "Interference"; break;
2543 case 0x10: str = "Packet call going dormant"; break;
2544 case 0x11: str = "Service option not available"; break;
2546 case 0x12: str = "Invalid Call"; break;
2547 case 0x13: str = "Successful operation"; break;
2548 case 0x14: str = "Normal call release"; break;
2551 case 0x15: str = "Short data burst authentication failure"; break;
2552 case 0x17: str = "Time critical relocation/handoff"; break;
2553 case 0x18: str = "Network optimization"; break;
2554 case 0x19: str = "Power down from dormant state"; break;
2555 case 0x1A: str = "Authentication failure"; break;
2557 case 0x1B: str = "Inter-BS Soft Handoff Drop Target"; break;
2558 case 0x1D: str = "Intra-BS Soft Handoff Drop Target"; break;
2561 case 0x1E: str = "Autonomous Registration by the Network"; break;
2563 case 0x20: str = "Equipment failure"; break;
2564 case 0x21: str = "No radio resource available"; break;
2565 case 0x22: str = "Requested terrestrial resource unavailable"; break;
2568 case 0x23: str = "A2p RTP Payload Type not available"; break;
2569 case 0x24: str = "A2p Bearer Format Address Type not available"; break;
2571 case 0x25: str = "BS not equipped"; break;
2572 case 0x26: str = "MS not equipped (or incapable)"; break;
2575 case 0x27: str = "2G only sector"; break;
2576 case 0x28: str = "3G only sector"; break;
2578 case 0x29: str = "PACA Call Queued"; break;
2581 case 0x2A: str = "PCF resources are not available"; break;
2583 case 0x2B: str = "Alternate signaling type reject"; break;
2586 case 0x2C: str = "A2p Resource not available"; break;
2588 case 0x2D: str = "PACA Queue Overflow"; break;
2589 case 0x2E: str = "PACA Cancel Request Rejected"; break;
2590 case 0x30: str = "Requested transcoding/rate adaptation unavailable"; break;
2591 case 0x31: str = "Lower priority radio resources not available"; break;
2592 case 0x32: str = "PCF resources not available"; break; /* IOS 4 */
2593 case 0x33: str = "TFO Control request Failed"; break;
2596 case 0x34: str = "MS rejected order"; break;
2598 case 0x40: str = "Ciphering algorithm not supported"; break;
2599 case 0x41: str = "Private Long Code not available or not supported."; break;
2600 case 0x42: str = "Requested MUX option or rates not available."; break;
2601 case 0x43: str = "Requested Privacy Configuration unavailable"; break;
2604 case 0x45: str = "PDS-related capability not available or not supported"; break;
2606 case 0x50: str = "Terrestrial circuit already allocated"; break;
2607 case 0x60: str = "Protocol Error between BS and MSC"; break;
2608 case 0x71: str = "ADDS message too long for delivery on the paging channel"; break;
2609 case 0x72: str = "MS-to-IWF TCP connection failure"; break;
2610 case 0x73: str = "ATH0 (Modem hang up) Command"; break;
2611 case 0x74: str = "+FSH/+FHNG (Fax session ended) Command"; break;
2612 case 0x75: str = "No carrier"; break;
2613 case 0x76: str = "PPP protocol failure"; break;
2614 case 0x77: str = "PPP session closed by the MS"; break;
2615 case 0x78: str = "Do not notify MS"; break;
2616 case 0x79: str = "PCF (or PDSN) resources are not available"; break;
2617 case 0x7A: str = "Data ready to send"; break;
2620 case 0x7B: str = "Concurrent authentication"; break;
2622 case 0x7F: str = "Handoff procedure time-out"; break;
2624 str = "Reserved for future use";
2628 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
2629 proto_tree_add_uint_format(tree, hf_ansi_a_cause_1, tvb,
2630 curr_offset, 1, oct,
2631 "%s : Cause: (%u) %s",
2638 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
2641 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2643 return(curr_offset - offset);
2648 * Formats everything after the discriminator, shared function.
2651 elem_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
2656 guint32 curr_offset;
2658 curr_offset = offset;
2663 value = tvb_get_ntohs(tvb, curr_offset);
2665 proto_tree_add_uint(tree, hf_ansi_a_cell_ci, tvb,
2666 curr_offset, 2, value);
2670 g_snprintf(add_string, string_len, " - CI (%u)", value);
2674 value = tvb_get_ntohs(tvb, curr_offset);
2676 proto_tree_add_uint(tree, hf_ansi_a_cell_lac, tvb,
2677 curr_offset, 2, value);
2681 g_snprintf(add_string, string_len, " - LAC (%u)", value);
2685 market_id = tvb_get_ntohs(tvb, curr_offset);
2686 switch_num = tvb_get_guint8(tvb, curr_offset + 2);
2688 value = tvb_get_ntoh24(tvb, curr_offset);
2690 proto_tree_add_uint_format(tree, hf_ansi_a_cell_mscid, tvb,
2691 curr_offset, 3, value,
2692 "Market ID %u Switch Number %u",
2693 market_id, switch_num);
2697 value = tvb_get_ntohs(tvb, curr_offset);
2699 proto_tree_add_uint(tree, hf_ansi_a_cell_ci, tvb,
2700 curr_offset, 2, value);
2704 g_snprintf(add_string, string_len, " - Market ID (%u) Switch Number (%u) CI (%u)",
2711 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
2712 "Cell ID - Non IOS format");
2714 curr_offset += (len - 1);
2718 return(curr_offset - offset);
2722 elem_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2725 guint32 curr_offset;
2726 const gchar *str = NULL;
2729 add_string = add_string;
2730 curr_offset = offset;
2732 oct = tvb_get_guint8(tvb, curr_offset);
2734 if (oct >= (gint) NUM_CELL_DISC_STR)
2740 str = cell_disc_str[oct];
2743 proto_tree_add_text(tree,
2744 tvb, curr_offset, 1,
2745 "Cell Identification Discriminator: (%u) %s",
2752 elem_cell_id_aux(tvb, tree, curr_offset, len - (curr_offset - offset), add_string, string_len, oct);
2754 /* no length check possible */
2756 return(curr_offset - offset);
2763 elem_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2768 guint32 curr_offset;
2769 proto_item *item = NULL;
2770 proto_tree *subtree = NULL;
2771 const gchar *str = NULL;
2773 curr_offset = offset;
2775 oct = tvb_get_guint8(tvb, curr_offset);
2777 if (oct >= (gint) NUM_CELL_DISC_STR)
2783 str = cell_disc_str[oct];
2786 proto_tree_add_text(tree,
2787 tvb, curr_offset, 1,
2788 "Cell Identification Discriminator: (%u) %s",
2794 NO_MORE_DATA_CHECK(len);
2800 proto_tree_add_text(tree,
2801 tvb, curr_offset, -1,
2805 subtree = proto_item_add_subtree(item, ett_cell_list);
2807 add_string[0] = '\0';
2809 elem_cell_id_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len, oct);
2811 if (add_string[0] != '\0')
2813 proto_item_append_text(item, "%s", add_string);
2816 proto_item_set_len(item, consumed);
2818 curr_offset += consumed;
2822 while ((len - (curr_offset - offset)) > 0);
2824 g_snprintf(add_string, string_len, " - %u cell%s",
2825 num_cells, plurality(num_cells, "", "s"));
2827 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2829 return(curr_offset - offset);
2836 elem_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2839 guint32 curr_offset;
2842 curr_offset = offset;
2844 value = tvb_get_ntohs(tvb, curr_offset);
2846 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
2847 proto_tree_add_text(tree,
2848 tvb, curr_offset, 2,
2849 "%s : PCM Multiplexer: %u",
2851 (value & 0xffe0) >> 5);
2853 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
2854 proto_tree_add_text(tree,
2855 tvb, curr_offset, 2,
2856 "%s : Timeslot: %u",
2862 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
2864 /* no length check possible */
2866 return(curr_offset - offset);
2873 elem_cic_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2877 guint32 curr_offset;
2881 curr_offset = offset;
2883 value = tvb_get_ntohs(tvb, curr_offset);
2885 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
2886 proto_tree_add_text(tree,
2887 tvb, curr_offset, 2,
2888 "%s : PCM Multiplexer: %u",
2890 (value & 0xffe0) >> 5);
2892 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
2893 proto_tree_add_text(tree,
2894 tvb, curr_offset, 2,
2895 "%s : Timeslot: %u",
2901 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
2903 oct = tvb_get_guint8(tvb, curr_offset);
2905 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
2906 proto_tree_add_text(tree,
2907 tvb, curr_offset, 1,
2913 case 0x00: str = "Full-rate"; break;
2919 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
2920 proto_tree_add_text(tree,
2921 tvb, curr_offset, 1,
2922 "%s : Circuit Mode: %s",
2928 /* no length check possible */
2930 return(curr_offset - offset);
2937 elem_ssci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
2940 guint32 curr_offset;
2943 curr_offset = offset;
2945 oct = tvb_get_guint8(tvb, curr_offset);
2947 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
2948 proto_tree_add_text(tree,
2949 tvb, curr_offset, 1,
2953 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
2954 proto_tree_add_text(tree,
2955 tvb, curr_offset, 1,
2956 "%s : Mobile Originated Position Determination",
2959 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
2960 proto_tree_add_text(tree,
2961 tvb, curr_offset, 1,
2962 "%s : Global Emergency Call Indication",
2967 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
2969 return(curr_offset - offset);
2977 #define ANSI_A_CELL_ID_LEN(_disc) ((_disc == 7) ? 5 : 2)
2981 * Formats everything no length check
2984 elem_downlink_re_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
2992 guint32 curr_offset;
2993 proto_item *item = NULL;
2994 proto_tree *subtree = NULL;
2997 curr_offset = offset;
2999 num_cells = tvb_get_guint8(tvb, curr_offset);
3001 proto_tree_add_text(tree, tvb, curr_offset, 1,
3002 "Number of Cells: %u",
3007 NO_MORE_DATA_CHECK(len);
3009 disc = tvb_get_guint8(tvb, curr_offset);
3011 if (disc >= (gint) NUM_CELL_DISC_STR)
3017 str = cell_disc_str[disc];
3020 proto_tree_add_text(tree,
3021 tvb, curr_offset, 1,
3022 "Cell Identification Discriminator: (%u) %s",
3028 NO_MORE_DATA_CHECK(len);
3030 SHORT_DATA_CHECK(len - (curr_offset - offset), (guint32) 3 + ANSI_A_CELL_ID_LEN(disc));
3039 proto_tree_add_text(tree,
3040 tvb, curr_offset, -1,
3044 subtree = proto_item_add_subtree(item, ett_cell_list);
3046 add_string[0] = '\0';
3048 elem_cell_id_aux(tvb, subtree, curr_offset,
3049 len - (curr_offset - offset), add_string, string_len, disc);
3051 if (add_string[0] != '\0')
3053 proto_item_append_text(item, "%s", add_string);
3056 proto_item_set_len(item, consumed);
3058 curr_offset += consumed;
3060 oct = tvb_get_guint8(tvb, curr_offset);
3062 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
3063 proto_tree_add_text(tree, tvb, curr_offset, 1,
3067 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
3068 proto_tree_add_text(tree, tvb, curr_offset, 1,
3069 "%s : Downlink Signal Strength Raw: %u",
3075 value = tvb_get_ntohs(tvb, curr_offset);
3077 proto_tree_add_text(tree,
3078 tvb, curr_offset, 2,
3079 "CDMA Target One Way Delay: %u",
3084 while (curr_cell < num_cells);
3086 g_snprintf(add_string, string_len, " - %u cell%s",
3087 num_cells, plurality(num_cells, "", "s"));
3089 return(curr_offset - offset);
3096 elem_downlink_re(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3098 guint32 curr_offset;
3100 curr_offset = offset;
3103 elem_downlink_re_aux(tvb, tree, offset, len, add_string, string_len);
3105 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3107 return(curr_offset - offset);
3114 elem_downlink_re_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3119 guint32 curr_offset;
3120 proto_item *item = NULL;
3121 proto_tree *subtree = NULL;
3123 curr_offset = offset;
3127 while ((len - (curr_offset - offset)) > 0)
3132 proto_tree_add_text(tree,
3133 tvb, curr_offset, -1,
3137 subtree = proto_item_add_subtree(item, ett_re_list);
3139 oct_len = tvb_get_guint8(tvb, curr_offset);
3141 proto_tree_add_text(subtree,
3142 tvb, curr_offset, 1,
3143 "Environment Length: %u",
3148 add_string[0] = '\0';
3150 elem_downlink_re_aux(tvb, subtree, curr_offset, len - (curr_offset - offset), add_string, string_len);
3152 if (add_string[0] != '\0')
3154 proto_item_append_text(item, "%s", add_string);
3158 * +1 is for environment length
3160 proto_item_set_len(item, consumed + 1);
3162 curr_offset += consumed;
3165 g_snprintf(add_string, string_len, " - %u environment%s",
3166 num_envs, plurality(num_envs, "", "s"));
3168 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3170 return(curr_offset - offset);
3197 elem_pdsn_ip_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3199 guint32 curr_offset;
3201 curr_offset = offset;
3203 proto_tree_add_item(tree, hf_ansi_a_pdsn_ip_addr, tvb, curr_offset, len, FALSE);
3207 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3209 return(curr_offset - offset);
3216 elem_s_pdsn_ip_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3218 guint32 curr_offset;
3220 curr_offset = offset;
3222 proto_tree_add_item(tree, hf_ansi_a_s_pdsn_ip_addr, tvb, curr_offset, len, FALSE);
3226 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3228 return(curr_offset - offset);
3235 elem_ho_pow_lev(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3240 proto_item *item = NULL;
3241 proto_tree *subtree = NULL;
3242 guint32 curr_offset;
3244 curr_offset = offset;
3246 oct = tvb_get_guint8(tvb, curr_offset);
3248 proto_tree_add_text(tree, tvb, curr_offset, 1,
3249 "Number of Cells: %u",
3254 SHORT_DATA_CHECK(len - (curr_offset - offset), (guint32) 6);
3256 oct = tvb_get_guint8(tvb, curr_offset);
3258 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3259 proto_tree_add_text(tree, tvb, curr_offset, 1,
3263 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3264 proto_tree_add_text(tree, tvb, curr_offset, 1,
3269 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
3270 proto_tree_add_text(tree, tvb, curr_offset, 1,
3271 "%s : Handoff Power Level: %u",
3278 proto_tree_add_text(tree,
3279 tvb, curr_offset, -1,
3282 subtree = proto_item_add_subtree(item, ett_cell_list);
3284 add_string[0] = '\0';
3286 elem_cell_id_aux(tvb, subtree, curr_offset,
3287 len - (curr_offset - offset), add_string, string_len, 0x7);
3289 if (add_string[0] != '\0')
3291 proto_item_append_text(item, "%s", add_string);
3294 proto_item_set_len(item, consumed);
3296 curr_offset += consumed;
3300 while ((len - (curr_offset - offset)) >= 3)
3304 oct = tvb_get_guint8(tvb, curr_offset);
3306 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
3307 proto_tree_add_text(tree, tvb, curr_offset, 1,
3311 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
3312 proto_tree_add_text(tree, tvb, curr_offset, 1,
3313 "%s : Handoff Power Level: %u",
3320 proto_tree_add_text(tree,
3321 tvb, curr_offset, -1,
3325 subtree = proto_item_add_subtree(item, ett_cell_list);
3327 add_string[0] = '\0';
3329 elem_cell_id_aux(tvb, subtree, curr_offset,
3330 len - (curr_offset - offset), add_string, string_len, 0x2);
3332 if (add_string[0] != '\0')
3334 proto_item_append_text(item, "%s", add_string);
3337 proto_item_set_len(item, consumed);
3339 curr_offset += consumed;
3342 g_snprintf(add_string, string_len, " - %u cell%s",
3343 num_cells, plurality(num_cells, "", "s"));
3345 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3347 return(curr_offset - offset);
3354 elem_uz_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3357 guint32 curr_offset;
3359 curr_offset = offset;
3361 value = tvb_get_ntohs(tvb, curr_offset);
3363 proto_tree_add_text(tree, tvb, curr_offset, 2,
3369 g_snprintf(add_string, string_len, " - (%u)", value);
3371 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3373 return(curr_offset - offset);
3385 elem_info_rec_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3389 guint32 curr_offset;
3391 gint ett_elem_idx, idx;
3393 curr_offset = offset;
3397 while ((len - (curr_offset - offset)) > 0)
3401 rec_type = tvb_get_guint8(tvb, curr_offset);
3403 str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
3408 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
3412 ett_elem_idx = ett_ansi_rev_ms_info_rec[idx];
3415 proto_tree_add_text(tree,
3416 tvb, curr_offset, 1,
3417 "Information Record Type - %u: (%u) %s",
3425 g_snprintf(add_string, string_len, " - %u request%s",
3426 num_recs, plurality(num_recs, "", "s"));
3428 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3430 return(curr_offset - offset);
3437 elem_is2000_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3442 guint32 curr_offset;
3445 curr_offset = offset;
3447 oct = tvb_get_guint8(tvb, curr_offset);
3449 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3450 proto_tree_add_text(tree, tvb, curr_offset, 1,
3451 "%s : OTD: Mobile will %sbe using OTD",
3453 (oct & 0x80) ? "" : "not ");
3455 num_chan = (oct & 0x70) >> 4;
3457 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3458 proto_tree_add_text(tree, tvb, curr_offset, 1,
3459 "%s : Channel Count: %u",
3463 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3464 proto_tree_add_text(tree, tvb, curr_offset, 1,
3465 "%s : Frame Offset: (%u), %.2f ms",
3468 (oct & 0x0f) * 1.25);
3472 NO_MORE_DATA_CHECK(len);
3474 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
3478 oct = tvb_get_guint8(tvb, curr_offset);
3482 case 0x01: str = "Fundamental Channel (FCH) TIA/EIA/IS-2000"; break;
3483 case 0x02: str = "Dedicated Control Channel (DCCH) TIA/EIA/IS-2000"; break;
3484 case 0x03: str = "Supplemental Channel (SCH) TIA/EIA/IS-2000"; break;
3486 if ((oct >= 0x80) && (oct <= 0x9f)) { str = "Reserved for UMTS"; }
3487 else { str = "Reserved"; }
3491 proto_tree_add_text(tree, tvb, curr_offset, 1,
3492 "Physical Channel Type: %s",
3497 oct = tvb_get_guint8(tvb, curr_offset);
3499 switch (global_a_variant)
3501 case A_VARIANT_IOS401:
3502 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3503 proto_tree_add_text(tree, tvb, curr_offset, 1,
3508 case A_VARIANT_IOS501:
3509 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3510 proto_tree_add_text(tree, tvb, curr_offset, 1,
3511 "%s : Rev_FCH_Gating",
3516 switch ((oct & 0x60) >> 5)
3518 case 0: str = "Gating rate 1"; break;
3519 case 1: str = "Gating rate 1/2"; break;
3520 case 2: str = "Gating rate 1/4"; break;
3526 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3527 proto_tree_add_text(tree, tvb, curr_offset, 1,
3528 "%s : Pilot Gating Rate: %s",
3532 other_decode_bitfield_value(a_bigbuf, oct, 0x18, 8);
3533 proto_tree_add_text(tree, tvb, curr_offset, 1,
3537 value = tvb_get_guint8(tvb, curr_offset + 1);
3539 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3540 proto_tree_add_text(tree, tvb, curr_offset, 1,
3541 "%s : Walsh Code Channel Index (MSB): %u",
3543 ((guint32) (oct & 0x07) << 8) | value);
3547 other_decode_bitfield_value(a_bigbuf, value, 0xff, 8);
3548 proto_tree_add_text(tree, tvb, curr_offset, 1,
3549 "%s : Walsh Code Channel Index (LSB)",
3554 oct = tvb_get_guint8(tvb, curr_offset);
3556 other_decode_bitfield_value(a_bigbuf, oct, 0xff, 8);
3557 proto_tree_add_text(tree, tvb, curr_offset, 1,
3558 "%s : Pilot PN Code (LSB)",
3564 oct = tvb_get_guint8(tvb, curr_offset);
3565 value |= ((guint32) (oct & 0x80)) << 1;
3567 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3568 proto_tree_add_text(tree, tvb, curr_offset, 1,
3569 "%s : Pilot PN Code (MSB): %u",
3573 switch (global_a_variant)
3575 case A_VARIANT_IOS401:
3576 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3577 proto_tree_add_text(tree, tvb, curr_offset, 1,
3582 case A_VARIANT_IOS501:
3583 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3584 proto_tree_add_text(tree, tvb, curr_offset, 1,
3588 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
3589 proto_tree_add_text(tree, tvb, curr_offset, 1,
3590 "%s : Power Combined",
3595 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
3596 proto_tree_add_text(tree, tvb, curr_offset, 1,
3597 "%s : Frequency Included",
3600 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
3602 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3603 proto_tree_add_text(tree, tvb, curr_offset, 1,
3604 "%s : ARFCN (MSB): %u",
3610 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
3611 proto_tree_add_text(tree, tvb, curr_offset, 1,
3617 while ((len - (curr_offset - offset)) >= 6);
3619 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3621 return(curr_offset - offset);
3626 * NO ASSOCIATED DATA
3633 elem_is95_ms_meas_chan_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3638 guint32 curr_offset;
3641 curr_offset = offset;
3643 oct = tvb_get_guint8(tvb, curr_offset);
3645 temp_int = (oct & 0xf8) >> 3;
3646 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
3652 str = band_class_str[temp_int];
3655 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
3656 proto_tree_add_text(tree,
3657 tvb, curr_offset, 1,
3658 "%s : Band Class: %s",
3662 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
3664 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
3665 proto_tree_add_text(tree, tvb, curr_offset, 1,
3666 "%s : ARFCN (MSB): %u",
3672 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
3673 proto_tree_add_text(tree, tvb, curr_offset, 1,
3677 g_snprintf(add_string, string_len, " - (ARFCN: %u)", value);
3681 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3683 return(curr_offset - offset);
3690 elem_clg_party_ascii_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3693 guint32 curr_offset;
3697 curr_offset = offset;
3699 oct = tvb_get_guint8(tvb, curr_offset);
3701 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3702 proto_tree_add_text(tree, tvb, curr_offset, 1,
3703 "%s : Extension: %s",
3705 (oct & 0x80) ? "Not extended" : "Extended");
3707 switch ((oct & 0x70) >> 4)
3709 case 0: str = "Unknown"; break;
3710 case 1: str = "International number"; break;
3711 case 2: str = "National number"; break;
3712 case 3: str = "Network-specific number"; break;
3713 case 4: str = "Dedicated PAD access, short code"; break;
3714 case 5: str = "Reserved"; break;
3715 case 6: str = "Reserved"; break;
3717 str = "Reserved for extension";
3721 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
3722 proto_tree_add_text(tree, tvb, curr_offset, 1,
3723 "%s : Type of Number: %s",
3729 case 0x00: str = "Unknown"; break;
3730 case 0x01: str = "ISDN/Telephony Numbering (ITU recommendation E.164/E.163)"; break;
3731 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
3732 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
3733 case 0x07: str = "Reserved for extension"; break;
3734 case 0x08: str = "National Numbering"; break;
3735 case 0x09: str = "Private Numbering"; break;
3741 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
3742 proto_tree_add_text(tree, tvb, curr_offset, 1,
3743 "%s : Number Plan Identification: %s",
3753 oct = tvb_get_guint8(tvb, curr_offset);
3755 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
3756 proto_tree_add_text(tree, tvb, curr_offset, 1,
3760 switch ((oct & 0x60) >> 5)
3762 case 0: str = "Presentation allowed"; break;
3763 case 1: str = "Presentation restricted"; break;
3764 case 2: str = "Number not available due to interworking"; break;
3770 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
3771 proto_tree_add_text(tree, tvb, curr_offset, 1,
3772 "%s : Presentation Indicator: %s",
3778 case 0: str = "User-provided, not screened"; break;
3779 case 1: str = "User-provided, verified and passed"; break;
3780 case 2: str = "User-provided, verified and failed"; break;
3782 str = "Network-provided";
3786 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
3787 proto_tree_add_text(tree, tvb, curr_offset, 1,
3791 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
3792 proto_tree_add_text(tree, tvb, curr_offset, 1,
3793 "%s : Screening Indicator: %s",
3800 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
3802 proto_tree_add_string_format(tree, hf_ansi_a_clg_party_ascii_num,
3803 tvb, curr_offset, len - (curr_offset - offset),
3806 (gchar *) format_text(poctets, len - (curr_offset - offset)));
3808 curr_offset += len - (curr_offset - offset);
3810 g_snprintf(add_string, string_len, " - (%s)", poctets);
3812 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3814 return(curr_offset - offset);
3821 elem_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3823 guint32 curr_offset;
3826 curr_offset = offset;
3828 proto_tree_add_text(tree, tvb, curr_offset, len,
3829 "Layer 3 Information");
3832 * dissect the embedded DTAP message
3834 l3_tvb = tvb_new_subset(tvb, curr_offset, len, len);
3836 call_dissector(dtap_handle, l3_tvb, g_pinfo, g_tree);
3840 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3842 return(curr_offset - offset);
3847 * Protocol Discriminator
3857 * Location Updating Type
3863 * Simple data no decode required
3870 elem_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3874 guint32 curr_offset;
3879 curr_offset = offset;
3881 oct = tvb_get_guint8(tvb, curr_offset);
3883 mcc[0] = Dgt_tbcd.out[oct & 0x0f];
3884 mcc[1] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3886 oct = tvb_get_guint8(tvb, curr_offset+1);
3888 mcc[2] = Dgt_tbcd.out[(oct & 0x0f)];
3891 mnc[2] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3893 oct = tvb_get_guint8(tvb, curr_offset+2);
3895 mnc[0] = Dgt_tbcd.out[(oct & 0x0f)];
3896 mnc[1] = Dgt_tbcd.out[(oct & 0xf0) >> 4];
3899 proto_tree_add_text(tree,
3900 tvb, curr_offset, 3,
3901 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3907 value = tvb_get_ntohs(tvb, curr_offset);
3909 proto_tree_add_text(tree,
3910 tvb, curr_offset, 2,
3911 "Location Area Code (LAC): 0x%04x (%u)",
3917 /* no length check possible */
3919 return(curr_offset - offset);
3926 elem_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
3929 guint32 curr_offset;
3933 curr_offset = offset;
3935 oct = tvb_get_guint8(tvb, curr_offset);
3939 case 0x01: str = "Reserved"; break;
3940 case 0x02: str = "MIN/IMSI unknown in HLR"; break;
3941 case 0x03: str = "Illegal MS"; break;
3942 case 0x04: str = "TMSI/IMSI/MIN unknown in VLR"; break;
3943 case 0x05: str = "Reserved"; break;
3944 case 0x0b: str = "Roaming not allowed"; break;
3945 case 0x0c: str = "Location area not allowed"; break;
3946 case 0x20: str = "Service option not supported"; break;
3947 case 0x21: str = "Requested service option not subscribed"; break;
3948 case 0x22: str = "Service option temporarily out of order"; break;
3949 case 0x26: str = "Call cannot be identified"; break;
3950 case 0x51: str = "Network failure"; break;
3951 case 0x56: str = "Congestion"; break;
3952 case 0x62: str = "Message type non-existent or not implemented"; break;
3953 case 0x63: str = "Information element non-existent or not implemented"; break;
3954 case 0x64: str = "Invalid information element contents"; break;
3955 case 0x65: str = "Message not compatible with the call state"; break;
3956 case 0x66: str = "Protocol error, unspecified"; break;
3957 case 0x6e: str = "Invalid message, unspecified"; break;
3958 case 0x6f: str = "Mandatory information element error"; break;
3964 proto_tree_add_text(tree,
3965 tvb, curr_offset, 1,
3966 "Reject Cause Value: (%u) %s",
3972 g_snprintf(add_string, string_len, " - (%s)", str);
3974 /* no length check possible */
3976 return(curr_offset - offset);
3983 elem_anchor_pdsn_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
3985 guint32 curr_offset;
3987 curr_offset = offset;
3989 proto_tree_add_item(tree, hf_ansi_a_anchor_ip_addr, tvb, curr_offset, len, FALSE);
3993 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
3995 return(curr_offset - offset);
4002 elem_anchor_pp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
4004 guint32 curr_offset;
4006 curr_offset = offset;
4008 proto_tree_add_item(tree, hf_ansi_a_anchor_pp_ip_addr, tvb, curr_offset, len, FALSE);
4012 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4014 return(curr_offset - offset);
4021 elem_auth_chlg_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4024 guint32 curr_offset;
4027 curr_offset = offset;
4029 oct = tvb_get_guint8(tvb, curr_offset);
4031 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4032 proto_tree_add_text(tree,
4033 tvb, curr_offset, 1,
4039 case 1: str = "RAND 32 bits"; break;
4040 case 2: str = "RANDU 24 bits"; break;
4041 case 4: str = "RANDSSD 56 bits"; break;
4042 case 8: str = "RANDBS 32 bits"; break;
4048 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4049 proto_tree_add_text(tree,
4050 tvb, curr_offset, 1,
4051 "%s : Random Number Type: (%u) %s",
4058 proto_tree_add_text(tree,
4059 tvb, curr_offset, len - (curr_offset - offset),
4060 "RAND/RANDU/RANDBS/RANDSSD Value");
4062 g_snprintf(add_string, string_len, " - (%s)", str);
4064 curr_offset += len - (curr_offset - offset);
4066 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4068 return(curr_offset - offset);
4075 elem_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4078 guint32 curr_offset;
4081 curr_offset = offset;
4083 oct = tvb_get_guint8(tvb, curr_offset);
4085 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4086 proto_tree_add_text(tree,
4087 tvb, curr_offset, 1,
4093 case 1: str = "AUTHR"; break;
4094 case 2: str = "AUTHU"; break;
4095 case 4: str = "AUTHBS"; break;
4101 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4102 proto_tree_add_text(tree,
4103 tvb, curr_offset, 1,
4104 "%s : Auth Signature Type: (%u) %s",
4111 proto_tree_add_text(tree,
4112 tvb, curr_offset, len - (curr_offset - offset),
4115 g_snprintf(add_string, string_len, " - (%s)", str);
4117 curr_offset += len - (curr_offset - offset);
4119 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4121 return(curr_offset - offset);
4128 elem_auth_param_count(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4131 guint32 curr_offset;
4134 curr_offset = offset;
4136 oct = tvb_get_guint8(tvb, curr_offset);
4138 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
4139 proto_tree_add_text(tree,
4140 tvb, curr_offset, 1,
4144 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
4145 proto_tree_add_text(tree,
4146 tvb, curr_offset, 1,
4153 g_snprintf(add_string, string_len, " - (%u)", oct & 0x3f);
4155 /* no length check possible */
4157 return(curr_offset - offset);
4164 elem_mwi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4167 guint32 curr_offset;
4170 curr_offset = offset;
4172 oct = tvb_get_guint8(tvb, curr_offset);
4174 proto_tree_add_text(tree,
4175 tvb, curr_offset, 1,
4176 "Number of Messages: %u",
4181 g_snprintf(add_string, string_len, " - (%u)", oct);
4183 /* no length check possible */
4185 return(curr_offset - offset);
4191 * UNUSED in SPEC and no IEI!
4198 elem_signal(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4201 guint32 curr_offset;
4205 curr_offset = offset;
4207 oct = tvb_get_guint8(tvb, curr_offset);
4211 case 0x00: str = "Dial tone on"; break;
4212 case 0x01: str = "Ring back tone on"; break;
4213 case 0x02: str = "Intercept tone on"; break;
4214 case 0x03: str = "Network congestion (reorder) tone on"; break;
4215 case 0x04: str = "Busy tone on"; break;
4216 case 0x05: str = "Confirm tone on"; break;
4217 case 0x06: str = "Answer tone on"; break;
4218 case 0x07: str = "Call waiting tone on"; break;
4219 case 0x08: str = "Off-hook warning tone on"; break;
4220 case 0x3f: str = "Tones off"; break;
4221 case 0x40: str = "Normal Alerting"; break;
4222 case 0x41: str = "Inter-group Alerting"; break;
4223 case 0x42: str = "Special/Priority Alerting"; break;
4224 case 0x43: str = "Reserved (ISDN Alerting pattern 3)"; break;
4225 case 0x44: str = "Ping Ring (abbreviated alert)"; break;
4226 case 0x45: str = "Reserved (ISDN Alerting pattern 5)"; break;
4227 case 0x46: str = "Reserved (ISDN Alerting pattern 6)"; break;
4228 case 0x47: str = "Reserved (ISDN Alerting pattern 7)"; break;
4229 case 0x63: str = "Abbreviated intercept"; break;
4230 case 0x65: str = "Abbreviated reorder"; break;
4231 case 0x4f: str = "Alerting off"; break;
4237 proto_tree_add_text(tree,
4238 tvb, curr_offset, 1,
4239 "Signal Value: (%u) %s",
4243 g_snprintf(add_string, string_len, " - (%s)", str);
4247 oct = tvb_get_guint8(tvb, curr_offset);
4249 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
4250 proto_tree_add_text(tree,
4251 tvb, curr_offset, 1,
4257 case 0: str = "Medium pitch (standard alert)"; break;
4258 case 1: str = "High pitch"; break;
4259 case 2: str = "Low pitch"; break;
4265 proto_tree_add_text(tree,
4266 tvb, curr_offset, 1,
4267 "%s : Alert Pitch: %s",
4273 /* no length check possible */
4275 return(curr_offset - offset);
4287 elem_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4291 guint32 curr_offset;
4294 curr_offset = offset;
4296 oct = tvb_get_guint8(tvb, curr_offset);
4298 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4299 proto_tree_add_text(tree,
4300 tvb, curr_offset, 1,
4304 switch ((oct & 0x70) >> 4)
4306 case 0: str = "Unknown"; break;
4307 case 1: str = "International number"; break;
4308 case 2: str = "National number"; break;
4309 case 3: str = "Network specific number"; break;
4310 case 4: str = "Dedicated PAD access, short code"; break;
4311 case 7: str = "Reserved for extension"; break;
4317 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4318 proto_tree_add_text(tree,
4319 tvb, curr_offset, 1,
4320 "%s : Type of Number: %s",
4326 case 0x00: str = "Unknown"; break;
4327 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4328 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
4329 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
4330 case 0x07: str = "Reserved for extension"; break;
4331 case 0x08: str = "National numbering plan"; break;
4332 case 0x09: str = "Private numbering plan"; break;
4338 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4339 proto_tree_add_text(tree,
4340 tvb, curr_offset, 1,
4341 "%s : Numbering Plan Identification: %s",
4347 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
4349 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
4352 proto_tree_add_string_format(tree, hf_ansi_a_cld_party_bcd_num,
4353 tvb, curr_offset, len - (curr_offset - offset),
4358 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
4360 curr_offset += len - (curr_offset - offset);
4362 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4364 return(curr_offset - offset);
4369 * UNUSED in SPEC and no IEI!
4371 #ifdef MAYBE_USED_FOR_OLDER_CODECS
4373 elem_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4377 guint32 curr_offset;
4380 curr_offset = offset;
4382 oct = tvb_get_guint8(tvb, curr_offset);
4384 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4385 proto_tree_add_text(tree, tvb, curr_offset, 1,
4386 "%s : Extension: %s",
4388 (oct & 0x80) ? "Not extended" : "Extended");
4390 switch ((oct & 0x70) >> 4)
4392 case 0: str = "Unknown"; break;
4393 case 1: str = "International number"; break;
4394 case 2: str = "National number"; break;
4395 case 3: str = "Network specific number"; break;
4396 case 4: str = "Dedicated PAD access, short code"; break;
4397 case 7: str = "Reserved for extension"; break;
4403 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4404 proto_tree_add_text(tree,
4405 tvb, curr_offset, 1,
4406 "%s : Type of Number: %s",
4412 case 0x00: str = "Unknown"; break;
4413 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4414 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
4415 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
4416 case 0x07: str = "Reserved for extension"; break;
4417 case 0x08: str = "National numbering plan"; break;
4418 case 0x09: str = "Private numbering plan"; break;
4424 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4425 proto_tree_add_text(tree,
4426 tvb, curr_offset, 1,
4427 "%s : Numbering Plan Identification: %s",
4437 oct = tvb_get_guint8(tvb, curr_offset);
4439 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4440 proto_tree_add_text(tree, tvb, curr_offset, 1,
4444 switch ((oct & 0x60) >> 5)
4446 case 0: str = "Presentation allowed"; break;
4447 case 1: str = "Presentation restricted"; break;
4448 case 2: str = "Number not available due to interworking"; break;
4454 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4455 proto_tree_add_text(tree, tvb, curr_offset, 1,
4456 "%s : Presentation Indicator: %s",
4462 case 0: str = "User-provided, not screened"; break;
4463 case 1: str = "User-provided, verified and passed"; break;
4464 case 2: str = "User-provided, verified and failed"; break;
4466 str = "Network-provided";
4470 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
4471 proto_tree_add_text(tree, tvb, curr_offset, 1,
4475 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
4476 proto_tree_add_text(tree, tvb, curr_offset, 1,
4477 "%s : Screening Indicator: %s",
4484 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
4486 my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
4489 proto_tree_add_string_format(tree, hf_ansi_a_clg_party_bcd_num,
4490 tvb, curr_offset, len - (curr_offset - offset),
4495 g_snprintf(add_string, string_len, " - (%s)", a_bigbuf);
4497 curr_offset += len - (curr_offset - offset);
4499 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4501 return(curr_offset - offset);
4509 elem_qos_params(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4512 guint32 curr_offset;
4514 curr_offset = offset;
4516 oct = tvb_get_guint8(tvb, curr_offset);
4518 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4519 proto_tree_add_text(tree,
4520 tvb, curr_offset, 1,
4524 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4525 proto_tree_add_text(tree,
4526 tvb, curr_offset, 1,
4527 "%s : Packet Priority: %u",
4531 g_snprintf(add_string, string_len, " - (%u)", oct & 0x0f);
4535 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4537 return(curr_offset - offset);
4544 elem_cause_l3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4547 guint32 curr_offset;
4548 const gchar *str = NULL;
4550 curr_offset = offset;
4552 oct = tvb_get_guint8(tvb, curr_offset);
4554 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4555 proto_tree_add_text(tree,
4556 tvb, curr_offset, 1,
4560 switch ((oct & 0x60) >> 5)
4562 case 0: str = "Standard as described in ITU Recommendation Q.931"; break;
4563 case 1: str = "Reserved for other international standards"; break;
4564 case 2: str = "National standard"; break;
4566 str = "Reserved for other international standards";
4570 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4571 proto_tree_add_text(tree,
4572 tvb, curr_offset, 1,
4573 "%s : Coding Standard: %s",
4577 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4578 proto_tree_add_text(tree,
4579 tvb, curr_offset, 1,
4585 case 0: str = "User"; break;
4586 case 1: str = "Private network serving the local user"; break;
4587 case 2: str = "Public network serving the local user"; break;
4588 case 3: str = "Transit network"; break;
4589 case 4: str = "Public network serving the remote user"; break;
4590 case 5: str = "Private network serving the remote user"; break;
4591 case 7: str = "International network"; break;
4592 case 10: str = "Network beyond interworking point"; break;
4594 str = "Reserved"; break;
4598 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4599 proto_tree_add_text(tree,
4600 tvb, curr_offset, 1,
4601 "%s : Location: %s",
4607 oct = tvb_get_guint8(tvb, curr_offset);
4609 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4610 proto_tree_add_text(tree,
4611 tvb, curr_offset, 1,
4615 switch ((oct & 0x70) >> 4)
4617 case 0: str = "normal event"; break;
4618 case 1: str = "normal event"; break;
4619 case 2: str = "resource unavailable"; break;
4620 case 3: str = "service or option not available"; break;
4621 case 4: str = "service or option not implemented"; break;
4622 case 5: str = "invalid message (e.g., parameter out of range)"; break;
4623 case 6: str = "protocol error (e.g., unknown message)"; break;
4625 str = "interworking";
4629 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
4630 proto_tree_add_text(tree,
4631 tvb, curr_offset, 1,
4632 "%s : Class: (%u) %s",
4639 case 0x01: str = "Unassigned (unallocated) number"; break;
4640 case 0x03: str = "No route to destination"; break;
4641 case 0x06: str = "Channel unacceptable"; break;
4642 case 0x0F: str = "Procedure failed"; break;
4643 case 0x10: str = "Normal Clearing"; break;
4644 case 0x11: str = "User busy"; break;
4645 case 0x12: str = "No user responding"; break;
4646 case 0x13: str = "User alerting, no answer"; break;
4647 case 0x15: str = "Call rejected"; break;
4648 case 0x16: str = "Number changed New destination"; break;
4649 case 0x1A: str = "Non selected user clearing"; break;
4650 case 0x1B: str = "Destination out of order"; break;
4651 case 0x1C: str = "Invalid number format (incomplete number)"; break;
4652 case 0x1D: str = "Facility rejected"; break;
4653 case 0x1F: str = "Normal, unspecified"; break;
4654 case 0x22: str = "No circuit/channel available"; break;
4655 case 0x26: str = "Network out of order"; break;
4656 case 0x29: str = "Temporary failure"; break;
4657 case 0x2A: str = "Switching equipment congestion"; break;
4658 case 0x2B: str = "Access information discarded information element ids"; break;
4659 case 0x2C: str = "requested circuit/channel not available"; break;
4660 case 0x2F: str = "Resources unavailable, unspecified"; break;
4661 case 0x31: str = "Quality of service unavailable"; break;
4662 case 0x32: str = "Requested facility not subscribed"; break;
4663 case 0x33: str = "Request MUX option or rates unavailable"; break;
4664 case 0x39: str = "Bearer capability not authorized"; break;
4665 case 0x3A: str = "Bearer capability not presently available"; break;
4666 case 0x3B: str = "SSD Update Rejected"; break;
4667 case 0x3F: str = "Service or option not available, unspecified"; break;
4668 case 0x41: str = "Bearer service not implemented"; break;
4669 case 0x45: str = "Requested facility not implement"; break;
4670 case 0x46: str = "Only restricted digital information bearer capability is available"; break;
4671 case 0x4F: str = "Service or option not implemented, unspecified"; break;
4672 case 0x51: str = "Reserved"; break;
4673 case 0x58: str = "Incompatible destination incompatible parameter"; break;
4674 case 0x5B: str = "Invalid transit network selection"; break;
4675 case 0x5F: str = "Invalid message, unspecified"; break;
4676 case 0x60: str = "Mandatory information element error information element identifier(s)"; break;
4677 case 0x61: str = "Message type nonexistent or not implemented message type"; break;
4678 case 0x62: str = "Message not compatible with control state message type or message type nonexistent or not implemented"; break;
4679 case 0x64: str = "Invalid information element contents Information element Identifier(s)"; break;
4680 case 0x65: str = "Message not compatible with call state message type"; break;
4681 case 0x6F: str = "Protocol error, unspecified"; break;
4682 case 0x7F: str = "Interworking, unspecified"; break;
4688 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4689 proto_tree_add_text(tree,
4690 tvb, curr_offset, 1,
4695 g_snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f, str);
4699 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4701 return(curr_offset - offset);
4718 elem_xmode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4721 guint32 curr_offset;
4723 curr_offset = offset;
4725 oct = tvb_get_guint8(tvb, curr_offset);
4727 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
4728 proto_tree_add_text(tree,
4729 tvb, curr_offset, 1,
4733 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4734 proto_tree_add_text(tree,
4735 tvb, curr_offset, 1,
4736 "%s : TFO Mode: %s",
4738 (oct & 0x01) ? "TFO" : "tandem");
4740 g_snprintf(add_string, string_len, " - (%s)",
4741 (oct & 0x01) ? "TFO" : "tandem");
4745 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
4747 return(curr_offset - offset);
4757 * NO ASSOCIATED DATA
4764 elem_reg_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4767 guint32 curr_offset;
4771 curr_offset = offset;
4773 oct = tvb_get_guint8(tvb, curr_offset);
4777 case 0x00: str = "Timer-based"; break;
4778 case 0x01: str = "Power-up"; break;
4779 case 0x02: str = "Zone-based"; break;
4780 case 0x03: str = "Power-down"; break;
4781 case 0x04: str = "Parameter-change"; break;
4782 case 0x05: str = "Ordered"; break;
4783 case 0x06: str = "Distance-based"; break;
4784 case 0x07: str = "User Zone-based"; break;
4785 case 0x09: str = "BCMC Registration"; break;
4791 proto_tree_add_text(tree,
4792 tvb, curr_offset, 1,
4793 "Location Registration Type: %s",
4796 g_snprintf(add_string, string_len, " - (%s)", str);
4800 /* no length check possible */
4802 return(curr_offset - offset);
4809 elem_tag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4812 guint32 curr_offset;
4815 curr_offset = offset;
4817 value = tvb_get_ntohl(tvb, curr_offset);
4819 proto_tree_add_text(tree,
4820 tvb, curr_offset, 4,
4824 g_snprintf(add_string, string_len, " - (%u)", value);
4828 /* no length check possible */
4830 return(curr_offset - offset);
4837 elem_hho_params(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
4841 guint32 curr_offset;
4845 curr_offset = offset;
4847 oct = tvb_get_guint8(tvb, curr_offset);
4849 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4850 proto_tree_add_text(tree,
4851 tvb, curr_offset, 1,
4855 temp_int = oct & 0x1f;
4856 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
4862 str = band_class_str[temp_int];
4865 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
4866 proto_tree_add_text(tree,
4867 tvb, curr_offset, 1,
4868 "%s : Band Class: %s",
4874 g_snprintf(add_string, string_len, " - (%s)", str);
4876 oct = tvb_get_guint8(tvb, curr_offset);
4878 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4879 proto_tree_add_text(tree,
4880 tvb, curr_offset, 1,
4881 "%s : Number of Preamble Frames: %u",
4885 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4886 proto_tree_add_text(tree,
4887 tvb, curr_offset, 1,
4888 "%s : Reset L2: %s Layer 2 Acknowledgement",
4890 (oct & 0x10) ? "Reset" : "Do not reset");
4892 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
4893 proto_tree_add_text(tree,
4894 tvb, curr_offset, 1,
4895 "%s : Reset FPC: %s counters",
4897 (oct & 0x10) ? "Reset" : "Do not reset");
4899 switch ((oct & 0x06) >> 1)
4901 case 0: str = "Encryption disabled"; break;
4902 case 1: str = "Encryption enabled"; break;
4908 other_decode_bitfield_value(a_bigbuf, oct, 0x06, 8);
4909 proto_tree_add_text(tree,
4910 tvb, curr_offset, 1,
4911 "%s : Encryption Mode: %s",
4915 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4916 proto_tree_add_text(tree,
4917 tvb, curr_offset, 1,
4918 "%s : Private LCM: %s Private Long Code Mask",
4920 (oct & 0x01) ? "Use" : "Do not use");
4924 oct = tvb_get_guint8(tvb, curr_offset);
4926 switch (global_a_variant)
4928 case A_VARIANT_IOS401:
4929 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
4930 proto_tree_add_text(tree,
4931 tvb, curr_offset, 1,
4936 case A_VARIANT_IOS501:
4937 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
4938 proto_tree_add_text(tree,
4939 tvb, curr_offset, 1,
4940 "%s : Rev_Pwr_Cntl_Delay_Incl",
4943 other_decode_bitfield_value(a_bigbuf, oct, 0x60, 8);
4944 proto_tree_add_text(tree, tvb, curr_offset, 1,
4945 "%s : Rev_Pwr_Cntl_Delay",
4950 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
4951 proto_tree_add_text(tree,
4952 tvb, curr_offset, 1,
4956 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
4957 proto_tree_add_text(tree,
4958 tvb, curr_offset, 1,
4965 oct = tvb_get_guint8(tvb, curr_offset);
4967 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
4968 proto_tree_add_text(tree,
4969 tvb, curr_offset, 1,
4973 other_decode_bitfield_value(a_bigbuf, oct, 0x3e, 8);
4974 proto_tree_add_text(tree,
4975 tvb, curr_offset, 1,
4976 "%s : FPC Subchannel Information: %u",
4980 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
4981 proto_tree_add_text(tree,
4982 tvb, curr_offset, 1,
4983 "%s : FPC Subchannel Information Included",
4988 oct = tvb_get_guint8(tvb, curr_offset);
4990 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
4991 proto_tree_add_text(tree,
4992 tvb, curr_offset, 1,
4996 other_decode_bitfield_value(a_bigbuf, oct, 0x0e, 8);
4997 proto_tree_add_text(tree,
4998 tvb, curr_offset, 1,
4999 "%s : Power Control Step: %u",
5003 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5004 proto_tree_add_text(tree,
5005 tvb, curr_offset, 1,
5006 "%s : Power Control Step Included",
5011 /* no length check possible */
5013 return(curr_offset - offset);
5025 elem_sw_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5027 guint8 major, minor, point;
5028 guint32 curr_offset;
5030 curr_offset = offset;
5032 major = tvb_get_guint8(tvb, curr_offset);
5034 proto_tree_add_text(tree,
5035 tvb, curr_offset, 1,
5036 "IOS Major Revision Level: %u",
5041 minor = tvb_get_guint8(tvb, curr_offset);
5043 proto_tree_add_text(tree,
5044 tvb, curr_offset, 1,
5045 "IOS Minor Revision Level: %u",
5050 point = tvb_get_guint8(tvb, curr_offset);
5052 proto_tree_add_text(tree,
5053 tvb, curr_offset, 1,
5054 "IOS Point Revision Level: %u",
5059 g_snprintf(add_string, string_len, " - (IOS %u.%u.%u)", major, minor, point);
5063 proto_tree_add_text(tree, tvb, curr_offset, len - 3,
5064 "Manufacturer/Carrier Software Information");
5066 curr_offset += len - 3;
5069 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5071 return(curr_offset - offset);
5078 elem_so(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5081 guint32 curr_offset;
5084 curr_offset = offset;
5086 value = tvb_get_ntohs(tvb, curr_offset);
5088 other_decode_bitfield_value(a_bigbuf, value, 0x8000, 16);
5089 proto_tree_add_text(tree,
5090 tvb, curr_offset, 2,
5091 "%s : Proprietary Indicator",
5094 other_decode_bitfield_value(a_bigbuf, value, 0x7000, 16);
5095 proto_tree_add_text(tree,
5096 tvb, curr_offset, 2,
5097 "%s : Service Option Revision",
5100 other_decode_bitfield_value(a_bigbuf, value, 0x0fff, 16);
5101 proto_tree_add_text(tree,
5102 tvb, curr_offset, 2,
5103 "%s : Base Service Option Number",
5106 g_snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
5108 proto_tree_add_uint_format(tree, hf_ansi_a_so, tvb,
5109 curr_offset, 2, value,
5112 ansi_a_so_int_to_str(value));
5116 /* no length check possible */
5118 return(curr_offset - offset);
5125 elem_soci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5128 guint32 curr_offset;
5130 curr_offset = offset;
5132 oct = tvb_get_guint8(tvb, curr_offset);
5134 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5135 proto_tree_add_text(tree,
5136 tvb, curr_offset, 1,
5140 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5141 proto_tree_add_text(tree,
5142 tvb, curr_offset, 1,
5147 g_snprintf(add_string, string_len, " - (%u)", oct);
5151 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5153 return(curr_offset - offset);
5160 elem_so_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5165 guint32 curr_offset;
5167 proto_tree *subtree;
5169 curr_offset = offset;
5171 num_so = tvb_get_guint8(tvb, curr_offset);
5173 proto_tree_add_text(tree, tvb, curr_offset, 1,
5174 "Number of Service Option instances: %u",
5178 * this is in case we leave the function before the
5179 * loop through the instances
5181 g_snprintf(add_string, string_len, " - %u service options", num_so);
5185 NO_MORE_DATA_CHECK(len);
5187 SHORT_DATA_CHECK(len - (curr_offset - offset), 3);
5194 proto_tree_add_text(tree,
5195 tvb, curr_offset, 1,
5196 "Service Option Instance [%u]",
5199 subtree = proto_item_add_subtree(item, ett_so_list);
5201 oct = tvb_get_guint8(tvb, curr_offset);
5203 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5204 proto_tree_add_text(subtree,
5205 tvb, curr_offset, 1,
5209 other_decode_bitfield_value(a_bigbuf, oct, 0x38, 8);
5210 proto_tree_add_text(subtree,
5211 tvb, curr_offset, 1,
5216 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5217 proto_tree_add_text(subtree,
5218 tvb, curr_offset, 1,
5225 curr_offset += elem_so(tvb, subtree, curr_offset, len, add_string, string_len);
5226 add_string[0] = '\0';
5230 while ((len - (curr_offset - offset)) >= 3);
5233 * this is because 'add_string' was used by 'elem_so()'
5235 g_snprintf(add_string, string_len, " - %u service options", num_so);
5237 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5239 return(curr_offset - offset);
5246 elem_acc_net_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5249 guint32 sid, nid, pzid;
5250 guint32 curr_offset;
5252 curr_offset = offset;
5254 value = tvb_get_ntohs(tvb, curr_offset);
5255 sid = value & 0x7fff;
5257 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x80, 8);
5258 proto_tree_add_text(tree, tvb, curr_offset, 1,
5262 other_decode_bitfield_value(a_bigbuf, value >> 8, 0x7f, 8);
5263 proto_tree_add_text(tree, tvb, curr_offset, 1,
5264 "%s : SID (MSB), %u",
5268 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
5269 proto_tree_add_text(tree, tvb, curr_offset + 1, 1,
5275 nid = tvb_get_ntohs(tvb, curr_offset);
5277 proto_tree_add_text(tree,
5278 tvb, curr_offset, 2,
5284 pzid = tvb_get_ntohs(tvb, curr_offset);
5286 proto_tree_add_text(tree,
5287 tvb, curr_offset, 2,
5293 g_snprintf(add_string, string_len, " - (SID/NID/PZID: %u/%u/%u)", sid, nid, pzid);
5295 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5297 return(curr_offset - offset);
5301 #define ADDS_APP_UNKNOWN 0x00
5302 #define ADDS_APP_ADS 0x01
5303 #define ADDS_APP_FAX 0x02
5304 #define ADDS_APP_SMS 0x03
5305 #define ADDS_APP_OTA 0x04
5306 #define ADDS_APP_PDS 0x05 /* aka PLD */
5307 #define ADDS_APP_SDB 0x06
5308 #define ADDS_APP_HRPD 0x07
5309 #define ADDS_APP_EXT_INTL 0x3E
5310 #define ADDS_APP_EXT 0x3F
5312 static const value_string ansi_a_adds_strings[] = {
5313 { ADDS_APP_UNKNOWN, "UNKNOWN" },
5314 { ADDS_APP_ADS, "ADS" },
5315 { ADDS_APP_FAX, "FAX" },
5316 { ADDS_APP_SMS, "SMS" },
5317 { ADDS_APP_OTA, "OTA" },
5318 { ADDS_APP_PDS, "PDS" },
5319 { ADDS_APP_SDB, "SDB" },
5320 { ADDS_APP_HRPD, "HRPD" },
5321 { ADDS_APP_EXT_INTL, "EXT_INTL" },
5322 { ADDS_APP_EXT, "EXT" },
5330 elem_adds_user_part(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
5335 guint32 curr_offset;
5339 proto_tree *subtree;
5342 curr_offset = offset;
5345 oct = tvb_get_guint8(tvb, curr_offset);
5347 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
5348 proto_tree_add_text(tree,
5349 tvb, curr_offset, 1,
5353 adds_app = oct & 0x3f;
5355 str = match_strval_idx((guint32) adds_app, ansi_a_adds_strings, &idx);
5360 g_snprintf(add_string, string_len, " - (%s)", str);
5362 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
5363 proto_tree_add_text(tree,
5364 tvb, curr_offset, 1,
5365 "%s : Data Burst Type: %s",
5372 proto_tree_add_text(tree, tvb, curr_offset, len - 1,
5373 "Application Data Message");
5375 subtree = proto_item_add_subtree(item, ett_adds_user_part);
5380 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5382 dissector_try_port(is637_dissector_table,
5383 0, adds_tvb, g_pinfo, g_tree);
5385 curr_offset += (len - 1);
5389 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5391 dissector_try_port(is683_dissector_table,
5392 (g_pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, g_pinfo, g_tree);
5394 curr_offset += (len - 1);
5398 adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
5400 dissector_try_port(is801_dissector_table,
5401 (g_pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, g_pinfo, g_tree);
5403 curr_offset += (len - 1);
5408 * no SDB dissector, push to GRE/A11 dissector ?
5410 curr_offset += (len - 1);
5413 case ADDS_APP_EXT_INTL:
5415 * no generic External International dissector
5417 value = tvb_get_ntohs(tvb, curr_offset);
5419 proto_tree_add_text(subtree,
5420 tvb, curr_offset, 2,
5421 "Extended Burst Type - International: 0x%04x", value);
5425 proto_tree_add_text(tree, tvb, curr_offset, len - (curr_offset - offset),
5428 curr_offset += len - (curr_offset - offset);
5432 value = tvb_get_ntohs(tvb, curr_offset);
5434 proto_tree_add_text(subtree,
5435 tvb, curr_offset, 2,
5436 "Extended Burst Type: 0x%04x", value);
5440 proto_tree_add_text(subtree, tvb, curr_offset, len - (curr_offset - offset),
5443 curr_offset += len - (curr_offset - offset);
5450 curr_offset += (len - 1);
5454 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5456 return(curr_offset - offset);
5463 elem_amps_hho_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5466 guint32 curr_offset;
5468 curr_offset = offset;
5470 oct = tvb_get_guint8(tvb, curr_offset);
5472 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
5473 proto_tree_add_text(tree, tvb, curr_offset, 1,
5477 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
5478 proto_tree_add_text(tree, tvb, curr_offset, 1,
5479 "%s : Encryption Mode: (%u) %s",
5482 (oct & 0x03) ? "enabled" : "disabled");
5486 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5488 return(curr_offset - offset);
5495 elem_is2000_scr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5497 guint8 oct, num_con_rec, i;
5498 guint8 bit_mask, bit_offset;
5499 guint32 curr_offset, saved_offset;
5501 guint is2000_portion_len;
5502 proto_tree *scr_subtree, *subtree;
5503 proto_item *item = NULL;
5504 const gchar *str = NULL;
5506 curr_offset = offset;
5508 oct = tvb_get_guint8(tvb, curr_offset);
5510 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5511 proto_tree_add_text(tree, tvb, curr_offset, 1,
5515 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5516 proto_tree_add_text(tree, tvb, curr_offset, 1,
5517 "%s : Bit-Exact Length Fill Bits: %u",
5523 is2000_portion_len = len - (curr_offset - offset);
5526 * the following decode was modified from the packet-ansi_map.c version
5529 SHORT_DATA_CHECK(is2000_portion_len, 7);
5531 saved_offset = curr_offset;
5534 proto_tree_add_text(tree, tvb, curr_offset,
5536 "IS-2000 Service Configuration Record Content");
5539 proto_item_add_subtree(item, ett_scr);
5541 proto_tree_add_text(scr_subtree, tvb,
5543 "FOR_MUX_OPTION: Forward Traffic Channel multiplex option");
5547 proto_tree_add_text(scr_subtree, tvb,
5549 "REV_MUX_OPTION: Reverse Traffic Channel multiplex option");
5553 proto_tree_add_text(scr_subtree, tvb,
5555 "FOR_RATES: Transmission rates of the Forward Fundamental Channel");
5559 proto_tree_add_text(scr_subtree, tvb,
5561 "REV_RATES: Transmission rates of the Reverse Fundamental Channel");
5565 num_con_rec = tvb_get_guint8(tvb, curr_offset);
5567 proto_tree_add_text(scr_subtree, tvb,
5569 "NUM_CON_REC: Number of service option connection records, %u",
5574 for (i=1; i <= num_con_rec; i++)
5576 oct = tvb_get_guint8(tvb, curr_offset);
5579 proto_tree_add_text(scr_subtree, tvb,
5580 curr_offset, oct /* oct already includes the length octet itself */,
5581 "Service option connection record [%u]",
5585 proto_item_add_subtree(item, ett_srvc_con_rec);
5589 oct = tvb_get_guint8(tvb, curr_offset);
5591 proto_tree_add_text(subtree, tvb,
5593 "CON_REF: Service option connection reference, %u",
5598 value = tvb_get_ntohs(tvb, curr_offset);
5600 proto_tree_add_text(subtree, tvb,
5602 "SERVICE_OPTION: %s",
5603 ansi_a_so_int_to_str(value));
5607 oct = tvb_get_guint8(tvb, curr_offset);
5609 switch ((oct & 0xf0) >> 4)
5611 case 0x00: str = "The service option connection does not use Forward Traffic Channel traffic."; break;
5612 case 0x01: str = "The service option connection uses primary traffic on the Forward Traffic Channel."; break;
5613 case 0x02: str = "The service option connection uses secondary traffic on the Forward Traffic Channel."; break;
5614 default: str = "Reserved"; break;
5617 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5618 proto_tree_add_text(subtree, tvb,
5620 "%s : FOR_TRAFFIC: Forward Traffic Channel traffic type, %s",
5626 case 0x00: str = "The service option connection does not use Reverse Traffic Channel traffic."; break;
5627 case 0x01: str = "The service option connection uses primary traffic on the Reverse Traffic Channel."; break;
5628 case 0x02: str = "The service option connection uses secondary traffic on the Reverse Traffic Channel."; break;
5629 default: str = "Reserved"; break;
5632 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
5633 proto_tree_add_text(subtree, tvb,
5635 "%s : REV_TRAFFIC: Reverse Traffic Channel traffic type, %s",
5641 oct = tvb_get_guint8(tvb, curr_offset);
5643 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5644 proto_tree_add_text(subtree, tvb,
5646 "%s : UI_ENCRYPT_MODE: Encryption mode indicator for user information privacy",
5649 other_decode_bitfield_value(a_bigbuf, oct, 0x1c, 8);
5650 proto_tree_add_text(subtree, tvb,
5652 "%s : SR_ID: Service reference identifier",
5655 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5656 proto_tree_add_text(subtree, tvb,
5658 "%s : RLP_INFO_INCL: RLP information included indicator",
5663 value = (oct & 0x01) << 3;
5664 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5668 oct = tvb_get_guint8(tvb, curr_offset);
5670 value |= (oct & 0xe0) >> 5;
5672 proto_tree_add_text(subtree, tvb,
5674 "%s : RLP_BLOB_LEN (MSB), %u",
5678 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5679 proto_tree_add_text(subtree, tvb,
5681 "%s : RLP_BLOB_LEN (LSB)",
5684 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5685 proto_tree_add_text(subtree, tvb,
5687 "%s : RLP_BLOB (MSB)",
5694 proto_tree_add_text(subtree, tvb,
5695 curr_offset, value - 1,
5698 curr_offset += value - 1;
5701 oct = tvb_get_guint8(tvb, curr_offset);
5703 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5704 proto_tree_add_text(subtree, tvb,
5706 "%s : RLP_BLOB (LSB)",
5709 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
5710 proto_tree_add_text(subtree, tvb,
5717 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5718 proto_tree_add_text(subtree, tvb,
5727 oct = tvb_get_guint8(tvb, curr_offset);
5729 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5730 proto_tree_add_text(scr_subtree, tvb,
5732 "%s : FCH_CC_INCL: Channel configuration for the Fundamental Channel included indicator",
5737 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5738 proto_tree_add_text(scr_subtree, tvb,
5740 "%s : FCH_FRAME_SIZE: Fundamental Channel frame size supported indicator",
5743 other_decode_bitfield_value(a_bigbuf, oct, 0x3e, 8);
5744 proto_tree_add_text(scr_subtree, tvb,
5746 "%s : FOR_FCH_RC: Forward Fundamental Channel Radio Configuration, %u",
5750 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5751 value = (oct & 0x01) << 4;
5755 oct = tvb_get_guint8(tvb, curr_offset);
5757 value |= (oct & 0xf0) >> 4;
5759 proto_tree_add_text(scr_subtree, tvb,
5761 "%s : REV_FCH_RC: Reverse Fundamental Channel Radio Configuration (MSB), %u",
5765 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
5766 proto_tree_add_text(scr_subtree, tvb,
5768 "%s : REV_FCH_RC: (LSB)",
5780 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5781 proto_tree_add_text(scr_subtree, tvb,
5783 "%s : DCCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5788 /* can't be bothered to do the rest of the decode */
5790 proto_tree_add_text(scr_subtree, tvb,
5791 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5792 "DCCH + ? + Reserved");
5794 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5801 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5802 proto_tree_add_text(scr_subtree, tvb,
5804 "%s : FOR_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5809 /* can't be bothered to do the rest of the decode */
5811 proto_tree_add_text(scr_subtree, tvb,
5812 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5813 "FOR_SCH + ? + Reserved");
5815 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5822 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5823 proto_tree_add_text(scr_subtree, tvb,
5825 "%s : REV_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5830 /* can't be bothered to do the rest of the decode */
5832 proto_tree_add_text(scr_subtree, tvb,
5833 curr_offset, (is2000_portion_len - (curr_offset - saved_offset)),
5834 "REV_SCH + ? + Reserved");
5836 curr_offset += (is2000_portion_len - (curr_offset - saved_offset));
5840 bit_mask = (0xff << (8 - bit_offset));
5841 bit_mask >>= (8 - bit_offset);
5843 other_decode_bitfield_value(a_bigbuf, oct, bit_mask, 8);
5844 proto_tree_add_text(scr_subtree, tvb,
5854 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5856 return(curr_offset - offset);
5863 elem_is2000_nn_scr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5866 guint32 curr_offset;
5867 guint is2000_portion_len;
5869 curr_offset = offset;
5871 oct = tvb_get_guint8(tvb, curr_offset);
5873 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
5874 proto_tree_add_text(tree, tvb, curr_offset, 1,
5878 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
5879 proto_tree_add_text(tree, tvb, curr_offset, 1,
5880 "%s : Bit-Exact Length Fill Bits: %u",
5886 is2000_portion_len = len - (curr_offset - offset);
5890 NO_MORE_DATA_CHECK(len);
5892 if (is2000_portion_len > 0)
5894 SHORT_DATA_CHECK(len - (curr_offset - offset), is2000_portion_len);
5896 proto_tree_add_text(tree, tvb, curr_offset, is2000_portion_len,
5897 "IS-2000 Non-Negotiable Service Configuration Record Content");
5899 curr_offset += is2000_portion_len;
5907 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
5909 return(curr_offset - offset);
5916 elem_is2000_mob_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
5920 guint32 curr_offset;
5921 proto_tree *subtree;
5922 proto_item *item = NULL;
5925 curr_offset = offset;
5927 oct = tvb_get_guint8(tvb, curr_offset);
5929 switch (global_a_variant)
5931 case A_VARIANT_IOS401:
5932 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
5933 proto_tree_add_text(tree, tvb, curr_offset, 1,
5938 case A_VARIANT_IOS501:
5939 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
5940 proto_tree_add_text(tree, tvb, curr_offset, 1,
5941 "%s : REV_PDCH Supported: IS-2000 R-PDCH %ssupported",
5943 (oct & 0x80) ? "" : "not ");
5945 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
5946 proto_tree_add_text(tree, tvb, curr_offset, 1,
5947 "%s : FOR_PDCH Supported: IS-2000 F-PDCH %ssupported",
5949 (oct & 0x40) ? "" : "not ");
5951 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
5952 proto_tree_add_text(tree, tvb, curr_offset, 1,
5953 "%s : ERAM Supported: Enhanced Rate Adaptation Mode %ssupported",
5955 (oct & 0x20) ? "" : "not ");
5959 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
5960 proto_tree_add_text(tree, tvb, curr_offset, 1,
5961 "%s : DCCH Supported: IS-2000 DCCH %ssupported",
5963 (oct & 0x10) ? "" : "not ");
5965 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
5966 proto_tree_add_text(tree, tvb, curr_offset, 1,
5967 "%s : FCH Supported: IS-2000 FCH %ssupported",
5969 (oct & 0x08) ? "" : "not ");
5971 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
5972 proto_tree_add_text(tree, tvb, curr_offset, 1,
5973 "%s : OTD Supported: Orthogonal Transmit Diversity %ssupported",
5975 (oct & 0x04) ? "" : "not ");
5977 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
5978 proto_tree_add_text(tree, tvb, curr_offset, 1,
5979 "%s : Enhanced RC CFG Supported: Radio configuration in radio class 2 %ssupported",
5981 (oct & 0x02) ? "" : "not ");
5983 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
5984 proto_tree_add_text(tree, tvb, curr_offset, 1,
5985 "%s : QPCH Supported: Quick Paging Channel %ssupported",
5987 (oct & 0x01) ? "" : "not ");
5991 NO_MORE_DATA_CHECK(len);
5993 oct_len = tvb_get_guint8(tvb, curr_offset);
5995 proto_tree_add_text(tree,
5996 tvb, curr_offset, 1,
5997 "FCH Information: Bit-Exact Length Octet Count: %u",
6002 NO_MORE_DATA_CHECK(len);
6004 oct = tvb_get_guint8(tvb, curr_offset);
6006 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6007 proto_tree_add_text(tree, tvb, curr_offset, 1,
6011 switch ((oct & 0x70) >> 4)
6013 case 0: str = "No mobile assisted geo-location capabilities"; break;
6014 case 1: str = "IS801 capable (Advanced Forward Link Triangulation only (AFLT))"; break;
6015 case 2: str = "IS801 capable (Advanced Forward Link Triangulation and Global Positioning Systems"; break;
6016 case 3: str = "Global Positioning Systems Only"; break;
6022 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
6023 proto_tree_add_text(tree, tvb, curr_offset, 1,
6024 "%s : Geo Location Type: %s",
6028 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6029 proto_tree_add_text(tree, tvb, curr_offset, 1,
6030 "%s : Geo Location Included",
6033 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6034 proto_tree_add_text(tree, tvb, curr_offset, 1,
6035 "%s : FCH Information: Bit-Exact Length Fill Bits: %u",
6041 NO_MORE_DATA_CHECK(len);
6045 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6047 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6048 "FCH Information Content");
6050 curr_offset += oct_len;
6052 NO_MORE_DATA_CHECK(len);
6058 oct_len = tvb_get_guint8(tvb, curr_offset);
6060 proto_tree_add_text(tree,
6061 tvb, curr_offset, 1,
6062 "DCCH Information: Bit-Exact Length Octet Count: %u",
6067 NO_MORE_DATA_CHECK(len);
6069 oct = tvb_get_guint8(tvb, curr_offset);
6071 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6072 proto_tree_add_text(tree, tvb, curr_offset, 1,
6076 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6077 proto_tree_add_text(tree, tvb, curr_offset, 1,
6078 "%s : DCCH Information: Bit-Exact Length Fill Bits: %u",
6084 NO_MORE_DATA_CHECK(len);
6088 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6090 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6091 "DCCH Information Content");
6093 curr_offset += oct_len;
6095 NO_MORE_DATA_CHECK(len);
6101 oct_len = tvb_get_guint8(tvb, curr_offset);
6103 proto_tree_add_text(tree,
6104 tvb, curr_offset, 1,
6105 "FOR_PDCH Information: Bit-Exact Length Octet Count: %u",
6110 NO_MORE_DATA_CHECK(len);
6112 oct = tvb_get_guint8(tvb, curr_offset);
6114 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6115 proto_tree_add_text(tree, tvb, curr_offset, 1,
6119 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6120 proto_tree_add_text(tree, tvb, curr_offset, 1,
6121 "%s : FOR_PDCH Information: Bit-Exact Length Fill Bits: %u",
6127 NO_MORE_DATA_CHECK(len);
6131 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6133 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6134 "FOR_PDCH Information Content");
6136 curr_offset += oct_len;
6138 NO_MORE_DATA_CHECK(len);
6144 oct_len = tvb_get_guint8(tvb, curr_offset);
6146 proto_tree_add_text(tree,
6147 tvb, curr_offset, 1,
6148 "REV_PDCH Information: Bit-Exact Length Octet Count: %u",
6153 NO_MORE_DATA_CHECK(len);
6155 oct = tvb_get_guint8(tvb, curr_offset);
6157 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
6158 proto_tree_add_text(tree, tvb, curr_offset, 1,
6162 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
6163 proto_tree_add_text(tree, tvb, curr_offset, 1,
6164 "%s : REV_PDCH Information: Bit-Exact Length Fill Bits: %u",
6170 NO_MORE_DATA_CHECK(len);
6174 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6176 proto_tree_add_text(tree, tvb, curr_offset, oct_len,
6177 "REV_PDCH Information Content");
6179 curr_offset += oct_len;
6181 NO_MORE_DATA_CHECK(len);
6184 oct = tvb_get_guint8(tvb, curr_offset);
6187 proto_tree_add_text(tree, tvb,
6189 "VP Algorithms Supported%s",
6190 oct ? "" : ": No voice privacy supported");
6195 proto_item_add_subtree(item, ett_vp_algs);
6197 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
6198 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6201 (oct & 0x80) ? "No extension" : "Extended");
6203 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
6204 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6205 "%s : A7: Reserved",
6208 other_decode_bitfield_value(a_bigbuf, oct, 0x20, 8);
6209 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6210 "%s : A6: Reserved",
6213 other_decode_bitfield_value(a_bigbuf, oct, 0x10, 8);
6214 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6215 "%s : A5: Reserved",
6218 other_decode_bitfield_value(a_bigbuf, oct, 0x08, 8);
6219 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6220 "%s : A4: Reserved",
6223 other_decode_bitfield_value(a_bigbuf, oct, 0x04, 8);
6224 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6225 "%s : A3: Reserved",
6228 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6229 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6230 "%s : A2: Advanced Encryption Standard (AES)",
6233 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6234 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6235 "%s : A1: Private long code",
6239 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6241 return(curr_offset - offset);
6248 elem_ptype(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6251 guint32 curr_offset;
6254 curr_offset = offset;
6256 value = tvb_get_ntohs(tvb, curr_offset);
6260 case 0x880b: str = "PPP"; break;
6261 case 0x8881: str = "Unstructured Byte Stream"; break;
6267 proto_tree_add_text(tree,
6268 tvb, curr_offset, 2,
6273 g_snprintf(add_string, string_len, " - (%s)", str);
6277 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6279 return(curr_offset - offset);
6286 elem_fwd_ms_info_recs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6293 guint32 curr_offset;
6295 gint ett_elem_idx, idx, i;
6296 proto_tree *subtree;
6299 curr_offset = offset;
6303 while ((len - (curr_offset - offset)) >= 2)
6307 rec_type = tvb_get_guint8(tvb, curr_offset);
6309 str = match_strval_idx((guint32) rec_type, ansi_fwd_ms_info_rec_str, &idx);
6314 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
6318 ett_elem_idx = ett_ansi_fwd_ms_info_rec[idx];
6322 proto_tree_add_text(tree,
6323 tvb, curr_offset, 1,
6324 "Information Record Type [%u]: (%u) %s",
6329 subtree = proto_item_add_subtree(item, ett_elem_idx);
6333 oct_len = tvb_get_guint8(tvb, curr_offset);
6335 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
6336 curr_offset, 1, oct_len);
6342 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6346 case ANSI_FWD_MS_INFO_REC_CLD_PN:
6347 oct = tvb_get_guint8(tvb, curr_offset);
6349 switch ((oct & 0xe0) >> 5)
6351 case 0: str = "Unknown"; break;
6352 case 1: str = "International number"; break;
6353 case 2: str = "National number"; break;
6354 case 3: str = "Network-specific number"; break;
6355 case 4: str = "Subscriber number"; break;
6356 case 5: str = "Reserved"; break;
6357 case 6: str = "Abbreviated number"; break;
6359 str = "Reserved for extension";
6363 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
6364 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6365 "%s : Number Type: %s",
6369 switch ((oct & 0x1e) >> 1)
6371 case 0x00: str = "Unknown"; break;
6372 case 0x01: str = "ISDN/Telephony Numbering"; break;
6373 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6374 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6375 case 0x09: str = "Private Numbering"; break;
6376 case 0x0f: str = "Reserved for extension"; break;
6382 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6383 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6384 "%s : Number Plan: %s",
6390 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6391 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6392 "%s : MSB of first digit",
6397 for (i=0; i < (oct_len - 1); i++)
6399 a_bigbuf[i] = (oct & 0x01) << 7;
6401 oct = tvb_get_guint8(tvb, curr_offset + i);
6403 a_bigbuf[i] |= (oct & 0xfe) >> 1;
6407 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 1,
6411 curr_offset += (oct_len - 2);
6414 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6415 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6422 case ANSI_FWD_MS_INFO_REC_CLG_PN:
6423 value = tvb_get_ntohs(tvb, curr_offset);
6425 oct = (value & 0xff00) >> 8;
6427 switch ((oct & 0xe0) >> 5)
6429 case 0: str = "Unknown"; break;
6430 case 1: str = "International number"; break;
6431 case 2: str = "National number"; break;
6432 case 3: str = "Network-specific number"; break;
6433 case 4: str = "Subscriber number"; break;
6434 case 5: str = "Reserved"; break;
6435 case 6: str = "Abbreviated number"; break;
6437 str = "Reserved for extension";
6441 other_decode_bitfield_value(a_bigbuf, value, 0xe000, 16);
6442 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6443 "%s : Number Type: %s",
6447 switch ((oct & 0x1e) >> 1)
6449 case 0x00: str = "Unknown"; break;
6450 case 0x01: str = "ISDN/Telephony Numbering"; break;
6451 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6452 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6453 case 0x09: str = "Private Numbering"; break;
6454 case 0x0f: str = "Reserved for extension"; break;
6460 other_decode_bitfield_value(a_bigbuf, value, 0x1e00, 16);
6461 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6462 "%s : Number Plan: %s",
6466 switch ((value & 0x0180) >> 7)
6468 case 0: str = "Presentation allowed"; break;
6469 case 1: str = "Presentation restricted"; break;
6470 case 2: str = "Number not available"; break;
6476 other_decode_bitfield_value(a_bigbuf, value, 0x0180, 16);
6477 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6478 "%s : Presentation Indicator (PI): %s",
6482 switch ((value & 0x0060) >> 5)
6484 case 0: str = "User-provided, not screened"; break;
6485 case 1: str = "User-provided, verified and passed"; break;
6486 case 2: str = "User-provided, verified and failed"; break;
6488 str = "Network-provided";
6492 other_decode_bitfield_value(a_bigbuf, value, 0x0060, 16);
6493 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6494 "%s : Screening Indicator (SI): %s",
6500 oct = (value & 0x00ff);
6502 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6503 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6504 "%s : MSB of first digit",
6509 for (i=0; i < (oct_len - 2); i++)
6511 a_bigbuf[i] = (oct & 0x1f) << 3;
6513 oct = tvb_get_guint8(tvb, curr_offset + i);
6515 a_bigbuf[i] |= (oct & 0xe0) >> 5;
6519 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 2,
6523 curr_offset += (oct_len - 3);
6525 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6526 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6534 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6535 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6543 case ANSI_FWD_MS_INFO_REC_MW:
6544 oct = tvb_get_guint8(tvb, curr_offset);
6546 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6547 "Number of messages waiting: %u",
6554 proto_tree_add_text(subtree,
6555 tvb, curr_offset, oct_len,
6558 curr_offset += oct_len;
6564 g_snprintf(add_string, string_len, " - %u record%s",
6565 num_recs, plurality(num_recs, "", "s"));
6567 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6569 return(curr_offset - offset);
6576 elem_rev_ms_info_recs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
6583 guint32 curr_offset, saved_offset;
6585 gint ett_elem_idx, idx, i;
6586 proto_tree *subtree, *subtree2;
6589 curr_offset = offset;
6593 while ((len - (curr_offset - offset)) >= 2)
6597 rec_type = tvb_get_guint8(tvb, curr_offset);
6599 str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
6604 ett_elem_idx = ett_ansi_ms_info_rec_reserved;
6608 ett_elem_idx = ett_ansi_rev_ms_info_rec[idx];
6612 proto_tree_add_text(tree,
6613 tvb, curr_offset, 1,
6614 "Information Record Type [%u]: (%u) %s",
6619 subtree = proto_item_add_subtree(item, ett_elem_idx);
6623 oct_len = tvb_get_guint8(tvb, curr_offset);
6625 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
6626 curr_offset, 1, oct_len);
6632 SHORT_DATA_CHECK(len - (curr_offset - offset), oct_len);
6636 case ANSI_REV_MS_INFO_REC_CLD_PN:
6637 oct = tvb_get_guint8(tvb, curr_offset);
6639 switch ((oct & 0xe0) >> 5)
6641 case 0: str = "Unknown"; break;
6642 case 1: str = "International number"; break;
6643 case 2: str = "National number"; break;
6644 case 3: str = "Network-specific number"; break;
6645 case 4: str = "Subscriber number"; break;
6646 case 5: str = "Reserved"; break;
6647 case 6: str = "Abbreviated number"; break;
6649 str = "Reserved for extension";
6653 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
6654 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6655 "%s : Number Type: %s",
6659 switch ((oct & 0x1e) >> 1)
6661 case 0x00: str = "Unknown"; break;
6662 case 0x01: str = "ISDN/Telephony Numbering"; break;
6663 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6664 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6665 case 0x09: str = "Private Numbering"; break;
6666 case 0x0f: str = "Reserved for extension"; break;
6672 other_decode_bitfield_value(a_bigbuf, oct, 0x1e, 8);
6673 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6674 "%s : Number Plan: %s",
6680 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6681 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6682 "%s : MSB of first digit",
6687 for (i=0; i < (oct_len - 1); i++)
6689 a_bigbuf[i] = (oct & 0x01) << 7;
6691 oct = tvb_get_guint8(tvb, curr_offset + i);
6693 a_bigbuf[i] |= (oct & 0xfe) >> 1;
6697 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 1,
6701 curr_offset += (oct_len - 2);
6704 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6705 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6712 case ANSI_REV_MS_INFO_REC_CLG_PN:
6713 value = tvb_get_ntohs(tvb, curr_offset);
6715 oct = (value & 0xff00) >> 8;
6717 switch ((oct & 0xe0) >> 5)
6719 case 0: str = "Unknown"; break;
6720 case 1: str = "International number"; break;
6721 case 2: str = "National number"; break;
6722 case 3: str = "Network-specific number"; break;
6723 case 4: str = "Subscriber number"; break;
6724 case 5: str = "Reserved"; break;
6725 case 6: str = "Abbreviated number"; break;
6727 str = "Reserved for extension";
6731 other_decode_bitfield_value(a_bigbuf, value, 0xe000, 16);
6732 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6733 "%s : Number Type: %s",
6737 switch ((oct & 0x1e) >> 1)
6739 case 0x00: str = "Unknown"; break;
6740 case 0x01: str = "ISDN/Telephony Numbering"; break;
6741 case 0x03: str = "Data Numbering (ITU-T Rec. X.121)"; break;
6742 case 0x04: str = "Telex Numbering (ITU-T Rec. F.69)"; break;
6743 case 0x09: str = "Private Numbering"; break;
6744 case 0x0f: str = "Reserved for extension"; break;
6750 other_decode_bitfield_value(a_bigbuf, value, 0x1e00, 16);
6751 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6752 "%s : Number Plan: %s",
6756 switch ((value & 0x0180) >> 7)
6758 case 0: str = "Presentation allowed"; break;
6759 case 1: str = "Presentation restricted"; break;
6760 case 2: str = "Number not available"; break;
6766 other_decode_bitfield_value(a_bigbuf, value, 0x0180, 16);
6767 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6768 "%s : Presentation Indicator (PI): %s",
6772 switch ((value & 0x0060) >> 5)
6774 case 0: str = "User-provided, not screened"; break;
6775 case 1: str = "User-provided, verified and passed"; break;
6776 case 2: str = "User-provided, verified and failed"; break;
6778 str = "Network-provided";
6782 other_decode_bitfield_value(a_bigbuf, value, 0x0060, 16);
6783 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6784 "%s : Screening Indicator (SI): %s",
6790 oct = (value & 0x00ff);
6792 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6793 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6794 "%s : MSB of first digit",
6799 for (i=0; i < (oct_len - 2); i++)
6801 a_bigbuf[i] = (oct & 0x1f) << 3;
6803 oct = tvb_get_guint8(tvb, curr_offset + i);
6805 a_bigbuf[i] |= (oct & 0xe0) >> 5;
6809 proto_tree_add_text(subtree, tvb, curr_offset, oct_len - 2,
6813 curr_offset += (oct_len - 3);
6815 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
6816 proto_tree_add_text(subtree, tvb, curr_offset, 1,
6824 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
6825 proto_tree_add_text(subtree, tvb, curr_offset, 2,
6833 case ANSI_REV_MS_INFO_REC_SO_INFO:
6835 saved_offset = curr_offset;
6837 while ((oct_len - (curr_offset - saved_offset)) > 2)
6840 proto_tree_add_text(subtree,
6841 tvb, curr_offset, 3,
6842 "Service Option [%u]",
6845 subtree2 = proto_item_add_subtree(item, ett_so_list);
6847 oct = tvb_get_guint8(tvb, curr_offset);
6849 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
6850 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6854 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
6855 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6856 "%s : Forward Support: %s",
6858 (oct & 0x02) ? "TRUE" : "FALSE");
6860 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
6861 proto_tree_add_text(subtree2, tvb, curr_offset, 1,
6862 "%s : Reverse Support: %s",
6864 (oct & 0x01) ? "TRUE" : "FALSE");
6868 value = tvb_get_ntohs(tvb, curr_offset);
6870 str = ansi_a_so_int_to_str(value);
6871 proto_tree_add_text(subtree2, tvb, curr_offset, 2,
6872 "Service Option: %s (%hu)",
6876 proto_item_append_text(item, " - (%hu) %s", value, str);
6884 proto_tree_add_text(subtree,
6885 tvb, curr_offset, oct_len,
6888 curr_offset += oct_len;
6894 g_snprintf(add_string, string_len, " - %u record%s",
6895 num_recs, plurality(num_recs, "", "s"));
6897 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
6899 return(curr_offset - offset);
6906 elem_ext_ho_dir_params(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
6910 guint32 curr_offset;
6913 curr_offset = offset;
6915 oct = tvb_get_guint8(tvb, curr_offset);
6917 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6918 proto_tree_add_text(tree, tvb, curr_offset, 1,
6919 "%s : Search Window A Size (Srch_Win_A): %u",
6923 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6924 proto_tree_add_text(tree, tvb, curr_offset, 1,
6925 "%s : Search Window N Size (Srch_Win_N): %u",
6931 NO_MORE_DATA_CHECK(len);
6933 oct = tvb_get_guint8(tvb, curr_offset);
6935 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6936 proto_tree_add_text(tree, tvb, curr_offset, 1,
6937 "%s : Search Window R Size (Srch_Win_R): %u",
6941 value = tvb_get_guint8(tvb, curr_offset + 1);
6943 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6944 proto_tree_add_text(tree, tvb, curr_offset, 1,
6945 "%s : Add Pilot Threshold (T_Add) (MSB): %u",
6947 (oct & 0x0f) << 2 | (value & 0xc0) >> 6);
6953 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
6954 proto_tree_add_text(tree, tvb, curr_offset, 1,
6955 "%s : Add Pilot Threshold (T_Add) (LSB)",
6958 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
6959 proto_tree_add_text(tree, tvb, curr_offset, 1,
6960 "%s : Drop Pilot Threshold (T_Drop): %u",
6966 NO_MORE_DATA_CHECK(len);
6968 oct = tvb_get_guint8(tvb, curr_offset);
6970 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6971 proto_tree_add_text(tree, tvb, curr_offset, 1,
6972 "%s : Compare Threshold (T_Comp): %u",
6976 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6977 proto_tree_add_text(tree, tvb, curr_offset, 1,
6978 "%s : Drop Timer Value (T_TDrop): %u",
6984 NO_MORE_DATA_CHECK(len);
6986 oct = tvb_get_guint8(tvb, curr_offset);
6988 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
6989 proto_tree_add_text(tree, tvb, curr_offset, 1,
6990 "%s : Neighbor Max Age (Nghbor_Max_AGE): %u",
6994 switch (global_a_variant)
6996 case A_VARIANT_IOS401:
6997 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
6998 proto_tree_add_text(tree, tvb, curr_offset, 1,
7003 case A_VARIANT_IOS501:
7004 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
7005 proto_tree_add_text(tree, tvb, curr_offset, 1,
7011 case 0: str = "Only Search Window A Size is valid"; break;
7012 case 1: str = "Subset is valid"; break;
7013 case 2: str = "All fields valid"; break;
7019 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7020 proto_tree_add_text(tree, tvb, curr_offset, 1,
7021 "%s : Target BS Values Included: %s",
7029 NO_MORE_DATA_CHECK(len);
7031 oct = tvb_get_guint8(tvb, curr_offset);
7033 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7034 proto_tree_add_text(tree, tvb, curr_offset, 1,
7038 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7039 proto_tree_add_text(tree, tvb, curr_offset, 1,
7040 "%s : SOFT_SLOPE: %u",
7046 NO_MORE_DATA_CHECK(len);
7048 oct = tvb_get_guint8(tvb, curr_offset);
7050 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7051 proto_tree_add_text(tree, tvb, curr_offset, 1,
7055 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7056 proto_tree_add_text(tree, tvb, curr_offset, 1,
7057 "%s : ADD_INTERCEPT: %u",
7063 NO_MORE_DATA_CHECK(len);
7065 oct = tvb_get_guint8(tvb, curr_offset);
7067 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
7068 proto_tree_add_text(tree, tvb, curr_offset, 1,
7072 other_decode_bitfield_value(a_bigbuf, oct, 0x3f, 8);
7073 proto_tree_add_text(tree, tvb, curr_offset, 1,
7074 "%s : DROP_INTERCEPT: %u",
7080 NO_MORE_DATA_CHECK(len);
7082 oct = tvb_get_guint8(tvb, curr_offset);
7084 proto_tree_add_text(tree, tvb, curr_offset, 1,
7085 "Target BS P_REV: %u",
7090 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7092 return(curr_offset - offset);
7097 * UNUSED in SPEC and no IEI!
7102 * UNUSED in SPEC and no IEI!
7112 * UNUSED in SPEC and no IEI!
7117 * UNUSED in SPEC and no IEI!
7124 elem_cdma_sowd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7128 guint32 curr_offset;
7129 const gchar *str = NULL;
7131 curr_offset = offset;
7133 curr_offset += elem_cell_id(tvb, tree, offset, len, add_string, string_len);
7134 add_string[0] = '\0';
7136 value = tvb_get_ntohs(tvb, curr_offset);
7138 proto_tree_add_text(tree,
7139 tvb, curr_offset, 2,
7140 "CDMA Serving One Way Delay: %u",
7145 oct = tvb_get_guint8(tvb, curr_offset);
7147 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
7148 proto_tree_add_text(tree,
7149 tvb, curr_offset, 1,
7155 case 0: str = "100 nsec"; break;
7156 case 1: str = "50 nsec"; break;
7157 case 2: str = "1/16 CDMA PN Chip"; break;
7158 case 3: str = "Reserved"; break;
7161 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
7162 proto_tree_add_text(tree,
7163 tvb, curr_offset, 1,
7164 "%s : Resolution: %s",
7170 if ((len - (curr_offset - offset)) > 1)
7172 proto_tree_add_text(tree,
7173 tvb, curr_offset, 2,
7179 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7181 return(curr_offset - offset);
7198 elem_re_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7201 guint32 curr_offset;
7205 curr_offset = offset;
7207 oct = tvb_get_guint8(tvb, curr_offset);
7209 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7210 proto_tree_add_text(tree,
7211 tvb, curr_offset, 1,
7215 other_decode_bitfield_value(a_bigbuf, oct, 0x40, 8);
7216 proto_tree_add_text(tree,
7217 tvb, curr_offset, 1,
7218 "%s : Include Priority: MSC %s include priority in Assignment Request",
7220 (oct & 0x40) ? "should" : "does not need to");
7222 switch ((oct & 0x30) >> 4)
7224 case 0: str = "Not reported"; break;
7225 case 1: str = "radio environment is acceptable"; break;
7226 case 2: str = "radio environment is marginally acceptable"; break;
7228 str = "radio environment is poor";
7232 other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
7233 proto_tree_add_text(tree,
7234 tvb, curr_offset, 1,
7239 switch ((oct & 0x0c) >> 2)
7241 case 0: str = "Not reported"; break;
7242 case 1: str = "radio environment is acceptable"; break;
7243 case 2: str = "radio environment is marginally acceptable"; break;
7245 str = "radio environment is poor";
7249 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
7250 proto_tree_add_text(tree,
7251 tvb, curr_offset, 1,
7256 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7257 proto_tree_add_text(tree,
7258 tvb, curr_offset, 1,
7259 "%s : Alloc: resources are %sallocated",
7261 (oct & 0x02) ? "" : "not ");
7263 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7264 proto_tree_add_text(tree,
7265 tvb, curr_offset, 1,
7266 "%s : Avail: resources are %savailable",
7268 (oct & 0x01) ? "" : "not ");
7272 /* no length check possible */
7274 return(curr_offset - offset);
7279 * UNUSED in SPEC and no IEI!
7314 * UNUSED in SPEC and no IEI!
7391 elem_cld_party_ascii_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7394 guint32 curr_offset;
7398 curr_offset = offset;
7400 oct = tvb_get_guint8(tvb, curr_offset);
7402 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
7403 proto_tree_add_text(tree, tvb, curr_offset, 1,
7407 switch ((oct & 0x70) >> 4)
7409 case 0: str = "Unknown"; break;
7410 case 1: str = "International number"; break;
7411 case 2: str = "National number"; break;
7412 case 3: str = "Network specific number"; break;
7413 case 4: str = "Dedicated PAD access, short code"; break;
7414 case 7: str = "Reserved for extension"; break;
7420 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
7421 proto_tree_add_text(tree,
7422 tvb, curr_offset, 1,
7423 "%s : Type of Number: %s",
7429 case 0x00: str = "Unknown"; break;
7430 case 0x01: str = "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
7431 case 0x03: str = "Data number plan (ITU recommendation X.121)"; break;
7432 case 0x04: str = "Telex numbering plan (ITU recommendation F.69)"; break;
7433 case 0x07: str = "Reserved for extension"; break;
7434 case 0x08: str = "National numbering plan"; break;
7435 case 0x09: str = "Private numbering plan"; break;
7441 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7442 proto_tree_add_text(tree,
7443 tvb, curr_offset, 1,
7444 "%s : Numbering Plan Identification: %s",
7450 poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
7452 proto_tree_add_string_format(tree, hf_ansi_a_cld_party_ascii_num,
7453 tvb, curr_offset, len - (curr_offset - offset),
7456 (gchar *) format_text(poctets, len - (curr_offset - offset)));
7458 curr_offset += len - (curr_offset - offset);
7460 g_snprintf(add_string, string_len, " - (%s)", poctets);
7462 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7464 return(curr_offset - offset);
7471 elem_band_class(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7474 guint32 curr_offset;
7478 curr_offset = offset;
7480 oct = tvb_get_guint8(tvb, curr_offset);
7482 other_decode_bitfield_value(a_bigbuf, oct, 0xe0, 8);
7483 proto_tree_add_text(tree,
7484 tvb, curr_offset, 1,
7488 temp_int = oct & 0x1f;
7489 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
7495 str = band_class_str[temp_int];
7498 other_decode_bitfield_value(a_bigbuf, oct, 0x1f, 8);
7499 proto_tree_add_text(tree,
7500 tvb, curr_offset, 1,
7501 "%s : Band Class: %s",
7507 g_snprintf(add_string, string_len, " - (%s)", str);
7509 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7511 return(curr_offset - offset);
7533 elem_is2000_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7535 guint32 curr_offset;
7537 add_string = add_string;
7538 curr_offset = offset;
7540 proto_tree_add_text(tree, tvb, curr_offset, len, "IS-95/IS-2000 Cause Information");
7544 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7546 return(curr_offset - offset);
7568 elem_auth_event(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7571 guint32 curr_offset;
7574 curr_offset = offset;
7578 oct = tvb_get_guint8(tvb, curr_offset);
7582 case 0x01: str = "Event: Authentication parameters were NOT received from mobile"; break;
7583 case 0x02: str = "Event: RANDC mis-match"; break;
7584 case 0x03: str = "Event: Recently requested"; break;
7585 case 0x04: str = "Event: Direct channel assignment"; break;
7591 proto_tree_add_text(tree, tvb, curr_offset, len,
7596 proto_tree_add_text(tree, tvb, curr_offset, len, "Event");
7601 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7603 return(curr_offset - offset);
7718 * Generic decode is good enough
7725 elem_psmm_count(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7728 guint32 curr_offset;
7730 curr_offset = offset;
7732 oct = tvb_get_guint8(tvb, curr_offset);
7734 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
7735 proto_tree_add_text(tree,
7736 tvb, curr_offset, 1,
7740 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
7741 proto_tree_add_text(tree,
7742 tvb, curr_offset, 1,
7743 "%s : PSMM Count: %u",
7749 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7751 return(curr_offset - offset);
7758 elem_geo_loc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7760 guint32 curr_offset;
7762 curr_offset = offset;
7764 proto_tree_add_text(tree, tvb, curr_offset, len, "Calling Geodetic Location");
7768 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7770 return(curr_offset - offset);
7817 elem_cct_group(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7821 guint32 curr_offset;
7823 curr_offset = offset;
7825 oct = tvb_get_guint8(tvb, curr_offset);
7827 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
7828 proto_tree_add_text(tree,
7829 tvb, curr_offset, 1,
7833 other_decode_bitfield_value(a_bigbuf, oct, 0x02, 8);
7834 proto_tree_add_text(tree,
7835 tvb, curr_offset, 1,
7836 "%s : All Circuits",
7839 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7840 proto_tree_add_text(tree,
7841 tvb, curr_offset, 1,
7847 NO_MORE_DATA_CHECK(len);
7849 oct = tvb_get_guint8(tvb, curr_offset);
7851 proto_tree_add_text(tree,
7852 tvb, curr_offset, 1,
7853 "Count: %u circuit%s",
7854 oct, plurality(oct, "", "s"));
7856 g_snprintf(add_string, string_len, " - %u circuit%s",
7857 oct, plurality(oct, "", "s"));
7861 value = tvb_get_ntohs(tvb, curr_offset);
7863 other_decode_bitfield_value(a_bigbuf, value, 0xffe0, 16);
7864 proto_tree_add_text(tree,
7865 tvb, curr_offset, 2,
7866 "%s : PCM Multiplexer: %u",
7868 (value & 0xffe0) >> 5);
7870 other_decode_bitfield_value(a_bigbuf, value, 0x001f, 16);
7871 proto_tree_add_text(tree,
7872 tvb, curr_offset, 2,
7873 "%s : Timeslot: %u",
7879 NO_MORE_DATA_CHECK(len);
7881 proto_tree_add_text(tree,
7882 tvb, curr_offset, len - (curr_offset - offset),
7885 curr_offset += len - (curr_offset - offset);
7887 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7889 return(curr_offset - offset);
7896 elem_paca_ts(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
7898 guint32 curr_offset;
7900 curr_offset = offset;
7902 proto_tree_add_text(tree, tvb, curr_offset, len, "PACA Queuing Time");
7906 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7908 return(curr_offset - offset);
7915 elem_paca_order(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7918 guint32 curr_offset;
7921 curr_offset = offset;
7923 oct = tvb_get_guint8(tvb, curr_offset);
7925 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
7926 proto_tree_add_text(tree,
7927 tvb, curr_offset, 1,
7933 case 0: str = "Reserved"; break;
7934 case 1: str = "Update Queue Position and notify MS"; break;
7935 case 2: str = "Remove MS from the queue and release MS"; break;
7936 case 3: str = "Remove MS from the queue"; break;
7937 case 4: str = "MS Requested PACA Cancel"; break;
7938 case 5: str = "BS Requested PACA Cancel"; break;
7944 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
7945 proto_tree_add_text(tree,
7946 tvb, curr_offset, 1,
7947 "%s : PACA Action Required: %s",
7953 g_snprintf(add_string, string_len, " - (%s)", str);
7955 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7957 return(curr_offset - offset);
7964 elem_paca_reoi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
7967 guint32 curr_offset;
7969 curr_offset = offset;
7971 oct = tvb_get_guint8(tvb, curr_offset);
7973 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
7974 proto_tree_add_text(tree,
7975 tvb, curr_offset, 1,
7979 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
7980 proto_tree_add_text(tree,
7981 tvb, curr_offset, 1,
7982 "%s : PACA Reorigination Indicator (PRI)",
7987 g_snprintf(add_string, string_len, " - (%sReorigination)", (oct & 0x01) ? "" : "Not ");
7989 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
7991 return(curr_offset - offset);
7998 elem_a2p_bearer_session(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8001 guint32 curr_offset;
8003 curr_offset = offset;
8005 oct = tvb_get_guint8(tvb, curr_offset);
8007 other_decode_bitfield_value(a_bigbuf, oct, 0xc0, 8);
8008 proto_tree_add_text(tree,
8009 tvb, curr_offset, 1,
8013 other_decode_bitfield_value(a_bigbuf, oct, 0x38, 8);
8014 proto_tree_add_text(tree,
8015 tvb, curr_offset, 1,
8016 "%s : Max Frames: %u",
8020 other_decode_bitfield_value(a_bigbuf, oct, 0x06, 8);
8021 proto_tree_add_text(tree,
8022 tvb, curr_offset, 1,
8023 "%s : Session IP Address Type: Internet Protocol IPv%s",
8025 ((oct & 0x06) >> 1) ? "6" : "4");
8027 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
8028 proto_tree_add_text(tree,
8029 tvb, curr_offset, 1,
8030 "%s : Session Address Flag",
8037 /* session address included */
8039 if ((oct & 0x06) >> 1)
8041 SHORT_DATA_CHECK(len - (curr_offset - offset), 18);
8043 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_ipv6_addr,
8044 tvb, curr_offset, 16, FALSE);
8046 rtp_src_addr.type = AT_IPv6;
8047 rtp_src_addr.len = 16;
8048 rtp_src_addr.data = (guint8 *) &rtp_ipv6_addr;
8050 tvb_get_ipv6(tvb, curr_offset, &rtp_ipv6_addr);
8056 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
8058 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_ipv4_addr,
8059 tvb, curr_offset, 4, FALSE);
8061 rtp_src_addr.type = AT_IPv4;
8062 rtp_src_addr.len = 4;
8063 rtp_src_addr.data = (guint8 *) &rtp_ipv4_addr;
8065 rtp_ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
8070 proto_tree_add_item(tree, hf_ansi_a_a2p_bearer_udp_port,
8071 tvb, curr_offset, 2, FALSE);
8073 rtp_port = tvb_get_ntohs(tvb, curr_offset);
8078 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8080 return(curr_offset - offset);
8087 elem_a2p_bearer_format(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8091 proto_tree *subtree;
8093 guint32 curr_offset, orig_offset;
8094 guint8 ip_addr_type;
8098 const gchar *mime_type;
8099 gboolean format_assigned;
8100 gboolean first_assigned_found;
8101 guint8 rtp_payload_type;
8102 GHashTable *rtp_dyn_payload;
8105 rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free);
8107 first_assigned_found = FALSE;
8109 curr_offset = offset;
8111 oct = tvb_get_guint8(tvb, curr_offset);
8113 other_decode_bitfield_value(a_bigbuf, oct, 0xfc, 8);
8114 proto_tree_add_text(tree,
8115 tvb, curr_offset, 1,
8116 "%s : Number of Bearer Formats: %u",
8120 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8121 proto_tree_add_text(tree,
8122 tvb, curr_offset, 1,
8123 "%s : Session IP Address Type: Internet Protocol IPv%s",
8125 (oct & 0x03) ? "6" : "4");
8127 ip_addr_type = (oct & 0x03);
8133 while ((len - (curr_offset - offset)) > 0)
8135 orig_offset = curr_offset;
8138 proto_tree_add_text(tree,
8139 tvb, curr_offset, -1,
8140 "Bearer Format [%u]",
8143 subtree = proto_item_add_subtree(item, ett_bearer_list);
8145 oct = tvb_get_guint8(tvb, curr_offset);
8147 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8148 "Bearer Format Length: %u",
8153 NO_MORE_DATA_CHECK(len);
8155 oct = tvb_get_guint8(tvb, curr_offset);
8157 other_decode_bitfield_value(a_bigbuf, oct, 0x80, 8);
8158 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8162 ext = (oct & 0x80) ? TRUE : FALSE;
8164 format_assigned = FALSE;
8166 switch ((oct & 0x70) >> 4)
8168 case 0: str = "Unknown"; break;
8169 case 1: str = "In-band signaling"; break;
8172 format_assigned = TRUE;
8174 case 3: str = "Unassigned"; break;
8175 case 4: str = "Transcoded"; break;
8181 other_decode_bitfield_value(a_bigbuf, oct, 0x70, 8);
8182 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8183 "%s : Bearer Format Tag Type: %s",
8189 case 0: mime_type = str = "PCMU"; break;
8190 case 1: mime_type = str = "PCMA"; break;
8192 str = "13K Vocoder";
8193 mime_type = "QCELP";
8195 case 3: mime_type = str = "EVRC"; break;
8196 case 4: mime_type = str = "EVRC0"; break;
8197 case 5: mime_type = str = "SMV"; break;
8198 case 6: mime_type = str = "SMV0"; break;
8199 case 7: mime_type = str = "telephone-event"; break;
8200 case 8: mime_type = str = "EVRCB"; break;
8201 case 9: mime_type = str = "EVRCB0"; break;
8202 case 10: mime_type = str = "EVRCWB"; break;
8203 case 11: mime_type = str = "EVRCWB0"; break;
8205 mime_type = str = "Reserved";
8209 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8210 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8211 "%s : Bearer Format ID: %s",
8215 proto_item_append_text(item, " - (%s)", str);
8219 NO_MORE_DATA_CHECK(len);
8221 oct = tvb_get_guint8(tvb, curr_offset);
8223 rtp_payload_type = (oct & 0xfe) >> 1;
8225 other_decode_bitfield_value(a_bigbuf, oct, 0xfe, 8);
8226 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8227 "%s : RTP Payload Type: %u",
8231 other_decode_bitfield_value(a_bigbuf, oct, 0x01, 8);
8232 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8233 "%s : Bearer Address Flag",
8240 /* bearer address included */
8242 if (ip_addr_type != 0)
8244 SHORT_DATA_CHECK(len - (curr_offset - offset), 18);
8246 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_ipv6_addr,
8247 tvb, curr_offset, 16, FALSE);
8249 if (format_assigned)
8251 rtp_src_addr.type = AT_IPv6;
8252 rtp_src_addr.len = 16;
8253 rtp_src_addr.data = (guint8 *) &rtp_ipv6_addr;
8255 tvb_get_ipv6(tvb, curr_offset, &rtp_ipv6_addr);
8262 SHORT_DATA_CHECK(len - (curr_offset - offset), 6);
8264 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_ipv4_addr,
8265 tvb, curr_offset, 4, FALSE);
8267 if (format_assigned)
8269 rtp_src_addr.type = AT_IPv4;
8270 rtp_src_addr.len = 4;
8271 rtp_src_addr.data = (guint8 *) &rtp_ipv4_addr;
8273 rtp_ipv4_addr = tvb_get_ipv4(tvb, curr_offset);
8279 proto_tree_add_item(subtree, hf_ansi_a_a2p_bearer_udp_port,
8280 tvb, curr_offset, 2, FALSE);
8282 if (format_assigned)
8284 rtp_port = tvb_get_ntohs(tvb, curr_offset);
8292 SHORT_DATA_CHECK(len - (curr_offset - offset), 1);
8294 oct = tvb_get_guint8(tvb, curr_offset);
8296 ext_len = (oct & 0xf0) >> 4;
8298 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8299 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8300 "%s : Extension Length: %u",
8304 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
8305 proto_tree_add_text(subtree, tvb, curr_offset, 1,
8306 "%s : Extension ID: %u",
8314 SHORT_DATA_CHECK(len - (curr_offset - offset), ext_len);
8316 proto_tree_add_text(subtree, tvb, curr_offset, ext_len,
8317 "Extension Parameter value");
8319 curr_offset += ext_len;
8323 proto_item_set_len(item, curr_offset - orig_offset);
8327 (first_assigned_found == FALSE))
8329 key = g_malloc(sizeof(gint));
8330 *key = rtp_payload_type;
8331 g_hash_table_insert(rtp_dyn_payload, key, g_strdup(mime_type));
8333 first_assigned_found = TRUE;
8335 rtp_add_address(g_pinfo, &rtp_src_addr, rtp_port, 0, "IOS5",
8336 g_pinfo->fd->num, rtp_dyn_payload);
8342 if (first_assigned_found == FALSE)
8344 rtp_free_hash_dyn_payload(rtp_dyn_payload);
8347 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8349 return(curr_offset - offset);
8356 elem_ms_des_freq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
8361 guint32 curr_offset;
8364 curr_offset = offset;
8366 oct = tvb_get_guint8(tvb, curr_offset);
8368 temp_int = (oct & 0xf8) >> 3;
8369 if ((temp_int < 0) || (temp_int >= (gint) NUM_BAND_CLASS_STR))
8375 str = band_class_str[temp_int];
8378 other_decode_bitfield_value(a_bigbuf, oct, 0xf8, 8);
8379 proto_tree_add_text(tree,
8380 tvb, curr_offset, 1,
8381 "%s : Band Class: %s",
8385 value = tvb_get_guint8(tvb, curr_offset + 1) | ((oct & 0x07) << 8);
8387 other_decode_bitfield_value(a_bigbuf, oct, 0x07, 8);
8388 proto_tree_add_text(tree, tvb, curr_offset, 1,
8389 "%s : CDMA Channel (MSB): %u",
8395 other_decode_bitfield_value(a_bigbuf, value & 0x00ff, 0xff, 8);
8396 proto_tree_add_text(tree, tvb, curr_offset, 1,
8397 "%s : CDMA Channel (LSB)",
8400 g_snprintf(add_string, string_len, " - (CDMA Channel: %u)", value);
8404 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8406 return(curr_offset - offset);
8413 elem_plcm_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
8416 guint32 curr_offset;
8419 curr_offset = offset;
8421 oct = tvb_get_guint8(tvb, curr_offset);
8424 * from C.S0005-D v1.0 L3 Table 3.7.2.3.2.21-5
8426 switch ((oct & 0xf0) >> 4)
8428 case 0x00: str = "PLCM derived from ESN or MEID"; break;
8429 case 0x01: str = "PLCM specified by the base station"; break;
8430 case 0x02: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_M"; break;
8431 case 0x03: str = "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_T"; break;
8438 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
8439 proto_tree_add_text(tree,
8440 tvb, curr_offset, 1,
8441 "%s : PLCM_TYPE: %s",
8445 other_decode_bitfield_value(a_bigbuf, oct, 0x0c, 8);
8446 proto_tree_add_text(tree,
8447 tvb, curr_offset, 1,
8451 other_decode_bitfield_value(a_bigbuf, oct, 0x03, 8);
8452 proto_tree_add_text(tree, tvb, curr_offset, 1,
8453 "%s : PLCM_42 (MSB)",
8458 proto_tree_add_text(tree, tvb, curr_offset, 5, "PLCM_42");
8462 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
8464 return(curr_offset - offset);
8478 * ORDER MUST BE MAINTAINED
8480 * The value of this enum is used as an index into
8486 ANSI_A_E_ACC_NET_ID, /* Access Network Identifiers */
8487 ANSI_A_E_ADDS_USER_PART, /* ADDS User Part */
8488 ANSI_A_E_AMPS_HHO_PARAM, /* AMPS Hard Handoff Parameters */
8489 ANSI_A_E_ANCH_PDSN_ADDR, /* Anchor PDSN Address */
8490 ANSI_A_E_ANCH_PP_ADDR, /* Anchor P-P Address */
8491 ANSI_A_E_AUTH_CHLG_PARAM, /* Authentication Challenge Parameter */
8492 ANSI_A_E_AUTH_CNF_PARAM, /* Authentication Confirmation Parameter (RANDC) */
8493 ANSI_A_E_AUTH_DATA, /* Authentication Data */
8494 ANSI_A_E_AUTH_EVENT, /* Authentication Event */
8495 ANSI_A_E_AUTH_PARAM_COUNT, /* Authentication Parameter COUNT */
8496 ANSI_A_E_AUTH_RESP_PARAM, /* Authentication Response Parameter */
8497 ANSI_A_E_BAND_CLASS, /* Band Class */
8498 ANSI_A_E_CLD_PARTY_ASCII_NUM, /* Called Party ASCII Number */
8499 ANSI_A_E_CLD_PARTY_BCD_NUM, /* Called Party BCD Number */
8500 ANSI_A_E_CLG_PARTY_ASCII_NUM, /* Calling Party ASCII Number */
8501 ANSI_A_E_CAUSE, /* Cause */
8502 ANSI_A_E_CAUSE_L3, /* Cause Layer 3 */
8503 ANSI_A_E_CDMA_SOWD, /* CDMA Serving One Way Delay */
8504 ANSI_A_E_CELL_ID, /* Cell Identifier */
8505 ANSI_A_E_CELL_ID_LIST, /* Cell Identifier List */
8506 ANSI_A_E_CHAN_NUM, /* Channel Number */
8507 ANSI_A_E_CHAN_TYPE, /* Channel Type */
8508 ANSI_A_E_CCT_GROUP, /* Circuit Group */
8509 ANSI_A_E_CIC, /* Circuit Identity Code */
8510 ANSI_A_E_CIC_EXT, /* Circuit Identity Code Extension */
8511 ANSI_A_E_CM_INFO_TYPE_2, /* Classmark Information Type 2 */
8512 ANSI_A_E_DOWNLINK_RE, /* Downlink Radio Environment */
8513 ANSI_A_E_DOWNLINK_RE_LIST, /* Downlink Radio Environment List */
8514 ANSI_A_E_ENC_INFO, /* Encryption Information */
8515 ANSI_A_E_EXT_HO_DIR_PARAMS, /* Extended Handoff Direction Parameters */
8516 ANSI_A_E_GEO_LOC, /* Geographic Location */
8517 ANSI_A_E_SSCI, /* Special Service Call Indicator */
8518 ANSI_A_E_HO_POW_LEV, /* Handoff Power Level */
8519 ANSI_A_E_HHO_PARAMS, /* Hard Handoff Parameters */
8520 ANSI_A_E_IE_REQD, /* Information Element Requested */
8521 ANSI_A_E_IS2000_CHAN_ID, /* IS-2000 Channel Identity */
8522 ANSI_A_E_IS2000_CHAN_ID_3X, /* IS-2000 Channel Identity 3X */
8523 ANSI_A_E_IS2000_MOB_CAP, /* IS-2000 Mobile Capabilities */
8524 ANSI_A_E_IS2000_NN_SCR, /* IS-2000 Non-Negotiable Service Configuration Record */
8525 ANSI_A_E_IS2000_SCR, /* IS-2000 Service Configuration Record */
8526 ANSI_A_E_IS2000_CAUSE, /* IS-95/IS-2000 Cause Value */
8527 ANSI_A_E_IS2000_RED_RECORD, /* IS-2000 Redirection Record */
8528 ANSI_A_E_IS95_CHAN_ID, /* IS-95 Channel Identity */
8529 ANSI_A_E_IS95_MS_MEAS_CHAN_ID, /* IS-95 MS Measured Channel Identity */
8530 ANSI_A_E_L3_INFO, /* Layer 3 Information */
8531 ANSI_A_E_LAI, /* Location Area Information */
8532 ANSI_A_E_MWI, /* Message Waiting Indication */
8533 ANSI_A_E_MID, /* Mobile Identity */
8534 ANSI_A_E_FWD_MS_INFO_RECS, /* (Forward) MS Information Records */
8535 ANSI_A_E_ORIG_CI, /* Origination Continuation Indicator */
8536 ANSI_A_E_PACA_ORDER, /* PACA Order */
8537 ANSI_A_E_PACA_REOI, /* PACA Reorigination Indicator */
8538 ANSI_A_E_PACA_TS, /* PACA Timestamp */
8539 ANSI_A_E_PSP, /* Packet Session Parameters */
8540 ANSI_A_E_PDSN_IP_ADDR, /* PDSN IP Address */
8541 ANSI_A_E_PDI, /* Power Down Indicator */
8542 ANSI_A_E_PRIO, /* Priority */
8543 ANSI_A_E_P_REV, /* Protocol Revision */
8544 ANSI_A_E_PTYPE, /* Protocol Type */
8545 ANSI_A_E_PSMM_COUNT, /* PSMM Count */
8546 ANSI_A_E_QOS_PARAMS, /* Quality of Service Parameters */
8547 ANSI_A_E_RE_RES, /* Radio Environment and Resources */
8548 ANSI_A_E_REG_TYPE, /* Registration Type */
8549 ANSI_A_E_REJ_CAUSE, /* Reject Cause */
8550 ANSI_A_E_RESP_REQ, /* Response Request */
8551 ANSI_A_E_RETURN_CAUSE, /* Return Cause */
8552 ANSI_A_E_RF_CHAN_ID, /* RF Channel Identity */
8553 ANSI_A_E_SO, /* Service Option */
8554 ANSI_A_E_SOCI, /* Service Option Connection Identifier (SOCI) */
8555 ANSI_A_E_SO_LIST, /* Service Option List */
8556 ANSI_A_E_S_RED_INFO, /* Service Redirection Info */
8557 ANSI_A_E_SR_ID, /* Service Reference Identifier (SR_ID) */
8558 ANSI_A_E_SID, /* SID */
8559 ANSI_A_E_SIGNAL, /* Signal */
8560 ANSI_A_E_SCI, /* Slot Cycle Index */
8561 ANSI_A_E_SW_VER, /* Software Version */
8562 ANSI_A_E_SRNC_TRNC_TC, /* Source RNC to Target RNC Transparent Container */
8563 ANSI_A_E_S_PDSN_ADDR, /* Source PDSN Address */
8564 ANSI_A_E_TAG, /* Tag */
8565 ANSI_A_E_TRNC_SRNC_TC, /* Target RNC to Source RNC Transparent Container */
8566 ANSI_A_E_XMODE, /* Transcoder Mode */
8567 ANSI_A_E_UZ_ID, /* User Zone ID */
8568 ANSI_A_E_VP_REQ, /* Voice Privacy Request */
8569 ANSI_A_E_A2P_BEARER_SESSION, /* A2p Bearer Session-Level Parameters */
8570 ANSI_A_E_A2P_BEARER_FORMAT, /* A2p Bearer Format-Specific Parameters */
8571 ANSI_A_E_MS_DES_FREQ, /* MS Designated Frequency */
8572 ANSI_A_E_MOB_SUB_INFO, /* Mobile Subscription Information */
8573 ANSI_A_E_PLCM_ID, /* Public Long Code Mask Identifier */
8574 ANSI_A_E_REV_MS_INFO_RECS, /* (Reverse) MS Information Records */
8575 ANSI_A_E_NONE /* NONE */
8579 #define MAX_IOS401_NUM_ELEM_1 (sizeof(ansi_a_ios401_elem_1_strings)/sizeof(ext_value_string_t))
8580 #define MAX_IOS501_NUM_ELEM_1 (sizeof(ansi_a_ios501_elem_1_strings)/sizeof(ext_value_string_t))
8581 static gint ett_ansi_elem_1[MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)];
8582 static guint8 (*elem_1_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) =
8584 elem_acc_net_id, /* Access Network Identifiers */
8585 elem_adds_user_part, /* ADDS User Part */
8586 elem_amps_hho_param, /* AMPS Hard Handoff Parameters */
8587 elem_anchor_pdsn_addr, /* Anchor PDSN Address */
8588 elem_anchor_pp_addr, /* Anchor P-P Address */
8589 elem_auth_chlg_param, /* Authentication Challenge Parameter */
8590 NULL /* no decode required */, /* Authentication Confirmation Parameter (RANDC) */
8591 NULL /* no decode required */, /* Authentication Data */
8592 elem_auth_event, /* Authentication Event */
8593 elem_auth_param_count, /* Authentication Parameter COUNT */
8594 elem_auth_resp_param, /* Authentication Response Parameter */
8595 elem_band_class, /* Band Class */
8596 elem_cld_party_ascii_num, /* Called Party ASCII Number */
8597 elem_cld_party_bcd_num, /* Called Party BCD Number */
8598 elem_clg_party_ascii_num, /* Calling Party ASCII Number */
8599 elem_cause, /* Cause */
8600 elem_cause_l3, /* Cause Layer 3 */
8601 elem_cdma_sowd, /* CDMA Serving One Way Delay */
8602 elem_cell_id, /* Cell Identifier */
8603 elem_cell_id_list, /* Cell Identifier List */
8604 elem_chan_num, /* Channel Number */
8605 elem_chan_type, /* Channel Type */
8606 elem_cct_group, /* Circuit Group */
8607 elem_cic, /* Circuit Identity Code */
8608 elem_cic_ext, /* Circuit Identity Code Extension */
8609 elem_cm_info_type_2, /* Classmark Information Type 2 */
8610 elem_downlink_re, /* Downlink Radio Environment */
8611 elem_downlink_re_list, /* Downlink Radio Environment List */
8612 elem_enc_info, /* Encryption Information */
8613 elem_ext_ho_dir_params, /* Extended Handoff Direction Parameters */
8614 elem_geo_loc, /* Geographic Location */
8615 elem_ssci, /* Special Service Call Indicator */
8616 elem_ho_pow_lev, /* Handoff Power Level */
8617 elem_hho_params, /* Hard Handoff Parameters */
8618 elem_info_rec_req, /* Information Element Requested */
8619 elem_is2000_chan_id, /* IS-2000 Channel Identity */
8620 NULL, /* IS-2000 Channel Identity 3X */
8621 elem_is2000_mob_cap, /* IS-2000 Mobile Capabilities */
8622 elem_is2000_nn_scr, /* IS-2000 Non-Negotiable Service Configuration Record */
8623 elem_is2000_scr, /* IS-2000 Service Configuration Record */
8624 elem_is2000_cause, /* IS-95/IS-2000 Cause Value */
8625 NULL, /* IS-2000 Redirection Record */
8626 elem_is95_chan_id, /* IS-95 Channel Identity */
8627 elem_is95_ms_meas_chan_id, /* IS-95 MS Measured Channel Identity */
8628 elem_l3_info, /* Layer 3 Information */
8629 elem_lai, /* Location Area Information */
8630 elem_mwi, /* Message Waiting Indication */
8631 elem_mid, /* Mobile Identity */
8632 elem_fwd_ms_info_recs, /* (Forward) MS Information Records */
8633 NULL /* no associated data */, /* Origination Continuation Indicator */
8634 elem_paca_order, /* PACA Order */
8635 elem_paca_reoi, /* PACA Reorigination Indicator */
8636 elem_paca_ts, /* PACA Timestamp */
8637 NULL, /* Packet Session Parameters */
8638 elem_pdsn_ip_addr, /* PDSN IP Address */
8639 NULL /* no associated data */, /* Power Down Indicator */
8640 elem_prio, /* Priority */
8641 elem_p_rev, /* Protocol Revision */
8642 elem_ptype, /* Protocol Type */
8643 elem_psmm_count, /* PSMM Count */
8644 elem_qos_params, /* Quality of Service Parameters */
8645 elem_re_res, /* Radio Environment and Resources */
8646 elem_reg_type, /* Registration Type */
8647 elem_rej_cause, /* Reject Cause */
8648 NULL /* no associated data */, /* Response Request */
8649 elem_return_cause, /* Return Cause */
8650 elem_rf_chan_id, /* RF Channel Identity */
8651 elem_so, /* Service Option */
8652 elem_soci, /* Service Option Connection Identifier (SOCI) */
8653 elem_so_list, /* Service Option List */
8654 NULL, /* Service Redirection Info */
8655 elem_sr_id, /* Service Reference Identifier (SR_ID) */
8657 elem_signal, /* Signal */
8658 elem_sci, /* Slot Cycle Index */
8659 elem_sw_ver, /* Software Version */
8660 NULL /* transparent */, /* Source RNC to Target RNC Transparent Container */
8661 elem_s_pdsn_ip_addr, /* Source PDSN Address */
8663 NULL /* transparent */, /* Target RNC to Source RNC Transparent Container */
8664 elem_xmode, /* Transcoder Mode */
8665 elem_uz_id, /* User Zone ID */
8666 NULL /* no associated data */, /* Voice Privacy Request */
8667 elem_a2p_bearer_session, /* A2p Bearer Session-Level Parameters */
8668 elem_a2p_bearer_format, /* A2p Bearer Format-Specific Parameters */
8669 elem_ms_des_freq, /* MS Designated Frequency */
8670 NULL, /* Mobile Subscription Information */
8671 elem_plcm_id, /* Public Long Code Mask Identification */
8672 elem_rev_ms_info_recs, /* (Reverse) MS Information Records */
8676 /* MESSAGE FUNCTIONS */
8679 * Type Length Value (TLV) element dissector
8682 elem_tlv(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, guint len, const gchar *name_add)
8684 guint8 oct, parm_len;
8686 guint32 curr_offset;
8687 proto_tree *subtree;
8692 curr_offset = offset;
8695 if ((unsigned)idx > ANSI_A_E_NONE)
8697 /* Unknown index, skip the element */
8698 return tvb_length_remaining(tvb, offset) ;
8701 oct = tvb_get_guint8(tvb, curr_offset);
8703 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8705 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8707 parm_len = tvb_get_guint8(tvb, curr_offset + 1);
8710 proto_tree_add_text(tree,
8711 tvb, curr_offset, parm_len + 2,
8713 ansi_a_elem_1_strings[idx].strptr,
8714 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8716 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8718 proto_tree_add_uint_format(subtree, hf_ansi_a_elem_id, tvb,
8719 curr_offset, 1, oct,
8722 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
8723 curr_offset + 1, 1, parm_len);
8727 if (elem_1_fcn[dec_idx] == NULL)
8729 proto_tree_add_text(subtree,
8730 tvb, curr_offset + 2, parm_len,
8733 consumed = parm_len;
8737 gchar *a_add_string;
8739 a_add_string=ep_alloc(1024);
8740 a_add_string[0] = '\0';
8742 (*elem_1_fcn[dec_idx])(tvb, subtree, curr_offset + 2,
8743 parm_len, a_add_string, 1024);
8745 if (a_add_string[0] != '\0')
8747 proto_item_append_text(item, "%s", a_add_string);
8759 * Type Value (TV) element dissector
8761 * Length cannot be used in these functions, big problem if a element dissector
8762 * is not defined for these.
8765 elem_tv(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, const gchar *name_add)
8769 guint32 curr_offset;
8770 proto_tree *subtree;
8775 curr_offset = offset;
8778 if ((unsigned)idx > ANSI_A_E_NONE)
8780 /* Unknown index, skip the element */
8781 return tvb_length_remaining(tvb, offset) ;
8784 oct = tvb_get_guint8(tvb, curr_offset);
8786 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8788 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8791 proto_tree_add_text(tree,
8792 tvb, curr_offset, -1,
8794 ansi_a_elem_1_strings[idx].strptr,
8795 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8797 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8799 proto_tree_add_uint_format(subtree, hf_ansi_a_elem_id, tvb,
8800 curr_offset, 1, oct,
8803 if (elem_1_fcn[dec_idx] == NULL)
8805 /* BAD THING, CANNOT DETERMINE LENGTH */
8807 proto_tree_add_text(subtree,
8808 tvb, curr_offset + 1, 1,
8809 "No element dissector, rest of dissection may be incorrect");
8815 gchar *a_add_string;
8817 a_add_string=ep_alloc(1024);
8818 a_add_string[0] = '\0';
8819 consumed = (*elem_1_fcn[dec_idx])(tvb, subtree, curr_offset + 1, -1, a_add_string, 1024);
8821 if (a_add_string[0] != '\0')
8823 proto_item_append_text(item, "%s", a_add_string);
8829 proto_item_set_len(item, consumed);
8836 * Type (T) element dissector
8838 * Length cannot be used in these functions, big problem if a element dissector
8839 * is not defined for these.
8842 elem_t(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, const gchar *name_add)
8845 guint32 curr_offset;
8849 curr_offset = offset;
8852 if ((unsigned)idx > ANSI_A_E_NONE)
8854 /* Unknown index, skip the element */
8855 return tvb_length_remaining(tvb, offset) ;
8858 oct = tvb_get_guint8(tvb, curr_offset);
8860 if (oct == (guint8) ansi_a_elem_1_strings[idx].value)
8862 proto_tree_add_uint_format(tree, hf_ansi_a_elem_id, tvb, curr_offset, 1, oct,
8864 ansi_a_elem_1_strings[idx].strptr,
8865 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8874 * Length Value (LV) element dissector
8877 elem_lv(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset, guint len _U_, const gchar *name_add)
8881 guint32 curr_offset;
8882 proto_tree *subtree;
8887 curr_offset = offset;
8890 if ((unsigned)idx > ANSI_A_E_NONE)
8892 /* Unknown index, skip the element */
8893 return tvb_length_remaining(tvb, offset) ;
8896 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8898 parm_len = tvb_get_guint8(tvb, curr_offset);
8901 proto_tree_add_text(tree,
8902 tvb, curr_offset, parm_len + 1,
8904 ansi_a_elem_1_strings[idx].strptr,
8905 (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
8907 subtree = proto_item_add_subtree(item, ett_ansi_elem_1[idx]);
8909 proto_tree_add_uint(subtree, hf_ansi_a_length, tvb,
8910 curr_offset, 1, parm_len);
8914 if (elem_1_fcn[dec_idx] == NULL)
8916 proto_tree_add_text(subtree,
8917 tvb, curr_offset + 1, parm_len,
8920 consumed = parm_len;
8924 gchar *a_add_string;
8926 a_add_string=ep_alloc(1024);
8927 a_add_string[0] = '\0';
8929 (*elem_1_fcn[dec_idx])(tvb, subtree, curr_offset + 1,
8930 parm_len, a_add_string, 1024);
8932 if (a_add_string[0] != '\0')
8934 proto_item_append_text(item, "%s", a_add_string);
8939 return(consumed + 1);
8943 * Value (V) element dissector
8945 * Length cannot be used in these functions, big problem if a element dissector
8946 * is not defined for these.
8949 elem_v(tvbuff_t *tvb, proto_tree *tree, elem_idx_t idx, guint32 offset)
8952 guint32 curr_offset;
8955 curr_offset = offset;
8958 if ((unsigned)idx > ANSI_A_E_NONE)
8960 /* Unknown index, skip the element */
8961 return tvb_length_remaining(tvb, offset) ;
8964 dec_idx = ansi_a_elem_1_strings[idx].dec_index;
8966 if (elem_1_fcn[dec_idx] == NULL)
8968 /* BAD THING, CANNOT DETERMINE LENGTH */
8970 proto_tree_add_text(tree,
8971 tvb, curr_offset, 1,
8972 "No element dissector, rest of dissection may be incorrect");
8978 gchar *a_add_string;
8980 a_add_string=ep_alloc(1024);
8981 a_add_string[0] = '\0';
8982 consumed = (*elem_1_fcn[dec_idx])(tvb, tree, curr_offset, -1, a_add_string, 1024);
8989 #define ELEM_MAND_TLV(elem_idx, elem_name_addition) \
8991 if ((consumed = elem_tlv(tvb, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
8993 curr_offset += consumed; \
8994 curr_len -= consumed; \
8998 proto_tree_add_text(tree, \
8999 tvb, curr_offset, 0, \
9000 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9001 ansi_a_elem_1_strings[elem_idx].value, \
9002 ansi_a_elem_1_strings[elem_idx].strptr, \
9003 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9006 if (curr_len <= 0) return; \
9009 #define ELEM_OPT_TLV(elem_idx, elem_name_addition) \
9011 if ((consumed = elem_tlv(tvb, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9013 curr_offset += consumed; \
9014 curr_len -= consumed; \
9016 if (curr_len <= 0) return; \
9019 #define ELEM_MAND_TV(elem_idx, elem_name_addition) \
9021 if ((consumed = elem_tv(tvb, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9023 curr_offset += consumed; \
9024 curr_len -= consumed; \
9028 proto_tree_add_text(tree, \
9029 tvb, curr_offset, 0, \
9030 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9031 ansi_a_elem_1_strings[elem_idx].value, \
9032 ansi_a_elem_1_strings[elem_idx].strptr, \
9033 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9036 if (curr_len <= 0) return; \
9039 #define ELEM_OPT_TV(elem_idx, elem_name_addition) \
9041 if ((consumed = elem_tv(tvb, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9043 curr_offset += consumed; \
9044 curr_len -= consumed; \
9046 if (curr_len <= 0) return; \
9049 #define ELEM_OPT_T(elem_idx, elem_name_addition) \
9051 if ((consumed = elem_t(tvb, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9053 curr_offset += consumed; \
9054 curr_len -= consumed; \
9056 if (curr_len <= 0) return; \
9059 #define ELEM_MAND_LV(elem_idx, elem_name_addition) \
9061 if ((consumed = elem_lv(tvb, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9063 curr_offset += consumed; \
9064 curr_len -= consumed; \
9068 /* Mandatory, but nothing we can do */ \
9070 if (curr_len <= 0) return; \
9073 #define ELEM_MAND_V(elem_idx) \
9075 if ((consumed = elem_v(tvb, tree, elem_idx, curr_offset)) > 0) \
9077 curr_offset += consumed; \
9078 curr_len -= consumed; \
9082 /* Mandatory, but nothing we can do */ \
9084 if (curr_len <= 0) return; \
9092 bsmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9095 guint32 curr_offset;
9098 curr_offset = offset;
9101 ELEM_MAND_TLV(ANSI_A_E_CELL_ID, "");
9103 ELEM_MAND_TLV(ANSI_A_E_L3_INFO, "");
9105 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9112 dtap_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9114 guint32 curr_offset;
9118 proto_tree *subtree;
9122 curr_offset = offset;
9126 * special dissection for CM Service Type
9128 oct = tvb_get_guint8(tvb, curr_offset);
9132 case 0x01: str = "Mobile Originating Call"; break;
9139 proto_tree_add_text(tree,
9140 tvb, curr_offset, 1,
9141 "CM Service Type: %s",
9144 subtree = proto_item_add_subtree(item, ett_cm_srvc_type);
9146 other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
9147 proto_tree_add_text(subtree,
9148 tvb, curr_offset, 1,
9152 other_decode_bitfield_value(a_bigbuf, oct, 0x0f, 8);
9153 proto_tree_add_text(subtree,
9154 tvb, curr_offset, 1,
9155 "%s : Service Type: (%u) %s",
9163 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2, "");
9165 ELEM_MAND_LV(ANSI_A_E_MID, "");
9167 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9169 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9171 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9173 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9175 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9177 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9179 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9181 ELEM_OPT_TV(ANSI_A_E_SO, "");
9183 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9185 ELEM_OPT_TV(ANSI_A_E_RE_RES, "");
9187 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9189 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9191 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9193 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA, "");
9195 ELEM_OPT_TLV(ANSI_A_E_PACA_REOI, "");
9197 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
9199 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9201 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
9203 switch (global_a_variant)
9205 case A_VARIANT_IOS501:
9206 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9208 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9210 ELEM_OPT_T(ANSI_A_E_ORIG_CI, "");
9212 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE, "");
9214 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9216 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9218 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9220 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9224 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9231 dtap_cm_srvc_req_cont(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9233 guint32 curr_offset;
9237 curr_offset = offset;
9240 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9242 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9244 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
9246 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9253 bsmap_page_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9255 guint32 curr_offset;
9259 curr_offset = offset;
9262 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9264 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9266 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
9268 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9270 ELEM_OPT_TV(ANSI_A_E_SO, "");
9272 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9274 switch (global_a_variant)
9276 case A_VARIANT_IOS501:
9277 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9279 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9281 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9283 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9285 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9289 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9296 dtap_page_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9298 guint32 curr_offset;
9302 curr_offset = offset;
9305 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2, "");
9307 ELEM_MAND_LV(ANSI_A_E_MID, "");
9309 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9311 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9313 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9315 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9317 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9319 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9321 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9323 ELEM_OPT_TV(ANSI_A_E_SO, "");
9325 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9327 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9329 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9331 ELEM_OPT_TV(ANSI_A_E_RE_RES, "");
9333 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
9335 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9337 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
9339 switch (global_a_variant)
9341 case A_VARIANT_IOS501:
9342 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9344 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9346 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9348 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9352 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9359 dtap_progress(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9361 guint32 curr_offset;
9365 curr_offset = offset;
9368 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9370 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9372 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9374 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9381 dtap_srvc_redirection(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9383 guint32 curr_offset;
9387 curr_offset = offset;
9390 ELEM_MAND_TLV(ANSI_A_E_IS2000_RED_RECORD, "");
9392 ELEM_MAND_TLV(ANSI_A_E_S_RED_INFO, "");
9394 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9396 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9398 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9400 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9402 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9409 dtap_srvc_release(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9411 guint32 curr_offset;
9415 curr_offset = offset;
9418 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9420 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9422 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
9424 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9431 dtap_srvc_release_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9433 guint32 curr_offset;
9437 curr_offset = offset;
9440 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9442 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9449 bsmap_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9452 guint32 curr_offset;
9455 curr_offset = offset;
9458 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE, "");
9460 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9462 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
9464 ELEM_OPT_TV(ANSI_A_E_SO, "");
9466 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9468 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9470 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9472 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9474 ELEM_OPT_TLV(ANSI_A_E_PACA_TS, "");
9476 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
9478 switch (global_a_variant)
9480 case A_VARIANT_IOS501:
9481 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9483 ELEM_OPT_TLV(ANSI_A_E_SR_ID, "");
9485 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9487 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9489 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9491 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9495 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9502 bsmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9505 guint32 curr_offset;
9508 curr_offset = offset;
9511 ELEM_MAND_TV(ANSI_A_E_CHAN_NUM, "");
9513 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
9515 ELEM_OPT_TV(ANSI_A_E_SO, "");
9517 switch (global_a_variant)
9519 case A_VARIANT_IOS501:
9520 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9522 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9524 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9526 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9530 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9537 bsmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9540 guint32 curr_offset;
9543 curr_offset = offset;
9546 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
9548 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9550 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9557 bsmap_clr_req(tvbuff_t *tvb, 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_CAUSE_L3, "");
9570 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9577 bsmap_clr_command(tvbuff_t *tvb, 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_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9600 guint32 curr_offset;
9603 curr_offset = offset;
9606 ELEM_OPT_T(ANSI_A_E_PDI, "");
9608 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9610 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9617 dtap_alert_with_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9619 guint32 curr_offset;
9623 curr_offset = offset;
9626 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9628 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9630 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9637 bsmap_bs_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9639 guint32 curr_offset;
9643 curr_offset = offset;
9646 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9648 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9650 ELEM_OPT_TV(ANSI_A_E_SO, "");
9652 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9654 ELEM_OPT_TLV(ANSI_A_E_ADDS_USER_PART, "");
9656 ELEM_OPT_TLV(ANSI_A_E_SR_ID, "");
9658 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9660 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9667 bsmap_bs_srvc_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9669 guint32 curr_offset;
9673 curr_offset = offset;
9676 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9678 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9680 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9682 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9684 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9686 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9693 bsmap_add_srvc_noti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9695 guint32 curr_offset;
9699 curr_offset = offset;
9702 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9704 ELEM_MAND_TV(ANSI_A_E_SO, "");
9706 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9708 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9715 dtap_add_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9717 guint32 curr_offset;
9721 curr_offset = offset;
9724 ELEM_MAND_TLV(ANSI_A_E_SOCI, "");
9726 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9728 ELEM_MAND_TV(ANSI_A_E_SO, "");
9730 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
9732 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM, "");
9734 ELEM_OPT_TV(ANSI_A_E_CIC, "");
9736 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9738 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
9740 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
9742 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9749 dtap_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9751 guint32 curr_offset;
9755 curr_offset = offset;
9758 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9760 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9767 dtap_flash_with_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9769 guint32 curr_offset;
9773 curr_offset = offset;
9776 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM, "");
9778 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9780 ELEM_OPT_TV(ANSI_A_E_MWI, "");
9782 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9784 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9786 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9788 ELEM_OPT_TLV(ANSI_A_E_SSCI, "");
9790 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9792 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9799 dtap_flash_with_info_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9801 guint32 curr_offset;
9805 curr_offset = offset;
9808 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9810 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
9812 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9819 bsmap_feat_noti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9821 guint32 curr_offset;
9825 curr_offset = offset;
9828 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9830 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9832 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
9834 ELEM_OPT_TV(ANSI_A_E_SCI, "");
9836 ELEM_OPT_TV(ANSI_A_E_SIGNAL, "");
9838 ELEM_OPT_TV(ANSI_A_E_MWI, "");
9840 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM, "");
9842 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS, "");
9844 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
9846 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
9848 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9850 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
9852 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9859 bsmap_feat_noti_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9861 guint32 curr_offset;
9865 curr_offset = offset;
9868 ELEM_MAND_TLV(ANSI_A_E_MID, "");
9870 ELEM_OPT_TV(ANSI_A_E_TAG, "");
9872 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9879 bsmap_paca_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9881 guint32 curr_offset;
9885 curr_offset = offset;
9888 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9890 ELEM_OPT_TLV(ANSI_A_E_PACA_TS, "");
9892 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9899 bsmap_paca_command_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9901 guint32 curr_offset;
9905 curr_offset = offset;
9908 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9910 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9917 bsmap_paca_update(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9919 guint32 curr_offset;
9923 curr_offset = offset;
9926 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9928 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9930 ELEM_OPT_TLV(ANSI_A_E_PACA_ORDER, "");
9932 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9934 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
9936 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
9938 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
9940 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
9942 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
9944 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9946 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
9948 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9955 bsmap_paca_update_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9957 guint32 curr_offset;
9961 curr_offset = offset;
9964 ELEM_OPT_TLV(ANSI_A_E_MID, "");
9966 ELEM_OPT_TLV(ANSI_A_E_PRIO, "");
9968 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
9970 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9977 bsmap_rm_pos_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9979 guint32 curr_offset;
9983 curr_offset = offset;
9986 ELEM_MAND_TLV(ANSI_A_E_PSMM_COUNT, "");
9988 EXTRANEOUS_DATA_CHECK(curr_len, 0);
9995 bsmap_rm_pos_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
9997 guint32 curr_offset;
10001 curr_offset = offset;
10004 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10006 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10008 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE_LIST, "");
10010 ELEM_OPT_TLV(ANSI_A_E_GEO_LOC, "");
10012 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10019 bsmap_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10021 guint32 curr_offset;
10025 curr_offset = offset;
10028 ELEM_MAND_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10030 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10032 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10034 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10036 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10038 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10040 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10042 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10044 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10046 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10050 dtap_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10052 guint32 curr_offset;
10056 curr_offset = offset;
10059 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10061 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10063 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10070 bsmap_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10072 guint32 curr_offset;
10076 curr_offset = offset;
10079 ELEM_MAND_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
10081 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10083 ELEM_MAND_TV(ANSI_A_E_TAG, "");
10085 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10087 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10089 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10097 bsmap_bearer_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10099 guint32 curr_offset;
10103 curr_offset = offset;
10106 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10108 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10110 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10118 bsmap_bearer_upd_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10120 guint32 curr_offset;
10124 curr_offset = offset;
10127 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10129 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10131 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10133 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10141 bsmap_bearer_upd_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10143 guint32 curr_offset;
10147 curr_offset = offset;
10150 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10152 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10154 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10156 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10160 dtap_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10162 guint32 curr_offset;
10166 curr_offset = offset;
10169 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM, "");
10171 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10178 bsmap_user_zone_update(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10180 guint32 curr_offset;
10184 curr_offset = offset;
10187 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10189 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10196 dtap_user_zone_update_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10198 guint32 curr_offset;
10202 curr_offset = offset;
10205 ELEM_MAND_TLV(ANSI_A_E_UZ_ID, "");
10207 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10214 dtap_user_zone_update(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10216 guint32 curr_offset;
10220 curr_offset = offset;
10223 ELEM_MAND_TLV(ANSI_A_E_UZ_ID, "");
10225 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10232 bsmap_user_zone_reject(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10234 guint32 curr_offset;
10238 curr_offset = offset;
10241 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10243 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10245 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10247 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10249 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10251 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10253 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10255 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10257 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10264 dtap_user_zone_reject(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10266 guint32 curr_offset;
10270 curr_offset = offset;
10273 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10275 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10282 bsmap_reg_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10284 guint32 curr_offset;
10288 curr_offset = offset;
10291 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10293 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10295 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10297 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10299 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10301 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10303 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10305 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10312 bsmap_ms_reg_noti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10314 guint32 curr_offset;
10318 curr_offset = offset;
10321 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10323 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10330 bsmap_bs_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10332 guint32 curr_offset;
10336 curr_offset = offset;
10339 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10341 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10348 bsmap_bs_auth_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10350 guint32 curr_offset;
10354 curr_offset = offset;
10357 ELEM_MAND_TLV(ANSI_A_E_MID, "");
10359 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10366 dtap_ssd_update_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10368 guint32 curr_offset;
10372 curr_offset = offset;
10375 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10377 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10384 dtap_bs_challenge(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10386 guint32 curr_offset;
10390 curr_offset = offset;
10393 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10395 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10402 dtap_bs_challenge_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10404 guint32 curr_offset;
10408 curr_offset = offset;
10411 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM, "");
10413 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10420 dtap_ssd_update_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10422 guint32 curr_offset;
10426 curr_offset = offset;
10429 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3, "");
10431 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10438 dtap_lu_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10440 guint32 curr_offset;
10444 curr_offset = offset;
10447 ELEM_MAND_LV(ANSI_A_E_MID, "");
10449 ELEM_OPT_TV(ANSI_A_E_LAI, "");
10451 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10453 ELEM_OPT_TV(ANSI_A_E_REG_TYPE, "");
10455 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10457 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10459 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
10461 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
10463 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
10465 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
10467 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
10469 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
10471 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10473 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE, "");
10475 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10477 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10479 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10481 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10488 dtap_lu_accept(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10490 guint32 curr_offset;
10494 curr_offset = offset;
10497 switch (global_a_variant)
10499 case A_VARIANT_IOS401:
10500 ELEM_OPT_TV(ANSI_A_E_LAI, "");
10503 case A_VARIANT_IOS501:
10504 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10506 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10508 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10512 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10519 dtap_lu_reject(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10521 guint32 curr_offset;
10525 curr_offset = offset;
10528 ELEM_MAND_V(ANSI_A_E_REJ_CAUSE);
10530 switch (global_a_variant)
10532 case A_VARIANT_IOS501:
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 bsmap_priv_mode_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10548 guint32 curr_offset;
10552 curr_offset = offset;
10555 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO, "");
10557 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10564 bsmap_priv_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10566 guint32 curr_offset;
10570 curr_offset = offset;
10573 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
10575 ELEM_OPT_T(ANSI_A_E_VP_REQ, "");
10577 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10584 bsmap_status_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10586 guint32 curr_offset;
10590 curr_offset = offset;
10593 ELEM_MAND_TLV(ANSI_A_E_IE_REQD, "");
10595 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10597 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10599 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10601 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10603 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10605 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
10607 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
10609 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10611 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10613 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10615 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10622 dtap_status_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10624 guint32 curr_offset;
10628 curr_offset = offset;
10631 ELEM_MAND_LV(ANSI_A_E_IE_REQD, "");
10633 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10641 bsmap_status_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10643 guint32 curr_offset;
10647 curr_offset = offset;
10650 ELEM_MAND_TLV(ANSI_A_E_REV_MS_INFO_RECS, "");
10652 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10654 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10656 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10658 ELEM_OPT_TV(ANSI_A_E_TAG, "");
10660 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10667 dtap_status_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10669 guint32 curr_offset;
10673 curr_offset = offset;
10676 ELEM_MAND_LV(ANSI_A_E_REV_MS_INFO_RECS, "");
10678 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10685 bsmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10687 guint32 curr_offset;
10691 curr_offset = offset;
10694 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10696 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST, " (Target)");
10698 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10700 ELEM_OPT_T(ANSI_A_E_RESP_REQ, "");
10702 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO, "");
10704 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10706 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10708 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE, "");
10710 ELEM_OPT_TV(ANSI_A_E_SO, "");
10712 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10714 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID, "");
10716 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10718 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
10720 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10722 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10724 switch (global_a_variant)
10726 case A_VARIANT_IOS401:
10727 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
10730 case A_VARIANT_IOS501:
10731 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
10735 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
10737 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
10739 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10741 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID, "");
10743 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10745 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10747 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10749 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR, "");
10751 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR, "");
10753 ELEM_OPT_TLV(ANSI_A_E_PSP, "");
10755 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10757 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10759 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10761 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10768 bsmap_ho_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10770 guint32 curr_offset;
10774 curr_offset = offset;
10777 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE, "");
10779 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO, "");
10781 ELEM_MAND_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
10783 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST, "(Target)");
10785 ELEM_OPT_TLV(ANSI_A_E_CIC_EXT, "");
10787 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10789 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10791 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10793 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE, "");
10795 ELEM_OPT_TV(ANSI_A_E_SO, "");
10797 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
10799 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID, "");
10801 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10803 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
10805 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
10807 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10809 switch (global_a_variant)
10811 case A_VARIANT_IOS401:
10812 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
10815 case A_VARIANT_IOS501:
10816 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
10820 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
10822 switch (global_a_variant)
10824 case A_VARIANT_IOS501:
10825 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
10827 ELEM_OPT_TV(ANSI_A_E_SCI, "");
10829 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID, "");
10831 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10833 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10835 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10837 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR, "");
10839 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR, "");
10841 ELEM_OPT_TLV(ANSI_A_E_PSP, "");
10843 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10845 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10847 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10849 ELEM_OPT_TLV(ANSI_A_E_MID, "");
10851 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
10855 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10862 bsmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10864 guint32 curr_offset;
10868 curr_offset = offset;
10871 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10873 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10875 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
10877 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS, "");
10879 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10881 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10883 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10885 switch (global_a_variant)
10887 case A_VARIANT_IOS501:
10888 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
10890 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10892 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10894 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10896 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10898 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION, "");
10900 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT, "");
10904 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10911 bsmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10913 guint32 curr_offset;
10917 curr_offset = offset;
10920 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
10922 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10929 bsmap_ho_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10931 guint32 curr_offset;
10935 curr_offset = offset;
10938 ELEM_OPT_TV(ANSI_A_E_RF_CHAN_ID, "");
10940 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
10942 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
10944 ELEM_OPT_TLV(ANSI_A_E_HO_POW_LEV, "");
10946 ELEM_OPT_TV(ANSI_A_E_SID, "");
10948 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
10950 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS, "");
10952 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
10954 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
10956 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
10958 switch (global_a_variant)
10960 case A_VARIANT_IOS501:
10961 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
10963 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
10965 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
10967 ELEM_OPT_TLV(ANSI_A_E_AMPS_HHO_PARAM, "");
10969 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
10971 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID, "");
10975 EXTRANEOUS_DATA_CHECK(curr_len, 0);
10982 bsmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
10984 guint32 curr_offset;
10988 curr_offset = offset;
10991 ELEM_OPT_TV(ANSI_A_E_SO, "");
10993 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11000 bsmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11002 guint32 curr_offset;
11006 curr_offset = offset;
11009 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11011 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11018 bsmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11020 guint32 curr_offset;
11024 curr_offset = offset;
11027 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11029 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
11031 ELEM_OPT_TV(ANSI_A_E_CHAN_NUM, "");
11033 ELEM_OPT_TLV(ANSI_A_E_BAND_CLASS, "");
11035 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11037 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11044 bsmap_block(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11046 guint32 curr_offset;
11050 curr_offset = offset;
11053 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11055 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11057 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11059 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11066 bsmap_block_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11068 guint32 curr_offset;
11072 curr_offset = offset;
11075 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11077 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11084 bsmap_unblock(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11086 guint32 curr_offset;
11090 curr_offset = offset;
11093 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11095 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11097 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11104 bsmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11106 guint32 curr_offset;
11110 curr_offset = offset;
11113 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11115 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11122 bsmap_reset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11124 guint32 curr_offset;
11128 curr_offset = offset;
11131 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11133 ELEM_OPT_TLV(ANSI_A_E_SW_VER, "");
11135 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11142 bsmap_reset_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11144 guint32 curr_offset;
11148 curr_offset = offset;
11151 ELEM_OPT_TLV(ANSI_A_E_SW_VER, "");
11153 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11160 bsmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11162 guint32 curr_offset;
11166 curr_offset = offset;
11169 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11171 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11173 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP, "");
11175 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11182 bsmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11184 guint32 curr_offset;
11188 curr_offset = offset;
11191 ELEM_MAND_TV(ANSI_A_E_CIC, "");
11193 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11200 bsmap_xmode_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11202 guint32 curr_offset;
11206 curr_offset = offset;
11209 ELEM_MAND_TLV(ANSI_A_E_XMODE, "");
11211 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11218 bsmap_xmode_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11220 guint32 curr_offset;
11224 curr_offset = offset;
11227 ELEM_MAND_TLV(ANSI_A_E_CAUSE, "");
11229 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11236 bsmap_adds_page(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11238 guint32 curr_offset;
11242 curr_offset = offset;
11245 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11247 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART, "");
11249 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11251 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST, "");
11253 ELEM_OPT_TV(ANSI_A_E_SCI, "");
11255 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11257 ELEM_OPT_TLV(ANSI_A_E_P_REV, "");
11259 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ, "");
11261 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11263 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11270 bsmap_adds_transfer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11272 guint32 curr_offset;
11276 curr_offset = offset;
11279 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11281 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART, "");
11283 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11285 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM, "");
11287 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM, "");
11289 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT, "");
11291 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM, "");
11293 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT, "");
11295 ELEM_OPT_TLV(ANSI_A_E_CELL_ID, "");
11297 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
11299 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA, "");
11301 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11303 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2, "");
11305 ELEM_OPT_TV(ANSI_A_E_SCI, "");
11307 ELEM_OPT_TV(ANSI_A_E_SO, "");
11309 ELEM_OPT_TLV(ANSI_A_E_UZ_ID, "");
11311 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11313 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11315 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO, "");
11317 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11324 bsmap_adds_transfer_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11326 guint32 curr_offset;
11330 curr_offset = offset;
11333 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11335 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11337 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11339 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11346 dtap_adds_deliver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11348 guint32 curr_offset;
11352 curr_offset = offset;
11355 ELEM_MAND_LV(ANSI_A_E_ADDS_USER_PART, "");
11357 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11359 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD, "");
11361 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11368 bsmap_adds_page_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11370 guint32 curr_offset;
11374 curr_offset = offset;
11377 ELEM_MAND_TLV(ANSI_A_E_MID, "");
11379 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11381 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11383 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11385 ELEM_OPT_TLV(ANSI_A_E_CELL_ID, "");
11387 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11389 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11396 dtap_adds_deliver_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11398 guint32 curr_offset;
11402 curr_offset = offset;
11405 ELEM_OPT_TV(ANSI_A_E_TAG, "");
11407 ELEM_OPT_TLV(ANSI_A_E_CAUSE, "");
11409 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11416 bsmap_rejection(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11418 guint32 curr_offset;
11422 curr_offset = offset;
11425 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11427 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11429 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11431 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11433 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11437 dtap_rejection(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
11439 guint32 curr_offset;
11443 curr_offset = offset;
11446 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11448 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11450 ELEM_OPT_TLV(ANSI_A_E_SOCI, "");
11452 ELEM_OPT_TLV(ANSI_A_E_MID, "");
11454 EXTRANEOUS_DATA_CHECK(curr_len, 0);
11457 #define ANSI_A_IOS401_BSMAP_NUM_MSG (sizeof(ansi_a_ios401_bsmap_strings)/sizeof(ext_value_string_t))
11458 #define ANSI_A_IOS501_BSMAP_NUM_MSG (sizeof(ansi_a_ios501_bsmap_strings)/sizeof(ext_value_string_t))
11459 static gint ett_bsmap_msg[MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)];
11460 static void (*bsmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) =
11462 bsmap_add_srvc_noti, /* Additional Service Notification */
11463 bsmap_adds_page, /* ADDS Page */
11464 bsmap_adds_page_ack, /* ADDS Page Ack */
11465 bsmap_adds_transfer, /* ADDS Transfer */
11466 bsmap_adds_transfer_ack, /* ADDS Transfer Ack */
11467 bsmap_ass_complete, /* Assignment Complete */
11468 bsmap_ass_failure, /* Assignment Failure */
11469 bsmap_ass_req, /* Assignment Request */
11470 bsmap_auth_req, /* Authentication Request */
11471 bsmap_auth_resp, /* Authentication Response */
11472 NULL /* no BSMAP definition */, /* Base Station Challenge */
11473 NULL /* no BSMAP definition */, /* Base Station Challenge Response */
11474 bsmap_block, /* Block */
11475 bsmap_block_ack, /* Block Acknowledge */
11476 bsmap_bs_srvc_req, /* BS Service Request */
11477 bsmap_bs_srvc_resp, /* BS Service Response */
11478 bsmap_clr_command, /* Clear Command */
11479 bsmap_clr_complete, /* Clear Complete */
11480 bsmap_clr_req, /* Clear Request */
11481 bsmap_cl3_info, /* Complete Layer 3 Information */
11482 bsmap_feat_noti, /* Feature Notification */
11483 bsmap_feat_noti_ack, /* Feature Notification Ack */
11484 bsmap_ho_command, /* Handoff Command */
11485 NULL /* no associated data */, /* Handoff Commenced */
11486 bsmap_ho_complete, /* Handoff Complete */
11487 bsmap_ho_failure, /* Handoff Failure */
11488 bsmap_ho_performed, /* Handoff Performed */
11489 bsmap_ho_req, /* Handoff Request */
11490 bsmap_ho_req_ack, /* Handoff Request Acknowledge */
11491 bsmap_ho_reqd, /* Handoff Required */
11492 bsmap_ho_reqd_rej, /* Handoff Required Reject */
11493 bsmap_paca_command, /* PACA Command */
11494 bsmap_paca_command_ack, /* PACA Command Ack */
11495 bsmap_paca_update, /* PACA Update */
11496 bsmap_paca_update_ack, /* PACA Update Ack */
11497 bsmap_page_req, /* Paging Request */
11498 bsmap_priv_mode_command, /* Privacy Mode Command */
11499 bsmap_priv_mode_complete, /* Privacy Mode Complete */
11500 bsmap_rm_pos_req, /* Radio Measurements for Position Request */
11501 bsmap_rm_pos_resp, /* Radio Measurements for Position Response */
11502 bsmap_rejection, /* Rejection */
11503 bsmap_reg_req, /* Registration Request */
11504 bsmap_reset, /* Reset */
11505 bsmap_reset_ack, /* Reset Acknowledge */
11506 bsmap_reset_cct, /* Reset Circuit */
11507 bsmap_reset_cct_ack, /* Reset Circuit Acknowledge */
11508 NULL /* no BSMAP definition */, /* SSD Update Request */
11509 NULL /* no BSMAP definition */, /* SSD Update Response */
11510 bsmap_status_req, /* Status Request */
11511 bsmap_status_resp, /* Status Response */
11512 bsmap_xmode_ack, /* Transcoder Control Acknowledge */
11513 bsmap_xmode_req, /* Transcoder Control Request */
11514 bsmap_unblock, /* Unblock */
11515 bsmap_unblock_ack, /* Unblock Acknowledge */
11516 bsmap_user_zone_reject, /* User Zone Reject */
11517 bsmap_user_zone_update, /* User Zone Update */
11518 bsmap_bearer_upd_req, /* Bearer Update Request *//* IOS 5.0.1 */
11519 bsmap_bearer_upd_resp, /* Bearer Update Response *//* IOS 5.0.1 */
11520 bsmap_bearer_upd_reqd, /* Bearer Update Required *//* IOS 5.0.1 */
11521 bsmap_ms_reg_noti, /* Mobile Station Registered Notification *//* IOS 5.0.1 */
11522 bsmap_bs_auth_req, /* BS Authentication Request *//* IOS 5.0.1 */
11523 bsmap_bs_auth_req_ack, /* BS Authentication Request Ack *//* IOS 5.0.1 */
11527 #define ANSI_A_IOS401_DTAP_NUM_MSG (sizeof(ansi_a_ios401_dtap_strings)/sizeof(ext_value_string_t))
11528 #define ANSI_A_IOS501_DTAP_NUM_MSG (sizeof(ansi_a_ios501_dtap_strings)/sizeof(ext_value_string_t))
11529 static gint ett_dtap_msg[MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)];
11530 static void (*dtap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) =
11532 dtap_add_srvc_req, /* Additional Service Request */
11533 dtap_adds_deliver, /* ADDS Deliver */
11534 dtap_adds_deliver_ack, /* ADDS Deliver Ack */
11535 dtap_alert_with_info, /* Alert With Information */
11536 dtap_auth_req, /* Authentication Request */
11537 dtap_auth_resp, /* Authentication Response */
11538 dtap_bs_challenge, /* Base Station Challenge */
11539 dtap_bs_challenge_resp, /* Base Station Challenge Response */
11540 dtap_cm_srvc_req, /* CM Service Request */
11541 dtap_cm_srvc_req_cont, /* CM Service Request Continuation */
11542 dtap_connect, /* Connect */
11543 dtap_flash_with_info, /* Flash with Information */
11544 dtap_flash_with_info_ack, /* Flash with Information Ack */
11545 dtap_lu_accept, /* Location Updating Accept */
11546 dtap_lu_reject, /* Location Updating Reject */
11547 dtap_lu_req, /* Location Updating Request */
11548 dtap_page_resp, /* Paging Response */
11549 NULL /* no associated data */, /* Parameter Update Confirm */
11550 NULL /* no associated data */, /* Parameter Update Request */
11551 dtap_rejection, /* Rejection */
11552 dtap_progress, /* Progress */
11553 dtap_srvc_redirection, /* Service Redirection */
11554 dtap_srvc_release, /* Service Release */
11555 dtap_srvc_release_complete, /* Service Release Complete */
11556 dtap_ssd_update_req, /* SSD Update Request */
11557 dtap_ssd_update_resp, /* SSD Update Response */
11558 dtap_status_req, /* Status Request */
11559 dtap_status_resp, /* Status Response */
11560 dtap_user_zone_reject, /* User Zone Reject */
11561 dtap_user_zone_update, /* User Zone Update */
11562 dtap_user_zone_update_req, /* User Zone Update Request */
11566 /* Utillity function to dissect CDMA200 A1 elements in ANSI MAP messages */
11568 dissect_cdma2000_a1_elements(tvbuff_t *tvb, _U_ packet_info *pinfo, proto_tree *tree, guint32 offset, guint len)
11570 guint32 curr_offset;
11574 curr_offset = offset;
11577 /* 0x22 IS-95 Channel Identity */
11578 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID, "");
11579 /* 0x09 IS-2000 Channel Identity */
11580 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID, "");
11581 /* 0x0f IS-2000 Non-Negotiable Service */
11582 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR, "");
11583 /* 0x62 IS-95/IS-2000 Cause Value */
11584 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE, "");
11585 /* 0x10 Extended Handoff Direction Parameters */
11586 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS, "");
11587 /* 0x16 Hard Handoff Parameters */
11588 ELEM_OPT_TLV(ANSI_A_E_HHO_PARAMS, "");
11589 /* 0x11 IS-2000 Mobile Capabilities */
11590 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP, "");
11591 /* 0x0e IS-2000 Service Configuration Record */
11592 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR, "");
11594 /* 0x14 PDSN IP Address */
11595 switch (global_a_variant)
11597 case A_VARIANT_IOS401:
11598 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR, "");
11600 case A_VARIANT_IOS501:
11601 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR, "");
11605 /* 0x18 Protocol Type */
11606 ELEM_OPT_TLV(ANSI_A_E_PTYPE, "");
11607 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS, "");
11608 /* 0x2a Service Option List */
11609 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
11610 /* Source RNC to Target RNC Transparent Container */
11611 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC, "");
11612 /* 0x3a Target RNC to source RNC Transparent Container */
11613 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC, "");
11614 /* Slot Cycle Index */
11615 ELEM_OPT_TLV(ANSI_A_E_SCI, ""); /* XXX TV used elswhere?? */
11616 ELEM_OPT_TLV(ANSI_A_E_ACC_NET_ID, "");/* XXX TV used elswhere?? */
11617 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X, "");
11618 /* 0x2a Service Option List ( XX in Response this is mentioned last
11619 * need to repeat it here?
11621 ELEM_OPT_TLV(ANSI_A_E_SO_LIST, "");
11624 /* GENERIC DISSECTOR FUNCTIONS */
11627 dissect_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11629 static ansi_a_tap_rec_t tap_rec[16];
11630 static ansi_a_tap_rec_t *tap_p;
11631 static int tap_current=0;
11633 guint32 offset, saved_offset;
11636 proto_item *bsmap_item = NULL;
11637 proto_tree *bsmap_tree = NULL;
11638 const gchar *msg_str;
11641 if (check_col(pinfo->cinfo, COL_INFO))
11643 col_append_str(pinfo->cinfo, COL_INFO, "(BSMAP) ");
11647 * set tap record pointer
11650 if (tap_current == array_length(tap_rec))
11654 tap_p = &tap_rec[tap_current];
11658 saved_offset = offset;
11663 len = tvb_length(tvb);
11666 * add BSMAP message name
11668 oct = tvb_get_guint8(tvb, offset++);
11670 msg_str = my_match_strval_idx((guint32) oct, ansi_a_bsmap_strings, &idx, &dec_idx);
11673 * create the a protocol tree
11675 if (msg_str == NULL)
11678 proto_tree_add_protocol_format(tree, proto_a_bsmap, tvb, 0, len,
11679 "ANSI A-I/F BSMAP - Unknown BSMAP Message Type (%u)",
11682 bsmap_tree = proto_item_add_subtree(bsmap_item, ett_bsmap);
11687 proto_tree_add_protocol_format(tree, proto_a_bsmap, tvb, 0, -1,
11688 "ANSI A-I/F BSMAP - %s",
11691 bsmap_tree = proto_item_add_subtree(bsmap_item, ett_bsmap_msg[dec_idx]);
11693 if (check_col(pinfo->cinfo, COL_INFO))
11695 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
11700 * add BSMAP message name
11702 proto_tree_add_uint_format(bsmap_tree, hf_ansi_a_bsmap_msgtype,
11703 tvb, saved_offset, 1, oct, "Message Type");
11705 tap_p->pdu_type = BSSAP_PDU_TYPE_BSMAP;
11706 tap_p->message_type = oct;
11708 tap_queue_packet(ansi_a_tap, pinfo, tap_p);
11710 if (msg_str == NULL) return;
11712 if ((len - offset) <= 0) return;
11714 a_meid_configured = FALSE;
11719 if (bsmap_msg_fcn[dec_idx] == NULL)
11721 proto_tree_add_text(bsmap_tree,
11722 tvb, offset, len - offset,
11723 "Message Elements");
11727 (*bsmap_msg_fcn[dec_idx])(tvb, bsmap_tree, offset, len - offset);
11732 dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
11734 static ansi_a_tap_rec_t tap_rec[16];
11735 static ansi_a_tap_rec_t *tap_p;
11736 static int tap_current=0;
11738 guint32 offset, saved_offset;
11740 guint32 oct_1, oct_2;
11742 proto_item *dtap_item = NULL;
11743 proto_tree *dtap_tree = NULL;
11744 proto_item *oct_1_item = NULL;
11745 proto_tree *oct_1_tree = NULL;
11746 const gchar *msg_str;
11750 len = tvb_length(tvb);
11755 * too short to be DTAP
11757 call_dissector(data_handle, tvb, pinfo, tree);
11761 if (check_col(pinfo->cinfo, COL_INFO))
11763 col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
11767 * set tap record pointer
11770 if (tap_current == array_length(tap_rec))
11774 tap_p = &tap_rec[tap_current];
11778 saved_offset = offset;
11784 * get protocol discriminator
11786 oct_1 = tvb_get_guint8(tvb, offset++);
11787 oct_2 = tvb_get_guint8(tvb, offset++);
11790 * add DTAP message name
11792 saved_offset = offset;
11793 oct = tvb_get_guint8(tvb, offset++);
11795 msg_str = my_match_strval_idx((guint32) oct, ansi_a_dtap_strings, &idx, &dec_idx);
11798 * create the a protocol tree
11800 if (msg_str == NULL)
11803 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, len,
11804 "ANSI A-I/F DTAP - Unknown DTAP Message Type (%u)",
11807 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap);
11812 proto_tree_add_protocol_format(tree, proto_a_dtap, tvb, 0, -1,
11813 "ANSI A-I/F DTAP - %s",
11816 dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg[dec_idx]);
11818 if (check_col(pinfo->cinfo, COL_INFO))
11820 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
11827 switch (oct_1 & 0x0f)
11829 case 3: str = "Call Control, call related SS"; break;
11830 case 5: str = "Mobility Management"; break;
11831 case 6: str = "Radio Resource Management"; break;
11832 case 9: str = "Facility Management"; break;
11833 case 11: str = "Other Signaling Procedures"; break;
11834 case 15: str = "Reserved for tests"; break;
11841 proto_tree_add_text(dtap_tree,
11843 "Protocol Discriminator: %s",
11846 oct_1_tree = proto_item_add_subtree(oct_1_item, ett_dtap_oct_1);
11848 other_decode_bitfield_value(a_bigbuf, oct_1, 0xf0, 8);
11849 proto_tree_add_text(oct_1_tree,
11854 other_decode_bitfield_value(a_bigbuf, oct_1, 0x0f, 8);
11855 proto_tree_add_text(oct_1_tree,
11857 "%s : Protocol Discriminator: %u",
11864 switch (global_a_variant)
11866 case A_VARIANT_IS634:
11867 other_decode_bitfield_value(a_bigbuf, oct_2, 0x80, 8);
11868 proto_tree_add_text(dtap_tree,
11870 "%s : Transaction Identifier (TI) Flag: %s",
11872 ((oct_2 & 0x80) ? "allocated by receiver" : "allocated by sender"));
11874 other_decode_bitfield_value(a_bigbuf, oct_2, 0x70, 8);
11875 proto_tree_add_text(dtap_tree,
11877 "%s : Transaction Identifier (TI): %u",
11879 (oct_2 & 0x70) >> 4);
11881 other_decode_bitfield_value(a_bigbuf, oct_2, 0x0f, 8);
11882 proto_tree_add_text(dtap_tree,
11889 proto_tree_add_text(dtap_tree,
11896 * add DTAP message name
11898 proto_tree_add_uint_format(dtap_tree, hf_ansi_a_dtap_msgtype,
11899 tvb, saved_offset, 1, oct,
11902 tap_p->pdu_type = BSSAP_PDU_TYPE_DTAP;
11903 tap_p->message_type = oct;
11905 tap_queue_packet(ansi_a_tap, pinfo, tap_p);
11907 if (msg_str == NULL) return;
11909 if ((len - offset) <= 0) return;
11911 a_meid_configured = FALSE;
11916 if (dtap_msg_fcn[dec_idx] == NULL)
11918 proto_tree_add_text(dtap_tree,
11919 tvb, offset, len - offset,
11920 "Message Elements");
11924 (*dtap_msg_fcn[dec_idx])(tvb, dtap_tree, offset, len - offset);
11929 /* Register the protocol with Wireshark */
11931 proto_register_ansi_a(void)
11933 module_t *ansi_a_module;
11937 /* Setup list of header fields */
11939 static hf_register_info hf[] =
11941 { &hf_ansi_a_bsmap_msgtype,
11942 { "BSMAP Message Type", "ansi_a_bsmap.msgtype",
11943 FT_UINT8, BASE_HEX, NULL, 0x0,
11946 { &hf_ansi_a_dtap_msgtype,
11947 { "DTAP Message Type", "ansi_a_bsmap.dtap_msgtype",
11948 FT_UINT8, BASE_HEX, NULL, 0x0,
11951 { &hf_ansi_a_elem_id,
11952 { "Element ID", "ansi_a_bsmap.elem_id",
11953 FT_UINT8, BASE_DEC, NULL, 0,
11956 { &hf_ansi_a_length,
11957 { "Length", "ansi_a_bsmap.len",
11958 FT_UINT8, BASE_DEC, NULL, 0,
11962 { "Sub tree", "ansi_a_bsmap.none",
11967 { "ESN", "ansi_a_bsmap.esn",
11968 FT_UINT32, BASE_HEX, 0, 0x0,
11972 { "IMSI", "ansi_a_bsmap.imsi",
11973 FT_STRING, BASE_DEC, 0, 0,
11977 { "MIN", "ansi_a_bsmap.min",
11978 FT_STRING, BASE_DEC, 0, 0,
11982 { "MEID", "ansi_a_bsmap.meid",
11983 FT_STRING, BASE_HEX, 0, 0,
11986 { &hf_ansi_a_cld_party_bcd_num,
11987 { "Called Party BCD Number", "ansi_a_bsmap.cld_party_bcd_num",
11988 FT_STRING, BASE_DEC, 0, 0,
11991 { &hf_ansi_a_clg_party_bcd_num,
11992 { "Calling Party BCD Number", "ansi_a_bsmap.clg_party_bcd_num",
11993 FT_STRING, BASE_DEC, 0, 0,
11996 { &hf_ansi_a_cld_party_ascii_num,
11997 { "Called Party ASCII Number", "ansi_a_bsmap.cld_party_ascii_num",
11998 FT_STRING, BASE_DEC, 0, 0,
12001 { &hf_ansi_a_clg_party_ascii_num,
12002 { "Calling Party ASCII Number", "ansi_a_bsmap.clg_party_ascii_num",
12003 FT_STRING, BASE_DEC, 0, 0,
12006 { &hf_ansi_a_cell_ci,
12007 { "Cell CI", "ansi_a_bsmap.cell_ci",
12008 FT_UINT16, BASE_HEX, 0, 0x0,
12011 { &hf_ansi_a_cell_lac,
12012 { "Cell LAC", "ansi_a_bsmap.cell_lac",
12013 FT_UINT16, BASE_HEX, 0, 0x0,
12016 { &hf_ansi_a_cell_mscid,
12017 { "Cell MSCID", "ansi_a_bsmap.cell_mscid",
12018 FT_UINT24, BASE_HEX, 0, 0x0,
12021 { &hf_ansi_a_pdsn_ip_addr,
12022 { "PDSN IP Address", "ansi_a_bsmap.pdsn_ip_addr",
12023 FT_IPv4, BASE_NONE, NULL, 0,
12024 "IP Address", HFILL }
12026 { &hf_ansi_a_s_pdsn_ip_addr,
12027 { "Source PDSN Address", "ansi_a_bsmap.s_pdsn_ip_addr",
12028 FT_IPv4, BASE_NONE, NULL, 0,
12029 "IP Address", HFILL }
12031 { &hf_ansi_a_anchor_ip_addr,
12032 { "Anchor PDSN Address", "ansi_a_bsmap.anchor_pdsn_ip_addr",
12033 FT_IPv4, BASE_NONE, NULL, 0,
12034 "IP Address", HFILL }
12036 { &hf_ansi_a_anchor_pp_ip_addr,
12037 { "Anchor P-P Address", "ansi_a_bsmap.anchor_pp_ip_addr",
12038 FT_IPv4, BASE_NONE, NULL, 0,
12039 "IP Address", HFILL }
12041 { &hf_ansi_a_a2p_bearer_ipv4_addr,
12042 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv4_addr",
12043 FT_IPv4, BASE_NONE, NULL, 0,
12046 { &hf_ansi_a_a2p_bearer_ipv6_addr,
12047 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv6_addr",
12048 FT_IPv6, BASE_NONE, NULL, 0,
12051 { &hf_ansi_a_a2p_bearer_udp_port,
12052 { "A2p Bearer UDP Port", "ansi_a_bsmap.a2p_bearer_udp_port",
12053 FT_UINT16, BASE_DEC, NULL, 0,
12057 { "Service Option", "ansi_a_bsmap.so",
12058 FT_UINT16, BASE_DEC, NULL, 0,
12061 { &hf_ansi_a_cause_1,
12062 { "Cause", "ansi_a_bsmap.cause_1",
12063 FT_UINT8, BASE_DEC, NULL, 0,
12066 { &hf_ansi_a_cause_2,
12067 { "Cause", "ansi_a_bsmap.cause_2",
12068 FT_UINT16, BASE_DEC, NULL, 0,
12071 { &hf_ansi_a_meid_configured,
12072 { "Is MEID configured", "ansi_a_bsmap.meid_configured",
12073 FT_BOOLEAN, BASE_NONE, NULL, 0,
12074 "Is MEID configured", HFILL }
12078 static enum_val_t a_variant_options[] = {
12079 { "is-634-rev0", "IS-634 rev. 0", A_VARIANT_IS634 },
12080 { "tsb-80", "TSB-80", A_VARIANT_TSB80 },
12081 { "is-634-a", "IS-634-A", A_VARIANT_IS634A },
12082 { "ios-2.x", "IOS 2.x", A_VARIANT_IOS2 },
12083 { "ios-3.x", "IOS 3.x", A_VARIANT_IOS3 },
12084 { "ios-4.0.1", "IOS 4.0.1", A_VARIANT_IOS401 },
12085 { "ios-5.0.1", "IOS 5.0.1", A_VARIANT_IOS501 },
12090 /* Setup protocol subtree array */
12091 #define MAX_NUM_DTAP_MSG MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)
12092 #define MAX_NUM_BSMAP_MSG MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)
12093 #define MAX_NUM_ELEM_1 MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)
12094 #define NUM_INDIVIDUAL_ELEMS 18
12096 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 *);
12099 * XXX - at least one version of the HP C compiler apparently doesn't
12100 * recognize constant expressions using the "?" operator as being
12101 * constant expressions, so you can't use the expression that
12102 * initializes "ett_let" as an array size. Therefore, we dynamically
12103 * allocate the array instead.
12105 ett = g_malloc(ett_len);
12107 memset((void *) ett_dtap_msg, -1, sizeof(ett_dtap_msg));
12108 memset((void *) ett_bsmap_msg, -1, sizeof(ett_bsmap_msg));
12109 memset((void *) ett_ansi_elem_1, -1, sizeof(ett_ansi_elem_1));
12110 memset((void *) ett_ansi_fwd_ms_info_rec, -1, sizeof(gint) * NUM_FWD_MS_INFO_REC);
12111 memset((void *) ett_ansi_rev_ms_info_rec, -1, sizeof(gint) * NUM_REV_MS_INFO_REC);
12113 ett[0] = &ett_bsmap;
12114 ett[1] = &ett_dtap;
12115 ett[2] = &ett_elems;
12116 ett[3] = &ett_elem;
12117 ett[4] = &ett_dtap_oct_1;
12118 ett[5] = &ett_cm_srvc_type;
12119 ett[6] = &ett_ansi_ms_info_rec_reserved;
12120 ett[7] = &ett_ansi_enc_info;
12121 ett[8] = &ett_cell_list;
12122 ett[9] = &ett_bearer_list;
12123 ett[10] = &ett_re_list;
12124 ett[11] = &ett_so_list;
12125 ett[12] = &ett_scm;
12126 ett[13] = &ett_adds_user_part;
12127 ett[14] = &ett_scr;
12128 ett[15] = &ett_srvc_con_rec;
12129 ett[16] = &ett_cm2_band_class;
12130 ett[17] = &ett_vp_algs;
12132 last_offset = NUM_INDIVIDUAL_ELEMS;
12134 for (i=0; i < MAX_NUM_DTAP_MSG; i++, last_offset++)
12136 ett[last_offset] = &ett_dtap_msg[i];
12139 for (i=0; i < MAX_NUM_BSMAP_MSG; i++, last_offset++)
12141 ett[last_offset] = &ett_bsmap_msg[i];
12144 for (i=0; i < MAX_NUM_ELEM_1; i++, last_offset++)
12146 ett[last_offset] = &ett_ansi_elem_1[i];
12149 for (i=0; i < NUM_FWD_MS_INFO_REC; i++, last_offset++)
12151 ett[last_offset] = &ett_ansi_fwd_ms_info_rec[i];
12154 for (i=0; i < NUM_REV_MS_INFO_REC; i++, last_offset++)
12156 ett[last_offset] = &ett_ansi_rev_ms_info_rec[i];
12159 /* Register the protocol name and description */
12162 proto_register_protocol("ANSI A-I/F BSMAP", "ANSI BSMAP", "ansi_a_bsmap");
12164 proto_register_field_array(proto_a_bsmap, hf, array_length(hf));
12167 proto_register_protocol("ANSI A-I/F DTAP", "ANSI DTAP", "ansi_a_dtap");
12169 is637_dissector_table =
12170 register_dissector_table("ansi_a.sms", "IS-637-A (SMS)",
12171 FT_UINT8, BASE_DEC);
12173 is683_dissector_table =
12174 register_dissector_table("ansi_a.ota", "IS-683-A (OTA)",
12175 FT_UINT8, BASE_DEC);
12177 is801_dissector_table =
12178 register_dissector_table("ansi_a.pld", "IS-801 (PLD)",
12179 FT_UINT8, BASE_DEC);
12181 proto_register_subtree_array(ett, ett_len / sizeof(gint *));
12183 ansi_a_tap = register_tap("ansi_a");
12186 * setup for preferences
12188 ansi_a_module = prefs_register_protocol(proto_a_bsmap, proto_reg_handoff_ansi_a);
12190 prefs_register_enum_preference(ansi_a_module,
12193 "(if other than the default of IOS 4.0.1)",
12203 proto_reg_handoff_ansi_a(void)
12205 static gboolean ansi_a_prefs_initialized = FALSE;
12207 if (!ansi_a_prefs_initialized)
12209 dissector_handle_t bsmap_handle;
12210 bsmap_handle = create_dissector_handle(dissect_bsmap, proto_a_bsmap);
12211 dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
12212 data_handle = find_dissector("data");
12213 rtp_handle = find_dissector("rtp");
12215 dissector_add("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
12216 dissector_add("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
12218 ansi_a_prefs_initialized = TRUE;
12221 switch (global_a_variant)
12223 case A_VARIANT_IOS501:
12224 ansi_a_bsmap_strings = ansi_a_ios501_bsmap_strings;
12225 ansi_a_dtap_strings = ansi_a_ios501_dtap_strings;
12226 ansi_a_elem_1_strings = ansi_a_ios501_elem_1_strings;
12230 ansi_a_bsmap_strings = ansi_a_ios401_bsmap_strings;
12231 ansi_a_dtap_strings = ansi_a_ios401_dtap_strings;
12232 ansi_a_elem_1_strings = ansi_a_ios401_elem_1_strings;