3 * Routines for A21/s102 Message dissection
4 * Copyright 2012, Joseph Chai <chaienzhao@gmail.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
12 * Ref: 3GPP2 A.S0008-C v4.0
17 #include <epan/packet.h>
18 #include <epan/expert.h>
21 #include "packet-e212.h"
22 #include "packet-a21.h"
24 void proto_register_a21(void);
25 void proto_reg_handoff_a21(void);
27 #define A21_PORT 23272
28 static dissector_handle_t a21_handle
;
29 static dissector_handle_t gcsna_handle
;
33 static int hf_a21_message_type
;
34 static int hf_a21_element_identifier
;
35 static int hf_a21_element_length
;
36 static int hf_a21_corr_id_corr_value
;
37 static int hf_a21_mn_id_msid_value
;
38 static int hf_a21_mn_id_odd_even_indicator
;
39 static int hf_a21_mn_id_type_of_identity
;
40 static int hf_a21_mn_id_esn
;
41 static int hf_a21_mn_id_identity_digit_1
;
42 static int hf_a21_gcsna_pdu_length
;
43 static int hf_a21_gcsna_content
;
44 static int hf_a21_reference_cell_id_cell
;
45 static int hf_a21_reference_cell_id_sector
;
46 static int hf_a21_mob_sub_info_record_id
;
47 static int hf_a21_mob_sub_info_record_length
;
48 static int hf_a21_mob_sub_info_record_content
;
49 static int hf_a21_mob_sub_info_re_con_all_band_inc
;
50 static int hf_a21_mob_sub_info_re_con_curr_band_sub
;
51 static int hf_a21_mob_sub_info_re_band_class
;
52 static int hf_a21_mob_sub_info_re_con_all_sub_band_inc
;
53 static int hf_a21_mob_sub_info_re_sub_cls_len
;
55 static int hf_a21_mob_sub_info_re_con_band_class;
57 static int hf_a21_auth_chall_para_rand_num_type
;
58 static int hf_a21_auth_chall_para_rand_value
;
59 static int hf_a21_service_option
;
60 static int hf_a21_gcsna_status_reserved
;
61 static int hf_a21_gcsna_status_priority_incl
;
62 static int hf_a21_gcsna_status_gec
;
63 static int hf_a21_gcsna_status_status_incl
;
64 static int hf_a21_gcsna_status
;
65 static int hf_a21_gcsna_status_call_priority
;
66 static int hf_a21_3G1X_parameters
;
67 static int hf_a21_reserved
;
68 static int hf_a21_msg_tran_ctrl_paging_msg
;
69 static int hf_a21_msg_tran_ctrl_simul_xmit_with_next
;
70 static int hf_a21_msg_tran_ctrl_ackrequired
;
71 static int hf_a21_msg_tran_ctrl_3GXLogicalChannel
;
72 static int hf_a21_msg_tran_ctrl_protocol_revision
;
73 static int hf_a21_1x_lac_en_pdu
;
74 static int hf_a21_pilot_list_num_of_pilots
;
75 static int hf_a21_cause_value
;
76 static int hf_a21_mscid_market_id
;
77 static int hf_a21_mscid_switch_number
;
78 static int hf_a21_event
;
79 static int hf_a21_additional_event_info
;
80 static int hf_a21_allowed_forward_link_message
;
81 static int hf_a21_channel_record_length
;
82 static int hf_a21_ch_rec_sys_type
;
83 static int hf_a21_ch_rec_band_class
;
84 static int hf_a21_ch_rec_ch_num
;
86 static int hf_a21_cell_id_info
;
87 static int hf_a21_msc_id
;
88 static int hf_a21_cell_id
;
89 static int hf_a21_sector
;
90 static int hf_a21_hrpd_sector_id_len
;
91 static int hf_a21_ch_hrpd_sector_id
;
92 static int hf_a21_ch_reference_pilot
;
93 static int hf_a21_ch_pilot_pn
;
94 static int hf_a21_ch_pilot_pn_phase
;
95 static int hf_a21_ch_pilot_strength
;
96 static int hf_a21_ch_pilot_ow_delay_flag
;
97 static int hf_a21_ch_pilot_ow_delay
;
98 static int hf_a21_sc0
;
99 static int hf_a21_sc1
;
100 static int hf_a21_sc2
;
101 static int hf_a21_sc3
;
102 static int hf_a21_sc4
;
103 static int hf_a21_sc5
;
104 static int hf_a21_sc6
;
105 static int hf_a21_sc7
;
108 static int ett_a21_ie
;
109 static int ett_a21_corr_id
;
110 static int ett_a21_record_content
;
111 static int ett_a21_pilot_list
;
112 static int ett_a21_cr
;
113 static int ett_a21_band_class
;
115 static expert_field ei_a21_ie_data_not_dissected_yet
;
117 static const value_string a21_message_type_vals
[] = {
118 {0x01, "A21-1x Air Interface Signalling"}, /* 01H */
119 {0x02, "A21-Ack"}, /* 02H */
120 {0x03, "A21-1x Parameters"}, /* 03H */
121 {0x04, "A21-Event Notification"}, /* 04H */
122 {0x05, "A21-1x Parameters Request"}, /* 05H */
123 {0x06, "A21-Service Request"}, /* 06H */
124 {0x07, "A21-Service Response"}, /* 07H */
125 {0x08, "A21-Radio Update Request"}, /* 08H */
126 {0x09, "A21-Radio Update Response"}, /* 09H */
130 #define A21_IEI_1X_LAC_ENCAPSULATED_PDU 0x01 /* 01H */
131 #define A21_IEI_A21_1X_PARAMETERS 0x02 /* 02H */
132 #define A21_IEI_PILOT_LIST 0x03 /* 03H */
133 #define A21_IEI_CORRELATION_ID 0x04 /* 04H */
134 #define A21_IEI_MOBILE_IDENTITY 0x05 /* 05H */
135 #define A21_IEI_AUTHENTICATION_CHALLENGE_PARAMETER 0x06 /* 06H */
136 #define A21_IEI_A21_1X_MESSAGE_TRANSMISSION_CONTROL 0x07 /* 07H */
137 #define A21_IEI_A21_CAUSE 0x08 /* 08H */
138 #define A21_IEI_A21_EVENT 0x09 /* 09H */
139 #define A21_IEI_SERVICE_OPTION 0x0A /* 0AH */
140 #define A21_IEI_A21_MOBILE_SUBSCRIPTION_INFORMATION 0x0B /* 0BH */
141 #define A21_IEI_GCSNA_STATUS 0x0C /* 0CH */
142 #define A21_IEI_GCSNA_PDU 0xC0 /* C0H */
143 #define A21_IEI_REFERENCE_CELL_ID 0x0D /* 0DH */
144 /*(Reserved range of IEIs for S102) 30H-3FH */
149 dissect_a21_correlation_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
153 proto_tree
*corr_tree
;
156 corr_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, 6, ett_a21_corr_id
, &tc
, "A21 Correlation ID");
158 proto_tree_add_item(corr_tree
, hf_a21_element_identifier
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
160 proto_tree_add_item(corr_tree
, hf_a21_element_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
163 proto_tree_add_item_ret_uint(corr_tree
, hf_a21_corr_id_corr_value
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &corr_id
);
164 proto_item_append_text(tc
, " %u", corr_id
);
169 static const value_string a21_mn_id_type_of_identity_vals
[] = {
170 { 0, "No Identity Code" },
177 /* 5.2.4.8 Mobile Identity (MN ID) */
179 dissect_a21_mobile_identity(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, proto_item
*item
, uint16_t length
, uint8_t message_type _U_
)
182 unsigned identity_type
;
183 const char *imsi_str
;
188 identity_type
= tvb_get_uint8(tvb
, offset
) & 0x07;
189 proto_tree_add_item(tree
, hf_a21_mn_id_type_of_identity
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
191 switch (identity_type
) {
193 /* No Identity Code */
194 proto_tree_add_item(tree
, hf_a21_mn_id_msid_value
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
199 proto_tree_add_item(tree
, hf_a21_mn_id_odd_even_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
204 proto_tree_add_item(tree
, hf_a21_mn_id_odd_even_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
205 proto_tree_add_item(tree
, hf_a21_mn_id_identity_digit_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
207 proto_tree_add_item(tree
, hf_a21_mn_id_esn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
212 proto_tree_add_item(tree
, hf_a21_mn_id_odd_even_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
214 imsi_str
= dissect_e212_imsi(tvb
, pinfo
, tree
, offset
, length
, true);
215 proto_item_append_text(item
, "%s", imsi_str
);
224 dissect_a21_1x_message_transmission_control(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
229 proto_tree_add_item(tree
, hf_a21_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
230 proto_tree_add_item(tree
, hf_a21_msg_tran_ctrl_paging_msg
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
231 proto_tree_add_item(tree
, hf_a21_msg_tran_ctrl_simul_xmit_with_next
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
232 proto_tree_add_item(tree
, hf_a21_msg_tran_ctrl_ackrequired
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
233 proto_tree_add_item(tree
, hf_a21_msg_tran_ctrl_3GXLogicalChannel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
235 proto_tree_add_item(tree
, hf_a21_msg_tran_ctrl_protocol_revision
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
240 dissect_a21_1x_lac_encapsulated_pdu(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
243 proto_tree_add_item(tree
, hf_a21_1x_lac_en_pdu
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
248 /* 5.2.4.5 A21 1x Parameters */
250 dissect_a21_1x_parameters(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length
, uint8_t message_type _U_
)
252 proto_tree_add_item(tree
, hf_a21_3G1X_parameters
, tvb
, 0,length
, ENC_NA
);
256 * 6.4.1.12 Pilot List
257 * This IE contains the 1xRTT Pilot List passed to the MME from the eNodeB.
258 * It is included by the MME whenever the MME receives the 1xRTT Pilot List from the eNodeB.
259 * Details of format and contents of this IE are specified in 3GPP2 A.S0008-D and 3GPP2 A.S0009-D .
262 /* a21/S102 Channel Record Cell ID Info */
263 static const value_string a21_ch_cellid_info_values
[] = {
264 { 0x00, "Cell Identifier field is not included - pilot: actual 1x pilot" },
265 { 0x01, "1x Cell Identifier field is included - pilot: actual 1x pilot" },
266 { 0x02, "1x Cell Identifier field is included - pilot: estimated 1x pilot" },
267 { 0x03, "1x Cell Identifier field is included - pilot: actual HRPD pilot" },
268 { 0x04, "HRPD Sector Identifier field is included - pilot: actual HRPD pilot" },
269 { 0x05, "Only an HRPD Sector Identifier field is included" },
270 { 0x06, "Only an actual HRPD pilot is included" },
271 { 0x07, "Only a 1x Cell Identifier is included" },
275 /* Pilot One Way Delay flag */
276 /* A.S0008-C p. 428 */
277 static const value_string a21_ch_pilot_ow_delay_values
[] = {
278 {0x00, "Not Included"},
283 /* Pilot List System Type */
284 /* C.S0024-B p. 1493 */
285 static const value_string s102_ch_pilot_system_type_values
[] = {
286 {0x00, "ChannelNumber field specifies forward CDMA channel and Reverse CDMA channel that are FDD- paired."},
287 {0x01, "System compliant to 3GPP2 C.S0002 Physical Layer Standard for cdma2000 Spread Spectrum Systems"},
288 {0x02, "ChannelNumber field specifies only the forward CDMA channel."},
292 /* S102 Current Band Class */
293 static const value_string a21_band_class_values
[] = {
295 { 0x01, "1900 MHz" },
298 { 0x04, "Korean PCS" },
301 { 0x07, "Upper 700 MHz" },
302 { 0x08, "1800 MHz" },
304 { 0x0a, "Secondary 800" },
305 { 0x0b, "400 MHz European PAMR" },
306 { 0x0c, "800 MHz PAMR" },
307 { 0x0d, "2.5 GHz IMT-2000 Extension" },
308 { 0x0e, "US PCS 1.9GHz" },
310 { 0x10, "US 2.5GHz" },
311 { 0x11, "US 2.5GHz Forward Link Only" },
312 { 0x12, "700 MHz Public Safety" },
313 { 0x13, "Lower 700 MHz" },
319 static value_string_ext a21_band_class_values_ext
= VALUE_STRING_EXT_INIT(a21_band_class_values
);
323 dissect_a21_pilot_list(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
325 proto_tree
*sub_tree
, *cr_tree
;
327 int offset
= 0,start_offset
;
328 uint32_t num
, ch_rec_len
, i
, cell_id_info
, hrpd_len
, reference_pilot
, pilot_ow_delay_flag
;
330 proto_tree_add_item_ret_uint(tree
, hf_a21_pilot_list_num_of_pilots
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &num
);
332 for (i
= 0; i
< num
; i
++){
333 start_offset
= offset
;
334 sub_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, -1, ett_a21_pilot_list
, &ti
, "Pilot %u", i
+1);
335 proto_tree_add_item_ret_uint(sub_tree
, hf_a21_channel_record_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &ch_rec_len
);
338 * This field contains a channel record as defined in 3GPP2: C.S0024-B v1.0. The
339 * information contained in a channel record include the system
340 * type, band class, and channel number
342 cr_tree
= proto_tree_add_subtree(sub_tree
, tvb
, offset
, ch_rec_len
, ett_a21_cr
, &ti
, "Channel Record");
344 /* SystemType len = 8 bit */
345 proto_tree_add_item(cr_tree
, hf_a21_ch_rec_sys_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
347 /* BandClass len = 5 bit */
348 proto_tree_add_item(cr_tree
, hf_a21_ch_rec_band_class
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
350 /* ChannelNumber len = 11 bit */
351 proto_tree_add_item(cr_tree
, hf_a21_ch_rec_ch_num
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
354 offset
+= ch_rec_len
;
356 proto_tree_add_item_ret_uint(sub_tree
, hf_a21_cell_id_info
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &cell_id_info
);
358 switch (cell_id_info
)
364 /* Next Info: MSCID - 1x Cell - Sector*/
365 proto_tree_add_item(sub_tree
, hf_a21_msc_id
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
368 proto_tree_add_item(sub_tree
, hf_a21_cell_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
371 proto_tree_add_item(sub_tree
, hf_a21_sector
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
377 /* Next Info: HRPD Sector Identifier */
378 proto_tree_add_item_ret_uint(sub_tree
, hf_a21_hrpd_sector_id_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &hrpd_len
);
380 proto_tree_add_item(sub_tree
, hf_a21_ch_hrpd_sector_id
, tvb
, offset
, hrpd_len
, ENC_NA
);
387 /* reference pilot flag */
388 proto_tree_add_item_ret_uint(sub_tree
, hf_a21_ch_reference_pilot
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &reference_pilot
);
392 /* Reference Pilot PN */
393 proto_tree_add_item(sub_tree
, hf_a21_ch_pilot_pn
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
397 /* Reference Pilot PN Phase*/
398 proto_tree_add_item(sub_tree
, hf_a21_ch_pilot_pn_phase
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
402 /* Pilot one way delay flag */
403 proto_tree_add_item_ret_uint(sub_tree
, hf_a21_ch_pilot_ow_delay_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &pilot_ow_delay_flag
);
406 proto_tree_add_item(sub_tree
, hf_a21_ch_pilot_strength
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
409 /* Pilot one way delay */
410 if (pilot_ow_delay_flag
)
412 proto_tree_add_item(sub_tree
, hf_a21_ch_pilot_ow_delay
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
416 proto_item_set_len(ti
, offset
- start_offset
);
421 static const range_string a21_random_number_type_rvals
[] = {
422 {0x00, 0x00, "Reserved"},
423 {0x01, 0x01, "RAND"},
424 {0x02, 0x0F, "Reserved"},
429 dissect_a21_authentication_challenge_parameter(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
436 type
= tvb_get_uint8(tvb
, offset
) & 0x0f;
437 proto_tree_add_item(tree
, hf_a21_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
438 proto_tree_add_item(tree
, hf_a21_auth_chall_para_rand_num_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
443 proto_tree_add_item(tree
, hf_a21_auth_chall_para_rand_value
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
450 /* A.S0008-C_v1.0_070801 5.2.4.14 A21 Mobile Subscription Information */
452 static const value_string a21_record_identifier_vals
[] = {
453 {0x00, "Band Class/Band Subclass Record"},
454 /* All other values are reserved */
460 dissect_a21_mobile_subscription_information(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length
, uint8_t message_type _U_
)
462 int offset
= 0, start_offset
, rec_end_offset
;
464 uint8_t record_id
, band_class
;
465 uint16_t record_len
= 0;
466 proto_tree
*record_tree
, *band_tree
;
468 uint32_t rec_len
, sub_cls_len
;
470 static int * const flags
[] = {
484 while (offset
<length
) {
485 record_id
= tvb_get_uint8(tvb
, offset
);
486 record_len
= tvb_get_uint8(tvb
, offset
+1);
488 record_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
+2, record_len
,
489 ett_a21_record_content
, NULL
, "Record %u",i
+1);
491 proto_tree_add_item(record_tree
, hf_a21_mob_sub_info_record_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
494 proto_tree_add_item_ret_uint(record_tree
, hf_a21_mob_sub_info_record_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &rec_len
);
496 rec_end_offset
= offset
+ rec_len
;
498 if (record_id
== 0) {
499 /* All Band Classes Included*/
500 proto_tree_add_item(record_tree
, hf_a21_mob_sub_info_re_con_all_band_inc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
501 /* Current Band Subclass */
502 proto_tree_add_item(record_tree
, hf_a21_mob_sub_info_re_con_curr_band_sub
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
504 while (offset
< rec_end_offset
) {
506 start_offset
= offset
;
507 band_class
= tvb_get_uint8(tvb
, offset
);
508 band_tree
= proto_tree_add_subtree_format(record_tree
, tvb
, offset
, -1,
509 ett_a21_band_class
, &ti
, "Band Class %u - %s(%u)",
511 val_to_str_const(band_class
, a21_band_class_values
, "Unknown"),
516 proto_tree_add_item(band_tree
, hf_a21_mob_sub_info_re_band_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
518 /* All Band Subclasses Included | Reserved |Band Class 1 Subclass Length Octet 7 */
519 proto_tree_add_item(band_tree
, hf_a21_mob_sub_info_re_con_all_sub_band_inc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
520 proto_tree_add_item_ret_uint(band_tree
, hf_a21_mob_sub_info_re_sub_cls_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &sub_cls_len
);
522 if (sub_cls_len
> 0) {
523 proto_tree_add_bitmask_list(band_tree
, tvb
, offset
, 1, flags
, ENC_BIG_ENDIAN
);
525 offset
+= sub_cls_len
;
526 proto_item_set_len(ti
, offset
- start_offset
);
529 proto_tree_add_item(record_tree
, hf_a21_mob_sub_info_record_content
, tvb
, offset
, record_len
, ENC_NA
);
530 offset
+= record_len
;
535 static const value_string a21_gcsna_status_vals
[] = {
536 {0x01, "Handoff successful"},
537 {0x02, "Handoff failure"},
538 /* All other values are reserved */
544 dissect_a21_gcsna_status(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
547 uint8_t priority_incl
, status_incl
;
551 status_incl
= tvb_get_uint8(tvb
, offset
) & 0x01;
552 priority_incl
= tvb_get_uint8(tvb
, offset
) & 0x04;
554 proto_tree_add_item(tree
, hf_a21_gcsna_status_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
555 proto_tree_add_item(tree
, hf_a21_gcsna_status_priority_incl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
556 proto_tree_add_item(tree
, hf_a21_gcsna_status_gec
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
557 proto_tree_add_item(tree
, hf_a21_gcsna_status_status_incl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
560 if (status_incl
== 1) {
561 proto_tree_add_item(tree
, hf_a21_gcsna_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
565 if (priority_incl
== 1) {
566 proto_tree_add_item(tree
, hf_a21_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
567 proto_tree_add_item(tree
, hf_a21_gcsna_status_call_priority
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
571 /* 5.2.4.16 GCSNA PDU */
573 dissect_a21_gcsna_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*top_tree
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length
, uint8_t message_type _U_
)
577 proto_tree_add_item(tree
, hf_a21_gcsna_content
, tvb
, offset
, length
, ENC_NA
);
580 new_tvb
= tvb_new_subset_length(tvb
, offset
, length
);
581 /* call the dissector with the parent (top)tree */
582 call_dissector(gcsna_handle
, new_tvb
, pinfo
, top_tree
);
587 /* 5.2.4.17 Reference Cell ID */
589 dissect_a21_reference_cell_id(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
595 proto_tree_add_item(tree
, hf_a21_mscid_market_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
597 proto_tree_add_item(tree
, hf_a21_mscid_switch_number
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
600 proto_tree_add_item(tree
, hf_a21_reference_cell_id_cell
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
602 proto_tree_add_item(tree
, hf_a21_reference_cell_id_sector
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
607 static const value_string a21_cause_vals
[] = {
608 {0x00, "Unknown mobile"},
609 {0x01, "Unknown cell identifier(s)"},
610 {0x02, "Tunneling of 1x messages not available"},
611 {0x03, "Resources not available"},
612 {0x04, "A21 context for this MS/AT may be released"},
613 {0x05, "Airlink lost"},
614 {0x06, "Abort Handoff from HRPD to 1x"},
615 {0x07, "Unspecified"},
617 {0x09, "Already Paging"},
618 {0x0A, "Abort handoff from LTE to 1x"},
619 {0x0B, "Version not supported"},
620 /* All other values are reserved */
626 dissect_a21_cause(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
630 proto_tree_add_item(tree
, hf_a21_cause_value
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
634 static const value_string a21_event_vals
[] = {
635 {0x00, "MS/AT present in 1x"},
636 {0x01, "MS/AT present in HRPD/Cancel Handoff"},
637 {0x02, "1x Power Down"},
638 {0x03, "HRPD Power Down/Connection Closed"},
639 {0x04, "Handoff Rejected"},
640 {0x05, "1x Registration"},
641 {0x06, "Transmission of All 1x LAC Encapsulated PDUs Disabled"},
642 {0x07, "Transmission of 1x LAC Encapsulated PDU(s) Enabled"},
643 {0x08, "MS/AT no longer present in this AN/PCF"},
644 {0x09, "MS/AT no longer present in this 1x BS"},
645 {0x0A, "MS/AT Not Acquired"},
646 {0x0B, "Redirection"},
647 /* All other values are reserved */
651 static const value_string a21_additional_event_info_vals
[] = {
652 {0x00, "This field shall not be included"},
653 {0x01, "This field shall not be included"},
654 {0x02, "This field shall not be included"},
655 {0x03, "This field shall not be included"},
656 {0x04, "This field shall not be included"},
657 {0x05, "This field shall not be included"},
658 {0x06, "This field shall not be included"},
659 {0x07, "This field shall contain the variable length AllowedForwardLinkMessages negotiated by the HRPD AN and the AT"},
660 /* All other values, This field shall not be included */
666 dissect_a21_event(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item
, uint16_t length
, uint8_t message_type _U_
)
673 event_id
= tvb_get_uint8(tvb
, offset
);
674 proto_tree_add_item(tree
, hf_a21_event
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
675 proto_item_append_text(item
, "%s", val_to_str_const(event_id
, a21_event_vals
, "Unknown"));
679 proto_tree_add_item(tree
, hf_a21_allowed_forward_link_message
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
683 proto_tree_add_item(tree
, hf_a21_additional_event_info
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
691 static const value_string a21_service_option_vals
[] = {
692 {0x003B, "HRPD Packet Data"},
693 /*{0x59xx, "HRPD Packet Data with ReservationLabel where xx = [00-FFH] and contains the ReservationLabel"},*/
698 /* 5.2.4.13 Service Option */
700 dissect_a21_service_option(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length _U_
, uint8_t message_type _U_
)
704 proto_tree_add_item(tree
, hf_a21_service_option
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
710 dissect_a21_unknown(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, proto_item
*item _U_
, uint16_t length
, uint8_t message_type _U_
)
712 proto_tree_add_expert(tree
, pinfo
, &ei_a21_ie_data_not_dissected_yet
, tvb
, 0, length
);
715 static const value_string a21_element_type_vals
[] = {
716 {0x01, "1x LAC Encapsulated PDU"},
717 {0x02, "A21 1x Parameters"},
718 {0x03, "Pilot List"},
719 {0x04, "Correlation ID"},
720 {0x05, "Mobile Identity (MN ID)"},
721 {0x06, "Authentication Challenge Parameter (RAND)"},
722 {0x07, "A21 1x Message Transmission Control"},
725 {0x0A, "Service Option"},
726 {0x0B, "A21 Mobile Subscription Information"},
727 {0x0C, "GCSNA Status"},
728 {0x0D, "Reference Cell ID"},
735 dissect_a21_ie_common(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*top_tree
, proto_tree
*tree
, int offset
, uint8_t message_type
)
737 uint8_t ie_type
, length_len
;
743 while (offset
< (int)tvb_reported_length(tvb
)) {
744 ie_type
= tvb_get_uint8(tvb
, offset
);
745 if (ie_type
== A21_IEI_GCSNA_PDU
) {
746 /* length of GCSNA PDU is 2 octets long */
748 length
= tvb_get_ntohs(tvb
, offset
+1);
752 length
= tvb_get_uint8(tvb
, offset
+1);
755 ie_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 1 + length_len
+ length
, ett_a21_ie
, &ti
,
756 "%s : ", val_to_str_const(ie_type
, a21_element_type_vals
, "Unknown"));
758 /* Octet 1-element identifier */
759 proto_tree_add_item(ie_tree
, hf_a21_element_identifier
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
761 proto_tree_add_item(ie_tree
, hf_a21_gcsna_pdu_length
, tvb
, offset
, length_len
, ENC_BIG_ENDIAN
);
762 offset
= offset
+length_len
;
764 ie_tvb
= tvb_new_subset_remaining(tvb
, offset
);
767 case A21_IEI_1X_LAC_ENCAPSULATED_PDU
:
768 /* 5.2.4.4 1x LAC Encapsulated PDU */
769 dissect_a21_1x_lac_encapsulated_pdu(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
771 case A21_IEI_A21_1X_PARAMETERS
:
772 /* 5.2.4.5 A21 1x Parameters */
773 dissect_a21_1x_parameters(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
775 case A21_IEI_PILOT_LIST
:
776 /* 5.2.4.6 Pilot List */
777 dissect_a21_pilot_list(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
779 case A21_IEI_CORRELATION_ID
:
780 /* 5.2.4.7 Correlation ID */
781 dissect_a21_correlation_id(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
783 case A21_IEI_MOBILE_IDENTITY
:
784 /* 5.2.4.8 Mobile Identity (MN ID) */
785 dissect_a21_mobile_identity(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
787 case A21_IEI_AUTHENTICATION_CHALLENGE_PARAMETER
:
788 /* 5.2.4.9 Authentication Challenge Parameter (RAND) */
789 dissect_a21_authentication_challenge_parameter(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
791 case A21_IEI_A21_1X_MESSAGE_TRANSMISSION_CONTROL
:
792 /* 5.2.4.10 A21 1x Message Transmission Control */
793 dissect_a21_1x_message_transmission_control(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
795 case A21_IEI_A21_CAUSE
:
796 /* 5.2.4.11 A21 Cause */
797 dissect_a21_cause(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
799 case A21_IEI_A21_EVENT
:
800 /* 5.2.4.12 A21 Event */
801 dissect_a21_event(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
803 case A21_IEI_SERVICE_OPTION
:
804 /* 5.2.4.13 Service Option */
805 dissect_a21_service_option(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
807 case A21_IEI_A21_MOBILE_SUBSCRIPTION_INFORMATION
:
808 /* 5.2.4.14 A21 Mobile Subscription Information */
809 dissect_a21_mobile_subscription_information(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
811 case A21_IEI_GCSNA_STATUS
:
812 /* 5.2.4.15 GCSNA Status */
813 dissect_a21_gcsna_status(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
815 case A21_IEI_GCSNA_PDU
:
816 /* 5.2.4.16 GCSNA PDU */
817 dissect_a21_gcsna_pdu(ie_tvb
,pinfo
, top_tree
, ie_tree
, ti
, length
, message_type
);
819 case A21_IEI_REFERENCE_CELL_ID
:
820 /* 5.2.4.17 Reference Cell ID */
821 dissect_a21_reference_cell_id(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
824 dissect_a21_unknown(ie_tvb
,pinfo
, ie_tree
, ti
, length
, message_type
);
827 offset
= offset
+ length
;
833 dissect_a21(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
835 uint8_t message_type
;
838 proto_tree
*a21_tree
, *corr_tree
;
841 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "A21");
842 col_clear(pinfo
->cinfo
, COL_INFO
);
844 /* Message header is 7 octet long
845 * Octet 1 consists of message type
846 * Octets 2-7 contain the Correlation Identifier.
849 message_type
= tvb_get_uint8(tvb
, offset
);
850 col_set_str(pinfo
->cinfo
, COL_INFO
, val_to_str_const(message_type
, a21_message_type_vals
, "Unknown"));
852 ti
= proto_tree_add_protocol_format(tree
, proto_a21
, tvb
, 0, -1,
854 val_to_str_const(message_type
, a21_message_type_vals
, "Unknown"));
855 a21_tree
= proto_item_add_subtree(ti
, ett_a21
);
857 /* message type in Octet 1 */
858 proto_tree_add_item(a21_tree
, hf_a21_message_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
860 /* Correlation Identifier in Octets 2-7 */
861 corr_tree
= proto_tree_add_subtree(a21_tree
, tvb
, offset
, 6, ett_a21_corr_id
, &tc
, "A21 Correlation ID");
863 proto_tree_add_item(corr_tree
, hf_a21_element_identifier
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
865 proto_tree_add_item(corr_tree
, hf_a21_element_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
868 proto_tree_add_item_ret_uint(corr_tree
, hf_a21_corr_id_corr_value
, tvb
, offset
, 4, ENC_BIG_ENDIAN
, &corr_id
);
869 proto_item_append_text(tc
, " %u", corr_id
);
872 dissect_a21_ie_common(tvb
, pinfo
, tree
, a21_tree
, offset
, message_type
);
874 return tvb_captured_length(tvb
);
877 void proto_register_a21(void)
879 static hf_register_info hf_a21
[] = {
880 { &hf_a21_message_type
,
881 {"Message Type", "a21.message_type",
882 FT_UINT8
, BASE_DEC
, VALS(a21_message_type_vals
), 0x0,
885 { &hf_a21_element_identifier
,
886 {"A21 Element Identifier", "a21.element_identifier",
887 FT_UINT8
, BASE_DEC
, VALS(a21_element_type_vals
), 0x0,
890 { &hf_a21_element_length
,
891 {"Length", "a21.length",
892 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
895 { &hf_a21_corr_id_corr_value
,
896 {"Correlation Value", "a21.corr_id_corr_value",
897 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
900 { &hf_a21_mn_id_msid_value
,
901 {"MSID Value", "a21.mn_id_msid_value",
902 FT_UINT8
, BASE_DEC
, NULL
, 0xf8,
905 { &hf_a21_mn_id_identity_digit_1
,
906 {"Identity Digit 1", "a21.mn_id_identity_digit_1",
907 FT_UINT8
, BASE_DEC
, NULL
, 0x08,
910 { &hf_a21_mn_id_odd_even_indicator
,
911 {"Odd/Even Indicator", "a21.mn_id_odd_even_indicator",
912 FT_UINT8
, BASE_DEC
, NULL
, 0x08,
915 { &hf_a21_mn_id_type_of_identity
,
916 {"Type of Identity", "a21.mn_id_type_of_identity",
917 FT_UINT8
, BASE_DEC
, VALS(a21_mn_id_type_of_identity_vals
), 0x07,
921 {"ESN", "a21.mn_id_esn",
922 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
926 {"Reserved", "a21.reserved",
927 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
930 { &hf_a21_msg_tran_ctrl_paging_msg
,
931 {"Paging Message", "a21.msg_tran_ctrl_paging_msg",
932 FT_UINT8
, BASE_DEC
, NULL
, 0x08,
935 { &hf_a21_msg_tran_ctrl_simul_xmit_with_next
,
936 {"Simul Xmit with Next", "a21.msg_tran_ctrl_simul_xmit_with_next",
937 FT_UINT8
, BASE_DEC
, NULL
, 0x04,
940 { &hf_a21_msg_tran_ctrl_ackrequired
,
941 {"AckRequired", "a21.msg_tran_ctrl_ackrequired",
942 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
945 { &hf_a21_msg_tran_ctrl_3GXLogicalChannel
,
946 {"3GXLogicalChannel", "a21.msg_tran_ctrl_3GXLogicalChannel",
947 FT_UINT8
, BASE_DEC
, NULL
, 0x01,
950 { &hf_a21_msg_tran_ctrl_protocol_revision
,
951 {"ProtocolRevision", "a21.msg_tran_ctrl_protocol_revision",
952 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
955 { &hf_a21_1x_lac_en_pdu
,
956 {"1x LAC Encapsulated PDU", "a21.1x_lac_en_pdu",
957 FT_UINT24
, BASE_DEC
, NULL
, 0x0,
960 { &hf_a21_pilot_list_num_of_pilots
,
961 {"Number of Pilots", "a21.pilot_list_num_of_pilots",
962 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
965 { &hf_a21_cause_value
,
966 {"A21 Cause Value", "a21.cause_value",
967 FT_UINT8
, BASE_DEC
, VALS(a21_cause_vals
), 0x0,
970 { &hf_a21_mscid_market_id
,
971 {"Market ID", "a21.mscid_market_id",
972 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
975 { &hf_a21_mscid_switch_number
,
976 {"Switch Number", "a21.mscid_switch_number",
977 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
981 {"Event", "a21.event",
982 FT_UINT8
, BASE_DEC
, VALS(a21_event_vals
), 0x0,
985 { &hf_a21_additional_event_info
,
986 {"Additional Event Info", "a21.additional_event_info",
987 FT_UINT16
, BASE_DEC
, VALS(a21_additional_event_info_vals
), 0x0,
990 { &hf_a21_allowed_forward_link_message
,
991 {"Allowed Forward Link Messages", "a21.allowed_forward_link_message",
992 FT_UINT16
, BASE_DEC
, VALS(a21_additional_event_info_vals
), 0x0,
995 { &hf_a21_gcsna_pdu_length
,
996 {"Length", "a21.gcsna_pdu_length",
997 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1000 { &hf_a21_gcsna_content
,
1001 {"GCSNA Content", "a21.gcsna_content",
1002 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1005 { &hf_a21_reference_cell_id_cell
,
1006 {"Cell", "a21.reference_cell_id_cell",
1007 FT_UINT16
, BASE_DEC
, NULL
, 0xfff0,
1010 { &hf_a21_reference_cell_id_sector
,
1011 {"Sector", "a21.reference_cell_id_sector",
1012 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
1015 { &hf_a21_mob_sub_info_record_id
,
1016 {"Record Identifier", "a21.mob_sub_info_record_id",
1017 FT_UINT8
, BASE_DEC
, VALS(a21_record_identifier_vals
), 0x0,
1020 { &hf_a21_mob_sub_info_record_length
,
1021 {"Record Length", "a21.mob_sub_info_record_length",
1022 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1025 { &hf_a21_mob_sub_info_record_content
,
1026 {"Record Content", "a21.mob_sub_info_record_content",
1027 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1030 { &hf_a21_mob_sub_info_re_con_all_band_inc
,
1031 {"All Band Classes Included", "a21.mob_sub_info_re_con_all_band_inc",
1032 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
1035 { &hf_a21_mob_sub_info_re_con_curr_band_sub
,
1036 {"Current Band Subclass", "a21.mob_sub_info_re_con_curr_band_sub",
1037 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
1040 { &hf_a21_mob_sub_info_re_band_class
,
1041 {"Band Class", "a21.mob_sub_info_re_band_class",
1042 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1045 { &hf_a21_mob_sub_info_re_con_all_sub_band_inc
,
1046 {"All Band Subclasses Included", "a21.mob_sub_info_re_con_all_sub_band_inc",
1047 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
1050 { &hf_a21_mob_sub_info_re_sub_cls_len
,
1051 {"Subclass Length", "a21.mob_sub_info_re_sub_cls_len",
1052 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
1056 { &hf_a21_mob_sub_info_re_con_band_class
,
1057 {"Band Class", "a21.mob_sub_info_re_con_band_class",
1058 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1062 { &hf_a21_auth_chall_para_rand_num_type
,
1063 {"Random Number Type", "a21.auth_chall_para_rand_num_type",
1064 FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(a21_random_number_type_rvals
), 0x0f,
1067 { &hf_a21_auth_chall_para_rand_value
,
1068 {"RAND Value", "a21.auth_chall_para_rand_value",
1069 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1072 { &hf_a21_service_option
,
1073 {"Service Option", "a21.service_option",
1074 FT_UINT16
, BASE_DEC
, VALS(a21_service_option_vals
), 0x7f,
1077 { &hf_a21_gcsna_status_reserved
,
1078 {"Reserved", "a21.gcsna_status_reserved",
1079 FT_UINT8
, BASE_DEC
, NULL
, 0xf8,
1082 { &hf_a21_gcsna_status_priority_incl
,
1083 {"Priority Incl", "a21.gcsna_status_priority_incl",
1084 FT_UINT8
, BASE_DEC
, NULL
, 0x04,
1087 { &hf_a21_gcsna_status_gec
,
1088 {"GEC", "a21.gcsna_status_gec",
1089 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
1092 { &hf_a21_gcsna_status_status_incl
,
1093 {"Status Incl", "a21.gcsna_status_status_incl",
1094 FT_UINT8
, BASE_DEC
, NULL
, 0x01,
1097 { &hf_a21_gcsna_status
,
1098 {"Status", "a21.gcsna_status",
1099 FT_UINT8
, BASE_DEC
, VALS(a21_gcsna_status_vals
), 0x0,
1102 { &hf_a21_gcsna_status_call_priority
,
1103 {"Call Priority", "a21.gcsna_status_call_priority",
1104 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
1107 { &hf_a21_3G1X_parameters
,
1108 {"3G1X Parameters", "a21.3G1X_parameters",
1109 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1112 { &hf_a21_channel_record_length
,
1113 {"Channel Record Length", "a21.channel_record_length",
1114 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1117 { &hf_a21_ch_rec_sys_type
,
1118 { "System Type", "a21.ch_system_type",
1119 FT_UINT8
, BASE_HEX
, VALS(s102_ch_pilot_system_type_values
), 0x0,
1122 { &hf_a21_ch_rec_band_class
,
1123 { "Band Class", "a21.ch_band_class",
1124 FT_UINT8
, BASE_DEC
, VALS(a21_band_class_values
), 0xf8,
1127 { &hf_a21_ch_rec_ch_num
,
1128 { "Channel Number", "a21.ch_channel_number",
1129 FT_UINT16
, BASE_DEC
, NULL
, 0x07ff,
1133 { &hf_a21_cell_id_info
,
1134 {"Cell ID Info", "a21.cell_id_info",
1135 FT_UINT8
, BASE_DEC
, VALS(a21_ch_cellid_info_values
), 0x07,
1139 { "MSC ID", "a21.msc_id",
1140 FT_UINT24
, BASE_DEC
, NULL
, 0x0,
1144 { "Cell ID", "a21.cell_id",
1145 FT_UINT16
, BASE_DEC
, NULL
, 0xfff0,
1149 { "Sector", "a21.sector",
1150 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
1153 { &hf_a21_hrpd_sector_id_len
,
1154 {"HRPD Sector id Length", "a21.hrpd_sector_id_len",
1155 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1158 { &hf_a21_ch_hrpd_sector_id
,
1159 { "HRPD Sector id", "a21.hrpd_sector_id",
1160 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1163 { &hf_a21_ch_reference_pilot
,
1164 { "Reference Pilot", "a21.ch_reference_pilot",
1165 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
1168 { &hf_a21_ch_pilot_pn
,
1169 { "Pilot PN", "a21.ch_pilot_pn",
1170 FT_UINT16
, BASE_DEC
, NULL
, 0x01ff,
1173 { &hf_a21_ch_pilot_pn_phase
,
1174 { "Pilot PN Phase", "a21.ch_pilot_pn_phase",
1175 FT_UINT16
, BASE_DEC
, NULL
, 0x7fff,
1178 { &hf_a21_ch_pilot_strength
,
1179 { "Pilot Strength", "a21.ch_pilot_strength",
1180 FT_UINT8
, BASE_DEC
, NULL
, 0x3f,
1183 { &hf_a21_ch_pilot_ow_delay_flag
,
1184 { "Pilot OneWay Delay", "a21.ch_pilot_onew_delay",
1185 FT_UINT8
, BASE_DEC
, VALS(a21_ch_pilot_ow_delay_values
), 0x40,
1188 { &hf_a21_ch_pilot_ow_delay
,
1189 { "Pilot OneWay Delay (units of 100ns)", "a21.ch_pilot_onew_delay_value",
1190 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1195 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x01,
1200 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x02,
1205 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x04,
1210 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
1215 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x10,
1220 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
1225 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x40,
1230 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x80,
1235 /* Setup protocol subtree array */
1236 static int *ett_a21_array
[] = {
1240 &ett_a21_record_content
,
1241 &ett_a21_pilot_list
,
1246 expert_module_t
*expert_a21
;
1248 static ei_register_info ei
[] = {
1249 { &ei_a21_ie_data_not_dissected_yet
,
1250 { "a21.ie_data_not_dissected_yet",
1251 PI_PROTOCOL
, PI_NOTE
, "IE data not dissected yet", EXPFILL
}},
1254 proto_a21
= proto_register_protocol("A21 Protocol", "A21", "a21");
1255 proto_register_field_array(proto_a21
, hf_a21
, array_length(hf_a21
));
1256 proto_register_subtree_array(ett_a21_array
, array_length(ett_a21_array
));
1257 expert_a21
= expert_register_protocol(proto_a21
);
1258 expert_register_field_array(expert_a21
, ei
, array_length(ei
));
1260 a21_handle
= register_dissector("a21", dissect_a21
, proto_a21
);
1263 void proto_reg_handoff_a21(void)
1265 gcsna_handle
= find_dissector_add_dependency("gcsna", proto_a21
);
1266 dissector_add_uint_with_preference("udp.port", A21_PORT
, a21_handle
);
1270 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1275 * indent-tabs-mode: t
1278 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1279 * :indentSize=8:tabSize=8:noTabs=false: