2 * Routines for ANSI IS-801 (Location Services (PLD)) dissection
4 * Location Services (Position Determination Service)
5 * 3GPP2 C.S0022-0 v1.0 IS-801
7 * Location Services (Position Determination Service)
8 * 3GPP2 C.S0022-0-1 v1.0 IS-801 Addendum
10 * Copyright 2004, Michael Lum <mlum [AT] telostech.com>
11 * In association with Telos Technology Inc.
12 * Copyright 2007, Michael Lum <michael.lum [AT] utstar.com>
13 * In association with UTStarcom Inc.
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * SPDX-License-Identifier: GPL-2.0-or-later
26 #include <epan/packet.h>
27 #include <epan/expert.h>
29 #include <epan/unit_strings.h>
30 #include <wsutil/array.h>
32 void proto_register_ansi_801(void);
33 void proto_reg_handoff_ansi_801(void);
35 static const char *ansi_proto_name
= "ANSI IS-801 (Location Services (PLD))";
36 static const char *ansi_proto_name_short
= "IS-801";
38 #define ANSI_801_FORWARD 0
39 #define ANSI_801_REVERSE 1
42 /* Initialize the subtree pointers */
43 static int ett_ansi_801
;
47 /* Initialize the protocol and registered fields */
48 static int proto_ansi_801
;
49 static int hf_ansi_801_for_req_type
;
50 static int hf_ansi_801_for_rsp_type
;
51 static int hf_ansi_801_rev_req_type
;
52 static int hf_ansi_801_rev_rsp_type
;
53 static int hf_ansi_801_for_sess_tag
;
54 static int hf_ansi_801_rev_sess_tag
;
55 static int hf_ansi_801_sess_tag
;
57 static int hf_ansi_801_time_ref_cdma
;
58 static int hf_ansi_801_lat
;
59 static int hf_ansi_801_long
;
60 static int hf_ansi_801_loc_uncrtnty_ang
;
61 static int hf_ansi_801_loc_uncrtnty_a
;
62 static int hf_ansi_801_loc_uncrtnty_p
;
63 static int hf_ansi_801_fix_type
;
64 static int hf_ansi_801_velocity_incl
;
65 static int hf_ansi_801_velocity_hor
;
66 static int hf_ansi_801_heading
;
67 static int hf_ansi_801_velocity_ver
;
68 static int hf_ansi_801_clock_incl
;
69 static int hf_ansi_801_clock_bias
;
70 static int hf_ansi_801_clock_drift
;
71 static int hf_ansi_801_height_incl
;
72 static int hf_ansi_801_height
;
73 static int hf_ansi_801_loc_uncrtnty_v
;
74 static int hf_ansi_801_reserved_bits
;
76 static int hf_ansi_801_bad_sv_present
;
77 static int hf_ansi_801_num_bad_sv
;
78 static int hf_ansi_801_bad_sv_prn_num
;
79 static int hf_ansi_801_dopp_req
;
80 static int hf_ansi_801_add_dopp_req
;
81 static int hf_ansi_801_code_ph_par_req
;
82 static int hf_ansi_801_az_el_req
;
84 static int hf_ansi_801_pref_resp_qual
;
85 static int hf_ansi_801_num_fixes
;
86 static int hf_ansi_801_t_betw_fixes
;
87 static int hf_ansi_801_offset_req
;
89 /* Generated from convert_proto_tree_add_text.pl */
90 static int hf_ansi_801_for_message_number_responsesF0
;
91 static int hf_ansi_801_apdc_id
;
92 static int hf_ansi_801_num_sv_p32
;
93 static int hf_ansi_801_regulatory_services_indicator
;
94 static int hf_ansi_801_session_source
;
95 static int hf_ansi_801_reserved8_E0
;
96 static int hf_ansi_801_action_time
;
97 static int hf_ansi_801_rev_message_number_responsesF0
;
98 static int hf_ansi_801_reserved24_3
;
99 static int hf_ansi_801_cancellation_type
;
100 static int hf_ansi_801_gps_navigation_message_bits
;
101 static int hf_ansi_801_num_dr_p
;
102 static int hf_ansi_801_rev_message_number_requests8
;
103 static int hf_ansi_801_reserved8_F0
;
104 static int hf_ansi_801_for_req_loc_clock_correction_for_gps_time
;
105 static int hf_ansi_801_for_response_length
;
106 static int hf_ansi_801_session_end
;
107 static int hf_ansi_801_reserved8_1F
;
108 static int hf_ansi_801_part_num
;
109 static int hf_ansi_801_dr_size
;
110 static int hf_ansi_801_reserved_24_700
;
111 static int hf_ansi_801_for_message_number_responses0F
;
112 static int hf_ansi_801_rev_message_number_requests16
;
113 static int hf_ansi_801_lcc_capable_using_location_assistance_spherical
;
114 static int hf_ansi_801_part_num32
;
115 static int hf_ansi_801_part_num16
;
116 static int hf_ansi_801_reserved8_07
;
117 static int hf_ansi_801_reserved24_1
;
118 static int hf_ansi_801_reserved_24_F80000
;
119 static int hf_ansi_801_extended_base_station_almanac
;
120 static int hf_ansi_801_no_outstanding_request_element
;
121 static int hf_ansi_801_for_request_length
;
122 static int hf_ansi_801_week_num
;
123 static int hf_ansi_801_total_parts16
;
124 static int hf_ansi_801_pd_message_type
;
125 static int hf_ansi_801_total_parts32
;
126 static int hf_ansi_801_alpha_and_beta_parameters
;
127 static int hf_ansi_801_lcc_using_gps_ephemeris_assistance
;
128 static int hf_ansi_801_rev_request_length
;
129 static int hf_ansi_801_reserved8_7F
;
130 static int hf_ansi_801_unsolicited_response_indicator
;
131 static int hf_ansi_801_autonomous_location_calculation_capable
;
132 static int hf_ansi_801_gps_almanac_correction
;
133 static int hf_ansi_801_total_parts
;
134 static int hf_ansi_801_session_start
;
135 static int hf_ansi_801_ref_bit_num
;
136 static int hf_ansi_801_aflt_lcc
;
137 static int hf_ansi_801_reject_reason
;
138 static int hf_ansi_801_gps_ephemeris
;
139 static int hf_ansi_801_pre_programmed_location
;
140 static int hf_ansi_801_rev_response_length
;
141 static int hf_ansi_801_afltc_id
;
142 static int hf_ansi_801_rev_req_loc_height_information
;
143 static int hf_ansi_801_reserved8_01
;
144 static int hf_ansi_801_pilot_ph_cap
;
145 static int hf_ansi_801_gps_acquisition_assistance
;
146 static int hf_ansi_801_coordinate_type_requested
;
147 static int hf_ansi_801_gps_almanac
;
148 static int hf_ansi_801_rev_req_loc_velocity_information
;
149 static int hf_ansi_801_gps_autonomous_acquisition_capable
;
150 static int hf_ansi_801_num_sv_p16
;
151 static int hf_ansi_801_mob_sys_t_offset
;
152 static int hf_ansi_801_desired_pilot_phase_resolution
;
153 static int hf_ansi_801_for_req_loc_velocity_information
;
154 static int hf_ansi_801_reserved8_0F
;
155 static int hf_ansi_801_hybrid_gps_and_aflt_lcc
;
156 static int hf_ansi_801_gps_acq_cap
;
157 static int hf_ansi_801_gps_sensitivity_assistance
;
158 static int hf_ansi_801_ms_ls_rev
;
159 static int hf_ansi_801_reject_request_type
;
160 static int hf_ansi_801_ms_mode
;
161 static int hf_ansi_801_bs_ls_rev
;
162 static int hf_ansi_801_ref_pn
;
163 static int hf_ansi_801_rev_message_number_responses0F
;
164 static int hf_ansi_801_for_req_loc_height_information
;
165 static int hf_ansi_801_gps_capability_indicator
;
166 static int hf_ansi_801_rev_req_loc_clock_correction_for_gps_time
;
167 static int hf_ansi_801_data_records
;
168 static int hf_ansi_801_for_message_number_requests8
;
169 static int hf_ansi_801_subframes_4_and_5
;
170 static int hf_ansi_801_use_action_time_indicator
;
171 static int hf_ansi_801_lcc_using_gps_almanac_assistance
;
172 static int hf_ansi_801_lcc_using_gps_almanac_correction
;
173 static int hf_ansi_801_pd_message_len
;
174 static int hf_ansi_801_lcc_using_location_assistance_cartesian
;
175 static int hf_ansi_801_for_message_number_requests16
;
176 static int hf_ansi_801_reserved_24_7
;
177 static int hf_ansi_801_loc_calc_cap
;
178 static int hf_ansi_801_toa
;
179 static int hf_ansi_801_data
;
180 static int hf_ansi_801_proprietary_data
;
181 static int hf_ansi_801_time_ref_ms
;
182 static int hf_ansi_801_time_of_almanac
;
183 static int hf_ansi_801_gps_week_number
;
186 static expert_field ei_ansi_801_extraneous_data
;
187 static expert_field ei_ansi_801_short_data
;
188 static expert_field ei_ansi_801_unexpected_length
;
191 static dissector_handle_t ansi_801_handle
;
193 /* PARAM FUNCTIONS */
195 #define EXTRANEOUS_DATA_CHECK(edc_len, edc_max_len) \
196 if ((edc_len) > (edc_max_len)) \
198 proto_tree_add_expert(tree, pinfo, &ei_ansi_801_extraneous_data, tvb, \
199 offset, (edc_len) - (edc_max_len)); \
202 #define SHORT_DATA_CHECK(sdc_len, sdc_min_len) \
203 if ((sdc_len) < (sdc_min_len)) \
205 proto_tree_add_expert(tree, pinfo, &ei_ansi_801_short_data, tvb, \
206 offset, (sdc_len)); \
210 #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \
211 if ((edc_len) != (edc_eq_len)) \
213 proto_tree_add_expert(tree, pinfo, &ei_ansi_801_unexpected_length, tvb, \
214 offset, (edc_len)); \
220 * Table 3.2-4 for PD_MSG_TYPE = '0000000'
222 static const value_string for_req_type_strings
[] = {
224 { 1, "Request Location Response" },
225 { 2, "Request MS Information" },
226 { 3, "Request Autonomous Measurement Weighting Factors" },
227 { 4, "Request Pseudorange Measurement" },
228 { 5, "Request Pilot Phase Measurement" },
229 { 6, "Request Time Offset Measurement" },
230 { 7, "Request Cancellation" },
233 #define NUM_FOR_REQ_TYPE array_length(for_req_type_strings)
234 static int ett_for_req_type
[NUM_FOR_REQ_TYPE
];
236 static const value_string for_rsp_type_strings
[] = {
238 { 2, "Provide BS Capabilities" },
239 { 4, "Provide GPS Acquisition Assistance" },
240 { 6, "Provide GPS Location Assistance Spherical Coordinates" },
241 { 7, "Provide GPS Location Assistance Cartesian Coordinates" },
242 { 5, "Provide GPS Sensitivity Assistance" },
243 { 3, "Provide Base Station Almanac" },
244 { 8, "Provide GPS Almanac" },
245 { 9, "Provide GPS Ephemeris" },
246 { 10, "Provide GPS Navigation Message Bits" },
247 { 1, "Provide Location Response" },
248 { 11, "Provide GPS Almanac Correction" },
249 { 12, "Provide GPS Satellite Health Information" },
252 #define NUM_FOR_RSP_TYPE array_length(for_rsp_type_strings)
253 static int ett_for_rsp_type
[NUM_FOR_RSP_TYPE
];
256 static const value_string rev_rsp_type_strings
[] = {
258 { 2, "Provide MS Information" },
259 { 3, "Provide Autonomous Measurement Weighting Factors" },
260 { 4, "Provide Pseudorange Measurement" },
261 { 5, "Provide Pilot Phase Measurement" },
262 { 1, "Provide Location Response" },
263 { 6, "Provide Time Offset Measurement" },
264 { 7, "Provide Cancellation Acknowledgement" },
267 #define NUM_REV_RSP_TYPE array_length(rev_rsp_type_strings)
268 static int ett_rev_rsp_type
[NUM_REV_RSP_TYPE
];
271 * Table 2.2-5 for PD_MSG_TYPE = '0000000'
273 static const value_string rev_req_type_strings
[] = {
275 { 2, "Request BS Capabilities" },
276 { 4, "Request GPS Acquisition Assistance" },
277 { 6, "Request GPS Location Assistance" },
279 { 5, "Request GPS Sensitivity Assistance" },
280 { 3, "Request Base Station Almanac" },
281 { 8, "Request GPS Almanac" },
282 { 9, "Request GPS Ephemeris" },
283 { 10, "Request GPS Navigation Message Bits" },
284 { 1, "Request Location Response" },
285 { 11, "Request GPS Almanac Correction" },
286 { 12, "Request GPS Satellite Health Information" },
289 #define NUM_REV_REQ_TYPE array_length(rev_req_type_strings)
290 static int ett_rev_req_type
[NUM_REV_REQ_TYPE
];
292 static const value_string regulatory_services_indicator_vals
[] = {
293 { 0, "No Regulatory service" },
294 { 1, "Emergency service" },
300 static const true_false_string tfs_desired_pilot_phase_resolution
= { "at least 1/8th PN chip resolution", "at least 1 PN chip resolution" };
301 static const true_false_string tfs_spherical_cartesian
= { "Spherical", "Cartesian" };
303 static const unit_name_string units_time_of_almanac
= { " (in units of 4096 seconds)", NULL
};
304 static const unit_name_string units_gps_week_number
= { " (8 least significant bits)", NULL
};
307 for_req_pseudo_meas(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
309 uint32_t saved_offset
= offset
;
311 SHORT_DATA_CHECK(len
, 3);
314 proto_tree_add_item(tree
, hf_ansi_801_pref_resp_qual
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
315 proto_tree_add_item(tree
, hf_ansi_801_num_fixes
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
316 proto_tree_add_item(tree
, hf_ansi_801_t_betw_fixes
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
317 proto_tree_add_item(tree
, hf_ansi_801_offset_req
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
318 proto_tree_add_item(tree
, hf_ansi_801_reserved_24_7
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
321 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
326 for_req_pilot_ph_meas(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
328 uint32_t saved_offset
;
330 SHORT_DATA_CHECK(len
, 3);
332 saved_offset
= offset
;
334 proto_tree_add_item(tree
, hf_ansi_801_pref_resp_qual
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
335 proto_tree_add_item(tree
, hf_ansi_801_num_fixes
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
336 proto_tree_add_item(tree
, hf_ansi_801_t_betw_fixes
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
337 proto_tree_add_item(tree
, hf_ansi_801_offset_req
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
338 proto_tree_add_item(tree
, hf_ansi_801_desired_pilot_phase_resolution
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
339 proto_tree_add_item(tree
, hf_ansi_801_reserved_24_7
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
342 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
346 for_req_loc_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
348 uint32_t saved_offset
;
350 SHORT_DATA_CHECK(len
, 3);
352 saved_offset
= offset
;
354 proto_tree_add_item(tree
, hf_ansi_801_pref_resp_qual
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
355 proto_tree_add_item(tree
, hf_ansi_801_num_fixes
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
356 proto_tree_add_item(tree
, hf_ansi_801_t_betw_fixes
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
357 proto_tree_add_item(tree
, hf_ansi_801_for_req_loc_height_information
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
358 proto_tree_add_item(tree
, hf_ansi_801_for_req_loc_clock_correction_for_gps_time
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
359 proto_tree_add_item(tree
, hf_ansi_801_for_req_loc_velocity_information
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
360 proto_tree_add_item(tree
, hf_ansi_801_reserved24_3
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
363 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
367 for_req_time_off_meas(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
370 uint32_t saved_offset
;
372 SHORT_DATA_CHECK(len
, 1);
374 saved_offset
= offset
;
376 oct
= tvb_get_uint8(tvb
, offset
);
378 proto_tree_add_item(tree
, hf_ansi_801_use_action_time_indicator
, tvb
, offset
, 1, ENC_NA
);
382 proto_tree_add_item(tree
, hf_ansi_801_action_time
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
383 proto_tree_add_item(tree
, hf_ansi_801_reserved8_01
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
387 proto_tree_add_item(tree
, hf_ansi_801_reserved8_7F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
391 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
395 for_req_cancel(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
398 uint32_t saved_offset
;
399 const char *str
= NULL
;
401 SHORT_DATA_CHECK(len
, 1);
403 saved_offset
= offset
;
405 oct
= tvb_get_uint8(tvb
, offset
);
407 str
= val_to_str_const((oct
& 0xf0) >> 4, for_req_type_strings
, "Reserved");
408 proto_tree_add_uint_format_value(tree
, hf_ansi_801_cancellation_type
, tvb
, offset
, 1,
409 oct
, "(%u) %s", (oct
& 0xf0) >> 4, str
);
411 proto_tree_add_item(tree
, hf_ansi_801_reserved8_0F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
414 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
418 for_reject(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
421 uint32_t saved_offset
;
422 const char *str
= NULL
;
424 saved_offset
= offset
;
426 SHORT_DATA_CHECK(len
, 1);
428 oct
= tvb_get_uint8(tvb
, offset
);
429 str
= val_to_str_const((oct
& 0xf0) >> 4, rev_req_type_strings
, "Reserved");
431 proto_tree_add_uint_format_value(tree
, hf_ansi_801_reject_request_type
, tvb
, offset
, 1, oct
,
432 "(%u) %s", (oct
& 0xf0) >> 4, str
);
434 switch ((oct
& 0x0e) >> 1)
436 case 0x00: str
= "Capability not supported by the base station"; break;
437 case 0x01: str
= "Capability normally supported by the base station but temporarily not available or not enabled"; break;
438 default: str
= "Reserved"; break;
441 proto_tree_add_uint_format_value(tree
, hf_ansi_801_reject_reason
, tvb
, offset
, 1, oct
, "%s", str
);
442 proto_tree_add_item(tree
, hf_ansi_801_reserved8_01
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
445 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
449 for_pr_bs_cap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
452 uint32_t saved_offset
;
454 saved_offset
= offset
;
456 SHORT_DATA_CHECK(len
, 2);
458 proto_tree_add_item(tree
, hf_ansi_801_bs_ls_rev
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
459 proto_tree_add_item(tree
, hf_ansi_801_gps_capability_indicator
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
460 proto_tree_add_item(tree
, hf_ansi_801_afltc_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
463 oct
= tvb_get_uint8(tvb
, offset
);
466 proto_tree_add_uint_format(tree
, hf_ansi_801_apdc_id
, tvb
, offset
, 1, 0,
467 "APDC_ID: Autonomous position determination capability indicator: None");
471 proto_tree_add_item(tree
, hf_ansi_801_apdc_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
476 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
480 for_pr_gps_sense_ass(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
482 uint32_t saved_offset
;
484 saved_offset
= offset
;
486 SHORT_DATA_CHECK(len
, 4);
488 proto_tree_add_item(tree
, hf_ansi_801_ref_bit_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
489 proto_tree_add_item(tree
, hf_ansi_801_num_dr_p
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
492 proto_tree_add_item(tree
, hf_ansi_801_dr_size
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
495 proto_tree_add_item(tree
, hf_ansi_801_part_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
496 proto_tree_add_item(tree
, hf_ansi_801_total_parts
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
497 proto_tree_add_item(tree
, hf_ansi_801_data_records
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
500 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
504 for_pr_gps_almanac(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
506 uint32_t saved_offset
= offset
;
507 int * const fields
[] = {
508 &hf_ansi_801_num_sv_p32
,
509 &hf_ansi_801_week_num
,
511 &hf_ansi_801_part_num32
,
512 &hf_ansi_801_total_parts32
,
516 SHORT_DATA_CHECK(len
, 4);
518 proto_tree_add_bitmask_list(tree
, tvb
, offset
, 4, fields
, ENC_BIG_ENDIAN
);
521 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
525 for_pr_gps_nav_msg_bits(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
527 uint32_t saved_offset
= offset
;
528 int * const fields
[] = {
529 &hf_ansi_801_num_sv_p16
,
530 &hf_ansi_801_part_num16
,
531 &hf_ansi_801_total_parts16
,
535 SHORT_DATA_CHECK(len
, 2);
537 proto_tree_add_bitmask_list(tree
, tvb
, offset
, 2, fields
, ENC_BIG_ENDIAN
);
540 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
544 * shared for both forward/reverse directions
546 static const true_false_string ansi_801_fix_type_vals
= {
552 pr_loc_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
554 uint32_t bit_offset
, spare_bits
;
557 uint32_t saved_offset
;
558 uint64_t fix_type
, velocity_incl
, clock_incl
, height_incl
;
559 const char *str
= NULL
;
561 SHORT_DATA_CHECK(len
, 11);
562 saved_offset
= offset
;
563 bit_offset
= offset
<< 3;
566 value
= tvb_get_bits16(tvb
, bit_offset
, 14, ENC_BIG_ENDIAN
);
567 proto_tree_add_uint_bits_format_value(tree
, hf_ansi_801_time_ref_cdma
, tvb
, bit_offset
, 14, value
* 50,
568 ENC_BIG_ENDIAN
, "%u frames (0x%04x)", value
* 50, value
);
572 value
= tvb_get_bits32(tvb
, bit_offset
, 25, ENC_BIG_ENDIAN
);
573 fl_value
= (float)(-90.0 + ((float)value
* 180 / 33554432));
574 proto_tree_add_float_bits_format_value(tree
, hf_ansi_801_lat
, tvb
, bit_offset
, 25, fl_value
, ENC_BIG_ENDIAN
,
575 "%.5f degrees %s (0x%08x)", fabs(fl_value
), fl_value
< 0 ? "South" : "North", value
);
579 value
= tvb_get_bits32(tvb
, bit_offset
, 26, ENC_BIG_ENDIAN
);
580 fl_value
= (float)(-180.0 + ((float)value
* 180 / 33554432));
581 proto_tree_add_float_bits_format_value(tree
, hf_ansi_801_long
, tvb
, bit_offset
, 26, fl_value
, ENC_BIG_ENDIAN
,
582 "%.5f degrees %s (0x%08x)", fabs(fl_value
), fl_value
< 0 ? "West" : "East", value
);
585 /* LOC_UNCRTNTY_ANG */
586 value
= tvb_get_bits8(tvb
, bit_offset
, 4);
587 fl_value
= (float)(5.625 * value
);
588 proto_tree_add_float_bits_format_value(tree
, hf_ansi_801_loc_uncrtnty_ang
, tvb
, bit_offset
, 4, fl_value
,
589 ENC_BIG_ENDIAN
, "%.5f degrees (0x%02x)", fl_value
, value
);
593 value
= tvb_get_bits8(tvb
, bit_offset
, 5);
596 case 0x1e: str
= "> 12288.00 meters"; break;
597 case 0x1f: str
= "Not computable"; break;
599 fl_value
= (float)(0.5f
* (1 << (value
>> 1)));
602 str
= wmem_strdup_printf(pinfo
->pool
, "%.2f meters", fl_value
);
604 proto_tree_add_uint_bits_format_value(tree
, hf_ansi_801_loc_uncrtnty_a
, tvb
, bit_offset
, 5, value
,
605 ENC_BIG_ENDIAN
, "%s (0x%02x)", str
, value
);
609 value
= tvb_get_bits8(tvb
, bit_offset
, 5);
612 case 0x1e: str
= "> 12288.00 meters"; break;
613 case 0x1f: str
= "Not computable"; break;
615 fl_value
= (float)(0.5f
* (1 << (value
>> 1)));
618 str
= wmem_strdup_printf(pinfo
->pool
, "%.2f meters", fl_value
);
620 proto_tree_add_uint_bits_format_value(tree
, hf_ansi_801_loc_uncrtnty_p
, tvb
, bit_offset
, 5, value
,
621 ENC_BIG_ENDIAN
, "%s (0x%02x)", str
, value
);
625 proto_tree_add_bits_ret_val(tree
, hf_ansi_801_fix_type
, tvb
, bit_offset
++, 1, &fix_type
, ENC_BIG_ENDIAN
);
628 proto_tree_add_bits_ret_val(tree
, hf_ansi_801_velocity_incl
, tvb
, bit_offset
++, 1, &velocity_incl
, ENC_BIG_ENDIAN
);
634 value
= tvb_get_bits16(tvb
, bit_offset
, 9, ENC_BIG_ENDIAN
);
635 fl_value
= (float)(0.25 * value
);
636 proto_tree_add_float_bits_format_value(tree
, hf_ansi_801_velocity_hor
, tvb
, bit_offset
, 9, fl_value
,
637 ENC_BIG_ENDIAN
, "%.2f m/s (0x%04x)", fl_value
, value
);
641 value
= tvb_get_bits16(tvb
, bit_offset
, 10, ENC_BIG_ENDIAN
);
642 fl_value
= (float)value
* 360 / 1024;
643 proto_tree_add_float_bits_format_value(tree
, hf_ansi_801_heading
, tvb
, bit_offset
, 10, fl_value
,
644 ENC_BIG_ENDIAN
, "%.3f degrees (0x%04x)", fl_value
, value
);
650 value
= tvb_get_bits8(tvb
, bit_offset
, 8);
651 fl_value
= (float)(-64 + 0.5 * value
);
652 proto_tree_add_float_bits_format_value(tree
, hf_ansi_801_velocity_ver
, tvb
, bit_offset
, 8, fl_value
,
653 ENC_BIG_ENDIAN
, "%.1f m/s (0x%02x)", fl_value
, value
);
659 proto_tree_add_bits_ret_val(tree
, hf_ansi_801_clock_incl
, tvb
, bit_offset
++, 1, &clock_incl
, ENC_BIG_ENDIAN
);
664 value
= tvb_get_bits32(tvb
, bit_offset
, 18, ENC_BIG_ENDIAN
);
665 proto_tree_add_int_bits_format_value(tree
, hf_ansi_801_clock_bias
, tvb
, bit_offset
, 18, (int32_t)value
- 13000,
666 ENC_BIG_ENDIAN
, "%d ns (0x%06x)", (int32_t)value
- 13000, value
);
670 value
= tvb_get_bits16(tvb
, bit_offset
, 16, ENC_BIG_ENDIAN
);
671 proto_tree_add_int_bits_format_value(tree
, hf_ansi_801_clock_drift
, tvb
, bit_offset
, 16, (int16_t)value
,
672 ENC_BIG_ENDIAN
, "%d ppb (ns/s) (0x%04x)", (int16_t)value
, value
);
677 proto_tree_add_bits_ret_val(tree
, hf_ansi_801_height_incl
, tvb
, bit_offset
++, 1, &height_incl
, ENC_BIG_ENDIAN
);
682 value
= tvb_get_bits16(tvb
, bit_offset
, 14, ENC_BIG_ENDIAN
);
683 proto_tree_add_int_bits_format_value(tree
, hf_ansi_801_height
, tvb
, bit_offset
, 14, (int32_t)value
- 500,
684 ENC_BIG_ENDIAN
, "%d m (0x%04x)", (int32_t)value
- 500, value
);
688 value
= tvb_get_bits8(tvb
, bit_offset
, 5);
691 case 0x1e: str
= "> 12288.00 meters"; break;
692 case 0x1f: str
= "Not computable"; break;
694 fl_value
= (float)(0.5f
* (1 << (value
>> 1)));
697 str
= wmem_strdup_printf(pinfo
->pool
, "%.2f meters", fl_value
);
699 proto_tree_add_uint_bits_format_value(tree
, hf_ansi_801_loc_uncrtnty_v
, tvb
, bit_offset
, 5, value
,
700 ENC_BIG_ENDIAN
, "%s (0x%02x)", str
, value
);
704 if(bit_offset
& 0x07)
706 spare_bits
= 8 - (bit_offset
& 0x07);
707 proto_tree_add_bits_item(tree
, hf_ansi_801_reserved_bits
, tvb
, bit_offset
, spare_bits
, ENC_BIG_ENDIAN
);
708 bit_offset
+= spare_bits
;
711 offset
= bit_offset
>> 3;
713 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
717 for_pr_loc_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
719 pr_loc_response(tvb
, pinfo
, tree
, len
, offset
);
723 for_pr_gps_sat_health(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
725 uint32_t bit_offset
, spare_bits
;
727 uint32_t saved_offset
, num_bad_sv
, bad_sv_prn_num
;
728 uint64_t bad_sv_present
;
730 SHORT_DATA_CHECK(len
, 1);
731 saved_offset
= offset
;
732 bit_offset
= offset
<< 3;
735 proto_tree_add_bits_ret_val(tree
, hf_ansi_801_bad_sv_present
, tvb
, bit_offset
++, 1, &bad_sv_present
, ENC_BIG_ENDIAN
);
740 num_bad_sv
= tvb_get_bits8(tvb
, bit_offset
, 4) + 1;
741 proto_tree_add_uint_bits_format_value(tree
, hf_ansi_801_num_bad_sv
, tvb
, bit_offset
, 4, num_bad_sv
,
742 ENC_BIG_ENDIAN
, "%u", num_bad_sv
);
745 for (i
=0; i
< num_bad_sv
; i
++)
748 bad_sv_prn_num
= tvb_get_bits8(tvb
, bit_offset
, 5) + 1;
749 proto_tree_add_uint_bits_format_value(tree
, hf_ansi_801_bad_sv_prn_num
, tvb
, bit_offset
, 5, bad_sv_prn_num
,
750 ENC_BIG_ENDIAN
, "%u", bad_sv_prn_num
);
755 if(bit_offset
& 0x07)
757 spare_bits
= 8 - (bit_offset
& 0x07);
758 proto_tree_add_bits_item(tree
, hf_ansi_801_reserved_bits
, tvb
, bit_offset
, spare_bits
, ENC_BIG_ENDIAN
);
759 bit_offset
+= spare_bits
;
762 offset
= bit_offset
>> 3;
764 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
768 rev_req_gps_acq_ass(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
770 uint32_t saved_offset
;
773 SHORT_DATA_CHECK(len
, 1);
774 saved_offset
= offset
;
775 bit_offset
= offset
<< 3;
777 proto_tree_add_bits_item(tree
, hf_ansi_801_dopp_req
, tvb
, bit_offset
++, 1, ENC_BIG_ENDIAN
);
778 proto_tree_add_bits_item(tree
, hf_ansi_801_add_dopp_req
, tvb
, bit_offset
++, 1, ENC_BIG_ENDIAN
);
779 proto_tree_add_bits_item(tree
, hf_ansi_801_code_ph_par_req
, tvb
, bit_offset
++, 1, ENC_BIG_ENDIAN
);
780 proto_tree_add_bits_item(tree
, hf_ansi_801_az_el_req
, tvb
, bit_offset
++, 1, ENC_BIG_ENDIAN
);
781 proto_tree_add_bits_item(tree
, hf_ansi_801_reserved_bits
, tvb
, bit_offset
, 4, ENC_BIG_ENDIAN
);
784 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
788 rev_req_gps_loc_ass(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
790 uint32_t saved_offset
;
792 SHORT_DATA_CHECK(len
, 1);
794 saved_offset
= offset
;
796 proto_tree_add_item(tree
, hf_ansi_801_coordinate_type_requested
, tvb
, offset
, 1, ENC_NA
);
797 proto_tree_add_item(tree
, hf_ansi_801_reserved8_7F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
800 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
804 rev_req_bs_alm(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
806 uint32_t saved_offset
;
808 SHORT_DATA_CHECK(len
, 1);
810 saved_offset
= offset
;
812 proto_tree_add_item(tree
, hf_ansi_801_extended_base_station_almanac
, tvb
, offset
, 1, ENC_NA
);
813 proto_tree_add_item(tree
, hf_ansi_801_reserved8_7F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
816 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
820 rev_req_gps_ephemeris(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
822 uint32_t saved_offset
;
824 SHORT_DATA_CHECK(len
, 1);
826 saved_offset
= offset
;
828 proto_tree_add_item(tree
, hf_ansi_801_alpha_and_beta_parameters
, tvb
, offset
, 1, ENC_NA
);
829 proto_tree_add_item(tree
, hf_ansi_801_reserved8_7F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
832 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
836 rev_req_gps_nav_msg_bits(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
838 uint32_t saved_offset
;
840 SHORT_DATA_CHECK(len
, 1);
842 saved_offset
= offset
;
844 proto_tree_add_item(tree
, hf_ansi_801_subframes_4_and_5
, tvb
, offset
, 1, ENC_NA
);
845 proto_tree_add_item(tree
, hf_ansi_801_reserved8_7F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
849 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
853 rev_req_loc_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
855 uint32_t saved_offset
;
857 SHORT_DATA_CHECK(len
, 1);
859 saved_offset
= offset
;
861 proto_tree_add_item(tree
, hf_ansi_801_rev_req_loc_height_information
, tvb
, offset
, 1, ENC_NA
);
862 proto_tree_add_item(tree
, hf_ansi_801_rev_req_loc_clock_correction_for_gps_time
, tvb
, offset
, 1, ENC_NA
);
863 proto_tree_add_item(tree
, hf_ansi_801_rev_req_loc_velocity_information
, tvb
, offset
, 1, ENC_NA
);
864 proto_tree_add_item(tree
, hf_ansi_801_reserved8_1F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
867 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
871 rev_req_gps_alm_correction(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
873 uint32_t saved_offset
;
875 SHORT_DATA_CHECK(len
, 2);
877 saved_offset
= offset
;
879 proto_tree_add_item(tree
, hf_ansi_801_time_of_almanac
, tvb
, offset
, 1, ENC_NA
);
882 proto_tree_add_item(tree
, hf_ansi_801_gps_week_number
, tvb
, offset
, 1, ENC_NA
);
886 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
890 rev_reject(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
893 uint32_t saved_offset
;
894 const char *str
= NULL
;
896 saved_offset
= offset
;
898 SHORT_DATA_CHECK(len
, 1);
900 oct
= tvb_get_uint8(tvb
, offset
);
902 str
= val_to_str_const((oct
& 0xf0) >> 4, for_req_type_strings
, "Reserved");
904 proto_tree_add_uint_format_value(tree
, hf_ansi_801_reject_request_type
, tvb
, offset
, 1, oct
,
905 "(%u) %s", (oct
& 0xf0) >> 4, str
);
907 switch ((oct
& 0x0e) >> 1)
909 case 0x00: str
= "Capability not supported by the mobile station"; break;
910 case 0x01: str
= "Capability normally supported by the mobile station but temporarily not available or not enabled"; break;
911 default: str
= "Reserved"; break;
914 proto_tree_add_uint_format_value(tree
, hf_ansi_801_reject_reason
, tvb
, offset
, 1,
917 proto_tree_add_item(tree
, hf_ansi_801_reserved8_01
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
920 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
924 rev_pr_ms_information(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
927 uint32_t saved_offset
;
928 const char *str
= NULL
;
930 proto_tree
*gps_tree
, *loc_tree
;
932 saved_offset
= offset
;
934 SHORT_DATA_CHECK(len
, 5);
936 value
= tvb_get_ntohs(tvb
, offset
);
938 proto_tree_add_item(tree
, hf_ansi_801_ms_ls_rev
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
940 proto_tree_add_item(tree
, hf_ansi_801_ms_mode
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
942 switch (value
& 0x003f)
944 case 0x00: str
= "Full Chip Measurement Capability"; break;
945 case 0x01: str
= "Half Chip Measurement Capability"; break;
946 case 0x02: str
= "Quarter Chip Measurement Capability"; break;
947 case 0x03: str
= "Eighth Chip Measurement Capability"; break;
948 case 0x04: str
= "One Sixteenth Chip Measurement Capability"; break;
949 default: str
= "Reserved"; break;
952 proto_tree_add_uint_format_value(tree
, hf_ansi_801_pilot_ph_cap
, tvb
, offset
, 2,
953 value
, "(%u) %s", value
& 0x3f, str
);
956 ti
= proto_tree_add_item(tree
, hf_ansi_801_gps_acq_cap
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
957 gps_tree
= proto_item_add_subtree(ti
, ett_gps
);
959 proto_tree_add_item(gps_tree
, hf_ansi_801_reserved_24_F80000
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
960 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_autonomous_acquisition_capable
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
961 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_almanac_correction
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
962 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_navigation_message_bits
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
963 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_ephemeris
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
964 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_almanac
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
965 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_sensitivity_assistance
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
966 proto_tree_add_item(gps_tree
, hf_ansi_801_gps_acquisition_assistance
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
968 ti
= proto_tree_add_item(tree
, hf_ansi_801_loc_calc_cap
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
969 loc_tree
= proto_item_add_subtree(ti
, ett_loc
);
971 proto_tree_add_item(loc_tree
, hf_ansi_801_pre_programmed_location
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
972 proto_tree_add_item(loc_tree
, hf_ansi_801_reserved_24_700
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
973 proto_tree_add_item(loc_tree
, hf_ansi_801_hybrid_gps_and_aflt_lcc
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
974 proto_tree_add_item(loc_tree
, hf_ansi_801_autonomous_location_calculation_capable
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
975 proto_tree_add_item(loc_tree
, hf_ansi_801_lcc_using_gps_almanac_correction
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
976 proto_tree_add_item(loc_tree
, hf_ansi_801_lcc_using_gps_ephemeris_assistance
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
977 proto_tree_add_item(loc_tree
, hf_ansi_801_lcc_using_gps_almanac_assistance
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
978 proto_tree_add_item(loc_tree
, hf_ansi_801_aflt_lcc
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
979 proto_tree_add_item(loc_tree
, hf_ansi_801_lcc_using_location_assistance_cartesian
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
980 proto_tree_add_item(loc_tree
, hf_ansi_801_lcc_capable_using_location_assistance_spherical
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
983 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
987 rev_pr_loc_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
989 pr_loc_response(tvb
, pinfo
, tree
, len
, offset
);
993 rev_pr_time_off_meas(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
995 uint32_t saved_offset
;
997 saved_offset
= offset
;
999 SHORT_DATA_CHECK(len
, 6);
1001 proto_tree_add_uint_format_value(tree
, hf_ansi_801_time_ref_ms
, tvb
, offset
, 3, tvb_get_ntoh24(tvb
, offset
),
1002 "The time of validity of the parameters reported in this response element.");
1005 proto_tree_add_item(tree
, hf_ansi_801_ref_pn
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1006 proto_tree_add_item(tree
, hf_ansi_801_mob_sys_t_offset
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1007 proto_tree_add_item(tree
, hf_ansi_801_reserved24_1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1010 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1014 rev_pr_can_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
)
1017 uint32_t saved_offset
;
1020 saved_offset
= offset
;
1022 SHORT_DATA_CHECK(len
, 1);
1024 oct
= tvb_get_uint8(tvb
, offset
);
1026 str
= val_to_str_const((oct
& 0xf0) >> 4, for_req_type_strings
, "Reserved");
1027 proto_tree_add_uint_format_value(tree
, hf_ansi_801_cancellation_type
, tvb
, offset
, 1, oct
,
1028 "(%u) %s", (oct
& 0xf0) >> 4, str
);
1030 proto_tree_add_item(tree
, hf_ansi_801_no_outstanding_request_element
, tvb
, offset
, 1, ENC_NA
);
1031 proto_tree_add_item(tree
, hf_ansi_801_reserved8_07
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1034 EXTRANEOUS_DATA_CHECK(len
, offset
- saved_offset
);
1037 static void (*for_req_type_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
) = {
1038 NULL
, /* Reserved */
1039 NULL
, /* no data */ /* Request MS Information */
1040 NULL
, /* no data */ /* Request Autonomous Measurement Weighting Factors */
1041 for_req_pseudo_meas
, /* Request Pseudorange Measurement */
1042 for_req_pilot_ph_meas
, /* Request Pilot Phase Measurement */
1043 for_req_loc_response
, /* Request Location Response */
1044 for_req_time_off_meas
, /* Request Time Offset Measurement */
1045 for_req_cancel
, /* Request Cancellation */
1049 static void (*for_rsp_type_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
) = {
1050 for_reject
, /* Reject */
1051 for_pr_bs_cap
, /* Provide BS Capabilities */
1052 NULL
, /* Provide GPS Acquisition Assistance */
1053 NULL
, /* Provide GPS Location Assistance Spherical Coordinates */
1054 NULL
, /* Provide GPS Location Assistance Cartesian Coordinates */
1055 for_pr_gps_sense_ass
, /* Provide GPS Sensitivity Assistance */
1056 NULL
, /* Provide Base Station Almanac */
1057 for_pr_gps_almanac
, /* Provide GPS Almanac */
1058 NULL
, /* Provide GPS Ephemeris */
1059 for_pr_gps_nav_msg_bits
, /* Provide GPS Navigation Message Bits */
1060 for_pr_loc_response
, /* Provide Location Response */
1061 NULL
, /* Provide GPS Almanac Correction */
1062 for_pr_gps_sat_health
, /* Provide GPS Satellite Health Information */
1066 static void (*rev_req_type_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
) = {
1067 NULL
, /* Reserved */
1068 NULL
, /* no data */ /* Request BS Capabilities */
1069 rev_req_gps_acq_ass
, /* Request GPS Acquisition Assistance */
1070 rev_req_gps_loc_ass
, /* Request GPS Location Assistance */
1071 NULL
, /* Reserved */
1072 NULL
, /* no data */ /* Request GPS Sensitivity Assistance */
1073 rev_req_bs_alm
, /* Request Base Station Almanac */
1074 NULL
, /* no data */ /* Request GPS Almanac */
1075 rev_req_gps_ephemeris
, /* Request GPS Ephemeris */
1076 rev_req_gps_nav_msg_bits
, /* Request GPS Navigation Message Bits */
1077 rev_req_loc_response
, /* Request Location Response */
1078 rev_req_gps_alm_correction
, /* Request GPS Almanac Correction */
1079 NULL
, /* no data */ /* Request GPS Satellite Health Information */
1083 static void (*rev_rsp_type_fcn
[])(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned len
, uint32_t offset
) = {
1084 rev_reject
, /* Reject */
1085 rev_pr_ms_information
, /* Provide MS Information */
1086 NULL
, /* Provide Autonomous Measurement Weighting Factors */
1087 NULL
, /* Provide Pseudorange Measurement */
1088 NULL
, /* Provide Pilot Phase Measurement */
1089 rev_pr_loc_response
, /* Provide Location Response */
1090 rev_pr_time_off_meas
, /* Provide Time Offset Measurement */
1091 rev_pr_can_ack
, /* Provide Cancellation Acknowledgement */
1096 for_request(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t *offset_p
, uint8_t pd_msg_type
)
1100 const char *str
= NULL
;
1102 proto_tree
*subtree
;
1106 oct
= tvb_get_uint8(tvb
, offset
);
1108 if (pd_msg_type
== 0x00)
1110 proto_tree_add_item(tree
, hf_ansi_801_reserved8_F0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1112 str
= try_val_to_str_idx(oct
& 0x0f, for_req_type_strings
, &idx
);
1118 item
= proto_tree_add_uint_format_value(tree
, hf_ansi_801_for_req_type
, tvb
, offset
, 1,
1119 oct
& 0x0f, "%s (%u)", str
, oct
& 0x0f);
1125 * It is unclear from TIA-801-A how this was meant to be decoded.
1126 * Are the elements supposed to be byte aligned?
1131 subtree
= proto_item_add_subtree(item
, ett_for_req_type
[idx
]);
1134 oct
= tvb_get_uint8(tvb
, offset
);
1136 proto_tree_add_item(subtree
, hf_ansi_801_for_request_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1141 if (for_req_type_fcn
[idx
] != NULL
)
1143 (*for_req_type_fcn
[idx
])(tvb
, pinfo
, subtree
, oct
, offset
);
1147 proto_tree_add_item(subtree
, hf_ansi_801_data
, tvb
, offset
, oct
, ENC_NA
);
1151 *offset_p
= offset
+ oct
;
1155 for_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t *offset_p
)
1159 const char *str
= NULL
;
1161 proto_tree
*subtree
;
1165 oct
= tvb_get_uint8(tvb
, offset
);
1167 proto_tree_add_item(tree
, hf_ansi_801_reserved8_E0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1168 proto_tree_add_item(tree
, hf_ansi_801_unsolicited_response_indicator
, tvb
, offset
, 1, ENC_NA
);
1170 str
= try_val_to_str_idx(oct
& 0x0f, for_rsp_type_strings
, &idx
);
1177 item
= proto_tree_add_uint_format_value(tree
, hf_ansi_801_for_rsp_type
, tvb
, offset
, 1,
1178 oct
& 0x0f, "%s (%u)", str
, oct
& 0x0f);
1179 subtree
= proto_item_add_subtree(item
, ett_for_rsp_type
[idx
]);
1182 oct
= tvb_get_uint8(tvb
, offset
);
1184 proto_tree_add_item(subtree
, hf_ansi_801_for_response_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1188 if (for_rsp_type_fcn
[idx
] != NULL
)
1190 (*for_rsp_type_fcn
[idx
])(tvb
, pinfo
, subtree
, oct
, offset
);
1194 proto_tree_add_item(subtree
, hf_ansi_801_data
, tvb
, offset
, oct
, ENC_NA
);
1197 *offset_p
= offset
+ oct
;
1201 rev_request(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t *offset_p
, uint8_t pd_msg_type
)
1205 const char *str
= NULL
;
1207 proto_tree
*subtree
;
1211 oct
= tvb_get_uint8(tvb
, offset
);
1213 if (pd_msg_type
== 0x00)
1215 proto_tree_add_item(tree
, hf_ansi_801_reserved8_F0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1217 str
= try_val_to_str_idx(oct
& 0x0f, rev_req_type_strings
, &idx
);
1223 item
= proto_tree_add_uint_format_value(tree
, hf_ansi_801_rev_req_type
, tvb
, offset
, 1,
1224 oct
& 0x0f, "%s (%u)", str
, oct
& 0x0f);
1230 * It is unclear from TIA-801-A how this was meant to be decoded.
1231 * Are the elements supposed to be byte aligned?
1236 subtree
= proto_item_add_subtree(item
, ett_rev_req_type
[idx
]);
1239 oct
= tvb_get_uint8(tvb
, offset
);
1241 proto_tree_add_item(subtree
, hf_ansi_801_rev_request_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1245 if (rev_req_type_fcn
[idx
] != NULL
)
1247 (*rev_req_type_fcn
[idx
])(tvb
, pinfo
, subtree
, oct
, offset
);
1251 proto_tree_add_item(subtree
, hf_ansi_801_data
, tvb
, offset
, oct
, ENC_NA
);
1254 *offset_p
= offset
+ oct
;
1258 rev_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t *offset_p
)
1262 const char *str
= NULL
;
1264 proto_tree
*subtree
;
1268 oct
= tvb_get_uint8(tvb
, offset
);
1270 proto_tree_add_item(tree
, hf_ansi_801_reserved8_E0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1271 proto_tree_add_item(tree
, hf_ansi_801_unsolicited_response_indicator
, tvb
, offset
, 1, ENC_NA
);
1273 str
= try_val_to_str_idx(oct
& 0x0f, rev_rsp_type_strings
, &idx
);
1280 item
= proto_tree_add_uint_format_value(tree
, hf_ansi_801_rev_rsp_type
, tvb
, offset
, 1,
1281 oct
& 0x0f, "%s (%u)", str
, oct
& 0x0f);
1282 subtree
= proto_item_add_subtree(item
, ett_rev_rsp_type
[idx
]);
1285 oct
= tvb_get_uint8(tvb
, offset
);
1287 proto_tree_add_item(subtree
, hf_ansi_801_rev_response_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1291 if (rev_rsp_type_fcn
[idx
] != NULL
)
1293 (*rev_rsp_type_fcn
[idx
])(tvb
, pinfo
, subtree
, oct
, offset
);
1297 proto_tree_add_item(subtree
, hf_ansi_801_data
, tvb
, offset
, oct
, ENC_NA
);
1300 *offset_p
= offset
+ oct
;
1304 dissect_ansi_801_for_message(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1308 uint8_t oct
, num_req
, num_rsp
, pd_msg_type
;
1310 const char *str
= NULL
;
1311 proto_item
*hidden_item
;
1315 proto_tree_add_item(tree
, hf_ansi_801_session_start
, tvb
, offset
, 1, ENC_NA
);
1316 proto_tree_add_item(tree
, hf_ansi_801_session_end
, tvb
, offset
, 1, ENC_NA
);
1317 proto_tree_add_item(tree
, hf_ansi_801_session_source
, tvb
, offset
, 1, ENC_NA
);
1318 proto_tree_add_item(tree
, hf_ansi_801_for_sess_tag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1320 hidden_item
= proto_tree_add_item(tree
, hf_ansi_801_sess_tag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1321 proto_item_set_hidden(hidden_item
);
1324 oct
= tvb_get_uint8(tvb
, offset
);
1327 switch (pd_msg_type
)
1329 case 0x00: str
= "Position Determination Data Message"; break;
1330 case 0x01: str
= "Position Determination Data Message"; break;
1331 case 0xff: str
= "Reserved"; break;
1333 if (pd_msg_type
< 0xc0)
1335 str
= "Reserved for future standardization";
1339 str
= "Available for manufacturer-specific Position Determination "
1340 "Data Message definition as specified in TSB-58";
1345 proto_tree_add_uint_format_value(tree
, hf_ansi_801_pd_message_type
, tvb
, offset
, 1, pd_msg_type
,
1346 "%s (%u)", str
, pd_msg_type
);
1350 if ((pd_msg_type
!= 0x00) &&
1351 (pd_msg_type
!= 0x01))
1353 proto_tree_add_item(tree
, hf_ansi_801_proprietary_data
, tvb
, offset
, -1, ENC_NA
);
1357 if (pd_msg_type
== 0x01)
1359 value
= tvb_get_ntohs(tvb
, offset
);
1361 proto_tree_add_item(tree
, hf_ansi_801_pd_message_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1362 proto_tree_add_item(tree
, hf_ansi_801_regulatory_services_indicator
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1364 num_req
= value
& 0x000f;
1366 proto_tree_add_item(tree
, hf_ansi_801_for_message_number_requests16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1369 oct
= tvb_get_uint8(tvb
, offset
);
1370 num_rsp
= oct
& 0xf0;
1372 proto_tree_add_item(tree
, hf_ansi_801_for_message_number_responsesF0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1377 oct
= tvb_get_uint8(tvb
, offset
);
1379 num_req
= (oct
& 0xf0) >> 4;
1380 num_rsp
= oct
& 0x0f;
1382 proto_tree_add_item(tree
, hf_ansi_801_for_message_number_requests8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1383 proto_tree_add_item(tree
, hf_ansi_801_for_message_number_responses0F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1387 rem_len
= tvb_reported_length_remaining(tvb
, offset
);
1389 while ((num_req
> 0) &&
1392 for_request(tvb
, pinfo
, tree
, &offset
, pd_msg_type
);
1394 rem_len
= tvb_reported_length_remaining(tvb
, offset
);
1400 proto_tree_add_expert(tree
, pinfo
, &ei_ansi_801_short_data
, tvb
, offset
, -1);
1404 while ((num_rsp
> 0) &&
1407 for_response(tvb
, pinfo
, tree
, &offset
);
1409 rem_len
= tvb_reported_length_remaining(tvb
, offset
);
1415 proto_tree_add_expert(tree
, pinfo
, &ei_ansi_801_short_data
, tvb
, offset
, -1);
1421 proto_tree_add_expert(tree
, pinfo
, &ei_ansi_801_extraneous_data
, tvb
, offset
, rem_len
);
1426 dissect_ansi_801_rev_message(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1430 uint8_t oct
, num_req
, num_rsp
, pd_msg_type
;
1432 const char *str
= NULL
;
1433 proto_item
*hidden_item
;
1437 proto_tree_add_item(tree
, hf_ansi_801_session_start
, tvb
, offset
, 1, ENC_NA
);
1438 proto_tree_add_item(tree
, hf_ansi_801_session_end
, tvb
, offset
, 1, ENC_NA
);
1439 proto_tree_add_item(tree
, hf_ansi_801_session_source
, tvb
, offset
, 1, ENC_NA
);
1440 proto_tree_add_item(tree
, hf_ansi_801_rev_sess_tag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1442 hidden_item
= proto_tree_add_item(tree
, hf_ansi_801_sess_tag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1443 proto_item_set_hidden(hidden_item
);
1446 oct
= tvb_get_uint8(tvb
, offset
);
1449 switch (pd_msg_type
)
1451 case 0x00: str
= "Position Determination Data Message"; break;
1452 case 0x01: str
= "Position Determination Data Message"; break;
1453 case 0xff: str
= "Reserved"; break;
1455 if (pd_msg_type
< 0xc0)
1457 str
= "Reserved for future standardization";
1461 str
= "Available for manufacturer-specific Position Determination "
1462 "Data Message definition as specified in TSB-58";
1467 proto_tree_add_uint_format_value(tree
, hf_ansi_801_pd_message_type
, tvb
, offset
, 1, pd_msg_type
,
1468 "%s (%u)", str
, pd_msg_type
);
1471 if ((pd_msg_type
!= 0x00) &&
1472 (pd_msg_type
!= 0x01))
1474 proto_tree_add_item(tree
, hf_ansi_801_proprietary_data
, tvb
, offset
, -1, ENC_NA
);
1478 if (pd_msg_type
== 0x01)
1480 value
= tvb_get_ntohs(tvb
, offset
);
1482 proto_tree_add_item(tree
, hf_ansi_801_pd_message_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1483 proto_tree_add_item(tree
, hf_ansi_801_regulatory_services_indicator
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1485 num_req
= value
& 0x000f;
1487 proto_tree_add_item(tree
, hf_ansi_801_rev_message_number_requests16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1490 oct
= tvb_get_uint8(tvb
, offset
);
1491 num_rsp
= oct
& 0xf0;
1493 proto_tree_add_item(tree
, hf_ansi_801_rev_message_number_responsesF0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1498 oct
= tvb_get_uint8(tvb
, offset
);
1500 num_req
= (oct
& 0xf0) >> 4;
1501 num_rsp
= oct
& 0x0f;
1503 proto_tree_add_item(tree
, hf_ansi_801_rev_message_number_requests8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1504 proto_tree_add_item(tree
, hf_ansi_801_rev_message_number_responses0F
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1508 rem_len
= tvb_reported_length_remaining(tvb
, offset
);
1510 while ((num_req
> 0) &&
1513 rev_request(tvb
, pinfo
, tree
, &offset
, pd_msg_type
);
1515 rem_len
= tvb_reported_length_remaining(tvb
, offset
);
1521 proto_tree_add_expert(tree
, pinfo
, &ei_ansi_801_short_data
, tvb
, offset
, -1);
1525 while ((num_rsp
> 0) &&
1528 rev_response(tvb
, pinfo
, tree
, &offset
);
1530 rem_len
= tvb_reported_length_remaining(tvb
, offset
);
1536 proto_tree_add_expert(tree
, pinfo
, &ei_ansi_801_short_data
, tvb
, offset
, -1);
1542 proto_tree_add_expert(tree
, pinfo
, &ei_ansi_801_extraneous_data
, tvb
, offset
, rem_len
);
1547 dissect_ansi_801(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1549 proto_item
*ansi_801_item
;
1550 proto_tree
*ansi_801_tree
= NULL
;
1552 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, ansi_proto_name_short
);
1554 /* In the interest of speed, if "tree" is NULL, don't do any work not
1555 * necessary to generate protocol tree items.
1560 * create the ansi_801 protocol tree
1563 proto_tree_add_protocol_format(tree
, proto_ansi_801
, tvb
, 0, -1,
1566 (pinfo
->match_uint
== ANSI_801_FORWARD
) ? "Forward" : "Reverse");
1569 proto_item_add_subtree(ansi_801_item
, ett_ansi_801
);
1571 if (pinfo
->match_uint
== ANSI_801_FORWARD
)
1573 dissect_ansi_801_for_message(tvb
, pinfo
, ansi_801_tree
);
1577 dissect_ansi_801_rev_message(tvb
, pinfo
, ansi_801_tree
);
1580 return tvb_captured_length(tvb
);
1584 /* Register the protocol with Wireshark */
1586 proto_register_ansi_801(void)
1591 /* Setup list of header fields */
1592 static hf_register_info hf
[] = {
1593 { &hf_ansi_801_for_req_type
,
1594 { "Forward Request Type", "ansi_801.for_req_type",
1595 FT_UINT8
, BASE_DEC
, NULL
, 0,
1598 { &hf_ansi_801_for_rsp_type
,
1599 { "Forward Response Type", "ansi_801.for_rsp_type",
1600 FT_UINT8
, BASE_DEC
, NULL
, 0,
1603 { &hf_ansi_801_rev_req_type
,
1604 { "Reverse Request Type", "ansi_801.rev_req_type",
1605 FT_UINT8
, BASE_DEC
, NULL
, 0,
1608 { &hf_ansi_801_rev_rsp_type
,
1609 { "Reverse Response Type", "ansi_801.rev_rsp_type",
1610 FT_UINT8
, BASE_DEC
, NULL
, 0,
1613 { &hf_ansi_801_for_sess_tag
,
1614 { "Forward Session Tag", "ansi_801.for_sess_tag",
1615 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
1618 { &hf_ansi_801_rev_sess_tag
,
1619 { "Reverse Session Tag", "ansi_801.rev_sess_tag",
1620 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
1623 { &hf_ansi_801_sess_tag
,
1624 { "Session Tag", "ansi_801.sess_tag",
1625 FT_UINT8
, BASE_DEC
, NULL
, 0x1f,
1628 { &hf_ansi_801_time_ref_cdma
,
1629 { "CDMA system time at the time the solution is valid (TIME_REF_CDMA)", "ansi_801.time_ref_cdma",
1630 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1634 { "Latitude (LAT)", "ansi_801.lat",
1635 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
1638 { &hf_ansi_801_long
,
1639 { "Longitude (LONG)", "ansi_801.long",
1640 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
1643 { &hf_ansi_801_loc_uncrtnty_ang
,
1644 { "Angle of axis with respect to True North for pos uncertainty (LOC_UNCRTNTY_ANG)", "ansi_801.loc_uncrtnty_ang",
1645 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
1648 { &hf_ansi_801_loc_uncrtnty_a
,
1649 { "Std dev of axis along angle specified for pos uncertainty (LOC_UNCRTNTY_A)", "ansi_801.loc_uncrtnty_a",
1650 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1653 { &hf_ansi_801_loc_uncrtnty_p
,
1654 { "Std dev of axis perpendicular to angle specified for pos uncertainty (LOC_UNCRTNTY_P)", "ansi_801.loc_uncrtnty_p",
1655 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1658 { &hf_ansi_801_fix_type
,
1659 { "Fix type (FIX_TYPE)", "ansi_801.fix_type",
1660 FT_BOOLEAN
, BASE_NONE
, TFS(&ansi_801_fix_type_vals
), 0x00,
1663 { &hf_ansi_801_velocity_incl
,
1664 { "Velocity information included (VELOCITY_INCL)", "ansi_801.velocity_incl",
1665 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1668 { &hf_ansi_801_velocity_hor
,
1669 { "Horizontal velocity magnitude (VELOCITY_HOR)", "ansi_801.velocity_hor",
1670 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
1673 { &hf_ansi_801_heading
,
1674 { "Heading (HEADING)", "ansi_801.heading",
1675 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
1678 { &hf_ansi_801_velocity_ver
,
1679 { "Vertical velocity (VELOCITY_VER)", "ansi_801.velocity_ver",
1680 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
1683 { &hf_ansi_801_clock_incl
,
1684 { "Clock information included (CLOCK_INCL)", "ansi_801.clock_incl",
1685 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1688 { &hf_ansi_801_clock_bias
,
1689 { "Clock bias (CLOCK_BIAS)", "ansi_801.clock_bias",
1690 FT_INT24
, BASE_DEC
, NULL
, 0x00,
1693 { &hf_ansi_801_clock_drift
,
1694 { "Clock drift (CLOCK_DRIFT)", "ansi_801.clock_drift",
1695 FT_INT16
, BASE_DEC
, NULL
, 0x00,
1698 { &hf_ansi_801_height_incl
,
1699 { "Height information included (HEIGHT_INCL)", "ansi_801.height_incl",
1700 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1703 { &hf_ansi_801_height
,
1704 { "Height (HEIGHT)", "ansi_801.height",
1705 FT_INT16
, BASE_DEC
, NULL
, 0x00,
1708 { &hf_ansi_801_loc_uncrtnty_v
,
1709 { "Std dev of vertical error for pos uncertainty (LOC_UNCRTNTY_V)", "ansi_801.loc_uncrtnty_v",
1710 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1713 { &hf_ansi_801_reserved_bits
,
1714 { "Reserved bit(s)","ansi_801.reserved_bits",
1715 FT_UINT8
,BASE_DEC
, NULL
, 0x0,
1718 { &hf_ansi_801_bad_sv_present
,
1719 { "Bad GPS satellites present (BAD_SV_PRESENT)", "ansi_801.bad_sv_present",
1720 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1723 { &hf_ansi_801_num_bad_sv
,
1724 { "Number of bad GPS satellites (NUM_BAD_SV)", "ansi_801.num_bad_sv",
1725 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1728 { &hf_ansi_801_bad_sv_prn_num
,
1729 { "Satellite PRN number (SV_PRN_NUM)", "ansi_801.bad_sv_prn_num",
1730 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1733 { &hf_ansi_801_dopp_req
,
1734 { "Doppler (0th order) term requested (DOPP_REQ)", "ansi_801.dopp_req",
1735 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1738 { &hf_ansi_801_add_dopp_req
,
1739 { "Additional Doppler terms requested (ADD_DOPP_REQ)", "ansi_801.add_dopp_req",
1740 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1743 { &hf_ansi_801_code_ph_par_req
,
1744 { "Code phase parameters requested (CODE_PH_PAR_REQ)", "ansi_801.code_ph_par_req",
1745 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1748 { &hf_ansi_801_az_el_req
,
1749 { "Azimuth and elevation angle requested (AZ_EL_REQ)", "ansi_801.az_el_req",
1750 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00,
1753 { &hf_ansi_801_pref_resp_qual
,
1754 { "Preferred response quality (PREF_RESP_QUAL)", "ansi_801.pref_resp_qual",
1755 FT_UINT24
, BASE_DEC
, NULL
, 0xe00000,
1758 { &hf_ansi_801_num_fixes
,
1759 { "Number of fixes (NUM_FIXES)", "ansi_801.num_fixes",
1760 FT_UINT24
, BASE_DEC
, NULL
, 0x1fe000,
1763 { &hf_ansi_801_t_betw_fixes
,
1764 { "Time between fixes (T_BETW_FIXES) (in seconds)", "ansi_801.t_betw_fixes",
1765 FT_UINT24
, BASE_DEC
, NULL
, 0x001fe0,
1768 { &hf_ansi_801_offset_req
,
1769 { "Offset requested (OFFSET_REQ)", "ansi_801.offset_req",
1770 FT_BOOLEAN
, 24, TFS(&tfs_requested_not_requested
), 0x000010,
1774 /* Generated from convert_proto_tree_add_text.pl */
1775 { &hf_ansi_801_desired_pilot_phase_resolution
,
1776 { "Desired pilot phase resolution", "ansi_801.desired_pilot_phase_resolution",
1777 FT_BOOLEAN
, 24, TFS(&tfs_desired_pilot_phase_resolution
), 0x000008,
1780 { &hf_ansi_801_reserved_24_7
,
1781 { "Reserved", "ansi_801.reserved",
1782 FT_UINT24
, BASE_HEX
, NULL
, 0x07,
1785 { &hf_ansi_801_for_req_loc_height_information
,
1786 { "Height information", "ansi_801.height_incl",
1787 FT_BOOLEAN
, 24, TFS(&tfs_requested_not_requested
), 0x000010,
1790 { &hf_ansi_801_for_req_loc_clock_correction_for_gps_time
,
1791 { "Clock correction for GPS time", "ansi_801.clock_correction_for_gps_time",
1792 FT_BOOLEAN
, 24, TFS(&tfs_requested_not_requested
), 0x000008,
1795 { &hf_ansi_801_for_req_loc_velocity_information
,
1796 { "Velocity information", "ansi_801.velocity_information",
1797 FT_BOOLEAN
, 24, TFS(&tfs_requested_not_requested
), 0x000004,
1800 { &hf_ansi_801_reserved24_3
,
1801 { "Reserved", "ansi_801.reserved",
1802 FT_UINT24
, BASE_HEX
, NULL
, 0x000003,
1805 { &hf_ansi_801_use_action_time_indicator
,
1806 { "Use action time indicator", "ansi_801.use_action_time_indicator",
1807 FT_BOOLEAN
, 8, NULL
, 0x80,
1810 { &hf_ansi_801_action_time
,
1811 { "Action time", "ansi_801.action_time",
1812 FT_UINT8
, BASE_DEC
, NULL
, 0x7E,
1815 { &hf_ansi_801_reserved8_7F
,
1816 { "Reserved", "ansi_801.reserved",
1817 FT_UINT8
, BASE_HEX
, NULL
, 0x7F,
1820 { &hf_ansi_801_cancellation_type
,
1821 { "Cancellation Type", "ansi_801.cancellation_type",
1822 FT_UINT8
, BASE_DEC
, VALS(for_req_type_strings
), 0xF0,
1825 { &hf_ansi_801_reserved8_0F
,
1826 { "Reserved", "ansi_801.reserved",
1827 FT_UINT8
, BASE_HEX
, NULL
, 0x0F,
1830 { &hf_ansi_801_reject_request_type
,
1831 { "Reject request type", "ansi_801.reject_request_type",
1832 FT_UINT8
, BASE_DEC
, VALS(rev_req_type_strings
), 0xF0,
1835 { &hf_ansi_801_reject_reason
,
1836 { "Reject reason", "ansi_801.reject_reason",
1837 FT_UINT8
, BASE_DEC
, NULL
, 0x0E,
1840 { &hf_ansi_801_reserved8_01
,
1841 { "Reserved", "ansi_801.reserved",
1842 FT_UINT8
, BASE_HEX
, NULL
, 0x01,
1845 { &hf_ansi_801_bs_ls_rev
,
1846 { "BS_LS_REV", "ansi_801.bs_ls_rev",
1847 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
1850 { &hf_ansi_801_gps_capability_indicator
,
1851 { "GPSC_ID: GPS capability indicator", "ansi_801.gps_capability_indicator",
1852 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
1855 { &hf_ansi_801_afltc_id
,
1856 { "AFLTC_ID: Advanced forward link trilateration capability indicator", "ansi_801.afltc_id",
1857 FT_UINT8
, BASE_DEC
, NULL
, 0x01,
1860 { &hf_ansi_801_apdc_id
,
1861 { "APDC_ID: Autonomous position determination capability indicator: Autonomous Location Technology Identifier", "ansi_801.apdc_id",
1862 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1865 { &hf_ansi_801_ref_bit_num
,
1866 { "REF_BIT_NUM", "ansi_801.ref_bit_num",
1867 FT_UINT16
, BASE_DEC
, NULL
, 0xffe0,
1870 { &hf_ansi_801_num_dr_p
,
1871 { "NUM_DR_P: Number of data records in this part", "ansi_801.num_dr_p",
1872 FT_UINT16
, BASE_DEC
, NULL
, 0x001e,
1875 { &hf_ansi_801_dr_size
,
1876 { "DR_SIZE: Data record size", "ansi_801.dr_size",
1877 FT_UINT24
, BASE_DEC
, NULL
, 0x0001FE,
1880 { &hf_ansi_801_part_num
,
1881 { "PART_NUM: The part number", "ansi_801.part_num",
1882 FT_UINT16
, BASE_DEC
, NULL
, 0x01c0,
1885 { &hf_ansi_801_total_parts
,
1886 { "TOTAL_PARTS: Total number of parts", "ansi_801.total_parts",
1887 FT_UINT16
, BASE_DEC
, NULL
, 0x38,
1890 { &hf_ansi_801_data_records
,
1891 { "Data records", "ansi_801.data_records",
1892 FT_UINT16
, BASE_DEC
, NULL
, 0x07,
1895 { &hf_ansi_801_num_sv_p32
,
1896 { "NUM_SV_P: Number of satellites in this part", "ansi_801.num_sv_p",
1897 FT_UINT32
, BASE_DEC
, NULL
, 0xfc000000,
1900 { &hf_ansi_801_week_num
,
1901 { "WEEK_NUM: The GPS week number of the almanac", "ansi_801.week_num",
1902 FT_UINT32
, BASE_DEC
, NULL
, 0x03fc0000,
1906 { "TOA: The reference time of the almanac", "ansi_801.toa",
1907 FT_UINT32
, BASE_DEC
, NULL
, 0x0003fc00,
1910 { &hf_ansi_801_part_num32
,
1911 { "PART_NUM: The part number", "ansi_801.part_num",
1912 FT_UINT32
, BASE_DEC
, NULL
, 0x000003e0,
1915 { &hf_ansi_801_total_parts32
,
1916 { "TOTAL_PARTS: The total number of parts", "ansi_801.total_parts",
1917 FT_UINT32
, BASE_DEC
, NULL
, 0x0000001f,
1920 { &hf_ansi_801_num_sv_p16
,
1921 { "NUM_SV_P: Number of satellites in this part", "ansi_801.num_sv_p",
1922 FT_UINT16
, BASE_DEC
, NULL
, 0xfc00,
1925 { &hf_ansi_801_part_num16
,
1926 { "PART_NUM: The part number", "ansi_801.part_num",
1927 FT_UINT16
, BASE_DEC
, NULL
, 0x03e0,
1930 { &hf_ansi_801_total_parts16
,
1931 { "TOTAL_PARTS: The total number of parts", "ansi_801.total_parts",
1932 FT_UINT16
, BASE_DEC
, NULL
, 0x001f,
1935 { &hf_ansi_801_coordinate_type_requested
,
1936 { "Coordinate type requested", "ansi_801.coordinate_type_requested",
1937 FT_BOOLEAN
, 8, TFS(&tfs_spherical_cartesian
), 0x80,
1940 { &hf_ansi_801_extended_base_station_almanac
,
1941 { "Extended base station almanac", "ansi_801.extended_base_station_almanac",
1942 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x80,
1945 { &hf_ansi_801_alpha_and_beta_parameters
,
1946 { "Alpha and Beta parameters", "ansi_801.alpha_and_beta_parameters",
1947 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x80,
1950 { &hf_ansi_801_subframes_4_and_5
,
1951 { "Subframes 4 and 5", "ansi_801.subframes_4_and_5",
1952 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x80,
1955 { &hf_ansi_801_rev_req_loc_height_information
,
1956 { "Height information", "ansi_801.height_information",
1957 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x80,
1960 { &hf_ansi_801_rev_req_loc_clock_correction_for_gps_time
,
1961 { "Clock correction for GPS time", "ansi_801.clock_correction_for_gps_time",
1962 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x40,
1965 { &hf_ansi_801_rev_req_loc_velocity_information
,
1966 { "Velocity information", "ansi_801.velocity_information",
1967 FT_BOOLEAN
, 8, TFS(&tfs_requested_not_requested
), 0x20,
1970 { &hf_ansi_801_reserved8_1F
,
1971 { "Reserved", "ansi_801.reserved",
1972 FT_UINT8
, BASE_HEX
, NULL
, 0x1F,
1975 { &hf_ansi_801_ms_ls_rev
,
1976 { "MS_LS_REV", "ansi_801.ms_ls_rev",
1977 FT_UINT16
, BASE_DEC
, NULL
, 0xfc00,
1980 { &hf_ansi_801_ms_mode
,
1981 { "MS_MODE", "ansi_801.ms_mode",
1982 FT_UINT16
, BASE_DEC
, NULL
, 0x03c0,
1985 { &hf_ansi_801_pilot_ph_cap
,
1986 { "PILOT_PH_CAP", "ansi_801.pilot_ph_cap",
1987 FT_UINT16
, BASE_DEC
, NULL
, 0x003f,
1990 { &hf_ansi_801_gps_acq_cap
,
1991 { "GPS_ACQ_CAP", "ansi_801.gps_acq_cap",
1992 FT_UINT24
, BASE_HEX
, NULL
, 0x000FFF,
1995 { &hf_ansi_801_reserved_24_F80000
,
1996 { "Reserved", "ansi_801.reserved",
1997 FT_UINT24
, BASE_HEX
, NULL
, 0xf80000,
2000 { &hf_ansi_801_gps_autonomous_acquisition_capable
,
2001 { "GPS Autonomous Acquisition Capable", "ansi_801.gps_autonomous_acquisition_capable",
2002 FT_BOOLEAN
, 24, NULL
, 0x040000,
2005 { &hf_ansi_801_gps_almanac_correction
,
2006 { "GPS Almanac Correction", "ansi_801.gps_almanac_correction",
2007 FT_BOOLEAN
, 24, NULL
, 0x020000,
2010 { &hf_ansi_801_gps_navigation_message_bits
,
2011 { "GPS Navigation Message Bits", "ansi_801.gps_navigation_message_bits",
2012 FT_BOOLEAN
, 24, NULL
, 0x010000,
2015 { &hf_ansi_801_gps_ephemeris
,
2016 { "GPS Ephemeris", "ansi_801.gps_ephemeris",
2017 FT_BOOLEAN
, 24, NULL
, 0x008000,
2020 { &hf_ansi_801_gps_almanac
,
2021 { "GPS Almanac", "ansi_801.gps_almanac",
2022 FT_BOOLEAN
, 24, NULL
, 0x004000,
2025 { &hf_ansi_801_gps_sensitivity_assistance
,
2026 { "GPS Sensitivity Assistance", "ansi_801.gps_sensitivity_assistance",
2027 FT_BOOLEAN
, 24, NULL
, 0x002000,
2030 { &hf_ansi_801_gps_acquisition_assistance
,
2031 { "GPS Acquisition Assistance", "ansi_801.gps_acquisition_assistance",
2032 FT_BOOLEAN
, 24, NULL
, 0x001000,
2035 { &hf_ansi_801_loc_calc_cap
,
2036 { "LOC_CALC_CAP", "ansi_801.loc_calc_cap",
2037 FT_UINT24
, BASE_HEX
, NULL
, 0x000FFF,
2040 { &hf_ansi_801_pre_programmed_location
,
2041 { "Pre-programmed Location", "ansi_801.pre_programmed_location",
2042 FT_BOOLEAN
, 24, NULL
, 0x000800,
2045 { &hf_ansi_801_reserved_24_700
,
2046 { "Reserved", "ansi_801.reserved",
2047 FT_UINT24
, BASE_HEX
, NULL
, 0x000700,
2050 { &hf_ansi_801_hybrid_gps_and_aflt_lcc
,
2051 { "Hybrid GPS and AFLT Location Calculation Capable", "ansi_801.hybrid_gps_and_aflt_lcc",
2052 FT_BOOLEAN
, 24, NULL
, 0x000080,
2055 { &hf_ansi_801_autonomous_location_calculation_capable
,
2056 { "Autonomous Location Calculation Capable", "ansi_801.autonomous_lcc",
2057 FT_BOOLEAN
, 24, NULL
, 0x000040,
2060 { &hf_ansi_801_lcc_using_gps_almanac_correction
,
2061 { "Location Calculation Capable using GPS Almanac Correction", "ansi_801.lcc_using_gps_almanac_correction",
2062 FT_BOOLEAN
, 24, NULL
, 0x000020,
2065 { &hf_ansi_801_lcc_using_gps_ephemeris_assistance
,
2066 { "Location Calculation Capable using GPS Ephemeris Assistance", "ansi_801.lcc_using_gps_ephemeris_assistance",
2067 FT_BOOLEAN
, 24, NULL
, 0x000010,
2070 { &hf_ansi_801_lcc_using_gps_almanac_assistance
,
2071 { "Location Calculation Capable using GPS Almanac Assistance", "ansi_801.lcc_using_gps_almanac_assistance",
2072 FT_BOOLEAN
, 24, NULL
, 0x000008,
2075 { &hf_ansi_801_aflt_lcc
,
2076 { "Advanced Forward Link Trilateration (AFLT) Location Calculation Capable", "ansi_801.aflt_lcc",
2077 FT_BOOLEAN
, 24, NULL
, 0x000004,
2080 { &hf_ansi_801_lcc_using_location_assistance_cartesian
,
2081 { "Location Calculation Capable using Location Assistance - Cartesian", "ansi_801.lcc_using_location_assistance.cartesian",
2082 FT_BOOLEAN
, 24, NULL
, 0x000002,
2085 { &hf_ansi_801_lcc_capable_using_location_assistance_spherical
,
2086 { "Location Calculation Capable using Location Assistance - Spherical", "ansi_801.lcc_using_location_assistance.spherical",
2087 FT_BOOLEAN
, 24, NULL
, 0x000001,
2090 { &hf_ansi_801_ref_pn
,
2091 { "REF_PN", "ansi_801.ref_pn",
2092 FT_UINT24
, BASE_DEC
, NULL
, 0xff8000,
2095 { &hf_ansi_801_mob_sys_t_offset
,
2096 { "MOB_SYS_T_OFFSET", "ansi_801.mob_sys_t_offset",
2097 FT_UINT24
, BASE_DEC
, NULL
, 0x007ffe,
2100 { &hf_ansi_801_reserved24_1
,
2101 { "Reserved", "ansi_801.reserved",
2102 FT_UINT24
, BASE_HEX
, NULL
, 0x000001,
2105 { &hf_ansi_801_no_outstanding_request_element
,
2106 { "No outstanding request element", "ansi_801.no_outstanding_request_element",
2107 FT_BOOLEAN
, 8, NULL
, 0x08,
2110 { &hf_ansi_801_reserved8_07
,
2111 { "Reserved", "ansi_801.reserved",
2112 FT_UINT8
, BASE_HEX
, NULL
, 0x07,
2115 { &hf_ansi_801_reserved8_F0
,
2116 { "Reserved", "ansi_801.reserved",
2117 FT_UINT8
, BASE_HEX
, NULL
, 0xF0,
2120 { &hf_ansi_801_for_request_length
,
2121 { "Length", "ansi_801.for_request_length",
2122 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2125 { &hf_ansi_801_reserved8_E0
,
2126 { "Reserved", "ansi_801.reserved",
2127 FT_UINT8
, BASE_HEX
, NULL
, 0xE0,
2130 { &hf_ansi_801_unsolicited_response_indicator
,
2131 { "Unsolicited response indicator", "ansi_801.unsolicited_response_indicator",
2132 FT_BOOLEAN
, 8, NULL
, 0x10,
2135 { &hf_ansi_801_for_response_length
,
2136 { "Length", "ansi_801.for_response_length",
2137 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2140 { &hf_ansi_801_rev_request_length
,
2141 { "Length", "ansi_801.rev_request_length",
2142 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2145 { &hf_ansi_801_rev_response_length
,
2146 { "Length", "ansi_801.rev_response_length",
2147 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2150 { &hf_ansi_801_session_start
,
2151 { "Session Start", "ansi_801.session_start",
2152 FT_BOOLEAN
, 8, NULL
, 0x80,
2155 { &hf_ansi_801_session_end
,
2156 { "Session End", "ansi_801.session_end",
2157 FT_BOOLEAN
, 8, NULL
, 0x40,
2160 { &hf_ansi_801_session_source
,
2161 { "Session Source", "ansi_801.session_source",
2162 FT_BOOLEAN
, 8, NULL
, 0x20,
2165 { &hf_ansi_801_pd_message_type
,
2166 { "PD Message Type", "ansi_801.pd_message_type",
2167 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2170 { &hf_ansi_801_pd_message_len
,
2171 { "PD Message Length", "ansi_801.pd_message_len",
2172 FT_UINT16
, BASE_DEC
, NULL
, 0xffc0,
2175 { &hf_ansi_801_regulatory_services_indicator
,
2176 { "Regulatory Services Indicator", "ansi_801.regulatory_services_indicator",
2177 FT_UINT16
, BASE_DEC
, VALS(regulatory_services_indicator_vals
), 0x0030,
2180 { &hf_ansi_801_for_message_number_requests16
,
2181 { "Number Requests", "ansi_801.for_message_number_requests",
2182 FT_UINT16
, BASE_DEC
, NULL
, 0x0F,
2185 { &hf_ansi_801_for_message_number_responsesF0
,
2186 { "Number Responses", "ansi_801.for_message_number_responses",
2187 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2190 { &hf_ansi_801_for_message_number_requests8
,
2191 { "Number Requests", "ansi_801.for_message_number_requests",
2192 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2195 { &hf_ansi_801_for_message_number_responses0F
,
2196 { "Number Responses", "ansi_801.for_message_number_responses",
2197 FT_UINT8
, BASE_DEC
, NULL
, 0x0F,
2200 { &hf_ansi_801_rev_message_number_requests16
,
2201 { "Number Requests", "ansi_801.rev_message_number_requests",
2202 FT_UINT16
, BASE_DEC
, NULL
, 0x0F,
2205 { &hf_ansi_801_rev_message_number_responsesF0
,
2206 { "Number Responses", "ansi_801.rev_message_number_responses",
2207 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2210 { &hf_ansi_801_rev_message_number_requests8
,
2211 { "Number Requests", "ansi_801.rev_message_number_requests",
2212 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
2215 { &hf_ansi_801_rev_message_number_responses0F
,
2216 { "Number Responses", "ansi_801.rev_message_number_responses",
2217 FT_UINT8
, BASE_DEC
, NULL
, 0x0F,
2220 { &hf_ansi_801_data
,
2221 { "Data", "ansi_801.data",
2222 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2225 { &hf_ansi_801_proprietary_data
,
2226 { "Reserved/Proprietary/Future Data", "ansi_801.proprietary_data",
2227 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2230 { &hf_ansi_801_time_ref_ms
,
2231 { "TIME_REF_MS", "ansi_801.time_ref_ms",
2232 FT_UINT24
, BASE_DEC
, NULL
, 0x0,
2235 { &hf_ansi_801_time_of_almanac
,
2236 { "Time of almanac", "ansi_801.time_of_almanac",
2237 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_time_of_almanac
), 0x0,
2240 { &hf_ansi_801_gps_week_number
,
2241 { "GPS week number", "ansi_801.gps_week_number",
2242 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_gps_week_number
), 0x0,
2247 /* Setup protocol subtree array */
2248 #define NUM_INDIVIDUAL_PARAMS 3
2249 int *ett
[NUM_INDIVIDUAL_PARAMS
+NUM_FOR_REQ_TYPE
+NUM_FOR_RSP_TYPE
+NUM_REV_REQ_TYPE
+NUM_REV_RSP_TYPE
];
2252 static ei_register_info ei
[] = {
2253 { &ei_ansi_801_extraneous_data
, { "ansi_801.extraneous_data", PI_PROTOCOL
, PI_NOTE
, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL
}},
2254 { &ei_ansi_801_short_data
, { "ansi_801.short_data", PI_PROTOCOL
, PI_NOTE
, "Short Data (?) - try checking decoder variant preference or dissector bug/later version spec (report to wireshark.org)", EXPFILL
}},
2255 { &ei_ansi_801_unexpected_length
, { "ansi_801.unexpected_length", PI_PROTOCOL
, PI_WARN
, "Unexpected Data Length - try checking decoder variant preference or dissector bug/later version spec (report to wireshark.org)", EXPFILL
}},
2258 expert_module_t
* expert_ansi_801
;
2260 ett
[0] = &ett_ansi_801
;
2264 last_offset
= NUM_INDIVIDUAL_PARAMS
;
2266 for (i
=0; i
< NUM_FOR_REQ_TYPE
; i
++, last_offset
++)
2268 ett
[last_offset
] = &ett_for_req_type
[i
];
2271 for (i
=0; i
< NUM_FOR_RSP_TYPE
; i
++, last_offset
++)
2273 ett
[last_offset
] = &ett_for_rsp_type
[i
];
2276 for (i
=0; i
< NUM_REV_REQ_TYPE
; i
++, last_offset
++)
2278 ett
[last_offset
] = &ett_rev_req_type
[i
];
2281 for (i
=0; i
< NUM_REV_RSP_TYPE
; i
++, last_offset
++)
2283 ett
[last_offset
] = &ett_rev_rsp_type
[i
];
2286 /* Register the protocol name and description */
2288 proto_register_protocol(ansi_proto_name
, "ANSI IS-801 (Location Services (PLD))", "ansi_801");
2290 /* Required function calls to register the header fields and subtrees used */
2291 proto_register_field_array(proto_ansi_801
, hf
, array_length(hf
));
2292 proto_register_subtree_array(ett
, array_length(ett
));
2293 expert_ansi_801
= expert_register_protocol(proto_ansi_801
);
2294 expert_register_field_array(expert_ansi_801
, ei
, array_length(ei
));
2296 /* subdissector code */
2297 ansi_801_handle
= register_dissector("ansi_801", dissect_ansi_801
, proto_ansi_801
);
2302 proto_reg_handoff_ansi_801(void)
2304 dissector_add_uint("ansi_map.pld", ANSI_801_FORWARD
, ansi_801_handle
);
2305 dissector_add_uint("ansi_map.pld", ANSI_801_REVERSE
, ansi_801_handle
);
2306 dissector_add_uint("ansi_a.pld", ANSI_801_FORWARD
, ansi_801_handle
);
2307 dissector_add_uint("ansi_a.pld", ANSI_801_REVERSE
, ansi_801_handle
);
2311 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2316 * indent-tabs-mode: t
2319 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
2320 * :indentSize=8:tabSize=8:noTabs=false: