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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
42 #include <epan/packet.h>
43 #include <epan/exceptions.h>
44 #include <epan/prefs.h>
46 #include <epan/strutil.h>
47 #include <epan/wmem/wmem.h>
48 #include <epan/expert.h>
49 #include <epan/base64.h>
52 #include "packet-rtp.h"
53 #include "packet-bssap.h"
54 #include "packet-ansi_a.h"
58 * IOS 4, probably most common
60 static gint global_a_variant
= A_VARIANT_IOS401
;
63 /* PROTOTYPES/FORWARDS */
65 void proto_register_ansi_a(void);
66 void proto_reg_handoff_ansi_a(void);
69 my_try_val_to_str_idx(guint32 val
, const ext_value_string_t
*vs
, gint
*dec_idx
)
75 if (vs
[i
].value
== val
)
77 *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 #ifdef MAYBE_USED_FOR_OLDER_CODECS
675 static int hf_ansi_a_clg_party_bcd_num
= -1;
677 static int hf_ansi_a_cld_party_ascii_num
= -1;
678 static int hf_ansi_a_clg_party_ascii_num
= -1;
679 static int hf_ansi_a_cell_ci
= -1;
680 static int hf_ansi_a_cell_lac
= -1;
681 static int hf_ansi_a_cell_mscid
= -1;
682 static int hf_ansi_a_pdsn_ip_addr
= -1;
683 static int hf_ansi_a_s_pdsn_ip_addr
= -1;
684 static int hf_ansi_a_anchor_ip_addr
= -1;
685 static int hf_ansi_a_anchor_pp_ip_addr
= -1;
686 static int hf_ansi_a_a2p_bearer_ipv4_addr
= -1;
687 static int hf_ansi_a_a2p_bearer_ipv6_addr
= -1;
688 static int hf_ansi_a_a2p_bearer_udp_port
= -1;
689 static int hf_ansi_a_so
= -1;
690 static int hf_ansi_a_cause_1
= -1; /* 1 octet cause */
691 static int hf_ansi_a_cause_2
= -1; /* 2 octet cause */
692 static int hf_ansi_a_meid_configured
= -1;
693 static int hf_ansi_a_ms_info_rec_signal_type
= -1;
694 static int hf_ansi_a_ms_info_rec_signal_alert_pitch
= -1;
695 static int hf_ansi_a_ms_info_rec_signal_tone
= -1;
696 static int hf_ansi_a_ms_info_rec_signal_isdn_alert
= -1;
697 static int hf_ansi_a_ms_info_rec_signal_is54b_alert
= -1;
698 static int hf_ansi_a_ms_info_rec_call_waiting_ind
= -1;
700 /* Initialize the subtree pointers */
701 static gint ett_bsmap
= -1;
702 static gint ett_dtap
= -1;
703 static gint ett_elems
= -1;
704 static gint ett_elem
= -1;
705 static gint ett_dtap_oct_1
= -1;
706 static gint ett_cm_srvc_type
= -1;
707 static gint ett_ansi_ms_info_rec_reserved
= -1;
708 static gint ett_ansi_enc_info
= -1;
709 static gint ett_scm
= -1;
710 static gint ett_cell_list
= -1;
711 static gint ett_bearer_list
= -1;
712 static gint ett_re_list
= -1;
713 static gint ett_so_list
= -1;
714 static gint ett_adds_user_part
= -1;
715 static gint ett_scr
= -1;
716 static gint ett_srvc_con_rec
= -1;
717 static gint ett_cm2_band_class
= -1;
718 static gint ett_vp_algs
= -1;
720 static expert_field ei_ansi_a_extraneous_data
= EI_INIT
;
722 static char a_bigbuf
[1024];
723 static dissector_handle_t data_handle
;
724 static dissector_handle_t dtap_handle
;
725 static dissector_table_t is637_dissector_table
; /* IS-637-A Transport Layer (SMS) */
726 static dissector_table_t is683_dissector_table
; /* IS-683-A (OTA) */
727 static dissector_table_t is801_dissector_table
; /* IS-801 (PLD) */
728 static proto_tree
*g_tree
;
729 static address rtp_src_addr
;
730 static guint32 rtp_ipv4_addr
;
731 static struct e_in6_addr rtp_ipv6_addr
;
732 static guint16 rtp_port
;
733 static gboolean a_meid_configured
= FALSE
;
736 typedef struct ansi_a_dgt_set_t
739 * would typically be 15 but to allow MEID decoding this
740 * needs to have room for full hexadecimal representation
742 unsigned char out
[16];
747 * As per A.S0001 Called Party BCD Number
749 static ansi_a_dgt_set_t Dgt_tbcd
= {
751 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
752 '0','1','2','3','4','5','6','7','8','9','*','#','a','b','c', 0
756 static ansi_a_dgt_set_t Dgt_msid
= {
758 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
759 '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?', 0
763 static ansi_a_dgt_set_t Dgt_meid
= {
765 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
766 '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
773 * Unpack BCD input pattern into output ASCII pattern
775 * Input Pattern is supplied using the same format as the digits
777 * Returns: length of unpacked pattern
781 char *out
, /* ASCII pattern out */
782 guchar
*in
, /* packed pattern in */
783 int num_octs
, /* Number of octets to unpack */
784 ansi_a_dgt_set_t
*dgt
/* Digit definitions */
793 * unpack first value in byte
796 *out
++ = dgt
->out
[i
& 0x0f];
800 * unpack second value in byte
804 if ((num_octs
== 1) && (i
== 0x0f)) /* odd number bytes - hit filler */
807 *out
++ = dgt
->out
[i
];
818 ansi_a_so_int_to_str(
821 const gchar
*str
= NULL
;
825 case 1: str
= "Basic Variable Rate Voice Service (8 kbps)"; break;
826 case 2: str
= "Mobile Station Loopback (8 kbps)"; break;
827 case 3: str
= "(EVRC) Enhanced Variable Rate Voice Service (8 kbps)"; break;
828 case 4: str
= "Asynchronous Data Service (9.6 kbps)"; break;
829 case 5: str
= "Group 3 Facsimile (9.6 kbps)"; break;
830 case 6: str
= "Short Message Services (Rate Set 1)"; break;
831 case 7: str
= "Packet Data Service: Internet or ISO Protocol Stack (9.6 kbps)"; break;
832 case 8: str
= "Packet Data Service: CDPD Protocol Stack (9.6 kbps)"; break;
833 case 9: str
= "Mobile Station Loopback (13 kbps)"; break;
834 case 10: str
= "STU-III Transparent Service"; break;
835 case 11: str
= "STU-III Non-Transparent Service"; break;
836 case 12: str
= "Asynchronous Data Service (14.4 or 9.6 kbps)"; break;
837 case 13: str
= "Group 3 Facsimile (14.4 or 9.6 kbps)"; break;
838 case 14: str
= "Short Message Services (Rate Set 2)"; break;
839 case 15: str
= "Packet Data Service: Internet or ISO Protocol Stack (14.4 kbps)"; break;
840 case 16: str
= "Packet Data Service: CDPD Protocol Stack (14.4 kbps)"; break;
841 case 17: str
= "High Rate Voice Service (13 kbps)"; break;
842 case 32768: str
= "QCELP (13 kbps)"; break;
843 case 32798: /* 0x801e */ str
= "Qualcomm Loopback"; break;
844 case 32799: /* 0x801f */ str
= "Qualcomm Markov 8 kbps Loopback"; break;
845 case 32800: /* 0x8020 */ str
= "Qualcomm Packet Data"; break;
846 case 32801: /* 0x8021 */ str
= "Qualcomm Async Data"; break;
847 case 18: str
= "Over-the-Air Parameter Administration (Rate Set 1)"; break;
848 case 19: str
= "Over-the-Air Parameter Administration (Rate Set 2)"; break;
849 case 20: str
= "Group 3 Analog Facsimile (Rate Set 1)"; break;
850 case 21: str
= "Group 3 Analog Facsimile (Rate Set 2)"; break;
851 case 22: str
= "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS1 reverse)"; break;
852 case 23: str
= "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS1 forward, RS2 reverse)"; break;
853 case 24: str
= "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS1 reverse)"; break;
854 case 25: str
= "High Speed Packet Data Service: Internet or ISO Protocol Stack (RS2 forward, RS2 reverse)"; break;
855 case 26: str
= "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS1 reverse)"; break;
856 case 27: str
= "High Speed Packet Data Service: CDPD Protocol Stack (RS1 forward, RS2 reverse)"; break;
857 case 28: str
= "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS1 reverse)"; break;
858 case 29: str
= "High Speed Packet Data Service: CDPD Protocol Stack (RS2 forward, RS2 reverse)"; break;
859 case 30: str
= "Supplemental Channel Loopback Test for Rate Set 1"; break;
860 case 31: str
= "Supplemental Channel Loopback Test for Rate Set 2"; break;
861 case 32: str
= "Test Data Service Option (TDSO)"; break;
862 case 33: str
= "cdma2000 High Speed Packet Data Service, Internet or ISO Protocol Stack"; break;
863 case 34: str
= "cdma2000 High Speed Packet Data Service, CDPD Protocol Stack"; break;
864 case 35: str
= "Location Services (PDS), Rate Set 1 (9.6 kbps)"; break;
865 case 36: str
= "Location Services (PDS), Rate Set 2 (14.4 kbps)"; break;
866 case 37: str
= "ISDN Interworking Service (64 kbps)"; break;
867 case 38: str
= "GSM Voice"; break;
868 case 39: str
= "GSM Circuit Data"; break;
869 case 40: str
= "GSM Packet Data"; break;
870 case 41: str
= "GSM Short Message Service"; break;
871 case 42: str
= "None Reserved for MC-MAP standard service options"; break;
872 case 54: str
= "Markov Service Option (MSO)"; break;
873 case 55: str
= "Loopback Service Option (LSO)"; break;
874 case 56: str
= "Selectable Mode Vocoder"; break;
875 case 57: str
= "32 kbps Circuit Video Conferencing"; break;
876 case 58: str
= "64 kbps Circuit Video Conferencing"; break;
877 case 59: str
= "HRPD Accounting Records Identifier"; break;
878 case 60: str
= "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Removal"; break;
879 case 61: str
= "Link Layer Assisted Robust Header Compression (LLA ROHC) - Header Compression"; break;
880 case 62: str
= "- 4099 None Reserved for standard service options"; break;
881 case 68: str
= "(EVRC-B NB) Enhanced Variable Rate Voice Service"; break;
882 case 70: str
= "(EVRC-B WB) Enhanced Variable Rate Voice Service"; break;
883 case 73: str
= "(EVRC-NW) Enhanced Variable Rate Voice Service"; break;
884 case 4100: str
= "Asynchronous Data Service, Revision 1 (9.6 or 14.4 kbps)"; break;
885 case 4101: str
= "Group 3 Facsimile, Revision 1 (9.6 or 14.4 kbps)"; break;
886 case 4102: str
= "Reserved for standard service option"; break;
887 case 4103: str
= "Packet Data Service: Internet or ISO Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
888 case 4104: str
= "Packet Data Service: CDPD Protocol Stack, Revision 1 (9.6 or 14.4 kbps)"; break;
890 if ((so
>= 4105) && (so
<= 32767)) { str
= "Reserved for standard service options"; }
891 else if ((so
>= 32769) && (so
<= 32771)) { str
= "Proprietary QUALCOMM Incorporated"; }
892 else if ((so
>= 32772) && (so
<= 32775)) { str
= "Proprietary OKI Telecom"; }
893 else if ((so
>= 32776) && (so
<= 32779)) { str
= "Proprietary Lucent Technologies"; }
894 else if ((so
>= 32780) && (so
<=32783)) { str
= "Nokia"; }
895 else if ((so
>= 32784) && (so
<=32787)) { str
= "NORTEL NETWORKS"; }
896 else if ((so
>= 32788) && (so
<=32791)) { str
= "Sony Electronics Inc."; }
897 else if ((so
>= 32792) && (so
<=32795)) { str
= "Motorola"; }
898 else if ((so
>= 32796) && (so
<=32799)) { str
= "QUALCOMM Incorporated"; }
899 else if ((so
>= 32800) && (so
<=32803)) { str
= "QUALCOMM Incorporated"; }
900 else if ((so
>= 32804) && (so
<=32807)) { str
= "QUALCOMM Incorporated"; }
901 else if ((so
>= 32808) && (so
<=32811)) { str
= "QUALCOMM Incorporated"; }
902 else if ((so
>= 32812) && (so
<=32815)) { str
= "Lucent Technologies"; }
903 else if ((so
>= 32816) && (so
<=32819)) { str
= "Denso International"; }
904 else if ((so
>= 32820) && (so
<=32823)) { str
= "Motorola"; }
905 else if ((so
>= 32824) && (so
<=32827)) { str
= "Denso International"; }
906 else if ((so
>= 32828) && (so
<=32831)) { str
= "Denso International"; }
907 else if ((so
>= 32832) && (so
<=32835)) { str
= "Denso International"; }
908 else if ((so
>= 32836) && (so
<=32839)) { str
= "NEC America"; }
909 else if ((so
>= 32840) && (so
<=32843)) { str
= "Samsung Electronics"; }
910 else if ((so
>= 32844) && (so
<=32847)) { str
= "Texas Instruments Incorporated"; }
911 else if ((so
>= 32848) && (so
<=32851)) { str
= "Toshiba Corporation"; }
912 else if ((so
>= 32852) && (so
<=32855)) { str
= "LG Electronics Inc."; }
913 else if ((so
>= 32856) && (so
<=32859)) { str
= "VIA Telecom Inc."; }
914 else { str
= "Reserved"; }
922 /* ELEMENT FUNCTIONS */
924 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
925 if ((edc_len) > (edc_max_len)) \
927 proto_tree_add_text(tree, tvb, \
928 curr_offset, (edc_len) - (edc_max_len), "Extraneous Data"); \
929 curr_offset += ((edc_len) - (edc_max_len)); \
932 #define EXTRANEOUS_DATA_CHECK_EXPERT(edc_len, edc_max_len) \
933 if ((edc_len) > (edc_max_len)) \
935 proto_tree_add_expert(tree, pinfo, &ei_ansi_a_extraneous_data, \
936 tvb, curr_offset, (edc_len) - (edc_max_len)); \
937 curr_offset += ((edc_len) - (edc_max_len)); \
940 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
941 if ((sdc_len) < (sdc_min_len)) \
943 proto_tree_add_text(tree, tvb, \
944 curr_offset, (sdc_len), "Short Data (?)"); \
945 curr_offset += (sdc_len); \
946 return(curr_offset - offset); \
949 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
950 if ((edc_len) != (edc_eq_len)) \
952 proto_tree_add_text(tree, tvb, \
953 asn1->offset, (edc_len), "Unexpected Data Length"); \
954 asn1->offset += (edc_len); \
958 #define NO_MORE_DATA_CHECK(nmdc_len) \
959 if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
966 elem_chan_num(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
971 curr_offset
= offset
;
973 value
= tvb_get_ntohs(tvb
, curr_offset
);
975 switch (global_a_variant
)
977 case A_VARIANT_IOS401
:
978 proto_tree_add_text(tree
,
980 "Channel Number: %u",
983 g_snprintf(add_string
, string_len
, " - (%u)", value
);
986 case A_VARIANT_IOS501
:
987 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0xf8, 8);
988 proto_tree_add_text(tree
,
993 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0x07, 8);
994 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
995 "%s : ARFCN (MSB): %u",
999 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
1000 proto_tree_add_text(tree
, tvb
, curr_offset
+ 1, 1,
1004 g_snprintf(add_string
, string_len
, " - (ARFCN: %u)", value
& 0x07ff);
1010 /* no length check possible */
1012 return(curr_offset
- offset
);
1019 elem_chan_type(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
1022 guint32 curr_offset
;
1023 const gchar
*str
= NULL
;
1026 curr_offset
= offset
;
1029 oct
= tvb_get_guint8(tvb
, curr_offset
);
1033 case 0: str
= "No Alert"; break;
1034 case 1: str
= "Speech"; break;
1035 case 2: str
= "Data"; data
= TRUE
; break;
1036 case 3: str
= "Signaling"; break;
1042 proto_tree_add_text(tree
,
1043 tvb
, curr_offset
, 1,
1044 "Speech or Data Indicator: %s",
1047 g_snprintf(add_string
, string_len
, " - (%s)", str
);
1051 NO_MORE_DATA_CHECK(len
);
1053 oct
= tvb_get_guint8(tvb
, curr_offset
);
1057 case 0: str
= "Reserved (invalid)"; break;
1058 case 1: str
= "DCCH"; break;
1059 case 2: str
= "Reserved for future use (invalid)"; break;
1060 case 8: str
= "Full rate TCH channel Bm"; break;
1061 case 9: str
= "Half rate TCH channel Lm"; break;
1067 proto_tree_add_text(tree
,
1068 tvb
, curr_offset
, 1,
1069 "Channel Rate and Type: %s",
1074 NO_MORE_DATA_CHECK(len
);
1076 oct
= tvb_get_guint8(tvb
, curr_offset
);
1080 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
1081 proto_tree_add_text(tree
,
1082 tvb
, curr_offset
, 1,
1086 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
1087 proto_tree_add_text(tree
,
1088 tvb
, curr_offset
, 1,
1089 "%s : %sTransparent service",
1091 (oct
& 0x40) ? "Non-" : "");
1093 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
1094 proto_tree_add_text(tree
,
1095 tvb
, curr_offset
, 1,
1103 case 0: str
= "No Resources Required (invalid)"; break;
1104 case 1: str
= "Reserved"; break;
1105 case 2: str
= "Reserved"; break;
1106 case 3: str
= "TIA/EIA-IS-2000 8 kb/s vocoder"; break;
1107 case 4: str
= "8 kb/s enhanced vocoder (EVRC)"; break;
1108 case 5: str
= "13 kb/s vocoder"; break;
1109 case 6: str
= "ADPCM"; break;
1115 proto_tree_add_text(tree
,
1116 tvb
, curr_offset
, 1,
1117 "Speech Encoding Algorithm/data rate + Transparency Indicator: %s",
1123 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
1125 return(curr_offset
- offset
);
1132 elem_return_cause(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
1136 guint32 curr_offset
;
1138 curr_offset
= offset
;
1140 oct
= tvb_get_guint8(tvb
, curr_offset
);
1142 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
1143 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1149 case 0: str
= "Normal access"; break;
1150 case 1: str
= "Service redirection failed as a result of system not found"; break;
1151 case 2: str
= "Service redirection failed as a result of protocol mismatch"; break;
1152 case 3: str
= "Service redirection failed as a result of registration rejection"; break;
1153 case 4: str
= "Service redirection failed as a result of wrong SID"; break;
1154 case 5: str
= "Service redirection failed as a result of wrong NID"; break;
1160 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
1161 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1162 "%s : Return Cause: %s",
1168 /* no length check possible */
1170 return(curr_offset
- offset
);
1177 elem_rf_chan_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
1181 guint32 curr_offset
;
1183 curr_offset
= offset
;
1185 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1190 oct
= tvb_get_guint8(tvb
, curr_offset
);
1192 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
1193 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1197 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
1198 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1202 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
1203 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1204 "%s : ANSI/EIA/TIA-553",
1209 oct
= tvb_get_guint8(tvb
, curr_offset
);
1211 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
1212 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1216 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
1217 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1218 "%s : Timeslot Number",
1223 value
= tvb_get_ntohs(tvb
, curr_offset
);
1225 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0xf8, 8);
1226 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1230 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0x07, 8);
1231 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1232 "%s : ARFCN (MSB): %u",
1236 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
1237 proto_tree_add_text(tree
, tvb
, curr_offset
+ 1, 1,
1241 g_snprintf(add_string
, string_len
, " - (ARFCN: %u)", value
& 0x07ff);
1245 /* no length check possible */
1247 return(curr_offset
- offset
);
1254 elem_sr_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
1257 guint32 curr_offset
;
1259 curr_offset
= offset
;
1261 oct
= tvb_get_guint8(tvb
, curr_offset
);
1263 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
1264 proto_tree_add_text(tree
,
1265 tvb
, curr_offset
, 1,
1269 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
1270 proto_tree_add_text(tree
,
1271 tvb
, curr_offset
, 1,
1276 g_snprintf(add_string
, string_len
, " - (%u)", oct
);
1280 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
1282 return(curr_offset
- offset
);
1289 elem_sid(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
1292 guint32 curr_offset
;
1294 curr_offset
= offset
;
1296 value
= tvb_get_ntohs(tvb
, curr_offset
);
1298 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0x80, 8);
1299 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1303 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0x7f, 8);
1304 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1305 "%s : SID (MSB), %u",
1309 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
1310 proto_tree_add_text(tree
, tvb
, curr_offset
+ 1, 1,
1314 g_snprintf(add_string
, string_len
, " - (SID: %u)", value
& 0x7fff);
1318 /* no length check possible */
1320 return(curr_offset
- offset
);
1327 elem_is95_chan_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
1331 guint32 curr_offset
;
1333 curr_offset
= offset
;
1335 oct
= tvb_get_guint8(tvb
, curr_offset
);
1337 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
1338 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1339 "%s : Hard Handoff",
1342 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
1343 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1344 "%s : Number of Channels to Add: %u",
1348 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
1349 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1350 "%s : Frame Offset: (%u), %.2f ms",
1353 (oct
& 0x0f) * 1.25);
1357 NO_MORE_DATA_CHECK(len
);
1359 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 4);
1363 oct
= tvb_get_guint8(tvb
, curr_offset
);
1365 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1366 "Walsh Code Channel Index: %u",
1371 oct
= tvb_get_guint8(tvb
, curr_offset
);
1373 other_decode_bitfield_value(a_bigbuf
, oct
, 0xff, 8);
1374 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1375 "%s : Pilot PN Code (LSB)",
1381 oct
= tvb_get_guint8(tvb
, curr_offset
);
1382 value
|= ((guint32
) (oct
& 0x80)) << 1;
1384 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
1385 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1386 "%s : Pilot PN Code (MSB): %u",
1390 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
1391 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1392 "%s : Power Combined",
1395 other_decode_bitfield_value(a_bigbuf
, oct
, 0x20, 8);
1396 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1397 "%s : Frequency Included",
1400 other_decode_bitfield_value(a_bigbuf
, oct
, 0x18, 8);
1401 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1405 value
= tvb_get_guint8(tvb
, curr_offset
+ 1) | ((oct
& 0x07) << 8);
1407 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
1408 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1409 "%s : ARFCN (MSB): %u",
1415 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
1416 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1420 if (add_string
[0] == '\0')
1422 g_snprintf(add_string
, string_len
, " - (ARFCN: %u)", value
);
1427 while ((len
- (curr_offset
- offset
)) >= 4);
1429 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
1431 return(curr_offset
- offset
);
1443 elem_enc_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
1447 guint32 curr_offset
;
1450 proto_tree
*subtree
;
1453 curr_offset
= offset
;
1457 while ((len
- (curr_offset
- offset
)) >= 2)
1461 oct
= tvb_get_guint8(tvb
, curr_offset
);
1463 switch ((oct
& 0x7c) >> 2)
1465 case 0: str
= "Not Used - Invalid value"; break;
1466 case 1: str
= "SME Key: Signaling Message Encryption Key"; break;
1467 case 2: str
= "Reserved (VPM: Voice Privacy Mask)"; break;
1468 case 3: str
= "Reserved"; break;
1469 case 4: str
= "Private Longcode"; break;
1470 case 5: str
= "Data Key (ORYX)"; break;
1471 case 6: str
= "Initial RAND"; break;
1478 proto_tree_add_text(tree
,
1479 tvb
, curr_offset
, 1,
1480 "Encryption Info [%u]: (%u) %s",
1485 subtree
= proto_item_add_subtree(item
, ett_ansi_enc_info
);
1487 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
1488 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1492 other_decode_bitfield_value(a_bigbuf
, oct
, 0x7c, 8);
1493 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1494 "%s : Encryption Parameter Identifier: (%u) %s",
1499 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
1500 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1503 (oct
& 0x02) ? "active" : "inactive");
1505 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
1506 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1507 "%s : Available: algorithm is %savailable",
1509 (oct
& 0x01) ? "" : "not ");
1513 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
1515 proto_tree_add_uint(subtree
, hf_ansi_a_length
, tvb
,
1516 curr_offset
, 1, oct_len
);
1522 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
1524 proto_tree_add_text(subtree
, tvb
, curr_offset
, oct_len
,
1525 "Encryption Parameter value");
1527 curr_offset
+= oct_len
;
1531 g_snprintf(add_string
, string_len
, " - %u record%s",
1532 num_recs
, plurality(num_recs
, "", "s"));
1534 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
1536 return(curr_offset
- offset
);
1541 * NO ASSOCIATED DATA
1553 elem_cm_info_type_2(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
1556 guint8 num_bands
, band_class_count
;
1557 guint32 curr_offset
;
1559 proto_tree
*subtree
;
1563 curr_offset
= offset
;
1565 oct
= tvb_get_guint8(tvb
, curr_offset
);
1567 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
1568 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1569 "%s : Mobile P_REV: %u",
1573 g_snprintf(add_string
, string_len
, " - P_REV (%u)", (oct
& 0xe0) >> 5);
1575 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
1576 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1580 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
1581 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1582 "%s : See List of Entries",
1587 case 0: str
= "Class 1, vehicle and portable"; break;
1588 case 1: str
= "Class 2, portable"; break;
1589 case 2: str
= "Class 3, handheld"; break;
1590 case 3: str
= "Class 4, handheld"; break;
1591 case 4: str
= "Class 5, handheld"; break;
1592 case 5: str
= "Class 6, handheld"; break;
1593 case 6: str
= "Class 7, handheld"; break;
1595 str
= "Class 8, handheld";
1599 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
1600 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1601 "%s : RF Power Capability: %s",
1607 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1612 oct
= tvb_get_guint8(tvb
, curr_offset
);
1614 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
1615 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1616 "%s : NAR_AN_CAP: N-AMPS %ssupported",
1618 (oct
& 0x80) ? "" : "not ");
1620 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
1621 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1622 "%s : IS-95: %ssupported",
1624 (oct
& 0x40) ? "" : "not ");
1626 other_decode_bitfield_value(a_bigbuf
, oct
, 0x20, 8);
1627 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1628 "%s : Slotted: mobile is %sin slotted mode",
1630 (oct
& 0x20) ? "" : "not ");
1632 other_decode_bitfield_value(a_bigbuf
, oct
, 0x18, 8);
1633 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1637 other_decode_bitfield_value(a_bigbuf
, oct
, 0x04, 8);
1638 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1639 "%s : DTX: mobile is %scapable of DTX",
1641 (oct
& 0x04) ? "" : "not ");
1643 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
1644 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1645 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1647 (oct
& 0x02) ? "" : "not ");
1649 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
1650 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1656 NO_MORE_DATA_CHECK(len
);
1658 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1663 NO_MORE_DATA_CHECK(len
);
1665 oct
= tvb_get_guint8(tvb
, curr_offset
);
1667 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
1668 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1672 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
1673 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1674 "%s : Mobile Term: mobile is %scapable of receiving incoming calls",
1676 (oct
& 0x02) ? "" : "not ");
1678 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
1679 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1680 "%s : PACA Supported Indicator (PSI): mobile station %s PACA",
1682 (oct
& 0x01) ? "supports" : "does not support");
1686 NO_MORE_DATA_CHECK(len
);
1688 oct
= tvb_get_guint8(tvb
, curr_offset
);
1690 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1696 oct
= tvb_get_guint8(tvb
, curr_offset
);
1699 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1700 "Station Class Mark: %u",
1704 * following SCM decode is from:
1705 * 3GPP2 C.S0005-0 section 2.3.3
1706 * 3GPP2 C.S0072-0 section 2.1.2
1708 subtree
= proto_item_add_subtree(item
, ett_scm
);
1710 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
1711 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1712 "%s : Extended SCM Indicator: %s",
1714 (oct
& 0x80) ? "Band Classes 1,4" : "Other bands");
1716 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
1717 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1720 (oct
& 0x40) ? "Dual Mode" : "CDMA Only");
1722 other_decode_bitfield_value(a_bigbuf
, oct
, 0x20, 8);
1723 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1726 (oct
& 0x20) ? "Slotted" : "Non-Slotted");
1731 g_strlcat(add_string
, " (MEID configured)", string_len
);
1732 a_meid_configured
= TRUE
;
1739 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
1740 proto_tree_add_boolean_format(subtree
, hf_ansi_a_meid_configured
, tvb
,
1741 curr_offset
, 1, a_meid_configured
,
1742 "%s : MEID %sconfigured",
1746 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
1747 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1748 "%s : 25 MHz Bandwidth",
1751 other_decode_bitfield_value(a_bigbuf
, oct
, 0x04, 8);
1752 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1753 "%s : %s Transmission",
1755 (oct
& 0x04) ? "Discontinuous" : "Continuous");
1759 case 0x00: str
= "Class I"; break;
1760 case 0x01: str
= "Class II"; break;
1761 case 0x02: str
= "Class III"; break;
1762 case 0x03: str
= "Reserved"; break;
1765 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
1766 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
1767 "%s : Power Class for Band Class 0 Analog Operation: %s",
1773 NO_MORE_DATA_CHECK(len
);
1775 band_class_count
= tvb_get_guint8(tvb
, curr_offset
);
1777 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1778 "Count of Band Class Entries: %u",
1783 oct
= tvb_get_guint8(tvb
, curr_offset
);
1785 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
1786 "Band Class Entry Length: %u",
1791 NO_MORE_DATA_CHECK(len
);
1795 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 3);
1801 proto_tree_add_text(tree
, tvb
, curr_offset
, 3,
1802 "Band Class Entry [%u]",
1805 subtree
= proto_item_add_subtree(item
, ett_cm2_band_class
);
1807 oct
= tvb_get_guint8(tvb
, curr_offset
);
1809 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
1810 proto_tree_add_text(subtree
,
1811 tvb
, curr_offset
, 1,
1815 band_class
= oct
& 0x1f;
1816 if ((band_class
< 0) || (band_class
>= (gint
) NUM_BAND_CLASS_STR
))
1822 str
= band_class_str
[band_class
];
1825 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
1826 proto_tree_add_text(subtree
,
1827 tvb
, curr_offset
, 1,
1828 "%s : Band Class: %s",
1834 oct2
= tvb_get_guint8(tvb
, curr_offset
);
1835 oct
= tvb_get_guint8(tvb
, curr_offset
+1);
1839 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x80, 8);
1840 proto_tree_add_text(subtree
,
1841 tvb
, curr_offset
, 1,
1842 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode in Band Class 1 and Band Class 4)",
1845 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x40, 8);
1846 proto_tree_add_text(subtree
,
1847 tvb
, curr_offset
, 1,
1848 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode in Band Class 0 and Band Class 3)",
1851 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x20, 8);
1852 proto_tree_add_text(subtree
,
1853 tvb
, curr_offset
, 1,
1854 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1857 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x10, 8);
1858 proto_tree_add_text(subtree
,
1859 tvb
, curr_offset
, 1,
1860 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1863 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x08, 8);
1864 proto_tree_add_text(subtree
,
1865 tvb
, curr_offset
, 1,
1866 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1871 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x80, 8);
1872 proto_tree_add_text(subtree
,
1873 tvb
, curr_offset
, 1,
1874 "%s : Band Class Air Interfaces OP_MODE0 (CDMA mode)",
1877 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x40, 8);
1878 proto_tree_add_text(subtree
,
1879 tvb
, curr_offset
, 1,
1880 "%s : Band Class Air Interfaces OP_MODE1 (CDMA mode)",
1883 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x20, 8);
1884 proto_tree_add_text(subtree
,
1885 tvb
, curr_offset
, 1,
1886 "%s : Band Class Air Interfaces OP_MODE2 (Analog mode)",
1889 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x10, 8);
1890 proto_tree_add_text(subtree
,
1891 tvb
, curr_offset
, 1,
1892 "%s : Band Class Air Interfaces OP_MODE3 (Wide analog mode)",
1895 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x08, 8);
1896 proto_tree_add_text(subtree
,
1897 tvb
, curr_offset
, 1,
1898 "%s : Band Class Air Interfaces OP_MODE4 (Narrow analog mode)",
1902 other_decode_bitfield_value(a_bigbuf
, oct2
, 0x07, 8);
1903 proto_tree_add_text(subtree
,
1904 tvb
, curr_offset
, 1,
1910 proto_tree_add_text(subtree
,
1911 tvb
, curr_offset
, 1,
1912 "Band Class MS Protocol Level: %u",
1917 proto_item_append_text(item
, ": (%d)", band_class
);
1921 while (((len
- (curr_offset
- offset
)) >= 3) &&
1922 (num_bands
< band_class_count
));
1925 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
1927 return(curr_offset
- offset
);
1934 elem_mid(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
1939 guint32 curr_offset
;
1942 curr_offset
= offset
;
1944 oct
= tvb_get_guint8(tvb
, curr_offset
);
1949 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
1950 proto_tree_add_text(tree
,
1951 tvb
, curr_offset
, 1,
1952 "%s : MEID Hex Digit 1: %X",
1956 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
1957 proto_tree_add_text(tree
,
1958 tvb
, curr_offset
, 1,
1959 "%s : Odd/Even Indicator: %s",
1961 (oct
& 0x08) ? "ODD" : "EVEN");
1963 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
1964 proto_tree_add_text(tree
,
1965 tvb
, curr_offset
, 1,
1966 "%s : Type of Identity: MEID",
1969 a_bigbuf
[0] = Dgt_meid
.out
[(oct
& 0xf0) >> 4];
1972 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
1974 my_dgt_tbcd_unpack(&a_bigbuf
[1], poctets
, len
- (curr_offset
- offset
),
1977 curr_offset
+= len
- (curr_offset
- offset
);
1979 proto_tree_add_string_format_value(tree
,
1981 tvb
, offset
+ 1, len
- 1,
1986 g_snprintf(add_string
, string_len
, " - %s (%s)",
1992 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
1993 proto_tree_add_text(tree
,
1994 tvb
, curr_offset
, 1,
1998 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
1999 proto_tree_add_text(tree
,
2000 tvb
, curr_offset
, 1,
2001 "%s : Type of Identity: Broadcast",
2006 oct
= tvb_get_guint8(tvb
, curr_offset
);
2008 switch ((oct
& 0xc0) >> 6)
2010 case 0: str
= "Normal"; break;
2011 case 1: str
= "Interactive"; break;
2012 case 2: str
= "Urgent"; break;
2018 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
2019 proto_tree_add_text(tree
,
2020 tvb
, curr_offset
, 1,
2021 "%s : Priority: %s",
2025 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
2026 proto_tree_add_text(tree
,
2027 tvb
, curr_offset
, 1,
2028 "%s : Message ID: %u",
2034 oct
= tvb_get_guint8(tvb
, curr_offset
);
2036 proto_tree_add_text(tree
,
2037 tvb
, curr_offset
, 1,
2041 g_snprintf(add_string
, string_len
, " - Broadcast (Zone ID: %u)", oct
);
2045 value
= tvb_get_ntohs(tvb
, curr_offset
);
2049 case 0x0000: str
= "Unknown or unspecified"; break;
2050 case 0x0001: str
= "Emergency Broadcasts"; break;
2051 case 0x0002: str
= "Administrative"; break;
2052 case 0x0003: str
= "Maintenance"; break;
2053 case 0x0004: str
= "General News - Local"; break;
2054 case 0x0005: str
= "General News - Regional"; break;
2055 case 0x0006: str
= "General News - National"; break;
2056 case 0x0007: str
= "General News - International"; break;
2057 case 0x0008: str
= "Business/Financial News - Local"; break;
2058 case 0x0009: str
= "Business/Financial News - Regional"; break;
2059 case 0x000A: str
= "Business/Financial News - National"; break;
2060 case 0x000B: str
= "Business/Financial News - International"; break;
2061 case 0x000C: str
= "Sports News - Local"; break;
2062 case 0x000D: str
= "Sports News - Regional"; break;
2063 case 0x000E: str
= "Sports News - National"; break;
2064 case 0x000F: str
= "Sports News - International"; break;
2065 case 0x0010: str
= "Entertainment News - Local"; break;
2066 case 0x0011: str
= "Entertainment News - Regional"; break;
2067 case 0x0012: str
= "Entertainment News - National"; break;
2068 case 0x0013: str
= "Entertainment News - International"; break;
2069 case 0x0014: str
= "Local Weather"; break;
2070 case 0x0015: str
= "Area Traffic Reports"; break;
2071 case 0x0016: str
= "Local Airport Flight Schedules"; break;
2072 case 0x0017: str
= "Restaurants"; break;
2073 case 0x0018: str
= "Lodgings"; break;
2074 case 0x0019: str
= "Retail Directory"; break;
2075 case 0x001A: str
= "Advertisements"; break;
2076 case 0x001B: str
= "Stock Quotes"; break;
2077 case 0x001C: str
= "Employment Opportunities"; break;
2078 case 0x001D: str
= "Medical/Health/Hospitals"; break;
2079 case 0x001E: str
= "Technology News"; break;
2080 case 0x001F: str
= "Multi-category"; break;
2082 if ((value
>= 0x0020) && (value
<= 0x8000)) { str
= "Reserved for standard service categories"; }
2083 else { str
= "Reserved for proprietary service categories"; }
2087 proto_tree_add_text(tree
,
2088 tvb
, curr_offset
, 2,
2095 oct
= tvb_get_guint8(tvb
, curr_offset
);
2099 case 0: str
= "Unknown or unspecified"; break;
2100 case 1: str
= "English"; break;
2101 case 2: str
= "French"; break;
2102 case 3: str
= "Spanish"; break;
2103 case 4: str
= "Japanese"; break;
2104 case 5: str
= "Korean"; break;
2105 case 6: str
= "Chinese"; break;
2106 case 7: str
= "Hebrew"; break;
2112 proto_tree_add_text(tree
,
2113 tvb
, curr_offset
, 1,
2114 "Language: (%u) %s",
2122 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2123 proto_tree_add_text(tree
,
2124 tvb
, curr_offset
, 1,
2128 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
2129 proto_tree_add_text(tree
,
2130 tvb
, curr_offset
, 1,
2131 "%s : Odd/Even Indicator: %s",
2133 (oct
& 0x08) ? "ODD" : "EVEN");
2135 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
2136 proto_tree_add_text(tree
,
2137 tvb
, curr_offset
, 1,
2138 "%s : Type of Identity: No Identity Code",
2141 g_snprintf(add_string
, string_len
, " - No Identity Code");
2147 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- 1,
2148 "Format not supported");
2151 curr_offset
+= len
- 1;
2155 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2156 proto_tree_add_text(tree
,
2157 tvb
, curr_offset
, 1,
2158 "%s : Identity Digit 1: %c",
2160 Dgt_msid
.out
[(oct
& 0xf0) >> 4]);
2162 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
2163 proto_tree_add_text(tree
,
2164 tvb
, curr_offset
, 1,
2165 "%s : Odd/Even Indicator: %s",
2167 (oct
& 0x08) ? "ODD" : "EVEN");
2169 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
2170 proto_tree_add_text(tree
,
2171 tvb
, curr_offset
, 1,
2172 "%s : Type of Identity: %s",
2174 ((oct
& 0x07) == 1) ? "MIN" : "IMSI");
2176 a_bigbuf
[0] = Dgt_msid
.out
[(oct
& 0xf0) >> 4];
2179 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
2181 my_dgt_tbcd_unpack(&a_bigbuf
[1], poctets
, len
- (curr_offset
- offset
),
2184 proto_tree_add_string_format(tree
,
2185 ((oct
& 0x07) == 1) ? hf_ansi_a_min
: hf_ansi_a_imsi
,
2186 tvb
, curr_offset
, len
- (curr_offset
- offset
),
2191 g_snprintf(add_string
, string_len
, " - %s (%s)",
2192 ((oct
& 0x07) == 1) ? "MIN" : "IMSI",
2195 curr_offset
+= len
- (curr_offset
- offset
);
2199 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2200 proto_tree_add_text(tree
,
2201 tvb
, curr_offset
, 1,
2205 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
2206 proto_tree_add_text(tree
,
2207 tvb
, curr_offset
, 1,
2208 "%s : Odd/Even Indicator: %s",
2210 (oct
& 0x08) ? "ODD" : "EVEN");
2212 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
2213 proto_tree_add_text(tree
,
2214 tvb
, curr_offset
, 1,
2215 "%s : Type of Identity: Interface Directory Number",
2218 g_snprintf(add_string
, string_len
, " - Interface Directory Number");
2224 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- 1,
2225 "Format not supported");
2228 curr_offset
+= len
- 1;
2232 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2233 proto_tree_add_text(tree
,
2234 tvb
, curr_offset
, 1,
2238 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
2239 proto_tree_add_text(tree
,
2240 tvb
, curr_offset
, 1,
2241 "%s : Odd/Even Indicator: %s",
2243 (oct
& 0x08) ? "ODD" : "EVEN");
2245 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
2246 proto_tree_add_text(tree
,
2247 tvb
, curr_offset
, 1,
2248 "%s : Type of Identity: TMSI",
2251 g_snprintf(add_string
, string_len
, " - TMSI");
2257 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- 1,
2258 "Format not supported");
2261 curr_offset
+= len
- 1;
2265 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2266 proto_tree_add_text(tree
,
2267 tvb
, curr_offset
, 1,
2271 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
2272 proto_tree_add_text(tree
,
2273 tvb
, curr_offset
, 1,
2274 "%s : Odd/Even Indicator: %s",
2276 (oct
& 0x08) ? "ODD" : "EVEN");
2278 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
2279 proto_tree_add_text(tree
,
2280 tvb
, curr_offset
, 1,
2281 "%s : Type of Identity: ESN",
2286 value
= tvb_get_ntohl(tvb
, curr_offset
);
2288 proto_tree_add_uint(tree
, hf_ansi_a_esn
,
2289 tvb
, curr_offset
, 4,
2292 g_snprintf(add_string
, string_len
, " - %sESN (0x%04x)",
2293 a_meid_configured
? "p" : "",
2300 proto_tree_add_text(tree
, tvb
, curr_offset
, len
,
2303 g_snprintf(add_string
, string_len
, " - Format Unknown");
2309 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
2311 return(curr_offset
- offset
);
2318 elem_sci(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
2321 guint32 curr_offset
;
2323 curr_offset
= offset
;
2325 oct
= tvb_get_guint8(tvb
, curr_offset
);
2327 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
2328 proto_tree_add_text(tree
,
2329 tvb
, curr_offset
, 1,
2333 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
2334 proto_tree_add_text(tree
,
2335 tvb
, curr_offset
, 1,
2336 "%s : Slot Cycle Index: %u",
2340 g_snprintf(add_string
, string_len
, " - (%u)", oct
& 0x07);
2344 /* no length check possible */
2346 return(curr_offset
- offset
);
2353 elem_prio(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2356 guint32 curr_offset
;
2358 curr_offset
= offset
;
2360 oct
= tvb_get_guint8(tvb
, curr_offset
);
2362 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
2363 proto_tree_add_text(tree
,
2364 tvb
, curr_offset
, 1,
2368 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3c, 8);
2369 proto_tree_add_text(tree
,
2370 tvb
, curr_offset
, 1,
2371 "%s : Call Priority Level: %u",
2375 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
2376 proto_tree_add_text(tree
,
2377 tvb
, curr_offset
, 1,
2378 "%s : Queuing %sallowed",
2380 (oct
& 0x02) ? "" : "not ");
2382 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
2383 proto_tree_add_text(tree
,
2384 tvb
, curr_offset
, 1,
2385 "%s : Preemption %sallowed",
2387 (oct
& 0x01) ? "" : "not ");
2389 g_snprintf(add_string
, string_len
, " - (%u)", (oct
& 0x3c) >> 2);
2393 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
2395 return(curr_offset
- offset
);
2402 elem_p_rev(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2405 guint32 curr_offset
;
2407 curr_offset
= offset
;
2409 oct
= tvb_get_guint8(tvb
, curr_offset
);
2411 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
2414 g_snprintf(add_string
, string_len
, " - (%u)", oct
);
2418 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
2420 return(curr_offset
- offset
);
2427 elem_cause(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2431 guint32 curr_offset
;
2432 const gchar
*str
= NULL
;
2434 curr_offset
= offset
;
2436 oct
= tvb_get_guint8(tvb
, curr_offset
);
2438 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
2439 proto_tree_add_text(tree
,
2440 tvb
, curr_offset
, 1,
2448 if ((oct
& 0x0f) == 0x00)
2450 /* national cause */
2451 switch ((oct
& 0x70) >> 4)
2453 case 0: str
= "Normal Event"; break;
2454 case 1: str
= "Normal Event"; break;
2455 case 2: str
= "Resource Unavailable"; break;
2456 case 3: str
= "Service or option not available"; break;
2457 case 4: str
= "Service or option not implemented"; break;
2458 case 5: str
= "Invalid message (e.g., parameter out of range)"; break;
2459 case 6: str
= "Protocol error"; break;
2461 str
= "Interworking";
2465 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
2466 proto_tree_add_text(tree
,
2467 tvb
, curr_offset
, 1,
2468 "%s : Cause Class: %s",
2472 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
2473 proto_tree_add_text(tree
,
2474 tvb
, curr_offset
, 1,
2475 "%s : National Cause",
2480 value
= tvb_get_guint8(tvb
, curr_offset
);
2482 proto_tree_add_uint_format(tree
, hf_ansi_a_cause_2
, tvb
,
2484 ((oct
& 0x7f) << 8) | value
,
2489 g_snprintf(add_string
, string_len
, " - (National Cause)");
2493 value
= tvb_get_guint8(tvb
, curr_offset
+ 1);
2495 other_decode_bitfield_value(a_bigbuf
, oct
, 0x7f, 8);
2497 proto_tree_add_uint_format(tree
, hf_ansi_a_cause_2
, tvb
,
2499 ((oct
& 0x7f) << 8) | value
,
2500 "%s : Cause (MSB): %u",
2502 ((oct
& 0x7f) << 8) | value
);
2506 other_decode_bitfield_value(a_bigbuf
, value
, 0xff, 8);
2507 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
2518 case 0x00: str
= "Radio interface message failure"; break;
2519 case 0x01: str
= "Radio interface failure"; break;
2520 case 0x02: str
= "Uplink Quality"; break;
2521 case 0x03: str
= "Uplink strength"; break;
2522 case 0x04: str
= "Downlink quality"; break;
2523 case 0x05: str
= "Downlink strength"; break;
2524 case 0x06: str
= "Distance"; break;
2525 case 0x07: str
= "OAM&P intervention"; break;
2526 case 0x08: str
= "MS busy"; break;
2527 case 0x09: str
= "Call processing"; break;
2528 case 0x0A: str
= "Reversion to old channel"; break;
2529 case 0x0B: str
= "Handoff successful"; break;
2530 case 0x0C: str
= "No response from MS"; break;
2531 case 0x0D: str
= "Timer expired"; break;
2532 case 0x0E: str
= "Better cell (power budget)"; break;
2533 case 0x0F: str
= "Interference"; break;
2534 case 0x10: str
= "Packet call going dormant"; break;
2535 case 0x11: str
= "Service option not available"; break;
2537 case 0x12: str
= "Invalid Call"; break;
2538 case 0x13: str
= "Successful operation"; break;
2539 case 0x14: str
= "Normal call release"; break;
2542 case 0x15: str
= "Short data burst authentication failure"; break;
2543 case 0x17: str
= "Time critical relocation/handoff"; break;
2544 case 0x18: str
= "Network optimization"; break;
2545 case 0x19: str
= "Power down from dormant state"; break;
2546 case 0x1A: str
= "Authentication failure"; break;
2548 case 0x1B: str
= "Inter-BS Soft Handoff Drop Target"; break;
2549 case 0x1D: str
= "Intra-BS Soft Handoff Drop Target"; break;
2552 case 0x1E: str
= "Autonomous Registration by the Network"; break;
2554 case 0x20: str
= "Equipment failure"; break;
2555 case 0x21: str
= "No radio resource available"; break;
2556 case 0x22: str
= "Requested terrestrial resource unavailable"; break;
2559 case 0x23: str
= "A2p RTP Payload Type not available"; break;
2560 case 0x24: str
= "A2p Bearer Format Address Type not available"; break;
2562 case 0x25: str
= "BS not equipped"; break;
2563 case 0x26: str
= "MS not equipped (or incapable)"; break;
2566 case 0x27: str
= "2G only sector"; break;
2567 case 0x28: str
= "3G only sector"; break;
2569 case 0x29: str
= "PACA Call Queued"; break;
2572 case 0x2A: str
= "Handoff Blocked"; break;
2574 case 0x2B: str
= "Alternate signaling type reject"; break;
2577 case 0x2C: str
= "A2p Resource not available"; break;
2579 case 0x2D: str
= "PACA Queue Overflow"; break;
2580 case 0x2E: str
= "PACA Cancel Request Rejected"; break;
2581 case 0x30: str
= "Requested transcoding/rate adaptation unavailable"; break;
2582 case 0x31: str
= "Lower priority radio resources not available"; break;
2583 case 0x32: str
= "PCF resources not available"; break; /* IOS 4 */
2584 case 0x33: str
= "TFO Control request Failed"; break;
2587 case 0x34: str
= "MS rejected order"; break;
2589 case 0x40: str
= "Ciphering algorithm not supported"; break;
2590 case 0x41: str
= "Private Long Code not available or not supported."; break;
2591 case 0x42: str
= "Requested MUX option or rates not available."; break;
2592 case 0x43: str
= "Requested Privacy Configuration unavailable"; break;
2595 case 0x45: str
= "PDS-related capability not available or not supported"; break;
2597 case 0x50: str
= "Terrestrial circuit already allocated"; break;
2598 case 0x60: str
= "Protocol Error between BS and MSC"; break;
2599 case 0x71: str
= "ADDS message too long for delivery on the paging channel"; break;
2600 case 0x72: str
= "MS-to-IWF TCP connection failure"; break;
2601 case 0x73: str
= "ATH0 (Modem hang up) Command"; break;
2602 case 0x74: str
= "+FSH/+FHNG (Fax session ended) Command"; break;
2603 case 0x75: str
= "No carrier"; break;
2604 case 0x76: str
= "PPP protocol failure"; break;
2605 case 0x77: str
= "PPP session closed by the MS"; break;
2606 case 0x78: str
= "Do not notify MS"; break;
2607 case 0x79: str
= "PCF (or PDSN) resources are not available"; break;
2608 case 0x7A: str
= "Data ready to send"; break;
2611 case 0x7B: str
= "Concurrent authentication"; break;
2613 case 0x7F: str
= "Handoff procedure time-out"; break;
2615 str
= "Reserved for future use";
2619 other_decode_bitfield_value(a_bigbuf
, oct
, 0x7f, 8);
2620 proto_tree_add_uint_format(tree
, hf_ansi_a_cause_1
, tvb
,
2621 curr_offset
, 1, oct
,
2622 "%s : Cause: (%u) %s",
2629 g_snprintf(add_string
, string_len
, " - (%u) %s", oct
& 0x7f, str
);
2632 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
2634 return(curr_offset
- offset
);
2639 * Formats everything after the discriminator, shared function.
2642 elem_cell_id_aux(tvbuff_t
*tvb
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
, guint8 disc
)
2647 guint32 curr_offset
;
2649 curr_offset
= offset
;
2654 value
= tvb_get_ntohs(tvb
, curr_offset
);
2656 proto_tree_add_uint(tree
, hf_ansi_a_cell_ci
, tvb
,
2657 curr_offset
, 2, value
);
2661 g_snprintf(add_string
, string_len
, " - CI (%u)", value
);
2665 value
= tvb_get_ntohs(tvb
, curr_offset
);
2667 proto_tree_add_uint(tree
, hf_ansi_a_cell_lac
, tvb
,
2668 curr_offset
, 2, value
);
2672 g_snprintf(add_string
, string_len
, " - LAC (%u)", value
);
2676 market_id
= tvb_get_ntohs(tvb
, curr_offset
);
2677 switch_num
= tvb_get_guint8(tvb
, curr_offset
+ 2);
2679 value
= tvb_get_ntoh24(tvb
, curr_offset
);
2681 proto_tree_add_uint_format(tree
, hf_ansi_a_cell_mscid
, tvb
,
2682 curr_offset
, 3, value
,
2683 "Market ID %u Switch Number %u",
2684 market_id
, switch_num
);
2688 value
= tvb_get_ntohs(tvb
, curr_offset
);
2690 proto_tree_add_uint(tree
, hf_ansi_a_cell_ci
, tvb
,
2691 curr_offset
, 2, value
);
2695 g_snprintf(add_string
, string_len
, " - Market ID (%u) Switch Number (%u) CI (%u)",
2702 proto_tree_add_text(tree
, tvb
, curr_offset
, len
,
2703 "Cell ID - Non IOS format");
2709 return(curr_offset
- offset
);
2713 elem_cell_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2716 guint32 curr_offset
;
2717 const gchar
*str
= NULL
;
2719 curr_offset
= offset
;
2721 oct
= tvb_get_guint8(tvb
, curr_offset
);
2723 if (oct
>= (gint
) NUM_CELL_DISC_STR
)
2729 str
= cell_disc_str
[oct
];
2732 proto_tree_add_text(tree
,
2733 tvb
, curr_offset
, 1,
2734 "Cell Identification Discriminator: (%u) %s",
2741 elem_cell_id_aux(tvb
, tree
, curr_offset
, len
- (curr_offset
- offset
), add_string
, string_len
, oct
);
2743 /* no length check possible */
2745 return(curr_offset
- offset
);
2752 elem_cell_id_list(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2757 guint32 curr_offset
;
2758 proto_item
*item
= NULL
;
2759 proto_tree
*subtree
= NULL
;
2760 const gchar
*str
= NULL
;
2762 curr_offset
= offset
;
2764 oct
= tvb_get_guint8(tvb
, curr_offset
);
2766 if (oct
>= (gint
) NUM_CELL_DISC_STR
)
2772 str
= cell_disc_str
[oct
];
2775 proto_tree_add_text(tree
,
2776 tvb
, curr_offset
, 1,
2777 "Cell Identification Discriminator: (%u) %s",
2783 NO_MORE_DATA_CHECK(len
);
2789 proto_tree_add_text(tree
,
2790 tvb
, curr_offset
, -1,
2794 subtree
= proto_item_add_subtree(item
, ett_cell_list
);
2796 add_string
[0] = '\0';
2798 elem_cell_id_aux(tvb
, subtree
, curr_offset
, len
- (curr_offset
- offset
), add_string
, string_len
, oct
);
2800 if (add_string
[0] != '\0')
2802 proto_item_append_text(item
, "%s", add_string
);
2805 proto_item_set_len(item
, consumed
);
2807 curr_offset
+= consumed
;
2811 while ((len
- (curr_offset
- offset
)) > 0);
2813 g_snprintf(add_string
, string_len
, " - %u cell%s",
2814 num_cells
, plurality(num_cells
, "", "s"));
2816 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
2818 return(curr_offset
- offset
);
2825 elem_cic(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
2828 guint32 curr_offset
;
2830 curr_offset
= offset
;
2832 value
= tvb_get_ntohs(tvb
, curr_offset
);
2834 other_decode_bitfield_value(a_bigbuf
, value
, 0xffe0, 16);
2835 proto_tree_add_text(tree
,
2836 tvb
, curr_offset
, 2,
2837 "%s : PCM Multiplexer: %u",
2839 (value
& 0xffe0) >> 5);
2841 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
2842 proto_tree_add_text(tree
,
2843 tvb
, curr_offset
, 2,
2844 "%s : Timeslot: %u",
2850 g_snprintf(add_string
, string_len
, " - (%u) (0x%04x)", value
, value
);
2852 /* no length check possible */
2854 return(curr_offset
- offset
);
2861 elem_cic_ext(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
2865 guint32 curr_offset
;
2868 curr_offset
= offset
;
2870 value
= tvb_get_ntohs(tvb
, curr_offset
);
2872 other_decode_bitfield_value(a_bigbuf
, value
, 0xffe0, 16);
2873 proto_tree_add_text(tree
,
2874 tvb
, curr_offset
, 2,
2875 "%s : PCM Multiplexer: %u",
2877 (value
& 0xffe0) >> 5);
2879 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
2880 proto_tree_add_text(tree
,
2881 tvb
, curr_offset
, 2,
2882 "%s : Timeslot: %u",
2888 g_snprintf(add_string
, string_len
, " - (%u) (0x%04x)", value
, value
);
2890 oct
= tvb_get_guint8(tvb
, curr_offset
);
2892 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
2893 proto_tree_add_text(tree
,
2894 tvb
, curr_offset
, 1,
2900 case 0x00: str
= "Full-rate"; break;
2906 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
2907 proto_tree_add_text(tree
,
2908 tvb
, curr_offset
, 1,
2909 "%s : Circuit Mode: %s",
2915 /* no length check possible */
2917 return(curr_offset
- offset
);
2924 elem_ssci(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
2927 guint32 curr_offset
;
2929 curr_offset
= offset
;
2931 oct
= tvb_get_guint8(tvb
, curr_offset
);
2933 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
2934 proto_tree_add_text(tree
,
2935 tvb
, curr_offset
, 1,
2939 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
2940 proto_tree_add_text(tree
,
2941 tvb
, curr_offset
, 1,
2942 "%s : Mobile Originated Position Determination",
2945 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
2946 proto_tree_add_text(tree
,
2947 tvb
, curr_offset
, 1,
2948 "%s : Global Emergency Call Indication",
2953 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
2955 return(curr_offset
- offset
);
2963 #define ANSI_A_CELL_ID_LEN(_disc) ((_disc == 7) ? 5 : 2)
2967 * Formats everything no length check
2970 elem_downlink_re_aux(tvbuff_t
*tvb
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
2978 guint32 curr_offset
;
2979 proto_item
*item
= NULL
;
2980 proto_tree
*subtree
= NULL
;
2983 curr_offset
= offset
;
2985 num_cells
= tvb_get_guint8(tvb
, curr_offset
);
2987 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
2988 "Number of Cells: %u",
2993 NO_MORE_DATA_CHECK(len
);
2995 disc
= tvb_get_guint8(tvb
, curr_offset
);
2997 if (disc
>= (gint
) NUM_CELL_DISC_STR
)
3003 str
= cell_disc_str
[disc
];
3006 proto_tree_add_text(tree
,
3007 tvb
, curr_offset
, 1,
3008 "Cell Identification Discriminator: (%u) %s",
3014 NO_MORE_DATA_CHECK(len
);
3016 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), (guint32
) 3 + ANSI_A_CELL_ID_LEN(disc
));
3025 proto_tree_add_text(tree
,
3026 tvb
, curr_offset
, -1,
3030 subtree
= proto_item_add_subtree(item
, ett_cell_list
);
3032 add_string
[0] = '\0';
3034 elem_cell_id_aux(tvb
, subtree
, curr_offset
,
3035 len
- (curr_offset
- offset
), add_string
, string_len
, disc
);
3037 if (add_string
[0] != '\0')
3039 proto_item_append_text(item
, "%s", add_string
);
3042 proto_item_set_len(item
, consumed
);
3044 curr_offset
+= consumed
;
3046 oct
= tvb_get_guint8(tvb
, curr_offset
);
3048 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
3049 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3053 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
3054 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3055 "%s : Downlink Signal Strength Raw: %u",
3061 value
= tvb_get_ntohs(tvb
, curr_offset
);
3063 proto_tree_add_text(tree
,
3064 tvb
, curr_offset
, 2,
3065 "CDMA Target One Way Delay: %u",
3070 while (curr_cell
< num_cells
);
3072 g_snprintf(add_string
, string_len
, " - %u cell%s",
3073 num_cells
, plurality(num_cells
, "", "s"));
3075 return(curr_offset
- offset
);
3082 elem_downlink_re(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3084 guint32 curr_offset
;
3086 curr_offset
= offset
;
3089 elem_downlink_re_aux(tvb
, tree
, offset
, len
, add_string
, string_len
);
3091 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3093 return(curr_offset
- offset
);
3100 elem_downlink_re_list(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3105 guint32 curr_offset
;
3106 proto_item
*item
= NULL
;
3107 proto_tree
*subtree
= NULL
;
3109 curr_offset
= offset
;
3113 while ((len
- (curr_offset
- offset
)) > 0)
3118 proto_tree_add_text(tree
,
3119 tvb
, curr_offset
, -1,
3123 subtree
= proto_item_add_subtree(item
, ett_re_list
);
3125 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
3127 proto_tree_add_text(subtree
,
3128 tvb
, curr_offset
, 1,
3129 "Environment Length: %u",
3134 add_string
[0] = '\0';
3136 elem_downlink_re_aux(tvb
, subtree
, curr_offset
, len
- (curr_offset
- offset
), add_string
, string_len
);
3138 if (add_string
[0] != '\0')
3140 proto_item_append_text(item
, "%s", add_string
);
3144 * +1 is for environment length
3146 proto_item_set_len(item
, consumed
+ 1);
3148 curr_offset
+= consumed
;
3151 g_snprintf(add_string
, string_len
, " - %u environment%s",
3152 num_envs
, plurality(num_envs
, "", "s"));
3154 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3156 return(curr_offset
- offset
);
3183 elem_pdsn_ip_addr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3185 guint32 curr_offset
;
3187 curr_offset
= offset
;
3189 proto_tree_add_item(tree
, hf_ansi_a_pdsn_ip_addr
, tvb
, curr_offset
, len
, ENC_BIG_ENDIAN
);
3193 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3195 return(curr_offset
- offset
);
3202 elem_s_pdsn_ip_addr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3204 guint32 curr_offset
;
3206 curr_offset
= offset
;
3208 proto_tree_add_item(tree
, hf_ansi_a_s_pdsn_ip_addr
, tvb
, curr_offset
, len
, ENC_BIG_ENDIAN
);
3212 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3214 return(curr_offset
- offset
);
3221 elem_ho_pow_lev(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3226 proto_item
*item
= NULL
;
3227 proto_tree
*subtree
= NULL
;
3228 guint32 curr_offset
;
3230 curr_offset
= offset
;
3232 oct
= tvb_get_guint8(tvb
, curr_offset
);
3234 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3235 "Number of Cells: %u",
3240 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), (guint32
) 6);
3242 oct
= tvb_get_guint8(tvb
, curr_offset
);
3244 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3245 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3249 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
3250 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3255 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
3256 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3257 "%s : Handoff Power Level: %u",
3264 proto_tree_add_text(tree
,
3265 tvb
, curr_offset
, -1,
3268 subtree
= proto_item_add_subtree(item
, ett_cell_list
);
3270 add_string
[0] = '\0';
3272 elem_cell_id_aux(tvb
, subtree
, curr_offset
,
3273 len
- (curr_offset
- offset
), add_string
, string_len
, 0x7);
3275 if (add_string
[0] != '\0')
3277 proto_item_append_text(item
, "%s", add_string
);
3280 proto_item_set_len(item
, consumed
);
3282 curr_offset
+= consumed
;
3286 while ((len
- (curr_offset
- offset
)) >= 3)
3290 oct
= tvb_get_guint8(tvb
, curr_offset
);
3292 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
3293 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3297 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
3298 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3299 "%s : Handoff Power Level: %u",
3306 proto_tree_add_text(tree
,
3307 tvb
, curr_offset
, -1,
3311 subtree
= proto_item_add_subtree(item
, ett_cell_list
);
3313 add_string
[0] = '\0';
3315 elem_cell_id_aux(tvb
, subtree
, curr_offset
,
3316 len
- (curr_offset
- offset
), add_string
, string_len
, 0x2);
3318 if (add_string
[0] != '\0')
3320 proto_item_append_text(item
, "%s", add_string
);
3323 proto_item_set_len(item
, consumed
);
3325 curr_offset
+= consumed
;
3328 g_snprintf(add_string
, string_len
, " - %u cell%s",
3329 num_cells
, plurality(num_cells
, "", "s"));
3331 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3333 return(curr_offset
- offset
);
3340 elem_uz_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3343 guint32 curr_offset
;
3345 curr_offset
= offset
;
3347 value
= tvb_get_ntohs(tvb
, curr_offset
);
3349 proto_tree_add_text(tree
, tvb
, curr_offset
, 2,
3355 g_snprintf(add_string
, string_len
, " - (%u)", value
);
3357 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3359 return(curr_offset
- offset
);
3371 elem_info_rec_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3375 guint32 curr_offset
;
3379 curr_offset
= offset
;
3383 while ((len
- (curr_offset
- offset
)) > 0)
3387 rec_type
= tvb_get_guint8(tvb
, curr_offset
);
3389 str
= try_val_to_str_idx((guint32
) rec_type
, ansi_rev_ms_info_rec_str
, &idx
);
3396 proto_tree_add_text(tree
,
3397 tvb
, curr_offset
, 1,
3398 "Information Record Type - %u: (%u) %s",
3406 g_snprintf(add_string
, string_len
, " - %u request%s",
3407 num_recs
, plurality(num_recs
, "", "s"));
3409 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3411 return(curr_offset
- offset
);
3418 elem_is2000_chan_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3423 guint32 curr_offset
;
3426 curr_offset
= offset
;
3428 oct
= tvb_get_guint8(tvb
, curr_offset
);
3430 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3431 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3432 "%s : OTD: Mobile will %sbe using OTD",
3434 (oct
& 0x80) ? "" : "not ");
3436 num_chan
= (oct
& 0x70) >> 4;
3438 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
3439 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3440 "%s : Channel Count: %u",
3444 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
3445 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3446 "%s : Frame Offset: (%u), %.2f ms",
3449 (oct
& 0x0f) * 1.25);
3453 NO_MORE_DATA_CHECK(len
);
3455 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 6);
3459 oct
= tvb_get_guint8(tvb
, curr_offset
);
3463 case 0x01: str
= "Fundamental Channel (FCH) TIA/EIA/IS-2000"; break;
3464 case 0x02: str
= "Dedicated Control Channel (DCCH) TIA/EIA/IS-2000"; break;
3465 case 0x03: str
= "Supplemental Channel (SCH) TIA/EIA/IS-2000"; break;
3467 if ((oct
>= 0x80) && (oct
<= 0x9f)) { str
= "Reserved for UMTS"; }
3468 else { str
= "Reserved"; }
3472 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3473 "Physical Channel Type: %s",
3478 oct
= tvb_get_guint8(tvb
, curr_offset
);
3480 switch (global_a_variant
)
3482 case A_VARIANT_IOS401
:
3483 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3484 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3489 case A_VARIANT_IOS501
:
3490 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3491 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3492 "%s : Rev_FCH_Gating",
3497 switch ((oct
& 0x60) >> 5)
3499 case 0: str
= "Gating rate 1"; break;
3500 case 1: str
= "Gating rate 1/2"; break;
3501 case 2: str
= "Gating rate 1/4"; break;
3507 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
3508 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3509 "%s : Pilot Gating Rate: %s",
3513 other_decode_bitfield_value(a_bigbuf
, oct
, 0x18, 8);
3514 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3518 value
= tvb_get_guint8(tvb
, curr_offset
+ 1);
3520 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
3521 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3522 "%s : Walsh Code Channel Index (MSB): %u",
3524 ((guint32
) (oct
& 0x07) << 8) | value
);
3528 other_decode_bitfield_value(a_bigbuf
, value
, 0xff, 8);
3529 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3530 "%s : Walsh Code Channel Index (LSB)",
3535 oct
= tvb_get_guint8(tvb
, curr_offset
);
3537 other_decode_bitfield_value(a_bigbuf
, oct
, 0xff, 8);
3538 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3539 "%s : Pilot PN Code (LSB)",
3545 oct
= tvb_get_guint8(tvb
, curr_offset
);
3546 value
|= ((guint32
) (oct
& 0x80)) << 1;
3548 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3549 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3550 "%s : Pilot PN Code (MSB): %u",
3554 switch (global_a_variant
)
3556 case A_VARIANT_IOS401
:
3557 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
3558 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3563 case A_VARIANT_IOS501
:
3564 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
3565 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3569 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
3570 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3571 "%s : Power Combined",
3576 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
3577 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3578 "%s : Frequency Included",
3581 value
= tvb_get_guint8(tvb
, curr_offset
+ 1) | ((oct
& 0x07) << 8);
3583 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
3584 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3585 "%s : ARFCN (MSB): %u",
3591 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
3592 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3598 while ((len
- (curr_offset
- offset
)) >= 6);
3600 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3602 return(curr_offset
- offset
);
3607 * NO ASSOCIATED DATA
3614 elem_is95_ms_meas_chan_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3619 guint32 curr_offset
;
3622 curr_offset
= offset
;
3624 oct
= tvb_get_guint8(tvb
, curr_offset
);
3626 temp_int
= (oct
& 0xf8) >> 3;
3627 if ((temp_int
< 0) || (temp_int
>= (gint
) NUM_BAND_CLASS_STR
))
3633 str
= band_class_str
[temp_int
];
3636 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
3637 proto_tree_add_text(tree
,
3638 tvb
, curr_offset
, 1,
3639 "%s : Band Class: %s",
3643 value
= tvb_get_guint8(tvb
, curr_offset
+ 1) | ((oct
& 0x07) << 8);
3645 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
3646 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3647 "%s : ARFCN (MSB): %u",
3653 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
3654 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3658 g_snprintf(add_string
, string_len
, " - (ARFCN: %u)", value
);
3662 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3664 return(curr_offset
- offset
);
3671 elem_clg_party_ascii_num(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
3674 guint32 curr_offset
;
3678 curr_offset
= offset
;
3680 oct
= tvb_get_guint8(tvb
, curr_offset
);
3682 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3683 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3684 "%s : Extension: %s",
3686 (oct
& 0x80) ? "Not extended" : "Extended");
3688 switch ((oct
& 0x70) >> 4)
3690 case 0: str
= "Unknown"; break;
3691 case 1: str
= "International number"; break;
3692 case 2: str
= "National number"; break;
3693 case 3: str
= "Network-specific number"; break;
3694 case 4: str
= "Dedicated PAD access, short code"; break;
3695 case 5: str
= "Reserved"; break;
3696 case 6: str
= "Reserved"; break;
3698 str
= "Reserved for extension";
3702 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
3703 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3704 "%s : Type of Number: %s",
3710 case 0x00: str
= "Unknown"; break;
3711 case 0x01: str
= "ISDN/Telephony Numbering (ITU recommendation E.164/E.163)"; break;
3712 case 0x03: str
= "Data Numbering (ITU-T Rec. X.121)"; break;
3713 case 0x04: str
= "Telex Numbering (ITU-T Rec. F.69)"; break;
3714 case 0x07: str
= "Reserved for extension"; break;
3715 case 0x08: str
= "National Numbering"; break;
3716 case 0x09: str
= "Private Numbering"; break;
3722 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
3723 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3724 "%s : Number Plan Identification: %s",
3734 oct
= tvb_get_guint8(tvb
, curr_offset
);
3736 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
3737 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3741 switch ((oct
& 0x60) >> 5)
3743 case 0: str
= "Presentation allowed"; break;
3744 case 1: str
= "Presentation restricted"; break;
3745 case 2: str
= "Number not available due to interworking"; break;
3751 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
3752 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3753 "%s : Presentation Indicator: %s",
3759 case 0: str
= "User-provided, not screened"; break;
3760 case 1: str
= "User-provided, verified and passed"; break;
3761 case 2: str
= "User-provided, verified and failed"; break;
3763 str
= "Network-provided";
3767 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1c, 8);
3768 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3772 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
3773 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
3774 "%s : Screening Indicator: %s",
3781 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
3783 proto_tree_add_string_format(tree
, hf_ansi_a_clg_party_ascii_num
,
3784 tvb
, curr_offset
, len
- (curr_offset
- offset
),
3787 (gchar
*) format_text(poctets
, len
- (curr_offset
- offset
)));
3789 curr_offset
+= len
- (curr_offset
- offset
);
3791 g_snprintf(add_string
, string_len
, " - (%s)", poctets
);
3793 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3795 return(curr_offset
- offset
);
3802 elem_l3_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3804 guint32 curr_offset
;
3807 curr_offset
= offset
;
3809 proto_tree_add_text(tree
, tvb
, curr_offset
, len
,
3810 "Layer 3 Information");
3813 * dissect the embedded DTAP message
3815 l3_tvb
= tvb_new_subset(tvb
, curr_offset
, len
, len
);
3817 call_dissector(dtap_handle
, l3_tvb
, pinfo
, g_tree
);
3821 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3823 return(curr_offset
- offset
);
3828 * Protocol Discriminator
3838 * Location Updating Type
3844 * Simple data no decode required
3851 elem_lai(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
3855 guint32 curr_offset
;
3859 curr_offset
= offset
;
3861 oct
= tvb_get_guint8(tvb
, curr_offset
);
3863 mcc
[0] = Dgt_tbcd
.out
[oct
& 0x0f];
3864 mcc
[1] = Dgt_tbcd
.out
[(oct
& 0xf0) >> 4];
3866 oct
= tvb_get_guint8(tvb
, curr_offset
+1);
3868 mcc
[2] = Dgt_tbcd
.out
[(oct
& 0x0f)];
3871 mnc
[2] = Dgt_tbcd
.out
[(oct
& 0xf0) >> 4];
3873 oct
= tvb_get_guint8(tvb
, curr_offset
+2);
3875 mnc
[0] = Dgt_tbcd
.out
[(oct
& 0x0f)];
3876 mnc
[1] = Dgt_tbcd
.out
[(oct
& 0xf0) >> 4];
3879 proto_tree_add_text(tree
,
3880 tvb
, curr_offset
, 3,
3881 "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
3887 value
= tvb_get_ntohs(tvb
, curr_offset
);
3889 proto_tree_add_text(tree
,
3890 tvb
, curr_offset
, 2,
3891 "Location Area Code (LAC): 0x%04x (%u)",
3897 /* no length check possible */
3899 return(curr_offset
- offset
);
3906 elem_rej_cause(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
3909 guint32 curr_offset
;
3912 curr_offset
= offset
;
3914 oct
= tvb_get_guint8(tvb
, curr_offset
);
3918 case 0x01: str
= "Reserved"; break;
3919 case 0x02: str
= "MIN/IMSI unknown in HLR"; break;
3920 case 0x03: str
= "Illegal MS"; break;
3921 case 0x04: str
= "TMSI/IMSI/MIN unknown in VLR"; break;
3922 case 0x05: str
= "Reserved"; break;
3923 case 0x0b: str
= "Roaming not allowed"; break;
3924 case 0x0c: str
= "Location area not allowed"; break;
3925 case 0x20: str
= "Service option not supported"; break;
3926 case 0x21: str
= "Requested service option not subscribed"; break;
3927 case 0x22: str
= "Service option temporarily out of order"; break;
3928 case 0x26: str
= "Call cannot be identified"; break;
3929 case 0x51: str
= "Network failure"; break;
3930 case 0x56: str
= "Congestion"; break;
3931 case 0x62: str
= "Message type non-existent or not implemented"; break;
3932 case 0x63: str
= "Information element non-existent or not implemented"; break;
3933 case 0x64: str
= "Invalid information element contents"; break;
3934 case 0x65: str
= "Message not compatible with the call state"; break;
3935 case 0x66: str
= "Protocol error, unspecified"; break;
3936 case 0x6e: str
= "Invalid message, unspecified"; break;
3937 case 0x6f: str
= "Mandatory information element error"; break;
3943 proto_tree_add_text(tree
,
3944 tvb
, curr_offset
, 1,
3945 "Reject Cause Value: (%u) %s",
3951 g_snprintf(add_string
, string_len
, " - (%s)", str
);
3953 /* no length check possible */
3955 return(curr_offset
- offset
);
3962 elem_anchor_pdsn_addr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3964 guint32 curr_offset
;
3966 curr_offset
= offset
;
3968 proto_tree_add_item(tree
, hf_ansi_a_anchor_ip_addr
, tvb
, curr_offset
, len
, ENC_BIG_ENDIAN
);
3972 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3974 return(curr_offset
- offset
);
3981 elem_anchor_pp_addr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
3983 guint32 curr_offset
;
3985 curr_offset
= offset
;
3987 proto_tree_add_item(tree
, hf_ansi_a_anchor_pp_ip_addr
, tvb
, curr_offset
, len
, ENC_BIG_ENDIAN
);
3991 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
3993 return(curr_offset
- offset
);
4000 elem_auth_chlg_param(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4003 guint32 curr_offset
;
4006 curr_offset
= offset
;
4008 oct
= tvb_get_guint8(tvb
, curr_offset
);
4010 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
4011 proto_tree_add_text(tree
,
4012 tvb
, curr_offset
, 1,
4018 case 1: str
= "RAND 32 bits"; break;
4019 case 2: str
= "RANDU 24 bits"; break;
4020 case 4: str
= "RANDSSD 56 bits"; break;
4021 case 8: str
= "RANDBS 32 bits"; break;
4027 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4028 proto_tree_add_text(tree
,
4029 tvb
, curr_offset
, 1,
4030 "%s : Random Number Type: (%u) %s",
4037 proto_tree_add_text(tree
,
4038 tvb
, curr_offset
, len
- (curr_offset
- offset
),
4039 "RAND/RANDU/RANDBS/RANDSSD Value");
4041 g_snprintf(add_string
, string_len
, " - (%s)", str
);
4043 curr_offset
+= len
- (curr_offset
- offset
);
4045 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4047 return(curr_offset
- offset
);
4054 elem_auth_resp_param(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4057 guint32 curr_offset
;
4060 curr_offset
= offset
;
4062 oct
= tvb_get_guint8(tvb
, curr_offset
);
4064 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
4065 proto_tree_add_text(tree
,
4066 tvb
, curr_offset
, 1,
4072 case 1: str
= "AUTHR"; break;
4073 case 2: str
= "AUTHU"; break;
4074 case 4: str
= "AUTHBS"; break;
4080 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4081 proto_tree_add_text(tree
,
4082 tvb
, curr_offset
, 1,
4083 "%s : Auth Signature Type: (%u) %s",
4090 proto_tree_add_text(tree
,
4091 tvb
, curr_offset
, len
- (curr_offset
- offset
),
4094 g_snprintf(add_string
, string_len
, " - (%s)", str
);
4096 curr_offset
+= len
- (curr_offset
- offset
);
4098 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4100 return(curr_offset
- offset
);
4107 elem_auth_param_count(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
4110 guint32 curr_offset
;
4112 curr_offset
= offset
;
4114 oct
= tvb_get_guint8(tvb
, curr_offset
);
4116 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
4117 proto_tree_add_text(tree
,
4118 tvb
, curr_offset
, 1,
4122 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
4123 proto_tree_add_text(tree
,
4124 tvb
, curr_offset
, 1,
4131 g_snprintf(add_string
, string_len
, " - (%u)", oct
& 0x3f);
4133 /* no length check possible */
4135 return(curr_offset
- offset
);
4142 elem_mwi(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
4145 guint32 curr_offset
;
4147 curr_offset
= offset
;
4149 oct
= tvb_get_guint8(tvb
, curr_offset
);
4151 proto_tree_add_text(tree
,
4152 tvb
, curr_offset
, 1,
4153 "Number of Messages: %u",
4158 g_snprintf(add_string
, string_len
, " - (%u)", oct
);
4160 /* no length check possible */
4162 return(curr_offset
- offset
);
4168 * UNUSED in SPEC and no IEI!
4175 elem_signal(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
4178 guint32 curr_offset
;
4181 curr_offset
= offset
;
4183 oct
= tvb_get_guint8(tvb
, curr_offset
);
4187 case 0x00: str
= "Dial tone on"; break;
4188 case 0x01: str
= "Ring back tone on"; break;
4189 case 0x02: str
= "Intercept tone on"; break;
4190 case 0x03: str
= "Network congestion (reorder) tone on"; break;
4191 case 0x04: str
= "Busy tone on"; break;
4192 case 0x05: str
= "Confirm tone on"; break;
4193 case 0x06: str
= "Answer tone on"; break;
4194 case 0x07: str
= "Call waiting tone on"; break;
4195 case 0x08: str
= "Off-hook warning tone on"; break;
4196 case 0x3f: str
= "Tones off"; break;
4197 case 0x40: str
= "Normal Alerting"; break;
4198 case 0x41: str
= "Inter-group Alerting"; break;
4199 case 0x42: str
= "Special/Priority Alerting"; break;
4200 case 0x43: str
= "Reserved (ISDN Alerting pattern 3)"; break;
4201 case 0x44: str
= "Ping Ring (abbreviated alert)"; break;
4202 case 0x45: str
= "Reserved (ISDN Alerting pattern 5)"; break;
4203 case 0x46: str
= "Reserved (ISDN Alerting pattern 6)"; break;
4204 case 0x47: str
= "Reserved (ISDN Alerting pattern 7)"; break;
4205 case 0x63: str
= "Abbreviated intercept"; break;
4206 case 0x65: str
= "Abbreviated reorder"; break;
4207 case 0x4f: str
= "Alerting off"; break;
4213 proto_tree_add_text(tree
,
4214 tvb
, curr_offset
, 1,
4215 "Signal Value: (%u) %s",
4219 g_snprintf(add_string
, string_len
, " - (%s)", str
);
4223 oct
= tvb_get_guint8(tvb
, curr_offset
);
4225 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
4226 proto_tree_add_text(tree
,
4227 tvb
, curr_offset
, 1,
4233 case 0: str
= "Medium pitch (standard alert)"; break;
4234 case 1: str
= "High pitch"; break;
4235 case 2: str
= "Low pitch"; break;
4241 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
4242 proto_tree_add_text(tree
,
4243 tvb
, curr_offset
, 1,
4244 "%s : Alert Pitch: %s",
4250 /* no length check possible */
4252 return(curr_offset
- offset
);
4264 elem_cld_party_bcd_num(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4268 guint32 curr_offset
;
4271 curr_offset
= offset
;
4273 oct
= tvb_get_guint8(tvb
, curr_offset
);
4275 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
4276 proto_tree_add_text(tree
,
4277 tvb
, curr_offset
, 1,
4281 switch ((oct
& 0x70) >> 4)
4283 case 0: str
= "Unknown"; break;
4284 case 1: str
= "International number"; break;
4285 case 2: str
= "National number"; break;
4286 case 3: str
= "Network specific number"; break;
4287 case 4: str
= "Dedicated PAD access, short code"; break;
4288 case 7: str
= "Reserved for extension"; break;
4294 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
4295 proto_tree_add_text(tree
,
4296 tvb
, curr_offset
, 1,
4297 "%s : Type of Number: %s",
4303 case 0x00: str
= "Unknown"; break;
4304 case 0x01: str
= "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4305 case 0x03: str
= "Data number plan (ITU recommendation X.121)"; break;
4306 case 0x04: str
= "Telex numbering plan (ITU recommendation F.69)"; break;
4307 case 0x07: str
= "Reserved for extension"; break;
4308 case 0x08: str
= "National numbering plan"; break;
4309 case 0x09: str
= "Private numbering plan"; break;
4315 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4316 proto_tree_add_text(tree
,
4317 tvb
, curr_offset
, 1,
4318 "%s : Numbering Plan Identification: %s",
4324 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
4326 my_dgt_tbcd_unpack(a_bigbuf
, poctets
, len
- (curr_offset
- offset
),
4329 proto_tree_add_string_format(tree
, hf_ansi_a_cld_party_bcd_num
,
4330 tvb
, curr_offset
, len
- (curr_offset
- offset
),
4335 g_snprintf(add_string
, string_len
, " - (%s)", a_bigbuf
);
4337 curr_offset
+= len
- (curr_offset
- offset
);
4339 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4341 return(curr_offset
- offset
);
4346 * UNUSED in SPEC and no IEI!
4348 #ifdef MAYBE_USED_FOR_OLDER_CODECS
4350 elem_clg_party_bcd_num(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4354 guint32 curr_offset
;
4357 curr_offset
= offset
;
4359 oct
= tvb_get_guint8(tvb
, curr_offset
);
4361 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
4362 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
4363 "%s : Extension: %s",
4365 (oct
& 0x80) ? "Not extended" : "Extended");
4367 switch ((oct
& 0x70) >> 4)
4369 case 0: str
= "Unknown"; break;
4370 case 1: str
= "International number"; break;
4371 case 2: str
= "National number"; break;
4372 case 3: str
= "Network specific number"; break;
4373 case 4: str
= "Dedicated PAD access, short code"; break;
4374 case 7: str
= "Reserved for extension"; break;
4380 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
4381 proto_tree_add_text(tree
,
4382 tvb
, curr_offset
, 1,
4383 "%s : Type of Number: %s",
4389 case 0x00: str
= "Unknown"; break;
4390 case 0x01: str
= "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
4391 case 0x03: str
= "Data number plan (ITU recommendation X.121)"; break;
4392 case 0x04: str
= "Telex numbering plan (ITU recommendation F.69)"; break;
4393 case 0x07: str
= "Reserved for extension"; break;
4394 case 0x08: str
= "National numbering plan"; break;
4395 case 0x09: str
= "Private numbering plan"; break;
4401 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4402 proto_tree_add_text(tree
,
4403 tvb
, curr_offset
, 1,
4404 "%s : Numbering Plan Identification: %s",
4414 oct
= tvb_get_guint8(tvb
, curr_offset
);
4416 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
4417 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
4421 switch ((oct
& 0x60) >> 5)
4423 case 0: str
= "Presentation allowed"; break;
4424 case 1: str
= "Presentation restricted"; break;
4425 case 2: str
= "Number not available due to interworking"; break;
4431 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
4432 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
4433 "%s : Presentation Indicator: %s",
4439 case 0: str
= "User-provided, not screened"; break;
4440 case 1: str
= "User-provided, verified and passed"; break;
4441 case 2: str
= "User-provided, verified and failed"; break;
4443 str
= "Network-provided";
4447 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1c, 8);
4448 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
4452 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
4453 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
4454 "%s : Screening Indicator: %s",
4461 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
4463 my_dgt_tbcd_unpack(a_bigbuf
, poctets
, len
- (curr_offset
- offset
),
4466 proto_tree_add_string_format(tree
, hf_ansi_a_clg_party_bcd_num
,
4467 tvb
, curr_offset
, len
- (curr_offset
- offset
),
4472 g_snprintf(add_string
, string_len
, " - (%s)", a_bigbuf
);
4474 curr_offset
+= len
- (curr_offset
- offset
);
4476 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4478 return(curr_offset
- offset
);
4486 elem_qos_params(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4489 guint32 curr_offset
;
4491 curr_offset
= offset
;
4493 oct
= tvb_get_guint8(tvb
, curr_offset
);
4495 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
4496 proto_tree_add_text(tree
,
4497 tvb
, curr_offset
, 1,
4501 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4502 proto_tree_add_text(tree
,
4503 tvb
, curr_offset
, 1,
4504 "%s : Packet Priority: %u",
4508 g_snprintf(add_string
, string_len
, " - (%u)", oct
& 0x0f);
4512 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4514 return(curr_offset
- offset
);
4521 elem_cause_l3(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4524 guint32 curr_offset
;
4525 const gchar
*str
= NULL
;
4527 curr_offset
= offset
;
4529 oct
= tvb_get_guint8(tvb
, curr_offset
);
4531 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
4532 proto_tree_add_text(tree
,
4533 tvb
, curr_offset
, 1,
4537 switch ((oct
& 0x60) >> 5)
4539 case 0: str
= "Standard as described in ITU Recommendation Q.931"; break;
4540 case 1: str
= "Reserved for other international standards"; break;
4541 case 2: str
= "National standard"; break;
4543 str
= "Reserved for other international standards";
4547 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
4548 proto_tree_add_text(tree
,
4549 tvb
, curr_offset
, 1,
4550 "%s : Coding Standard: %s",
4554 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
4555 proto_tree_add_text(tree
,
4556 tvb
, curr_offset
, 1,
4562 case 0: str
= "User"; break;
4563 case 1: str
= "Private network serving the local user"; break;
4564 case 2: str
= "Public network serving the local user"; break;
4565 case 3: str
= "Transit network"; break;
4566 case 4: str
= "Public network serving the remote user"; break;
4567 case 5: str
= "Private network serving the remote user"; break;
4568 case 7: str
= "International network"; break;
4569 case 10: str
= "Network beyond interworking point"; break;
4575 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4576 proto_tree_add_text(tree
,
4577 tvb
, curr_offset
, 1,
4578 "%s : Location: %s",
4584 oct
= tvb_get_guint8(tvb
, curr_offset
);
4586 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
4587 proto_tree_add_text(tree
,
4588 tvb
, curr_offset
, 1,
4592 switch ((oct
& 0x70) >> 4)
4594 case 0: str
= "normal event"; break;
4595 case 1: str
= "normal event"; break;
4596 case 2: str
= "resource unavailable"; break;
4597 case 3: str
= "service or option not available"; break;
4598 case 4: str
= "service or option not implemented"; break;
4599 case 5: str
= "invalid message (e.g., parameter out of range)"; break;
4600 case 6: str
= "protocol error (e.g., unknown message)"; break;
4602 str
= "interworking";
4606 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
4607 proto_tree_add_text(tree
,
4608 tvb
, curr_offset
, 1,
4609 "%s : Class: (%u) %s",
4616 case 0x01: str
= "Unassigned (unallocated) number"; break;
4617 case 0x03: str
= "No route to destination"; break;
4618 case 0x06: str
= "Channel unacceptable"; break;
4619 case 0x0F: str
= "Procedure failed"; break;
4620 case 0x10: str
= "Normal Clearing"; break;
4621 case 0x11: str
= "User busy"; break;
4622 case 0x12: str
= "No user responding"; break;
4623 case 0x13: str
= "User alerting, no answer"; break;
4624 case 0x15: str
= "Call rejected"; break;
4625 case 0x16: str
= "Number changed New destination"; break;
4626 case 0x1A: str
= "Non selected user clearing"; break;
4627 case 0x1B: str
= "Destination out of order"; break;
4628 case 0x1C: str
= "Invalid number format (incomplete number)"; break;
4629 case 0x1D: str
= "Facility rejected"; break;
4630 case 0x1F: str
= "Normal, unspecified"; break;
4631 case 0x22: str
= "No circuit/channel available"; break;
4632 case 0x26: str
= "Network out of order"; break;
4633 case 0x29: str
= "Temporary failure"; break;
4634 case 0x2A: str
= "Switching equipment congestion"; break;
4635 case 0x2B: str
= "Access information discarded information element ids"; break;
4636 case 0x2C: str
= "requested circuit/channel not available"; break;
4637 case 0x2F: str
= "Resources unavailable, unspecified"; break;
4638 case 0x31: str
= "Quality of service unavailable"; break;
4639 case 0x32: str
= "Requested facility not subscribed"; break;
4640 case 0x33: str
= "Request MUX option or rates unavailable"; break;
4641 case 0x39: str
= "Bearer capability not authorized"; break;
4642 case 0x3A: str
= "Bearer capability not presently available"; break;
4643 case 0x3B: str
= "SSD Update Rejected"; break;
4644 case 0x3F: str
= "Service or option not available, unspecified"; break;
4645 case 0x41: str
= "Bearer service not implemented"; break;
4646 case 0x45: str
= "Requested facility not implement"; break;
4647 case 0x46: str
= "Only restricted digital information bearer capability is available"; break;
4648 case 0x4F: str
= "Service or option not implemented, unspecified"; break;
4649 case 0x51: str
= "Reserved"; break;
4650 case 0x58: str
= "Incompatible destination incompatible parameter"; break;
4651 case 0x5B: str
= "Invalid transit network selection"; break;
4652 case 0x5F: str
= "Invalid message, unspecified"; break;
4653 case 0x60: str
= "Mandatory information element error information element identifier(s)"; break;
4654 case 0x61: str
= "Message type nonexistent or not implemented message type"; break;
4655 case 0x62: str
= "Message not compatible with control state message type or message type nonexistent or not implemented"; break;
4656 case 0x64: str
= "Invalid information element contents Information element Identifier(s)"; break;
4657 case 0x65: str
= "Message not compatible with call state message type"; break;
4658 case 0x6F: str
= "Protocol error, unspecified"; break;
4659 case 0x7F: str
= "Interworking, unspecified"; break;
4665 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4666 proto_tree_add_text(tree
,
4667 tvb
, curr_offset
, 1,
4672 g_snprintf(add_string
, string_len
, " - (%u) %s", oct
& 0x7f, str
);
4676 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4678 return(curr_offset
- offset
);
4695 elem_xmode(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
4698 guint32 curr_offset
;
4700 curr_offset
= offset
;
4702 oct
= tvb_get_guint8(tvb
, curr_offset
);
4704 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfe, 8);
4705 proto_tree_add_text(tree
,
4706 tvb
, curr_offset
, 1,
4710 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
4711 proto_tree_add_text(tree
,
4712 tvb
, curr_offset
, 1,
4713 "%s : TFO Mode: %s",
4715 (oct
& 0x01) ? "TFO" : "tandem");
4717 g_snprintf(add_string
, string_len
, " - (%s)",
4718 (oct
& 0x01) ? "TFO" : "tandem");
4722 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
4724 return(curr_offset
- offset
);
4734 * NO ASSOCIATED DATA
4741 elem_reg_type(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
4744 guint32 curr_offset
;
4747 curr_offset
= offset
;
4749 oct
= tvb_get_guint8(tvb
, curr_offset
);
4753 case 0x00: str
= "Timer-based"; break;
4754 case 0x01: str
= "Power-up"; break;
4755 case 0x02: str
= "Zone-based"; break;
4756 case 0x03: str
= "Power-down"; break;
4757 case 0x04: str
= "Parameter-change"; break;
4758 case 0x05: str
= "Ordered"; break;
4759 case 0x06: str
= "Distance-based"; break;
4760 case 0x07: str
= "User Zone-based"; break;
4761 case 0x09: str
= "BCMC Registration"; break;
4767 proto_tree_add_text(tree
,
4768 tvb
, curr_offset
, 1,
4769 "Location Registration Type: %s",
4772 g_snprintf(add_string
, string_len
, " - (%s)", str
);
4776 /* no length check possible */
4778 return(curr_offset
- offset
);
4785 elem_tag(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
4788 guint32 curr_offset
;
4790 curr_offset
= offset
;
4792 value
= tvb_get_ntohl(tvb
, curr_offset
);
4794 proto_tree_add_text(tree
,
4795 tvb
, curr_offset
, 4,
4799 g_snprintf(add_string
, string_len
, " - (%u)", value
);
4803 /* no length check possible */
4805 return(curr_offset
- offset
);
4812 elem_hho_params(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
4816 guint32 curr_offset
;
4819 curr_offset
= offset
;
4821 oct
= tvb_get_guint8(tvb
, curr_offset
);
4823 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
4824 proto_tree_add_text(tree
,
4825 tvb
, curr_offset
, 1,
4829 temp_int
= oct
& 0x1f;
4830 if ((temp_int
< 0) || (temp_int
>= (gint
) NUM_BAND_CLASS_STR
))
4836 str
= band_class_str
[temp_int
];
4839 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
4840 proto_tree_add_text(tree
,
4841 tvb
, curr_offset
, 1,
4842 "%s : Band Class: %s",
4848 g_snprintf(add_string
, string_len
, " - (%s)", str
);
4850 oct
= tvb_get_guint8(tvb
, curr_offset
);
4852 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
4853 proto_tree_add_text(tree
,
4854 tvb
, curr_offset
, 1,
4855 "%s : Number of Preamble Frames: %u",
4859 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
4860 proto_tree_add_text(tree
,
4861 tvb
, curr_offset
, 1,
4862 "%s : Reset L2: %s Layer 2 Acknowledgement",
4864 (oct
& 0x10) ? "Reset" : "Do not reset");
4866 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
4867 proto_tree_add_text(tree
,
4868 tvb
, curr_offset
, 1,
4869 "%s : Reset FPC: %s counters",
4871 (oct
& 0x10) ? "Reset" : "Do not reset");
4873 switch ((oct
& 0x06) >> 1)
4875 case 0: str
= "Encryption disabled"; break;
4876 case 1: str
= "Encryption enabled"; break;
4882 other_decode_bitfield_value(a_bigbuf
, oct
, 0x06, 8);
4883 proto_tree_add_text(tree
,
4884 tvb
, curr_offset
, 1,
4885 "%s : Encryption Mode: %s",
4889 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
4890 proto_tree_add_text(tree
,
4891 tvb
, curr_offset
, 1,
4892 "%s : Private LCM: %s Private Long Code Mask",
4894 (oct
& 0x01) ? "Use" : "Do not use");
4898 oct
= tvb_get_guint8(tvb
, curr_offset
);
4900 switch (global_a_variant
)
4902 case A_VARIANT_IOS401
:
4903 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
4904 proto_tree_add_text(tree
,
4905 tvb
, curr_offset
, 1,
4910 case A_VARIANT_IOS501
:
4911 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
4912 proto_tree_add_text(tree
,
4913 tvb
, curr_offset
, 1,
4914 "%s : Rev_Pwr_Cntl_Delay_Incl",
4917 other_decode_bitfield_value(a_bigbuf
, oct
, 0x60, 8);
4918 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
4919 "%s : Rev_Pwr_Cntl_Delay",
4924 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
4925 proto_tree_add_text(tree
,
4926 tvb
, curr_offset
, 1,
4930 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
4931 proto_tree_add_text(tree
,
4932 tvb
, curr_offset
, 1,
4939 oct
= tvb_get_guint8(tvb
, curr_offset
);
4941 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
4942 proto_tree_add_text(tree
,
4943 tvb
, curr_offset
, 1,
4947 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3e, 8);
4948 proto_tree_add_text(tree
,
4949 tvb
, curr_offset
, 1,
4950 "%s : FPC Subchannel Information: %u",
4954 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
4955 proto_tree_add_text(tree
,
4956 tvb
, curr_offset
, 1,
4957 "%s : FPC Subchannel Information Included",
4962 oct
= tvb_get_guint8(tvb
, curr_offset
);
4964 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
4965 proto_tree_add_text(tree
,
4966 tvb
, curr_offset
, 1,
4970 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0e, 8);
4971 proto_tree_add_text(tree
,
4972 tvb
, curr_offset
, 1,
4973 "%s : Power Control Step: %u",
4977 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
4978 proto_tree_add_text(tree
,
4979 tvb
, curr_offset
, 1,
4980 "%s : Power Control Step Included",
4985 /* no length check possible */
4987 return(curr_offset
- offset
);
4999 elem_sw_ver(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
5001 guint8 major
, minor
, point
;
5002 guint32 curr_offset
;
5004 curr_offset
= offset
;
5006 major
= tvb_get_guint8(tvb
, curr_offset
);
5008 proto_tree_add_text(tree
,
5009 tvb
, curr_offset
, 1,
5010 "IOS Major Revision Level: %u",
5015 minor
= tvb_get_guint8(tvb
, curr_offset
);
5017 proto_tree_add_text(tree
,
5018 tvb
, curr_offset
, 1,
5019 "IOS Minor Revision Level: %u",
5024 point
= tvb_get_guint8(tvb
, curr_offset
);
5026 proto_tree_add_text(tree
,
5027 tvb
, curr_offset
, 1,
5028 "IOS Point Revision Level: %u",
5033 g_snprintf(add_string
, string_len
, " - (IOS %u.%u.%u)", major
, minor
, point
);
5037 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- 3,
5038 "Manufacturer/Carrier Software Information");
5040 curr_offset
+= len
- 3;
5043 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5045 return(curr_offset
- offset
);
5052 elem_so(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string
, int string_len
)
5055 guint32 curr_offset
;
5057 curr_offset
= offset
;
5059 value
= tvb_get_ntohs(tvb
, curr_offset
);
5061 other_decode_bitfield_value(a_bigbuf
, value
, 0x8000, 16);
5062 proto_tree_add_text(tree
,
5063 tvb
, curr_offset
, 2,
5064 "%s : Proprietary Indicator",
5067 other_decode_bitfield_value(a_bigbuf
, value
, 0x7000, 16);
5068 proto_tree_add_text(tree
,
5069 tvb
, curr_offset
, 2,
5070 "%s : Service Option Revision",
5073 other_decode_bitfield_value(a_bigbuf
, value
, 0x0fff, 16);
5074 proto_tree_add_text(tree
,
5075 tvb
, curr_offset
, 2,
5076 "%s : Base Service Option Number",
5079 g_snprintf(add_string
, string_len
, " - (%u) (0x%04x)", value
, value
);
5081 proto_tree_add_uint_format(tree
, hf_ansi_a_so
, tvb
,
5082 curr_offset
, 2, value
,
5085 ansi_a_so_int_to_str(value
));
5089 /* no length check possible */
5091 return(curr_offset
- offset
);
5098 elem_soci(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
5101 guint32 curr_offset
;
5103 curr_offset
= offset
;
5105 oct
= tvb_get_guint8(tvb
, curr_offset
);
5107 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
5108 proto_tree_add_text(tree
,
5109 tvb
, curr_offset
, 1,
5113 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
5114 proto_tree_add_text(tree
,
5115 tvb
, curr_offset
, 1,
5120 g_snprintf(add_string
, string_len
, " - (%u)", oct
);
5124 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5126 return(curr_offset
- offset
);
5133 elem_so_list(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
5138 guint32 curr_offset
;
5140 proto_tree
*subtree
;
5142 curr_offset
= offset
;
5144 num_so
= tvb_get_guint8(tvb
, curr_offset
);
5146 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5147 "Number of Service Option instances: %u",
5151 * this is in case we leave the function before the
5152 * loop through the instances
5154 g_snprintf(add_string
, string_len
, " - %u service options", num_so
);
5158 NO_MORE_DATA_CHECK(len
);
5160 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 3);
5167 proto_tree_add_text(tree
,
5168 tvb
, curr_offset
, 1,
5169 "Service Option Instance [%u]",
5172 subtree
= proto_item_add_subtree(item
, ett_so_list
);
5174 oct
= tvb_get_guint8(tvb
, curr_offset
);
5176 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
5177 proto_tree_add_text(subtree
,
5178 tvb
, curr_offset
, 1,
5182 other_decode_bitfield_value(a_bigbuf
, oct
, 0x38, 8);
5183 proto_tree_add_text(subtree
,
5184 tvb
, curr_offset
, 1,
5189 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
5190 proto_tree_add_text(subtree
,
5191 tvb
, curr_offset
, 1,
5198 curr_offset
+= elem_so(tvb
, pinfo
, subtree
, curr_offset
, len
, add_string
, string_len
);
5199 add_string
[0] = '\0';
5203 while ((len
- (curr_offset
- offset
)) >= 3);
5206 * this is because 'add_string' was used by 'elem_so()'
5208 g_snprintf(add_string
, string_len
, " - %u service options", num_so
);
5210 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5212 return(curr_offset
- offset
);
5219 elem_acc_net_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
5222 guint32 sid
, nid
, pzid
;
5223 guint32 curr_offset
;
5225 curr_offset
= offset
;
5227 value
= tvb_get_ntohs(tvb
, curr_offset
);
5228 sid
= value
& 0x7fff;
5230 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0x80, 8);
5231 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5235 other_decode_bitfield_value(a_bigbuf
, value
>> 8, 0x7f, 8);
5236 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5237 "%s : SID (MSB), %u",
5241 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
5242 proto_tree_add_text(tree
, tvb
, curr_offset
+ 1, 1,
5248 nid
= tvb_get_ntohs(tvb
, curr_offset
);
5250 proto_tree_add_text(tree
,
5251 tvb
, curr_offset
, 2,
5257 pzid
= tvb_get_ntohs(tvb
, curr_offset
);
5259 proto_tree_add_text(tree
,
5260 tvb
, curr_offset
, 2,
5266 g_snprintf(add_string
, string_len
, " - (SID/NID/PZID: %u/%u/%u)", sid
, nid
, pzid
);
5268 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5270 return(curr_offset
- offset
);
5274 #define ADDS_APP_UNKNOWN 0x00
5275 #define ADDS_APP_ADS 0x01
5276 #define ADDS_APP_FAX 0x02
5277 #define ADDS_APP_SMS 0x03
5278 #define ADDS_APP_OTA 0x04
5279 #define ADDS_APP_PDS 0x05 /* aka PLD */
5280 #define ADDS_APP_SDB 0x06
5281 #define ADDS_APP_HRPD 0x07
5282 #define ADDS_APP_EXT_INTL 0x3E
5283 #define ADDS_APP_EXT 0x3F
5285 static const value_string ansi_a_adds_strings
[] = {
5286 { ADDS_APP_UNKNOWN
, "UNKNOWN" },
5287 { ADDS_APP_ADS
, "ADS" },
5288 { ADDS_APP_FAX
, "FAX" },
5289 { ADDS_APP_SMS
, "SMS" },
5290 { ADDS_APP_OTA
, "OTA" },
5291 { ADDS_APP_PDS
, "PDS" },
5292 { ADDS_APP_SDB
, "SDB" },
5293 { ADDS_APP_HRPD
, "HRPD" },
5294 { ADDS_APP_EXT_INTL
, "EXT_INTL" },
5295 { ADDS_APP_EXT
, "EXT" },
5303 elem_adds_user_part(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
5308 guint32 curr_offset
;
5312 proto_tree
*subtree
;
5315 curr_offset
= offset
;
5317 oct
= tvb_get_guint8(tvb
, curr_offset
);
5319 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
5320 proto_tree_add_text(tree
,
5321 tvb
, curr_offset
, 1,
5325 adds_app
= oct
& 0x3f;
5327 str
= try_val_to_str_idx((guint32
) adds_app
, ansi_a_adds_strings
, &idx
);
5332 g_snprintf(add_string
, string_len
, " - (%s)", str
);
5334 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
5335 proto_tree_add_text(tree
,
5336 tvb
, curr_offset
, 1,
5337 "%s : Data Burst Type: %s",
5344 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- 1,
5345 "Application Data Message");
5347 subtree
= proto_item_add_subtree(item
, ett_adds_user_part
);
5352 adds_tvb
= tvb_new_subset(tvb
, curr_offset
, len
- 1, len
- 1);
5354 dissector_try_uint(is637_dissector_table
,
5355 0, adds_tvb
, pinfo
, g_tree
);
5357 curr_offset
+= (len
- 1);
5361 adds_tvb
= tvb_new_subset(tvb
, curr_offset
, len
- 1, len
- 1);
5363 dissector_try_uint(is683_dissector_table
,
5364 (pinfo
->p2p_dir
== P2P_DIR_RECV
), adds_tvb
, pinfo
, g_tree
);
5366 curr_offset
+= (len
- 1);
5370 adds_tvb
= tvb_new_subset(tvb
, curr_offset
, len
- 1, len
- 1);
5372 dissector_try_uint(is801_dissector_table
,
5373 (pinfo
->p2p_dir
== P2P_DIR_RECV
), adds_tvb
, pinfo
, g_tree
);
5375 curr_offset
+= (len
- 1);
5380 * no SDB dissector, push to GRE/A11 dissector ?
5382 curr_offset
+= (len
- 1);
5385 case ADDS_APP_EXT_INTL
:
5387 * no generic External International dissector
5389 value
= tvb_get_ntohs(tvb
, curr_offset
);
5391 proto_tree_add_text(subtree
,
5392 tvb
, curr_offset
, 2,
5393 "Extended Burst Type - International: 0x%04x", value
);
5397 proto_tree_add_text(tree
, tvb
, curr_offset
, len
- (curr_offset
- offset
),
5400 curr_offset
+= len
- (curr_offset
- offset
);
5404 value
= tvb_get_ntohs(tvb
, curr_offset
);
5406 proto_tree_add_text(subtree
,
5407 tvb
, curr_offset
, 2,
5408 "Extended Burst Type: 0x%04x", value
);
5412 proto_tree_add_text(subtree
, tvb
, curr_offset
, len
- (curr_offset
- offset
),
5415 curr_offset
+= len
- (curr_offset
- offset
);
5422 curr_offset
+= (len
- 1);
5426 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5428 return(curr_offset
- offset
);
5435 elem_amps_hho_param(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
5438 guint32 curr_offset
;
5440 curr_offset
= offset
;
5442 oct
= tvb_get_guint8(tvb
, curr_offset
);
5444 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
5445 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5449 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
5450 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5451 "%s : Encryption Mode: (%u) %s",
5454 (oct
& 0x03) ? "enabled" : "disabled");
5458 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5460 return(curr_offset
- offset
);
5467 elem_is2000_scr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
5469 guint8 oct
, num_con_rec
, ii
;
5470 guint8 bit_mask
, bit_offset
;
5471 guint32 curr_offset
, saved_offset
;
5473 guint is2000_portion_len
;
5474 proto_tree
*scr_subtree
, *subtree
;
5475 proto_item
*item
= NULL
;
5476 const gchar
*str
= NULL
;
5478 curr_offset
= offset
;
5480 oct
= tvb_get_guint8(tvb
, curr_offset
);
5482 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
5483 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5487 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
5488 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5489 "%s : Bit-Exact Length Fill Bits: %u",
5495 is2000_portion_len
= len
- (curr_offset
- offset
);
5498 * the following decode was modified from the packet-ansi_map.c version
5501 SHORT_DATA_CHECK(is2000_portion_len
, 7);
5503 saved_offset
= curr_offset
;
5506 proto_tree_add_text(tree
, tvb
, curr_offset
,
5508 "IS-2000 Service Configuration Record Content");
5511 proto_item_add_subtree(item
, ett_scr
);
5513 proto_tree_add_text(scr_subtree
, tvb
,
5515 "FOR_MUX_OPTION: Forward Traffic Channel multiplex option");
5519 proto_tree_add_text(scr_subtree
, tvb
,
5521 "REV_MUX_OPTION: Reverse Traffic Channel multiplex option");
5525 proto_tree_add_text(scr_subtree
, tvb
,
5527 "FOR_RATES: Transmission rates of the Forward Fundamental Channel");
5531 proto_tree_add_text(scr_subtree
, tvb
,
5533 "REV_RATES: Transmission rates of the Reverse Fundamental Channel");
5537 num_con_rec
= tvb_get_guint8(tvb
, curr_offset
);
5539 proto_tree_add_text(scr_subtree
, tvb
,
5541 "NUM_CON_REC: Number of service option connection records, %u",
5546 for (ii
=0; ii
< num_con_rec
; ii
++)
5548 oct
= tvb_get_guint8(tvb
, curr_offset
);
5551 proto_tree_add_text(scr_subtree
, tvb
,
5552 curr_offset
, oct
/* oct already includes the length octet itself */,
5553 "Service option connection record [%u]", ii
+1);
5556 proto_item_add_subtree(item
, ett_srvc_con_rec
);
5560 oct
= tvb_get_guint8(tvb
, curr_offset
);
5562 proto_tree_add_text(subtree
, tvb
,
5564 "CON_REF: Service option connection reference, %u",
5569 value
= tvb_get_ntohs(tvb
, curr_offset
);
5571 proto_tree_add_text(subtree
, tvb
,
5573 "SERVICE_OPTION: %s",
5574 ansi_a_so_int_to_str(value
));
5578 oct
= tvb_get_guint8(tvb
, curr_offset
);
5580 switch ((oct
& 0xf0) >> 4)
5582 case 0x00: str
= "The service option connection does not use Forward Traffic Channel traffic."; break;
5583 case 0x01: str
= "The service option connection uses primary traffic on the Forward Traffic Channel."; break;
5584 case 0x02: str
= "The service option connection uses secondary traffic on the Forward Traffic Channel."; break;
5585 default: str
= "Reserved"; break;
5588 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
5589 proto_tree_add_text(subtree
, tvb
,
5591 "%s : FOR_TRAFFIC: Forward Traffic Channel traffic type, %s",
5597 case 0x00: str
= "The service option connection does not use Reverse Traffic Channel traffic."; break;
5598 case 0x01: str
= "The service option connection uses primary traffic on the Reverse Traffic Channel."; break;
5599 case 0x02: str
= "The service option connection uses secondary traffic on the Reverse Traffic Channel."; break;
5600 default: str
= "Reserved"; break;
5603 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
5604 proto_tree_add_text(subtree
, tvb
,
5606 "%s : REV_TRAFFIC: Reverse Traffic Channel traffic type, %s",
5612 oct
= tvb_get_guint8(tvb
, curr_offset
);
5614 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
5615 proto_tree_add_text(subtree
, tvb
,
5617 "%s : UI_ENCRYPT_MODE: Encryption mode indicator for user information privacy",
5620 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1c, 8);
5621 proto_tree_add_text(subtree
, tvb
,
5623 "%s : SR_ID: Service reference identifier",
5626 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
5627 proto_tree_add_text(subtree
, tvb
,
5629 "%s : RLP_INFO_INCL: RLP information included indicator",
5634 value
= (oct
& 0x01) << 3;
5635 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
5639 oct
= tvb_get_guint8(tvb
, curr_offset
);
5641 value
|= (oct
& 0xe0) >> 5;
5643 proto_tree_add_text(subtree
, tvb
,
5645 "%s : RLP_BLOB_LEN (MSB), %u",
5649 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
5650 proto_tree_add_text(subtree
, tvb
,
5652 "%s : RLP_BLOB_LEN (LSB)",
5655 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
5656 proto_tree_add_text(subtree
, tvb
,
5658 "%s : RLP_BLOB (MSB)",
5665 proto_tree_add_text(subtree
, tvb
,
5666 curr_offset
, value
- 1,
5669 curr_offset
+= value
- 1;
5672 oct
= tvb_get_guint8(tvb
, curr_offset
);
5674 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
5675 proto_tree_add_text(subtree
, tvb
,
5677 "%s : RLP_BLOB (LSB)",
5680 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
5681 proto_tree_add_text(subtree
, tvb
,
5688 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
5689 proto_tree_add_text(subtree
, tvb
,
5698 oct
= tvb_get_guint8(tvb
, curr_offset
);
5700 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
5701 proto_tree_add_text(scr_subtree
, tvb
,
5703 "%s : FCH_CC_INCL: Channel configuration for the Fundamental Channel included indicator",
5708 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
5709 proto_tree_add_text(scr_subtree
, tvb
,
5711 "%s : FCH_FRAME_SIZE: Fundamental Channel frame size supported indicator",
5714 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3e, 8);
5715 proto_tree_add_text(scr_subtree
, tvb
,
5717 "%s : FOR_FCH_RC: Forward Fundamental Channel Radio Configuration, %u",
5721 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
5722 value
= (oct
& 0x01) << 4;
5726 oct
= tvb_get_guint8(tvb
, curr_offset
);
5728 value
|= (oct
& 0xf0) >> 4;
5730 proto_tree_add_text(scr_subtree
, tvb
,
5732 "%s : REV_FCH_RC: Reverse Fundamental Channel Radio Configuration (MSB), %u",
5736 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
5737 proto_tree_add_text(scr_subtree
, tvb
,
5739 "%s : REV_FCH_RC: (LSB)",
5751 other_decode_bitfield_value(a_bigbuf
, oct
, bit_mask
, 8);
5752 proto_tree_add_text(scr_subtree
, tvb
,
5754 "%s : DCCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5759 /* can't be bothered to do the rest of the decode */
5761 proto_tree_add_text(scr_subtree
, tvb
,
5762 curr_offset
, (is2000_portion_len
- (curr_offset
- saved_offset
)),
5763 "DCCH + ? + Reserved");
5765 curr_offset
+= (is2000_portion_len
- (curr_offset
- saved_offset
));
5772 other_decode_bitfield_value(a_bigbuf
, oct
, bit_mask
, 8);
5773 proto_tree_add_text(scr_subtree
, tvb
,
5775 "%s : FOR_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5780 /* can't be bothered to do the rest of the decode */
5782 proto_tree_add_text(scr_subtree
, tvb
,
5783 curr_offset
, (is2000_portion_len
- (curr_offset
- saved_offset
)),
5784 "FOR_SCH + ? + Reserved");
5786 curr_offset
+= (is2000_portion_len
- (curr_offset
- saved_offset
));
5793 other_decode_bitfield_value(a_bigbuf
, oct
, bit_mask
, 8);
5794 proto_tree_add_text(scr_subtree
, tvb
,
5796 "%s : REV_SCH_CC_INCL: Channel configuration for the Dedicated Control Channel included indicator",
5801 /* can't be bothered to do the rest of the decode */
5803 proto_tree_add_text(scr_subtree
, tvb
,
5804 curr_offset
, (is2000_portion_len
- (curr_offset
- saved_offset
)),
5805 "REV_SCH + ? + Reserved");
5807 curr_offset
+= (is2000_portion_len
- (curr_offset
- saved_offset
));
5811 bit_mask
= (0xff << (8 - bit_offset
));
5812 bit_mask
>>= (8 - bit_offset
);
5814 other_decode_bitfield_value(a_bigbuf
, oct
, bit_mask
, 8);
5815 proto_tree_add_text(scr_subtree
, tvb
,
5825 EXTRANEOUS_DATA_CHECK_EXPERT(len
, curr_offset
- offset
);
5827 return(curr_offset
- offset
);
5834 elem_is2000_nn_scr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
5837 guint32 curr_offset
;
5839 guint is2000_portion_len
;
5842 curr_offset
= offset
;
5844 oct
= tvb_get_guint8(tvb
, curr_offset
);
5846 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
5847 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5851 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
5852 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5853 "%s : Bit-Exact Length Fill Bits: %u",
5861 is2000_portion_len
= len
- (curr_offset
- offset
);
5863 NO_MORE_DATA_CHECK(len
);
5865 if (is2000_portion_len
> 0)
5867 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), is2000_portion_len
);
5869 proto_tree_add_text(tree
, tvb
, curr_offset
, is2000_portion_len
,
5870 "IS-2000 Non-Negotiable Service Configuration Record Content");
5872 curr_offset
+= is2000_portion_len
;
5880 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
5882 return(curr_offset
- offset
);
5889 elem_is2000_mob_cap(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
5893 guint32 curr_offset
;
5894 proto_tree
*subtree
;
5895 proto_item
*item
= NULL
;
5898 curr_offset
= offset
;
5900 oct
= tvb_get_guint8(tvb
, curr_offset
);
5902 switch (global_a_variant
)
5904 case A_VARIANT_IOS401
:
5905 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
5906 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5911 case A_VARIANT_IOS501
:
5912 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
5913 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5914 "%s : REV_PDCH Supported: IS-2000 R-PDCH %ssupported",
5916 (oct
& 0x80) ? "" : "not ");
5918 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
5919 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5920 "%s : FOR_PDCH Supported: IS-2000 F-PDCH %ssupported",
5922 (oct
& 0x40) ? "" : "not ");
5924 other_decode_bitfield_value(a_bigbuf
, oct
, 0x20, 8);
5925 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5926 "%s : ERAM Supported: Enhanced Rate Adaptation Mode %ssupported",
5928 (oct
& 0x20) ? "" : "not ");
5932 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
5933 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5934 "%s : DCCH Supported: IS-2000 DCCH %ssupported",
5936 (oct
& 0x10) ? "" : "not ");
5938 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
5939 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5940 "%s : FCH Supported: IS-2000 FCH %ssupported",
5942 (oct
& 0x08) ? "" : "not ");
5944 other_decode_bitfield_value(a_bigbuf
, oct
, 0x04, 8);
5945 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5946 "%s : OTD Supported: Orthogonal Transmit Diversity %ssupported",
5948 (oct
& 0x04) ? "" : "not ");
5950 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
5951 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5952 "%s : Enhanced RC CFG Supported: Radio configuration in radio class 2 %ssupported",
5954 (oct
& 0x02) ? "" : "not ");
5956 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
5957 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5958 "%s : QPCH Supported: Quick Paging Channel %ssupported",
5960 (oct
& 0x01) ? "" : "not ");
5964 NO_MORE_DATA_CHECK(len
);
5966 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
5968 proto_tree_add_text(tree
,
5969 tvb
, curr_offset
, 1,
5970 "FCH Information: Bit-Exact Length Octet Count: %u",
5975 NO_MORE_DATA_CHECK(len
);
5977 oct
= tvb_get_guint8(tvb
, curr_offset
);
5979 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
5980 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5984 switch ((oct
& 0x70) >> 4)
5986 case 0: str
= "No mobile assisted geo-location capabilities"; break;
5987 case 1: str
= "IS801 capable (Advanced Forward Link Triangulation only (AFLT))"; break;
5988 case 2: str
= "IS801 capable (Advanced Forward Link Triangulation and Global Positioning Systems"; break;
5989 case 3: str
= "Global Positioning Systems Only"; break;
5995 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
5996 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
5997 "%s : Geo Location Type: %s",
6001 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
6002 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6003 "%s : Geo Location Included",
6006 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
6007 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6008 "%s : FCH Information: Bit-Exact Length Fill Bits: %u",
6014 NO_MORE_DATA_CHECK(len
);
6018 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
6020 proto_tree_add_text(tree
, tvb
, curr_offset
, oct_len
,
6021 "FCH Information Content");
6023 curr_offset
+= oct_len
;
6025 NO_MORE_DATA_CHECK(len
);
6031 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
6033 proto_tree_add_text(tree
,
6034 tvb
, curr_offset
, 1,
6035 "DCCH Information: Bit-Exact Length Octet Count: %u",
6040 NO_MORE_DATA_CHECK(len
);
6042 oct
= tvb_get_guint8(tvb
, curr_offset
);
6044 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
6045 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6049 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
6050 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6051 "%s : DCCH Information: Bit-Exact Length Fill Bits: %u",
6057 NO_MORE_DATA_CHECK(len
);
6061 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
6063 proto_tree_add_text(tree
, tvb
, curr_offset
, oct_len
,
6064 "DCCH Information Content");
6066 curr_offset
+= oct_len
;
6068 NO_MORE_DATA_CHECK(len
);
6074 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
6076 proto_tree_add_text(tree
,
6077 tvb
, curr_offset
, 1,
6078 "FOR_PDCH Information: Bit-Exact Length Octet Count: %u",
6083 NO_MORE_DATA_CHECK(len
);
6085 oct
= tvb_get_guint8(tvb
, curr_offset
);
6087 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
6088 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6092 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
6093 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6094 "%s : FOR_PDCH Information: Bit-Exact Length Fill Bits: %u",
6100 NO_MORE_DATA_CHECK(len
);
6104 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
6106 proto_tree_add_text(tree
, tvb
, curr_offset
, oct_len
,
6107 "FOR_PDCH Information Content");
6109 curr_offset
+= oct_len
;
6111 NO_MORE_DATA_CHECK(len
);
6117 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
6119 proto_tree_add_text(tree
,
6120 tvb
, curr_offset
, 1,
6121 "REV_PDCH Information: Bit-Exact Length Octet Count: %u",
6126 NO_MORE_DATA_CHECK(len
);
6128 oct
= tvb_get_guint8(tvb
, curr_offset
);
6130 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
6131 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6135 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
6136 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
6137 "%s : REV_PDCH Information: Bit-Exact Length Fill Bits: %u",
6143 NO_MORE_DATA_CHECK(len
);
6147 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
6149 proto_tree_add_text(tree
, tvb
, curr_offset
, oct_len
,
6150 "REV_PDCH Information Content");
6152 curr_offset
+= oct_len
;
6154 NO_MORE_DATA_CHECK(len
);
6157 oct
= tvb_get_guint8(tvb
, curr_offset
);
6160 proto_tree_add_text(tree
, tvb
,
6162 "VP Algorithms Supported%s",
6163 oct
? "" : ": No voice privacy supported");
6168 proto_item_add_subtree(item
, ett_vp_algs
);
6170 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
6171 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6174 (oct
& 0x80) ? "No extension" : "Extended");
6176 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
6177 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6178 "%s : A7: Reserved",
6181 other_decode_bitfield_value(a_bigbuf
, oct
, 0x20, 8);
6182 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6183 "%s : A6: Reserved",
6186 other_decode_bitfield_value(a_bigbuf
, oct
, 0x10, 8);
6187 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6188 "%s : A5: Reserved",
6191 other_decode_bitfield_value(a_bigbuf
, oct
, 0x08, 8);
6192 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6193 "%s : A4: Reserved",
6196 other_decode_bitfield_value(a_bigbuf
, oct
, 0x04, 8);
6197 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6198 "%s : A3: Reserved",
6201 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
6202 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6203 "%s : A2: Advanced Encryption Standard (AES)",
6206 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
6207 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6208 "%s : A1: Private long code",
6212 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
6214 return(curr_offset
- offset
);
6221 elem_ptype(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
6224 guint32 curr_offset
;
6227 curr_offset
= offset
;
6229 value
= tvb_get_ntohs(tvb
, curr_offset
);
6233 case 0x880b: str
= "PPP"; break;
6234 case 0x8881: str
= "Unstructured Byte Stream"; break;
6240 proto_tree_add_text(tree
,
6241 tvb
, curr_offset
, 2,
6246 g_snprintf(add_string
, string_len
, " - (%s)", str
);
6250 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
6252 return(curr_offset
- offset
);
6258 static const value_string ansi_a_ms_info_rec_signal_type_vals
[] = {
6259 { 0x0, "Tone signal"},
6260 { 0x1, "ISDN Alerting"},
6261 { 0x2, "IS-54B Alerting"},
6266 static const value_string ansi_a_ms_info_rec_signal_alert_pitch_vals
[] = {
6267 { 0x0, "Medium pitch (standard alert)"},
6268 { 0x1, "High pitch"},
6269 { 0x2, "Low pitch"},
6274 static const value_string ansi_a_ms_info_rec_signal_tone_vals
[] = {
6275 { 0x00, "Dial tone on"},
6276 { 0x01, "Ring back tone on"},
6277 { 0x02, "Intercept tone on"},
6278 { 0x03, "Abbreviated intercept"},
6279 { 0x04, "Network congestion (reorder) tone on"},
6280 { 0x05, "Abbreviated network congestion (reorder)"},
6281 { 0x06, "Busy tone on"},
6282 { 0x07, "Confirm tone on"},
6283 { 0x08, "Answer tone on"},
6284 { 0x09, "Call waiting tone on"},
6285 { 0x0a, "Pip tone on"},
6286 { 0x3f, "Tones off"},
6290 const value_string ansi_a_ms_info_rec_signal_isdn_alert_vals
[] = {
6291 { 0x0, "Normal Alerting"},
6292 { 0x1, "Intergroup Alerting"},
6293 { 0x2, "Special/Priority Alerting"},
6294 { 0x3, "Reserved (ISDN Alerting pattern 3)"},
6295 { 0x4, "Ping ring"},
6296 { 0x5, "Reserved (ISDN Alerting pattern 5)"},
6297 { 0x6, "Reserved (ISDN Alerting pattern 6)"},
6298 { 0x7, "Reserved (ISDN Alerting pattern 7)"},
6299 { 0xf, "Alerting off"},
6303 static const value_string ansi_a_ms_info_rec_signal_is54b_alert_vals
[] = {
6306 { 0x2, "Short-Short"},
6307 { 0x3, "Short-Short-Long"},
6308 { 0x4, "Short-Short-2"},
6309 { 0x5, "Short-Long-Short"},
6310 { 0x6, "Short-Short-Short-Short"},
6312 { 0x8, "PBX Short-Short"},
6313 { 0x9, "PBX Short-Short-Long"},
6314 { 0xa, "PBX Short-Long-Short"},
6315 { 0xb, "PBX Short-Short-Short-Short"},
6316 { 0xc, "Pip-Pip-Pip-Pip"},
6321 elem_fwd_ms_info_recs(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
6328 guint32 curr_offset
;
6330 gint ett_elem_idx
, idx
, i
;
6331 proto_tree
*subtree
;
6334 curr_offset
= offset
;
6338 while ((len
- (curr_offset
- offset
)) >= 2)
6342 rec_type
= tvb_get_guint8(tvb
, curr_offset
);
6344 str
= try_val_to_str_idx((guint32
) rec_type
, ansi_fwd_ms_info_rec_str
, &idx
);
6349 ett_elem_idx
= ett_ansi_ms_info_rec_reserved
;
6353 ett_elem_idx
= ett_ansi_fwd_ms_info_rec
[idx
];
6357 proto_tree_add_text(tree
,
6358 tvb
, curr_offset
, 1,
6359 "Information Record Type [%u]: (%u) %s",
6364 subtree
= proto_item_add_subtree(item
, ett_elem_idx
);
6368 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
6370 proto_tree_add_uint(subtree
, hf_ansi_a_length
, tvb
,
6371 curr_offset
, 1, oct_len
);
6377 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
6381 case ANSI_FWD_MS_INFO_REC_CLD_PN
:
6382 oct
= tvb_get_guint8(tvb
, curr_offset
);
6384 switch ((oct
& 0xe0) >> 5)
6386 case 0: str
= "Unknown"; break;
6387 case 1: str
= "International number"; break;
6388 case 2: str
= "National number"; break;
6389 case 3: str
= "Network-specific number"; break;
6390 case 4: str
= "Subscriber number"; break;
6391 case 5: str
= "Reserved"; break;
6392 case 6: str
= "Abbreviated number"; break;
6394 str
= "Reserved for extension";
6398 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
6399 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6400 "%s : Number Type: %s",
6404 switch ((oct
& 0x1e) >> 1)
6406 case 0x00: str
= "Unknown"; break;
6407 case 0x01: str
= "ISDN/Telephony Numbering"; break;
6408 case 0x03: str
= "Data Numbering (ITU-T Rec. X.121)"; break;
6409 case 0x04: str
= "Telex Numbering (ITU-T Rec. F.69)"; break;
6410 case 0x09: str
= "Private Numbering"; break;
6411 case 0x0f: str
= "Reserved for extension"; break;
6417 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1e, 8);
6418 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6419 "%s : Number Plan: %s",
6425 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
6426 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6427 "%s : MSB of first digit",
6432 for (i
=0; i
< (oct_len
- 1); i
++)
6434 a_bigbuf
[i
] = (oct
& 0x01) << 7;
6436 oct
= tvb_get_guint8(tvb
, curr_offset
+ i
);
6438 a_bigbuf
[i
] |= (oct
& 0xfe) >> 1;
6442 proto_tree_add_text(subtree
, tvb
, curr_offset
, oct_len
- 1,
6446 curr_offset
+= (oct_len
- 2);
6449 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
6450 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6457 case ANSI_FWD_MS_INFO_REC_CLG_PN
:
6458 value
= tvb_get_ntohs(tvb
, curr_offset
);
6460 oct
= (value
& 0xff00) >> 8;
6462 switch ((oct
& 0xe0) >> 5)
6464 case 0: str
= "Unknown"; break;
6465 case 1: str
= "International number"; break;
6466 case 2: str
= "National number"; break;
6467 case 3: str
= "Network-specific number"; break;
6468 case 4: str
= "Subscriber number"; break;
6469 case 5: str
= "Reserved"; break;
6470 case 6: str
= "Abbreviated number"; break;
6472 str
= "Reserved for extension";
6476 other_decode_bitfield_value(a_bigbuf
, value
, 0xe000, 16);
6477 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6478 "%s : Number Type: %s",
6482 switch ((oct
& 0x1e) >> 1)
6484 case 0x00: str
= "Unknown"; break;
6485 case 0x01: str
= "ISDN/Telephony Numbering"; break;
6486 case 0x03: str
= "Data Numbering (ITU-T Rec. X.121)"; break;
6487 case 0x04: str
= "Telex Numbering (ITU-T Rec. F.69)"; break;
6488 case 0x09: str
= "Private Numbering"; break;
6489 case 0x0f: str
= "Reserved for extension"; break;
6495 other_decode_bitfield_value(a_bigbuf
, value
, 0x1e00, 16);
6496 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6497 "%s : Number Plan: %s",
6501 switch ((value
& 0x0180) >> 7)
6503 case 0: str
= "Presentation allowed"; break;
6504 case 1: str
= "Presentation restricted"; break;
6505 case 2: str
= "Number not available"; break;
6511 other_decode_bitfield_value(a_bigbuf
, value
, 0x0180, 16);
6512 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6513 "%s : Presentation Indicator (PI): %s",
6517 switch ((value
& 0x0060) >> 5)
6519 case 0: str
= "User-provided, not screened"; break;
6520 case 1: str
= "User-provided, verified and passed"; break;
6521 case 2: str
= "User-provided, verified and failed"; break;
6523 str
= "Network-provided";
6527 other_decode_bitfield_value(a_bigbuf
, value
, 0x0060, 16);
6528 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6529 "%s : Screening Indicator (SI): %s",
6535 oct
= (value
& 0x00ff);
6537 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
6538 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6539 "%s : MSB of first digit",
6544 for (i
=0; i
< (oct_len
- 2); i
++)
6546 a_bigbuf
[i
] = (oct
& 0x1f) << 3;
6548 oct
= tvb_get_guint8(tvb
, curr_offset
+ i
);
6550 a_bigbuf
[i
] |= (oct
& 0xe0) >> 5;
6554 proto_tree_add_text(subtree
, tvb
, curr_offset
, oct_len
- 2,
6558 curr_offset
+= (oct_len
- 3);
6560 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
6561 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6569 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
6570 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6578 case ANSI_FWD_MS_INFO_REC_MW
:
6579 oct
= tvb_get_guint8(tvb
, curr_offset
);
6581 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6582 "Number of messages waiting: %u",
6588 case ANSI_FWD_MS_INFO_REC_SIGNAL
:
6589 oct
= tvb_get_guint8(tvb
, curr_offset
);
6590 proto_tree_add_item(subtree
, hf_ansi_a_ms_info_rec_signal_type
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
6591 proto_tree_add_item(subtree
, hf_ansi_a_ms_info_rec_signal_alert_pitch
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
6592 switch (oct
& 0xc0) {
6594 proto_tree_add_item(subtree
, hf_ansi_a_ms_info_rec_signal_tone
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
6597 proto_tree_add_item(subtree
, hf_ansi_a_ms_info_rec_signal_isdn_alert
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
6600 proto_tree_add_item(subtree
, hf_ansi_a_ms_info_rec_signal_is54b_alert
, tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
6605 oct
= tvb_get_guint8(tvb
, curr_offset
+ 1);
6606 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
6607 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6610 curr_offset
+= oct_len
;
6613 case ANSI_FWD_MS_INFO_REC_CWI
:
6614 proto_tree_add_item(subtree
, hf_ansi_a_ms_info_rec_call_waiting_ind
, tvb
, curr_offset
, 1, ENC_BIG_ENDIAN
);
6615 oct
= tvb_get_guint8(tvb
, curr_offset
);
6616 other_decode_bitfield_value(a_bigbuf
, oct
, 0x7f, 8);
6617 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6620 curr_offset
+= oct_len
;
6623 proto_tree_add_text(subtree
,
6624 tvb
, curr_offset
, oct_len
,
6627 curr_offset
+= oct_len
;
6633 g_snprintf(add_string
, string_len
, " - %u record%s",
6634 num_recs
, plurality(num_recs
, "", "s"));
6636 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
6638 return(curr_offset
- offset
);
6645 elem_rev_ms_info_recs(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
6652 guint32 curr_offset
, saved_offset
;
6654 gint ett_elem_idx
, idx
, i
;
6655 proto_tree
*subtree
, *subtree2
;
6659 curr_offset
= offset
;
6663 while ((len
- (curr_offset
- offset
)) >= 2)
6667 rec_type
= tvb_get_guint8(tvb
, curr_offset
);
6669 str
= try_val_to_str_idx((guint32
) rec_type
, ansi_rev_ms_info_rec_str
, &idx
);
6674 ett_elem_idx
= ett_ansi_ms_info_rec_reserved
;
6678 ett_elem_idx
= ett_ansi_rev_ms_info_rec
[idx
];
6682 proto_tree_add_text(tree
,
6683 tvb
, curr_offset
, 1,
6684 "Information Record Type [%u]: (%u) %s",
6689 subtree
= proto_item_add_subtree(item
, ett_elem_idx
);
6693 oct_len
= tvb_get_guint8(tvb
, curr_offset
);
6695 proto_tree_add_uint(subtree
, hf_ansi_a_length
, tvb
,
6696 curr_offset
, 1, oct_len
);
6702 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), oct_len
);
6706 case ANSI_REV_MS_INFO_REC_KEYPAD_FAC
:
6707 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, oct_len
);
6709 proto_tree_add_string_format(subtree
, hf_ansi_a_cld_party_ascii_num
,
6710 tvb
, curr_offset
, oct_len
,
6713 (gchar
*) format_text(poctets
, oct_len
));
6715 curr_offset
+= oct_len
;
6718 case ANSI_REV_MS_INFO_REC_CLD_PN
:
6719 oct
= tvb_get_guint8(tvb
, curr_offset
);
6721 switch ((oct
& 0xe0) >> 5)
6723 case 0: str
= "Unknown"; break;
6724 case 1: str
= "International number"; break;
6725 case 2: str
= "National number"; break;
6726 case 3: str
= "Network-specific number"; break;
6727 case 4: str
= "Subscriber number"; break;
6728 case 5: str
= "Reserved"; break;
6729 case 6: str
= "Abbreviated number"; break;
6731 str
= "Reserved for extension";
6735 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
6736 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6737 "%s : Number Type: %s",
6741 switch ((oct
& 0x1e) >> 1)
6743 case 0x00: str
= "Unknown"; break;
6744 case 0x01: str
= "ISDN/Telephony Numbering"; break;
6745 case 0x03: str
= "Data Numbering (ITU-T Rec. X.121)"; break;
6746 case 0x04: str
= "Telex Numbering (ITU-T Rec. F.69)"; break;
6747 case 0x09: str
= "Private Numbering"; break;
6748 case 0x0f: str
= "Reserved for extension"; break;
6754 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1e, 8);
6755 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6756 "%s : Number Plan: %s",
6762 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
6763 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6764 "%s : MSB of first digit",
6769 for (i
=0; i
< (oct_len
- 1); i
++)
6771 a_bigbuf
[i
] = (oct
& 0x01) << 7;
6773 oct
= tvb_get_guint8(tvb
, curr_offset
+ i
);
6775 a_bigbuf
[i
] |= (oct
& 0xfe) >> 1;
6779 proto_tree_add_text(subtree
, tvb
, curr_offset
, oct_len
- 1,
6783 curr_offset
+= (oct_len
- 2);
6786 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
6787 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6794 case ANSI_REV_MS_INFO_REC_CLG_PN
:
6795 value
= tvb_get_ntohs(tvb
, curr_offset
);
6797 oct
= (value
& 0xff00) >> 8;
6799 switch ((oct
& 0xe0) >> 5)
6801 case 0: str
= "Unknown"; break;
6802 case 1: str
= "International number"; break;
6803 case 2: str
= "National number"; break;
6804 case 3: str
= "Network-specific number"; break;
6805 case 4: str
= "Subscriber number"; break;
6806 case 5: str
= "Reserved"; break;
6807 case 6: str
= "Abbreviated number"; break;
6809 str
= "Reserved for extension";
6813 other_decode_bitfield_value(a_bigbuf
, value
, 0xe000, 16);
6814 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6815 "%s : Number Type: %s",
6819 switch ((oct
& 0x1e) >> 1)
6821 case 0x00: str
= "Unknown"; break;
6822 case 0x01: str
= "ISDN/Telephony Numbering"; break;
6823 case 0x03: str
= "Data Numbering (ITU-T Rec. X.121)"; break;
6824 case 0x04: str
= "Telex Numbering (ITU-T Rec. F.69)"; break;
6825 case 0x09: str
= "Private Numbering"; break;
6826 case 0x0f: str
= "Reserved for extension"; break;
6832 other_decode_bitfield_value(a_bigbuf
, value
, 0x1e00, 16);
6833 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6834 "%s : Number Plan: %s",
6838 switch ((value
& 0x0180) >> 7)
6840 case 0: str
= "Presentation allowed"; break;
6841 case 1: str
= "Presentation restricted"; break;
6842 case 2: str
= "Number not available"; break;
6848 other_decode_bitfield_value(a_bigbuf
, value
, 0x0180, 16);
6849 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6850 "%s : Presentation Indicator (PI): %s",
6854 switch ((value
& 0x0060) >> 5)
6856 case 0: str
= "User-provided, not screened"; break;
6857 case 1: str
= "User-provided, verified and passed"; break;
6858 case 2: str
= "User-provided, verified and failed"; break;
6860 str
= "Network-provided";
6864 other_decode_bitfield_value(a_bigbuf
, value
, 0x0060, 16);
6865 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6866 "%s : Screening Indicator (SI): %s",
6872 oct
= (value
& 0x00ff);
6874 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
6875 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6876 "%s : MSB of first digit",
6881 for (i
=0; i
< (oct_len
- 2); i
++)
6883 a_bigbuf
[i
] = (oct
& 0x1f) << 3;
6885 oct
= tvb_get_guint8(tvb
, curr_offset
+ i
);
6887 a_bigbuf
[i
] |= (oct
& 0xe0) >> 5;
6891 proto_tree_add_text(subtree
, tvb
, curr_offset
, oct_len
- 2,
6895 curr_offset
+= (oct_len
- 3);
6897 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
6898 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
6906 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
6907 proto_tree_add_text(subtree
, tvb
, curr_offset
, 2,
6915 case ANSI_REV_MS_INFO_REC_SO_INFO
:
6917 saved_offset
= curr_offset
;
6919 while ((oct_len
- (curr_offset
- saved_offset
)) > 2)
6922 proto_tree_add_text(subtree
,
6923 tvb
, curr_offset
, 3,
6924 "Service Option [%u]",
6927 subtree2
= proto_item_add_subtree(item
, ett_so_list
);
6929 oct
= tvb_get_guint8(tvb
, curr_offset
);
6931 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
6932 proto_tree_add_text(subtree2
, tvb
, curr_offset
, 1,
6936 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
6937 proto_tree_add_text(subtree2
, tvb
, curr_offset
, 1,
6938 "%s : Forward Support: %s",
6940 (oct
& 0x02) ? "TRUE" : "FALSE");
6942 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
6943 proto_tree_add_text(subtree2
, tvb
, curr_offset
, 1,
6944 "%s : Reverse Support: %s",
6946 (oct
& 0x01) ? "TRUE" : "FALSE");
6950 value
= tvb_get_ntohs(tvb
, curr_offset
);
6952 str
= ansi_a_so_int_to_str(value
);
6953 proto_tree_add_text(subtree2
, tvb
, curr_offset
, 2,
6954 "Service Option: %s (%u)",
6958 proto_item_append_text(item
, " - (%u) %s", value
, str
);
6966 proto_tree_add_text(subtree
,
6967 tvb
, curr_offset
, oct_len
,
6970 curr_offset
+= oct_len
;
6976 g_snprintf(add_string
, string_len
, " - %u record%s",
6977 num_recs
, plurality(num_recs
, "", "s"));
6979 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
6981 return(curr_offset
- offset
);
6988 elem_ext_ho_dir_params(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
6992 guint32 curr_offset
;
6995 curr_offset
= offset
;
6997 oct
= tvb_get_guint8(tvb
, curr_offset
);
6999 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
7000 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7001 "%s : Search Window A Size (Srch_Win_A): %u",
7005 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
7006 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7007 "%s : Search Window N Size (Srch_Win_N): %u",
7013 NO_MORE_DATA_CHECK(len
);
7015 oct
= tvb_get_guint8(tvb
, curr_offset
);
7017 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
7018 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7019 "%s : Search Window R Size (Srch_Win_R): %u",
7023 value
= tvb_get_guint8(tvb
, curr_offset
+ 1);
7025 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
7026 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7027 "%s : Add Pilot Threshold (T_Add) (MSB): %u",
7029 (oct
& 0x0f) << 2 | (value
& 0xc0) >> 6);
7035 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
7036 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7037 "%s : Add Pilot Threshold (T_Add) (LSB)",
7040 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
7041 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7042 "%s : Drop Pilot Threshold (T_Drop): %u",
7048 NO_MORE_DATA_CHECK(len
);
7050 oct
= tvb_get_guint8(tvb
, curr_offset
);
7052 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
7053 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7054 "%s : Compare Threshold (T_Comp): %u",
7058 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
7059 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7060 "%s : Drop Timer Value (T_TDrop): %u",
7066 NO_MORE_DATA_CHECK(len
);
7068 oct
= tvb_get_guint8(tvb
, curr_offset
);
7070 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
7071 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7072 "%s : Neighbor Max Age (Nghbor_Max_AGE): %u",
7076 switch (global_a_variant
)
7078 case A_VARIANT_IOS401
:
7079 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
7080 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7085 case A_VARIANT_IOS501
:
7086 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0c, 8);
7087 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7093 case 0: str
= "Only Search Window A Size is valid"; break;
7094 case 1: str
= "Subset is valid"; break;
7095 case 2: str
= "All fields valid"; break;
7101 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
7102 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7103 "%s : Target BS Values Included: %s",
7111 NO_MORE_DATA_CHECK(len
);
7113 oct
= tvb_get_guint8(tvb
, curr_offset
);
7115 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
7116 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7120 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
7121 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7122 "%s : SOFT_SLOPE: %u",
7128 NO_MORE_DATA_CHECK(len
);
7130 oct
= tvb_get_guint8(tvb
, curr_offset
);
7132 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
7133 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7137 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
7138 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7139 "%s : ADD_INTERCEPT: %u",
7145 NO_MORE_DATA_CHECK(len
);
7147 oct
= tvb_get_guint8(tvb
, curr_offset
);
7149 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
7150 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7154 other_decode_bitfield_value(a_bigbuf
, oct
, 0x3f, 8);
7155 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7156 "%s : DROP_INTERCEPT: %u",
7162 NO_MORE_DATA_CHECK(len
);
7164 oct
= tvb_get_guint8(tvb
, curr_offset
);
7166 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7167 "Target BS P_REV: %u",
7172 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7174 return(curr_offset
- offset
);
7179 * UNUSED in SPEC and no IEI!
7184 * UNUSED in SPEC and no IEI!
7194 * UNUSED in SPEC and no IEI!
7199 * UNUSED in SPEC and no IEI!
7206 elem_cdma_sowd(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
7210 guint32 curr_offset
;
7211 const gchar
*str
= NULL
;
7213 curr_offset
= offset
;
7215 curr_offset
+= elem_cell_id(tvb
, pinfo
, tree
, offset
, len
, add_string
, string_len
);
7216 add_string
[0] = '\0';
7218 value
= tvb_get_ntohs(tvb
, curr_offset
);
7220 proto_tree_add_text(tree
,
7221 tvb
, curr_offset
, 2,
7222 "CDMA Serving One Way Delay: %u",
7227 oct
= tvb_get_guint8(tvb
, curr_offset
);
7229 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
7230 proto_tree_add_text(tree
,
7231 tvb
, curr_offset
, 1,
7237 case 0: str
= "100 nsec"; break;
7238 case 1: str
= "50 nsec"; break;
7239 case 2: str
= "1/16 CDMA PN Chip"; break;
7240 case 3: str
= "Reserved"; break;
7243 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
7244 proto_tree_add_text(tree
,
7245 tvb
, curr_offset
, 1,
7246 "%s : Resolution: %s",
7252 if ((len
- (curr_offset
- offset
)) > 1)
7254 proto_tree_add_text(tree
,
7255 tvb
, curr_offset
, 2,
7261 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7263 return(curr_offset
- offset
);
7280 elem_re_res(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len _U_
, gchar
*add_string _U_
, int string_len _U_
)
7283 guint32 curr_offset
;
7286 curr_offset
= offset
;
7288 oct
= tvb_get_guint8(tvb
, curr_offset
);
7290 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
7291 proto_tree_add_text(tree
,
7292 tvb
, curr_offset
, 1,
7296 other_decode_bitfield_value(a_bigbuf
, oct
, 0x40, 8);
7297 proto_tree_add_text(tree
,
7298 tvb
, curr_offset
, 1,
7299 "%s : Include Priority: MSC %s include priority in Assignment Request",
7301 (oct
& 0x40) ? "should" : "does not need to");
7303 switch ((oct
& 0x30) >> 4)
7305 case 0: str
= "Not reported"; break;
7306 case 1: str
= "radio environment is acceptable"; break;
7307 case 2: str
= "radio environment is marginally acceptable"; break;
7309 str
= "radio environment is poor";
7313 other_decode_bitfield_value(a_bigbuf
, oct
, 0x30, 8);
7314 proto_tree_add_text(tree
,
7315 tvb
, curr_offset
, 1,
7320 switch ((oct
& 0x0c) >> 2)
7322 case 0: str
= "Not reported"; break;
7323 case 1: str
= "radio environment is acceptable"; break;
7324 case 2: str
= "radio environment is marginally acceptable"; break;
7326 str
= "radio environment is poor";
7330 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0c, 8);
7331 proto_tree_add_text(tree
,
7332 tvb
, curr_offset
, 1,
7337 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
7338 proto_tree_add_text(tree
,
7339 tvb
, curr_offset
, 1,
7340 "%s : Alloc: resources are %sallocated",
7342 (oct
& 0x02) ? "" : "not ");
7344 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
7345 proto_tree_add_text(tree
,
7346 tvb
, curr_offset
, 1,
7347 "%s : Avail: resources are %savailable",
7349 (oct
& 0x01) ? "" : "not ");
7353 /* no length check possible */
7355 return(curr_offset
- offset
);
7360 * UNUSED in SPEC and no IEI!
7395 * UNUSED in SPEC and no IEI!
7472 elem_cld_party_ascii_num(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
7475 guint32 curr_offset
;
7479 curr_offset
= offset
;
7481 oct
= tvb_get_guint8(tvb
, curr_offset
);
7483 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
7484 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
7488 switch ((oct
& 0x70) >> 4)
7490 case 0: str
= "Unknown"; break;
7491 case 1: str
= "International number"; break;
7492 case 2: str
= "National number"; break;
7493 case 3: str
= "Network specific number"; break;
7494 case 4: str
= "Dedicated PAD access, short code"; break;
7495 case 7: str
= "Reserved for extension"; break;
7501 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
7502 proto_tree_add_text(tree
,
7503 tvb
, curr_offset
, 1,
7504 "%s : Type of Number: %s",
7510 case 0x00: str
= "Unknown"; break;
7511 case 0x01: str
= "ISDN/telephony number plan (ITU recommendation E.164/E.163)"; break;
7512 case 0x03: str
= "Data number plan (ITU recommendation X.121)"; break;
7513 case 0x04: str
= "Telex numbering plan (ITU recommendation F.69)"; break;
7514 case 0x07: str
= "Reserved for extension"; break;
7515 case 0x08: str
= "National numbering plan"; break;
7516 case 0x09: str
= "Private numbering plan"; break;
7522 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
7523 proto_tree_add_text(tree
,
7524 tvb
, curr_offset
, 1,
7525 "%s : Numbering Plan Identification: %s",
7531 poctets
= tvb_get_string(wmem_packet_scope(), tvb
, curr_offset
, len
- (curr_offset
- offset
));
7533 proto_tree_add_string_format(tree
, hf_ansi_a_cld_party_ascii_num
,
7534 tvb
, curr_offset
, len
- (curr_offset
- offset
),
7537 (gchar
*) format_text(poctets
, len
- (curr_offset
- offset
)));
7539 curr_offset
+= len
- (curr_offset
- offset
);
7541 g_snprintf(add_string
, string_len
, " - (%s)", poctets
);
7543 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7545 return(curr_offset
- offset
);
7552 elem_band_class(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
7555 guint32 curr_offset
;
7559 curr_offset
= offset
;
7561 oct
= tvb_get_guint8(tvb
, curr_offset
);
7563 other_decode_bitfield_value(a_bigbuf
, oct
, 0xe0, 8);
7564 proto_tree_add_text(tree
,
7565 tvb
, curr_offset
, 1,
7569 temp_int
= oct
& 0x1f;
7570 if ((temp_int
< 0) || (temp_int
>= (gint
) NUM_BAND_CLASS_STR
))
7576 str
= band_class_str
[temp_int
];
7579 other_decode_bitfield_value(a_bigbuf
, oct
, 0x1f, 8);
7580 proto_tree_add_text(tree
,
7581 tvb
, curr_offset
, 1,
7582 "%s : Band Class: %s",
7588 g_snprintf(add_string
, string_len
, " - (%s)", str
);
7590 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7592 return(curr_offset
- offset
);
7614 elem_is2000_cause(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
7616 guint32 curr_offset
;
7618 curr_offset
= offset
;
7620 proto_tree_add_text(tree
, tvb
, curr_offset
, len
, "IS-95/IS-2000 Cause Information");
7624 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7626 return(curr_offset
- offset
);
7648 elem_auth_event(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
7651 guint32 curr_offset
;
7654 curr_offset
= offset
;
7658 oct
= tvb_get_guint8(tvb
, curr_offset
);
7662 case 0x01: str
= "Event: Authentication parameters were NOT received from mobile"; break;
7663 case 0x02: str
= "Event: RANDC mis-match"; break;
7664 case 0x03: str
= "Event: Recently requested"; break;
7665 case 0x04: str
= "Event: Direct channel assignment"; break;
7671 proto_tree_add_text(tree
, tvb
, curr_offset
, len
,
7676 proto_tree_add_text(tree
, tvb
, curr_offset
, len
, "Event");
7681 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7683 return(curr_offset
- offset
);
7798 * Generic decode is good enough
7805 elem_psmm_count(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
7808 guint32 curr_offset
;
7810 curr_offset
= offset
;
7812 oct
= tvb_get_guint8(tvb
, curr_offset
);
7814 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
7815 proto_tree_add_text(tree
,
7816 tvb
, curr_offset
, 1,
7820 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
7821 proto_tree_add_text(tree
,
7822 tvb
, curr_offset
, 1,
7823 "%s : PSMM Count: %u",
7829 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7831 return(curr_offset
- offset
);
7838 elem_geo_loc(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
7840 guint32 curr_offset
;
7842 curr_offset
= offset
;
7844 proto_tree_add_text(tree
, tvb
, curr_offset
, len
, "Calling Geodetic Location");
7848 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7850 return(curr_offset
- offset
);
7897 elem_cct_group(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
7901 guint32 curr_offset
;
7903 curr_offset
= offset
;
7905 oct
= tvb_get_guint8(tvb
, curr_offset
);
7907 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
7908 proto_tree_add_text(tree
,
7909 tvb
, curr_offset
, 1,
7913 other_decode_bitfield_value(a_bigbuf
, oct
, 0x02, 8);
7914 proto_tree_add_text(tree
,
7915 tvb
, curr_offset
, 1,
7916 "%s : All Circuits",
7919 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
7920 proto_tree_add_text(tree
,
7921 tvb
, curr_offset
, 1,
7927 NO_MORE_DATA_CHECK(len
);
7929 oct
= tvb_get_guint8(tvb
, curr_offset
);
7931 proto_tree_add_text(tree
,
7932 tvb
, curr_offset
, 1,
7933 "Count: %u circuit%s",
7934 oct
, plurality(oct
, "", "s"));
7936 g_snprintf(add_string
, string_len
, " - %u circuit%s",
7937 oct
, plurality(oct
, "", "s"));
7941 value
= tvb_get_ntohs(tvb
, curr_offset
);
7943 other_decode_bitfield_value(a_bigbuf
, value
, 0xffe0, 16);
7944 proto_tree_add_text(tree
,
7945 tvb
, curr_offset
, 2,
7946 "%s : PCM Multiplexer: %u",
7948 (value
& 0xffe0) >> 5);
7950 other_decode_bitfield_value(a_bigbuf
, value
, 0x001f, 16);
7951 proto_tree_add_text(tree
,
7952 tvb
, curr_offset
, 2,
7953 "%s : Timeslot: %u",
7959 NO_MORE_DATA_CHECK(len
);
7961 proto_tree_add_text(tree
,
7962 tvb
, curr_offset
, len
- (curr_offset
- offset
),
7965 curr_offset
+= len
- (curr_offset
- offset
);
7967 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7969 return(curr_offset
- offset
);
7976 elem_paca_ts(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
7978 guint32 curr_offset
;
7980 curr_offset
= offset
;
7982 proto_tree_add_text(tree
, tvb
, curr_offset
, len
, "PACA Queuing Time");
7986 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
7988 return(curr_offset
- offset
);
7995 elem_paca_order(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
7998 guint32 curr_offset
;
8001 curr_offset
= offset
;
8003 oct
= tvb_get_guint8(tvb
, curr_offset
);
8005 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
8006 proto_tree_add_text(tree
,
8007 tvb
, curr_offset
, 1,
8013 case 0: str
= "Reserved"; break;
8014 case 1: str
= "Update Queue Position and notify MS"; break;
8015 case 2: str
= "Remove MS from the queue and release MS"; break;
8016 case 3: str
= "Remove MS from the queue"; break;
8017 case 4: str
= "MS Requested PACA Cancel"; break;
8018 case 5: str
= "BS Requested PACA Cancel"; break;
8024 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
8025 proto_tree_add_text(tree
,
8026 tvb
, curr_offset
, 1,
8027 "%s : PACA Action Required: %s",
8033 g_snprintf(add_string
, string_len
, " - (%s)", str
);
8035 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
8037 return(curr_offset
- offset
);
8044 elem_paca_reoi(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
8047 guint32 curr_offset
;
8049 curr_offset
= offset
;
8051 oct
= tvb_get_guint8(tvb
, curr_offset
);
8053 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfe, 8);
8054 proto_tree_add_text(tree
,
8055 tvb
, curr_offset
, 1,
8059 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
8060 proto_tree_add_text(tree
,
8061 tvb
, curr_offset
, 1,
8062 "%s : PACA Reorigination Indicator (PRI)",
8067 g_snprintf(add_string
, string_len
, " - (%sReorigination)", (oct
& 0x01) ? "" : "Not ");
8069 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
8071 return(curr_offset
- offset
);
8078 elem_a2p_bearer_session(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
8081 guint32 curr_offset
;
8083 curr_offset
= offset
;
8085 oct
= tvb_get_guint8(tvb
, curr_offset
);
8087 other_decode_bitfield_value(a_bigbuf
, oct
, 0xc0, 8);
8088 proto_tree_add_text(tree
,
8089 tvb
, curr_offset
, 1,
8093 other_decode_bitfield_value(a_bigbuf
, oct
, 0x38, 8);
8094 proto_tree_add_text(tree
,
8095 tvb
, curr_offset
, 1,
8096 "%s : Max Frames: %u",
8100 other_decode_bitfield_value(a_bigbuf
, oct
, 0x06, 8);
8101 proto_tree_add_text(tree
,
8102 tvb
, curr_offset
, 1,
8103 "%s : Session IP Address Type: Internet Protocol IPv%s",
8105 ((oct
& 0x06) >> 1) ? "6" : "4");
8107 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
8108 proto_tree_add_text(tree
,
8109 tvb
, curr_offset
, 1,
8110 "%s : Session Address Flag",
8117 /* session address included */
8119 if ((oct
& 0x06) >> 1)
8121 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 18);
8123 proto_tree_add_item(tree
, hf_ansi_a_a2p_bearer_ipv6_addr
,
8124 tvb
, curr_offset
, 16, ENC_NA
);
8126 rtp_src_addr
.type
= AT_IPv6
;
8127 rtp_src_addr
.len
= 16;
8128 rtp_src_addr
.data
= (guint8
*) &rtp_ipv6_addr
;
8130 tvb_get_ipv6(tvb
, curr_offset
, &rtp_ipv6_addr
);
8136 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 6);
8138 proto_tree_add_item(tree
, hf_ansi_a_a2p_bearer_ipv4_addr
,
8139 tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
8141 rtp_src_addr
.type
= AT_IPv4
;
8142 rtp_src_addr
.len
= 4;
8143 rtp_src_addr
.data
= (guint8
*) &rtp_ipv4_addr
;
8145 rtp_ipv4_addr
= tvb_get_ipv4(tvb
, curr_offset
);
8150 proto_tree_add_item(tree
, hf_ansi_a_a2p_bearer_udp_port
,
8151 tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
8153 rtp_port
= tvb_get_ntohs(tvb
, curr_offset
);
8158 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
8160 return(curr_offset
- offset
);
8167 elem_a2p_bearer_format(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
8171 proto_tree
*subtree
;
8173 guint32 curr_offset
, orig_offset
;
8174 guint8 ip_addr_type
;
8178 const gchar
*mime_type
;
8180 gboolean format_assigned
;
8181 gboolean in_band_format_assigned
;
8182 gboolean first_assigned_found
;
8183 gboolean rtp_dyn_payload_used
;
8184 guint8 rtp_payload_type
;
8185 GHashTable
*rtp_dyn_payload
;
8187 encoding_name_and_rate_t
*encoding_name_and_rate
;
8189 rtp_dyn_payload
= g_hash_table_new(g_int_hash
, g_int_equal
);
8190 rtp_dyn_payload_used
= FALSE
;
8192 first_assigned_found
= FALSE
;
8194 curr_offset
= offset
;
8196 oct
= tvb_get_guint8(tvb
, curr_offset
);
8198 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfc, 8);
8199 proto_tree_add_text(tree
,
8200 tvb
, curr_offset
, 1,
8201 "%s : Number of Bearer Formats: %u",
8205 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
8206 proto_tree_add_text(tree
,
8207 tvb
, curr_offset
, 1,
8208 "%s : Session IP Address Type: Internet Protocol IPv%s",
8210 (oct
& 0x03) ? "6" : "4");
8212 ip_addr_type
= (oct
& 0x03);
8218 while ((len
- (curr_offset
- offset
)) > 0)
8220 orig_offset
= curr_offset
;
8223 proto_tree_add_text(tree
,
8224 tvb
, curr_offset
, -1,
8225 "Bearer Format [%u]",
8228 subtree
= proto_item_add_subtree(item
, ett_bearer_list
);
8230 oct
= tvb_get_guint8(tvb
, curr_offset
);
8232 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8233 "Bearer Format Length: %u",
8238 NO_MORE_DATA_CHECK(len
);
8240 oct
= tvb_get_guint8(tvb
, curr_offset
);
8242 other_decode_bitfield_value(a_bigbuf
, oct
, 0x80, 8);
8243 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8247 ext
= (oct
& 0x80) ? TRUE
: FALSE
;
8249 format_assigned
= FALSE
;
8250 in_band_format_assigned
= FALSE
;
8252 switch ((oct
& 0x70) >> 4)
8254 case 0: str
= "Unknown"; break;
8256 str
= "In-band signaling";
8257 in_band_format_assigned
= TRUE
;
8261 format_assigned
= TRUE
;
8263 case 3: str
= "Unassigned"; break;
8264 case 4: str
= "Transcoded"; break;
8270 other_decode_bitfield_value(a_bigbuf
, oct
, 0x70, 8);
8271 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8272 "%s : Bearer Format Tag Type: %s",
8277 * assuming default sampling rate of 8000Hz
8283 case 0: mime_type
= str
= "PCMU"; break;
8284 case 1: mime_type
= str
= "PCMA"; break;
8286 str
= "13K Vocoder";
8287 mime_type
= "QCELP";
8289 case 3: mime_type
= str
= "EVRC"; break;
8290 case 4: mime_type
= str
= "EVRC0"; break;
8291 case 5: mime_type
= str
= "SMV"; break;
8292 case 6: mime_type
= str
= "SMV0"; break;
8293 case 7: mime_type
= str
= "telephone-event"; break;
8294 case 8: mime_type
= str
= "EVRCB"; break;
8295 case 9: mime_type
= str
= "EVRCB0"; break;
8296 case 10: mime_type
= str
= "EVRCWB"; sample_rate
= 16000; break;
8297 case 11: mime_type
= str
= "EVRCWB0"; sample_rate
= 16000; break;
8298 case 12: mime_type
= str
= "EVRCNW"; sample_rate
= 16000; break;
8299 case 13: mime_type
= str
= "EVRCNW0"; sample_rate
= 16000; break;
8301 mime_type
= str
= "Reserved";
8305 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
8306 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8307 "%s : Bearer Format ID: %s",
8311 proto_item_append_text(item
, " - (%s)", str
);
8315 NO_MORE_DATA_CHECK(len
);
8317 oct
= tvb_get_guint8(tvb
, curr_offset
);
8319 rtp_payload_type
= (oct
& 0xfe) >> 1;
8321 other_decode_bitfield_value(a_bigbuf
, oct
, 0xfe, 8);
8322 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8323 "%s : RTP Payload Type: %u",
8327 other_decode_bitfield_value(a_bigbuf
, oct
, 0x01, 8);
8328 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8329 "%s : Bearer Address Flag",
8336 /* bearer address included */
8338 if (ip_addr_type
!= 0)
8340 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 18);
8342 proto_tree_add_item(subtree
, hf_ansi_a_a2p_bearer_ipv6_addr
,
8343 tvb
, curr_offset
, 16, ENC_NA
);
8345 if (format_assigned
)
8347 rtp_src_addr
.type
= AT_IPv6
;
8348 rtp_src_addr
.len
= 16;
8349 rtp_src_addr
.data
= (guint8
*) &rtp_ipv6_addr
;
8351 tvb_get_ipv6(tvb
, curr_offset
, &rtp_ipv6_addr
);
8358 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 6);
8360 proto_tree_add_item(subtree
, hf_ansi_a_a2p_bearer_ipv4_addr
,
8361 tvb
, curr_offset
, 4, ENC_BIG_ENDIAN
);
8363 if (format_assigned
)
8365 rtp_src_addr
.type
= AT_IPv4
;
8366 rtp_src_addr
.len
= 4;
8367 rtp_src_addr
.data
= (guint8
*) &rtp_ipv4_addr
;
8369 rtp_ipv4_addr
= tvb_get_ipv4(tvb
, curr_offset
);
8375 proto_tree_add_item(subtree
, hf_ansi_a_a2p_bearer_udp_port
,
8376 tvb
, curr_offset
, 2, ENC_BIG_ENDIAN
);
8378 if (format_assigned
)
8380 rtp_port
= tvb_get_ntohs(tvb
, curr_offset
);
8388 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), 1);
8390 oct
= tvb_get_guint8(tvb
, curr_offset
);
8392 ext_len
= (oct
& 0xf0) >> 4;
8394 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
8395 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8396 "%s : Extension Length: %u",
8400 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
8401 proto_tree_add_text(subtree
, tvb
, curr_offset
, 1,
8402 "%s : Extension ID: %u",
8410 SHORT_DATA_CHECK(len
- (curr_offset
- offset
), ext_len
);
8412 proto_tree_add_text(subtree
, tvb
, curr_offset
, ext_len
,
8413 "Extension Parameter value");
8415 curr_offset
+= ext_len
;
8419 proto_item_set_len(item
, curr_offset
- orig_offset
);
8421 if (format_assigned
&&
8422 (first_assigned_found
== FALSE
))
8424 key
= wmem_new(wmem_file_scope(), gint
);
8425 *key
= rtp_payload_type
;
8427 encoding_name_and_rate
= wmem_new(wmem_file_scope(), encoding_name_and_rate_t
);
8428 encoding_name_and_rate
->encoding_name
= wmem_strdup(wmem_file_scope(), mime_type
);
8429 encoding_name_and_rate
->sample_rate
= sample_rate
;
8431 g_hash_table_insert(rtp_dyn_payload
, key
, encoding_name_and_rate
);
8432 rtp_dyn_payload_used
= TRUE
;
8434 first_assigned_found
= TRUE
;
8435 rtp_add_address(pinfo
, &rtp_src_addr
, rtp_port
, 0, "IOS5",
8436 pinfo
->fd
->num
, FALSE
, rtp_dyn_payload
);
8439 if (in_band_format_assigned
)
8441 key
= (gint
*) wmem_alloc(wmem_file_scope(), sizeof(gint
));
8442 *key
= rtp_payload_type
;
8444 encoding_name_and_rate
= wmem_new(wmem_file_scope(), encoding_name_and_rate_t
);
8445 encoding_name_and_rate
->encoding_name
= wmem_strdup(wmem_file_scope(), "telephone-event");
8446 encoding_name_and_rate
->sample_rate
= sample_rate
;
8448 g_hash_table_insert(rtp_dyn_payload
, key
, encoding_name_and_rate
);
8449 rtp_dyn_payload_used
= TRUE
;
8455 if (rtp_dyn_payload_used
== FALSE
)
8457 rtp_free_hash_dyn_payload(rtp_dyn_payload
);
8460 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
8462 return(curr_offset
- offset
);
8469 elem_ms_des_freq(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
)
8474 guint32 curr_offset
;
8477 curr_offset
= offset
;
8479 oct
= tvb_get_guint8(tvb
, curr_offset
);
8481 temp_int
= (oct
& 0xf8) >> 3;
8482 if ((temp_int
< 0) || (temp_int
>= (gint
) NUM_BAND_CLASS_STR
))
8488 str
= band_class_str
[temp_int
];
8491 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf8, 8);
8492 proto_tree_add_text(tree
,
8493 tvb
, curr_offset
, 1,
8494 "%s : Band Class: %s",
8498 value
= tvb_get_guint8(tvb
, curr_offset
+ 1) | ((oct
& 0x07) << 8);
8500 other_decode_bitfield_value(a_bigbuf
, oct
, 0x07, 8);
8501 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
8502 "%s : CDMA Channel (MSB): %u",
8508 other_decode_bitfield_value(a_bigbuf
, value
& 0x00ff, 0xff, 8);
8509 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
8510 "%s : CDMA Channel (LSB)",
8513 g_snprintf(add_string
, string_len
, " - (CDMA Channel: %u)", value
);
8517 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
8519 return(curr_offset
- offset
);
8526 elem_plcm_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string _U_
, int string_len _U_
)
8529 guint32 curr_offset
;
8532 curr_offset
= offset
;
8534 oct
= tvb_get_guint8(tvb
, curr_offset
);
8537 * from C.S0005-D v1.0 L3 Table 3.7.2.3.2.21-5
8539 switch ((oct
& 0xf0) >> 4)
8541 case 0x00: str
= "PLCM derived from ESN or MEID"; break;
8542 case 0x01: str
= "PLCM specified by the base station"; break;
8543 case 0x02: str
= "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_M"; break;
8544 case 0x03: str
= "PLCM derived from IMSI_O_S when IMSI_O is derived from IMSI_T"; break;
8550 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
8551 proto_tree_add_text(tree
,
8552 tvb
, curr_offset
, 1,
8553 "%s : PLCM_TYPE: %s",
8557 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0c, 8);
8558 proto_tree_add_text(tree
,
8559 tvb
, curr_offset
, 1,
8563 other_decode_bitfield_value(a_bigbuf
, oct
, 0x03, 8);
8564 proto_tree_add_text(tree
, tvb
, curr_offset
, 1,
8565 "%s : PLCM_42 (MSB)",
8570 proto_tree_add_text(tree
, tvb
, curr_offset
, 5, "PLCM_42");
8574 EXTRANEOUS_DATA_CHECK(len
, curr_offset
- offset
);
8576 return(curr_offset
- offset
);
8590 * ORDER MUST BE MAINTAINED
8592 * The value of this enum is used as an index into
8598 ANSI_A_E_ACC_NET_ID
, /* Access Network Identifiers */
8599 ANSI_A_E_ADDS_USER_PART
, /* ADDS User Part */
8600 ANSI_A_E_AMPS_HHO_PARAM
, /* AMPS Hard Handoff Parameters */
8601 ANSI_A_E_ANCH_PDSN_ADDR
, /* Anchor PDSN Address */
8602 ANSI_A_E_ANCH_PP_ADDR
, /* Anchor P-P Address */
8603 ANSI_A_E_AUTH_CHLG_PARAM
, /* Authentication Challenge Parameter */
8604 ANSI_A_E_AUTH_CNF_PARAM
, /* Authentication Confirmation Parameter (RANDC) */
8605 ANSI_A_E_AUTH_DATA
, /* Authentication Data */
8606 ANSI_A_E_AUTH_EVENT
, /* Authentication Event */
8607 ANSI_A_E_AUTH_PARAM_COUNT
, /* Authentication Parameter COUNT */
8608 ANSI_A_E_AUTH_RESP_PARAM
, /* Authentication Response Parameter */
8609 ANSI_A_E_BAND_CLASS
, /* Band Class */
8610 ANSI_A_E_CLD_PARTY_ASCII_NUM
, /* Called Party ASCII Number */
8611 ANSI_A_E_CLD_PARTY_BCD_NUM
, /* Called Party BCD Number */
8612 ANSI_A_E_CLG_PARTY_ASCII_NUM
, /* Calling Party ASCII Number */
8613 ANSI_A_E_CAUSE
, /* Cause */
8614 ANSI_A_E_CAUSE_L3
, /* Cause Layer 3 */
8615 ANSI_A_E_CDMA_SOWD
, /* CDMA Serving One Way Delay */
8616 ANSI_A_E_CELL_ID
, /* Cell Identifier */
8617 ANSI_A_E_CELL_ID_LIST
, /* Cell Identifier List */
8618 ANSI_A_E_CHAN_NUM
, /* Channel Number */
8619 ANSI_A_E_CHAN_TYPE
, /* Channel Type */
8620 ANSI_A_E_CCT_GROUP
, /* Circuit Group */
8621 ANSI_A_E_CIC
, /* Circuit Identity Code */
8622 ANSI_A_E_CIC_EXT
, /* Circuit Identity Code Extension */
8623 ANSI_A_E_CM_INFO_TYPE_2
, /* Classmark Information Type 2 */
8624 ANSI_A_E_DOWNLINK_RE
, /* Downlink Radio Environment */
8625 ANSI_A_E_DOWNLINK_RE_LIST
, /* Downlink Radio Environment List */
8626 ANSI_A_E_ENC_INFO
, /* Encryption Information */
8627 ANSI_A_E_EXT_HO_DIR_PARAMS
, /* Extended Handoff Direction Parameters */
8628 ANSI_A_E_GEO_LOC
, /* Geographic Location */
8629 ANSI_A_E_SSCI
, /* Special Service Call Indicator */
8630 ANSI_A_E_HO_POW_LEV
, /* Handoff Power Level */
8631 ANSI_A_E_HHO_PARAMS
, /* Hard Handoff Parameters */
8632 ANSI_A_E_IE_REQD
, /* Information Element Requested */
8633 ANSI_A_E_IS2000_CHAN_ID
, /* IS-2000 Channel Identity */
8634 ANSI_A_E_IS2000_CHAN_ID_3X
, /* IS-2000 Channel Identity 3X */
8635 ANSI_A_E_IS2000_MOB_CAP
, /* IS-2000 Mobile Capabilities */
8636 ANSI_A_E_IS2000_NN_SCR
, /* IS-2000 Non-Negotiable Service Configuration Record */
8637 ANSI_A_E_IS2000_SCR
, /* IS-2000 Service Configuration Record */
8638 ANSI_A_E_IS2000_CAUSE
, /* IS-95/IS-2000 Cause Value */
8639 ANSI_A_E_IS2000_RED_RECORD
, /* IS-2000 Redirection Record */
8640 ANSI_A_E_IS95_CHAN_ID
, /* IS-95 Channel Identity */
8641 ANSI_A_E_IS95_MS_MEAS_CHAN_ID
, /* IS-95 MS Measured Channel Identity */
8642 ANSI_A_E_L3_INFO
, /* Layer 3 Information */
8643 ANSI_A_E_LAI
, /* Location Area Information */
8644 ANSI_A_E_MWI
, /* Message Waiting Indication */
8645 ANSI_A_E_MID
, /* Mobile Identity */
8646 ANSI_A_E_FWD_MS_INFO_RECS
, /* (Forward) MS Information Records */
8647 ANSI_A_E_ORIG_CI
, /* Origination Continuation Indicator */
8648 ANSI_A_E_PACA_ORDER
, /* PACA Order */
8649 ANSI_A_E_PACA_REOI
, /* PACA Reorigination Indicator */
8650 ANSI_A_E_PACA_TS
, /* PACA Timestamp */
8651 ANSI_A_E_PSP
, /* Packet Session Parameters */
8652 ANSI_A_E_PDSN_IP_ADDR
, /* PDSN IP Address */
8653 ANSI_A_E_PDI
, /* Power Down Indicator */
8654 ANSI_A_E_PRIO
, /* Priority */
8655 ANSI_A_E_P_REV
, /* Protocol Revision */
8656 ANSI_A_E_PTYPE
, /* Protocol Type */
8657 ANSI_A_E_PSMM_COUNT
, /* PSMM Count */
8658 ANSI_A_E_QOS_PARAMS
, /* Quality of Service Parameters */
8659 ANSI_A_E_RE_RES
, /* Radio Environment and Resources */
8660 ANSI_A_E_REG_TYPE
, /* Registration Type */
8661 ANSI_A_E_REJ_CAUSE
, /* Reject Cause */
8662 ANSI_A_E_RESP_REQ
, /* Response Request */
8663 ANSI_A_E_RETURN_CAUSE
, /* Return Cause */
8664 ANSI_A_E_RF_CHAN_ID
, /* RF Channel Identity */
8665 ANSI_A_E_SO
, /* Service Option */
8666 ANSI_A_E_SOCI
, /* Service Option Connection Identifier (SOCI) */
8667 ANSI_A_E_SO_LIST
, /* Service Option List */
8668 ANSI_A_E_S_RED_INFO
, /* Service Redirection Info */
8669 ANSI_A_E_SR_ID
, /* Service Reference Identifier (SR_ID) */
8670 ANSI_A_E_SID
, /* SID */
8671 ANSI_A_E_SIGNAL
, /* Signal */
8672 ANSI_A_E_SCI
, /* Slot Cycle Index */
8673 ANSI_A_E_SW_VER
, /* Software Version */
8674 ANSI_A_E_SRNC_TRNC_TC
, /* Source RNC to Target RNC Transparent Container */
8675 ANSI_A_E_S_PDSN_ADDR
, /* Source PDSN Address */
8676 ANSI_A_E_TAG
, /* Tag */
8677 ANSI_A_E_TRNC_SRNC_TC
, /* Target RNC to Source RNC Transparent Container */
8678 ANSI_A_E_XMODE
, /* Transcoder Mode */
8679 ANSI_A_E_UZ_ID
, /* User Zone ID */
8680 ANSI_A_E_VP_REQ
, /* Voice Privacy Request */
8681 ANSI_A_E_A2P_BEARER_SESSION
, /* A2p Bearer Session-Level Parameters */
8682 ANSI_A_E_A2P_BEARER_FORMAT
, /* A2p Bearer Format-Specific Parameters */
8683 ANSI_A_E_MS_DES_FREQ
, /* MS Designated Frequency */
8684 ANSI_A_E_MOB_SUB_INFO
, /* Mobile Subscription Information */
8685 ANSI_A_E_PLCM_ID
, /* Public Long Code Mask Identifier */
8686 ANSI_A_E_REV_MS_INFO_RECS
, /* (Reverse) MS Information Records */
8687 ANSI_A_E_NONE
/* NONE */
8690 static elem_idx_t ansi_a_elem_1_max
= (elem_idx_t
)0;
8692 #define MAX_IOS401_NUM_ELEM_1 (sizeof(ansi_a_ios401_elem_1_strings)/sizeof(ext_value_string_t))
8693 #define MAX_IOS501_NUM_ELEM_1 (sizeof(ansi_a_ios501_elem_1_strings)/sizeof(ext_value_string_t))
8694 static gint ett_ansi_elem_1
[MAX(MAX_IOS401_NUM_ELEM_1
, MAX_IOS501_NUM_ELEM_1
)];
8695 static guint8 (*elem_1_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gchar
*add_string
, int string_len
) =
8697 elem_acc_net_id
, /* Access Network Identifiers */
8698 elem_adds_user_part
, /* ADDS User Part */
8699 elem_amps_hho_param
, /* AMPS Hard Handoff Parameters */
8700 elem_anchor_pdsn_addr
, /* Anchor PDSN Address */
8701 elem_anchor_pp_addr
, /* Anchor P-P Address */
8702 elem_auth_chlg_param
, /* Authentication Challenge Parameter */
8703 NULL
/* no decode required */, /* Authentication Confirmation Parameter (RANDC) */
8704 NULL
/* no decode required */, /* Authentication Data */
8705 elem_auth_event
, /* Authentication Event */
8706 elem_auth_param_count
, /* Authentication Parameter COUNT */
8707 elem_auth_resp_param
, /* Authentication Response Parameter */
8708 elem_band_class
, /* Band Class */
8709 elem_cld_party_ascii_num
, /* Called Party ASCII Number */
8710 elem_cld_party_bcd_num
, /* Called Party BCD Number */
8711 elem_clg_party_ascii_num
, /* Calling Party ASCII Number */
8712 elem_cause
, /* Cause */
8713 elem_cause_l3
, /* Cause Layer 3 */
8714 elem_cdma_sowd
, /* CDMA Serving One Way Delay */
8715 elem_cell_id
, /* Cell Identifier */
8716 elem_cell_id_list
, /* Cell Identifier List */
8717 elem_chan_num
, /* Channel Number */
8718 elem_chan_type
, /* Channel Type */
8719 elem_cct_group
, /* Circuit Group */
8720 elem_cic
, /* Circuit Identity Code */
8721 elem_cic_ext
, /* Circuit Identity Code Extension */
8722 elem_cm_info_type_2
, /* Classmark Information Type 2 */
8723 elem_downlink_re
, /* Downlink Radio Environment */
8724 elem_downlink_re_list
, /* Downlink Radio Environment List */
8725 elem_enc_info
, /* Encryption Information */
8726 elem_ext_ho_dir_params
, /* Extended Handoff Direction Parameters */
8727 elem_geo_loc
, /* Geographic Location */
8728 elem_ssci
, /* Special Service Call Indicator */
8729 elem_ho_pow_lev
, /* Handoff Power Level */
8730 elem_hho_params
, /* Hard Handoff Parameters */
8731 elem_info_rec_req
, /* Information Element Requested */
8732 elem_is2000_chan_id
, /* IS-2000 Channel Identity */
8733 NULL
, /* IS-2000 Channel Identity 3X */
8734 elem_is2000_mob_cap
, /* IS-2000 Mobile Capabilities */
8735 elem_is2000_nn_scr
, /* IS-2000 Non-Negotiable Service Configuration Record */
8736 elem_is2000_scr
, /* IS-2000 Service Configuration Record */
8737 elem_is2000_cause
, /* IS-95/IS-2000 Cause Value */
8738 NULL
, /* IS-2000 Redirection Record */
8739 elem_is95_chan_id
, /* IS-95 Channel Identity */
8740 elem_is95_ms_meas_chan_id
, /* IS-95 MS Measured Channel Identity */
8741 elem_l3_info
, /* Layer 3 Information */
8742 elem_lai
, /* Location Area Information */
8743 elem_mwi
, /* Message Waiting Indication */
8744 elem_mid
, /* Mobile Identity */
8745 elem_fwd_ms_info_recs
, /* (Forward) MS Information Records */
8746 NULL
/* no associated data */, /* Origination Continuation Indicator */
8747 elem_paca_order
, /* PACA Order */
8748 elem_paca_reoi
, /* PACA Reorigination Indicator */
8749 elem_paca_ts
, /* PACA Timestamp */
8750 NULL
, /* Packet Session Parameters */
8751 elem_pdsn_ip_addr
, /* PDSN IP Address */
8752 NULL
/* no associated data */, /* Power Down Indicator */
8753 elem_prio
, /* Priority */
8754 elem_p_rev
, /* Protocol Revision */
8755 elem_ptype
, /* Protocol Type */
8756 elem_psmm_count
, /* PSMM Count */
8757 elem_qos_params
, /* Quality of Service Parameters */
8758 elem_re_res
, /* Radio Environment and Resources */
8759 elem_reg_type
, /* Registration Type */
8760 elem_rej_cause
, /* Reject Cause */
8761 NULL
/* no associated data */, /* Response Request */
8762 elem_return_cause
, /* Return Cause */
8763 elem_rf_chan_id
, /* RF Channel Identity */
8764 elem_so
, /* Service Option */
8765 elem_soci
, /* Service Option Connection Identifier (SOCI) */
8766 elem_so_list
, /* Service Option List */
8767 NULL
, /* Service Redirection Info */
8768 elem_sr_id
, /* Service Reference Identifier (SR_ID) */
8770 elem_signal
, /* Signal */
8771 elem_sci
, /* Slot Cycle Index */
8772 elem_sw_ver
, /* Software Version */
8773 NULL
/* transparent */, /* Source RNC to Target RNC Transparent Container */
8774 elem_s_pdsn_ip_addr
, /* Source PDSN Address */
8776 NULL
/* transparent */, /* Target RNC to Source RNC Transparent Container */
8777 elem_xmode
, /* Transcoder Mode */
8778 elem_uz_id
, /* User Zone ID */
8779 NULL
/* no associated data */, /* Voice Privacy Request */
8780 elem_a2p_bearer_session
, /* A2p Bearer Session-Level Parameters */
8781 elem_a2p_bearer_format
, /* A2p Bearer Format-Specific Parameters */
8782 elem_ms_des_freq
, /* MS Designated Frequency */
8783 NULL
, /* Mobile Subscription Information */
8784 elem_plcm_id
, /* Public Long Code Mask Identification */
8785 elem_rev_ms_info_recs
, /* (Reverse) MS Information Records */
8789 /* MESSAGE FUNCTIONS */
8792 * Type Length Value (TLV) element dissector
8795 elem_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, elem_idx_t idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
8797 guint8 oct
, parm_len
;
8799 guint32 curr_offset
;
8800 proto_tree
*subtree
;
8804 curr_offset
= offset
;
8807 if ((int)idx
< 0 || idx
>= ansi_a_elem_1_max
-1)
8809 /* Unknown index, skip the element */
8810 return tvb_length_remaining(tvb
, offset
) ;
8813 oct
= tvb_get_guint8(tvb
, curr_offset
);
8815 if (oct
== (guint8
) ansi_a_elem_1_strings
[idx
].value
)
8817 dec_idx
= ansi_a_elem_1_strings
[idx
].dec_index
;
8819 parm_len
= tvb_get_guint8(tvb
, curr_offset
+ 1);
8822 proto_tree_add_text(tree
,
8823 tvb
, curr_offset
, parm_len
+ 2,
8825 ansi_a_elem_1_strings
[idx
].strptr
,
8826 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
8828 subtree
= proto_item_add_subtree(item
, ett_ansi_elem_1
[idx
]);
8830 proto_tree_add_uint_format(subtree
, hf_ansi_a_elem_id
, tvb
,
8831 curr_offset
, 1, oct
,
8834 proto_tree_add_uint(subtree
, hf_ansi_a_length
, tvb
,
8835 curr_offset
+ 1, 1, parm_len
);
8839 if (elem_1_fcn
[dec_idx
] == NULL
)
8841 proto_tree_add_text(subtree
,
8842 tvb
, curr_offset
+ 2, parm_len
,
8845 consumed
= parm_len
;
8849 gchar
*a_add_string
;
8851 a_add_string
= (gchar
*) wmem_alloc(wmem_packet_scope(), 1024);
8852 a_add_string
[0] = '\0';
8854 (*elem_1_fcn
[dec_idx
])(tvb
, pinfo
, subtree
, curr_offset
+ 2,
8855 parm_len
, a_add_string
, 1024);
8857 if (a_add_string
[0] != '\0')
8859 proto_item_append_text(item
, "%s", a_add_string
);
8871 * Type Value (TV) element dissector
8873 * Length cannot be used in these functions, big problem if a element dissector
8874 * is not defined for these.
8877 elem_tv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, elem_idx_t idx
, guint32 offset
, const gchar
*name_add
)
8881 guint32 curr_offset
;
8882 proto_tree
*subtree
;
8887 curr_offset
= offset
;
8890 if ((int)idx
< 0 || idx
>= ansi_a_elem_1_max
-1)
8892 /* Unknown index, skip the element */
8893 return tvb_length_remaining(tvb
, offset
) ;
8896 oct
= tvb_get_guint8(tvb
, curr_offset
);
8898 if (oct
== (guint8
) ansi_a_elem_1_strings
[idx
].value
)
8900 dec_idx
= ansi_a_elem_1_strings
[idx
].dec_index
;
8903 proto_tree_add_text(tree
,
8904 tvb
, curr_offset
, -1,
8906 ansi_a_elem_1_strings
[idx
].strptr
,
8907 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
8909 subtree
= proto_item_add_subtree(item
, ett_ansi_elem_1
[idx
]);
8911 proto_tree_add_uint_format(subtree
, hf_ansi_a_elem_id
, tvb
,
8912 curr_offset
, 1, oct
,
8915 if (elem_1_fcn
[dec_idx
] == NULL
)
8917 /* BAD THING, CANNOT DETERMINE LENGTH */
8919 proto_tree_add_text(subtree
,
8920 tvb
, curr_offset
+ 1, 1,
8921 "No element dissector, rest of dissection may be incorrect");
8927 gchar
*a_add_string
;
8929 a_add_string
= (gchar
*) wmem_alloc(wmem_packet_scope(), 1024);
8930 a_add_string
[0] = '\0';
8931 consumed
= (*elem_1_fcn
[dec_idx
])(tvb
, pinfo
, subtree
, curr_offset
+ 1, -1, a_add_string
, 1024);
8933 if (a_add_string
[0] != '\0')
8935 proto_item_append_text(item
, "%s", a_add_string
);
8941 proto_item_set_len(item
, consumed
);
8948 * Type (T) element dissector
8950 * Length cannot be used in these functions, big problem if a element dissector
8951 * is not defined for these.
8954 elem_t(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, elem_idx_t idx
, guint32 offset
, const gchar
*name_add
)
8957 guint32 curr_offset
;
8961 curr_offset
= offset
;
8964 if ((int)idx
< 0 || idx
>= ansi_a_elem_1_max
-1)
8966 /* Unknown index, skip the element */
8967 return tvb_length_remaining(tvb
, offset
) ;
8970 oct
= tvb_get_guint8(tvb
, curr_offset
);
8972 if (oct
== (guint8
) ansi_a_elem_1_strings
[idx
].value
)
8974 proto_tree_add_uint_format(tree
, hf_ansi_a_elem_id
, tvb
, curr_offset
, 1, oct
,
8976 ansi_a_elem_1_strings
[idx
].strptr
,
8977 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
8986 * Length Value (LV) element dissector
8989 elem_lv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, elem_idx_t idx
, guint32 offset
, guint len _U_
, const gchar
*name_add
)
8993 guint32 curr_offset
;
8994 proto_tree
*subtree
;
8999 curr_offset
= offset
;
9002 if ((int)idx
< 0 || idx
>= ansi_a_elem_1_max
-1)
9004 /* Unknown index, skip the element */
9005 return tvb_length_remaining(tvb
, offset
) ;
9008 dec_idx
= ansi_a_elem_1_strings
[idx
].dec_index
;
9010 parm_len
= tvb_get_guint8(tvb
, curr_offset
);
9013 proto_tree_add_text(tree
,
9014 tvb
, curr_offset
, parm_len
+ 1,
9016 ansi_a_elem_1_strings
[idx
].strptr
,
9017 (name_add
== NULL
) || (name_add
[0] == '\0') ? "" : name_add
);
9019 subtree
= proto_item_add_subtree(item
, ett_ansi_elem_1
[idx
]);
9021 proto_tree_add_uint(subtree
, hf_ansi_a_length
, tvb
,
9022 curr_offset
, 1, parm_len
);
9026 if (elem_1_fcn
[dec_idx
] == NULL
)
9028 proto_tree_add_text(subtree
,
9029 tvb
, curr_offset
+ 1, parm_len
,
9032 consumed
= parm_len
;
9036 gchar
*a_add_string
;
9038 a_add_string
= (gchar
*) wmem_alloc(wmem_packet_scope(), 1024);
9039 a_add_string
[0] = '\0';
9041 (*elem_1_fcn
[dec_idx
])(tvb
, pinfo
, subtree
, curr_offset
+ 1,
9042 parm_len
, a_add_string
, 1024);
9044 if (a_add_string
[0] != '\0')
9046 proto_item_append_text(item
, "%s", a_add_string
);
9051 return(consumed
+ 1);
9055 * Value (V) element dissector
9057 * Length cannot be used in these functions, big problem if a element dissector
9058 * is not defined for these.
9061 elem_v(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, elem_idx_t idx
, guint32 offset
)
9064 guint32 curr_offset
;
9067 curr_offset
= offset
;
9069 if ((int)idx
< 0 || idx
>= ansi_a_elem_1_max
-1)
9071 /* Unknown index, skip the element */
9072 return tvb_length_remaining(tvb
, offset
) ;
9075 dec_idx
= ansi_a_elem_1_strings
[idx
].dec_index
;
9077 if (elem_1_fcn
[dec_idx
] == NULL
)
9079 /* BAD THING, CANNOT DETERMINE LENGTH */
9081 proto_tree_add_text(tree
,
9082 tvb
, curr_offset
, 1,
9083 "No element dissector, rest of dissection may be incorrect");
9089 gchar
*a_add_string
;
9091 a_add_string
= (gchar
*) wmem_alloc(wmem_packet_scope(), 1024);
9092 a_add_string
[0] = '\0';
9093 consumed
= (*elem_1_fcn
[dec_idx
])(tvb
, pinfo
, tree
, curr_offset
, -1, a_add_string
, 1024);
9100 #define ELEM_MAND_TLV(elem_idx, elem_name_addition) \
9102 if ((consumed = elem_tlv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9104 curr_offset += consumed; \
9105 curr_len -= consumed; \
9109 proto_tree_add_text(tree, \
9110 tvb, curr_offset, 0, \
9111 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9112 ansi_a_elem_1_strings[elem_idx].value, \
9113 ansi_a_elem_1_strings[elem_idx].strptr, \
9114 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9117 if (curr_len <= 0) return; \
9120 #define ELEM_OPT_TLV(elem_idx, elem_name_addition) \
9122 if ((consumed = elem_tlv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition)) > 0) \
9124 curr_offset += consumed; \
9125 curr_len -= consumed; \
9127 if (curr_len <= 0) return; \
9130 #define ELEM_MAND_TV(elem_idx, elem_name_addition) \
9132 if ((consumed = elem_tv(tvb, pinfo, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9134 curr_offset += consumed; \
9135 curr_len -= consumed; \
9139 proto_tree_add_text(tree, \
9140 tvb, curr_offset, 0, \
9141 "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
9142 ansi_a_elem_1_strings[elem_idx].value, \
9143 ansi_a_elem_1_strings[elem_idx].strptr, \
9144 (elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
9147 if (curr_len <= 0) return; \
9150 #define ELEM_OPT_TV(elem_idx, elem_name_addition) \
9152 if ((consumed = elem_tv(tvb, pinfo, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9154 curr_offset += consumed; \
9155 curr_len -= consumed; \
9157 if (curr_len <= 0) return; \
9160 #define ELEM_OPT_T(elem_idx, elem_name_addition) \
9162 if ((consumed = elem_t(tvb, pinfo, tree, elem_idx, curr_offset, elem_name_addition)) > 0) \
9164 curr_offset += consumed; \
9165 curr_len -= consumed; \
9167 if (curr_len <= 0) return; \
9170 #define ELEM_MAND_LV(elem_idx, elem_name_addition, from_sip) \
9172 if ((consumed = (from_sip ? \
9173 elem_tlv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition) : \
9174 elem_lv(tvb, pinfo, tree, elem_idx, curr_offset, curr_len, elem_name_addition))) > 0) \
9176 curr_offset += consumed; \
9177 curr_len -= consumed; \
9181 /* Mandatory, but nothing we can do */ \
9183 if (curr_len <= 0) return; \
9186 #define ELEM_MAND_V(elem_idx, from_sip) \
9188 if ((consumed = (from_sip ? \
9189 elem_tv(tvb, pinfo, tree, elem_idx, curr_offset, "") : \
9190 elem_v(tvb, pinfo, tree, elem_idx, curr_offset))) > 0) \
9192 curr_offset += consumed; \
9193 curr_len -= consumed; \
9197 /* Mandatory, but nothing we can do */ \
9199 if (curr_len <= 0) return; \
9207 bsmap_cl3_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
9210 guint32 curr_offset
;
9213 curr_offset
= offset
;
9217 /* With femtoInterfaceMsg application, the Information Elements
9218 for the Complete Layer 3 Information message shall not be included */
9219 ELEM_MAND_TLV(ANSI_A_E_CELL_ID
, "");
9221 ELEM_MAND_TLV(ANSI_A_E_L3_INFO
, "");
9224 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9231 dtap_cm_srvc_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
9233 guint32 curr_offset
;
9237 proto_tree
*subtree
;
9241 curr_offset
= offset
;
9245 * special dissection for CM Service Type
9247 oct
= tvb_get_guint8(tvb
, curr_offset
);
9251 case 0x01: str
= "Mobile Originating Call"; break;
9258 proto_tree_add_text(tree
,
9259 tvb
, curr_offset
, 1,
9260 "CM Service Type: %s",
9263 subtree
= proto_item_add_subtree(item
, ett_cm_srvc_type
);
9265 other_decode_bitfield_value(a_bigbuf
, oct
, 0xf0, 8);
9266 proto_tree_add_text(subtree
,
9267 tvb
, curr_offset
, 1,
9271 other_decode_bitfield_value(a_bigbuf
, oct
, 0x0f, 8);
9272 proto_tree_add_text(subtree
,
9273 tvb
, curr_offset
, 1,
9274 "%s : Service Type: (%u) %s",
9282 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2
, "", from_sip
);
9284 ELEM_MAND_LV(ANSI_A_E_MID
, "", from_sip
);
9286 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM
, "");
9288 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9290 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
9292 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM
, "");
9294 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM
, "");
9296 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT
, "");
9298 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM
, "");
9300 ELEM_OPT_TV(ANSI_A_E_SO
, "");
9302 ELEM_OPT_T(ANSI_A_E_VP_REQ
, "");
9304 ELEM_OPT_TV(ANSI_A_E_RE_RES
, "");
9306 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM
, "");
9308 ELEM_OPT_TV(ANSI_A_E_CIC
, "");
9310 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT
, "");
9312 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA
, "");
9314 ELEM_OPT_TLV(ANSI_A_E_PACA_REOI
, "");
9316 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
9318 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
9320 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
9322 switch (global_a_variant
)
9324 case A_VARIANT_IOS501
:
9325 ELEM_OPT_TLV(ANSI_A_E_SSCI
, "");
9327 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9329 ELEM_OPT_T(ANSI_A_E_ORIG_CI
, "");
9331 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE
, "");
9333 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9335 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
9337 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
9339 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
9343 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9350 dtap_cm_srvc_req_cont(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9352 guint32 curr_offset
;
9356 curr_offset
= offset
;
9359 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM
, "");
9361 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM
, "");
9363 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS
, "");
9365 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9372 bsmap_page_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9374 guint32 curr_offset
;
9378 curr_offset
= offset
;
9381 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9383 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9385 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
9387 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
9389 ELEM_OPT_TV(ANSI_A_E_SO
, "");
9391 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
9393 switch (global_a_variant
)
9395 case A_VARIANT_IOS501
:
9396 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
9398 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
9400 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
9402 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9404 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
9408 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9415 dtap_page_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
9417 guint32 curr_offset
;
9421 curr_offset
= offset
;
9424 ELEM_MAND_LV(ANSI_A_E_CM_INFO_TYPE_2
, "", from_sip
);
9426 ELEM_MAND_LV(ANSI_A_E_MID
, "", from_sip
);
9428 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9430 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9432 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
9434 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM
, "");
9436 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM
, "");
9438 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT
, "");
9440 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM
, "");
9442 ELEM_OPT_TV(ANSI_A_E_SO
, "");
9444 ELEM_OPT_T(ANSI_A_E_VP_REQ
, "");
9446 ELEM_OPT_TV(ANSI_A_E_CIC
, "");
9448 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT
, "");
9450 ELEM_OPT_TV(ANSI_A_E_RE_RES
, "");
9452 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
9454 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
9456 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
9458 switch (global_a_variant
)
9460 case A_VARIANT_IOS501
:
9461 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9463 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9465 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
9467 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
9471 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9478 dtap_progress(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9480 guint32 curr_offset
;
9484 curr_offset
= offset
;
9487 ELEM_OPT_TV(ANSI_A_E_SIGNAL
, "");
9489 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS
, "");
9491 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9493 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9500 dtap_srvc_redirection(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9502 guint32 curr_offset
;
9506 curr_offset
= offset
;
9509 ELEM_MAND_TLV(ANSI_A_E_IS2000_RED_RECORD
, "");
9511 ELEM_MAND_TLV(ANSI_A_E_S_RED_INFO
, "");
9513 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9515 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9517 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
9519 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9521 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9528 dtap_srvc_release(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9530 guint32 curr_offset
;
9534 curr_offset
= offset
;
9537 ELEM_MAND_TLV(ANSI_A_E_SOCI
, "");
9539 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
9541 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3
, "");
9543 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9550 dtap_srvc_release_complete(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9552 guint32 curr_offset
;
9556 curr_offset
= offset
;
9559 ELEM_MAND_TLV(ANSI_A_E_SOCI
, "");
9561 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9568 bsmap_ass_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9571 guint32 curr_offset
;
9574 curr_offset
= offset
;
9577 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE
, "");
9579 ELEM_OPT_TV(ANSI_A_E_CIC
, "");
9581 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO
, "");
9583 ELEM_OPT_TV(ANSI_A_E_SO
, "");
9585 ELEM_OPT_TV(ANSI_A_E_SIGNAL
, "");
9587 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM
, "");
9589 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS
, "");
9591 ELEM_OPT_TLV(ANSI_A_E_PRIO
, "");
9593 ELEM_OPT_TLV(ANSI_A_E_PACA_TS
, "");
9595 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS
, "");
9597 switch (global_a_variant
)
9599 case A_VARIANT_IOS501
:
9600 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9602 ELEM_OPT_TLV(ANSI_A_E_SR_ID
, "");
9604 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
9606 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
9608 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9610 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
9614 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9621 bsmap_ass_complete(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9624 guint32 curr_offset
;
9627 curr_offset
= offset
;
9630 ELEM_MAND_TV(ANSI_A_E_CHAN_NUM
, "");
9632 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO
, "");
9634 ELEM_OPT_TV(ANSI_A_E_SO
, "");
9636 switch (global_a_variant
)
9638 case A_VARIANT_IOS501
:
9639 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9641 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
9643 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
9645 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9649 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9656 bsmap_ass_failure(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9659 guint32 curr_offset
;
9662 curr_offset
= offset
;
9665 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
9667 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9669 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9676 bsmap_clr_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9679 guint32 curr_offset
;
9682 curr_offset
= offset
;
9685 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
9687 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3
, "");
9689 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9696 bsmap_clr_command(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9699 guint32 curr_offset
;
9702 curr_offset
= offset
;
9705 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
9707 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3
, "");
9709 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9716 bsmap_clr_complete(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9719 guint32 curr_offset
;
9722 curr_offset
= offset
;
9725 ELEM_OPT_T(ANSI_A_E_PDI
, "");
9727 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
9729 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9736 dtap_alert_with_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9738 guint32 curr_offset
;
9742 curr_offset
= offset
;
9745 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS
, "");
9747 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9749 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9756 bsmap_bs_srvc_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9758 guint32 curr_offset
;
9762 curr_offset
= offset
;
9765 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9767 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9769 ELEM_OPT_TV(ANSI_A_E_SO
, "");
9771 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9773 ELEM_OPT_TLV(ANSI_A_E_ADDS_USER_PART
, "");
9775 ELEM_OPT_TLV(ANSI_A_E_SR_ID
, "");
9777 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9779 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9786 bsmap_bs_srvc_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9788 guint32 curr_offset
;
9792 curr_offset
= offset
;
9795 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9797 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9799 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9801 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
9803 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
9805 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9812 bsmap_add_srvc_noti(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9814 guint32 curr_offset
;
9818 curr_offset
= offset
;
9821 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9823 ELEM_MAND_TV(ANSI_A_E_SO
, "");
9825 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
9827 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9834 dtap_add_srvc_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9836 guint32 curr_offset
;
9840 curr_offset
= offset
;
9843 ELEM_MAND_TLV(ANSI_A_E_SOCI
, "");
9845 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM
, "");
9847 ELEM_MAND_TV(ANSI_A_E_SO
, "");
9849 ELEM_OPT_T(ANSI_A_E_VP_REQ
, "");
9851 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_ASCII_NUM
, "");
9853 ELEM_OPT_TV(ANSI_A_E_CIC
, "");
9855 ELEM_OPT_TLV(ANSI_A_E_SSCI
, "");
9857 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
9859 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
9861 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9868 dtap_connect(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9870 guint32 curr_offset
;
9874 curr_offset
= offset
;
9877 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9879 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9886 dtap_flash_with_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9888 guint32 curr_offset
;
9892 curr_offset
= offset
;
9895 ELEM_OPT_TLV(ANSI_A_E_CLD_PARTY_BCD_NUM
, "");
9897 ELEM_OPT_TV(ANSI_A_E_SIGNAL
, "");
9899 ELEM_OPT_TV(ANSI_A_E_MWI
, "");
9901 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM
, "");
9903 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9905 if (pinfo
->p2p_dir
== P2P_DIR_RECV
)
9907 ELEM_OPT_TLV(ANSI_A_E_REV_MS_INFO_RECS
, "");
9911 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS
, "");
9914 ELEM_OPT_TLV(ANSI_A_E_SSCI
, "");
9916 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9918 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9925 dtap_flash_with_info_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9927 guint32 curr_offset
;
9931 curr_offset
= offset
;
9934 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9936 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
9938 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9945 bsmap_feat_noti(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9947 guint32 curr_offset
;
9951 curr_offset
= offset
;
9954 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9956 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9958 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
9960 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
9962 ELEM_OPT_TV(ANSI_A_E_SIGNAL
, "");
9964 ELEM_OPT_TV(ANSI_A_E_MWI
, "");
9966 ELEM_OPT_TLV(ANSI_A_E_CLG_PARTY_ASCII_NUM
, "");
9968 ELEM_OPT_TLV(ANSI_A_E_FWD_MS_INFO_RECS
, "");
9970 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
9972 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
9974 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
9976 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
9978 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
9985 bsmap_feat_noti_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
9987 guint32 curr_offset
;
9991 curr_offset
= offset
;
9994 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
9996 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
9998 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10005 bsmap_paca_command(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10007 guint32 curr_offset
;
10011 curr_offset
= offset
;
10014 ELEM_OPT_TLV(ANSI_A_E_PRIO
, "");
10016 ELEM_OPT_TLV(ANSI_A_E_PACA_TS
, "");
10018 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10025 bsmap_paca_command_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10027 guint32 curr_offset
;
10031 curr_offset
= offset
;
10034 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
10036 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10043 bsmap_paca_update(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10045 guint32 curr_offset
;
10049 curr_offset
= offset
;
10052 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10054 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10056 ELEM_OPT_TLV(ANSI_A_E_PACA_ORDER
, "");
10058 ELEM_OPT_TLV(ANSI_A_E_PRIO
, "");
10060 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM
, "");
10062 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM
, "");
10064 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT
, "");
10066 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM
, "");
10068 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT
, "");
10070 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10072 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10074 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10081 bsmap_paca_update_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10083 guint32 curr_offset
;
10087 curr_offset
= offset
;
10090 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10092 ELEM_OPT_TLV(ANSI_A_E_PRIO
, "");
10094 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
10096 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10103 bsmap_rm_pos_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10105 guint32 curr_offset
;
10109 curr_offset
= offset
;
10112 ELEM_MAND_TLV(ANSI_A_E_PSMM_COUNT
, "");
10114 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10121 bsmap_rm_pos_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10123 guint32 curr_offset
;
10127 curr_offset
= offset
;
10130 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
10132 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
10134 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE_LIST
, "");
10136 ELEM_OPT_TLV(ANSI_A_E_GEO_LOC
, "");
10138 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10145 bsmap_auth_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10147 guint32 curr_offset
;
10151 curr_offset
= offset
;
10154 ELEM_MAND_TLV(ANSI_A_E_AUTH_CHLG_PARAM
, "");
10156 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10158 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
10160 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
10162 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10164 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10166 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
10168 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10170 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10172 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10176 dtap_auth_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10178 guint32 curr_offset
;
10182 curr_offset
= offset
;
10185 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM
, "", from_sip
);
10187 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10189 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10196 bsmap_auth_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10198 guint32 curr_offset
;
10202 curr_offset
= offset
;
10205 ELEM_MAND_TLV(ANSI_A_E_AUTH_RESP_PARAM
, "");
10207 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
10209 ELEM_MAND_TV(ANSI_A_E_TAG
, "");
10211 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10213 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10215 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10223 bsmap_bearer_upd_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10225 guint32 curr_offset
;
10229 curr_offset
= offset
;
10232 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
10234 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
10236 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10244 bsmap_bearer_upd_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10246 guint32 curr_offset
;
10250 curr_offset
= offset
;
10253 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
10255 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
10257 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
10259 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10267 bsmap_bearer_upd_reqd(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10269 guint32 curr_offset
;
10273 curr_offset
= offset
;
10276 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
10278 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
10280 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
10282 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10286 dtap_auth_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10288 guint32 curr_offset
;
10292 curr_offset
= offset
;
10295 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM
, "", from_sip
);
10297 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10304 bsmap_user_zone_update(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10306 guint32 curr_offset
;
10310 curr_offset
= offset
;
10313 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
10315 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10322 dtap_user_zone_update_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10324 guint32 curr_offset
;
10328 curr_offset
= offset
;
10331 ELEM_MAND_TLV(ANSI_A_E_UZ_ID
, "");
10333 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10340 dtap_user_zone_update(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10342 guint32 curr_offset
;
10346 curr_offset
= offset
;
10349 ELEM_MAND_TLV(ANSI_A_E_UZ_ID
, "");
10351 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10358 bsmap_user_zone_reject(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10360 guint32 curr_offset
;
10364 curr_offset
= offset
;
10367 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
10369 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
10371 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
10373 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10375 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10377 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
10379 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10381 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10383 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10390 dtap_user_zone_reject(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10392 guint32 curr_offset
;
10396 curr_offset
= offset
;
10399 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
10401 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10408 bsmap_reg_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10410 guint32 curr_offset
;
10414 curr_offset
= offset
;
10417 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
10419 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
10421 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10423 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
10425 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10427 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10429 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10431 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10438 bsmap_ms_reg_noti(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10440 guint32 curr_offset
;
10444 curr_offset
= offset
;
10447 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
10449 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10456 bsmap_bs_auth_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10458 guint32 curr_offset
;
10462 curr_offset
= offset
;
10465 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
10467 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10474 bsmap_bs_auth_req_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10476 guint32 curr_offset
;
10480 curr_offset
= offset
;
10483 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
10485 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10492 dtap_ssd_update_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10494 guint32 curr_offset
;
10498 curr_offset
= offset
;
10501 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM
, "", from_sip
);
10503 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10510 dtap_bs_challenge(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10512 guint32 curr_offset
;
10516 curr_offset
= offset
;
10519 ELEM_MAND_LV(ANSI_A_E_AUTH_CHLG_PARAM
, "", from_sip
);
10521 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10528 dtap_bs_challenge_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10530 guint32 curr_offset
;
10534 curr_offset
= offset
;
10537 ELEM_MAND_LV(ANSI_A_E_AUTH_RESP_PARAM
, "", from_sip
);
10539 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10546 dtap_ssd_update_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10548 guint32 curr_offset
;
10552 curr_offset
= offset
;
10555 ELEM_OPT_TLV(ANSI_A_E_CAUSE_L3
, "");
10557 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10564 dtap_lu_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10566 guint32 curr_offset
;
10570 curr_offset
= offset
;
10573 ELEM_MAND_LV(ANSI_A_E_MID
, "", from_sip
);
10575 ELEM_OPT_TV(ANSI_A_E_LAI
, "");
10577 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2
, "");
10579 ELEM_OPT_TV(ANSI_A_E_REG_TYPE
, "");
10581 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10583 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10585 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM
, "");
10587 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM
, "");
10589 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT
, "");
10591 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM
, "");
10593 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT
, "");
10595 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
10597 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10599 ELEM_OPT_TV(ANSI_A_E_RETURN_CAUSE
, "");
10601 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10603 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10605 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10607 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10614 dtap_lu_accept(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10616 guint32 curr_offset
;
10620 curr_offset
= offset
;
10623 switch (global_a_variant
)
10625 case A_VARIANT_IOS401
:
10626 ELEM_OPT_TV(ANSI_A_E_LAI
, "");
10629 case A_VARIANT_IOS501
:
10630 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
10632 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
10634 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10638 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10645 dtap_lu_reject(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10647 guint32 curr_offset
;
10651 curr_offset
= offset
;
10654 ELEM_MAND_V(ANSI_A_E_REJ_CAUSE
, from_sip
);
10656 switch (global_a_variant
)
10658 case A_VARIANT_IOS501
:
10659 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
10661 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10665 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10672 bsmap_priv_mode_command(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10674 guint32 curr_offset
;
10678 curr_offset
= offset
;
10681 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO
, "");
10683 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10690 bsmap_priv_mode_complete(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10692 guint32 curr_offset
;
10696 curr_offset
= offset
;
10699 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO
, "");
10701 ELEM_OPT_T(ANSI_A_E_VP_REQ
, "");
10703 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10710 bsmap_status_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10712 guint32 curr_offset
;
10716 curr_offset
= offset
;
10719 ELEM_MAND_TLV(ANSI_A_E_IE_REQD
, "");
10721 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10723 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10725 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10727 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
10729 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10731 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
10733 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
10735 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10737 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
10739 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10741 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10748 dtap_status_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10750 guint32 curr_offset
;
10754 curr_offset
= offset
;
10757 ELEM_MAND_LV(ANSI_A_E_IE_REQD
, "", from_sip
);
10759 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10767 bsmap_status_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10769 guint32 curr_offset
;
10773 curr_offset
= offset
;
10776 ELEM_MAND_TLV(ANSI_A_E_REV_MS_INFO_RECS
, "");
10778 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10780 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10782 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10784 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
10786 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10793 dtap_status_resp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
10795 guint32 curr_offset
;
10799 curr_offset
= offset
;
10802 ELEM_MAND_LV(ANSI_A_E_REV_MS_INFO_RECS
, "", from_sip
);
10804 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10811 bsmap_ho_reqd(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10813 guint32 curr_offset
;
10817 curr_offset
= offset
;
10820 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
10822 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST
, " (Target)");
10824 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2
, "");
10826 ELEM_OPT_T(ANSI_A_E_RESP_REQ
, "");
10828 ELEM_OPT_TLV(ANSI_A_E_ENC_INFO
, "");
10830 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID
, "");
10832 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10834 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE
, "");
10836 ELEM_OPT_TV(ANSI_A_E_SO
, "");
10838 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
10840 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID
, "");
10842 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID
, "");
10844 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS
, "");
10846 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10848 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR
, "");
10850 switch (global_a_variant
)
10852 case A_VARIANT_IOS401
:
10853 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR
, "");
10856 case A_VARIANT_IOS501
:
10857 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR
, "");
10861 ELEM_OPT_TLV(ANSI_A_E_PTYPE
, "");
10863 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC
, "");
10865 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10867 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID
, "");
10869 ELEM_OPT_TLV(ANSI_A_E_SO_LIST
, "");
10871 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X
, "");
10873 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR
, "");
10875 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR
, "");
10877 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR
, "");
10879 ELEM_OPT_TLV(ANSI_A_E_PSP
, "");
10881 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID
, "");
10883 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10885 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10887 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10894 bsmap_ho_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10896 guint32 curr_offset
;
10900 curr_offset
= offset
;
10903 ELEM_MAND_TLV(ANSI_A_E_CHAN_TYPE
, "");
10905 ELEM_MAND_TLV(ANSI_A_E_ENC_INFO
, "");
10907 ELEM_MAND_TLV(ANSI_A_E_CM_INFO_TYPE_2
, "");
10909 ELEM_MAND_TLV(ANSI_A_E_CELL_ID_LIST
, "(Target)");
10911 ELEM_OPT_TLV(ANSI_A_E_CIC_EXT
, "");
10913 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID
, "");
10915 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10917 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10919 ELEM_OPT_TLV(ANSI_A_E_DOWNLINK_RE
, "");
10921 ELEM_OPT_TV(ANSI_A_E_SO
, "");
10923 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
10925 ELEM_OPT_TLV(ANSI_A_E_IS95_MS_MEAS_CHAN_ID
, "");
10927 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID
, "");
10929 ELEM_OPT_TLV(ANSI_A_E_QOS_PARAMS
, "");
10931 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
10933 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR
, "");
10935 switch (global_a_variant
)
10937 case A_VARIANT_IOS401
:
10938 ELEM_OPT_TLV(ANSI_A_E_PDSN_IP_ADDR
, "");
10941 case A_VARIANT_IOS501
:
10942 ELEM_OPT_TLV(ANSI_A_E_S_PDSN_ADDR
, "");
10946 ELEM_OPT_TLV(ANSI_A_E_PTYPE
, "");
10948 switch (global_a_variant
)
10950 case A_VARIANT_IOS501
:
10951 ELEM_OPT_TLV(ANSI_A_E_SRNC_TRNC_TC
, "");
10953 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
10955 ELEM_OPT_TV(ANSI_A_E_ACC_NET_ID
, "");
10957 ELEM_OPT_TLV(ANSI_A_E_SO_LIST
, "");
10959 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X
, "");
10961 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR
, "");
10963 ELEM_OPT_TLV(ANSI_A_E_ANCH_PDSN_ADDR
, "");
10965 ELEM_OPT_TLV(ANSI_A_E_ANCH_PP_ADDR
, "");
10967 ELEM_OPT_TLV(ANSI_A_E_PSP
, "");
10969 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID
, "");
10971 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
10973 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
10975 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
10977 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
10981 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
10988 bsmap_ho_req_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
10990 guint32 curr_offset
;
10994 curr_offset
= offset
;
10997 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID
, "");
10999 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
11001 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS
, "");
11003 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS
, "");
11005 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID
, "");
11007 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR
, "");
11009 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR
, "");
11011 switch (global_a_variant
)
11013 case A_VARIANT_IOS501
:
11014 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC
, "");
11016 ELEM_OPT_TLV(ANSI_A_E_SO_LIST
, "");
11018 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
11020 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X
, "");
11022 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID
, "");
11024 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_SESSION
, "");
11026 ELEM_OPT_TLV(ANSI_A_E_A2P_BEARER_FORMAT
, "");
11030 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11037 bsmap_ho_failure(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11039 guint32 curr_offset
;
11043 curr_offset
= offset
;
11046 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11048 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11055 bsmap_ho_command(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11057 guint32 curr_offset
;
11061 curr_offset
= offset
;
11064 ELEM_OPT_TV(ANSI_A_E_RF_CHAN_ID
, "");
11066 ELEM_OPT_TLV(ANSI_A_E_IS95_CHAN_ID
, "");
11068 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
11070 ELEM_OPT_TLV(ANSI_A_E_HO_POW_LEV
, "");
11072 ELEM_OPT_TV(ANSI_A_E_SID
, "");
11074 ELEM_OPT_TLV(ANSI_A_E_EXT_HO_DIR_PARAMS
, "");
11076 ELEM_OPT_TV(ANSI_A_E_HHO_PARAMS
, "");
11078 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID
, "");
11080 ELEM_OPT_TLV(ANSI_A_E_IS2000_SCR
, "");
11082 ELEM_OPT_TLV(ANSI_A_E_IS2000_NN_SCR
, "");
11084 switch (global_a_variant
)
11086 case A_VARIANT_IOS501
:
11087 ELEM_OPT_TLV(ANSI_A_E_TRNC_SRNC_TC
, "");
11089 ELEM_OPT_TLV(ANSI_A_E_SO_LIST
, "");
11091 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
11093 ELEM_OPT_TLV(ANSI_A_E_AMPS_HHO_PARAM
, "");
11095 ELEM_OPT_TLV(ANSI_A_E_IS2000_CHAN_ID_3X
, "");
11097 ELEM_OPT_TLV(ANSI_A_E_PLCM_ID
, "");
11101 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11108 bsmap_ho_complete(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11110 guint32 curr_offset
;
11114 curr_offset
= offset
;
11117 ELEM_OPT_TV(ANSI_A_E_SO
, "");
11119 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11126 bsmap_ho_reqd_rej(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11128 guint32 curr_offset
;
11132 curr_offset
= offset
;
11135 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11137 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11144 bsmap_ho_performed(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11146 guint32 curr_offset
;
11150 curr_offset
= offset
;
11153 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11155 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
11157 ELEM_OPT_TV(ANSI_A_E_CHAN_NUM
, "");
11159 ELEM_OPT_TLV(ANSI_A_E_BAND_CLASS
, "");
11161 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
11163 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11170 bsmap_block(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11172 guint32 curr_offset
;
11176 curr_offset
= offset
;
11179 ELEM_MAND_TV(ANSI_A_E_CIC
, "");
11181 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11183 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP
, "");
11185 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11192 bsmap_block_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11194 guint32 curr_offset
;
11198 curr_offset
= offset
;
11201 ELEM_MAND_TV(ANSI_A_E_CIC
, "");
11203 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11210 bsmap_unblock(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11212 guint32 curr_offset
;
11216 curr_offset
= offset
;
11219 ELEM_MAND_TV(ANSI_A_E_CIC
, "");
11221 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP
, "");
11223 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11230 bsmap_unblock_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11232 guint32 curr_offset
;
11236 curr_offset
= offset
;
11239 ELEM_MAND_TV(ANSI_A_E_CIC
, "");
11241 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11248 bsmap_reset(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11250 guint32 curr_offset
;
11254 curr_offset
= offset
;
11257 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11259 ELEM_OPT_TLV(ANSI_A_E_SW_VER
, "");
11261 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11268 bsmap_reset_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11270 guint32 curr_offset
;
11274 curr_offset
= offset
;
11277 ELEM_OPT_TLV(ANSI_A_E_SW_VER
, "");
11279 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11286 bsmap_reset_cct(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11288 guint32 curr_offset
;
11292 curr_offset
= offset
;
11295 ELEM_MAND_TV(ANSI_A_E_CIC
, "");
11297 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11299 ELEM_OPT_TLV(ANSI_A_E_CCT_GROUP
, "");
11301 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11308 bsmap_reset_cct_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11310 guint32 curr_offset
;
11314 curr_offset
= offset
;
11317 ELEM_MAND_TV(ANSI_A_E_CIC
, "");
11319 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11326 bsmap_xmode_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11328 guint32 curr_offset
;
11332 curr_offset
= offset
;
11335 ELEM_MAND_TLV(ANSI_A_E_XMODE
, "");
11337 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11344 bsmap_xmode_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11346 guint32 curr_offset
;
11350 curr_offset
= offset
;
11353 ELEM_MAND_TLV(ANSI_A_E_CAUSE
, "");
11355 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11362 bsmap_adds_page(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11364 guint32 curr_offset
;
11368 curr_offset
= offset
;
11371 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
11373 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART
, "");
11375 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
11377 ELEM_OPT_TLV(ANSI_A_E_CELL_ID_LIST
, "");
11379 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
11381 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
11383 ELEM_OPT_TLV(ANSI_A_E_P_REV
, "");
11385 ELEM_OPT_TLV(ANSI_A_E_MS_DES_FREQ
, "");
11387 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
11389 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11396 bsmap_adds_transfer(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11398 guint32 curr_offset
;
11402 curr_offset
= offset
;
11405 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
11407 ELEM_MAND_TLV(ANSI_A_E_ADDS_USER_PART
, "");
11409 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11411 ELEM_OPT_TLV(ANSI_A_E_AUTH_RESP_PARAM
, "");
11413 ELEM_OPT_TV(ANSI_A_E_AUTH_CNF_PARAM
, "");
11415 ELEM_OPT_TV(ANSI_A_E_AUTH_PARAM_COUNT
, "");
11417 ELEM_OPT_TLV(ANSI_A_E_AUTH_CHLG_PARAM
, "");
11419 ELEM_OPT_TLV(ANSI_A_E_AUTH_EVENT
, "");
11421 ELEM_OPT_TLV(ANSI_A_E_CELL_ID
, "");
11423 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
11425 ELEM_OPT_TLV(ANSI_A_E_AUTH_DATA
, "");
11427 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
11429 ELEM_OPT_TLV(ANSI_A_E_CM_INFO_TYPE_2
, "");
11431 ELEM_OPT_TV(ANSI_A_E_SCI
, "");
11433 ELEM_OPT_TV(ANSI_A_E_SO
, "");
11435 ELEM_OPT_TLV(ANSI_A_E_UZ_ID
, "");
11437 ELEM_OPT_TLV(ANSI_A_E_IS2000_MOB_CAP
, "");
11439 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11441 ELEM_OPT_TLV(ANSI_A_E_MOB_SUB_INFO
, "");
11443 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11450 bsmap_adds_transfer_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11452 guint32 curr_offset
;
11456 curr_offset
= offset
;
11459 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
11461 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
11463 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
11465 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11472 dtap_adds_deliver(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
)
11474 guint32 curr_offset
;
11478 curr_offset
= offset
;
11481 ELEM_MAND_LV(ANSI_A_E_ADDS_USER_PART
, "", from_sip
);
11483 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
11485 ELEM_OPT_TLV(ANSI_A_E_CDMA_SOWD
, "");
11487 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11494 bsmap_adds_page_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11496 guint32 curr_offset
;
11500 curr_offset
= offset
;
11503 ELEM_MAND_TLV(ANSI_A_E_MID
, "");
11505 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
11507 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11509 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
11511 ELEM_OPT_TLV(ANSI_A_E_CELL_ID
, "");
11513 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11515 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11522 dtap_adds_deliver_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11524 guint32 curr_offset
;
11528 curr_offset
= offset
;
11531 ELEM_OPT_TV(ANSI_A_E_TAG
, "");
11533 ELEM_OPT_TLV(ANSI_A_E_CAUSE
, "");
11535 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11542 bsmap_rejection(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11544 guint32 curr_offset
;
11548 curr_offset
= offset
;
11551 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11553 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11555 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE
, "");
11557 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11559 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11563 dtap_rejection(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip _U_
)
11565 guint32 curr_offset
;
11569 curr_offset
= offset
;
11572 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11574 ELEM_OPT_TLV(ANSI_A_E_IS2000_CAUSE
, "");
11576 ELEM_OPT_TLV(ANSI_A_E_SOCI
, "");
11578 ELEM_OPT_TLV(ANSI_A_E_MID
, "");
11580 EXTRANEOUS_DATA_CHECK(curr_len
, 0);
11583 #define ANSI_A_IOS401_BSMAP_NUM_MSG (sizeof(ansi_a_ios401_bsmap_strings)/sizeof(ext_value_string_t))
11584 #define ANSI_A_IOS501_BSMAP_NUM_MSG (sizeof(ansi_a_ios501_bsmap_strings)/sizeof(ext_value_string_t))
11585 static gint ett_bsmap_msg
[MAX(ANSI_A_IOS401_BSMAP_NUM_MSG
, ANSI_A_IOS501_BSMAP_NUM_MSG
)];
11586 static void (*bsmap_msg_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
) =
11588 bsmap_add_srvc_noti
, /* Additional Service Notification */
11589 bsmap_adds_page
, /* ADDS Page */
11590 bsmap_adds_page_ack
, /* ADDS Page Ack */
11591 bsmap_adds_transfer
, /* ADDS Transfer */
11592 bsmap_adds_transfer_ack
, /* ADDS Transfer Ack */
11593 bsmap_ass_complete
, /* Assignment Complete */
11594 bsmap_ass_failure
, /* Assignment Failure */
11595 bsmap_ass_req
, /* Assignment Request */
11596 bsmap_auth_req
, /* Authentication Request */
11597 bsmap_auth_resp
, /* Authentication Response */
11598 NULL
/* no BSMAP definition */, /* Base Station Challenge */
11599 NULL
/* no BSMAP definition */, /* Base Station Challenge Response */
11600 bsmap_block
, /* Block */
11601 bsmap_block_ack
, /* Block Acknowledge */
11602 bsmap_bs_srvc_req
, /* BS Service Request */
11603 bsmap_bs_srvc_resp
, /* BS Service Response */
11604 bsmap_clr_command
, /* Clear Command */
11605 bsmap_clr_complete
, /* Clear Complete */
11606 bsmap_clr_req
, /* Clear Request */
11607 bsmap_cl3_info
, /* Complete Layer 3 Information */
11608 bsmap_feat_noti
, /* Feature Notification */
11609 bsmap_feat_noti_ack
, /* Feature Notification Ack */
11610 bsmap_ho_command
, /* Handoff Command */
11611 NULL
/* no associated data */, /* Handoff Commenced */
11612 bsmap_ho_complete
, /* Handoff Complete */
11613 bsmap_ho_failure
, /* Handoff Failure */
11614 bsmap_ho_performed
, /* Handoff Performed */
11615 bsmap_ho_req
, /* Handoff Request */
11616 bsmap_ho_req_ack
, /* Handoff Request Acknowledge */
11617 bsmap_ho_reqd
, /* Handoff Required */
11618 bsmap_ho_reqd_rej
, /* Handoff Required Reject */
11619 bsmap_paca_command
, /* PACA Command */
11620 bsmap_paca_command_ack
, /* PACA Command Ack */
11621 bsmap_paca_update
, /* PACA Update */
11622 bsmap_paca_update_ack
, /* PACA Update Ack */
11623 bsmap_page_req
, /* Paging Request */
11624 bsmap_priv_mode_command
, /* Privacy Mode Command */
11625 bsmap_priv_mode_complete
, /* Privacy Mode Complete */
11626 bsmap_rm_pos_req
, /* Radio Measurements for Position Request */
11627 bsmap_rm_pos_resp
, /* Radio Measurements for Position Response */
11628 bsmap_rejection
, /* Rejection */
11629 bsmap_reg_req
, /* Registration Request */
11630 bsmap_reset
, /* Reset */
11631 bsmap_reset_ack
, /* Reset Acknowledge */
11632 bsmap_reset_cct
, /* Reset Circuit */
11633 bsmap_reset_cct_ack
, /* Reset Circuit Acknowledge */
11634 NULL
/* no BSMAP definition */, /* SSD Update Request */
11635 NULL
/* no BSMAP definition */, /* SSD Update Response */
11636 bsmap_status_req
, /* Status Request */
11637 bsmap_status_resp
, /* Status Response */
11638 bsmap_xmode_ack
, /* Transcoder Control Acknowledge */
11639 bsmap_xmode_req
, /* Transcoder Control Request */
11640 bsmap_unblock
, /* Unblock */
11641 bsmap_unblock_ack
, /* Unblock Acknowledge */
11642 bsmap_user_zone_reject
, /* User Zone Reject */
11643 bsmap_user_zone_update
, /* User Zone Update */
11644 bsmap_bearer_upd_req
, /* Bearer Update Request *//* IOS 5.0.1 */
11645 bsmap_bearer_upd_resp
, /* Bearer Update Response *//* IOS 5.0.1 */
11646 bsmap_bearer_upd_reqd
, /* Bearer Update Required *//* IOS 5.0.1 */
11647 bsmap_ms_reg_noti
, /* Mobile Station Registered Notification *//* IOS 5.0.1 */
11648 bsmap_bs_auth_req
, /* BS Authentication Request *//* IOS 5.0.1 */
11649 bsmap_bs_auth_req_ack
, /* BS Authentication Request Ack *//* IOS 5.0.1 */
11653 #define ANSI_A_IOS401_DTAP_NUM_MSG (sizeof(ansi_a_ios401_dtap_strings)/sizeof(ext_value_string_t))
11654 #define ANSI_A_IOS501_DTAP_NUM_MSG (sizeof(ansi_a_ios501_dtap_strings)/sizeof(ext_value_string_t))
11655 static gint ett_dtap_msg
[MAX(ANSI_A_IOS401_DTAP_NUM_MSG
, ANSI_A_IOS501_DTAP_NUM_MSG
)];
11656 static void (*dtap_msg_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
, gboolean from_sip
) =
11658 dtap_add_srvc_req
, /* Additional Service Request */
11659 dtap_adds_deliver
, /* ADDS Deliver */
11660 dtap_adds_deliver_ack
, /* ADDS Deliver Ack */
11661 dtap_alert_with_info
, /* Alert With Information */
11662 dtap_auth_req
, /* Authentication Request */
11663 dtap_auth_resp
, /* Authentication Response */
11664 dtap_bs_challenge
, /* Base Station Challenge */
11665 dtap_bs_challenge_resp
, /* Base Station Challenge Response */
11666 dtap_cm_srvc_req
, /* CM Service Request */
11667 dtap_cm_srvc_req_cont
, /* CM Service Request Continuation */
11668 dtap_connect
, /* Connect */
11669 dtap_flash_with_info
, /* Flash with Information */
11670 dtap_flash_with_info_ack
, /* Flash with Information Ack */
11671 dtap_lu_accept
, /* Location Updating Accept */
11672 dtap_lu_reject
, /* Location Updating Reject */
11673 dtap_lu_req
, /* Location Updating Request */
11674 dtap_page_resp
, /* Paging Response */
11675 NULL
/* no associated data */, /* Parameter Update Confirm */
11676 NULL
/* no associated data */, /* Parameter Update Request */
11677 dtap_rejection
, /* Rejection */
11678 dtap_progress
, /* Progress */
11679 dtap_srvc_redirection
, /* Service Redirection */
11680 dtap_srvc_release
, /* Service Release */
11681 dtap_srvc_release_complete
, /* Service Release Complete */
11682 dtap_ssd_update_req
, /* SSD Update Request */
11683 dtap_ssd_update_resp
, /* SSD Update Response */
11684 dtap_status_req
, /* Status Request */
11685 dtap_status_resp
, /* Status Response */
11686 dtap_user_zone_reject
, /* User Zone Reject */
11687 dtap_user_zone_update
, /* User Zone Update */
11688 dtap_user_zone_update_req
, /* User Zone Update Request */
11692 /* Utillity function to dissect CDMA200 A1 elements in ANSI MAP messages */
11694 dissect_cdma2000_a1_elements(tvbuff_t
*tvb
, _U_ packet_info
*pinfo
, proto_tree
*tree
, guint32 offset
, guint len
)
11696 guint32 curr_offset
;
11702 curr_offset
= offset
;
11706 * require at least 2 octets for T(ype) and L(ength)
11708 while (curr_len
> 1)
11711 * peeking at T(ype)
11713 oct
= tvb_get_guint8(tvb
, curr_offset
);
11715 for (idx
=0; idx
< (unsigned)ansi_a_elem_1_max
; idx
++)
11717 if (oct
== (guint8
) ansi_a_elem_1_strings
[idx
].value
)
11719 ELEM_OPT_TLV((elem_idx_t
)idx
, "");
11724 if (idx
== (elem_idx_t
)ansi_a_elem_1_max
)
11727 * didn't recognize the T(ype)
11728 * assuming it is in TLV form, step over
11730 consumed
= 2 + tvb_get_guint8(tvb
, curr_offset
+ 1);
11731 curr_offset
+= consumed
;
11732 curr_len
-= consumed
;
11736 EXTRANEOUS_DATA_CHECK_EXPERT(curr_len
, 0);
11739 /* GENERIC DISSECTOR FUNCTIONS */
11742 dissect_bsmap_common(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gboolean from_sip
)
11744 static ansi_a_tap_rec_t tap_rec
[16];
11745 static ansi_a_tap_rec_t
*tap_p
;
11746 static int tap_current
=0;
11748 guint32 offset
, saved_offset
;
11751 proto_item
*bsmap_item
= NULL
;
11752 proto_tree
*bsmap_tree
= NULL
;
11753 const gchar
*msg_str
;
11756 col_append_str(pinfo
->cinfo
, COL_INFO
, "(BSMAP) ");
11759 * set tap record pointer
11762 if (tap_current
== array_length(tap_rec
))
11766 tap_p
= &tap_rec
[tap_current
];
11770 saved_offset
= offset
;
11774 len
= tvb_length(tvb
);
11777 * add BSMAP message name
11779 oct
= tvb_get_guint8(tvb
, offset
++);
11781 msg_str
= my_try_val_to_str_idx((guint32
) oct
, ansi_a_bsmap_strings
, &dec_idx
);
11784 * create the a protocol tree
11786 if (msg_str
== NULL
)
11789 proto_tree_add_protocol_format(tree
, proto_a_bsmap
, tvb
, 0, len
,
11790 "ANSI A-I/F BSMAP - Unknown BSMAP Message Type (%u)",
11793 bsmap_tree
= proto_item_add_subtree(bsmap_item
, ett_bsmap
);
11798 proto_tree_add_protocol_format(tree
, proto_a_bsmap
, tvb
, 0, -1,
11799 "ANSI A-I/F BSMAP - %s",
11802 bsmap_tree
= proto_item_add_subtree(bsmap_item
, ett_bsmap_msg
[dec_idx
]);
11804 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", msg_str
);
11808 * add BSMAP message name
11810 proto_tree_add_uint_format(bsmap_tree
, hf_ansi_a_bsmap_msgtype
,
11811 tvb
, saved_offset
, 1, oct
, "Message Type");
11813 tap_p
->pdu_type
= BSSAP_PDU_TYPE_BSMAP
;
11814 tap_p
->message_type
= oct
;
11816 tap_queue_packet(ansi_a_tap
, pinfo
, tap_p
);
11818 if (msg_str
== NULL
) return;
11820 if ((len
- offset
) <= 0) return;
11822 a_meid_configured
= FALSE
;
11827 if (bsmap_msg_fcn
[dec_idx
] == NULL
)
11829 proto_tree_add_text(bsmap_tree
,
11830 tvb
, offset
, len
- offset
,
11831 "Message Elements");
11835 (*bsmap_msg_fcn
[dec_idx
])(tvb
, pinfo
, bsmap_tree
, offset
, len
- offset
, from_sip
);
11840 dissect_bsmap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
11842 dissect_bsmap_common(tvb
, pinfo
, tree
, FALSE
);
11846 dissect_dtap_common(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gboolean from_sip
)
11848 static ansi_a_tap_rec_t tap_rec
[16];
11849 static ansi_a_tap_rec_t
*tap_p
;
11850 static int tap_current
=0;
11852 guint32 offset
, saved_offset
;
11854 guint32 oct_1
=0, oct_2
=0;
11856 proto_item
*dtap_item
= NULL
;
11857 proto_tree
*dtap_tree
= NULL
;
11858 proto_item
*oct_1_item
= NULL
;
11859 proto_tree
*oct_1_tree
= NULL
;
11860 const gchar
*msg_str
;
11863 len
= tvb_length(tvb
);
11865 if ((len
< 3) && !from_sip
)
11868 * too short to be DTAP
11870 call_dissector(data_handle
, tvb
, pinfo
, tree
);
11874 col_append_str(pinfo
->cinfo
, COL_INFO
, "(DTAP) ");
11877 * set tap record pointer
11880 if (tap_current
== array_length(tap_rec
))
11884 tap_p
= &tap_rec
[tap_current
];
11888 saved_offset
= offset
;
11893 * get protocol discriminator
11896 oct_1
= tvb_get_guint8(tvb
, offset
++);
11897 oct_2
= tvb_get_guint8(tvb
, offset
++);
11901 * add DTAP message name
11903 oct
= tvb_get_guint8(tvb
, offset
++);
11905 msg_str
= my_try_val_to_str_idx((guint32
) oct
, ansi_a_dtap_strings
, &dec_idx
);
11908 * create the a protocol tree
11910 if (msg_str
== NULL
)
11913 proto_tree_add_protocol_format(tree
, proto_a_dtap
, tvb
, 0, len
,
11914 "ANSI A-I/F DTAP - Unknown DTAP Message Type (%u)",
11917 dtap_tree
= proto_item_add_subtree(dtap_item
, ett_dtap
);
11922 proto_tree_add_protocol_format(tree
, proto_a_dtap
, tvb
, 0, -1,
11923 "ANSI A-I/F DTAP - %s",
11926 dtap_tree
= proto_item_add_subtree(dtap_item
, ett_dtap_msg
[dec_idx
]);
11928 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", msg_str
);
11935 switch (oct_1
& 0x0f)
11937 case 3: str
= "Call Control, call related SS"; break;
11938 case 5: str
= "Mobility Management"; break;
11939 case 6: str
= "Radio Resource Management"; break;
11940 case 9: str
= "Facility Management"; break;
11941 case 11: str
= "Other Signaling Procedures"; break;
11942 case 15: str
= "Reserved for tests"; break;
11949 proto_tree_add_text(dtap_tree
,
11951 "Protocol Discriminator: %s",
11954 oct_1_tree
= proto_item_add_subtree(oct_1_item
, ett_dtap_oct_1
);
11956 other_decode_bitfield_value(a_bigbuf
, oct_1
, 0xf0, 8);
11957 proto_tree_add_text(oct_1_tree
,
11962 other_decode_bitfield_value(a_bigbuf
, oct_1
, 0x0f, 8);
11963 proto_tree_add_text(oct_1_tree
,
11965 "%s : Protocol Discriminator: %u",
11972 switch (global_a_variant
)
11974 case A_VARIANT_IS634
:
11975 other_decode_bitfield_value(a_bigbuf
, oct_2
, 0x80, 8);
11976 proto_tree_add_text(dtap_tree
,
11978 "%s : Transaction Identifier (TI) Flag: %s",
11980 ((oct_2
& 0x80) ? "allocated by receiver" : "allocated by sender"));
11982 other_decode_bitfield_value(a_bigbuf
, oct_2
, 0x70, 8);
11983 proto_tree_add_text(dtap_tree
,
11985 "%s : Transaction Identifier (TI): %u",
11987 (oct_2
& 0x70) >> 4);
11989 other_decode_bitfield_value(a_bigbuf
, oct_2
, 0x0f, 8);
11990 proto_tree_add_text(dtap_tree
,
11997 proto_tree_add_text(dtap_tree
,
12005 * add DTAP message name
12007 proto_tree_add_uint_format(dtap_tree
, hf_ansi_a_dtap_msgtype
,
12008 tvb
, saved_offset
, 1, oct
,
12011 tap_p
->pdu_type
= BSSAP_PDU_TYPE_DTAP
;
12012 tap_p
->message_type
= oct
;
12014 tap_queue_packet(ansi_a_tap
, pinfo
, tap_p
);
12016 if (msg_str
== NULL
) return;
12018 if ((len
- offset
) <= 0) return;
12020 a_meid_configured
= FALSE
;
12025 if (dtap_msg_fcn
[dec_idx
] == NULL
)
12027 proto_tree_add_text(dtap_tree
,
12028 tvb
, offset
, len
- offset
,
12029 "Message Elements");
12033 (*dtap_msg_fcn
[dec_idx
])(tvb
, pinfo
, dtap_tree
, offset
, len
- offset
, from_sip
);
12038 dissect_dtap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
12040 dissect_dtap_common(tvb
, pinfo
, tree
, FALSE
);
12044 dissect_sip_dtap_bsmap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
12046 gint linelen
, offset
, next_offset
, begin
;
12048 tvbuff_t
*ansi_a_tvb
;
12049 gboolean is_dtap
= TRUE
;
12052 if ((linelen
= tvb_find_line_end(tvb
, offset
, -1, &next_offset
, TRUE
)) > 0) {
12053 if (linelen
>= 2) {
12054 ansi_a_tvb
= tvb_new_composite();
12055 msg_type
= (guint8
*)wmem_alloc(pinfo
->pool
, 1);
12056 msg_type
[0] = (guint8
)strtoul(tvb_get_string(wmem_packet_scope(), tvb
, offset
, 2), NULL
, 16);
12057 if ((begin
= tvb_find_guint8(tvb
, offset
, linelen
, '"')) > 0) {
12058 if (tvb_get_guint8(tvb
, begin
+ 1) == '1') {
12062 if (my_try_val_to_str_idx((guint32
) msg_type
[0], ansi_a_dtap_strings
, &linelen
) == NULL
) {
12066 tvb_composite_append(ansi_a_tvb
, tvb_new_child_real_data(tvb
, msg_type
, 1, 1));
12067 offset
= next_offset
;
12068 while ((linelen
= tvb_find_line_end(tvb
, offset
, -1, &next_offset
, TRUE
)) > 0) {
12069 if ((begin
= tvb_find_guint8(tvb
, offset
, linelen
, '=')) > 0) {
12071 tvb_composite_append(ansi_a_tvb
, base64_to_tvb(tvb
, tvb_get_string(wmem_packet_scope(), tvb
, begin
, offset
+ linelen
- begin
)));
12073 offset
= next_offset
;
12075 tvb_composite_finalize(ansi_a_tvb
);
12077 add_new_data_source(pinfo
, ansi_a_tvb
, "ANSI DTAP");
12078 dissect_dtap_common(ansi_a_tvb
, pinfo
, tree
, TRUE
);
12080 add_new_data_source(pinfo
, ansi_a_tvb
, "ANSI BSMAP");
12081 dissect_bsmap_common(ansi_a_tvb
, pinfo
, tree
, TRUE
);
12087 /* Register the protocol with Wireshark */
12089 proto_register_ansi_a(void)
12091 module_t
*ansi_a_module
;
12095 /* Setup list of header fields */
12097 static hf_register_info hf
[] =
12099 { &hf_ansi_a_bsmap_msgtype
,
12100 { "BSMAP Message Type", "ansi_a_bsmap.msgtype",
12101 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
12104 { &hf_ansi_a_dtap_msgtype
,
12105 { "DTAP Message Type", "ansi_a_bsmap.dtap_msgtype",
12106 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
12109 { &hf_ansi_a_elem_id
,
12110 { "Element ID", "ansi_a_bsmap.elem_id",
12111 FT_UINT8
, BASE_DEC
, NULL
, 0,
12114 { &hf_ansi_a_length
,
12115 { "Length", "ansi_a_bsmap.len",
12116 FT_UINT8
, BASE_DEC
, NULL
, 0,
12121 { "Sub tree", "ansi_a_bsmap.none",
12122 FT_NONE
, BASE_NONE
, 0, 0,
12127 { "ESN", "ansi_a_bsmap.esn",
12128 FT_UINT32
, BASE_HEX
, 0, 0x0,
12132 { "IMSI", "ansi_a_bsmap.imsi",
12133 FT_STRING
, BASE_NONE
, 0, 0,
12137 { "MIN", "ansi_a_bsmap.min",
12138 FT_STRING
, BASE_NONE
, 0, 0,
12142 { "MEID", "ansi_a_bsmap.meid",
12143 FT_STRING
, BASE_NONE
, 0, 0,
12146 { &hf_ansi_a_cld_party_bcd_num
,
12147 { "Called Party BCD Number", "ansi_a_bsmap.cld_party_bcd_num",
12148 FT_STRING
, BASE_NONE
, 0, 0,
12151 #ifdef MAYBE_USED_FOR_OLDER_CODECS
12152 { &hf_ansi_a_clg_party_bcd_num
,
12153 { "Calling Party BCD Number", "ansi_a_bsmap.clg_party_bcd_num",
12154 FT_STRING
, BASE_NONE
, 0, 0,
12158 { &hf_ansi_a_cld_party_ascii_num
,
12159 { "Called Party ASCII Number", "ansi_a_bsmap.cld_party_ascii_num",
12160 FT_STRING
, BASE_NONE
, 0, 0,
12163 { &hf_ansi_a_clg_party_ascii_num
,
12164 { "Calling Party ASCII Number", "ansi_a_bsmap.clg_party_ascii_num",
12165 FT_STRING
, BASE_NONE
, 0, 0,
12168 { &hf_ansi_a_cell_ci
,
12169 { "Cell CI", "ansi_a_bsmap.cell_ci",
12170 FT_UINT16
, BASE_HEX
, 0, 0x0,
12173 { &hf_ansi_a_cell_lac
,
12174 { "Cell LAC", "ansi_a_bsmap.cell_lac",
12175 FT_UINT16
, BASE_HEX
, 0, 0x0,
12178 { &hf_ansi_a_cell_mscid
,
12179 { "Cell MSCID", "ansi_a_bsmap.cell_mscid",
12180 FT_UINT24
, BASE_HEX
, 0, 0x0,
12183 { &hf_ansi_a_pdsn_ip_addr
,
12184 { "PDSN IP Address", "ansi_a_bsmap.pdsn_ip_addr",
12185 FT_IPv4
, BASE_NONE
, NULL
, 0,
12186 "IP Address", HFILL
}
12188 { &hf_ansi_a_s_pdsn_ip_addr
,
12189 { "Source PDSN Address", "ansi_a_bsmap.s_pdsn_ip_addr",
12190 FT_IPv4
, BASE_NONE
, NULL
, 0,
12191 "IP Address", HFILL
}
12193 { &hf_ansi_a_anchor_ip_addr
,
12194 { "Anchor PDSN Address", "ansi_a_bsmap.anchor_pdsn_ip_addr",
12195 FT_IPv4
, BASE_NONE
, NULL
, 0,
12196 "IP Address", HFILL
}
12198 { &hf_ansi_a_anchor_pp_ip_addr
,
12199 { "Anchor P-P Address", "ansi_a_bsmap.anchor_pp_ip_addr",
12200 FT_IPv4
, BASE_NONE
, NULL
, 0,
12201 "IP Address", HFILL
}
12203 { &hf_ansi_a_a2p_bearer_ipv4_addr
,
12204 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv4_addr",
12205 FT_IPv4
, BASE_NONE
, NULL
, 0,
12208 { &hf_ansi_a_a2p_bearer_ipv6_addr
,
12209 { "A2p Bearer IP Address", "ansi_a_bsmap.a2p_bearer_ipv6_addr",
12210 FT_IPv6
, BASE_NONE
, NULL
, 0,
12213 { &hf_ansi_a_a2p_bearer_udp_port
,
12214 { "A2p Bearer UDP Port", "ansi_a_bsmap.a2p_bearer_udp_port",
12215 FT_UINT16
, BASE_DEC
, NULL
, 0,
12219 { "Service Option", "ansi_a_bsmap.so",
12220 FT_UINT16
, BASE_DEC
, NULL
, 0,
12223 { &hf_ansi_a_cause_1
,
12224 { "Cause", "ansi_a_bsmap.cause_1",
12225 FT_UINT8
, BASE_DEC
, NULL
, 0,
12228 { &hf_ansi_a_cause_2
,
12229 { "Cause", "ansi_a_bsmap.cause_2",
12230 FT_UINT16
, BASE_DEC
, NULL
, 0,
12233 { &hf_ansi_a_meid_configured
,
12234 { "Is MEID configured", "ansi_a_bsmap.meid_configured",
12235 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
12238 { &hf_ansi_a_ms_info_rec_signal_type
,
12239 { "Signal Type", "ansi_a_bsmap.ms_info_rec.signal.type",
12240 FT_UINT8
, BASE_HEX
, VALS(ansi_a_ms_info_rec_signal_type_vals
), 0xc0,
12243 { &hf_ansi_a_ms_info_rec_signal_alert_pitch
,
12244 { "Alert Type", "ansi_a_bsmap.ms_info_rec.signal.alert_pitch",
12245 FT_UINT8
, BASE_HEX
, VALS(ansi_a_ms_info_rec_signal_alert_pitch_vals
), 0x30,
12248 { &hf_ansi_a_ms_info_rec_signal_tone
,
12249 { "Signal", "ansi_a_bsmap.ms_info_rec.signal.tone",
12250 FT_UINT16
, BASE_HEX
, VALS(ansi_a_ms_info_rec_signal_tone_vals
), 0x0fc0,
12253 { &hf_ansi_a_ms_info_rec_signal_isdn_alert
,
12254 { "Signal", "ansi_a_bsmap.ms_info_rec.signal.isdn_alert",
12255 FT_UINT16
, BASE_HEX
, VALS(ansi_a_ms_info_rec_signal_isdn_alert_vals
), 0x0fc0,
12258 { &hf_ansi_a_ms_info_rec_signal_is54b_alert
,
12259 { "Signal", "ansi_a_bsmap.ms_info_rec.signal.is54b_alert",
12260 FT_UINT16
, BASE_HEX
, VALS(ansi_a_ms_info_rec_signal_is54b_alert_vals
), 0x0fc0,
12263 { &hf_ansi_a_ms_info_rec_call_waiting_ind
,
12264 { "Call Waiting Indicator", "ansi_a_bsmap.ms_info_rec.call_waiting_ind",
12265 FT_BOOLEAN
, 8, TFS(&tfs_yes_no
), 0x80,
12270 static ei_register_info ei
[] = {
12271 { &ei_ansi_a_extraneous_data
, { "ansi_a.extraneous_data", PI_PROTOCOL
, PI_NOTE
, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL
}},
12274 expert_module_t
* expert_a_bsmap
;
12276 static const enum_val_t a_variant_options
[] = {
12277 { "is-634-rev0", "IS-634 rev. 0", A_VARIANT_IS634
},
12278 { "tsb-80", "TSB-80", A_VARIANT_TSB80
},
12279 { "is-634-a", "IS-634-A", A_VARIANT_IS634A
},
12280 { "ios-2.x", "IOS 2.x", A_VARIANT_IOS2
},
12281 { "ios-3.x", "IOS 3.x", A_VARIANT_IOS3
},
12282 { "ios-4.0.1", "IOS 4.0.1", A_VARIANT_IOS401
},
12283 { "ios-5.0.1", "IOS 5.0.1", A_VARIANT_IOS501
},
12288 /* Setup protocol subtree array */
12289 #define MAX_NUM_DTAP_MSG MAX(ANSI_A_IOS401_DTAP_NUM_MSG, ANSI_A_IOS501_DTAP_NUM_MSG)
12290 #define MAX_NUM_BSMAP_MSG MAX(ANSI_A_IOS401_BSMAP_NUM_MSG, ANSI_A_IOS501_BSMAP_NUM_MSG)
12291 #define MAX_NUM_ELEM_1 MAX(MAX_IOS401_NUM_ELEM_1, MAX_IOS501_NUM_ELEM_1)
12292 #define NUM_INDIVIDUAL_ELEMS 18
12294 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
*);
12297 * XXX - at least one version of the HP C compiler apparently doesn't
12298 * recognize constant expressions using the "?" operator as being
12299 * constant expressions, so you can't use the expression that
12300 * initializes "ett_let" as an array size. Therefore, we dynamically
12301 * allocate the array instead.
12303 ett
= (gint
**) g_malloc(ett_len
);
12305 memset((void *) ett_dtap_msg
, -1, sizeof(ett_dtap_msg
));
12306 memset((void *) ett_bsmap_msg
, -1, sizeof(ett_bsmap_msg
));
12307 memset((void *) ett_ansi_elem_1
, -1, sizeof(ett_ansi_elem_1
));
12308 memset((void *) ett_ansi_fwd_ms_info_rec
, -1, sizeof(gint
) * NUM_FWD_MS_INFO_REC
);
12309 memset((void *) ett_ansi_rev_ms_info_rec
, -1, sizeof(gint
) * NUM_REV_MS_INFO_REC
);
12311 ett
[0] = &ett_bsmap
;
12312 ett
[1] = &ett_dtap
;
12313 ett
[2] = &ett_elems
;
12314 ett
[3] = &ett_elem
;
12315 ett
[4] = &ett_dtap_oct_1
;
12316 ett
[5] = &ett_cm_srvc_type
;
12317 ett
[6] = &ett_ansi_ms_info_rec_reserved
;
12318 ett
[7] = &ett_ansi_enc_info
;
12319 ett
[8] = &ett_cell_list
;
12320 ett
[9] = &ett_bearer_list
;
12321 ett
[10] = &ett_re_list
;
12322 ett
[11] = &ett_so_list
;
12323 ett
[12] = &ett_scm
;
12324 ett
[13] = &ett_adds_user_part
;
12325 ett
[14] = &ett_scr
;
12326 ett
[15] = &ett_srvc_con_rec
;
12327 ett
[16] = &ett_cm2_band_class
;
12328 ett
[17] = &ett_vp_algs
;
12330 last_offset
= NUM_INDIVIDUAL_ELEMS
;
12332 for (i
=0; i
< MAX_NUM_DTAP_MSG
; i
++, last_offset
++)
12334 ett
[last_offset
] = &ett_dtap_msg
[i
];
12337 for (i
=0; i
< MAX_NUM_BSMAP_MSG
; i
++, last_offset
++)
12339 ett
[last_offset
] = &ett_bsmap_msg
[i
];
12342 for (i
=0; i
< MAX_NUM_ELEM_1
; i
++, last_offset
++)
12344 ett
[last_offset
] = &ett_ansi_elem_1
[i
];
12347 for (i
=0; i
< NUM_FWD_MS_INFO_REC
; i
++, last_offset
++)
12349 ett
[last_offset
] = &ett_ansi_fwd_ms_info_rec
[i
];
12352 for (i
=0; i
< NUM_REV_MS_INFO_REC
; i
++, last_offset
++)
12354 ett
[last_offset
] = &ett_ansi_rev_ms_info_rec
[i
];
12357 /* Register the protocol name and description */
12360 proto_register_protocol("ANSI A-I/F BSMAP", "ANSI BSMAP", "ansi_a_bsmap");
12362 proto_register_field_array(proto_a_bsmap
, hf
, array_length(hf
));
12363 expert_a_bsmap
= expert_register_protocol(proto_a_bsmap
);
12364 expert_register_field_array(expert_a_bsmap
, ei
, array_length(ei
));
12367 proto_register_protocol("ANSI A-I/F DTAP", "ANSI DTAP", "ansi_a_dtap");
12369 is637_dissector_table
=
12370 register_dissector_table("ansi_a.sms", "IS-637-A (SMS)",
12371 FT_UINT8
, BASE_DEC
);
12373 is683_dissector_table
=
12374 register_dissector_table("ansi_a.ota", "IS-683-A (OTA)",
12375 FT_UINT8
, BASE_DEC
);
12377 is801_dissector_table
=
12378 register_dissector_table("ansi_a.pld", "IS-801 (PLD)",
12379 FT_UINT8
, BASE_DEC
);
12381 proto_register_subtree_array(ett
, ett_len
/ (int)sizeof(gint
*));
12383 ansi_a_tap
= register_tap("ansi_a");
12386 * setup for preferences
12388 ansi_a_module
= prefs_register_protocol(proto_a_bsmap
, proto_reg_handoff_ansi_a
);
12390 prefs_register_enum_preference(ansi_a_module
,
12393 "(if other than the default of IOS 4.0.1)",
12403 proto_reg_handoff_ansi_a(void)
12405 static gboolean ansi_a_prefs_initialized
= FALSE
;
12407 if (!ansi_a_prefs_initialized
)
12409 dissector_handle_t bsmap_handle
, sip_dtap_bsmap_handle
;
12410 bsmap_handle
= create_dissector_handle(dissect_bsmap
, proto_a_bsmap
);
12411 dtap_handle
= create_dissector_handle(dissect_dtap
, proto_a_dtap
);
12412 sip_dtap_bsmap_handle
= create_dissector_handle(dissect_sip_dtap_bsmap
, proto_a_dtap
);
12413 data_handle
= find_dissector("data");
12415 dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP
, bsmap_handle
);
12416 dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP
, dtap_handle
);
12417 dissector_add_string("media_type", "application/femtointerfacemsg", sip_dtap_bsmap_handle
);
12418 dissector_add_string("media_type", "application/vnd.3gpp2.femtointerfacemsg", sip_dtap_bsmap_handle
);
12420 ansi_a_prefs_initialized
= TRUE
;
12423 switch (global_a_variant
)
12425 case A_VARIANT_IOS501
:
12426 ansi_a_bsmap_strings
= ansi_a_ios501_bsmap_strings
;
12427 ansi_a_dtap_strings
= ansi_a_ios501_dtap_strings
;
12428 ansi_a_elem_1_strings
= ansi_a_ios501_elem_1_strings
;
12429 ansi_a_elem_1_max
= (elem_idx_t
)MAX_IOS501_NUM_ELEM_1
;
12433 ansi_a_bsmap_strings
= ansi_a_ios401_bsmap_strings
;
12434 ansi_a_dtap_strings
= ansi_a_ios401_dtap_strings
;
12435 ansi_a_elem_1_strings
= ansi_a_ios401_elem_1_strings
;
12436 ansi_a_elem_1_max
= (elem_idx_t
)MAX_IOS401_NUM_ELEM_1
;