2 * Routines for MBIM dissection
3 * Copyright 2013, Pascal Quantin <pascal.quantin@gmail.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 /* Dissector based on MBIM specification 1.0 Errata-1
27 * http://www.usb.org/developers/devclass_docs/MBIM10Errata1_073013.zip
28 * http://compliance.usb.org/mbim/
33 #include <epan/packet.h>
34 #include <epan/expert.h>
35 #include <epan/asn1.h>
36 #include <epan/wmem/wmem.h>
37 #include <epan/conversation.h>
38 #include <epan/prefs.h>
39 #include <epan/reassemble.h>
41 #include "packet-gsm_a_common.h"
42 #include "packet-gsm_map.h"
43 #include "packet-gsm_sms.h"
44 #include "packet-usb.h"
46 void proto_reg_handoff_mbim(void);
48 /* Initialize the protocol and registered fields */
49 static int proto_mbim
= -1;
50 static int hf_mbim_control
= -1;
51 static int hf_mbim_header_message_type
= -1;
52 static int hf_mbim_header_message_length
= -1;
53 static int hf_mbim_header_transaction_id
= -1;
54 static int hf_mbim_fragment_total
= -1;
55 static int hf_mbim_fragment_current
= -1;
56 static int hf_mbim_max_ctrl_transfer
= -1;
57 static int hf_mbim_device_service_id
= -1;
58 static int hf_mbim_uuid_basic_connect_cid
= -1;
59 static int hf_mbim_uuid_sms_cid
= -1;
60 static int hf_mbim_uuid_ussd_cid
= -1;
61 static int hf_mbim_uuid_phonebook_cid
= -1;
62 static int hf_mbim_uuid_stk_cid
= -1;
63 static int hf_mbim_uuid_auth_cid
= -1;
64 static int hf_mbim_uuid_dss_cid
= -1;
65 static int hf_mbim_uuid_multicarrier_cid
= -1;
66 static int hf_mbim_uuid_ms_hostshutdown_cid
= -1;
67 static int hf_mbim_uuid_msfwid_cid
= -1;
68 static int hf_mbim_cid
= -1;
69 static int hf_mbim_command_type
= -1;
70 static int hf_mbim_info_buffer_len
= -1;
71 static int hf_mbim_info_buffer
= -1;
72 static int hf_mbim_error_status_code
= -1;
73 static int hf_mbim_status
= -1;
74 static int hf_mbim_device_caps_info_device_type
= -1;
75 static int hf_mbim_device_caps_info_cellular_class
= -1;
76 static int hf_mbim_device_caps_info_voice_class
= -1;
77 static int hf_mbim_device_caps_info_sim_class
= -1;
78 static int hf_mbim_device_caps_info_sim_class_logical
= -1;
79 static int hf_mbim_device_caps_info_sim_class_removable
= -1;
80 static int hf_mbim_device_caps_info_data_class
= -1;
81 static int hf_mbim_data_class_gprs
= -1;
82 static int hf_mbim_data_class_edge
= -1;
83 static int hf_mbim_data_class_umts
= -1;
84 static int hf_mbim_data_class_hsdpa
= -1;
85 static int hf_mbim_data_class_hsupa
= -1;
86 static int hf_mbim_data_class_lte
= -1;
87 static int hf_mbim_data_class_reserved_gsm
= -1;
88 static int hf_mbim_data_class_1xrtt
= -1;
89 static int hf_mbim_data_class_1xevdo
= -1;
90 static int hf_mbim_data_class_1xevdoreva
= -1;
91 static int hf_mbim_data_class_1xevdv
= -1;
92 static int hf_mbim_data_class_3xrtt
= -1;
93 static int hf_mbim_data_class_1xevdorevb
= -1;
94 static int hf_mbim_data_class_umb
= -1;
95 static int hf_mbim_data_class_reserved_cdma
= -1;
96 static int hf_mbim_data_class_custom
= -1;
97 static int hf_mbim_device_caps_info_sms_caps
= -1;
98 static int hf_mbim_device_caps_info_sms_caps_pdu_receive
= -1;
99 static int hf_mbim_device_caps_info_sms_caps_pdu_send
= -1;
100 static int hf_mbim_device_caps_info_sms_caps_text_receive
= -1;
101 static int hf_mbim_device_caps_info_sms_caps_text_send
= -1;
102 static int hf_mbim_device_caps_info_control_caps
= -1;
103 static int hf_mbim_device_caps_info_control_caps_reg_manual
= -1;
104 static int hf_mbim_device_caps_info_control_caps_hw_radio_switch
= -1;
105 static int hf_mbim_device_caps_info_control_caps_cdma_mobile_ip
= -1;
106 static int hf_mbim_device_caps_info_control_caps_cdma_simple_ip
= -1;
107 static int hf_mbim_device_caps_info_control_caps_multi_carrier
= -1;
108 static int hf_mbim_device_caps_info_max_sessions
= -1;
109 static int hf_mbim_device_caps_info_custom_data_class_offset
= -1;
110 static int hf_mbim_device_caps_info_custom_data_class_size
= -1;
111 static int hf_mbim_device_caps_info_device_id_offset
= -1;
112 static int hf_mbim_device_caps_info_device_id_size
= -1;
113 static int hf_mbim_device_caps_info_fw_info_offset
= -1;
114 static int hf_mbim_device_caps_info_fw_info_size
= -1;
115 static int hf_mbim_device_caps_info_hw_info_offset
= -1;
116 static int hf_mbim_device_caps_info_hw_info_size
= -1;
117 static int hf_mbim_device_caps_info_custom_data_class
= -1;
118 static int hf_mbim_device_caps_info_device_id
= -1;
119 static int hf_mbim_device_caps_info_fw_info
= -1;
120 static int hf_mbim_device_caps_info_hw_info
= -1;
121 static int hf_mbim_subscr_ready_status_ready_state
= -1;
122 static int hf_mbim_subscr_ready_status_susbcr_id_offset
= -1;
123 static int hf_mbim_subscr_ready_status_susbcr_id_size
= -1;
124 static int hf_mbim_subscr_ready_status_sim_icc_id_offset
= -1;
125 static int hf_mbim_subscr_ready_status_sim_icc_id_size
= -1;
126 static int hf_mbim_subscr_ready_status_ready_info
= -1;
127 static int hf_mbim_subscr_ready_status_elem_count
= -1;
128 static int hf_mbim_subscr_ready_status_tel_nb_offset
= -1;
129 static int hf_mbim_subscr_ready_status_tel_nb_size
= -1;
130 static int hf_mbim_subscr_ready_status_susbcr_id
= -1;
131 static int hf_mbim_subscr_ready_status_sim_icc_id
= -1;
132 static int hf_mbim_subscr_ready_status_tel_nb
= -1;
133 static int hf_mbim_radio_state_set
= -1;
134 static int hf_mbim_radio_state_hw_radio_state
= -1;
135 static int hf_mbim_radio_state_sw_radio_state
= -1;
136 static int hf_mbim_set_pin_pin_type
= -1;
137 static int hf_mbim_set_pin_pin_pin_operation
= -1;
138 static int hf_mbim_set_pin_pin_pin_offset
= -1;
139 static int hf_mbim_set_pin_pin_pin_size
= -1;
140 static int hf_mbim_set_pin_new_pin_offset
= -1;
141 static int hf_mbim_set_pin_new_pin_size
= -1;
142 static int hf_mbim_set_pin_pin
= -1;
143 static int hf_mbim_set_pin_new_pin
= -1;
144 static int hf_mbim_pin_info_pin_type
= -1;
145 static int hf_mbim_pin_info_pin_state
= -1;
146 static int hf_mbim_pin_info_remaining_attempts
= -1;
147 static int hf_mbim_pin_list_pin_mode
= -1;
148 static int hf_mbim_pin_list_pin_format
= -1;
149 static int hf_mbim_pin_list_pin_length_min
= -1;
150 static int hf_mbim_pin_list_pin_length_max
= -1;
151 static int hf_mbim_provider_state
= -1;
152 static int hf_mbim_provider_state_home
= -1;
153 static int hf_mbim_provider_state_forbidden
= -1;
154 static int hf_mbim_provider_state_preferred
= -1;
155 static int hf_mbim_provider_state_visible
= -1;
156 static int hf_mbim_provider_state_registered
= -1;
157 static int hf_mbim_provider_state_preferred_multicarrier
= -1;
158 static int hf_mbim_provider_provider_id_offset
= -1;
159 static int hf_mbim_provider_provider_id_size
= -1;
160 static int hf_mbim_provider_provider_name_offset
= -1;
161 static int hf_mbim_provider_provider_name_size
= -1;
162 static int hf_mbim_provider_cellular_class
= -1;
163 static int hf_mbim_provider_rssi
= -1;
164 static int hf_mbim_provider_error_rate
= -1;
165 static int hf_mbim_provider_provider_id
= -1;
166 static int hf_mbim_provider_provider_name
= -1;
167 static int hf_mbim_providers_elem_count
= -1;
168 static int hf_mbim_providers_provider_offset
= -1;
169 static int hf_mbim_providers_provider_size
= -1;
170 static int hf_mbim_visible_providers_req_action
= -1;
171 static int hf_mbim_set_register_state_provider_id_offset
= -1;
172 static int hf_mbim_set_register_state_provider_id_size
= -1;
173 static int hf_mbim_set_register_state_register_action
= -1;
174 static int hf_mbim_register_state_data_class
= -1;
175 static int hf_mbim_set_register_state_provider_id
= -1;
176 static int hf_mbim_registration_state_info_nw_error
= -1;
177 static int hf_mbim_registration_state_info_register_state
= -1;
178 static int hf_mbim_registration_state_info_register_mode
= -1;
179 static int hf_mbim_registration_state_info_available_data_classes
= -1;
180 static int hf_mbim_registration_state_info_current_cellular_class
= -1;
181 static int hf_mbim_registration_state_info_provider_id_offset
= -1;
182 static int hf_mbim_registration_state_info_provider_id_size
= -1;
183 static int hf_mbim_registration_state_info_provider_name_offset
= -1;
184 static int hf_mbim_registration_state_info_provider_name_size
= -1;
185 static int hf_mbim_registration_state_info_roaming_text_offset
= -1;
186 static int hf_mbim_registration_state_info_roaming_text_size
= -1;
187 static int hf_mbim_registration_state_info_registration_flags
= -1;
188 static int hf_mbim_registration_state_info_registration_flags_manual_selection_not_available
= -1;
189 static int hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach
= -1;
190 static int hf_mbim_registration_state_info_provider_id
= -1;
191 static int hf_mbim_registration_state_info_provider_name
= -1;
192 static int hf_mbim_registration_state_info_roaming_text
= -1;
193 static int hf_mbim_set_packet_service_action
= -1;
194 static int hf_mbim_packet_service_info_nw_error
= -1;
195 static int hf_mbim_packet_service_info_packet_service_state
= -1;
196 static int hf_mbim_packet_service_info_highest_available_data_class
= -1;
197 static int hf_mbim_packet_service_info_uplink_speed
= -1;
198 static int hf_mbim_packet_service_info_downlink_speed
= -1;
199 static int hf_mbim_set_signal_state_signal_strength_interval
= -1;
200 static int hf_mbim_set_signal_state_rssi_threshold
= -1;
201 static int hf_mbim_set_signal_state_error_rate_threshold
= -1;
202 static int hf_mbim_signal_state_info_rssi
= -1;
203 static int hf_mbim_signal_state_info_error_rate
= -1;
204 static int hf_mbim_signal_state_info_signal_strength_interval
= -1;
205 static int hf_mbim_signal_state_info_rssi_threshold
= -1;
206 static int hf_mbim_signal_state_info_error_rate_threshold
= -1;
207 static int hf_mbim_context_type
= -1;
208 static int hf_mbim_set_connect_session_id
= -1;
209 static int hf_mbim_set_connect_activation_command
= -1;
210 static int hf_mbim_set_connect_access_string_offset
= -1;
211 static int hf_mbim_set_connect_access_string_size
= -1;
212 static int hf_mbim_set_connect_user_name_offset
= -1;
213 static int hf_mbim_set_connect_user_name_size
= -1;
214 static int hf_mbim_set_connect_password_offset
= -1;
215 static int hf_mbim_set_connect_password_size
= -1;
216 static int hf_mbim_set_connect_compression
= -1;
217 static int hf_mbim_set_connect_auth_protocol
= -1;
218 static int hf_mbim_set_connect_ip_type
= -1;
219 static int hf_mbim_set_connect_access_string
= -1;
220 static int hf_mbim_set_connect_user_name
= -1;
221 static int hf_mbim_set_connect_password
= -1;
222 static int hf_mbim_connect_info_session_id
= -1;
223 static int hf_mbim_connect_info_activation_state
= -1;
224 static int hf_mbim_connect_info_voice_call_state
= -1;
225 static int hf_mbim_connect_info_ip_type
= -1;
226 static int hf_mbim_connect_info_nw_error
= -1;
227 static int hf_mbim_context_context_id
= -1;
228 static int hf_mbim_context_access_string_offset
= -1;
229 static int hf_mbim_context_access_string_size
= -1;
230 static int hf_mbim_context_user_name_offset
= -1;
231 static int hf_mbim_context_user_name_size
= -1;
232 static int hf_mbim_context_password_offset
= -1;
233 static int hf_mbim_context_password_size
= -1;
234 static int hf_mbim_context_compression
= -1;
235 static int hf_mbim_context_auth_protocol
= -1;
236 static int hf_mbim_context_provider_id_offset
= -1;
237 static int hf_mbim_context_provider_id_size
= -1;
238 static int hf_mbim_context_provider_id
= -1;
239 static int hf_mbim_context_access_string
= -1;
240 static int hf_mbim_context_user_name
= -1;
241 static int hf_mbim_context_password
= -1;
242 static int hf_mbim_provisioned_contexts_info_elem_count
= -1;
243 static int hf_mbim_provisioned_contexts_info_provisioned_context_offset
= -1;
244 static int hf_mbim_provisioned_contexts_info_provisioned_context_size
= -1;
245 static int hf_mbim_set_service_activation_data_buffer
= -1;
246 static int hf_mbim_service_activation_info_nw_error
= -1;
247 static int hf_mbim_service_activation_info_data_buffer
= -1;
248 static int hf_mbim_ipv4_element_on_link_prefix_length
= -1;
249 static int hf_mbim_ipv4_element_ipv4_address
= -1;
250 static int hf_mbim_ipv6_element_on_link_prefix_length
= -1;
251 static int hf_mbim_ipv6_element_ipv6_address
= -1;
252 static int hf_mbim_ip_configuration_info_session_id
= -1;
253 static int hf_mbim_ip_configuration_info_ipv4_configuration_available
= -1;
254 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_address
= -1;
255 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway
= -1;
256 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_dns
= -1;
257 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu
= -1;
258 static int hf_mbim_ip_configuration_info_ipv6_configuration_available
= -1;
259 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_address
= -1;
260 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway
= -1;
261 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_dns
= -1;
262 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu
= -1;
263 static int hf_mbim_ip_configuration_info_ipv4_address_count
= -1;
264 static int hf_mbim_ip_configuration_info_ipv4_address_offset
= -1;
265 static int hf_mbim_ip_configuration_info_ipv6_address_count
= -1;
266 static int hf_mbim_ip_configuration_info_ipv6_address_offset
= -1;
267 static int hf_mbim_ip_configuration_info_ipv4_gateway_offset
= -1;
268 static int hf_mbim_ip_configuration_info_ipv6_gateway_offset
= -1;
269 static int hf_mbim_ip_configuration_info_ipv4_dns_count
= -1;
270 static int hf_mbim_ip_configuration_info_ipv4_dns_offset
= -1;
271 static int hf_mbim_ip_configuration_info_ipv6_dns_count
= -1;
272 static int hf_mbim_ip_configuration_info_ipv6_dns_offset
= -1;
273 static int hf_mbim_ip_configuration_info_ipv4_mtu
= -1;
274 static int hf_mbim_ip_configuration_info_ipv6_mtu
= -1;
275 static int hf_mbim_ip_configuration_info_ipv4_gateway
= -1;
276 static int hf_mbim_ip_configuration_info_ipv6_gateway
= -1;
277 static int hf_mbim_ip_configuration_info_ipv4_dns
= -1;
278 static int hf_mbim_ip_configuration_info_ipv6_dns
= -1;
279 static int hf_mbim_device_service_element_device_service_id
= -1;
280 static int hf_mbim_device_service_element_dss_payload
= -1;
281 static int hf_mbim_device_service_element_dss_payload_host_device
= -1;
282 static int hf_mbim_device_service_element_dss_payload_device_host
= -1;
283 static int hf_mbim_device_service_element_max_dss_instances
= -1;
284 static int hf_mbim_device_service_element_cid_count
= -1;
285 static int hf_mbim_device_service_element_cid
= -1;
286 static int hf_mbim_device_services_info_device_services_count
= -1;
287 static int hf_mbim_device_services_info_max_dss_sessions
= -1;
288 static int hf_mbim_device_services_info_device_services_offset
= -1;
289 static int hf_mbim_device_services_info_device_services_size
= -1;
290 static int hf_mbim_event_entry_device_service_id
= -1;
291 static int hf_mbim_event_entry_cid_count
= -1;
292 static int hf_mbim_event_entry_cid
= -1;
293 static int hf_mbim_device_service_subscribe_element_count
= -1;
294 static int hf_mbim_device_service_subscribe_device_service_offset
= -1;
295 static int hf_mbim_device_service_subscribe_device_service_size
= -1;
296 static int hf_mbim_packet_statistics_info_in_discards
= -1;
297 static int hf_mbim_packet_statistics_info_in_errors
= -1;
298 static int hf_mbim_packet_statistics_info_in_octets
= -1;
299 static int hf_mbim_packet_statistics_info_in_packets
= -1;
300 static int hf_mbim_packet_statistics_info_out_octets
= -1;
301 static int hf_mbim_packet_statistics_info_out_packets
= -1;
302 static int hf_mbim_packet_statistics_info_out_errors
= -1;
303 static int hf_mbim_packet_statistics_info_out_discards
= -1;
304 static int hf_mbim_network_idle_hint_state
= -1;
305 static int hf_mbim_emergency_mode_info_emergency_mode
= -1;
306 static int hf_mbim_single_packet_filter_filter_size
= -1;
307 static int hf_mbim_single_packet_filter_packet_filter_offset
= -1;
308 static int hf_mbim_single_packet_filter_packet_mask_offset
= -1;
309 static int hf_mbim_single_packet_filter_packet_filter
= -1;
310 static int hf_mbim_single_packet_filter_packet_mask
= -1;
311 static int hf_mbim_packet_filters_session_id
= -1;
312 static int hf_mbim_packet_filters_packet_filters_count
= -1;
313 static int hf_mbim_packet_filters_packet_filters_packet_filter_offset
= -1;
314 static int hf_mbim_packet_filters_packet_filters_packet_filter_size
= -1;
315 static int hf_mbim_set_sms_configuration_format
= -1;
316 static int hf_mbim_set_sms_configuration_sc_address_offset
= -1;
317 static int hf_mbim_set_sms_configuration_sc_address_size
= -1;
318 static int hf_mbim_set_sms_configuration_sc_address
= -1;
319 static int hf_mbim_sms_configuration_info_sms_storage_state
= -1;
320 static int hf_mbim_sms_configuration_info_format
= -1;
321 static int hf_mbim_sms_configuration_info_max_messages
= -1;
322 static int hf_mbim_sms_configuration_info_cdma_short_message_size
= -1;
323 static int hf_mbim_sms_configuration_info_sc_address_offset
= -1;
324 static int hf_mbim_sms_configuration_info_sc_address_size
= -1;
325 static int hf_mbim_sms_configuration_info_sc_address
= -1;
326 static int hf_mbim_sms_pdu_record_message_index
= -1;
327 static int hf_mbim_sms_pdu_record_message_status
= -1;
328 static int hf_mbim_sms_pdu_record_pdu_data_offset
= -1;
329 static int hf_mbim_sms_pdu_record_pdu_data_size
= -1;
330 static int hf_mbim_sms_pdu_record_pdu_data
= -1;
331 static int hf_mbim_sms_cdma_record_message_index
= -1;
332 static int hf_mbim_sms_cdma_record_message_status
= -1;
333 static int hf_mbim_sms_cdma_record_address_offset
= -1;
334 static int hf_mbim_sms_cdma_record_address_size
= -1;
335 static int hf_mbim_sms_cdma_record_timestamp_offset
= -1;
336 static int hf_mbim_sms_cdma_record_timestamp_size
= -1;
337 static int hf_mbim_sms_cdma_record_encoding_id
= -1;
338 static int hf_mbim_sms_cdma_record_language_id
= -1;
339 static int hf_mbim_sms_cdma_record_encoded_message_offset
= -1;
340 static int hf_mbim_sms_cdma_record_size_in_bytes
= -1;
341 static int hf_mbim_sms_cdma_record_size_in_characters
= -1;
342 static int hf_mbim_sms_cdma_record_address
= -1;
343 static int hf_mbim_sms_cdma_record_timestamp
= -1;
344 static int hf_mbim_sms_cdma_record_encoded_message
= -1;
345 static int hf_mbim_sms_read_req_format
= -1;
346 static int hf_mbim_sms_read_req_flag
= -1;
347 static int hf_mbim_sms_read_req_message_index
= -1;
348 static int hf_mbim_sms_read_info_format
= -1;
349 static int hf_mbim_sms_read_info_element_count
= -1;
350 static int hf_mbim_sms_read_info_sms_offset
= -1;
351 static int hf_mbim_sms_read_info_sms_size
= -1;
352 static int hf_mbim_sms_send_pdu_pdu_data_offset
= -1;
353 static int hf_mbim_sms_send_pdu_pdu_data_size
= -1;
354 static int hf_mbim_sms_send_pdu_pdu_data
= -1;
355 static int hf_mbim_sms_send_cdma_encoding_id
= -1;
356 static int hf_mbim_sms_send_cdma_language_id
= -1;
357 static int hf_mbim_sms_send_cdma_address_offset
= -1;
358 static int hf_mbim_sms_send_cdma_address_size
= -1;
359 static int hf_mbim_sms_send_cdma_encoded_message_offset
= -1;
360 static int hf_mbim_sms_send_cdma_size_in_bytes
= -1;
361 static int hf_mbim_sms_send_cdma_size_in_characters
= -1;
362 static int hf_mbim_sms_send_cdma_address
= -1;
363 static int hf_mbim_sms_send_cdma_encoded_message
= -1;
364 static int hf_mbim_set_sms_send_format
= -1;
365 static int hf_mbim_sms_send_info_message_reference
= -1;
366 static int hf_mbim_set_sms_delete_flag
= -1;
367 static int hf_mbim_set_sms_delete_message_index
= -1;
368 static int hf_mbim_sms_status_info_flags
= -1;
369 static int hf_mbim_sms_status_info_flags_message_store_full
= -1;
370 static int hf_mbim_sms_status_info_flags_new_message
= -1;
371 static int hf_mbim_sms_status_info_message_index
= -1;
372 static int hf_mbim_set_ussd_ussd_action
= -1;
373 static int hf_mbim_set_ussd_ussd_data_coding_scheme
= -1;
374 static int hf_mbim_set_ussd_ussd_ussd_payload_offset
= -1;
375 static int hf_mbim_set_ussd_ussd_ussd_payload_length
= -1;
376 static int hf_mbim_set_ussd_ussd_ussd_payload
= -1;
377 static int hf_mbim_ussd_info_ussd_response
= -1;
378 static int hf_mbim_ussd_info_ussd_session_state
= -1;
379 static int hf_mbim_ussd_info_ussd_data_coding_scheme
= -1;
380 static int hf_mbim_ussd_info_ussd_payload_offset
= -1;
381 static int hf_mbim_ussd_info_ussd_payload_length
= -1;
382 static int hf_mbim_ussd_info_ussd_payload
= -1;
383 static int hf_mbim_phonebook_configuration_info_phonebook_state
= -1;
384 static int hf_mbim_phonebook_configuration_info_total_nb_of_entries
= -1;
385 static int hf_mbim_phonebook_configuration_info_used_entries
= -1;
386 static int hf_mbim_phonebook_configuration_info_max_number_length
= -1;
387 static int hf_mbim_phonebook_configuration_info_max_name_length
= -1;
388 static int hf_mbim_phonebook_entry_entry_index
= -1;
389 static int hf_mbim_phonebook_entry_number_offset
= -1;
390 static int hf_mbim_phonebook_entry_number_length
= -1;
391 static int hf_mbim_phonebook_entry_name_offset
= -1;
392 static int hf_mbim_phonebook_entry_name_length
= -1;
393 static int hf_mbim_phonebook_entry_number
= -1;
394 static int hf_mbim_phonebook_entry_name
= -1;
395 static int hf_mbim_phonebook_read_req_filter_flag
= -1;
396 static int hf_mbim_phonebook_read_req_filter_message_index
= -1;
397 static int hf_mbim_phonebook_read_info_element_count
= -1;
398 static int hf_mbim_phonebook_read_info_phonebook_offset
= -1;
399 static int hf_mbim_phonebook_read_info_phonebook_size
= -1;
400 static int hf_mbim_set_phonebook_delete_filter_flag
= -1;
401 static int hf_mbim_set_phonebook_delete_filter_message_index
= -1;
402 static int hf_mbim_set_phonebook_write_save_flag
= -1;
403 static int hf_mbim_set_phonebook_write_save_index
= -1;
404 static int hf_mbim_set_phonebook_write_number_offset
= -1;
405 static int hf_mbim_set_phonebook_write_number_length
= -1;
406 static int hf_mbim_set_phonebook_write_name_offset
= -1;
407 static int hf_mbim_set_phonebook_write_name_length
= -1;
408 static int hf_mbim_set_phonebook_write_number
= -1;
409 static int hf_mbim_set_phonebook_write_name
= -1;
410 static int hf_mbim_set_stk_pac_pac_host_control
= -1;
411 static int hf_mbim_stk_pac_info_pac_support
= -1;
412 static int hf_mbim_stk_pac_pac_type
= -1;
413 static int hf_mbim_stk_pac_pac
= -1;
414 static int hf_mbim_set_stk_terminal_response_response_length
= -1;
415 static int hf_mbim_set_stk_terminal_response_data_buffer
= -1;
416 static int hf_mbim_stk_terminal_response_info_result_data_string_offset
= -1;
417 static int hf_mbim_stk_terminal_response_info_result_data_string_length
= -1;
418 static int hf_mbim_stk_terminal_response_info_status_word
= -1;
419 static int hf_mbim_stk_terminal_response_info_result_data_string
= -1;
420 static int hf_mbim_set_stk_envelope_data_buffer
= -1;
421 static int hf_mbim_stk_envelope_info_envelope_support
= -1;
422 static int hf_mbim_aka_auth_req_rand
= -1;
423 static int hf_mbim_aka_auth_req_autn
= -1;
424 static int hf_mbim_aka_auth_info_res
= -1;
425 static int hf_mbim_aka_auth_info_res_length
= -1;
426 static int hf_mbim_aka_auth_info_ik
= -1;
427 static int hf_mbim_aka_auth_info_ck
= -1;
428 static int hf_mbim_aka_auth_info_auts
= -1;
429 static int hf_mbim_akap_auth_req_rand
= -1;
430 static int hf_mbim_akap_auth_req_autn
= -1;
431 static int hf_mbim_akap_auth_req_network_name_offset
= -1;
432 static int hf_mbim_akap_auth_req_network_name_length
= -1;
433 static int hf_mbim_akap_auth_req_network_name
= -1;
434 static int hf_mbim_akap_auth_info_res
= -1;
435 static int hf_mbim_akap_auth_info_res_length
= -1;
436 static int hf_mbim_akap_auth_info_ik
= -1;
437 static int hf_mbim_akap_auth_info_ck
= -1;
438 static int hf_mbim_akap_auth_info_auts
= -1;
439 static int hf_mbim_sim_auth_req_rand1
= -1;
440 static int hf_mbim_sim_auth_req_rand2
= -1;
441 static int hf_mbim_sim_auth_req_rand3
= -1;
442 static int hf_mbim_sim_auth_req_n
= -1;
443 static int hf_mbim_sim_auth_info_sres1
= -1;
444 static int hf_mbim_sim_auth_info_kc1
= -1;
445 static int hf_mbim_sim_auth_info_sres2
= -1;
446 static int hf_mbim_sim_auth_info_kc2
= -1;
447 static int hf_mbim_sim_auth_info_sres3
= -1;
448 static int hf_mbim_sim_auth_info_kc3
= -1;
449 static int hf_mbim_sim_auth_info_n
= -1;
450 static int hf_mbim_set_dss_connect_device_service_id
= -1;
451 static int hf_mbim_set_dss_connect_dss_session_id
= -1;
452 static int hf_mbim_set_dss_connect_dss_link_state
= -1;
453 static int hf_mbim_multicarrier_capabilities_info_capabilities
= -1;
454 static int hf_mbim_multicarrier_capabilities_info_capabilities_static_scan
= -1;
455 static int hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot
= -1;
456 static int hf_mbim_location_info_country
= -1;
457 static int hf_mbim_multicarrier_current_cid_list_req_uuid
= -1;
458 static int hf_mbim_multicarrier_current_cid_list_info_cid_count
= -1;
459 static int hf_mbim_multicarrier_current_cid_list_info_cid
= -1;
460 static int hf_mbim_msfwid_firmwareid_info_firmware_id
= -1;
461 static int hf_mbim_fragmented_payload
= -1;
462 static int hf_mbim_request_in
= -1;
463 static int hf_mbim_response_in
= -1;
464 static int hf_mbim_descriptor
= -1;
465 static int hf_mbim_descriptor_version
= -1;
466 static int hf_mbim_descriptor_max_control_message
= -1;
467 static int hf_mbim_descriptor_number_filters
= -1;
468 static int hf_mbim_descriptor_max_filter_size
= -1;
469 static int hf_mbim_descriptor_max_segment_size
= -1;
470 static int hf_mbim_descriptor_network_capabilities
= -1;
471 static int hf_mbim_descriptor_network_capabilities_max_datagram_size
= -1;
472 static int hf_mbim_descriptor_network_capabilities_ntb_input_size
= -1;
473 static int hf_mbim_descriptor_extended_version
= -1;
474 static int hf_mbim_descriptor_max_outstanding_command_messages
= -1;
475 static int hf_mbim_descriptor_mtu
= -1;
476 static int hf_mbim_bulk
= -1;
477 static int hf_mbim_bulk_nth_signature
= -1;
478 static int hf_mbim_bulk_nth_header_length
= -1;
479 static int hf_mbim_bulk_nth_sequence_number
= -1;
480 static int hf_mbim_bulk_nth_block_length
= -1;
481 static int hf_mbim_bulk_nth_block_length_32
= -1;
482 static int hf_mbim_bulk_nth_ndp_index
= -1;
483 static int hf_mbim_bulk_nth_ndp_index_32
= -1;
484 static int hf_mbim_bulk_ndp_signature
= -1;
485 static int hf_mbim_bulk_ndp_signature_ips_session_id
= -1;
486 static int hf_mbim_bulk_ndp_signature_dss_session_id
= -1;
487 static int hf_mbim_bulk_ndp_length
= -1;
488 static int hf_mbim_bulk_ndp_next_ndp_index
= -1;
489 static int hf_mbim_bulk_ndp_next_ndp_index_32
= -1;
490 static int hf_mbim_bulk_ndp_reserved
= -1;
491 static int hf_mbim_bulk_ndp_reserved2
= -1;
492 static int hf_mbim_bulk_ndp_datagram_index
= -1;
493 static int hf_mbim_bulk_ndp_datagram_index_32
= -1;
494 static int hf_mbim_bulk_ndp_datagram_length
= -1;
495 static int hf_mbim_bulk_ndp_datagram_length_32
= -1;
496 static int hf_mbim_bulk_ndp_datagram
= -1;
497 static int hf_mbim_bulk_ndp_nb_datagrams
= -1;
498 static int hf_mbim_bulk_total_nb_datagrams
= -1;
499 static int hf_mbim_fragments
= -1;
500 static int hf_mbim_fragment
= -1;
501 static int hf_mbim_fragment_overlap
= -1;
502 static int hf_mbim_fragment_overlap_conflict
= -1;
503 static int hf_mbim_fragment_multiple_tails
= -1;
504 static int hf_mbim_fragment_too_long_fragment
= -1;
505 static int hf_mbim_fragment_error
= -1;
506 static int hf_mbim_fragment_count
= -1;
507 static int hf_mbim_reassembled_in
= -1;
508 static int hf_mbim_reassembled_length
= -1;
509 static int hf_mbim_reassembled_data
= -1;
511 static expert_field ei_mbim_max_ctrl_transfer
= EI_INIT
;
512 static expert_field ei_mbim_unexpected_msg
= EI_INIT
;
513 static expert_field ei_mbim_unexpected_info_buffer
= EI_INIT
;
514 static expert_field ei_mbim_illegal_on_link_prefix_length
= EI_INIT
;
515 static expert_field ei_mbim_unknown_sms_format
= EI_INIT
;
516 static expert_field ei_mbim_unexpected_uuid_value
= EI_INIT
;
517 static expert_field ei_mbim_too_many_items
= EI_INIT
;
518 static expert_field ei_mbim_alignment_error
= EI_INIT
;
520 /* Initialize the subtree pointers */
521 static gint ett_mbim
= -1;
522 static gint ett_mbim_msg_header
= -1;
523 static gint ett_mbim_frag_header
= -1;
524 static gint ett_mbim_info_buffer
= -1;
525 static gint ett_mbim_bitmap
= -1;
526 static gint ett_mbim_pair_list
= -1;
527 static gint ett_mbim_pin
= -1;
528 static gint ett_mbim_buffer
= -1;
529 static gint ett_mbim_fragment
= -1;
530 static gint ett_mbim_fragments
= -1;
532 static dissector_handle_t proactive_handle
;
533 static dissector_handle_t etsi_cat_handle
;
534 static dissector_handle_t gsm_sms_handle
;
535 static dissector_handle_t cdma_sms_handle
;
536 static dissector_handle_t eth_handle
;
537 static dissector_handle_t eth_fcs_handle
;
538 static dissector_handle_t ip_handle
;
539 static dissector_handle_t data_handle
;
541 static gboolean mbim_bulk_heuristic
= TRUE
;
542 static gboolean mbim_control_decode_unknown_itf
= FALSE
;
544 static reassembly_table mbim_reassembly_table
;
546 static const fragment_items mbim_frag_items
= {
551 &hf_mbim_fragment_overlap
,
552 &hf_mbim_fragment_overlap_conflict
,
553 &hf_mbim_fragment_multiple_tails
,
554 &hf_mbim_fragment_too_long_fragment
,
555 &hf_mbim_fragment_error
,
556 &hf_mbim_fragment_count
,
557 &hf_mbim_reassembled_in
,
558 &hf_mbim_reassembled_length
,
559 &hf_mbim_reassembled_data
,
568 struct mbim_conv_info
{
570 guint32 cellular_class
;
573 #define MBIM_MAX_ITEMS 1000
575 #define MBIM_OPEN_MSG 0x00000001
576 #define MBIM_CLOSE_MSG 0x00000002
577 #define MBIM_COMMAND_MSG 0x00000003
578 #define MBIM_HOST_ERROR_MSG 0x00000004
579 #define MBIM_OPEN_DONE 0x80000001
580 #define MBIM_CLOSE_DONE 0x80000002
581 #define MBIM_COMMAND_DONE 0x80000003
582 #define MBIM_FUNCTION_ERROR_MSG 0x80000004
583 #define MBIM_INDICATE_STATUS_MSG 0x80000007
585 static const value_string mbim_msg_type_vals
[] = {
586 { MBIM_OPEN_MSG
, "OPEN_MSG"},
587 { MBIM_CLOSE_MSG
, "CLOSE_MSG"},
588 { MBIM_COMMAND_MSG
, "COMMAND_MSG"},
589 { MBIM_HOST_ERROR_MSG
, "HOST_ERROR_MSG"},
590 { MBIM_OPEN_DONE
, "OPEN_DONE"},
591 { MBIM_CLOSE_DONE
, "CLOSE_DONE"},
592 { MBIM_COMMAND_DONE
, "COMMAND_DONE"},
593 { MBIM_FUNCTION_ERROR_MSG
, "FUNCTION_ERROR_MSG"},
594 { MBIM_INDICATE_STATUS_MSG
, "INDICATE_STATUS_MSG"},
598 #define MBIM_COMMAND_QUERY 0
599 #define MBIM_COMMAND_SET 1
601 static const value_string mbim_command_type_vals
[] = {
602 { MBIM_COMMAND_QUERY
, "Query"},
603 { MBIM_COMMAND_SET
, "Set"},
607 static const value_string mbim_error_status_code_vals
[] = {
608 { 1, "TIMEOUT_FRAGMENT"},
609 { 2, "FRAGMENT_OUT_OF_SEQUENCE"},
610 { 3, "LENGTH_MISMATCH"},
611 { 4, "DUPLICATED_TID"},
615 { 8, "MAX_TRANSFER"},
619 static const value_string mbim_status_code_vals
[] = {
623 { 3, "SIM_NOT_INSERTED"},
625 { 5, "PIN_REQUIRED"},
626 { 6, "PIN_DISABLED"},
627 { 7, "NOT_REGISTERED"},
628 { 8, "PROVIDERS_NOT_FOUND"},
629 { 9, "NO_DEVICE_SUPPORT"},
630 { 10, "PROVIDER_NOT_VISIBLE"},
631 { 11, "DATA_CLASS_NOT_AVAILABLE"},
632 { 12, "PACKET_SERVICE_DETACHED"},
633 { 13, "MAX_ACTIVATED_CONTEXTS"},
634 { 14, "NOT_INITIALIZED"},
635 { 15, "VOICE_CALL_IN_PROGRESS"},
636 { 16, "CONTEXT_NOT_ACTIVATED"},
637 { 17, "SERVICE_NOT_ACTIVATED"},
638 { 18, "INVALID_ACCESS_STRING"},
639 { 19, "INVALID_USER_NAME_PWD"},
640 { 20, "RADIO_POWER_OFF"},
641 { 21, "INVALID_PARAMETERS"},
642 { 22, "READ_FAILURE"},
643 { 23, "WRITE_FAILURE"},
645 { 25, "NO_PHONEBOOK"},
646 { 26, "PARAMETER_TOO_LONG"},
648 { 28, "OPERATION_NOT_ALLOWED"},
649 { 29, "MEMORY_FAILURE"},
650 { 30, "INVALID_MEMORY_INDEX"},
651 { 31, "MEMORY_FULL"},
652 { 32, "FILTER_NOT_SUPPORTED"},
653 { 33, "DSS_INSTANCE_LIMIT"},
654 { 34, "INVALID_DEVICE_SERVICE_OPERATION"},
655 { 35, "AUTH_INCORRECT_AUTN"},
656 { 36, "AUTH_SYNC_FAILURE"},
657 { 37, "AUTH_AMF_NOT_SET"},
658 { 38, "CONTEXT_NOT_SUPPORTED"},
659 { 100, "SMS_UNKNOWN_SMSC_ADDRESS"},
660 { 101, "SMS_NETWORK_TIMEOUT"},
661 { 102, "SMS_LANG_NOT_SUPPORTED"},
662 { 103, "SMS_ENCODING_NOT_SUPPORTED"},
663 { 104, "SMS_FORMAT_NOT_SUPPORTED"},
666 static value_string_ext mbim_status_code_vals_ext
= VALUE_STRING_EXT_INIT(mbim_status_code_vals
);
673 #define UUID_BASIC_CONNECT 0
676 #define UUID_PHONEBOOK 3
680 #define UUID_MULTICARRIER 7
681 #define UUID_MS_HOSTSHUTDOWN 8
682 #define UUID_MSFWID 9
684 static const struct mbim_uuid mbim_uuid_service_id_vals
[] = {
685 { UUID_BASIC_CONNECT
, {0xa289cc33, 0xbcbb, 0x8b4f, { 0xb6, 0xb0, 0x13, 0x3e, 0xc2, 0xaa, 0xe6, 0xdf}}},
686 { UUID_SMS
, {0x533fbeeb, 0x14fe, 0x4467, {0x9f, 0x90, 0x33, 0xa2, 0x23, 0xe5, 0x6c, 0x3f}}},
687 { UUID_USSD
, {0xe550a0c8, 0x5e82, 0x479e, {0x82, 0xf7, 0x10, 0xab, 0xf4, 0xc3, 0x35, 0x1f}}},
688 { UUID_PHONEBOOK
, {0x4bf38476, 0x1e6a, 0x41db, {0xb1, 0xd8, 0xbe, 0xd2, 0x89, 0xc2, 0x5b, 0xdb}}},
689 { UUID_STK
, {0xd8f20131, 0xfcb5, 0x4e17, {0x86, 0x02, 0xd6, 0xed, 0x38, 0x16, 0x16, 0x4c}}},
690 { UUID_AUTH
, {0x1d2b5ff7, 0x0aa1, 0x48b2, {0xaa, 0x52, 0x50, 0xf1, 0x57, 0x67, 0x17, 0x4e}}},
691 { UUID_DSS
, {0xc08a26dd, 0x7718, 0x4382, {0x84, 0x82, 0x6e, 0x0d, 0x58, 0x3c, 0x4d, 0x0e}}},
692 { UUID_MULTICARRIER
, {0x8b569648, 0x628d, 0x4653, {0x9b, 0x9f, 0x10, 0x25, 0x40, 0x44, 0x24, 0xe1}}},
693 { UUID_MS_HOSTSHUTDOWN
, {0x883b7c26, 0x985f, 0x43fa, {0x98, 0x04, 0x27, 0xd7, 0xfb, 0x80, 0x95, 0x9c}}},
694 { UUID_MSFWID
, {0xe9f7dea2, 0xfeaf, 0x4009, {0x93, 0xce, 0x90, 0xa3, 0x69, 0x41, 0x03, 0xb6}}}
697 static const value_string mbim_service_id_vals
[] = {
698 { 0, "UUID_BASIC_CONNECT"},
701 { 3, "UUID_PHONEBOOK"},
705 { 7, "UUID_MULTICARRIER"},
706 { 8, "UUID_MS_HOSTSHUTDOWN"},
711 #define MBIM_CID_DEVICE_CAPS 1
712 #define MBIM_CID_SUBSCRIBER_READY_STATUS 2
713 #define MBIM_CID_RADIO_STATE 3
714 #define MBIM_CID_PIN 4
715 #define MBIM_CID_PIN_LIST 5
716 #define MBIM_CID_HOME_PROVIDER 6
717 #define MBIM_CID_PREFERRED_PROVIDERS 7
718 #define MBIM_CID_VISIBLE_PROVIDERS 8
719 #define MBIM_CID_REGISTER_STATE 9
720 #define MBIM_CID_PACKET_SERVICE 10
721 #define MBIM_CID_SIGNAL_STATE 11
722 #define MBIM_CID_CONNECT 12
723 #define MBIM_CID_PROVISIONED_CONTEXTS 13
724 #define MBIM_CID_SERVICE_ACTIVATION 14
725 #define MBIM_CID_IP_CONFIGURATION 15
726 #define MBIM_CID_DEVICE_SERVICES 16
727 #define MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST 19
728 #define MBIM_CID_PACKET_STATISTICS 20
729 #define MBIM_CID_NETWORK_IDLE_HINT 21
730 #define MBIM_CID_EMERGENCY_MODE 22
731 #define MBIM_CID_IP_PACKET_FILTERS 23
732 #define MBIM_CID_MULTICARRIER_PROVIDERS 24
734 static const value_string mbim_uuid_basic_connect_cid_vals
[] = {
735 { MBIM_CID_DEVICE_CAPS
, "DEVICE_CAPS"},
736 { MBIM_CID_SUBSCRIBER_READY_STATUS
, "SUBSCRIBER_READY_STATUS"},
737 { MBIM_CID_RADIO_STATE
, "RADIO_STATE"},
738 { MBIM_CID_PIN
, "PIN"},
739 { MBIM_CID_PIN_LIST
, "PIN_LIST"},
740 { MBIM_CID_HOME_PROVIDER
, "HOME_PROVIDER"},
741 { MBIM_CID_PREFERRED_PROVIDERS
, "PREFERRED_PROVIDERS"},
742 { MBIM_CID_VISIBLE_PROVIDERS
, "VISIBLE_PROVIDERS"},
743 { MBIM_CID_REGISTER_STATE
, "REGISTER_STATE"},
744 { MBIM_CID_PACKET_SERVICE
, "PACKET_SERVICE"},
745 { MBIM_CID_SIGNAL_STATE
, "SIGNAL_STATE"},
746 { MBIM_CID_CONNECT
, "CONNECT"},
747 { MBIM_CID_PROVISIONED_CONTEXTS
, "PROVISIONED_CONTEXTS"},
748 { MBIM_CID_SERVICE_ACTIVATION
, "SERVICE_ACTIVATION"},
749 { MBIM_CID_IP_CONFIGURATION
, "IP_CONFIGURATION"},
750 { MBIM_CID_DEVICE_SERVICES
, "DEVICE_SERVICES"},
751 { MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST
, "DEVICE_SERVICE_SUBSCRIBE_LIST"},
752 { MBIM_CID_PACKET_STATISTICS
, "PACKET_STATISTICS"},
753 { MBIM_CID_NETWORK_IDLE_HINT
, "NETWORK_IDLE_HINT"},
754 { MBIM_CID_EMERGENCY_MODE
, "EMERGENCY_MODE"},
755 { MBIM_CID_IP_PACKET_FILTERS
, "IP_PACKET_FILTERS"},
756 { MBIM_CID_MULTICARRIER_PROVIDERS
, "MULTICARRIER_PROVIDERS"},
759 static value_string_ext mbim_uuid_basic_connect_cid_vals_ext
= VALUE_STRING_EXT_INIT(mbim_uuid_basic_connect_cid_vals
);
761 #define MBIM_CID_SMS_CONFIGURATION 1
762 #define MBIM_CID_SMS_READ 2
763 #define MBIM_CID_SMS_SEND 3
764 #define MBIM_CID_SMS_DELETE 4
765 #define MBIM_CID_SMS_MESSAGE_STORE_STATUS 5
767 static const value_string mbim_uuid_sms_cid_vals
[] = {
768 { MBIM_CID_SMS_CONFIGURATION
, "SMS_CONFIGURATION"},
769 { MBIM_CID_SMS_READ
, "SMS_READ"},
770 { MBIM_CID_SMS_SEND
, "SMS_SEND"},
771 { MBIM_CID_SMS_DELETE
, "SMS_DELETE"},
772 { MBIM_CID_SMS_MESSAGE_STORE_STATUS
, "SMS_MESSAGE_STORE_STATUS"},
776 #define MBIM_CID_USSD 1
778 static const value_string mbim_uuid_ussd_cid_vals
[] = {
779 { MBIM_CID_USSD
, "USSD"},
783 #define MBIM_CID_PHONEBOOK_CONFIGURATION 1
784 #define MBIM_CID_PHONEBOOK_READ 2
785 #define MBIM_CID_PHONEBOOK_DELETE 3
786 #define MBIM_CID_PHONEBOOK_WRITE 4
788 static const value_string mbim_uuid_phonebook_cid_vals
[] = {
789 { MBIM_CID_PHONEBOOK_CONFIGURATION
, "PHONEBOOK_CONFIGURATION"},
790 { MBIM_CID_PHONEBOOK_READ
, "PHONEBOOK_READ"},
791 { MBIM_CID_PHONEBOOK_DELETE
, "PHONEBOOK_DELETE"},
792 { MBIM_CID_PHONEBOOK_WRITE
, "PHONEBOOK_WRITE"},
796 #define MBIM_CID_STK_PAC 1
797 #define MBIM_CID_STK_TERMINAL_RESPONSE 2
798 #define MBIM_CID_STK_ENVELOPE 3
800 static const value_string mbim_uuid_stk_cid_vals
[] = {
801 { MBIM_CID_STK_PAC
, "STK_PAC"},
802 { MBIM_CID_STK_TERMINAL_RESPONSE
, "STK_TERMINAL_RESPONSE"},
803 { MBIM_CID_STK_ENVELOPE
, "STK_ENVELOPE"},
807 #define MBIM_CID_AKA_AUTH 1
808 #define MBIM_CID_AKAP_AUTH 2
809 #define MBIM_CID_SIM_AUTH 3
811 static const value_string mbim_uuid_auth_cid_vals
[] = {
812 { MBIM_CID_AKA_AUTH
, "AKA_AUTH"},
813 { MBIM_CID_AKAP_AUTH
, "AKAP_AUTH"},
814 { MBIM_CID_SIM_AUTH
, "SIM_AUTH"},
818 #define MBIM_CID_DSS_CONNECT 1
820 static const value_string mbim_uuid_dss_cid_vals
[] = {
821 { MBIM_CID_DSS_CONNECT
, "DSS_CONNECT"},
825 #define MBIM_CID_MULTICARRIER_CAPABILITIES 1
826 #define MBIM_CID_LOCATION_INFO 2
827 #define MBIM_CID_MULTICARRIER_CURRENT_CID_LIST 3
829 static const value_string mbim_uuid_multicarrier_cid_vals
[] = {
830 { MBIM_CID_MULTICARRIER_CAPABILITIES
, "MULTICARRIER_CAPABILITIES"},
831 { MBIM_CID_LOCATION_INFO
, "LOCATION_INFO"},
832 { MBIM_CID_MULTICARRIER_CURRENT_CID_LIST
, "MULTICARRIER_CURRENT_CID_LIST"},
836 #define MBIM_CID_MS_HOSTSHUTDOWN 1
838 static const value_string mbim_uuid_ms_hostshutdown_cid_vals
[] = {
839 { MBIM_CID_MS_HOSTSHUTDOWN
, "MS_HOSTSHUTDOWN"},
843 #define MBIM_CID_MSFWID_FIRMWAREID 1
845 static const value_string mbim_uuid_msfwid_cid_vals
[] = {
846 { MBIM_CID_MSFWID_FIRMWAREID
, "MSFWID_FIRMWAREID"},
850 static const value_string mbim_device_caps_info_device_type_vals
[] = {
858 #define MBIM_CELLULAR_CLASS_GSM 1
859 #define MBIM_CELLULAR_CLASS_CDMA 2
861 static const value_string mbim_cellular_class_vals
[] = {
862 { MBIM_CELLULAR_CLASS_GSM
, "GSM"},
863 { MBIM_CELLULAR_CLASS_CDMA
, "CDMA"},
867 static const value_string mbim_device_caps_info_voice_class_vals
[] = {
870 { 2, "Separate Voice Data"},
871 { 3, "Simultaneous Voice Data"},
875 static const int *mbim_device_caps_info_sim_class_fields
[] = {
876 &hf_mbim_device_caps_info_sim_class_logical
,
877 &hf_mbim_device_caps_info_sim_class_removable
,
881 static const int *mbim_data_class_fields
[] = {
882 &hf_mbim_data_class_gprs
,
883 &hf_mbim_data_class_edge
,
884 &hf_mbim_data_class_umts
,
885 &hf_mbim_data_class_hsdpa
,
886 &hf_mbim_data_class_hsupa
,
887 &hf_mbim_data_class_lte
,
888 &hf_mbim_data_class_reserved_gsm
,
889 &hf_mbim_data_class_1xrtt
,
890 &hf_mbim_data_class_1xevdo
,
891 &hf_mbim_data_class_1xevdoreva
,
892 &hf_mbim_data_class_1xevdv
,
893 &hf_mbim_data_class_3xrtt
,
894 &hf_mbim_data_class_1xevdorevb
,
895 &hf_mbim_data_class_umb
,
896 &hf_mbim_data_class_reserved_cdma
,
897 &hf_mbim_data_class_custom
,
901 static const int *mbim_device_caps_info_sms_caps_fields
[] = {
902 &hf_mbim_device_caps_info_sms_caps_pdu_receive
,
903 &hf_mbim_device_caps_info_sms_caps_pdu_send
,
904 &hf_mbim_device_caps_info_sms_caps_text_receive
,
905 &hf_mbim_device_caps_info_sms_caps_text_send
,
909 static const int *mbim_device_caps_info_control_caps_fields
[] = {
910 &hf_mbim_device_caps_info_control_caps_reg_manual
,
911 &hf_mbim_device_caps_info_control_caps_hw_radio_switch
,
912 &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip
,
913 &hf_mbim_device_caps_info_control_caps_cdma_simple_ip
,
914 &hf_mbim_device_caps_info_control_caps_multi_carrier
,
918 static const value_string mbim_subscr_ready_status_ready_state_vals
[] = {
919 { 0, "Not Initialized"},
921 { 2, "SIM Not Inserted"},
924 { 5, "Not Activated"},
925 { 6, "Device Locked"},
929 static const value_string mbim_subscr_ready_status_ready_info_vals
[] = {
931 { 1, "Protect Unique ID"},
935 static const value_string mbim_radio_state_vals
[] = {
941 static const value_string mbim_pin_type_vals
[] = {
946 { 4, "Device SIM PIN"},
947 { 5, "Device First SIM PIN"},
949 { 7, "Network Subset PIN"},
950 { 8, "Service Provider PIN"},
951 { 9, "Corporate PIN"},
952 { 10, "Subsidy Lock"},
955 { 13, "Device First SIM PUK"},
956 { 14, "Network PUK"},
957 { 15, "Network Subset PUK"},
958 { 16, "Service Provider PUK"},
959 { 17, "Corporate PUK"},
963 static const value_string mbim_pin_operation_vals
[] = {
971 static const value_string mbim_pin_state_vals
[] = {
977 static const value_string mbim_pin_mode_vals
[] = {
978 { 0, "Not Supported"},
984 static const value_string mbim_pin_format_vals
[] = {
987 { 2, "Alpha Numeric"},
991 static const int *mbim_provider_state_fields
[] = {
992 &hf_mbim_provider_state_home
,
993 &hf_mbim_provider_state_forbidden
,
994 &hf_mbim_provider_state_preferred
,
995 &hf_mbim_provider_state_visible
,
996 &hf_mbim_provider_state_registered
,
997 &hf_mbim_provider_state_preferred_multicarrier
,
1002 mbim_rssi_fmt(gchar
*s
, guint32 val
)
1005 g_snprintf(s
, ITEM_LABEL_LENGTH
, "-113 or less dBm (0)");
1006 } else if (val
< 31) {
1007 g_snprintf(s
, ITEM_LABEL_LENGTH
, "%d dBm (%u)", -113 + 2*val
, val
);
1008 } else if (val
== 31) {
1009 g_snprintf(s
, ITEM_LABEL_LENGTH
, "-51 or greater dBm (31)");
1010 } else if (val
== 99) {
1011 g_snprintf(s
, ITEM_LABEL_LENGTH
, "Unknown or undetectable (99)");
1013 g_snprintf(s
, ITEM_LABEL_LENGTH
, "Invalid value (%u)", val
);
1017 static const value_string mbim_error_rate_vals
[] = {
1018 { 0, "Frame error rate < 0.01%"},
1019 { 1, "Frame error rate 0.01-0.1%"},
1020 { 2, "Frame error rate 0.1-0.5%"},
1021 { 3, "Frame error rate 0.5-1.0%"},
1022 { 4, "Frame error rate 1.0-2.0%"},
1023 { 5, "Frame error rate 2.0-4.0%"},
1024 { 6, "Frame error rate 4.0-8.0%"},
1025 { 7, "Frame error rate > 8.0%"},
1026 { 99, "Unknown or undetectable"},
1030 static const value_string mbim_visible_providers_action_vals
[] = {
1032 { 1, "Restricted Scan"},
1036 static const value_string mbim_register_action_vals
[] = {
1042 static const value_string mbim_register_state_vals
[] = {
1044 { 1, "Deregistered"},
1053 static const value_string mbim_register_mode_vals
[] = {
1060 static const int *mbim_registration_state_info_registration_flags_fields
[] = {
1061 &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available
,
1062 &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach
,
1066 static const value_string mbim_packet_service_action_vals
[] = {
1072 static const value_string mbim_packet_service_state_vals
[] = {
1081 static const value_string mbim_activation_command_vals
[] = {
1087 static const value_string mbim_compression_vals
[] = {
1093 static const value_string mbim_auth_protocol_vals
[]= {
1101 static const value_string mbim_context_ip_type_vals
[] = {
1106 { 4, "IPv4 and IPv6"},
1110 static const value_string mbim_activation_state_vals
[] = {
1114 { 3, "Deactivated"},
1115 { 4, "Deactivating"},
1119 static const value_string mbim_voice_call_state_vals
[] = {
1121 { 1, "In Progress"},
1126 #define UUID_CONTEXT_NONE 0
1127 #define UUID_CONTEXT_INTERNET 1
1128 #define UUID_CONTEXT_VPN 2
1129 #define UUID_CONTEXT_VOICE 3
1130 #define UUID_CONTEXT_VIDEO_SHARE 4
1131 #define UUID_CONTEXT_PURCHASE 5
1132 #define UUID_CONTEXT_IMS 6
1133 #define UUID_CONTEXT_MMS 7
1134 #define UUID_CONTEXT_LOCAL 8
1136 static const struct mbim_uuid mbim_uuid_context_type_vals
[] = {
1137 { UUID_CONTEXT_NONE
, {0xb43f758c, 0xa560, 0x4b46, {0xb3, 0x5e, 0xc5, 0x86, 0x96, 0x41, 0xfb, 0x54}}},
1138 { UUID_CONTEXT_INTERNET
, {0x7e5e2a7e, 0x4e6f, 0x7272, {0x73, 0x6b, 0x65, 0x6e, 0x7e, 0x5e, 0x2a, 0x7e}}},
1139 { UUID_CONTEXT_VPN
, {0x9b9f7bbe, 0x8952, 0x44b7, {0x83, 0xac, 0xca, 0x41, 0x31, 0x8d, 0xf7, 0xa0}}},
1140 { UUID_CONTEXT_VOICE
, {0x88918294, 0x0ef4, 0x4396, {0x8c, 0xca, 0xa8, 0x58, 0x8f, 0xbc, 0x02, 0xb2}}},
1141 { UUID_CONTEXT_VIDEO_SHARE
, {0x05a2a716, 0x7c34, 0x4b4d, {0x9a, 0x91, 0xc5, 0xef, 0x0c, 0x7a, 0xaa, 0xcc}}},
1142 { UUID_CONTEXT_PURCHASE
, {0xb3272496, 0xac6c, 0x422b, {0xa8, 0xc0, 0xac, 0xf6, 0x87, 0xa2, 0x72, 0x17}}},
1143 { UUID_CONTEXT_IMS
, {0x21610D01, 0x3074, 0x4BCE, {0x94, 0x25, 0xB5, 0x3A, 0x07, 0xD6, 0x97, 0xD6}}},
1144 { UUID_CONTEXT_MMS
, {0x46726664, 0x7269, 0x6bc6, {0x96, 0x24, 0xd1, 0xd3, 0x53, 0x89, 0xac, 0xa9}}},
1145 { UUID_CONTEXT_LOCAL
, {0xa57a9afc, 0xb09f, 0x45d7, {0xbb, 0x40, 0x03, 0x3c, 0x39, 0xf6, 0x0d, 0xb9}}}
1148 static const value_string mbim_context_type_vals
[] = {
1149 { UUID_CONTEXT_NONE
, "None"},
1150 { UUID_CONTEXT_INTERNET
, "Internet"},
1151 { UUID_CONTEXT_VPN
, "VPN"},
1152 { UUID_CONTEXT_VOICE
, "Voice"},
1153 { UUID_CONTEXT_VIDEO_SHARE
, "Video Share"},
1154 { UUID_CONTEXT_PURCHASE
, "Purchase"},
1155 { UUID_CONTEXT_IMS
, "IMS"},
1156 { UUID_CONTEXT_MMS
, "MMS"},
1157 { UUID_CONTEXT_LOCAL
, "Local"},
1161 static const int *mbim_ip_configuration_info_ipv4_configuration_available_fields
[] = {
1162 &hf_mbim_ip_configuration_info_ipv4_configuration_available_address
,
1163 &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway
,
1164 &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns
,
1165 &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu
,
1169 static const int *mbim_ip_configuration_info_ipv6_configuration_available_fields
[] = {
1170 &hf_mbim_ip_configuration_info_ipv6_configuration_available_address
,
1171 &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway
,
1172 &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns
,
1173 &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu
,
1177 static const int *mbim_device_service_element_dss_payload_fields
[] = {
1178 &hf_mbim_device_service_element_dss_payload_host_device
,
1179 &hf_mbim_device_service_element_dss_payload_device_host
,
1183 static const value_string mbim_network_idle_hint_states_vals
[] = {
1189 static const value_string mbim_emergency_mode_states_vals
[] = {
1195 static const value_string mbim_sms_storage_state_vals
[] = {
1196 { 0, "Not Initialized"},
1197 { 1, "Initialized"},
1201 #define MBIM_SMS_FORMAT_PDU 0
1202 #define MBIM_SMS_FORMAT_CDMA 1
1204 static const value_string mbim_sms_format_vals
[] = {
1205 { MBIM_SMS_FORMAT_PDU
, "PDU"},
1206 { MBIM_SMS_FORMAT_CDMA
, "CDMA"},
1210 static const value_string mbim_sms_flag_vals
[] = {
1220 static const value_string mbim_sms_cdma_lang_vals
[] = {
1232 static const value_string mbim_sms_cdma_encoding_vals
[] = {
1235 { 2, "7 Bit ASCII"},
1240 { 7, "Latin Hebrew"},
1246 static const value_string mbim_sms_message_status_vals
[] = {
1254 static const int *mbim_sms_status_info_flags_fields
[] = {
1255 &hf_mbim_sms_status_info_flags_message_store_full
,
1256 &hf_mbim_sms_status_info_flags_new_message
,
1260 static const value_string mbim_ussd_action_vals
[] = {
1267 static const value_string mbim_ussd_response_vals
[] = {
1268 { 0, "No Action Required"},
1269 { 1, "Action Required"},
1270 { 2, "Terminated By NW"},
1271 { 3, "Other Local Client"},
1272 { 4, "Operation Not Supported"},
1273 { 5, "Network Time Out"},
1277 static const value_string mbim_ussd_session_state_vals
[] = {
1278 { 0, "New Session"},
1279 { 1, "Existing Session"},
1283 static const value_string mbim_phonebook_state_vals
[] = {
1284 { 0, "Not Initialized"},
1285 { 1, "Initialized"},
1289 static const value_string mbim_phonebook_flag_vals
[] = {
1295 static const value_string mbim_phonebook_write_flag_vals
[] = {
1302 static const value_string mbim_stk_pac_profile_vals
[] = {
1303 { 0, "Not Handled By Function Cannot Be Handled By Host"},
1304 { 1, "Not Handled By Function May Be Handled By Host"},
1305 { 2, "Handled By Function Only Transparent To Host"},
1306 { 3, "Handled By Function Notification To Host Possible"},
1307 { 4, "Handled By Function Notification To Host Enabled"},
1308 { 5, "Handled By Function Can Be Overridden By Host"},
1309 { 6, "Handled ByHostFunction Not Able To Handle"},
1310 { 7, "Handled ByHostFunction Able To Handle"},
1315 static const value_string mbim_stk_pac_type_vals
[] = {
1316 { 0, "Proactive Command"},
1317 { 1, "Notification"},
1321 static const value_string mbim_dss_link_state_vals
[] = {
1327 static const int *mbim_multicarrier_capabilities_fields
[] = {
1328 &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan
,
1329 &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot
,
1333 static const value_string mbim_geoid_vals
[] = {
1334 { 0x2, "Antigua and Barbuda"},
1335 { 0x3, "Afghanistan"},
1337 { 0x5, "Azerbaijan"},
1342 { 0xA, "American Samoa"},
1343 { 0xB, "Argentina"},
1344 { 0xC, "Australia"},
1347 { 0x12, "Barbados"},
1348 { 0x13, "Botswana"},
1351 { 0x16, "Bahamas, The"},
1352 { 0x17, "Bangladesh"},
1354 { 0x19, "Bosnia and Herzegovina"},
1359 { 0x1E, "Solomon Islands"},
1362 { 0x23, "Bulgaria"},
1366 { 0x28, "Cambodia"},
1368 { 0x2A, "Sri Lanka"},
1370 { 0x2C, "Congo (DRC)"},
1373 { 0x31, "Cameroon"},
1375 { 0x33, "Colombia"},
1376 { 0x36, "Costa Rica"},
1377 { 0x37, "Central African Republic"},
1379 { 0x39, "Cape Verde"},
1382 { 0x3E, "Djibouti"},
1383 { 0x3F, "Dominica"},
1384 { 0x41, "Dominican Republic"},
1388 { 0x45, "Equatorial Guinea"},
1391 { 0x48, "El Salvador"},
1392 { 0x49, "Ethiopia"},
1393 { 0x4B, "Czech Republic"},
1395 { 0x4E, "Fiji Islands"},
1396 { 0x50, "Micronesia"},
1397 { 0x51, "Faroe Islands"},
1399 { 0x56, "Gambia, The"},
1403 { 0x5A, "Gibraltar"},
1405 { 0x5D, "Greenland"},
1408 { 0x63, "Guatemala"},
1412 { 0x68, "Hong Kong S.A.R."},
1413 { 0x6A, "Honduras"},
1417 { 0x6F, "Indonesia"},
1419 { 0x72, "British Indian Ocean Territory"},
1423 { 0x77, "Cote d'Ivoire"},
1427 { 0x7D, "Jan Mayen"},
1429 { 0x7F, "Johnston Atoll"},
1431 { 0x82, "Kyrgyzstan"},
1432 { 0x83, "North Korea"},
1433 { 0x85, "Kiribati"},
1436 { 0x89, "Kazakhstan"},
1440 { 0x8D, "Lithuania"},
1442 { 0x8F, "Slovakia"},
1443 { 0x91, "Liechtenstein"},
1445 { 0x93, "Luxembourg"},
1447 { 0x95, "Madagascar"},
1448 { 0x97, "Macao S.A.R."},
1450 { 0x9A, "Mongolia"},
1455 { 0xA0, "Mauritius"},
1456 { 0xA2, "Mauritania"},
1459 { 0xA5, "Maldives"},
1461 { 0xA7, "Malaysia"},
1462 { 0xA8, "Mozambique"},
1466 { 0xB0, "Netherlands"},
1470 { 0xB5, "Suriname"},
1471 { 0xB6, "Nicaragua"},
1472 { 0xB7, "New Zealand"},
1473 { 0xB8, "Palestinian Authority"},
1474 { 0xB9, "Paraguay"},
1476 { 0xBE, "Pakistan"},
1479 { 0xC1, "Portugal"},
1480 { 0xC2, "Papua New Guinea"},
1482 { 0xC4, "Guinea-Bissau"},
1485 { 0xC7, "Marshall Islands"},
1487 { 0xC9, "Philippines"},
1488 { 0xCA, "Puerto Rico"},
1491 { 0xCD, "Saudi Arabia"},
1492 { 0xCE, "St. Pierre and Miquelon"},
1493 { 0xCF, "St. Kitts and Nevis"},
1494 { 0xD0, "Seychelles"},
1495 { 0xD1, "South Africa"},
1497 { 0xD4, "Slovenia"},
1498 { 0xD5, "Sierra Leone"},
1499 { 0xD6, "San Marino"},
1500 { 0xD7, "Singapore"},
1503 { 0xDA, "St. Lucia"},
1505 { 0xDC, "Svalbard"},
1508 { 0xDF, "Switzerland"},
1509 { 0xE0, "United Arab Emirates"},
1510 { 0xE1, "Trinidad and Tobago"},
1511 { 0xE3, "Thailand"},
1512 { 0xE4, "Tajikistan"},
1515 { 0xE9, "Sao Tome and Principe"},
1520 { 0xEE, "Turkmenistan"},
1521 { 0xEF, "Tanzania"},
1524 { 0xF2, "United Kingdom"},
1525 { 0xF4, "United States"},
1526 { 0xF5, "Burkina Faso"},
1528 { 0xF7, "Uzbekistan"},
1529 { 0xF8, "St. Vincent and the Grenadines"},
1530 { 0xF9, "Venezuela"},
1532 { 0xFC, "Virgin Islands"},
1533 { 0xFD, "Vatican City"},
1535 { 0x101, "Western Sahara (disputed)"},
1536 { 0x102, "Wake Island"},
1538 { 0x104, "Swaziland"},
1541 { 0x108, "Zimbabwe"},
1542 { 0x10D, "Serbia and Montenegro (Former)"},
1543 { 0x10E, "Montenegro"},
1545 { 0x111, "Curacao"},
1546 { 0x114, "South Sudan"},
1547 { 0x12C, "Anguilla"},
1548 { 0x12D, "Antarctica"},
1550 { 0x12F, "Ascension Island"},
1551 { 0x130, "Ashmore and Cartier Islands"},
1552 { 0x131, "Baker Island"},
1553 { 0x132, "Bouvet Island"},
1554 { 0x133, "Cayman Islands"},
1555 { 0x135, "Christmas Island"},
1556 { 0x136, "Clipperton Island"},
1557 { 0x137, "Cocos (Keeling) Islands"},
1558 { 0x138, "Cook Islands"},
1559 { 0x139, "Coral Sea Islands"},
1560 { 0x13A, "Diego Garcia"},
1561 { 0x13B, "Falkland Islands (Islas Malvinas)"},
1562 { 0x13D, "French Guiana"},
1563 { 0x13E, "French Polynesia"},
1564 { 0x13F, "French Southern and Antarctic Lands"},
1565 { 0x141, "Guadeloupe"},
1567 { 0x143, "Guantanamo Bay"},
1568 { 0x144, "Guernsey"},
1569 { 0x145, "Heard Island and McDonald Islands"},
1570 { 0x146, "Howland Island"},
1571 { 0x147, "Jarvis Island"},
1573 { 0x149, "Kingman Reef"},
1574 { 0x14A, "Martinique"},
1575 { 0x14B, "Mayotte"},
1576 { 0x14C, "Montserrat"},
1577 { 0x14E, "New Caledonia"},
1579 { 0x150, "Norfolk Island"},
1580 { 0x151, "Northern Mariana Islands"},
1581 { 0x152, "Palmyra Atoll"},
1582 { 0x153, "Pitcairn Islands"},
1583 { 0x154, "Rota Island"},
1585 { 0x156, "South Georgia and the South Sandwich Islands"},
1586 { 0x157, "St. Helena"},
1587 { 0x15A, "Tinian Island"},
1588 { 0x15B, "Tokelau"},
1589 { 0x15C, "Tristan da Cunha"},
1590 { 0x15D, "Turks and Caicos Islands"},
1591 { 0x15F, "Virgin Islands, British"},
1592 { 0x160, "Wallis and Futuna"},
1593 { 0x3B16, "Man, Isle of"},
1594 { 0x4CA2, "Macedonia, Former Yugoslav Republic of"},
1595 { 0x52FA, "Midway Islands"},
1596 { 0x78F7, "Sint Maarten (Dutch part)"},
1597 { 0x7BDA, "Saint Martin (French part)"},
1598 { 0x6F60E7, "Democratic Republic of Timor-Leste"},
1599 { 0x9906F5, "Aland Islands"},
1600 { 0x9A55C4F, "Saint Barthelemy"},
1601 { 0x9A55D40, "U.S. Minor Outlying Islands"},
1602 { 0x9A55D42, "Bonaire, Saint Eustatius and Saba"},
1605 static value_string_ext mbim_geoid_vals_ext
= VALUE_STRING_EXT_INIT(mbim_geoid_vals
);
1607 static const int *mbim_descriptor_network_capabilities_fields
[] = {
1608 &hf_mbim_descriptor_network_capabilities_max_datagram_size
,
1609 &hf_mbim_descriptor_network_capabilities_ntb_input_size
,
1614 mbim_dissect_service_id_uuid(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint hf
, gint
*offset
)
1619 tvb_get_ntohguid(tvb
, *offset
, &uuid
);
1621 for (i
= 0; i
< array_length(mbim_uuid_service_id_vals
); i
++) {
1622 if (memcmp(&uuid
, &(mbim_uuid_service_id_vals
[i
].uuid
), sizeof(e_guid_t
)) == 0) {
1626 proto_tree_add_guid_format_value(tree
, hf
, tvb
, *offset
, 16, &uuid
, "%s (%s)",
1627 val_to_str_const(i
, mbim_service_id_vals
, "Unknown"), guid_to_str(&uuid
));
1634 mbim_dissect_cid(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint
*offset
, guint8 uuid_idx
)
1638 cid
= tvb_get_letohl(tvb
, *offset
);
1640 case UUID_BASIC_CONNECT
:
1641 proto_tree_add_uint(tree
, hf_mbim_uuid_basic_connect_cid
, tvb
, *offset
, 4, cid
);
1642 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s",
1643 val_to_str_ext_const(cid
, &mbim_uuid_basic_connect_cid_vals_ext
, "Unknown"));
1646 proto_tree_add_uint(tree
, hf_mbim_uuid_sms_cid
, tvb
, *offset
, 4, cid
);
1647 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_sms_cid_vals
, "Unknown"));
1650 proto_tree_add_uint(tree
, hf_mbim_uuid_ussd_cid
, tvb
, *offset
, 4, cid
);
1651 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_ussd_cid_vals
, "Unknown"));
1653 case UUID_PHONEBOOK
:
1654 proto_tree_add_uint(tree
, hf_mbim_uuid_phonebook_cid
, tvb
, *offset
, 4, cid
);
1655 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_phonebook_cid_vals
, "Unknown"));
1658 proto_tree_add_uint(tree
, hf_mbim_uuid_stk_cid
, tvb
, *offset
, 4, cid
);
1659 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_stk_cid_vals
, "Unknown"));
1662 proto_tree_add_uint(tree
, hf_mbim_uuid_auth_cid
, tvb
, *offset
, 4, cid
);
1663 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_auth_cid_vals
, "Unknown"));
1666 proto_tree_add_uint(tree
, hf_mbim_uuid_dss_cid
, tvb
, *offset
, 4, cid
);
1667 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_dss_cid_vals
, "Unknown"));
1669 case UUID_MULTICARRIER
:
1670 proto_tree_add_uint(tree
, hf_mbim_uuid_multicarrier_cid
, tvb
, *offset
, 4, cid
);
1671 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_multicarrier_cid_vals
, "Unknown"));
1673 case UUID_MS_HOSTSHUTDOWN
:
1674 proto_tree_add_uint(tree
, hf_mbim_uuid_ms_hostshutdown_cid
, tvb
, *offset
, 4, cid
);
1675 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_ms_hostshutdown_cid_vals
, "Unknown"));
1678 proto_tree_add_uint(tree
, hf_mbim_uuid_msfwid_cid
, tvb
, *offset
, 4, cid
);
1679 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s", val_to_str_const(cid
, mbim_uuid_msfwid_cid_vals
, "Unknown"));
1682 proto_tree_add_uint(tree
, hf_mbim_cid
, tvb
, *offset
, 4, cid
);
1690 mbim_dissect_device_caps_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
,
1691 struct mbim_conv_info
*mbim_conv
)
1694 guint32 custom_class_offset
, custom_class_size
, device_id_offset
, device_id_size
,
1695 fw_info_offset
, fw_info_size
, hw_info_offset
, hw_info_size
;
1697 base_offset
= offset
;
1698 proto_tree_add_item(tree
, hf_mbim_device_caps_info_device_type
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1700 mbim_conv
->cellular_class
= tvb_get_letohl(tvb
, offset
);
1701 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_cellular_class
, tvb
, offset
, 4,
1702 mbim_conv
->cellular_class
);
1704 proto_tree_add_item(tree
, hf_mbim_device_caps_info_voice_class
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1706 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_device_caps_info_sim_class
, ett_mbim_bitmap
,
1707 mbim_device_caps_info_sim_class_fields
, ENC_LITTLE_ENDIAN
);
1709 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_device_caps_info_data_class
, ett_mbim_bitmap
,
1710 mbim_data_class_fields
, ENC_LITTLE_ENDIAN
);
1712 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_device_caps_info_sms_caps
, ett_mbim_bitmap
,
1713 mbim_device_caps_info_sms_caps_fields
, ENC_LITTLE_ENDIAN
);
1715 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_device_caps_info_control_caps
, ett_mbim_bitmap
,
1716 mbim_device_caps_info_control_caps_fields
, ENC_LITTLE_ENDIAN
);
1718 proto_tree_add_item(tree
, hf_mbim_device_caps_info_max_sessions
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1720 custom_class_offset
= tvb_get_letohl(tvb
, offset
);
1721 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_custom_data_class_offset
, tvb
, offset
, 4, custom_class_offset
);
1723 custom_class_size
= tvb_get_letohl(tvb
, offset
);
1724 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_custom_data_class_size
, tvb
, offset
, 4, custom_class_size
);
1726 device_id_offset
= tvb_get_letohl(tvb
, offset
);
1727 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_device_id_offset
, tvb
, offset
, 4, device_id_offset
);
1729 device_id_size
= tvb_get_letohl(tvb
, offset
);
1730 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_device_id_size
, tvb
, offset
, 4, device_id_size
);
1732 fw_info_offset
= tvb_get_letohl(tvb
, offset
);
1733 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_fw_info_offset
, tvb
, offset
, 4, fw_info_offset
);
1735 fw_info_size
= tvb_get_letohl(tvb
, offset
);
1736 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_fw_info_size
, tvb
, offset
, 4, fw_info_size
);
1738 hw_info_offset
= tvb_get_letohl(tvb
, offset
);
1739 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_hw_info_offset
, tvb
, offset
, 4, hw_info_offset
);
1741 hw_info_size
= tvb_get_letohl(tvb
, offset
);
1742 proto_tree_add_uint(tree
, hf_mbim_device_caps_info_hw_info_size
, tvb
, offset
, 4, hw_info_size
);
1744 if (custom_class_offset
&& custom_class_size
) {
1745 proto_tree_add_item(tree
, hf_mbim_device_caps_info_custom_data_class
, tvb
, base_offset
+ custom_class_offset
,
1746 custom_class_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1748 if (device_id_offset
&& device_id_size
) {
1749 proto_tree_add_item(tree
, hf_mbim_device_caps_info_device_id
, tvb
, base_offset
+ device_id_offset
,
1750 device_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1752 if (fw_info_offset
&& fw_info_size
) {
1753 proto_tree_add_item(tree
, hf_mbim_device_caps_info_fw_info
, tvb
, base_offset
+ fw_info_offset
,
1754 fw_info_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1756 if (hw_info_offset
&& hw_info_size
) {
1757 proto_tree_add_item(tree
, hf_mbim_device_caps_info_hw_info
, tvb
, base_offset
+ hw_info_offset
,
1758 hw_info_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1763 mbim_dissect_subscriber_ready_status(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
1766 proto_tree
*subtree
;
1767 gint base_offset
, tel_nb_ref_list_offset
= 0;
1768 guint32 i
, subscriber_id_offset
, subscriber_id_size
, sim_icc_id_offset
, sim_icc_id_size
, elem_count
,
1769 tel_nb_offset
, tel_nb_size
;
1771 base_offset
= offset
;
1772 proto_tree_add_item(tree
, hf_mbim_subscr_ready_status_ready_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1774 subscriber_id_offset
= tvb_get_letohl(tvb
, offset
);
1775 proto_tree_add_uint(tree
, hf_mbim_subscr_ready_status_susbcr_id_offset
, tvb
, offset
, 4, subscriber_id_offset
);
1777 subscriber_id_size
= tvb_get_letohl(tvb
, offset
);
1778 proto_tree_add_uint(tree
, hf_mbim_subscr_ready_status_susbcr_id_size
, tvb
, offset
, 4, subscriber_id_size
);
1780 sim_icc_id_offset
= tvb_get_letohl(tvb
, offset
);
1781 proto_tree_add_uint(tree
, hf_mbim_subscr_ready_status_sim_icc_id_offset
, tvb
, offset
, 4, sim_icc_id_offset
);
1783 sim_icc_id_size
= tvb_get_letohl(tvb
, offset
);
1784 proto_tree_add_uint(tree
, hf_mbim_subscr_ready_status_sim_icc_id_size
, tvb
, offset
, 4, sim_icc_id_size
);
1786 proto_tree_add_item(tree
, hf_mbim_subscr_ready_status_ready_info
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1788 elem_count
= tvb_get_letohl(tvb
, offset
);
1789 proto_tree_add_uint(tree
, hf_mbim_subscr_ready_status_elem_count
, tvb
, offset
, 4, elem_count
);
1792 tel_nb_ref_list_offset
= offset
;
1793 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*elem_count
, "Telephone Numbers Ref List");
1794 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
1795 for (i
= 0; i
< elem_count
; i
++) {
1796 proto_tree_add_item(subtree
, hf_mbim_subscr_ready_status_tel_nb_offset
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1798 proto_tree_add_item(subtree
, hf_mbim_subscr_ready_status_tel_nb_size
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1802 if (subscriber_id_offset
&& subscriber_id_size
) {
1803 proto_tree_add_item(tree
, hf_mbim_subscr_ready_status_susbcr_id
, tvb
, base_offset
+ subscriber_id_offset
,
1804 subscriber_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1806 if (sim_icc_id_offset
&& sim_icc_id_size
) {
1807 proto_tree_add_item(tree
, hf_mbim_subscr_ready_status_sim_icc_id
, tvb
, base_offset
+ sim_icc_id_offset
,
1808 sim_icc_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1810 for (i
= 0; i
< elem_count
; i
++) {
1811 tel_nb_offset
= tvb_get_letohl(tvb
, tel_nb_ref_list_offset
+ 8*i
);
1812 tel_nb_size
= tvb_get_letohl(tvb
, tel_nb_ref_list_offset
+ 8*i
+ 4);
1813 if (tel_nb_offset
&& tel_nb_size
) {
1814 proto_tree_add_item(tree
, hf_mbim_subscr_ready_status_tel_nb
, tvb
, base_offset
+ tel_nb_offset
,
1815 tel_nb_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1821 mbim_dissect_set_pin(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
1824 guint32 pin_offset
, pin_size
, new_pin_offset
, new_pin_size
;
1826 base_offset
= offset
;
1827 proto_tree_add_item(tree
, hf_mbim_set_pin_pin_type
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1829 proto_tree_add_item(tree
, hf_mbim_set_pin_pin_pin_operation
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1831 pin_offset
= tvb_get_letohl(tvb
, offset
);
1832 proto_tree_add_uint(tree
, hf_mbim_set_pin_pin_pin_offset
, tvb
, offset
, 4, pin_offset
);
1834 pin_size
= tvb_get_letohl(tvb
, offset
);
1835 proto_tree_add_uint(tree
, hf_mbim_set_pin_pin_pin_size
, tvb
, offset
, 4, pin_size
);
1837 new_pin_offset
= tvb_get_letohl(tvb
, offset
);
1838 proto_tree_add_uint(tree
, hf_mbim_set_pin_new_pin_offset
, tvb
, offset
, 4, new_pin_offset
);
1840 new_pin_size
= tvb_get_letohl(tvb
, offset
);
1841 proto_tree_add_uint(tree
, hf_mbim_set_pin_new_pin_size
, tvb
, offset
, 4, new_pin_size
);
1843 if (pin_offset
&& pin_size
) {
1844 proto_tree_add_item(tree
, hf_mbim_set_pin_pin
, tvb
, base_offset
+ pin_offset
,
1845 pin_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1847 if (new_pin_offset
&& new_pin_size
) {
1848 proto_tree_add_item(tree
, hf_mbim_set_pin_new_pin
, tvb
, base_offset
+ new_pin_offset
,
1849 new_pin_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1854 mbim_dissect_pin_list_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
1856 const char *pin_list
[10] = { "PIN 1", "PIN 2", "Device SIM PIN", "Device First SIM PIN", "Network PIN",
1857 "Network Subset PIN", "Service Provider PIN", "Corporate PIN", "Subsidy Lock",
1862 proto_tree
*subtree
;
1864 for (i
= 0; i
< 10; i
++) {
1865 ti
= proto_tree_add_text(tree
, tvb
, offset
, 16, "%s", pin_list
[i
]);
1866 subtree
= proto_item_add_subtree(ti
, ett_mbim_pin
);
1867 proto_tree_add_item(subtree
, hf_mbim_pin_list_pin_mode
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1869 proto_tree_add_item(subtree
, hf_mbim_pin_list_pin_format
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1871 length
= tvb_get_letohl(tvb
, offset
);
1872 if (length
== 0xffffffff) {
1873 proto_tree_add_uint_format_value(subtree
, hf_mbim_pin_list_pin_length_min
, tvb
, offset
, 4,
1874 length
, "Not available (0xffffffff)");
1876 proto_tree_add_uint(subtree
, hf_mbim_pin_list_pin_length_min
, tvb
, offset
, 4, length
);
1879 length
= tvb_get_letohl(tvb
, offset
);
1880 if (length
== 0xffffffff) {
1881 proto_tree_add_uint_format_value(subtree
, hf_mbim_pin_list_pin_length_max
, tvb
, offset
, 4,
1882 length
, "Not available (0xffffffff)");
1884 proto_tree_add_uint(subtree
, hf_mbim_pin_list_pin_length_max
, tvb
, offset
, 4, length
);
1891 mbim_dissect_provider(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
1894 guint32 provider_id_offset
, provider_id_size
, provider_name_offset
, provider_name_size
;
1896 base_offset
= offset
;
1897 provider_id_offset
= tvb_get_letohl(tvb
, offset
);
1898 proto_tree_add_uint(tree
, hf_mbim_provider_provider_id_offset
, tvb
, offset
, 4, provider_id_offset
);
1900 provider_id_size
= tvb_get_letohl(tvb
, offset
);
1901 proto_tree_add_uint(tree
, hf_mbim_provider_provider_id_size
, tvb
, offset
, 4, provider_id_size
);
1903 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_provider_state
, ett_mbim_bitmap
,
1904 mbim_provider_state_fields
, ENC_LITTLE_ENDIAN
);
1906 provider_name_offset
= tvb_get_letohl(tvb
, offset
);
1907 proto_tree_add_uint(tree
, hf_mbim_provider_provider_name_offset
, tvb
, offset
, 4, provider_name_offset
);
1909 provider_name_size
= tvb_get_letohl(tvb
, offset
);
1910 proto_tree_add_uint(tree
, hf_mbim_provider_provider_name_size
, tvb
, offset
, 4, provider_name_size
);
1912 proto_tree_add_item (tree
, hf_mbim_provider_cellular_class
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1914 proto_tree_add_item (tree
, hf_mbim_provider_rssi
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1916 proto_tree_add_item (tree
, hf_mbim_provider_error_rate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1918 if (provider_id_offset
&& provider_id_size
) {
1919 proto_tree_add_item(tree
, hf_mbim_provider_provider_id
, tvb
, base_offset
+ provider_id_offset
,
1920 provider_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1922 if (provider_name_offset
&& provider_name_size
) {
1923 proto_tree_add_item(tree
, hf_mbim_provider_provider_name
, tvb
, base_offset
+ provider_name_offset
,
1924 provider_name_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1929 mbim_dissect_providers(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
1932 proto_tree
*subtree
;
1934 guint32 i
, elem_count
, providers_list_offset
, provider_offset
, provider_size
;
1937 base_offset
= offset
;
1938 elem_count
= tvb_get_letohl(tvb
, offset
);
1939 proto_tree_add_uint(tree
, hf_mbim_providers_elem_count
, tvb
, offset
, 4, elem_count
);
1942 providers_list_offset
= offset
;
1943 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*elem_count
, "Providers Ref List");
1944 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
1945 for (i
= 0; i
< elem_count
; i
++) {
1946 proto_tree_add_item(subtree
, hf_mbim_providers_provider_offset
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1948 proto_tree_add_item(subtree
, hf_mbim_providers_provider_size
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1951 for (i
= 0; i
< elem_count
; i
++) {
1952 provider_offset
= tvb_get_letohl(tvb
, providers_list_offset
+ 8*i
);
1953 provider_size
= tvb_get_letohl(tvb
, providers_list_offset
+ 8*i
+ 4);
1954 if (provider_offset
&& provider_size
) {
1955 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ provider_offset
, provider_size
, "Provider #%u", i
+1);
1956 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
1957 mbim_dissect_provider(tvb
, pinfo
, subtree
, base_offset
+ provider_offset
);
1964 mbim_dissect_set_register_state(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
1967 guint32 provider_id_offset
, provider_id_size
;
1969 base_offset
= offset
;
1970 provider_id_offset
= tvb_get_letohl(tvb
, offset
);
1971 proto_tree_add_uint(tree
, hf_mbim_set_register_state_provider_id_offset
, tvb
, offset
, 4, provider_id_offset
);
1973 provider_id_size
= tvb_get_letohl(tvb
, offset
);
1974 proto_tree_add_uint(tree
, hf_mbim_set_register_state_provider_id_size
, tvb
, offset
, 4, provider_id_size
);
1976 proto_tree_add_item(tree
, hf_mbim_set_register_state_register_action
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1978 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_register_state_data_class
, ett_mbim_bitmap
,
1979 mbim_data_class_fields
, ENC_LITTLE_ENDIAN
);
1981 if (provider_id_offset
&& provider_id_size
) {
1982 proto_tree_add_item(tree
, hf_mbim_set_register_state_provider_id
, tvb
, base_offset
+ provider_id_offset
,
1983 provider_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
1988 mbim_dissect_registration_state_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
1991 guint32 provider_id_offset
, provider_id_size
, provider_name_offset
, provider_name_size
,
1992 roaming_text_offset
, roaming_text_size
, nw_error
;
1994 base_offset
= offset
;
1995 nw_error
= tvb_get_letohl(tvb
, offset
);
1996 if (nw_error
== 0) {
1997 proto_tree_add_uint_format_value(tree
, hf_mbim_registration_state_info_nw_error
, tvb
, offset
, 4, nw_error
, "Success (0)");
1999 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_nw_error
, tvb
, offset
, 4, nw_error
);
2002 proto_tree_add_item(tree
, hf_mbim_registration_state_info_register_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2004 proto_tree_add_item(tree
, hf_mbim_registration_state_info_register_mode
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2006 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_registration_state_info_available_data_classes
, ett_mbim_bitmap
,
2007 mbim_data_class_fields
, ENC_LITTLE_ENDIAN
);
2009 proto_tree_add_item(tree
, hf_mbim_registration_state_info_current_cellular_class
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2011 provider_id_offset
= tvb_get_letohl(tvb
, offset
);
2012 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_provider_id_offset
, tvb
, offset
, 4, provider_id_offset
);
2014 provider_id_size
= tvb_get_letohl(tvb
, offset
);
2015 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_provider_id_size
, tvb
, offset
, 4, provider_id_size
);
2017 provider_name_offset
= tvb_get_letohl(tvb
, offset
);
2018 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_provider_name_offset
, tvb
, offset
, 4, provider_name_offset
);
2020 provider_name_size
= tvb_get_letohl(tvb
, offset
);
2021 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_provider_name_size
, tvb
, offset
, 4, provider_name_size
);
2023 roaming_text_offset
= tvb_get_letohl(tvb
, offset
);
2024 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_roaming_text_offset
, tvb
, offset
, 4, roaming_text_offset
);
2026 roaming_text_size
= tvb_get_letohl(tvb
, offset
);
2027 proto_tree_add_uint(tree
, hf_mbim_registration_state_info_roaming_text_size
, tvb
, offset
, 4, roaming_text_size
);
2029 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_registration_state_info_registration_flags
, ett_mbim_bitmap
,
2030 mbim_registration_state_info_registration_flags_fields
, ENC_LITTLE_ENDIAN
);
2032 if (provider_id_offset
&& provider_id_size
) {
2033 proto_tree_add_item(tree
, hf_mbim_registration_state_info_provider_id
, tvb
, base_offset
+ provider_id_offset
,
2034 provider_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2036 if (provider_name_offset
&& provider_name_size
) {
2037 proto_tree_add_item(tree
, hf_mbim_registration_state_info_provider_name
, tvb
, base_offset
+ provider_name_offset
,
2038 provider_name_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2040 if (roaming_text_offset
&& roaming_text_size
) {
2041 proto_tree_add_item(tree
, hf_mbim_registration_state_info_roaming_text
, tvb
, base_offset
+ roaming_text_offset
,
2042 roaming_text_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2047 mbim_dissect_packet_service_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2052 nw_error
= tvb_get_letohl(tvb
, offset
);
2053 if (nw_error
== 0) {
2054 proto_tree_add_uint_format_value(tree
, hf_mbim_packet_service_info_nw_error
, tvb
, offset
, 4, nw_error
, "Success (0)");
2056 proto_tree_add_uint(tree
, hf_mbim_packet_service_info_nw_error
, tvb
, offset
, 4, nw_error
);
2059 proto_tree_add_item(tree
, hf_mbim_packet_service_info_packet_service_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2061 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_packet_service_info_highest_available_data_class
, ett_mbim_bitmap
,
2062 mbim_data_class_fields
, ENC_LITTLE_ENDIAN
);
2064 ti
= proto_tree_add_item(tree
, hf_mbim_packet_service_info_uplink_speed
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2065 proto_item_append_text(ti
, " b/s");
2067 ti
= proto_tree_add_item(tree
, hf_mbim_packet_service_info_downlink_speed
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2068 proto_item_append_text(ti
, " b/s");
2073 mbim_dissect_set_signal_state(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2076 guint32 error_rate_threshold
;
2078 ti
= proto_tree_add_item(tree
, hf_mbim_set_signal_state_signal_strength_interval
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2079 proto_item_append_text(ti
, " s");
2081 proto_tree_add_item(tree
, hf_mbim_set_signal_state_rssi_threshold
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2083 error_rate_threshold
= tvb_get_letohl(tvb
, offset
);
2084 if (error_rate_threshold
== 0xffffffff) {
2085 proto_tree_add_uint_format_value(tree
, hf_mbim_set_signal_state_error_rate_threshold
, tvb
, offset
, 4,
2086 error_rate_threshold
, "No report (0xffffffff)");
2088 proto_tree_add_item(tree
, hf_mbim_set_signal_state_error_rate_threshold
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2093 mbim_dissect_signal_state_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2096 guint32 error_rate_threshold
;
2098 proto_tree_add_item(tree
, hf_mbim_signal_state_info_rssi
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2100 proto_tree_add_item(tree
, hf_mbim_signal_state_info_error_rate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2102 ti
= proto_tree_add_item(tree
, hf_mbim_signal_state_info_signal_strength_interval
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2103 proto_item_append_text(ti
, " s");
2105 proto_tree_add_item(tree
, hf_mbim_signal_state_info_rssi_threshold
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2107 error_rate_threshold
= tvb_get_letohl(tvb
, offset
);
2108 if (error_rate_threshold
== 0xffffffff) {
2109 proto_tree_add_uint_format_value(tree
, hf_mbim_signal_state_info_error_rate_threshold
, tvb
, offset
, 4,
2110 error_rate_threshold
, "No report (0xffffffff)");
2112 proto_tree_add_item(tree
, hf_mbim_signal_state_info_error_rate_threshold
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2117 mbim_dissect_context_type_uuid(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint
*offset
)
2122 tvb_get_ntohguid(tvb
, *offset
, &uuid
);
2124 for (i
= 0; i
< array_length(mbim_uuid_context_type_vals
); i
++) {
2125 if (memcmp(&uuid
, &(mbim_uuid_context_type_vals
[i
].uuid
), sizeof(e_guid_t
)) == 0) {
2129 proto_tree_add_guid_format_value(tree
, hf_mbim_context_type
, tvb
, *offset
, 16, &uuid
, "%s (%s)",
2130 val_to_str_const(i
, mbim_context_type_vals
, "Unknown"), guid_to_str(&uuid
));
2137 mbim_dissect_set_connect(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2140 guint32 access_string_offset
, access_string_size
, user_name_offset
, user_name_size
,
2141 password_offset
, password_size
;
2143 base_offset
= offset
;
2144 proto_tree_add_item(tree
, hf_mbim_set_connect_session_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2146 proto_tree_add_item(tree
, hf_mbim_set_connect_activation_command
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2148 access_string_offset
= tvb_get_letohl(tvb
, offset
);
2149 proto_tree_add_uint(tree
, hf_mbim_set_connect_access_string_offset
, tvb
, offset
, 4, access_string_offset
);
2151 access_string_size
= tvb_get_letohl(tvb
, offset
);
2152 proto_tree_add_uint(tree
, hf_mbim_set_connect_access_string_size
, tvb
, offset
, 4, access_string_size
);
2154 user_name_offset
= tvb_get_letohl(tvb
, offset
);
2155 proto_tree_add_uint(tree
, hf_mbim_set_connect_user_name_offset
, tvb
, offset
, 4, user_name_offset
);
2157 user_name_size
= tvb_get_letohl(tvb
, offset
);
2158 proto_tree_add_uint(tree
, hf_mbim_set_connect_user_name_size
, tvb
, offset
, 4, user_name_size
);
2160 password_offset
= tvb_get_letohl(tvb
, offset
);
2161 proto_tree_add_uint(tree
, hf_mbim_set_connect_password_offset
, tvb
, offset
, 4, password_offset
);
2163 password_size
= tvb_get_letohl(tvb
, offset
);
2164 proto_tree_add_uint(tree
, hf_mbim_set_connect_password_size
, tvb
, offset
, 4, password_size
);
2166 proto_tree_add_item(tree
, hf_mbim_set_connect_compression
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2168 proto_tree_add_item(tree
, hf_mbim_set_connect_auth_protocol
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2170 proto_tree_add_item(tree
, hf_mbim_set_connect_ip_type
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2172 mbim_dissect_context_type_uuid(tvb
, pinfo
, tree
, &offset
);
2173 if (access_string_offset
&& access_string_size
) {
2174 proto_tree_add_item(tree
, hf_mbim_set_connect_access_string
, tvb
, base_offset
+ access_string_offset
,
2175 access_string_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2177 if (user_name_offset
&& user_name_size
) {
2178 proto_tree_add_item(tree
, hf_mbim_set_connect_user_name
, tvb
, base_offset
+ user_name_offset
,
2179 user_name_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2181 if (password_offset
&& password_size
) {
2182 proto_tree_add_item(tree
, hf_mbim_set_connect_password
, tvb
, base_offset
+ password_offset
,
2183 password_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2188 mbim_dissect_connect_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2192 proto_tree_add_item(tree
, hf_mbim_connect_info_session_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2194 proto_tree_add_item(tree
, hf_mbim_connect_info_activation_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2196 proto_tree_add_item(tree
, hf_mbim_connect_info_voice_call_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2198 proto_tree_add_item(tree
, hf_mbim_connect_info_ip_type
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2200 mbim_dissect_context_type_uuid(tvb
, pinfo
, tree
, &offset
);
2201 nw_error
= tvb_get_letohl(tvb
, offset
);
2202 if (nw_error
== 0) {
2203 proto_tree_add_uint_format_value(tree
, hf_mbim_connect_info_nw_error
, tvb
, offset
, 4, nw_error
, "Success (0)");
2205 proto_tree_add_uint(tree
, hf_mbim_connect_info_nw_error
, tvb
, offset
, 4, nw_error
);
2210 mbim_dissect_context(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
, gboolean is_set
)
2213 guint32 access_string_offset
, access_string_size
, user_name_offset
, user_name_size
,
2214 password_offset
, password_size
, provider_id_offset
= 0, provider_id_size
= 0;;
2216 base_offset
= offset
;
2217 proto_tree_add_item(tree
, hf_mbim_context_context_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2219 mbim_dissect_context_type_uuid(tvb
, pinfo
, tree
, &offset
);
2220 access_string_offset
= tvb_get_letohl(tvb
, offset
);
2221 proto_tree_add_uint(tree
, hf_mbim_context_access_string_offset
, tvb
, offset
, 4, access_string_offset
);
2223 access_string_size
= tvb_get_letohl(tvb
, offset
);
2224 proto_tree_add_uint(tree
, hf_mbim_context_access_string_size
, tvb
, offset
, 4, access_string_size
);
2226 user_name_offset
= tvb_get_letohl(tvb
, offset
);
2227 proto_tree_add_uint(tree
, hf_mbim_context_user_name_offset
, tvb
, offset
, 4, user_name_offset
);
2229 user_name_size
= tvb_get_letohl(tvb
, offset
);
2230 proto_tree_add_uint(tree
, hf_mbim_context_user_name_size
, tvb
, offset
, 4, user_name_size
);
2232 password_offset
= tvb_get_letohl(tvb
, offset
);
2233 proto_tree_add_uint(tree
, hf_mbim_context_password_offset
, tvb
, offset
, 4, password_offset
);
2235 password_size
= tvb_get_letohl(tvb
, offset
);
2236 proto_tree_add_uint(tree
, hf_mbim_context_password_size
, tvb
, offset
, 4, password_size
);
2238 proto_tree_add_item(tree
, hf_mbim_context_compression
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2240 proto_tree_add_item(tree
, hf_mbim_context_auth_protocol
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2243 provider_id_offset
= tvb_get_letohl(tvb
, offset
);
2244 proto_tree_add_uint(tree
, hf_mbim_context_provider_id_offset
, tvb
, offset
, 4, provider_id_offset
);
2246 provider_id_size
= tvb_get_letohl(tvb
, offset
);
2247 proto_tree_add_uint(tree
, hf_mbim_context_provider_id_size
, tvb
, offset
, 4, provider_id_size
);
2250 if (access_string_offset
&& access_string_size
) {
2251 proto_tree_add_item(tree
, hf_mbim_context_access_string
, tvb
, base_offset
+ access_string_offset
,
2252 access_string_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2254 if (user_name_offset
&& user_name_size
) {
2255 proto_tree_add_item(tree
, hf_mbim_context_user_name
, tvb
, base_offset
+ user_name_offset
,
2256 user_name_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2258 if (password_offset
&& password_size
) {
2259 proto_tree_add_item(tree
, hf_mbim_context_password
, tvb
, base_offset
+ password_offset
,
2260 password_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2262 if (provider_id_offset
&& provider_id_size
) {
2263 proto_tree_add_item(tree
, hf_mbim_context_provider_id
, tvb
, base_offset
+ provider_id_offset
,
2264 provider_id_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2269 mbim_dissect_provisioned_contexts_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2272 proto_tree
*subtree
;
2274 guint32 i
, elem_count
, provisioned_contexts_list_offset
, provisioned_context_offset
, provisioned_context_size
;
2276 base_offset
= offset
;
2277 elem_count
= tvb_get_letohl(tvb
, offset
);
2278 proto_tree_add_uint(tree
, hf_mbim_provisioned_contexts_info_elem_count
, tvb
, offset
, 4, elem_count
);
2281 provisioned_contexts_list_offset
= offset
;
2282 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*elem_count
, "Provisioned Context Ref List");
2283 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2284 for (i
= 0; i
< elem_count
; i
++) {
2285 proto_tree_add_item(subtree
, hf_mbim_provisioned_contexts_info_provisioned_context_offset
,
2286 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2288 proto_tree_add_item(subtree
, hf_mbim_provisioned_contexts_info_provisioned_context_size
,
2289 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2292 for (i
= 0; i
< elem_count
; i
++) {
2293 provisioned_context_offset
= tvb_get_letohl(tvb
, provisioned_contexts_list_offset
+ 8*i
);
2294 provisioned_context_size
= tvb_get_letohl(tvb
, provisioned_contexts_list_offset
+ 8*i
+ 4);
2295 if (provisioned_context_offset
&& provisioned_context_size
) {
2296 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ provisioned_context_offset
,
2297 provisioned_context_size
, "Provisioned Context #%u", i
+1);
2298 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2299 mbim_dissect_context(tvb
, pinfo
, subtree
, base_offset
+ provisioned_context_offset
, FALSE
);
2306 mbim_dissect_ipv4_element(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint
*offset
)
2308 guint32 on_link_prefix_length
;
2311 on_link_prefix_length
= tvb_get_letohl(tvb
, *offset
);
2312 ti
= proto_tree_add_uint(tree
, hf_mbim_ipv4_element_on_link_prefix_length
, tvb
, *offset
, 4, on_link_prefix_length
);
2314 if (on_link_prefix_length
> 32) {
2315 expert_add_info_format(pinfo
, ti
, &ei_mbim_illegal_on_link_prefix_length
,
2316 "Illegal On Link Prefix Length %u (max is 32)", on_link_prefix_length
);
2318 proto_tree_add_item(tree
, hf_mbim_ipv4_element_ipv4_address
, tvb
, *offset
, 4, ENC_NA
);
2323 mbim_dissect_ipv6_element(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint
*offset
)
2325 guint32 on_link_prefix_length
;
2328 on_link_prefix_length
= tvb_get_letohl(tvb
, *offset
);
2329 ti
= proto_tree_add_uint(tree
, hf_mbim_ipv6_element_on_link_prefix_length
, tvb
, *offset
, 4, on_link_prefix_length
);
2331 if (on_link_prefix_length
> 128) {
2332 expert_add_info_format(pinfo
, ti
, &ei_mbim_illegal_on_link_prefix_length
,
2333 "Illegal On Link Prefix Length %u (max is 128)", on_link_prefix_length
);
2335 proto_tree_add_item(tree
, hf_mbim_ipv6_element_ipv6_address
, tvb
, *offset
, 16, ENC_NA
);
2340 mbim_dissect_ip_configuration_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2343 guint32 i
, ipv4_address_count
, ipv4_address_offset
, ipv6_address_count
, ipv6_address_offset
,
2344 ipv4_gateway_offset
, ipv6_gateway_offset
, ipv4_dns_count
, ipv4_dns_offset
,
2345 ipv6_dns_count
, ipv6_dns_offset
;
2347 base_offset
= offset
;
2348 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_session_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2350 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_ip_configuration_info_ipv4_configuration_available
,
2351 ett_mbim_bitmap
, mbim_ip_configuration_info_ipv4_configuration_available_fields
, ENC_LITTLE_ENDIAN
);
2353 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_ip_configuration_info_ipv6_configuration_available
,
2354 ett_mbim_bitmap
, mbim_ip_configuration_info_ipv6_configuration_available_fields
, ENC_LITTLE_ENDIAN
);
2356 ipv4_address_count
= tvb_get_letohl(tvb
, offset
);
2357 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv4_address_count
, tvb
, offset
, 4, ipv4_address_count
);
2359 ipv4_address_offset
= tvb_get_letohl(tvb
, offset
);
2360 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv4_address_offset
, tvb
, offset
, 4, ipv4_address_offset
);
2362 ipv6_address_count
= tvb_get_letohl(tvb
, offset
);
2363 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv6_address_count
, tvb
, offset
, 4, ipv6_address_count
);
2365 ipv6_address_offset
= tvb_get_letohl(tvb
, offset
);
2366 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv6_address_offset
, tvb
, offset
, 4, ipv6_address_offset
);
2368 ipv4_gateway_offset
= tvb_get_letohl(tvb
, offset
);
2369 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv4_gateway_offset
, tvb
, offset
, 4, ipv4_gateway_offset
);
2371 ipv6_gateway_offset
= tvb_get_letohl(tvb
, offset
);
2372 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv6_gateway_offset
, tvb
, offset
, 4, ipv6_gateway_offset
);
2374 ipv4_dns_count
= tvb_get_letohl(tvb
, offset
);
2375 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv4_dns_count
, tvb
, offset
, 4, ipv4_dns_count
);
2377 ipv4_dns_offset
= tvb_get_letohl(tvb
, offset
);
2378 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv4_dns_offset
, tvb
, offset
, 4, ipv4_dns_offset
);
2380 ipv6_dns_count
= tvb_get_letohl(tvb
, offset
);
2381 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv6_dns_count
, tvb
, offset
, 4, ipv6_dns_count
);
2383 ipv6_dns_offset
= tvb_get_letohl(tvb
, offset
);
2384 proto_tree_add_uint(tree
, hf_mbim_ip_configuration_info_ipv6_dns_offset
, tvb
, offset
, 4, ipv6_dns_offset
);
2386 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_ipv4_mtu
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2388 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_ipv6_mtu
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2390 if (ipv4_address_count
&& ipv4_address_offset
) {
2391 offset
= base_offset
+ ipv4_address_offset
;
2392 for (i
= 0; i
< ipv4_address_count
; i
++) {
2393 mbim_dissect_ipv4_element(tvb
, pinfo
, tree
, &offset
);
2396 if (ipv6_address_count
&& ipv6_address_offset
) {
2397 offset
= base_offset
+ ipv6_address_offset
;
2398 for (i
= 0; i
< ipv6_address_count
; i
++) {
2399 mbim_dissect_ipv6_element(tvb
, pinfo
, tree
, &offset
);
2402 if (ipv4_gateway_offset
) {
2403 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_ipv4_gateway
,
2404 tvb
, base_offset
+ ipv4_gateway_offset
, 4, ENC_NA
);
2406 if (ipv6_gateway_offset
) {
2407 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_ipv6_gateway
,
2408 tvb
, base_offset
+ ipv6_gateway_offset
, 16, ENC_NA
);
2410 if (ipv4_dns_count
&& ipv4_dns_offset
) {
2411 offset
= base_offset
+ ipv4_dns_offset
;
2412 for (i
= 0; i
< ipv4_dns_count
; i
++) {
2413 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_ipv4_dns
,
2414 tvb
, offset
, 4, ENC_NA
);
2418 if (ipv6_dns_count
&& ipv6_dns_offset
) {
2419 offset
= base_offset
+ ipv6_dns_offset
;
2420 for (i
= 0; i
< ipv6_dns_count
; i
++) {
2421 proto_tree_add_item(tree
, hf_mbim_ip_configuration_info_ipv6_dns
,
2422 tvb
, offset
, 16, ENC_NA
);
2429 mbim_dissect_device_service_element(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2432 guint32 i
, cid_count
, cid
;
2434 uuid_idx
= mbim_dissect_service_id_uuid(tvb
, pinfo
, tree
, hf_mbim_device_service_element_device_service_id
, &offset
);
2435 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_mbim_device_service_element_dss_payload
,
2436 ett_mbim_bitmap
, mbim_device_service_element_dss_payload_fields
, ENC_LITTLE_ENDIAN
);
2438 proto_tree_add_item(tree
, hf_mbim_device_service_element_max_dss_instances
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2440 cid_count
= tvb_get_letohl(tvb
, offset
);
2441 proto_tree_add_uint(tree
, hf_mbim_device_service_element_cid_count
, tvb
, offset
, 4, cid_count
);
2443 for (i
= 0; i
< cid_count
; i
++) {
2444 cid
= tvb_get_letohl(tvb
, offset
);
2446 case UUID_BASIC_CONNECT
:
2447 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2448 val_to_str_ext_const(cid
, &mbim_uuid_basic_connect_cid_vals_ext
, "Unknown"), cid
);
2451 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2452 val_to_str_const(cid
, mbim_uuid_sms_cid_vals
, "Unknown"), cid
);
2455 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2456 val_to_str_const(cid
, mbim_uuid_ussd_cid_vals
, "Unknown"), cid
);
2458 case UUID_PHONEBOOK
:
2459 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2460 val_to_str_const(cid
, mbim_uuid_phonebook_cid_vals
, "Unknown"), cid
);
2463 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2464 val_to_str_const(cid
, mbim_uuid_stk_cid_vals
, "Unknown"), cid
);
2467 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2468 val_to_str_const(cid
, mbim_uuid_auth_cid_vals
, "Unknown"), cid
);
2471 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2472 val_to_str_const(cid
, mbim_uuid_dss_cid_vals
, "Unknown"), cid
);
2474 case UUID_MULTICARRIER
:
2475 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2476 val_to_str_const(cid
, mbim_uuid_multicarrier_cid_vals
, "Unknown"), cid
);
2478 case UUID_MS_HOSTSHUTDOWN
:
2479 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2480 val_to_str_const(cid
, mbim_uuid_ms_hostshutdown_cid_vals
, "Unknown"), cid
);
2483 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2484 val_to_str_const(cid
, mbim_uuid_msfwid_cid_vals
, "Unknown"), cid
);
2487 proto_tree_add_uint(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
);
2495 mbim_dissect_device_services_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2498 proto_tree
*subtree
;
2500 guint32 i
, device_services_count
, device_services_ref_list_base
, device_service_elem_offset
,
2501 device_service_elem_size
;
2503 base_offset
= offset
;
2504 device_services_count
= tvb_get_letohl(tvb
, offset
);
2505 proto_tree_add_uint(tree
, hf_mbim_device_services_info_device_services_count
, tvb
, offset
, 4, device_services_count
);
2507 proto_tree_add_item(tree
, hf_mbim_device_services_info_max_dss_sessions
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2509 if (device_services_count
) {
2510 device_services_ref_list_base
= offset
;
2511 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*device_services_count
, "Device Services Ref List");
2512 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2513 for (i
= 0; i
< device_services_count
; i
++) {
2514 proto_tree_add_item(subtree
, hf_mbim_device_services_info_device_services_offset
,
2515 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2517 proto_tree_add_item(subtree
, hf_mbim_device_services_info_device_services_size
,
2518 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2521 for (i
= 0; i
< device_services_count
; i
++) {
2522 device_service_elem_offset
= tvb_get_letohl(tvb
, device_services_ref_list_base
+ 8*i
);
2523 device_service_elem_size
= tvb_get_letohl(tvb
, device_services_ref_list_base
+ 8*i
+ 4);
2524 if (device_service_elem_offset
&& device_service_elem_size
) {
2525 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ device_service_elem_offset
,
2526 device_service_elem_size
, "Device Service Element #%u", i
+1);
2527 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2528 mbim_dissect_device_service_element(tvb
, pinfo
, subtree
, base_offset
+ device_service_elem_offset
);
2535 mbim_dissect_event_entry(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2538 guint32 i
, cid_count
, cid
;
2540 uuid_idx
= mbim_dissect_service_id_uuid(tvb
, pinfo
, tree
, hf_mbim_event_entry_device_service_id
, &offset
);
2541 cid_count
= tvb_get_letohl(tvb
, offset
);
2542 proto_tree_add_uint(tree
, hf_mbim_event_entry_cid_count
, tvb
, offset
, 4, cid_count
);
2544 for (i
= 0; i
< cid_count
; i
++) {
2545 cid
= tvb_get_letohl(tvb
, offset
);
2547 case UUID_BASIC_CONNECT
:
2548 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2549 val_to_str_ext_const(cid
, &mbim_uuid_basic_connect_cid_vals_ext
, "Unknown"), cid
);
2552 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2553 val_to_str_const(cid
, mbim_uuid_sms_cid_vals
, "Unknown"), cid
);
2556 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2557 val_to_str_const(cid
, mbim_uuid_ussd_cid_vals
, "Unknown"), cid
);
2559 case UUID_PHONEBOOK
:
2560 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2561 val_to_str_const(cid
, mbim_uuid_phonebook_cid_vals
, "Unknown"), cid
);
2564 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2565 val_to_str_const(cid
, mbim_uuid_stk_cid_vals
, "Unknown"), cid
);
2568 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2569 val_to_str_const(cid
, mbim_uuid_auth_cid_vals
, "Unknown"), cid
);
2572 proto_tree_add_uint_format_value(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2573 val_to_str_const(cid
, mbim_uuid_dss_cid_vals
, "Unknown"), cid
);
2575 case UUID_MULTICARRIER
:
2576 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2577 val_to_str_const(cid
, mbim_uuid_multicarrier_cid_vals
, "Unknown"), cid
);
2579 case UUID_MS_HOSTSHUTDOWN
:
2580 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2581 val_to_str_const(cid
, mbim_uuid_ms_hostshutdown_cid_vals
, "Unknown"), cid
);
2584 proto_tree_add_uint_format_value(tree
, hf_mbim_device_service_element_cid
, tvb
, offset
, 4, cid
, "%s (%u)",
2585 val_to_str_const(cid
, mbim_uuid_msfwid_cid_vals
, "Unknown"), cid
);
2588 proto_tree_add_uint(tree
, hf_mbim_event_entry_cid
, tvb
, offset
, 4, cid
);
2596 mbim_dissect_device_service_subscribe_list(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2599 proto_tree
*subtree
;
2601 guint32 i
, element_count
, device_service_subscribe_ref_list_base
, device_service_elem_offset
,
2602 device_service_elem_size
;
2604 base_offset
= offset
;
2605 element_count
= tvb_get_letohl(tvb
, offset
);
2606 proto_tree_add_uint(tree
, hf_mbim_device_service_subscribe_element_count
, tvb
, offset
, 4, element_count
);
2608 if (element_count
) {
2609 device_service_subscribe_ref_list_base
= offset
;
2610 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*element_count
, "Device Service Subscribe Ref List");
2611 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2612 for (i
= 0; i
< element_count
; i
++) {
2613 proto_tree_add_item(subtree
, hf_mbim_device_service_subscribe_device_service_offset
,
2614 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2616 proto_tree_add_item(subtree
, hf_mbim_device_service_subscribe_device_service_size
,
2617 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2620 for (i
= 0; i
< element_count
; i
++) {
2621 device_service_elem_offset
= tvb_get_letohl(tvb
, device_service_subscribe_ref_list_base
+ 8*i
);
2622 device_service_elem_size
= tvb_get_letohl(tvb
, device_service_subscribe_ref_list_base
+ 8*i
+ 4);
2623 if (device_service_elem_offset
&& device_service_elem_size
) {
2624 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ device_service_elem_offset
,
2625 device_service_elem_size
, "Device Service Element #%u", i
+1);
2626 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2627 mbim_dissect_event_entry(tvb
, pinfo
, subtree
, base_offset
+ device_service_elem_offset
);
2634 mbim_dissect_packet_statistics_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2636 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_in_discards
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2638 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_in_errors
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2640 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_in_octets
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2642 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_in_packets
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2644 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_out_octets
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2646 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_out_packets
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2648 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_out_errors
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2650 proto_tree_add_item(tree
, hf_mbim_packet_statistics_info_out_discards
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2654 mbim_dissect_single_packet_filter(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2657 guint32 filter_size
, packet_filter_offset
, packet_mask_offset
;
2659 base_offset
= offset
;
2660 filter_size
= tvb_get_letohl(tvb
, offset
);
2661 proto_tree_add_uint(tree
, hf_mbim_single_packet_filter_filter_size
, tvb
, offset
, 4, filter_size
);
2663 packet_filter_offset
= tvb_get_letohl(tvb
, offset
);
2664 proto_tree_add_uint(tree
, hf_mbim_single_packet_filter_packet_filter_offset
, tvb
, offset
, 4, packet_filter_offset
);
2666 packet_mask_offset
= tvb_get_letohl(tvb
, offset
);
2667 proto_tree_add_uint(tree
, hf_mbim_single_packet_filter_packet_mask_offset
, tvb
, offset
, 4, packet_mask_offset
);
2670 if (packet_filter_offset
) {
2671 proto_tree_add_item(tree
, hf_mbim_single_packet_filter_packet_filter
, tvb
, base_offset
+ packet_filter_offset
,
2672 filter_size
, ENC_NA
);
2674 if (packet_mask_offset
) {
2675 proto_tree_add_item(tree
, hf_mbim_single_packet_filter_packet_mask
, tvb
, base_offset
+ packet_mask_offset
,
2676 filter_size
, ENC_NA
);
2682 mbim_dissect_packet_filters(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2685 proto_tree
*subtree
;
2687 guint32 i
, packet_filters_count
, packet_filter_ref_list_base
, packet_filter_offset
, packet_filter_size
;
2689 base_offset
= offset
;
2690 proto_tree_add_item(tree
, hf_mbim_packet_filters_session_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2692 packet_filters_count
= tvb_get_letohl(tvb
, offset
);
2693 proto_tree_add_uint(tree
, hf_mbim_packet_filters_packet_filters_count
, tvb
, offset
, 4, packet_filters_count
);
2695 if (packet_filters_count
) {
2696 packet_filter_ref_list_base
= offset
;
2697 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*packet_filters_count
, "Packet Filter Ref List");
2698 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2699 for (i
= 0; i
< packet_filters_count
; i
++) {
2700 proto_tree_add_item(subtree
, hf_mbim_packet_filters_packet_filters_packet_filter_offset
,
2701 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2703 proto_tree_add_item(subtree
, hf_mbim_packet_filters_packet_filters_packet_filter_size
,
2704 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2707 for (i
= 0; i
< packet_filters_count
; i
++) {
2708 packet_filter_offset
= tvb_get_letohl(tvb
, packet_filter_ref_list_base
+ 8*i
);
2709 packet_filter_size
= tvb_get_letohl(tvb
, packet_filter_ref_list_base
+ 8*i
+ 4);
2710 if (packet_filter_offset
&& packet_filter_size
) {
2711 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ packet_filter_offset
,
2712 packet_filter_size
, "Packet Filter Element #%u", i
+1);
2713 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2714 mbim_dissect_single_packet_filter(tvb
, pinfo
, subtree
, base_offset
+ packet_filter_offset
);
2721 mbim_dissect_set_sms_configuration(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2724 guint32 sc_address_offset
, sc_address_size
;
2726 base_offset
= offset
;
2727 proto_tree_add_item(tree
, hf_mbim_set_sms_configuration_format
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2729 sc_address_offset
= tvb_get_letohl(tvb
, offset
);
2730 proto_tree_add_uint(tree
, hf_mbim_set_sms_configuration_sc_address_offset
, tvb
, offset
, 4, sc_address_offset
);
2732 sc_address_size
= tvb_get_letohl(tvb
, offset
);
2733 proto_tree_add_uint(tree
, hf_mbim_set_sms_configuration_sc_address_size
, tvb
, offset
, 4, sc_address_size
);
2735 if (sc_address_offset
&& sc_address_size
) {
2736 proto_tree_add_item(tree
, hf_mbim_set_sms_configuration_sc_address
, tvb
, base_offset
+ sc_address_offset
,
2737 sc_address_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2742 mbim_dissect_sms_configuration_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2745 guint32 sc_address_offset
, sc_address_size
;
2747 base_offset
= offset
;
2748 proto_tree_add_item(tree
, hf_mbim_sms_configuration_info_sms_storage_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2750 proto_tree_add_item(tree
, hf_mbim_sms_configuration_info_format
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2752 proto_tree_add_item(tree
, hf_mbim_sms_configuration_info_max_messages
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2754 proto_tree_add_item(tree
, hf_mbim_sms_configuration_info_cdma_short_message_size
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2756 sc_address_offset
= tvb_get_letohl(tvb
, offset
);
2757 proto_tree_add_uint(tree
, hf_mbim_sms_configuration_info_sc_address_offset
, tvb
, offset
, 4, sc_address_offset
);
2759 sc_address_size
= tvb_get_letohl(tvb
, offset
);
2760 proto_tree_add_uint(tree
, hf_mbim_sms_configuration_info_sc_address_size
, tvb
, offset
, 4, sc_address_size
);
2762 if (sc_address_offset
&& sc_address_size
) {
2763 proto_tree_add_item(tree
, hf_mbim_sms_configuration_info_sc_address
, tvb
, base_offset
+ sc_address_offset
,
2764 sc_address_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2769 mbim_dissect_sms_pdu_record(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
,
2770 struct mbim_conv_info
*mbim_conv
)
2773 guint32 pdu_data_offset
, pdu_data_size
;
2776 proto_tree
*subtree
;
2778 base_offset
= offset
;
2779 proto_tree_add_item(tree
, hf_mbim_sms_pdu_record_message_index
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2781 proto_tree_add_item(tree
, hf_mbim_sms_pdu_record_message_status
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2783 pdu_data_offset
= tvb_get_letohl(tvb
, offset
);
2784 proto_tree_add_uint(tree
, hf_mbim_sms_pdu_record_pdu_data_offset
, tvb
, offset
, 4, pdu_data_offset
);
2786 pdu_data_size
= tvb_get_letohl(tvb
, offset
);
2787 proto_tree_add_uint(tree
, hf_mbim_sms_pdu_record_pdu_data_size
, tvb
, offset
, 4, pdu_data_size
);
2789 if (pdu_data_offset
&& pdu_data_size
) {
2790 ti
= proto_tree_add_item(tree
, hf_mbim_sms_pdu_record_pdu_data
, tvb
, base_offset
+ pdu_data_offset
,
2791 pdu_data_size
, ENC_NA
);
2792 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
2793 sms_tvb
= tvb_new_subset(tvb
, base_offset
+ pdu_data_offset
, pdu_data_size
, pdu_data_size
);
2794 if (mbim_conv
->cellular_class
& MBIM_CELLULAR_CLASS_GSM
) {
2795 call_dissector(gsm_sms_handle
, sms_tvb
, pinfo
, subtree
);
2796 } else if (mbim_conv
->cellular_class
& MBIM_CELLULAR_CLASS_CDMA
) {
2797 call_dissector(cdma_sms_handle
, sms_tvb
, pinfo
, subtree
);
2803 mbim_dissect_sms_cdma_record(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2806 guint32 address_offset
, address_size
, timestamp_offset
, timestamp_size
, encoded_message_offset
,
2809 base_offset
= offset
;
2810 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_message_index
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2812 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_message_status
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2814 address_offset
= tvb_get_letohl(tvb
, offset
);
2815 proto_tree_add_uint(tree
, hf_mbim_sms_cdma_record_address_offset
, tvb
, offset
, 4, address_offset
);
2817 address_size
= tvb_get_letohl(tvb
, offset
);
2818 proto_tree_add_uint(tree
, hf_mbim_sms_cdma_record_address_size
, tvb
, offset
, 4, address_size
);
2820 timestamp_offset
= tvb_get_letohl(tvb
, offset
);
2821 proto_tree_add_uint(tree
, hf_mbim_sms_cdma_record_timestamp_offset
, tvb
, offset
, 4, timestamp_offset
);
2823 timestamp_size
= tvb_get_letohl(tvb
, offset
);
2824 proto_tree_add_uint(tree
, hf_mbim_sms_cdma_record_timestamp_size
, tvb
, offset
, 4, timestamp_size
);
2826 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_encoding_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2828 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_language_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2830 encoded_message_offset
= tvb_get_letohl(tvb
, offset
);
2831 proto_tree_add_uint(tree
, hf_mbim_sms_cdma_record_encoded_message_offset
, tvb
, offset
, 4,
2832 encoded_message_offset
);
2834 size_in_bytes
= tvb_get_letohl(tvb
, offset
);
2835 proto_tree_add_uint(tree
, hf_mbim_sms_cdma_record_size_in_bytes
, tvb
, offset
, 4, size_in_bytes
);
2837 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_size_in_characters
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2839 if (address_offset
&& address_size
) {
2840 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_address
, tvb
, base_offset
+ address_offset
,
2841 address_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2843 if (timestamp_offset
&& timestamp_size
) {
2844 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_timestamp
, tvb
, base_offset
+ timestamp_offset
,
2845 timestamp_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2847 if (encoded_message_offset
&& size_in_bytes
) {
2848 proto_tree_add_item(tree
, hf_mbim_sms_cdma_record_encoded_message
, tvb
, base_offset
+ encoded_message_offset
,
2849 size_in_bytes
, ENC_NA
);
2854 mbim_dissect_sms_read_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2856 proto_tree_add_item(tree
, hf_mbim_sms_read_req_format
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2858 proto_tree_add_item(tree
, hf_mbim_sms_read_req_flag
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2860 proto_tree_add_item(tree
, hf_mbim_sms_read_req_message_index
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2864 mbim_dissect_sms_read_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
,
2865 struct mbim_conv_info
*mbim_conv
)
2868 proto_tree
*subtree
;
2870 guint32 i
, format
, element_count
, sms_ref_list_base
, sms_offset
, sms_size
;
2872 base_offset
= offset
;
2873 format
= tvb_get_letohl(tvb
, offset
);
2874 proto_tree_add_uint(tree
, hf_mbim_sms_read_info_format
, tvb
, offset
, 4, format
);
2876 element_count
= tvb_get_letohl(tvb
, offset
);
2877 proto_tree_add_uint(tree
, hf_mbim_sms_read_info_element_count
, tvb
, offset
, 4, element_count
);
2879 if (element_count
) {
2880 sms_ref_list_base
= offset
;
2881 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*element_count
, "SMS Ref List");
2882 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2883 for (i
= 0; i
< element_count
; i
++) {
2884 proto_tree_add_item(subtree
, hf_mbim_sms_read_info_sms_offset
,
2885 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2887 proto_tree_add_item(subtree
, hf_mbim_sms_read_info_sms_size
,
2888 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2891 for (i
= 0; i
< element_count
; i
++) {
2892 sms_offset
= tvb_get_letohl(tvb
, sms_ref_list_base
+ 8*i
);
2893 sms_size
= tvb_get_letohl(tvb
, sms_ref_list_base
+ 8*i
+ 4);
2894 if (sms_offset
&& sms_size
) {
2895 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ sms_offset
,
2896 sms_size
, "SMS Element #%u", i
+1);
2897 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
2898 if (format
== MBIM_SMS_FORMAT_PDU
) {
2899 mbim_dissect_sms_pdu_record(tvb
, pinfo
, subtree
, base_offset
+ sms_offset
, mbim_conv
);
2900 } else if (format
== MBIM_SMS_FORMAT_CDMA
) {
2901 mbim_dissect_sms_cdma_record(tvb
, pinfo
, subtree
, base_offset
+ sms_offset
);
2903 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unknown_sms_format
, tvb
,
2904 base_offset
+ sms_offset
, sms_size
);
2912 mbim_dissect_sms_send_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
,
2913 struct mbim_conv_info
*mbim_conv
)
2916 guint32 pdu_data_offset
, pdu_data_size
;
2919 proto_tree
*subtree
;
2921 base_offset
= offset
;
2922 pdu_data_offset
= tvb_get_letohl(tvb
, offset
);
2923 proto_tree_add_uint(tree
, hf_mbim_sms_send_pdu_pdu_data_offset
, tvb
, offset
, 4, pdu_data_offset
);
2925 pdu_data_size
= tvb_get_letohl(tvb
, offset
);
2926 proto_tree_add_uint(tree
, hf_mbim_sms_send_pdu_pdu_data_size
, tvb
, offset
, 4, pdu_data_size
);
2928 if (pdu_data_offset
&& pdu_data_size
) {
2929 ti
= proto_tree_add_item(tree
, hf_mbim_sms_send_pdu_pdu_data
, tvb
, base_offset
+ pdu_data_offset
,
2930 pdu_data_size
, ENC_NA
);
2931 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
2932 sms_tvb
= tvb_new_subset(tvb
, base_offset
+ pdu_data_offset
, pdu_data_size
, pdu_data_size
);
2933 if (mbim_conv
->cellular_class
& MBIM_CELLULAR_CLASS_GSM
) {
2934 call_dissector(gsm_sms_handle
, sms_tvb
, pinfo
, subtree
);
2935 } else if (mbim_conv
->cellular_class
& MBIM_CELLULAR_CLASS_CDMA
) {
2936 call_dissector(cdma_sms_handle
, sms_tvb
, pinfo
, subtree
);
2942 mbim_dissect_sms_send_cdma(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
2945 guint32 address_offset
, address_size
, encoded_message_offset
, size_in_bytes
;
2947 base_offset
= offset
;
2948 proto_tree_add_item(tree
, hf_mbim_sms_send_cdma_encoding_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2950 proto_tree_add_item(tree
, hf_mbim_sms_send_cdma_language_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2952 address_offset
= tvb_get_letohl(tvb
, offset
);
2953 proto_tree_add_uint(tree
, hf_mbim_sms_send_cdma_address_offset
, tvb
, offset
, 4, address_offset
);
2955 address_size
= tvb_get_letohl(tvb
, offset
);
2956 proto_tree_add_uint(tree
, hf_mbim_sms_send_cdma_address_size
, tvb
, offset
, 4, address_size
);
2958 encoded_message_offset
= tvb_get_letohl(tvb
, offset
);
2959 proto_tree_add_uint(tree
, hf_mbim_sms_send_cdma_encoded_message_offset
, tvb
, offset
, 4,
2960 encoded_message_offset
);
2962 size_in_bytes
= tvb_get_letohl(tvb
, offset
);
2963 proto_tree_add_uint(tree
, hf_mbim_sms_send_cdma_size_in_bytes
, tvb
, offset
, 4, size_in_bytes
);
2965 proto_tree_add_item(tree
, hf_mbim_sms_send_cdma_size_in_characters
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2967 if (address_offset
&& address_size
) {
2968 proto_tree_add_item(tree
, hf_mbim_sms_send_cdma_address
, tvb
, base_offset
+ address_offset
,
2969 address_size
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
2971 if (encoded_message_offset
&& size_in_bytes
) {
2972 proto_tree_add_item(tree
, hf_mbim_sms_send_cdma_encoded_message
, tvb
, base_offset
+ encoded_message_offset
,
2973 size_in_bytes
, ENC_NA
);
2978 mbim_dissect_set_sms_send(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
,
2979 struct mbim_conv_info
*mbim_conv
)
2983 format
= tvb_get_letohl(tvb
, offset
);
2984 proto_tree_add_uint(tree
, hf_mbim_set_sms_send_format
, tvb
, offset
, 4, format
);
2986 if (format
== MBIM_SMS_FORMAT_PDU
) {
2987 mbim_dissect_sms_send_pdu(tvb
, pinfo
, tree
, offset
, mbim_conv
);
2988 } else if (format
== MBIM_SMS_FORMAT_CDMA
) {
2989 mbim_dissect_sms_send_cdma(tvb
, pinfo
, tree
, offset
);
2991 proto_tree_add_expert(tree
, pinfo
, &ei_mbim_unknown_sms_format
, tvb
, offset
, -1);
2996 mbim_dissect_set_ussd(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
2999 proto_tree
*subtree
;
3001 guint32 ussd_payload_offset
, ussd_payload_length
;
3002 guint8 encoding
, *ussd
;
3007 GError
*l_conv_error
;
3009 base_offset
= offset
;
3010 proto_tree_add_item(tree
, hf_mbim_set_ussd_ussd_action
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3012 ti
= proto_tree_add_item(tree
, hf_mbim_set_ussd_ussd_data_coding_scheme
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3013 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
3014 encoding
= dissect_cbs_data_coding_scheme(tvb
, pinfo
, subtree
, offset
);
3016 ussd_payload_offset
= tvb_get_letohl(tvb
, offset
);
3017 proto_tree_add_uint(tree
, hf_mbim_set_ussd_ussd_ussd_payload_offset
, tvb
, offset
, 4, ussd_payload_offset
);
3019 ussd_payload_length
= tvb_get_letohl(tvb
, offset
);
3020 proto_tree_add_uint(tree
, hf_mbim_set_ussd_ussd_ussd_payload_length
, tvb
, offset
, 4, ussd_payload_length
);
3022 if (ussd_payload_offset
&& ussd_payload_length
) {
3023 ti
= proto_tree_add_item(tree
, hf_mbim_set_ussd_ussd_ussd_payload
, tvb
, base_offset
+ ussd_payload_offset
,
3024 ussd_payload_length
, ENC_NA
);
3025 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
3026 ussd_tvb
= tvb_new_subset(tvb
, base_offset
+ ussd_payload_offset
, ussd_payload_length
, ussd_payload_length
);
3028 case SMS_ENCODING_7BIT
:
3029 case SMS_ENCODING_7BIT_LANG
:
3030 ussd
= (guint8
*)wmem_alloc(wmem_packet_scope(), ussd_payload_length
);
3031 out_len
= gsm_sms_char_7bit_unpack(0, ussd_payload_length
, ussd_payload_length
,
3032 tvb_get_ptr(ussd_tvb
, 0, ussd_payload_length
), ussd
);
3033 ussd
[out_len
] = '\0';
3034 utf8_text
= gsm_sms_chars_to_utf8(ussd
, out_len
);
3035 proto_tree_add_text(subtree
, ussd_tvb
, 0, ussd_payload_length
, "%s", utf8_text
);
3037 case SMS_ENCODING_8BIT
:
3038 proto_tree_add_text(subtree
, ussd_tvb
, 0, ussd_payload_length
, "%s",
3039 tvb_get_string(wmem_packet_scope(), ussd_tvb
, 0, ussd_payload_length
));
3041 case SMS_ENCODING_UCS2
:
3042 case SMS_ENCODING_UCS2_LANG
:
3043 if ((cd
= g_iconv_open("UTF-8","UCS-2BE")) != (GIConv
) -1) {
3044 utf8_text
= g_convert_with_iconv(tvb_get_ptr(ussd_tvb
, 0, ussd_payload_length
),
3045 ussd_payload_length
, cd
, NULL
, NULL
, &l_conv_error
);
3046 if (!l_conv_error
) {
3047 proto_tree_add_text(subtree
, ussd_tvb
, 0, ussd_payload_length
, "%s", utf8_text
);
3060 mbim_dissect_ussd_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
3063 proto_tree
*subtree
;
3065 guint32 ussd_payload_offset
, ussd_payload_length
;
3066 guint8 encoding
, *ussd
;
3071 GError
*l_conv_error
;
3073 base_offset
= offset
;
3074 proto_tree_add_item(tree
, hf_mbim_ussd_info_ussd_response
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3076 proto_tree_add_item(tree
, hf_mbim_ussd_info_ussd_session_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3078 ti
= proto_tree_add_item(tree
, hf_mbim_ussd_info_ussd_data_coding_scheme
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3079 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
3080 encoding
= dissect_cbs_data_coding_scheme(tvb
, pinfo
, subtree
, offset
);
3082 ussd_payload_offset
= tvb_get_letohl(tvb
, offset
);
3083 proto_tree_add_uint(tree
, hf_mbim_ussd_info_ussd_payload_offset
, tvb
, offset
, 4, ussd_payload_offset
);
3085 ussd_payload_length
= tvb_get_letohl(tvb
, offset
);
3086 proto_tree_add_uint(tree
, hf_mbim_ussd_info_ussd_payload_length
, tvb
, offset
, 4, ussd_payload_length
);
3088 if (ussd_payload_offset
&& ussd_payload_length
) {
3089 ti
= proto_tree_add_item(tree
, hf_mbim_ussd_info_ussd_payload
, tvb
, base_offset
+ ussd_payload_offset
,
3090 ussd_payload_length
, ENC_NA
);
3091 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
3092 ussd_tvb
= tvb_new_subset(tvb
, base_offset
+ ussd_payload_offset
, ussd_payload_length
, ussd_payload_length
);
3094 case SMS_ENCODING_7BIT
:
3095 case SMS_ENCODING_7BIT_LANG
:
3096 ussd
= (guint8
*)wmem_alloc(wmem_packet_scope(), ussd_payload_length
);
3097 out_len
= gsm_sms_char_7bit_unpack(0, ussd_payload_length
, ussd_payload_length
,
3098 tvb_get_ptr(ussd_tvb
, 0, ussd_payload_length
), ussd
);
3099 ussd
[out_len
] = '\0';
3100 utf8_text
= gsm_sms_chars_to_utf8(ussd
, out_len
);
3101 proto_tree_add_text(subtree
, ussd_tvb
, 0, ussd_payload_length
, "%s", utf8_text
);
3103 case SMS_ENCODING_8BIT
:
3104 proto_tree_add_text(subtree
, ussd_tvb
, 0, ussd_payload_length
, "%s",
3105 tvb_get_string(wmem_packet_scope(), ussd_tvb
, 0, ussd_payload_length
));
3107 case SMS_ENCODING_UCS2
:
3108 case SMS_ENCODING_UCS2_LANG
:
3109 if ((cd
= g_iconv_open("UTF-8","UCS-2BE")) != (GIConv
) -1) {
3110 utf8_text
= g_convert_with_iconv(tvb_get_ptr(ussd_tvb
, 0, ussd_payload_length
),
3111 ussd_payload_length
, cd
, NULL
, NULL
, &l_conv_error
);
3112 if (!l_conv_error
) {
3113 proto_tree_add_text(subtree
, ussd_tvb
, 0, ussd_payload_length
, "%s", utf8_text
);
3126 mbim_dissect_phonebook_configuration_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3128 proto_tree_add_item(tree
, hf_mbim_phonebook_configuration_info_phonebook_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3130 proto_tree_add_item(tree
, hf_mbim_phonebook_configuration_info_total_nb_of_entries
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3132 proto_tree_add_item(tree
, hf_mbim_phonebook_configuration_info_used_entries
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3134 proto_tree_add_item(tree
, hf_mbim_phonebook_configuration_info_max_number_length
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3136 proto_tree_add_item(tree
, hf_mbim_phonebook_configuration_info_max_name_length
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3140 mbim_dissect_phonebook_entry(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3143 guint32 number_offset
, number_length
, name_offset
, name_length
;
3145 base_offset
= offset
;
3146 proto_tree_add_item(tree
, hf_mbim_phonebook_entry_entry_index
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3148 number_offset
= tvb_get_letohl(tvb
, offset
);
3149 proto_tree_add_uint(tree
, hf_mbim_phonebook_entry_number_offset
, tvb
, offset
, 4, number_offset
);
3151 number_length
= tvb_get_letohl(tvb
, offset
);
3152 proto_tree_add_uint(tree
, hf_mbim_phonebook_entry_number_length
, tvb
, offset
, 4, number_length
);
3154 name_offset
= tvb_get_letohl(tvb
, offset
);
3155 proto_tree_add_uint(tree
, hf_mbim_phonebook_entry_name_offset
, tvb
, offset
, 4, name_offset
);
3157 name_length
= tvb_get_letohl(tvb
, offset
);
3158 proto_tree_add_uint(tree
, hf_mbim_phonebook_entry_name_length
, tvb
, offset
, 4, name_length
);
3160 if (number_offset
&& number_length
) {
3161 proto_tree_add_item(tree
, hf_mbim_phonebook_entry_number
, tvb
, base_offset
+ number_offset
,
3162 number_length
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
3164 if (name_offset
&& name_length
) {
3165 proto_tree_add_item(tree
, hf_mbim_phonebook_entry_name
, tvb
, base_offset
+ name_offset
,
3166 name_length
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
3171 mbim_dissect_phonebook_read_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
3174 proto_tree
*subtree
;
3176 guint32 i
, element_count
, phonebook_ref_list_base
, phonebook_offset
, phonebook_size
;
3178 base_offset
= offset
;
3179 element_count
= tvb_get_letohl(tvb
, offset
);
3180 proto_tree_add_uint(tree
, hf_mbim_phonebook_read_info_element_count
, tvb
, offset
, 4, element_count
);
3182 if (element_count
) {
3183 phonebook_ref_list_base
= offset
;
3184 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8*element_count
, "Phonebook Ref List");
3185 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
3186 for (i
= 0; i
< element_count
; i
++) {
3187 proto_tree_add_item(subtree
, hf_mbim_phonebook_read_info_phonebook_offset
,
3188 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3190 proto_tree_add_item(subtree
, hf_mbim_phonebook_read_info_phonebook_size
,
3191 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3194 for (i
= 0; i
< element_count
; i
++) {
3195 phonebook_offset
= tvb_get_letohl(tvb
, phonebook_ref_list_base
+ 8*i
);
3196 phonebook_size
= tvb_get_letohl(tvb
, phonebook_ref_list_base
+ 8*i
+ 4);
3197 if (phonebook_offset
&& phonebook_size
) {
3198 ti
= proto_tree_add_text(tree
, tvb
, base_offset
+ phonebook_offset
,
3199 phonebook_size
, "Phonebook Element #%u", i
+1);
3200 subtree
= proto_item_add_subtree(ti
, ett_mbim_pair_list
);
3201 mbim_dissect_phonebook_entry(tvb
, pinfo
, subtree
, base_offset
+ phonebook_offset
);
3208 mbim_dissect_set_phonebook_write(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3211 guint32 number_offset
, number_length
, name_offset
, name_length
;
3213 base_offset
= offset
;
3214 proto_tree_add_item(tree
, hf_mbim_set_phonebook_write_save_flag
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3216 proto_tree_add_item(tree
, hf_mbim_set_phonebook_write_save_index
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3218 number_offset
= tvb_get_letohl(tvb
, offset
);
3219 proto_tree_add_uint(tree
, hf_mbim_set_phonebook_write_number_offset
, tvb
, offset
, 4, number_offset
);
3221 number_length
= tvb_get_letohl(tvb
, offset
);
3222 proto_tree_add_uint(tree
, hf_mbim_set_phonebook_write_number_length
, tvb
, offset
, 4, number_length
);
3224 name_offset
= tvb_get_letohl(tvb
, offset
);
3225 proto_tree_add_uint(tree
, hf_mbim_set_phonebook_write_name_offset
, tvb
, offset
, 4, name_offset
);
3227 name_length
= tvb_get_letohl(tvb
, offset
);
3228 proto_tree_add_uint(tree
, hf_mbim_set_phonebook_write_name_length
, tvb
, offset
, 4, name_length
);
3230 if (number_offset
&& number_length
) {
3231 proto_tree_add_item(tree
, hf_mbim_set_phonebook_write_number
, tvb
, base_offset
+ number_offset
,
3232 number_length
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
3234 if (name_offset
&& name_length
) {
3235 proto_tree_add_item(tree
, hf_mbim_set_phonebook_write_name
, tvb
, base_offset
+ name_offset
,
3236 name_length
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
3241 mbim_dissect_set_stk_terminal_response(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, gint offset
)
3244 guint32 response_length
;
3246 proto_tree
*subtree
;
3248 response_length
= tvb_get_letohl(tvb
, offset
);
3249 proto_tree_add_uint(tree
, hf_mbim_set_stk_terminal_response_response_length
, tvb
, offset
, 4, response_length
);
3251 ti
= proto_tree_add_item(tree
, hf_mbim_set_stk_terminal_response_data_buffer
, tvb
, offset
, response_length
, ENC_NA
);
3252 if (etsi_cat_handle
) {
3253 subtree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
3254 pac_tvb
= tvb_new_subset(tvb
, offset
, response_length
, response_length
);
3255 call_dissector(etsi_cat_handle
, pac_tvb
, pinfo
, subtree
);
3260 mbim_dissect_stk_terminal_response_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3263 guint32 result_data_string_offset
, result_data_string_length
;
3265 base_offset
= offset
;
3266 result_data_string_offset
= tvb_get_letohl(tvb
, offset
);
3267 proto_tree_add_uint(tree
, hf_mbim_stk_terminal_response_info_result_data_string_offset
,
3268 tvb
, offset
, 4, result_data_string_offset
);
3270 result_data_string_length
= tvb_get_letohl(tvb
, offset
);
3271 proto_tree_add_uint(tree
, hf_mbim_stk_terminal_response_info_result_data_string_length
,
3272 tvb
, offset
, 4, result_data_string_length
);
3274 proto_tree_add_item(tree
, hf_mbim_stk_terminal_response_info_status_word
, tvb
, offset
,
3275 4, ENC_LITTLE_ENDIAN
);
3276 if (result_data_string_offset
&& result_data_string_length
) {
3277 proto_tree_add_item(tree
, hf_mbim_stk_terminal_response_info_result_data_string
, tvb
,
3278 base_offset
+ result_data_string_offset
, result_data_string_length
, ENC_NA
);
3283 mbim_dissect_aka_auth_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3285 proto_tree_add_item(tree
, hf_mbim_aka_auth_req_rand
, tvb
, offset
, 16, ENC_NA
);
3287 proto_tree_add_item(tree
, hf_mbim_aka_auth_req_autn
, tvb
, offset
, 16, ENC_NA
);
3291 mbim_dissect_aka_auth_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3293 proto_tree_add_item(tree
, hf_mbim_aka_auth_info_res
, tvb
, offset
, 16, ENC_NA
);
3295 proto_tree_add_item(tree
, hf_mbim_aka_auth_info_res_length
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3297 proto_tree_add_item(tree
, hf_mbim_aka_auth_info_ik
, tvb
, offset
, 16, ENC_NA
);
3299 proto_tree_add_item(tree
, hf_mbim_aka_auth_info_ck
, tvb
, offset
, 16, ENC_NA
);
3301 proto_tree_add_item(tree
, hf_mbim_aka_auth_info_auts
, tvb
, offset
, 14, ENC_NA
);
3305 mbim_dissect_akap_auth_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3308 guint32 network_name_offset
, network_name_length
;
3310 base_offset
= offset
;
3311 proto_tree_add_item(tree
, hf_mbim_akap_auth_req_rand
, tvb
, offset
, 16, ENC_NA
);
3313 proto_tree_add_item(tree
, hf_mbim_akap_auth_req_autn
, tvb
, offset
, 16, ENC_NA
);
3315 network_name_offset
= tvb_get_letohl(tvb
, offset
);
3316 proto_tree_add_uint(tree
, hf_mbim_akap_auth_req_network_name_offset
, tvb
, offset
, 4, network_name_offset
);
3318 network_name_length
= tvb_get_letohl(tvb
, offset
);
3319 proto_tree_add_uint(tree
, hf_mbim_akap_auth_req_network_name_length
, tvb
, offset
, 4, network_name_length
);
3321 if (network_name_offset
&& network_name_length
) {
3322 proto_tree_add_item(tree
, hf_mbim_akap_auth_req_network_name
, tvb
, base_offset
+ network_name_offset
,
3323 network_name_length
, ENC_LITTLE_ENDIAN
|ENC_UTF_16
);
3328 mbim_dissect_akap_auth_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3330 proto_tree_add_item(tree
, hf_mbim_akap_auth_info_res
, tvb
, offset
, 16, ENC_NA
);
3332 proto_tree_add_item(tree
, hf_mbim_akap_auth_info_res_length
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3334 proto_tree_add_item(tree
, hf_mbim_akap_auth_info_ik
, tvb
, offset
, 16, ENC_NA
);
3336 proto_tree_add_item(tree
, hf_mbim_akap_auth_info_ck
, tvb
, offset
, 16, ENC_NA
);
3338 proto_tree_add_item(tree
, hf_mbim_akap_auth_info_auts
, tvb
, offset
, 14, ENC_NA
);
3342 mbim_dissect_sim_auth_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3344 proto_tree_add_item(tree
, hf_mbim_sim_auth_req_rand1
, tvb
, offset
, 16, ENC_NA
);
3346 proto_tree_add_item(tree
, hf_mbim_sim_auth_req_rand2
, tvb
, offset
, 16, ENC_NA
);
3348 proto_tree_add_item(tree
, hf_mbim_sim_auth_req_rand3
, tvb
, offset
, 16, ENC_NA
);
3350 proto_tree_add_item(tree
, hf_mbim_sim_auth_req_n
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3354 mbim_dissect_sim_auth_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3356 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_sres1
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3358 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_kc1
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3360 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_sres2
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3362 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_kc2
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3364 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_sres3
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3366 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_kc3
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3368 proto_tree_add_item(tree
, hf_mbim_sim_auth_info_n
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3372 mbim_dissect_set_dss_connect(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3374 proto_tree_add_item(tree
, hf_mbim_set_dss_connect_device_service_id
, tvb
, offset
, 16, ENC_NA
);
3376 proto_tree_add_item(tree
, hf_mbim_set_dss_connect_dss_session_id
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3378 proto_tree_add_item(tree
, hf_mbim_set_dss_connect_dss_link_state
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3382 mbim_dissect_muticarrier_current_cid_list_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3386 service_idx
= mbim_dissect_service_id_uuid(tvb
, pinfo
, tree
, hf_mbim_multicarrier_current_cid_list_req_uuid
, &offset
);
3387 if (service_idx
!= UUID_MULTICARRIER
) {
3388 expert_add_info_format(pinfo
, NULL
, &ei_mbim_unexpected_uuid_value
,
3389 "Unexpected UUID value, should be UUID_MULTICARRIER");
3394 mbim_dissect_muticarrier_current_cid_list_info(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, gint offset
)
3396 guint32 i
, cid_count
;
3398 cid_count
= tvb_get_letohl(tvb
, offset
);
3399 proto_tree_add_item(tree
, hf_mbim_multicarrier_current_cid_list_info_cid_count
,
3400 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3402 for (i
= 0; i
< cid_count
; i
++) {
3403 proto_tree_add_item(tree
, hf_mbim_multicarrier_current_cid_list_info_cid
,
3404 tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3410 dissect_mbim_control(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
3413 proto_tree
*mbim_tree
, *header_tree
, *subtree
;
3415 guint32 msg_type
, msg_length
, trans_id
;
3416 conversation_t
*conversation
;
3417 struct mbim_conv_info
*mbim_conv
;
3418 struct mbim_info
*mbim_info
;
3420 if (tvb_length(tvb
) < 12) {
3424 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "MBIM");
3425 col_clear(pinfo
->cinfo
, COL_INFO
);
3427 conversation
= find_or_create_conversation(pinfo
);
3428 mbim_conv
= (struct mbim_conv_info
*)conversation_get_proto_data(conversation
, proto_mbim
);
3430 mbim_conv
= wmem_new(wmem_file_scope(), struct mbim_conv_info
);
3431 mbim_conv
->trans
= wmem_tree_new(wmem_file_scope());
3432 mbim_conv
->cellular_class
= 0;
3433 conversation_add_proto_data(conversation
, proto_mbim
, mbim_conv
);
3436 ti
= proto_tree_add_item(tree
, proto_mbim
, tvb
, 0, -1, ENC_NA
);
3437 mbim_tree
= proto_item_add_subtree(ti
, ett_mbim
);
3438 ti
= proto_tree_add_item(mbim_tree
, hf_mbim_control
, tvb
, 0, 0, ENC_NA
);
3439 PROTO_ITEM_SET_HIDDEN(ti
);
3441 ti
= proto_tree_add_text(mbim_tree
, tvb
, offset
, 12, "Message Header");
3442 header_tree
= proto_item_add_subtree(ti
, ett_mbim_msg_header
);
3443 msg_type
= tvb_get_letohl(tvb
, offset
);
3444 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s", val_to_str_const(msg_type
, mbim_msg_type_vals
, "Unknown"));
3445 proto_tree_add_uint(header_tree
, hf_mbim_header_message_type
, tvb
, offset
, 4, msg_type
);
3447 msg_length
= tvb_get_letohl(tvb
, offset
);
3448 proto_tree_add_uint(header_tree
, hf_mbim_header_message_length
, tvb
, offset
, 4, msg_length
);
3450 trans_id
= tvb_get_letohl(tvb
, offset
);
3451 proto_tree_add_uint(header_tree
, hf_mbim_header_transaction_id
, tvb
, offset
, 4, trans_id
);
3457 guint32 max_ctrl_transfer
;
3459 max_ctrl_transfer
= tvb_get_letohl(tvb
, offset
);
3460 if (max_ctrl_transfer
== 8) {
3461 proto_tree_add_uint_format_value(mbim_tree
, hf_mbim_max_ctrl_transfer
, tvb
, offset
, 4, max_ctrl_transfer
, "MBIM_ERROR_MAX_TRANSFER (%d)", max_ctrl_transfer
);
3463 ti
= proto_tree_add_uint(mbim_tree
, hf_mbim_max_ctrl_transfer
, tvb
, offset
, 4, max_ctrl_transfer
);
3464 if (max_ctrl_transfer
< 64) {
3465 expert_add_info(pinfo
, ti
, &ei_mbim_max_ctrl_transfer
);
3470 case MBIM_CLOSE_MSG
:
3472 case MBIM_COMMAND_MSG
:
3474 guint32 info_buff_len
, current_frag
, total_frag
, cid
, cmd_type
;
3476 fragment_head
*frag_data
;
3479 ti
= proto_tree_add_text(mbim_tree
, tvb
, offset
, 8, "Fragment Header");
3480 subtree
= proto_item_add_subtree(ti
, ett_mbim_frag_header
);
3481 total_frag
= tvb_get_letohl(tvb
, offset
);
3482 proto_tree_add_uint(subtree
, hf_mbim_fragment_total
, tvb
, offset
, 4, total_frag
);
3484 current_frag
= tvb_get_letohl(tvb
, offset
);
3485 proto_tree_add_uint(subtree
, hf_mbim_fragment_current
, tvb
, offset
, 4, current_frag
);
3487 if (total_frag
> 1) {
3488 frag_data
= fragment_add_seq_check(&mbim_reassembly_table
, tvb
, offset
, pinfo
,
3489 trans_id
, NULL
, current_frag
,
3490 tvb_reported_length_remaining(tvb
, offset
),
3491 (current_frag
!= (total_frag
-1)));
3492 frag_tvb
= process_reassembled_data(tvb
, offset
, pinfo
, "Reassembled MBIM control message",
3493 frag_data
, &mbim_frag_items
, NULL
, subtree
);
3495 /* Fragmentation reassembly not performed yet */
3496 proto_tree_add_item(mbim_tree
, hf_mbim_fragmented_payload
, tvb
, offset
, -1, ENC_NA
);
3497 offset
= tvb_length(tvb
);
3505 if (!PINFO_FD_VISITED(pinfo
)) {
3506 mbim_info
= wmem_new(wmem_file_scope(), struct mbim_info
);
3507 mbim_info
->req_frame
= PINFO_FD_NUM(pinfo
);
3508 mbim_info
->resp_frame
= 0;
3509 wmem_tree_insert32(mbim_conv
->trans
, trans_id
, mbim_info
);
3511 mbim_info
= (struct mbim_info
*)wmem_tree_lookup32(mbim_conv
->trans
, trans_id
);
3512 if (mbim_info
&& mbim_info
->resp_frame
) {
3513 proto_item
*resp_it
;
3515 resp_it
= proto_tree_add_uint(header_tree
, hf_mbim_response_in
, tvb
, 0, 0, mbim_info
->resp_frame
);
3516 PROTO_ITEM_SET_GENERATED(resp_it
);
3520 uuid_idx
= mbim_dissect_service_id_uuid(frag_tvb
, pinfo
, mbim_tree
, hf_mbim_device_service_id
, &offset
);
3521 cid
= mbim_dissect_cid(frag_tvb
, pinfo
, mbim_tree
, &offset
, uuid_idx
);
3522 cmd_type
= tvb_get_letohl(frag_tvb
, offset
);
3523 proto_tree_add_uint(mbim_tree
, hf_mbim_command_type
, frag_tvb
, offset
, 4, cmd_type
);
3525 info_buff_len
= tvb_get_letohl(frag_tvb
, offset
);
3526 proto_tree_add_uint(mbim_tree
, hf_mbim_info_buffer_len
, frag_tvb
, offset
, 4, info_buff_len
);
3528 subtree
= mbim_tree
;
3529 if (info_buff_len
) {
3530 ti
= proto_tree_add_text(mbim_tree
, frag_tvb
, offset
, info_buff_len
, "Information Buffer");
3531 subtree
= proto_item_add_subtree(ti
, ett_mbim_info_buffer
);
3534 case UUID_BASIC_CONNECT
:
3536 case MBIM_CID_DEVICE_CAPS
:
3537 if (cmd_type
== MBIM_COMMAND_SET
) {
3538 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3539 } else if (info_buff_len
) {
3540 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3543 case MBIM_CID_SUBSCRIBER_READY_STATUS
:
3544 if (cmd_type
== MBIM_COMMAND_SET
) {
3545 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3546 } else if (info_buff_len
) {
3547 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3550 case MBIM_CID_RADIO_STATE
:
3551 if (cmd_type
== MBIM_COMMAND_SET
) {
3552 proto_tree_add_item(subtree
, hf_mbim_radio_state_set
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3553 } else if (info_buff_len
) {
3554 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3558 if (cmd_type
== MBIM_COMMAND_SET
) {
3559 mbim_dissect_set_pin(frag_tvb
, pinfo
, subtree
, offset
);
3560 } else if (info_buff_len
) {
3561 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3564 case MBIM_CID_PIN_LIST
:
3565 if (cmd_type
== MBIM_COMMAND_SET
) {
3566 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3567 } else if (info_buff_len
) {
3568 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3571 case MBIM_CID_HOME_PROVIDER
:
3572 if (cmd_type
== MBIM_COMMAND_SET
) {
3573 mbim_dissect_provider(frag_tvb
, pinfo
, subtree
, offset
);
3574 } else if (info_buff_len
) {
3575 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3578 case MBIM_CID_PREFERRED_PROVIDERS
:
3579 if (cmd_type
== MBIM_COMMAND_SET
) {
3580 mbim_dissect_providers(frag_tvb
, pinfo
, subtree
, offset
);
3581 } else if (info_buff_len
) {
3582 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3585 case MBIM_CID_VISIBLE_PROVIDERS
:
3586 if (cmd_type
== MBIM_COMMAND_SET
) {
3587 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3589 proto_tree_add_item(subtree
, hf_mbim_visible_providers_req_action
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3592 case MBIM_CID_REGISTER_STATE
:
3593 if (cmd_type
== MBIM_COMMAND_SET
) {
3594 mbim_dissect_set_register_state(frag_tvb
, pinfo
, subtree
, offset
);
3595 } else if (info_buff_len
) {
3596 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3599 case MBIM_CID_PACKET_SERVICE
:
3600 if (cmd_type
== MBIM_COMMAND_SET
) {
3601 proto_tree_add_item(subtree
, hf_mbim_set_packet_service_action
,
3602 frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3603 } else if (info_buff_len
) {
3604 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3607 case MBIM_CID_SIGNAL_STATE
:
3608 if (cmd_type
== MBIM_COMMAND_SET
) {
3609 mbim_dissect_set_signal_state(frag_tvb
, pinfo
, subtree
, offset
);
3610 } else if (info_buff_len
) {
3611 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3614 case MBIM_CID_CONNECT
:
3615 if (cmd_type
== MBIM_COMMAND_SET
) {
3616 mbim_dissect_set_connect(frag_tvb
, pinfo
, subtree
, offset
);
3618 proto_tree_add_item(subtree
, hf_mbim_connect_info_session_id
, frag_tvb
,
3619 offset
, 4, ENC_LITTLE_ENDIAN
);
3622 case MBIM_CID_PROVISIONED_CONTEXTS
:
3623 if (cmd_type
== MBIM_COMMAND_SET
) {
3624 mbim_dissect_context(frag_tvb
, pinfo
, subtree
, offset
, TRUE
);
3625 } else if (info_buff_len
) {
3626 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3629 case MBIM_CID_SERVICE_ACTIVATION
:
3630 if (cmd_type
== MBIM_COMMAND_SET
) {
3631 proto_tree_add_item(subtree
, hf_mbim_set_service_activation_data_buffer
,
3632 frag_tvb
, offset
, info_buff_len
, ENC_NA
);
3634 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3637 case MBIM_CID_IP_CONFIGURATION
:
3638 if (cmd_type
== MBIM_COMMAND_SET
) {
3639 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3641 proto_tree_add_item(subtree
, hf_mbim_ip_configuration_info_session_id
, frag_tvb
,
3642 offset
, 4, ENC_LITTLE_ENDIAN
);
3645 case MBIM_CID_DEVICE_SERVICES
:
3646 if (cmd_type
== MBIM_COMMAND_SET
) {
3647 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3648 } else if (info_buff_len
) {
3649 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3652 case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST
:
3653 if (cmd_type
== MBIM_COMMAND_SET
) {
3654 mbim_dissect_device_service_subscribe_list(frag_tvb
, pinfo
, subtree
, offset
);
3656 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3659 case MBIM_CID_PACKET_STATISTICS
:
3660 if (cmd_type
== MBIM_COMMAND_SET
) {
3661 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3662 } else if (info_buff_len
) {
3663 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3666 case MBIM_CID_NETWORK_IDLE_HINT
:
3667 if (cmd_type
== MBIM_COMMAND_SET
) {
3668 proto_tree_add_item(subtree
, hf_mbim_network_idle_hint_state
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3669 } else if (info_buff_len
) {
3670 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3673 case MBIM_CID_EMERGENCY_MODE
:
3674 if (cmd_type
== MBIM_COMMAND_SET
) {
3675 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3676 } else if (info_buff_len
) {
3677 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3680 case MBIM_CID_IP_PACKET_FILTERS
:
3681 mbim_dissect_packet_filters(frag_tvb
, pinfo
, subtree
, offset
);
3683 case MBIM_CID_MULTICARRIER_PROVIDERS
:
3684 if (cmd_type
== MBIM_COMMAND_SET
) {
3685 mbim_dissect_providers(frag_tvb
, pinfo
, subtree
, offset
);
3686 } else if (info_buff_len
) {
3687 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3691 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3697 case MBIM_CID_SMS_CONFIGURATION
:
3698 if (cmd_type
== MBIM_COMMAND_SET
) {
3699 mbim_dissect_set_sms_configuration(frag_tvb
, pinfo
, subtree
, offset
);
3700 } else if (info_buff_len
) {
3701 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3704 case MBIM_CID_SMS_READ
:
3705 if (cmd_type
== MBIM_COMMAND_SET
) {
3706 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3708 mbim_dissect_sms_read_req(frag_tvb
, pinfo
, subtree
, offset
);
3711 case MBIM_CID_SMS_SEND
:
3712 if (cmd_type
== MBIM_COMMAND_SET
) {
3713 mbim_dissect_set_sms_send(frag_tvb
, pinfo
, subtree
, offset
, mbim_conv
);
3715 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3718 case MBIM_CID_SMS_DELETE
:
3719 if (cmd_type
== MBIM_COMMAND_SET
) {
3720 proto_tree_add_item(subtree
, hf_mbim_set_sms_delete_flag
,
3721 frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3723 proto_tree_add_item(subtree
, hf_mbim_set_sms_delete_message_index
,
3724 frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3726 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3729 case MBIM_CID_SMS_MESSAGE_STORE_STATUS
:
3730 if (cmd_type
== MBIM_COMMAND_SET
) {
3731 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3732 } else if (info_buff_len
) {
3733 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3737 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3744 if (cmd_type
== MBIM_COMMAND_SET
) {
3745 mbim_dissect_set_ussd(frag_tvb
, pinfo
, subtree
, offset
);
3747 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3751 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3755 case UUID_PHONEBOOK
:
3757 case MBIM_CID_PHONEBOOK_CONFIGURATION
:
3758 if (cmd_type
== MBIM_COMMAND_SET
) {
3759 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3760 } else if (info_buff_len
) {
3761 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3764 case MBIM_CID_PHONEBOOK_READ
:
3765 if (cmd_type
== MBIM_COMMAND_SET
) {
3766 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3768 proto_tree_add_item(subtree
, hf_mbim_phonebook_read_req_filter_flag
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3770 proto_tree_add_item(subtree
, hf_mbim_phonebook_read_req_filter_message_index
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3773 case MBIM_CID_PHONEBOOK_DELETE
:
3774 if (cmd_type
== MBIM_COMMAND_SET
) {
3775 proto_tree_add_item(subtree
, hf_mbim_set_phonebook_delete_filter_flag
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3777 proto_tree_add_item(subtree
, hf_mbim_set_phonebook_delete_filter_message_index
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3779 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3782 case MBIM_CID_PHONEBOOK_WRITE
:
3783 if (cmd_type
== MBIM_COMMAND_SET
) {
3784 mbim_dissect_set_phonebook_write(frag_tvb
, pinfo
, tree
, offset
);
3786 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3790 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3796 case MBIM_CID_STK_PAC
:
3797 if (cmd_type
== MBIM_COMMAND_SET
) {
3798 proto_tree_add_item(subtree
, hf_mbim_set_stk_pac_pac_host_control
, frag_tvb
, offset
, 32, ENC_NA
);
3800 if (info_buff_len
) {
3801 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3805 case MBIM_CID_STK_TERMINAL_RESPONSE
:
3806 if (cmd_type
== MBIM_COMMAND_SET
) {
3807 mbim_dissect_set_stk_terminal_response(frag_tvb
, pinfo
, tree
, offset
);
3809 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3812 case MBIM_CID_STK_ENVELOPE
:
3813 if (cmd_type
== MBIM_COMMAND_SET
) {
3815 proto_tree
*env_tree
;
3817 ti
= proto_tree_add_item(subtree
, hf_mbim_set_stk_envelope_data_buffer
,
3818 frag_tvb
, offset
, info_buff_len
, ENC_NA
);
3819 if (etsi_cat_handle
) {
3820 env_tree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
3821 env_tvb
= tvb_new_subset(frag_tvb
, offset
, info_buff_len
, info_buff_len
);
3822 call_dissector(etsi_cat_handle
, env_tvb
, pinfo
, env_tree
);
3824 } else if (info_buff_len
) {
3825 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3829 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3835 case MBIM_CID_AKA_AUTH
:
3836 if (cmd_type
== MBIM_COMMAND_SET
) {
3837 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3839 mbim_dissect_aka_auth_req(frag_tvb
, pinfo
, subtree
, offset
);
3842 case MBIM_CID_AKAP_AUTH
:
3843 if (cmd_type
== MBIM_COMMAND_SET
) {
3844 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3846 mbim_dissect_akap_auth_req(frag_tvb
, pinfo
, subtree
, offset
);
3849 case MBIM_CID_SIM_AUTH
:
3850 if (cmd_type
== MBIM_COMMAND_SET
) {
3851 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3853 mbim_dissect_sim_auth_req(frag_tvb
, pinfo
, subtree
, offset
);
3857 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3863 case MBIM_CID_DSS_CONNECT
:
3864 if (cmd_type
== MBIM_COMMAND_SET
) {
3865 mbim_dissect_set_dss_connect(frag_tvb
, pinfo
, subtree
, offset
);
3867 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3871 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3875 case UUID_MULTICARRIER
:
3877 case MBIM_CID_MULTICARRIER_CAPABILITIES
:
3878 if (cmd_type
== MBIM_COMMAND_SET
) {
3879 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3880 } else if (info_buff_len
) {
3881 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3884 case MBIM_CID_LOCATION_INFO
:
3885 if (cmd_type
== MBIM_COMMAND_SET
) {
3886 proto_tree_add_item(subtree
, hf_mbim_location_info_country
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3887 } else if (info_buff_len
) {
3888 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3891 case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST
:
3892 if (cmd_type
== MBIM_COMMAND_SET
) {
3893 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, info_buff_len
);
3895 mbim_dissect_muticarrier_current_cid_list_req(frag_tvb
, pinfo
, subtree
, offset
);
3899 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3903 case UUID_MS_HOSTSHUTDOWN
:
3905 case MBIM_CID_MS_HOSTSHUTDOWN
:
3906 if (cmd_type
== MBIM_COMMAND_SET
) {
3907 if (info_buff_len
) {
3908 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3911 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3915 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3921 case MBIM_CID_MSFWID_FIRMWAREID
:
3922 if (cmd_type
== MBIM_COMMAND_SET
) {
3923 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3924 } else if (info_buff_len
) {
3925 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
3929 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
3934 if (info_buff_len
) {
3935 proto_tree_add_item(subtree
, hf_mbim_info_buffer
, frag_tvb
, offset
, info_buff_len
, ENC_NA
);
3941 case MBIM_HOST_ERROR_MSG
:
3942 case MBIM_FUNCTION_ERROR_MSG
:
3943 proto_tree_add_item(mbim_tree
, hf_mbim_error_status_code
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3945 case MBIM_OPEN_DONE
:
3946 case MBIM_CLOSE_DONE
:
3947 proto_tree_add_item(mbim_tree
, hf_mbim_status
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3949 case MBIM_COMMAND_DONE
:
3950 case MBIM_INDICATE_STATUS_MSG
:
3952 guint32 info_buff_len
, current_frag
, total_frag
, cid
;
3954 fragment_head
*frag_data
;
3957 ti
= proto_tree_add_text(mbim_tree
, tvb
, offset
, 8, "Fragment Header");
3958 subtree
= proto_item_add_subtree(ti
, ett_mbim_frag_header
);
3959 total_frag
= tvb_get_letohl(tvb
, offset
);
3960 proto_tree_add_uint(subtree
, hf_mbim_fragment_total
, tvb
, offset
, 4, total_frag
);
3962 current_frag
= tvb_get_letohl(tvb
, offset
);
3963 proto_tree_add_uint(subtree
, hf_mbim_fragment_current
, tvb
, offset
, 4, current_frag
);
3965 if (total_frag
> 1) {
3966 frag_data
= fragment_add_seq_check(&mbim_reassembly_table
, tvb
, offset
, pinfo
,
3967 trans_id
, NULL
, current_frag
,
3968 tvb_reported_length_remaining(tvb
, offset
),
3969 (current_frag
!= (total_frag
-1)));
3970 frag_tvb
= process_reassembled_data(tvb
, offset
, pinfo
, "Reassembled MBIM control message",
3971 frag_data
, &mbim_frag_items
, NULL
, subtree
);
3973 /* Fragmentation reassembly not performed yet */
3974 proto_tree_add_item(mbim_tree
, hf_mbim_fragmented_payload
, tvb
, offset
, -1, ENC_NA
);
3975 offset
= tvb_length(tvb
);
3983 if (msg_type
== MBIM_COMMAND_DONE
) {
3984 if (!PINFO_FD_VISITED(pinfo
)) {
3985 mbim_info
= (struct mbim_info
*)wmem_tree_lookup32(mbim_conv
->trans
, trans_id
);
3987 mbim_info
->resp_frame
= PINFO_FD_NUM(pinfo
);
3990 mbim_info
= (struct mbim_info
*)wmem_tree_lookup32(mbim_conv
->trans
, trans_id
);
3991 if (mbim_info
&& mbim_info
->req_frame
) {
3994 req_it
= proto_tree_add_uint(header_tree
, hf_mbim_request_in
, tvb
, 0, 0, mbim_info
->req_frame
);
3995 PROTO_ITEM_SET_GENERATED(req_it
);
4000 uuid_idx
= mbim_dissect_service_id_uuid(frag_tvb
, pinfo
, mbim_tree
, hf_mbim_device_service_id
, &offset
);
4001 cid
= mbim_dissect_cid(frag_tvb
, pinfo
, mbim_tree
, &offset
, uuid_idx
);
4002 if (msg_type
== MBIM_COMMAND_DONE
) {
4003 proto_tree_add_item(mbim_tree
, hf_mbim_status
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4006 info_buff_len
= tvb_get_letohl(frag_tvb
, offset
);
4007 proto_tree_add_uint(mbim_tree
, hf_mbim_info_buffer_len
, frag_tvb
, offset
, 4, info_buff_len
);
4009 if (info_buff_len
== 0) {
4012 ti
= proto_tree_add_text(mbim_tree
, frag_tvb
, offset
, info_buff_len
, "Information Buffer");
4013 subtree
= proto_item_add_subtree(ti
, ett_mbim_info_buffer
);
4015 case UUID_BASIC_CONNECT
:
4017 case MBIM_CID_DEVICE_CAPS
:
4018 if (msg_type
== MBIM_COMMAND_DONE
) {
4019 mbim_dissect_device_caps_info(frag_tvb
, pinfo
, subtree
, offset
, mbim_conv
);
4021 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4024 case MBIM_CID_SUBSCRIBER_READY_STATUS
:
4025 mbim_dissect_subscriber_ready_status(frag_tvb
, pinfo
, subtree
, offset
);
4027 case MBIM_CID_RADIO_STATE
:
4028 proto_tree_add_item(subtree
, hf_mbim_radio_state_hw_radio_state
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4030 proto_tree_add_item(subtree
, hf_mbim_radio_state_sw_radio_state
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4033 if (msg_type
== MBIM_COMMAND_DONE
) {
4036 proto_tree_add_item(subtree
, hf_mbim_pin_info_pin_type
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4038 proto_tree_add_item(subtree
, hf_mbim_pin_info_pin_state
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4040 attempts
= tvb_get_letohl(frag_tvb
, offset
);
4041 if (attempts
== 0xffffffff) {
4042 proto_tree_add_uint_format(subtree
, hf_mbim_pin_info_remaining_attempts
, frag_tvb
, offset
, 4,
4043 attempts
, "Not supported (0xffffffff)");
4045 proto_tree_add_uint(subtree
, hf_mbim_pin_info_remaining_attempts
, frag_tvb
, offset
, 4, attempts
);
4048 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4051 case MBIM_CID_PIN_LIST
:
4052 if (msg_type
== MBIM_COMMAND_DONE
) {
4053 mbim_dissect_pin_list_info(frag_tvb
, pinfo
, subtree
, offset
);
4055 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4058 case MBIM_CID_HOME_PROVIDER
:
4059 if (msg_type
== MBIM_COMMAND_DONE
) {
4060 mbim_dissect_provider(frag_tvb
, pinfo
, subtree
, offset
);
4062 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4065 case MBIM_CID_PREFERRED_PROVIDERS
:
4066 mbim_dissect_providers(frag_tvb
, pinfo
, subtree
, offset
);
4068 case MBIM_CID_VISIBLE_PROVIDERS
:
4069 if (msg_type
== MBIM_COMMAND_DONE
) {
4070 mbim_dissect_providers(frag_tvb
, pinfo
, subtree
, offset
);
4072 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4075 case MBIM_CID_REGISTER_STATE
:
4076 mbim_dissect_registration_state_info(frag_tvb
, pinfo
, subtree
, offset
);
4078 case MBIM_CID_PACKET_SERVICE
:
4079 mbim_dissect_packet_service_info(frag_tvb
, pinfo
, subtree
, offset
);
4081 case MBIM_CID_SIGNAL_STATE
:
4082 mbim_dissect_signal_state_info(frag_tvb
, pinfo
, subtree
, offset
);
4084 case MBIM_CID_CONNECT
:
4085 mbim_dissect_connect_info(frag_tvb
, pinfo
, subtree
, offset
);
4087 case MBIM_CID_PROVISIONED_CONTEXTS
:
4088 mbim_dissect_provisioned_contexts_info(frag_tvb
, pinfo
, subtree
, offset
);
4090 case MBIM_CID_SERVICE_ACTIVATION
:
4091 if (msg_type
== MBIM_COMMAND_DONE
) {
4094 nw_error
= tvb_get_letohl(frag_tvb
, offset
);
4095 if (nw_error
== 0) {
4096 proto_tree_add_uint_format_value(subtree
, hf_mbim_service_activation_info_nw_error
,
4097 frag_tvb
, offset
, 4, nw_error
, "Success (0)");
4099 proto_tree_add_uint(subtree
, hf_mbim_service_activation_info_nw_error
,
4100 frag_tvb
, offset
, 4, nw_error
);
4102 proto_tree_add_item(subtree
, hf_mbim_service_activation_info_data_buffer
, frag_tvb
, offset
, info_buff_len
, ENC_NA
);
4104 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4107 case MBIM_CID_IP_CONFIGURATION
:
4108 mbim_dissect_ip_configuration_info(frag_tvb
, pinfo
, subtree
, offset
);
4110 case MBIM_CID_DEVICE_SERVICES
:
4111 if (msg_type
== MBIM_COMMAND_DONE
) {
4112 mbim_dissect_device_services_info(frag_tvb
, pinfo
, subtree
, offset
);
4114 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4117 case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST
:
4118 if (msg_type
== MBIM_COMMAND_DONE
) {
4119 mbim_dissect_device_service_subscribe_list(frag_tvb
, pinfo
, subtree
, offset
);
4121 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4124 case MBIM_CID_PACKET_STATISTICS
:
4125 if (msg_type
== MBIM_COMMAND_DONE
) {
4126 mbim_dissect_packet_statistics_info(frag_tvb
, pinfo
, subtree
, offset
);
4128 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4131 case MBIM_CID_NETWORK_IDLE_HINT
:
4132 if (msg_type
== MBIM_COMMAND_DONE
) {
4133 proto_tree_add_item(subtree
, hf_mbim_network_idle_hint_state
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4135 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4138 case MBIM_CID_EMERGENCY_MODE
:
4139 proto_tree_add_item(subtree
, hf_mbim_emergency_mode_info_emergency_mode
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4141 case MBIM_CID_IP_PACKET_FILTERS
:
4142 if (msg_type
== MBIM_COMMAND_DONE
) {
4143 mbim_dissect_packet_filters(frag_tvb
, pinfo
, subtree
, offset
);
4145 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4148 case MBIM_CID_MULTICARRIER_PROVIDERS
:
4149 mbim_dissect_providers(frag_tvb
, pinfo
, subtree
, offset
);
4152 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4158 case MBIM_CID_SMS_CONFIGURATION
:
4159 mbim_dissect_sms_configuration_info(frag_tvb
, pinfo
, subtree
, offset
);
4161 case MBIM_CID_SMS_READ
:
4162 mbim_dissect_sms_read_info(frag_tvb
, pinfo
, subtree
, offset
, mbim_conv
);
4164 case MBIM_CID_SMS_SEND
:
4165 if (msg_type
== MBIM_COMMAND_DONE
) {
4166 proto_tree_add_item(subtree
, hf_mbim_sms_send_info_message_reference
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4168 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4171 case MBIM_CID_SMS_DELETE
:
4172 if (msg_type
== MBIM_COMMAND_DONE
) {
4173 if (info_buff_len
) {
4174 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4177 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4180 case MBIM_CID_SMS_MESSAGE_STORE_STATUS
:
4181 proto_tree_add_bitmask(subtree
, frag_tvb
, offset
, hf_mbim_sms_status_info_flags
, ett_mbim_bitmap
,
4182 mbim_sms_status_info_flags_fields
, ENC_LITTLE_ENDIAN
);
4184 proto_tree_add_item(subtree
, hf_mbim_sms_status_info_message_index
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4187 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4194 mbim_dissect_ussd_info(frag_tvb
, pinfo
, subtree
, offset
);
4197 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4201 case UUID_PHONEBOOK
:
4203 case MBIM_CID_PHONEBOOK_CONFIGURATION
:
4204 mbim_dissect_phonebook_configuration_info(frag_tvb
, pinfo
, subtree
, offset
);
4206 case MBIM_CID_PHONEBOOK_READ
:
4207 if (msg_type
== MBIM_COMMAND_DONE
) {
4208 mbim_dissect_phonebook_read_info(frag_tvb
, pinfo
, subtree
, offset
);
4210 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4213 case MBIM_CID_PHONEBOOK_DELETE
:
4214 case MBIM_CID_PHONEBOOK_WRITE
:
4215 if (msg_type
== MBIM_COMMAND_DONE
) {
4216 if (info_buff_len
) {
4217 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4220 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4224 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4230 case MBIM_CID_STK_PAC
:
4231 if (msg_type
== MBIM_COMMAND_DONE
) {
4232 proto_tree_add_item(subtree
, hf_mbim_stk_pac_info_pac_support
, frag_tvb
, offset
, 256, ENC_NA
);
4236 proto_tree
*pac_tree
;
4238 proto_tree_add_item(subtree
, hf_mbim_stk_pac_pac_type
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4240 pac_length
= info_buff_len
- 4;
4241 ti
= proto_tree_add_item(subtree
, hf_mbim_stk_pac_pac
, frag_tvb
, offset
, pac_length
, ENC_NA
);
4242 if (proactive_handle
) {
4243 pac_tree
= proto_item_add_subtree(ti
, ett_mbim_buffer
);
4244 pac_tvb
= tvb_new_subset(frag_tvb
, offset
, pac_length
, pac_length
);
4245 call_dissector(proactive_handle
, pac_tvb
, pinfo
, pac_tree
);
4249 case MBIM_CID_STK_TERMINAL_RESPONSE
:
4250 if (msg_type
== MBIM_COMMAND_DONE
) {
4251 mbim_dissect_stk_terminal_response_info(frag_tvb
, pinfo
, subtree
, offset
);
4253 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4256 case MBIM_CID_STK_ENVELOPE
:
4257 if (msg_type
== MBIM_COMMAND_DONE
) {
4258 proto_tree_add_item(subtree
, hf_mbim_stk_envelope_info_envelope_support
,
4259 frag_tvb
, offset
, 32, ENC_NA
);
4261 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4265 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4271 case MBIM_CID_AKA_AUTH
:
4272 if (msg_type
== MBIM_COMMAND_DONE
) {
4273 mbim_dissect_aka_auth_info(frag_tvb
, pinfo
, subtree
, offset
);
4275 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4278 case MBIM_CID_AKAP_AUTH
:
4279 if (msg_type
== MBIM_COMMAND_DONE
) {
4280 mbim_dissect_akap_auth_info(frag_tvb
, pinfo
, subtree
, offset
);
4282 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4285 case MBIM_CID_SIM_AUTH
:
4286 if (msg_type
== MBIM_COMMAND_DONE
) {
4287 mbim_dissect_sim_auth_info(frag_tvb
, pinfo
, subtree
, offset
);
4289 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4293 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4299 case MBIM_CID_DSS_CONNECT
:
4300 if (msg_type
== MBIM_COMMAND_DONE
) {
4301 if (info_buff_len
) {
4302 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4305 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4309 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4313 case UUID_MULTICARRIER
:
4315 case MBIM_CID_MULTICARRIER_CAPABILITIES
:
4316 if (msg_type
== MBIM_COMMAND_DONE
) {
4317 proto_tree_add_bitmask(subtree
, frag_tvb
, offset
, hf_mbim_multicarrier_capabilities_info_capabilities
,
4318 ett_mbim_bitmap
, mbim_multicarrier_capabilities_fields
, ENC_LITTLE_ENDIAN
);
4320 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4323 case MBIM_CID_LOCATION_INFO
:
4324 if (msg_type
== MBIM_COMMAND_DONE
) {
4325 proto_tree_add_item(subtree
, hf_mbim_location_info_country
, frag_tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4326 } else if (info_buff_len
) {
4327 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4330 case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST
:
4331 if (msg_type
== MBIM_COMMAND_DONE
) {
4332 mbim_dissect_muticarrier_current_cid_list_info(frag_tvb
, pinfo
, subtree
, offset
);
4334 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4338 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4342 case UUID_MS_HOSTSHUTDOWN
:
4344 case MBIM_CID_MS_HOSTSHUTDOWN
:
4345 if (msg_type
== MBIM_COMMAND_DONE
) {
4346 if (info_buff_len
) {
4347 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4350 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4354 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4360 case MBIM_CID_MSFWID_FIRMWAREID
:
4361 if (msg_type
== MBIM_COMMAND_DONE
) {
4362 proto_tree_add_item(subtree
, hf_mbim_msfwid_firmwareid_info_firmware_id
, frag_tvb
, offset
, 16, ENC_NA
);
4363 } else if (info_buff_len
) {
4364 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_info_buffer
, frag_tvb
, offset
, info_buff_len
);
4368 proto_tree_add_expert(subtree
, pinfo
, &ei_mbim_unexpected_msg
, frag_tvb
, offset
, -1);
4373 proto_tree_add_item(subtree
, hf_mbim_info_buffer
, frag_tvb
, offset
, info_buff_len
, ENC_NA
);
4382 return tvb_length(tvb
);
4386 dissect_mbim_descriptor(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void *data _U_
)
4389 guint8 length
, type
, subtype
;
4391 length
= tvb_get_guint8(tvb
, 0);
4392 type
= tvb_get_guint8(tvb
, 1);
4393 subtype
= tvb_get_guint8(tvb
, 2);
4395 if ((type
!= 0x24) ||
4396 !(((subtype
== 0x1b) && (length
== 12)) || ((subtype
== 0x1c) && (length
== 8)))){
4400 ti
= proto_tree_add_item(tree
, hf_mbim_descriptor
, tvb
, 0, 0, ENC_NA
);
4401 PROTO_ITEM_SET_HIDDEN(ti
);
4403 if (subtype
== 0x1b) {
4404 proto_tree_add_item(tree
, hf_mbim_descriptor_version
, tvb
, 3, 2, ENC_LITTLE_ENDIAN
);
4405 proto_tree_add_item(tree
, hf_mbim_descriptor_max_control_message
, tvb
, 5, 2, ENC_LITTLE_ENDIAN
);
4406 proto_tree_add_item(tree
, hf_mbim_descriptor_number_filters
, tvb
, 7, 1, ENC_NA
);
4407 proto_tree_add_item(tree
, hf_mbim_descriptor_max_filter_size
, tvb
, 8, 1, ENC_NA
);
4408 proto_tree_add_item(tree
, hf_mbim_descriptor_max_segment_size
, tvb
, 9, 2, ENC_LITTLE_ENDIAN
);
4409 proto_tree_add_bitmask(tree
, tvb
, 11, hf_mbim_descriptor_network_capabilities
, ett_mbim_bitmap
,
4410 mbim_descriptor_network_capabilities_fields
, ENC_NA
);
4412 proto_tree_add_item(tree
, hf_mbim_descriptor_extended_version
, tvb
, 3, 2, ENC_LITTLE_ENDIAN
);
4413 proto_tree_add_item(tree
, hf_mbim_descriptor_max_outstanding_command_messages
, tvb
, 5, 1, ENC_NA
);
4414 proto_tree_add_item(tree
, hf_mbim_descriptor_mtu
, tvb
, 6, 2, ENC_LITTLE_ENDIAN
);
4421 dissect_mbim_bulk(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
4423 proto_item
*ti
, *sig_ti
, *pi
;
4424 proto_tree
*mbim_tree
, *subtree
, *sig_tree
;
4426 guint32 nth_sig
, length
, next_index
, base_offset
, offset
, datagram_index
, datagram_length
,
4427 nb
, total
= 0, ndp
= 0;
4429 dissector_handle_t dissector
;
4430 tvbuff_t
*datagram_tvb
;
4431 const guint32 NTH16
= 0x484D434E;
4432 const guint32 NTH32
= 0x686D636E;
4434 if (tvb_length(tvb
) < 12) {
4438 nth_sig
= tvb_get_letohl(tvb
, 0);
4439 if (nth_sig
== NTH16
) {
4441 } else if (nth_sig
== NTH32
) {
4447 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "MBIM");
4448 col_clear(pinfo
->cinfo
, COL_INFO
);
4450 ti
= proto_tree_add_item(tree
, proto_mbim
, tvb
, 0, -1, ENC_NA
);
4451 mbim_tree
= proto_item_add_subtree(ti
, ett_mbim
);
4452 ti
=proto_tree_add_item(mbim_tree
, hf_mbim_bulk
, tvb
, 0, 0, ENC_NA
);
4453 PROTO_ITEM_SET_HIDDEN(ti
);
4455 ti
= proto_tree_add_text(mbim_tree
, tvb
, 0, 0, "NCM Transfer Header");
4456 subtree
= proto_item_add_subtree(ti
, ett_mbim_msg_header
);
4457 proto_tree_add_item(subtree
, hf_mbim_bulk_nth_signature
, tvb
, 0, 4, ENC_ASCII
|ENC_NA
);
4458 length
= tvb_get_letohs(tvb
, 4);
4459 proto_tree_add_uint(subtree
, hf_mbim_bulk_nth_header_length
, tvb
, 4, 2, length
);
4460 proto_item_set_len(ti
, length
);
4461 proto_tree_add_item(subtree
, hf_mbim_bulk_nth_sequence_number
, tvb
, 6, 2, ENC_LITTLE_ENDIAN
);
4463 proto_tree_add_item(subtree
, hf_mbim_bulk_nth_block_length
, tvb
, 8, 2, ENC_LITTLE_ENDIAN
);
4464 next_index
= tvb_get_letohs(tvb
, 10);
4465 pi
= proto_tree_add_uint(subtree
, hf_mbim_bulk_nth_ndp_index
, tvb
, 10, 2, next_index
);
4467 proto_tree_add_item(subtree
, hf_mbim_bulk_nth_block_length_32
, tvb
, 8, 4, ENC_LITTLE_ENDIAN
);
4468 next_index
= tvb_get_letohl(tvb
, 12);
4469 pi
= proto_tree_add_uint(subtree
, hf_mbim_bulk_nth_ndp_index_32
, tvb
, 12, 4, next_index
);
4471 if (next_index
% 4) {
4472 expert_add_info_format(pinfo
, pi
, &ei_mbim_alignment_error
,
4473 "NDP Index is not a multiple of 4 bytes");
4474 return tvb_length(tvb
);
4477 while (next_index
) {
4478 base_offset
= offset
= next_index
;
4480 ti
= proto_tree_add_text(mbim_tree
, tvb
, offset
, 0, "NCM Datagram Pointer");
4481 subtree
= proto_item_add_subtree(ti
, ett_mbim_msg_header
);
4482 signature
= tvb_get_string(wmem_packet_scope(), tvb
, offset
, 4);
4483 if ((!is_32bits
&& !strcmp(signature
, "IPS")) ||
4484 (is_32bits
&& !strcmp(signature
, "ips"))) {
4485 sig_ti
= proto_tree_add_uint_format_value(subtree
, hf_mbim_bulk_ndp_signature
, tvb
, offset
,
4486 4, tvb_get_letohl(tvb
, offset
), "%c%c%c%u", signature
[0],
4487 signature
[1], signature
[2], signature
[3]);
4488 sig_tree
= proto_item_add_subtree(sig_ti
, ett_mbim_msg_header
);
4489 proto_tree_add_item(sig_tree
, hf_mbim_bulk_ndp_signature_ips_session_id
, tvb
, offset
+3, 1, ENC_NA
);
4490 col_append_sep_fstr(pinfo
->cinfo
, COL_INFO
, NULL
, "%c%c%c%u", signature
[0], signature
[1],
4491 signature
[2], signature
[3]);
4492 dissector
= ip_handle
;
4493 } else if ((!is_32bits
&& !strcmp(signature
, "DSS")) ||
4494 (is_32bits
&& !strcmp(signature
, "dss"))) {
4495 sig_ti
= proto_tree_add_uint_format_value(subtree
, hf_mbim_bulk_ndp_signature
, tvb
, offset
,
4496 4, tvb_get_letohl(tvb
, offset
), "%c%c%c%u", signature
[0],
4497 signature
[1], signature
[2], signature
[3]);
4498 sig_tree
= proto_item_add_subtree(sig_ti
, ett_mbim_msg_header
);
4499 proto_tree_add_item(sig_tree
, hf_mbim_bulk_ndp_signature_dss_session_id
, tvb
, offset
+3, 1, ENC_NA
);
4500 col_append_sep_fstr(pinfo
->cinfo
, COL_INFO
, NULL
, "%c%c%c%u", signature
[0], signature
[1],
4501 signature
[2], signature
[3]);
4502 dissector
= data_handle
;
4503 } else if ((!is_32bits
&& !strcmp(signature
, "NCM0")) ||
4504 (is_32bits
&& !strcmp(signature
, "ncm0"))) {
4505 proto_tree_add_uint_format_value(subtree
, hf_mbim_bulk_ndp_signature
, tvb
, offset
, 4,
4506 tvb_get_letohl(tvb
, offset
), "%s", signature
);
4507 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, signature
);
4508 dissector
= eth_handle
;
4509 } else if ((!is_32bits
&& !strcmp(signature
, "NCM1")) ||
4510 (is_32bits
&& !strcmp(signature
, "ncm1"))) {
4511 proto_tree_add_uint_format_value(subtree
, hf_mbim_bulk_ndp_signature
, tvb
, offset
, 4,
4512 tvb_get_letohl(tvb
, offset
), "%s", signature
);
4513 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, signature
);
4514 dissector
= eth_fcs_handle
;
4516 proto_tree_add_item(subtree
, hf_mbim_bulk_ndp_signature
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4517 col_append_sep_str(pinfo
->cinfo
, COL_INFO
, NULL
, signature
);
4518 dissector
= data_handle
;
4521 length
= tvb_get_letohs(tvb
, offset
);
4522 pi
= proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_length
, tvb
, offset
, 2, length
);
4523 if (length
% (is_32bits
? 8 : 4)) {
4524 expert_add_info_format(pinfo
, pi
, &ei_mbim_alignment_error
, "Length is not a multiple of %u bytes",
4526 return tvb_length(tvb
);
4528 proto_item_set_len(ti
, length
);
4531 next_index
= tvb_get_letohs(tvb
, offset
);
4532 pi
= proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_next_ndp_index
, tvb
,
4533 offset
, 2, next_index
);
4536 proto_tree_add_item(subtree
, hf_mbim_bulk_ndp_reserved
, tvb
,
4537 offset
, 2, ENC_LITTLE_ENDIAN
);
4539 next_index
= tvb_get_letohl(tvb
, offset
);
4540 pi
= proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_next_ndp_index_32
,
4541 tvb
, offset
, 4, next_index
);
4543 proto_tree_add_item(subtree
, hf_mbim_bulk_ndp_reserved2
, tvb
,
4544 offset
, 4, ENC_LITTLE_ENDIAN
);
4547 if (next_index
% 4) {
4548 expert_add_info_format(pinfo
, pi
, &ei_mbim_alignment_error
,
4549 "NDP Index is not a multiple of 4 bytes");
4550 return tvb_length(tvb
);
4552 while ((offset
- base_offset
) < length
) {
4554 datagram_index
= tvb_get_letohs(tvb
, offset
);
4555 proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_datagram_index
,
4556 tvb
, offset
, 2, datagram_index
);
4558 datagram_length
= tvb_get_letohs(tvb
, offset
);
4559 proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_datagram_length
,
4560 tvb
, offset
, 2, datagram_length
);
4563 datagram_index
= tvb_get_letohl(tvb
, offset
);
4564 proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_datagram_index_32
,
4565 tvb
, offset
, 4, datagram_index
);
4567 datagram_length
= tvb_get_letohl(tvb
, offset
);
4568 proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_datagram_length_32
,
4569 tvb
, offset
, 3, datagram_length
);
4572 if (datagram_index
&& datagram_length
) {
4573 proto_tree_add_item(subtree
, hf_mbim_bulk_ndp_datagram
, tvb
,
4574 datagram_index
, datagram_length
, ENC_NA
);
4575 datagram_tvb
= tvb_new_subset_length(tvb
, datagram_index
, datagram_length
);
4577 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "|");
4578 col_set_fence(pinfo
->cinfo
, COL_PROTOCOL
);
4579 col_set_str(pinfo
->cinfo
, COL_INFO
, " | ");
4580 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4582 call_dissector(dissector
, datagram_tvb
, pinfo
, tree
);
4583 col_set_fence(pinfo
->cinfo
, COL_PROTOCOL
);
4584 col_set_fence(pinfo
->cinfo
, COL_INFO
);
4586 if (++total
> MBIM_MAX_ITEMS
) {
4587 expert_add_info_format(pinfo
, NULL
, &ei_mbim_too_many_items
,
4588 "More than %u datagrams, dissection seems suspicious",
4590 return tvb_length(tvb
);
4594 ti
= proto_tree_add_uint(subtree
, hf_mbim_bulk_ndp_nb_datagrams
, tvb
, 0, 0, nb
);
4595 PROTO_ITEM_SET_GENERATED(ti
);
4596 if (++ndp
> MBIM_MAX_ITEMS
) {
4597 expert_add_info_format(pinfo
, NULL
, &ei_mbim_too_many_items
,
4598 "More than %u NCM Datagram Pointers, dissection seems suspicious",
4600 return tvb_length(tvb
);
4603 ti
= proto_tree_add_uint(mbim_tree
, hf_mbim_bulk_total_nb_datagrams
, tvb
, 0, 0, total
);
4604 PROTO_ITEM_SET_GENERATED(ti
);
4606 return tvb_length(tvb
);
4610 dissect_mbim_bulk_heur(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
4612 usb_conv_info_t
*usb_conv_info
= (usb_conv_info_t
*)data
;
4614 if ((usb_conv_info
== NULL
) ||
4615 ((usb_conv_info
->interfaceClass
!= IF_CLASS_CDC_DATA
) &&
4616 (usb_conv_info
->interfaceClass
!= IF_CLASS_UNKNOWN
))) {
4620 if (dissect_mbim_bulk(tvb
, pinfo
, tree
, usb_conv_info
)) {
4627 mbim_reassembly_init(void)
4629 reassembly_table_init(&mbim_reassembly_table
,
4630 &addresses_reassembly_table_functions
);
4634 proto_register_mbim(void)
4636 module_t
*mbim_module
;
4637 expert_module_t
* expert_mbim
;
4639 static hf_register_info hf
[] = {
4641 { "Control", "mbim.control",
4642 FT_NONE
, BASE_NONE
, NULL
, 0,
4645 { &hf_mbim_header_message_type
,
4646 { "Message Type", "mbim.control.header.message_type",
4647 FT_UINT32
, BASE_HEX
, VALS(mbim_msg_type_vals
), 0,
4650 { &hf_mbim_header_message_length
,
4651 { "Message Length", "mbim.control.header.message_length",
4652 FT_UINT32
, BASE_DEC
, NULL
, 0,
4655 { &hf_mbim_header_transaction_id
,
4656 { "Transaction Id", "mbim.control.header.transaction_id",
4657 FT_UINT32
, BASE_DEC
, NULL
, 0,
4660 { &hf_mbim_fragment_total
,
4661 { "Total Fragments", "mbim.control.fragment.total",
4662 FT_UINT32
, BASE_DEC
, NULL
, 0,
4665 { &hf_mbim_fragment_current
,
4666 { "Current Fragment", "mbim.control.fragment.current",
4667 FT_UINT32
, BASE_DEC
, NULL
, 0,
4670 { &hf_mbim_max_ctrl_transfer
,
4671 { "Max Control Transfer", "mbim.control.max_control_transfer",
4672 FT_UINT32
, BASE_DEC
, NULL
, 0,
4675 { &hf_mbim_device_service_id
,
4676 { "Device Service Id", "mbim.control.device_service_id",
4677 FT_GUID
, BASE_NONE
, NULL
, 0,
4680 { &hf_mbim_uuid_basic_connect_cid
,
4681 { "CID", "mbim.control.cid",
4682 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &mbim_uuid_basic_connect_cid_vals_ext
, 0,
4685 { &hf_mbim_uuid_sms_cid
,
4686 { "CID", "mbim.control.cid",
4687 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_sms_cid_vals
), 0,
4690 { &hf_mbim_uuid_ussd_cid
,
4691 { "CID", "mbim.control.cid",
4692 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_ussd_cid_vals
), 0,
4695 { &hf_mbim_uuid_phonebook_cid
,
4696 { "CID", "mbim.control.cid",
4697 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_phonebook_cid_vals
), 0,
4700 { &hf_mbim_uuid_stk_cid
,
4701 { "CID", "mbim.control.cid",
4702 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_stk_cid_vals
), 0,
4705 { &hf_mbim_uuid_auth_cid
,
4706 { "CID", "mbim.control.cid",
4707 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_auth_cid_vals
), 0,
4710 { &hf_mbim_uuid_dss_cid
,
4711 { "CID", "mbim.control.cid",
4712 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_dss_cid_vals
), 0,
4715 { &hf_mbim_uuid_multicarrier_cid
,
4716 { "CID", "mbim.control.cid",
4717 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_multicarrier_cid_vals
), 0,
4720 { &hf_mbim_uuid_ms_hostshutdown_cid
,
4721 { "CID", "mbim.control.cid",
4722 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_ms_hostshutdown_cid_vals
), 0,
4725 { &hf_mbim_uuid_msfwid_cid
,
4726 { "CID", "mbim.control.cid",
4727 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_msfwid_cid_vals
), 0,
4731 { "CID", "mbim.control.cid",
4732 FT_UINT32
, BASE_DEC
, NULL
, 0,
4735 { &hf_mbim_command_type
,
4736 { "Command Type", "mbim.control.command_type",
4737 FT_UINT32
, BASE_DEC
, VALS(mbim_command_type_vals
), 0,
4740 { &hf_mbim_info_buffer_len
,
4741 { "Information Buffer Length", "mbim.control.info_buffer_len",
4742 FT_UINT32
, BASE_DEC
, NULL
, 0,
4745 { &hf_mbim_info_buffer
,
4746 { "Information Buffer", "mbim.control.info_buffer",
4747 FT_BYTES
, BASE_NONE
, NULL
, 0,
4750 { &hf_mbim_error_status_code
,
4751 { "Error Status Code", "mbim.control.error_status_code",
4752 FT_UINT32
, BASE_DEC
, VALS(mbim_error_status_code_vals
), 0,
4756 { "Status", "mbim.control.status",
4757 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &mbim_status_code_vals_ext
, 0,
4760 { &hf_mbim_device_caps_info_device_type
,
4761 { "Device Type", "mbim.control.device_caps_info.device_type",
4762 FT_UINT32
, BASE_DEC
, VALS(mbim_device_caps_info_device_type_vals
), 0,
4765 { &hf_mbim_device_caps_info_cellular_class
,
4766 { "Cellular Class", "mbim.control.device_caps_info.cellular_class",
4767 FT_UINT32
, BASE_DEC
, VALS(mbim_cellular_class_vals
), 0,
4770 { &hf_mbim_device_caps_info_voice_class
,
4771 { "Voice Class", "mbim.control.device_caps_info.voice_class",
4772 FT_UINT32
, BASE_DEC
, VALS(mbim_device_caps_info_voice_class_vals
), 0,
4775 { &hf_mbim_device_caps_info_sim_class
,
4776 { "SIM Class", "mbim.control.device_caps_info.sim_class",
4777 FT_UINT32
, BASE_HEX
, NULL
, 0,
4780 { &hf_mbim_device_caps_info_sim_class_logical
,
4781 { "Logical", "mbim.control.device_caps_info.sim_class.logical",
4782 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000001,
4785 { &hf_mbim_device_caps_info_sim_class_removable
,
4786 { "Removable", "mbim.control.device_caps_info.sim_class.removable",
4787 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000002,
4790 { &hf_mbim_device_caps_info_data_class
,
4791 { "Data Class", "mbim.control.device_caps_info.data_class",
4792 FT_UINT32
, BASE_HEX
, NULL
, 0,
4795 { &hf_mbim_data_class_gprs
,
4796 { "GPRS", "mbim.control.data_class.gprs",
4797 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000001,
4800 { &hf_mbim_data_class_edge
,
4801 { "EDGE", "mbim.control.data_class.edge",
4802 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000002,
4805 { &hf_mbim_data_class_umts
,
4806 { "EDGE", "mbim.control.data_class.umts",
4807 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000004,
4810 { &hf_mbim_data_class_hsdpa
,
4811 { "HSDPA", "mbim.control.data_class.hsdpa",
4812 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000008,
4815 { &hf_mbim_data_class_hsupa
,
4816 { "HSUPA", "mbim.control.data_class.hsupa",
4817 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000010,
4820 { &hf_mbim_data_class_lte
,
4821 { "LTE", "mbim.control.data_class.lte",
4822 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000020,
4825 { &hf_mbim_data_class_reserved_gsm
,
4826 { "Reserved for future GSM classes", "mbim.control.data_class.reserved_gsm",
4827 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x0000ffc0,
4830 { &hf_mbim_data_class_1xrtt
,
4831 { "1xRTT", "mbim.control.data_class.1xrtt",
4832 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00010000,
4835 { &hf_mbim_data_class_1xevdo
,
4836 { "1xEV-DO", "mbim.control.data_class.1xevdo",
4837 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00020000,
4840 { &hf_mbim_data_class_1xevdoreva
,
4841 { "1xEV-DO RevA", "mbim.control.data_class.1xevdoreva",
4842 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00040000,
4845 { &hf_mbim_data_class_1xevdv
,
4846 { "1xEVDV", "mbim.control.data_class.1xevdv",
4847 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00080000,
4850 { &hf_mbim_data_class_3xrtt
,
4851 { "3xRTT", "mbim.control.data_class.3xrtt",
4852 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00100000,
4855 { &hf_mbim_data_class_1xevdorevb
,
4856 { "1xEV-DO RevB", "mbim.control.data_class.1xevdorevb",
4857 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00200000,
4860 { &hf_mbim_data_class_umb
,
4861 { "UMB", "mbim.control.data_class.umb",
4862 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00400000,
4865 { &hf_mbim_data_class_reserved_cdma
,
4866 { "Reserved for future CDMA classes", "mbim.control.data_class.reserved_cdma",
4867 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x7f800000,
4870 { &hf_mbim_data_class_custom
,
4871 { "Custom", "mbim.control.data_class.custom",
4872 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x80000000,
4875 { &hf_mbim_device_caps_info_sms_caps
,
4876 { "SMS Caps", "mbim.control.device_caps_info.sms_caps",
4877 FT_UINT32
, BASE_HEX
, NULL
, 0,
4880 { &hf_mbim_device_caps_info_sms_caps_pdu_receive
,
4881 { "PDU Receive", "mbim.control.device_caps_info.sms_caps.pdu_receive",
4882 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000001,
4885 { &hf_mbim_device_caps_info_sms_caps_pdu_send
,
4886 { "PDU Send", "mbim.control.device_caps_info.sms_caps.pdu_send",
4887 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000002,
4890 { &hf_mbim_device_caps_info_sms_caps_text_receive
,
4891 { "Text Receive", "mbim.control.device_caps_info.sms_caps.text_receive",
4892 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000004,
4895 { &hf_mbim_device_caps_info_sms_caps_text_send
,
4896 { "Text Send", "mbim.control.device_caps_info.sms_caps.text_send",
4897 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000008,
4900 { &hf_mbim_device_caps_info_control_caps
,
4901 { "Control Caps", "mbim.control.device_caps_info.control_caps",
4902 FT_UINT32
, BASE_HEX
, NULL
, 0,
4905 { &hf_mbim_device_caps_info_control_caps_reg_manual
,
4906 { "Reg Manual", "mbim.control.device_caps_info.control_caps.reg_manual",
4907 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000001,
4910 { &hf_mbim_device_caps_info_control_caps_hw_radio_switch
,
4911 { "HW Radio Switch", "mbim.control.device_caps_info.control_caps.hw_radio_switch",
4912 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000002,
4915 { &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip
,
4916 { "CDMA Mobile IP", "mbim.control.device_caps_info.control_caps.cdma_mobile_ip",
4917 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000004,
4920 { &hf_mbim_device_caps_info_control_caps_cdma_simple_ip
,
4921 { "CDMA Simple IP", "mbim.control.device_caps_info.control_caps.cdma_simple_ip",
4922 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000008,
4925 { &hf_mbim_device_caps_info_control_caps_multi_carrier
,
4926 { "Multi Carrier", "mbim.control.device_caps_info.control_caps.multi_carrier",
4927 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000010,
4930 { &hf_mbim_device_caps_info_max_sessions
,
4931 { "Max Sessions", "mbim.control.device_caps_info.max_sessions",
4932 FT_UINT32
, BASE_DEC
, NULL
, 0,
4935 { &hf_mbim_device_caps_info_custom_data_class_offset
,
4936 { "Custom Data Class Offset", "mbim.control.device_caps_info.custom_data_class.offset",
4937 FT_UINT32
, BASE_DEC
, NULL
, 0,
4940 { &hf_mbim_device_caps_info_custom_data_class_size
,
4941 { "Custom Data Class Size", "mbim.control.device_caps_info.custom_data_class.size",
4942 FT_UINT32
, BASE_DEC
, NULL
, 0,
4945 { &hf_mbim_device_caps_info_device_id_offset
,
4946 { "Device Id Offset", "mbim.control.device_caps_info.device_id.offset",
4947 FT_UINT32
, BASE_DEC
, NULL
, 0,
4950 { &hf_mbim_device_caps_info_device_id_size
,
4951 { "Device Id Size", "mbim.control.device_caps_info.device_id.size",
4952 FT_UINT32
, BASE_DEC
, NULL
, 0,
4955 { &hf_mbim_device_caps_info_fw_info_offset
,
4956 { "FW Info Offset", "mbim.control.device_caps_info.fw_info.offset",
4957 FT_UINT32
, BASE_DEC
, NULL
, 0,
4960 { &hf_mbim_device_caps_info_fw_info_size
,
4961 { "FW Info Size", "mbim.control.device_caps_info.fw_info.size",
4962 FT_UINT32
, BASE_DEC
, NULL
, 0,
4965 { &hf_mbim_device_caps_info_hw_info_offset
,
4966 { "HW Info Offset", "mbim.control.device_caps_info.hw_info.offset",
4967 FT_UINT32
, BASE_DEC
, NULL
, 0,
4970 { &hf_mbim_device_caps_info_hw_info_size
,
4971 { "HW Info Size", "mbim.control.device_caps_info.hw_info.size",
4972 FT_UINT32
, BASE_DEC
, NULL
, 0,
4975 { &hf_mbim_device_caps_info_custom_data_class
,
4976 { "Custom Data Class", "mbim.control.device_caps_info.custom_data_class",
4977 FT_STRING
, BASE_NONE
, NULL
, 0,
4980 { &hf_mbim_device_caps_info_device_id
,
4981 { "Device Id", "mbim.control.device_caps_info.device_id",
4982 FT_STRING
, BASE_NONE
, NULL
, 0,
4985 { &hf_mbim_device_caps_info_fw_info
,
4986 { "FW Info", "mbim.control.device_caps_info.fw_info",
4987 FT_STRING
, BASE_NONE
, NULL
, 0,
4990 { &hf_mbim_device_caps_info_hw_info
,
4991 { "HW Info", "mbim.control.device_caps_info.hw_info",
4992 FT_STRING
, BASE_NONE
, NULL
, 0,
4995 { &hf_mbim_subscr_ready_status_ready_state
,
4996 { "Ready State", "mbim.control.subscriber_ready_status.ready_state",
4997 FT_UINT32
, BASE_DEC
, VALS(mbim_subscr_ready_status_ready_state_vals
), 0,
5000 { &hf_mbim_subscr_ready_status_susbcr_id_offset
,
5001 { "Subscriber Id Offset", "mbim.control.subscriber_ready_status.susbcriber_id.offset",
5002 FT_UINT32
, BASE_DEC
, NULL
, 0,
5005 { &hf_mbim_subscr_ready_status_susbcr_id_size
,
5006 { "Subscriber Id Size", "mbim.control.subscriber_ready_status.susbcriber_id.size",
5007 FT_UINT32
, BASE_DEC
, NULL
, 0,
5010 { &hf_mbim_subscr_ready_status_sim_icc_id_offset
,
5011 { "SIM ICC Id Offset", "mbim.control.subscriber_ready_status.sim_icc_id.offset",
5012 FT_UINT32
, BASE_DEC
, NULL
, 0,
5015 { &hf_mbim_subscr_ready_status_sim_icc_id_size
,
5016 { "SIM ICC Id Size", "mbim.control.subscriber_ready_status.sim_icc_id.size",
5017 FT_UINT32
, BASE_DEC
, NULL
, 0,
5020 { &hf_mbim_subscr_ready_status_ready_info
,
5021 { "Ready Info", "mbim.control.subscriber_ready_status.ready_info",
5022 FT_UINT32
, BASE_DEC
, VALS(mbim_subscr_ready_status_ready_info_vals
), 0,
5025 { &hf_mbim_subscr_ready_status_elem_count
,
5026 { "Element Count", "mbim.control.subscriber_ready_status.element_count",
5027 FT_UINT32
, BASE_DEC
, NULL
, 0,
5030 { &hf_mbim_subscr_ready_status_tel_nb_offset
,
5031 { "Telephone Number Offset", "mbim.control.subscriber_ready_status.tel_nb.offset",
5032 FT_UINT32
, BASE_DEC
, NULL
, 0,
5035 { &hf_mbim_subscr_ready_status_tel_nb_size
,
5036 { "Telephone Number Size", "mbim.control.subscriber_ready_status.tel_nb.size",
5037 FT_UINT32
, BASE_DEC
, NULL
, 0,
5040 { &hf_mbim_subscr_ready_status_susbcr_id
,
5041 { "Subscriber Id", "mbim.control.device_caps_info.subscriber_ready_status.susbcriber_id",
5042 FT_STRING
, BASE_NONE
, NULL
, 0,
5045 { &hf_mbim_subscr_ready_status_sim_icc_id
,
5046 { "SIM ICC Id", "mbim.control.device_caps_info.subscriber_ready_status.sim_icc_id",
5047 FT_STRING
, BASE_NONE
, NULL
, 0,
5050 { &hf_mbim_subscr_ready_status_tel_nb
,
5051 { "Telephone Number", "mbim.control.device_caps_info.subscriber_ready_status.tel_nb",
5052 FT_STRING
, BASE_NONE
, NULL
, 0,
5055 { &hf_mbim_radio_state_set
,
5056 { "Radio Set", "mbim.control.radio_state.set",
5057 FT_UINT32
, BASE_DEC
, VALS(mbim_radio_state_vals
), 0,
5060 { &hf_mbim_radio_state_hw_radio_state
,
5061 { "HW Radio State", "mbim.control.radio_state.hw_radio_state",
5062 FT_UINT32
, BASE_DEC
, VALS(mbim_radio_state_vals
), 0,
5065 { &hf_mbim_radio_state_sw_radio_state
,
5066 { "SW Radio State", "mbim.control.radio_state.sw_radio_stat",
5067 FT_UINT32
, BASE_DEC
, VALS(mbim_radio_state_vals
), 0,
5070 { &hf_mbim_set_pin_pin_type
,
5071 { "PIN Type", "mbim.control.set_pin.pin_type",
5072 FT_UINT32
, BASE_DEC
, VALS(mbim_pin_type_vals
), 0,
5075 { &hf_mbim_set_pin_pin_pin_operation
,
5076 { "PIN Operation", "mbim.control.set_pin.pin_operation",
5077 FT_UINT32
, BASE_DEC
, VALS(mbim_pin_operation_vals
), 0,
5080 { &hf_mbim_set_pin_pin_pin_offset
,
5081 { "PIN Offset", "mbim.control.set_pin.pin.offset",
5082 FT_UINT32
, BASE_DEC
, NULL
, 0,
5085 { &hf_mbim_set_pin_pin_pin_size
,
5086 { "PIN Size", "mbim.control.set_pin.pin.size",
5087 FT_UINT32
, BASE_DEC
, NULL
, 0,
5090 { &hf_mbim_set_pin_new_pin_offset
,
5091 { "New PIN Offset", "mbim.control.set_pin.new_pin.offset",
5092 FT_UINT32
, BASE_DEC
, NULL
, 0,
5095 { &hf_mbim_set_pin_new_pin_size
,
5096 { "New PIN Size", "mbim.control.set_pin.new_pin.size",
5097 FT_UINT32
, BASE_DEC
, NULL
, 0,
5100 { &hf_mbim_set_pin_pin
,
5101 { "PIN", "mbim.control.set_pin.pin",
5102 FT_STRING
, BASE_NONE
, NULL
, 0,
5105 { &hf_mbim_set_pin_new_pin
,
5106 { "New PIN", "mbim.control.set_pin.new_pin",
5107 FT_STRING
, BASE_NONE
, NULL
, 0,
5110 { &hf_mbim_pin_info_pin_type
,
5111 { "PIN Type", "mbim.control.pin_info.pin_type",
5112 FT_UINT32
, BASE_DEC
, VALS(mbim_pin_type_vals
), 0,
5115 { &hf_mbim_pin_info_pin_state
,
5116 { "PIN State", "mbim.control.pin_info.pin_state",
5117 FT_UINT32
, BASE_DEC
, VALS(mbim_pin_state_vals
), 0,
5120 { &hf_mbim_pin_info_remaining_attempts
,
5121 { "Remaining Attempts", "mbim.control.pin_info.remaining_attempts",
5122 FT_UINT32
, BASE_DEC
, NULL
, 0,
5125 { &hf_mbim_pin_list_pin_mode
,
5126 { "PIN Mode", "mbim.control.pin_list.pin_mode",
5127 FT_UINT32
, BASE_DEC
, VALS(mbim_pin_mode_vals
), 0,
5130 { &hf_mbim_pin_list_pin_format
,
5131 { "PIN Format", "mbim.control.pin_list.pin_format",
5132 FT_UINT32
, BASE_DEC
, VALS(mbim_pin_format_vals
), 0,
5135 { &hf_mbim_pin_list_pin_length_min
,
5136 { "PIN Length Min", "mbim.control.pin_list.pin_length_min",
5137 FT_UINT32
, BASE_DEC
, NULL
, 0,
5140 { &hf_mbim_pin_list_pin_length_max
,
5141 { "PIN Length Max", "mbim.control.pin_list.pin_length_max",
5142 FT_UINT32
, BASE_DEC
, NULL
, 0,
5145 { &hf_mbim_provider_state
,
5146 { "Provider State", "mbim.control.provider_state",
5147 FT_UINT32
, BASE_HEX
, NULL
, 0,
5150 { &hf_mbim_provider_state_home
,
5151 { "Home", "mbim.control.provider_state.home",
5152 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000001,
5155 { &hf_mbim_provider_state_forbidden
,
5156 { "Forbidden", "mbim.control.provider_state.forbidden",
5157 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000002,
5160 { &hf_mbim_provider_state_preferred
,
5161 { "Preferred", "mbim.control.provider_state.preferred",
5162 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000004,
5165 { &hf_mbim_provider_state_visible
,
5166 { "Visible", "mbim.control.provider_state.visible",
5167 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000008,
5170 { &hf_mbim_provider_state_registered
,
5171 { "Registered", "mbim.control.provider_state.registered",
5172 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000010,
5175 { &hf_mbim_provider_state_preferred_multicarrier
,
5176 { "Preferred Multicarrier", "mbim.control.provider_state.preferred_multicarrier",
5177 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000020,
5180 { &hf_mbim_provider_provider_id_offset
,
5181 { "Provider Id Offset", "mbim.control.provider.provider_id_offset",
5182 FT_UINT32
, BASE_DEC
, NULL
, 0,
5185 { &hf_mbim_provider_provider_id_size
,
5186 { "Provider Id Size", "mbim.control.provider.provider_id_size",
5187 FT_UINT32
, BASE_DEC
, NULL
, 0,
5190 { &hf_mbim_provider_provider_name_offset
,
5191 { "Provider Name Offset", "mbim.control.provider.provider_name_offset",
5192 FT_UINT32
, BASE_DEC
, NULL
, 0,
5195 { &hf_mbim_provider_provider_name_size
,
5196 { "Provider Name Size", "mbim.control.provider.provider_name_size",
5197 FT_UINT32
, BASE_DEC
, NULL
, 0,
5200 { &hf_mbim_provider_cellular_class
,
5201 { "Cellular Class", "mbim.control.provider.cellular_class",
5202 FT_UINT32
, BASE_DEC
, VALS(mbim_cellular_class_vals
), 0,
5205 { &hf_mbim_provider_rssi
,
5206 { "RSSI", "mbim.control.provider.rssi",
5207 FT_UINT32
, BASE_CUSTOM
, mbim_rssi_fmt
, 0,
5210 { &hf_mbim_provider_error_rate
,
5211 { "Error Rate", "mbim.control.provider.error_rate",
5212 FT_UINT32
, BASE_DEC
, VALS(mbim_error_rate_vals
), 0,
5215 { &hf_mbim_provider_provider_id
,
5216 { "Provider Id", "mbim.control.provider.provider_id",
5217 FT_STRING
, BASE_NONE
, NULL
, 0,
5220 { &hf_mbim_provider_provider_name
,
5221 { "Provider Name", "mbim.control.provider.provider_name",
5222 FT_STRING
, BASE_NONE
, NULL
, 0,
5225 { &hf_mbim_providers_elem_count
,
5226 { "Element Count", "mbim.control.providers.elem_count",
5227 FT_UINT32
, BASE_DEC
, NULL
, 0,
5230 { &hf_mbim_providers_provider_offset
,
5231 { "Provider Offset", "mbim.control.providers.provider_offset",
5232 FT_UINT32
, BASE_DEC
, NULL
, 0,
5235 { &hf_mbim_providers_provider_size
,
5236 { "Provider Size", "mbim.control.providers.provider_size",
5237 FT_UINT32
, BASE_DEC
, NULL
, 0,
5240 { &hf_mbim_visible_providers_req_action
,
5241 { "Action", "mbim.control.visible_providers_req.action",
5242 FT_UINT32
, BASE_DEC
, VALS(mbim_visible_providers_action_vals
), 0,
5245 { &hf_mbim_set_register_state_provider_id_offset
,
5246 { "Provider Id Offset", "mbim.control.set_register_state.provider_id.offset",
5247 FT_UINT32
, BASE_DEC
, NULL
, 0,
5250 { &hf_mbim_set_register_state_provider_id_size
,
5251 { "Provider Id Size", "mbim.control.set_register_state.provider_id.size",
5252 FT_UINT32
, BASE_DEC
, NULL
, 0,
5255 { &hf_mbim_set_register_state_register_action
,
5256 { "Register Action", "mbim.control.set_register_state.register_action",
5257 FT_UINT32
, BASE_DEC
, VALS(mbim_register_action_vals
), 0,
5260 { &hf_mbim_register_state_data_class
,
5261 { "Data Class", "mbim.control.set_register_state.data_class",
5262 FT_UINT32
, BASE_HEX
, NULL
, 0,
5265 { &hf_mbim_set_register_state_provider_id
,
5266 { "Provider Id", "mbim.control.set_register_state.provider_id",
5267 FT_STRING
, BASE_NONE
, NULL
, 0,
5270 { &hf_mbim_registration_state_info_nw_error
,
5271 { "Network Error", "mbim.control.registration_state_info.nw_error",
5272 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &nas_eps_emm_cause_values_ext
, 0,
5275 { &hf_mbim_registration_state_info_register_state
,
5276 { "Register State", "mbim.control.registration_state_info.register_state",
5277 FT_UINT32
, BASE_DEC
, VALS(mbim_register_state_vals
), 0,
5280 { &hf_mbim_registration_state_info_register_mode
,
5281 { "Register Mode", "mbim.control.registration_state_info.register_mode",
5282 FT_UINT32
, BASE_DEC
, VALS(mbim_register_mode_vals
), 0,
5285 { &hf_mbim_registration_state_info_available_data_classes
,
5286 { "Available Data Classes", "mbim.control.registration_state_info.available_data_classes",
5287 FT_UINT32
, BASE_HEX
, NULL
, 0,
5290 { &hf_mbim_registration_state_info_current_cellular_class
,
5291 { "Current Cellular Class", "mbim.control.registration_state_info.current_cellular_class",
5292 FT_UINT32
, BASE_DEC
, VALS(mbim_cellular_class_vals
), 0,
5295 { &hf_mbim_registration_state_info_provider_id_offset
,
5296 { "Provider Id Offset", "mbim.control.registration_state_info.provider_id.offset",
5297 FT_UINT32
, BASE_DEC
, NULL
, 0,
5300 { &hf_mbim_registration_state_info_provider_id_size
,
5301 { "Provider Id Size", "mbim.control.registration_state_info.provider_id.size",
5302 FT_UINT32
, BASE_DEC
, NULL
, 0,
5305 { &hf_mbim_registration_state_info_provider_name_offset
,
5306 { "Provider Name Offset", "mbim.control.registration_state_info.provider_name.offset",
5307 FT_UINT32
, BASE_DEC
, NULL
, 0,
5310 { &hf_mbim_registration_state_info_provider_name_size
,
5311 { "Provider Name Size", "mbim.control.registration_state_info.provider_name.size",
5312 FT_UINT32
, BASE_DEC
, NULL
, 0,
5315 { &hf_mbim_registration_state_info_roaming_text_offset
,
5316 { "Roaming Text Offset", "mbim.control.registration_state_info.roaming_text.offset",
5317 FT_UINT32
, BASE_DEC
, NULL
, 0,
5320 { &hf_mbim_registration_state_info_roaming_text_size
,
5321 { "Roaming Text Size", "mbim.control.registration_state_info.roaming_text.size",
5322 FT_UINT32
, BASE_DEC
, NULL
, 0,
5325 { &hf_mbim_registration_state_info_registration_flags
,
5326 { "Registration Flags", "mbim.control.registration_state_info.registration_flags",
5327 FT_UINT32
, BASE_HEX
, NULL
, 0,
5330 { &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available
,
5331 { "Manual Selection Not Available", "mbim.control.registration_state_info.registration_flags.manual_selection_not_available",
5332 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000001,
5335 { &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach
,
5336 { "Packet Service Auto Attach", "mbim.control.registration_state_info.registration_flags.packet_service_auto_attach",
5337 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000002,
5340 { &hf_mbim_registration_state_info_provider_id
,
5341 { "Provider Id", "mbim.control.registration_state_info.provider_id",
5342 FT_STRING
, BASE_NONE
, NULL
, 0,
5345 { &hf_mbim_registration_state_info_provider_name
,
5346 { "Provider Name", "mbim.control.registration_state_info.provider_name",
5347 FT_STRING
, BASE_NONE
, NULL
, 0,
5350 { &hf_mbim_registration_state_info_roaming_text
,
5351 { "Roaming Text", "mbim.control.registration_state_info.roaming_text",
5352 FT_STRING
, BASE_NONE
, NULL
, 0,
5355 { &hf_mbim_set_packet_service_action
,
5356 { "Action", "mbim.control.set_packet_service.action",
5357 FT_UINT32
, BASE_DEC
, VALS(mbim_packet_service_action_vals
), 0,
5360 { &hf_mbim_packet_service_info_nw_error
,
5361 { "Network Error", "mbim.control.packet_service_info.nw_error",
5362 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &nas_eps_emm_cause_values_ext
, 0,
5365 { &hf_mbim_packet_service_info_packet_service_state
,
5366 { "Packet Service State", "mbim.control.packet_service_info.packet_service_state",
5367 FT_UINT32
, BASE_DEC
, VALS(mbim_packet_service_state_vals
), 0,
5370 { &hf_mbim_packet_service_info_highest_available_data_class
,
5371 { "Highest Available Data Class", "mbim.control.packet_service_info.highest_available_data_class",
5372 FT_UINT32
, BASE_HEX
, NULL
, 0,
5375 { &hf_mbim_packet_service_info_uplink_speed
,
5376 { "Uplink Speed", "mbim.control.packet_service_info.uplink_speed",
5377 FT_UINT64
, BASE_DEC
, NULL
, 0,
5380 { &hf_mbim_packet_service_info_downlink_speed
,
5381 { "Downlink Speed", "mbim.control.packet_service_info.downlink_speed",
5382 FT_UINT64
, BASE_DEC
, NULL
, 0,
5385 { &hf_mbim_set_signal_state_signal_strength_interval
,
5386 { "Signal Strength Interval", "mbim.control.set_signal_state.signal_strength_interval",
5387 FT_UINT32
, BASE_DEC
, NULL
, 0,
5390 { &hf_mbim_set_signal_state_rssi_threshold
,
5391 { "RSSI Threshold", "mbim.control.set_signal_state.rssi_threshold",
5392 FT_UINT32
, BASE_DEC
, NULL
, 0,
5395 { &hf_mbim_set_signal_state_error_rate_threshold
,
5396 { "Error Rate Threshold", "mbim.control.set_signal_state.error_rate_threshold",
5397 FT_UINT32
, BASE_DEC
, NULL
, 0,
5400 { &hf_mbim_signal_state_info_rssi
,
5401 { "RSSI", "mbim.control.signal_state_info.rssi",
5402 FT_UINT32
, BASE_CUSTOM
, mbim_rssi_fmt
, 0,
5405 { &hf_mbim_signal_state_info_error_rate
,
5406 { "Error Rate", "mbim.control.signal_state_info.error_rate",
5407 FT_UINT32
, BASE_DEC
, VALS(mbim_error_rate_vals
), 0,
5410 { &hf_mbim_signal_state_info_signal_strength_interval
,
5411 { "Signal Strength Interval", "mbim.control.signal_state_info.signal_strength_interval",
5412 FT_UINT32
, BASE_DEC
, NULL
, 0,
5415 { &hf_mbim_signal_state_info_rssi_threshold
,
5416 { "RSSI Threshold", "mbim.control.signal_state_info.rssi_threshold",
5417 FT_UINT32
, BASE_DEC
, NULL
, 0,
5420 { &hf_mbim_signal_state_info_error_rate_threshold
,
5421 { "Error Rate Threshold", "mbim.control.signal_state_info.error_rate_threshold",
5422 FT_UINT32
, BASE_DEC
, NULL
, 0,
5425 { &hf_mbim_context_type
,
5426 { "Context Type", "mbim.control.context_type",
5427 FT_GUID
, BASE_NONE
, NULL
, 0,
5430 { &hf_mbim_set_connect_session_id
,
5431 { "Session Id", "mbim.control.set_connect.session_id",
5432 FT_UINT32
, BASE_DEC
, NULL
, 0,
5435 { &hf_mbim_set_connect_activation_command
,
5436 { "Activation Command", "mbim.control.set_connect.activation_command",
5437 FT_UINT32
, BASE_DEC
, VALS(mbim_activation_command_vals
), 0,
5440 { &hf_mbim_set_connect_access_string_offset
,
5441 { "Access String Offset", "mbim.control.set_connect.access_string_offset",
5442 FT_UINT32
, BASE_DEC
, NULL
, 0,
5445 { &hf_mbim_set_connect_access_string_size
,
5446 { "Access String Size", "mbim.control.set_connect.access_string_size",
5447 FT_UINT32
, BASE_DEC
, NULL
, 0,
5450 { &hf_mbim_set_connect_user_name_offset
,
5451 { "User Name Offset", "mbim.control.set_connect.user_name_offset",
5452 FT_UINT32
, BASE_DEC
, NULL
, 0,
5455 { &hf_mbim_set_connect_user_name_size
,
5456 { "User Name Size", "mbim.control.set_connect.user_name_size",
5457 FT_UINT32
, BASE_DEC
, NULL
, 0,
5460 { &hf_mbim_set_connect_password_offset
,
5461 { "Password Offset", "mbim.control.set_connect.password_offset",
5462 FT_UINT32
, BASE_DEC
, NULL
, 0,
5465 { &hf_mbim_set_connect_password_size
,
5466 { "Password Size", "mbim.control.set_connect.password_size",
5467 FT_UINT32
, BASE_DEC
, NULL
, 0,
5470 { &hf_mbim_set_connect_compression
,
5471 { "Compression", "mbim.control.set_connect.compression",
5472 FT_UINT32
, BASE_DEC
, VALS(mbim_compression_vals
), 0,
5475 { &hf_mbim_set_connect_auth_protocol
,
5476 { "Authentication Protocol", "mbim.control.set_connect.auth_protocol",
5477 FT_UINT32
, BASE_DEC
, VALS(mbim_auth_protocol_vals
), 0,
5480 { &hf_mbim_set_connect_ip_type
,
5481 { "IP Type", "mbim.control.set_connect.ip_type",
5482 FT_UINT32
, BASE_DEC
, VALS(mbim_context_ip_type_vals
), 0,
5485 { &hf_mbim_set_connect_access_string
,
5486 { "Access String", "mbim.control.set_connect.access_string",
5487 FT_STRING
, BASE_NONE
, NULL
, 0,
5490 { &hf_mbim_set_connect_user_name
,
5491 { "User Name", "mbim.control.set_connect.user_name",
5492 FT_STRING
, BASE_NONE
, NULL
, 0,
5495 { &hf_mbim_set_connect_password
,
5496 { "Password", "mbim.control.set_connect.password",
5497 FT_STRING
, BASE_NONE
, NULL
, 0,
5500 { &hf_mbim_connect_info_session_id
,
5501 { "Session Id", "mbim.control.connect_info.session_id",
5502 FT_UINT32
, BASE_DEC
, NULL
, 0,
5505 { &hf_mbim_connect_info_activation_state
,
5506 { "Activation State", "mbim.control.connect_info.activation_state",
5507 FT_UINT32
, BASE_DEC
, VALS(mbim_activation_state_vals
), 0,
5510 { &hf_mbim_connect_info_voice_call_state
,
5511 { "Voice Call State", "mbim.control.connect_info.voice_call_state",
5512 FT_UINT32
, BASE_DEC
, VALS(mbim_voice_call_state_vals
), 0,
5515 { &hf_mbim_connect_info_ip_type
,
5516 { "IP Type", "mbim.control.connect_info.ip_type",
5517 FT_UINT32
, BASE_DEC
, VALS(mbim_context_ip_type_vals
), 0,
5520 { &hf_mbim_connect_info_nw_error
,
5521 { "Network Error", "mbim.control.connect_info.nw_error",
5522 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &nas_eps_emm_cause_values_ext
, 0,
5525 { &hf_mbim_context_context_id
,
5526 { "Context Id", "mbim.control.context.context_id",
5527 FT_UINT32
, BASE_DEC
, NULL
, 0,
5530 { &hf_mbim_context_access_string_offset
,
5531 { "Access String Offset", "mbim.control.context.access_string_offset",
5532 FT_UINT32
, BASE_DEC
, NULL
, 0,
5535 { &hf_mbim_context_access_string_size
,
5536 { "Access String Size", "mbim.control.context.access_string_size",
5537 FT_UINT32
, BASE_DEC
, NULL
, 0,
5540 { &hf_mbim_context_user_name_offset
,
5541 { "User Name Offset", "mbim.control.context.user_name_offset",
5542 FT_UINT32
, BASE_DEC
, NULL
, 0,
5545 { &hf_mbim_context_user_name_size
,
5546 { "User Name Size", "mbim.control.context.user_name_size",
5547 FT_UINT32
, BASE_DEC
, NULL
, 0,
5550 { &hf_mbim_context_password_offset
,
5551 { "Password Offset", "mbim.control.context.password_offset",
5552 FT_UINT32
, BASE_DEC
, NULL
, 0,
5555 { &hf_mbim_context_password_size
,
5556 { "Password Size", "mbim.control.context.password_size",
5557 FT_UINT32
, BASE_DEC
, NULL
, 0,
5560 { &hf_mbim_context_compression
,
5561 { "Compression", "mbim.control.context.compression",
5562 FT_UINT32
, BASE_DEC
, VALS(mbim_compression_vals
), 0,
5565 { &hf_mbim_context_auth_protocol
,
5566 { "Authentication Protocol", "mbim.control.context.auth_protocol",
5567 FT_UINT32
, BASE_DEC
, VALS(mbim_auth_protocol_vals
), 0,
5570 { &hf_mbim_context_provider_id_offset
,
5571 { "Provider Id Offset", "mbim.control.context.provider_id_offset",
5572 FT_UINT32
, BASE_DEC
, NULL
, 0,
5575 { &hf_mbim_context_provider_id_size
,
5576 { "Provider Id Size", "mbim.control.context.provider_id_size",
5577 FT_UINT32
, BASE_DEC
, NULL
, 0,
5580 { &hf_mbim_context_access_string
,
5581 { "Access String", "mbim.control.context.access_string",
5582 FT_STRING
, BASE_NONE
, NULL
, 0,
5585 { &hf_mbim_context_user_name
,
5586 { "User Name", "mbim.control.context.user_name",
5587 FT_STRING
, BASE_NONE
, NULL
, 0,
5590 { &hf_mbim_context_password
,
5591 { "Password", "mbim.control.context.password",
5592 FT_STRING
, BASE_NONE
, NULL
, 0,
5595 { &hf_mbim_context_provider_id
,
5596 { "Provider Id", "mbim.control.context.provider_id",
5597 FT_STRING
, BASE_NONE
, NULL
, 0,
5600 { &hf_mbim_provisioned_contexts_info_elem_count
,
5601 { "UElement Count", "mbim.control.context.provisioned_contexts_info.elem_count",
5602 FT_UINT32
, BASE_DEC
, NULL
, 0,
5605 { &hf_mbim_provisioned_contexts_info_provisioned_context_offset
,
5606 { "Provisioned Context Offset", "mbim.control.context.provisioned_contexts_info.provisioned_context_offset",
5607 FT_UINT32
, BASE_DEC
, NULL
, 0,
5610 { &hf_mbim_provisioned_contexts_info_provisioned_context_size
,
5611 { "Provisioned Context Size", "mbim.control.context.provisioned_contexts_info.provisioned_context_size",
5612 FT_UINT32
, BASE_DEC
, NULL
, 0,
5615 { &hf_mbim_set_service_activation_data_buffer
,
5616 { "Data Buffer", "mbim.control.set_service_activation.data_buffer",
5617 FT_BYTES
, BASE_NONE
, NULL
, 0,
5620 { &hf_mbim_service_activation_info_nw_error
,
5621 { "Network Error", "mbim.control.service_activation_info.nw_error",
5622 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &nas_eps_emm_cause_values_ext
, 0,
5625 { &hf_mbim_service_activation_info_data_buffer
,
5626 { "Data Buffer", "mbim.control.service_activation_info.data_buffer",
5627 FT_BYTES
, BASE_NONE
, NULL
, 0,
5630 { &hf_mbim_ipv4_element_on_link_prefix_length
,
5631 { "On Link Prefix Length", "mbim.control.ipv4_element.on_link_prefix_length",
5632 FT_UINT32
, BASE_DEC
, NULL
, 0,
5635 { &hf_mbim_ipv4_element_ipv4_address
,
5636 { "IPv4 Address", "mbim.control.ipv4_element.ipv4_address",
5637 FT_IPv4
, BASE_NONE
, NULL
, 0,
5640 { &hf_mbim_ipv6_element_on_link_prefix_length
,
5641 { "On Link Prefix Length", "mbim.control.ipv6_element.on_link_prefix_length",
5642 FT_UINT32
, BASE_DEC
, NULL
, 0,
5645 { &hf_mbim_ipv6_element_ipv6_address
,
5646 { "IPv6 Address", "mbim.control.ipv6_element.ipv6_address",
5647 FT_IPv6
, BASE_NONE
, NULL
, 0,
5650 { &hf_mbim_ip_configuration_info_session_id
,
5651 { "Session Id", "mbim.control.ip_configuration_info.session_id",
5652 FT_UINT32
, BASE_DEC
, NULL
, 0,
5655 { &hf_mbim_ip_configuration_info_ipv4_configuration_available
,
5656 { "IPv4 Configuration Available", "mbim.control.ip_configuration_info.ipv4_configuration_available",
5657 FT_UINT32
, BASE_HEX
, NULL
, 0,
5660 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_address
,
5661 { "Address", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.address",
5662 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000001,
5665 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway
,
5666 { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.gateway",
5667 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000002,
5670 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns
,
5671 { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.dns",
5672 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000004,
5675 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu
,
5676 { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.mtu",
5677 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000008,
5680 { &hf_mbim_ip_configuration_info_ipv6_configuration_available
,
5681 { "IPv6 Configuration Available", "mbim.control.ip_configuration_info.ipv6_configuration_available",
5682 FT_UINT32
, BASE_HEX
, NULL
, 0,
5685 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_address
,
5686 { "Address", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.address",
5687 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000001,
5690 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway
,
5691 { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.gateway",
5692 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000002,
5695 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns
,
5696 { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.dns",
5697 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000004,
5700 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu
,
5701 { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.mtu",
5702 FT_BOOLEAN
, 32, TFS(&tfs_available_not_available
), 0x00000008,
5705 { &hf_mbim_ip_configuration_info_ipv4_address_count
,
5706 { "IPv4 Address Count", "mbim.control.ip_configuration_info.ipv4_address.count",
5707 FT_UINT32
, BASE_DEC
, NULL
, 0,
5710 { &hf_mbim_ip_configuration_info_ipv4_address_offset
,
5711 { "IPv4 Address Offset", "mbim.control.ip_configuration_info.ipv4_address.offset",
5712 FT_UINT32
, BASE_DEC
, NULL
, 0,
5715 { &hf_mbim_ip_configuration_info_ipv6_address_count
,
5716 { "IPv6 Address Count", "mbim.control.ip_configuration_info.ipv6_address.count",
5717 FT_UINT32
, BASE_DEC
, NULL
, 0,
5720 { &hf_mbim_ip_configuration_info_ipv6_address_offset
,
5721 { "IPv6 Address Offset", "mbim.control.ip_configuration_info.ipv6_address.offset",
5722 FT_UINT32
, BASE_DEC
, NULL
, 0,
5725 { &hf_mbim_ip_configuration_info_ipv4_gateway_offset
,
5726 { "IPv4 Gateway Offset", "mbim.control.ip_configuration_info.ipv4_gateway.offset",
5727 FT_UINT32
, BASE_DEC
, NULL
, 0,
5730 { &hf_mbim_ip_configuration_info_ipv6_gateway_offset
,
5731 { "IPv6 Gateway Offset", "mbim.control.ip_configuration_info.ipv6_gateway.offset",
5732 FT_UINT32
, BASE_DEC
, NULL
, 0,
5735 { &hf_mbim_ip_configuration_info_ipv4_dns_count
,
5736 { "IPv4 DNS Server Count", "mbim.control.ip_configuration_info.ipv4_dns.count",
5737 FT_UINT32
, BASE_DEC
, NULL
, 0,
5740 { &hf_mbim_ip_configuration_info_ipv4_dns_offset
,
5741 { "IPv4 DNS Server Offset", "mbim.control.ip_configuration_info.ipv4_dns.offset",
5742 FT_UINT32
, BASE_DEC
, NULL
, 0,
5745 { &hf_mbim_ip_configuration_info_ipv6_dns_count
,
5746 { "IPv6 DNS Server Count", "mbim.control.ip_configuration_info.ipv6_dns.count",
5747 FT_UINT32
, BASE_DEC
, NULL
, 0,
5750 { &hf_mbim_ip_configuration_info_ipv6_dns_offset
,
5751 { "IPv6 DNS Server Offset", "mbim.control.ip_configuration_info.ipv6_dns.offset",
5752 FT_UINT32
, BASE_DEC
, NULL
, 0,
5755 { &hf_mbim_ip_configuration_info_ipv4_mtu
,
5756 { "IPv4 MTU", "mbim.control.ip_configuration_info.ipv4_mtu",
5757 FT_UINT32
, BASE_DEC
, NULL
, 0,
5760 { &hf_mbim_ip_configuration_info_ipv6_mtu
,
5761 { "IPv6 MTU", "mbim.control.ip_configuration_info.ipv6_mtu",
5762 FT_UINT32
, BASE_DEC
, NULL
, 0,
5765 { &hf_mbim_ip_configuration_info_ipv4_gateway
,
5766 { "IPv4 Gateway", "mbim.control.ip_configuration_info.ipv4_gateway",
5767 FT_IPv4
, BASE_NONE
, NULL
, 0,
5770 { &hf_mbim_ip_configuration_info_ipv6_gateway
,
5771 { "IPv6 Gateway", "mbim.control.ip_configuration_info.ipv6_gateway",
5772 FT_IPv6
, BASE_NONE
, NULL
, 0,
5775 { &hf_mbim_ip_configuration_info_ipv4_dns
,
5776 { "IPv4 DNS Server", "mbim.control.ip_configuration_info.ipv4_dns",
5777 FT_IPv4
, BASE_NONE
, NULL
, 0,
5780 { &hf_mbim_ip_configuration_info_ipv6_dns
,
5781 { "IPv6 DNS Server", "mbim.control.ip_configuration_info.ipv6_dns",
5782 FT_IPv6
, BASE_NONE
, NULL
, 0,
5785 { &hf_mbim_device_service_element_device_service_id
,
5786 { "Device Service Id", "mbim.control.device_service_element.device_service_id",
5787 FT_GUID
, BASE_NONE
, NULL
, 0,
5790 { &hf_mbim_device_service_element_dss_payload
,
5791 { "DSS Payload", "mbim.control.device_service_element.dss_payload",
5792 FT_UINT32
, BASE_HEX
, NULL
, 0,
5795 { &hf_mbim_device_service_element_dss_payload_host_device
,
5796 { "Host To Device", "mbim.control.device_service_element.dss_payload.host_device",
5797 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000001,
5800 { &hf_mbim_device_service_element_dss_payload_device_host
,
5801 { "Device To Host", "mbim.control.device_service_element.dss_payload.device_host",
5802 FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x00000002,
5805 { &hf_mbim_device_service_element_max_dss_instances
,
5806 { "Max DSS Instances", "mbim.control.device_service_element.max_dss_instances",
5807 FT_UINT32
, BASE_DEC
, NULL
, 0,
5810 { &hf_mbim_device_service_element_cid_count
,
5811 { "CID Count", "mbim.control.device_service_element.cid.count",
5812 FT_UINT32
, BASE_DEC
, NULL
, 0,
5815 { &hf_mbim_device_service_element_cid
,
5816 { "CID", "mbim.control.device_service_element.cid",
5817 FT_UINT32
, BASE_DEC
, NULL
, 0,
5820 { &hf_mbim_device_services_info_device_services_count
,
5821 { "Device Services Count", "mbim.control.device_services_info.device_services_count",
5822 FT_UINT32
, BASE_DEC
, NULL
, 0,
5825 { &hf_mbim_device_services_info_max_dss_sessions
,
5826 { "Max DSS Sessions", "mbim.control.device_services_info.max_dss_sessions",
5827 FT_UINT32
, BASE_DEC
, NULL
, 0,
5830 { &hf_mbim_device_services_info_device_services_offset
,
5831 { "Device Services Offset", "mbim.control.device_services_info.device_services.offset",
5832 FT_UINT32
, BASE_DEC
, NULL
, 0,
5835 { &hf_mbim_device_services_info_device_services_size
,
5836 { "Device Services Size", "mbim.control.device_services_info.device_services.size",
5837 FT_UINT32
, BASE_DEC
, NULL
, 0,
5840 { &hf_mbim_event_entry_device_service_id
,
5841 { "Device Service Id", "mbim.control.event_entry.device_service_id",
5842 FT_GUID
, BASE_NONE
, NULL
, 0,
5845 { &hf_mbim_event_entry_cid_count
,
5846 { "CID Count", "mbim.control.event_entry.cid.count",
5847 FT_UINT32
, BASE_DEC
, NULL
, 0,
5850 { &hf_mbim_event_entry_cid
,
5851 { "CID", "mbim.control.event_entry.cid",
5852 FT_UINT32
, BASE_DEC
, NULL
, 0,
5855 { &hf_mbim_device_service_subscribe_element_count
,
5856 { "Element Count", "mbim.control.device_service_subscribe.element_count",
5857 FT_UINT32
, BASE_DEC
, NULL
, 0,
5860 { &hf_mbim_device_service_subscribe_device_service_offset
,
5861 { "Device Service Offset", "mbim.control.device_service_subscribe.device_service.offset",
5862 FT_UINT32
, BASE_DEC
, NULL
, 0,
5865 { &hf_mbim_device_service_subscribe_device_service_size
,
5866 { "Device Service Size", "mbim.control.device_service_subscribe.device_service.size",
5867 FT_UINT32
, BASE_DEC
, NULL
, 0,
5870 { &hf_mbim_packet_statistics_info_in_discards
,
5871 { "In Discards", "mbim.control.packet_statistics_info.in_discards",
5872 FT_UINT32
, BASE_DEC
, NULL
, 0,
5875 { &hf_mbim_packet_statistics_info_in_errors
,
5876 { "In Errors", "mbim.control.packet_statistics_info.in_errors",
5877 FT_UINT32
, BASE_DEC
, NULL
, 0,
5880 { &hf_mbim_packet_statistics_info_in_octets
,
5881 { "In Octets", "mbim.control.packet_statistics_info.in_octets",
5882 FT_UINT64
, BASE_DEC
, NULL
, 0,
5885 { &hf_mbim_packet_statistics_info_in_packets
,
5886 { "In Packets", "mbim.control.packet_statistics_info.in_packets",
5887 FT_UINT64
, BASE_DEC
, NULL
, 0,
5890 { &hf_mbim_packet_statistics_info_out_octets
,
5891 { "Out Octets", "mbim.control.packet_statistics_info.out_octets",
5892 FT_UINT64
, BASE_DEC
, NULL
, 0,
5895 { &hf_mbim_packet_statistics_info_out_packets
,
5896 { "Out Packets", "mbim.control.packet_statistics_info.out_packets",
5897 FT_UINT64
, BASE_DEC
, NULL
, 0,
5900 { &hf_mbim_packet_statistics_info_out_errors
,
5901 { "Out Errors", "mbim.control.packet_statistics_info.out_errors",
5902 FT_UINT32
, BASE_DEC
, NULL
, 0,
5905 { &hf_mbim_packet_statistics_info_out_discards
,
5906 { "Out Discards", "mbim.control.packet_statistics_info.out_discards",
5907 FT_UINT32
, BASE_DEC
, NULL
, 0,
5910 { &hf_mbim_network_idle_hint_state
,
5911 { "Network Idle Hint State", "mbim.control.network_idle_hint.state",
5912 FT_UINT32
, BASE_DEC
, VALS(mbim_network_idle_hint_states_vals
), 0,
5915 { &hf_mbim_emergency_mode_info_emergency_mode
,
5916 { "Emergency Mode", "mbim.control.emergency_mode_info.mode",
5917 FT_UINT32
, BASE_DEC
, VALS(mbim_emergency_mode_states_vals
), 0,
5920 { &hf_mbim_single_packet_filter_filter_size
,
5921 { "Filter Size", "mbim.control.single_packet_filter.filter_size",
5922 FT_UINT32
, BASE_DEC
, NULL
, 0,
5925 { &hf_mbim_single_packet_filter_packet_filter_offset
,
5926 { "Packet Filter Offset", "mbim.control.single_packet_filter.packet_filter.offset",
5927 FT_UINT32
, BASE_DEC
, NULL
, 0,
5930 { &hf_mbim_single_packet_filter_packet_mask_offset
,
5931 { "Packet Mask Offset", "mbim.control.single_packet_filter.packet_mask.offset",
5932 FT_UINT32
, BASE_DEC
, NULL
, 0,
5935 { &hf_mbim_single_packet_filter_packet_filter
,
5936 { "Packet Filter", "mbim.control.single_packet_filter.packet_filter",
5937 FT_BYTES
, BASE_NONE
, NULL
, 0,
5940 { &hf_mbim_single_packet_filter_packet_mask
,
5941 { "Packet Mask", "mbim.control.single_packet_filter.packet_mask",
5942 FT_BYTES
, BASE_NONE
, NULL
, 0,
5945 { &hf_mbim_packet_filters_session_id
,
5946 { "Session Id", "mbim.control.packet_filters.session_id",
5947 FT_UINT32
, BASE_DEC
, NULL
, 0,
5950 { &hf_mbim_packet_filters_packet_filters_count
,
5951 { "Packet Filters Count", "mbim.control.packet_filters.packet_filters_count",
5952 FT_UINT32
, BASE_DEC
, NULL
, 0,
5955 { &hf_mbim_packet_filters_packet_filters_packet_filter_offset
,
5956 { "Packet Filter Offset", "mbim.control.packet_filters.packet_filter.offset",
5957 FT_UINT32
, BASE_DEC
, NULL
, 0,
5960 { &hf_mbim_packet_filters_packet_filters_packet_filter_size
,
5961 { "Packet Filters Size", "mbim.control.packet_filters.packet_filter.size",
5962 FT_UINT32
, BASE_DEC
, NULL
, 0,
5965 { &hf_mbim_set_sms_configuration_format
,
5966 { "Format", "mbim.control.set_sms_configuration.format",
5967 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_format_vals
), 0,
5970 { &hf_mbim_set_sms_configuration_sc_address_offset
,
5971 { "Service Center Address Offset", "mbim.control.set_sms_configuration.sc_address.offset",
5972 FT_UINT32
, BASE_DEC
, NULL
, 0,
5975 { &hf_mbim_set_sms_configuration_sc_address_size
,
5976 { "Service Center Address Size", "mbim.control.set_sms_configuration.sc_address.size",
5977 FT_UINT32
, BASE_DEC
, NULL
, 0,
5980 { &hf_mbim_set_sms_configuration_sc_address
,
5981 { "Service Center Address", "mbim.control.set_sms_configuration.sc_address.size",
5982 FT_STRING
, BASE_NONE
, NULL
, 0,
5985 { &hf_mbim_sms_configuration_info_sms_storage_state
,
5986 { "SMS Storage State", "mbim.control.sms_configuration_info.sms_storage_state",
5987 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_storage_state_vals
), 0,
5990 { &hf_mbim_sms_configuration_info_format
,
5991 { "Format", "mbim.control.sms_configuration_info.format",
5992 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_format_vals
), 0,
5995 { &hf_mbim_sms_configuration_info_max_messages
,
5996 { "Max Messages", "mbim.control.sms_configuration_info.max_messages",
5997 FT_UINT32
, BASE_DEC
, NULL
, 0,
6000 { &hf_mbim_sms_configuration_info_cdma_short_message_size
,
6001 { "CDMA Short Message Size", "mbim.control.sms_configuration_info.cdma_short_message_size",
6002 FT_UINT32
, BASE_DEC
, NULL
, 0,
6005 { &hf_mbim_sms_configuration_info_sc_address_offset
,
6006 { "Service Center Address Offset", "mbim.control.sms_configuration_info.sc_address.offset",
6007 FT_UINT32
, BASE_DEC
, NULL
, 0,
6010 { &hf_mbim_sms_configuration_info_sc_address_size
,
6011 { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address.size",
6012 FT_UINT32
, BASE_DEC
, NULL
, 0,
6015 { &hf_mbim_sms_configuration_info_sc_address
,
6016 { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address",
6017 FT_STRING
, BASE_NONE
, NULL
, 0,
6020 { &hf_mbim_sms_pdu_record_message_index
,
6021 { "Message Index", "mbim.control.sms_pdu_record.message_index",
6022 FT_UINT32
, BASE_DEC
, NULL
, 0,
6025 { &hf_mbim_sms_pdu_record_message_status
,
6026 { "Message Status", "mbim.control.sms_pdu_record.message_status",
6027 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_message_status_vals
), 0,
6030 { &hf_mbim_sms_pdu_record_pdu_data_offset
,
6031 { "PDU Data Offset", "mbim.control.sms_pdu_record.pdu_data.offset",
6032 FT_UINT32
, BASE_DEC
, NULL
, 0,
6035 { &hf_mbim_sms_pdu_record_pdu_data_size
,
6036 { "PDU Data Size", "mbim.control.sms_pdu_record.pdu_data.size",
6037 FT_UINT32
, BASE_DEC
, NULL
, 0,
6040 { &hf_mbim_sms_pdu_record_pdu_data
,
6041 { "PDU Data", "mbim.control.sms_pdu_record.pdu_data",
6042 FT_BYTES
, BASE_NONE
, NULL
, 0,
6045 { &hf_mbim_sms_cdma_record_message_index
,
6046 { "Message Index", "mbim.control.sms_cdma_record.message_index",
6047 FT_UINT32
, BASE_DEC
, NULL
, 0,
6050 { &hf_mbim_sms_cdma_record_message_status
,
6051 { "Message Status", "mbim.control.sms_cdma_record.message_status",
6052 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_message_status_vals
), 0,
6055 { &hf_mbim_sms_cdma_record_address_offset
,
6056 { "Address Offset", "mbim.control.sms_cdma_record.address.offset",
6057 FT_UINT32
, BASE_DEC
, NULL
, 0,
6060 { &hf_mbim_sms_cdma_record_address_size
,
6061 { "Address Size", "mbim.control.sms_cdma_record.address.size",
6062 FT_UINT32
, BASE_DEC
, NULL
, 0,
6065 { &hf_mbim_sms_cdma_record_timestamp_offset
,
6066 { "Timestamp Offset", "mbim.control.sms_cdma_record.timestamp.offset",
6067 FT_UINT32
, BASE_DEC
, NULL
, 0,
6070 { &hf_mbim_sms_cdma_record_timestamp_size
,
6071 { "Timestamp Size", "mbim.control.sms_cdma_record.timestamp.size",
6072 FT_UINT32
, BASE_DEC
, NULL
, 0,
6075 { &hf_mbim_sms_cdma_record_encoding_id
,
6076 { "Encoding Id", "mbim.control.sms_cdma_record.encoding_id",
6077 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_cdma_encoding_vals
), 0,
6080 { &hf_mbim_sms_cdma_record_language_id
,
6081 { "Language Id", "mbim.control.sms_cdma_record.language_id",
6082 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_cdma_lang_vals
), 0,
6085 { &hf_mbim_sms_cdma_record_encoded_message_offset
,
6086 { "Encoded Message Offset", "mbim.control.sms_cdma_record.encoded_message.offset",
6087 FT_UINT32
, BASE_DEC
, NULL
, 0,
6090 { &hf_mbim_sms_cdma_record_size_in_bytes
,
6091 { "Size In Bytes", "mbim.control.sms_cdma_record.size_in_bytes",
6092 FT_UINT32
, BASE_DEC
, NULL
, 0,
6095 { &hf_mbim_sms_cdma_record_size_in_characters
,
6096 { "Size In Characters", "mbim.control.sms_cdma_record.size_in_characters",
6097 FT_UINT32
, BASE_DEC
, NULL
, 0,
6100 { &hf_mbim_sms_cdma_record_address
,
6101 { "Address", "mbim.control.sms_cdma_record.address",
6102 FT_STRING
, BASE_NONE
, NULL
, 0,
6105 { &hf_mbim_sms_cdma_record_timestamp
,
6106 { "Timestamp", "mbim.control.sms_cdma_record.timestamp",
6107 FT_STRING
, BASE_NONE
, NULL
, 0,
6110 { &hf_mbim_sms_cdma_record_encoded_message
,
6111 { "Encoded Message", "mbim.control.sms_cdma_record.encoded_message",
6112 FT_BYTES
, BASE_NONE
, NULL
, 0,
6115 { &hf_mbim_sms_read_req_format
,
6116 { "Format", "mbim.control.sms_read_req.format",
6117 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_format_vals
), 0,
6120 { &hf_mbim_sms_read_req_flag
,
6121 { "Flag", "mbim.control.sms_read_req.flag",
6122 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_flag_vals
), 0,
6125 { &hf_mbim_sms_read_req_message_index
,
6126 { "Message Index", "mbim.control.sms_read_req.message_index",
6127 FT_UINT32
, BASE_DEC
, NULL
, 0,
6130 { &hf_mbim_sms_read_info_format
,
6131 { "Format", "mbim.control.sms_read_info.format",
6132 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_format_vals
), 0,
6135 { &hf_mbim_sms_read_info_element_count
,
6136 { "Element Count", "mbim.control.sms_read_info.element_count",
6137 FT_UINT32
, BASE_DEC
, NULL
, 0,
6140 { &hf_mbim_sms_read_info_sms_offset
,
6141 { "SMS Offset", "mbim.control.sms_read_info.sms.offset",
6142 FT_UINT32
, BASE_DEC
, NULL
, 0,
6145 { &hf_mbim_sms_read_info_sms_size
,
6146 { "SMS Size", "mbim.control.sms_read_info.sms.size",
6147 FT_UINT32
, BASE_DEC
, NULL
, 0,
6150 { &hf_mbim_sms_send_pdu_pdu_data_offset
,
6151 { "PDU Data Offset", "mbim.control.sms_send_pdu.pdu_data.offset",
6152 FT_UINT32
, BASE_DEC
, NULL
, 0,
6155 { &hf_mbim_sms_send_pdu_pdu_data_size
,
6156 { "PDU Data Offset", "mbim.control.sms_send_pdu.pdu_data.size",
6157 FT_UINT32
, BASE_DEC
, NULL
, 0,
6160 { &hf_mbim_sms_send_pdu_pdu_data
,
6161 { "PDU Data", "mbim.control.sms_send_pdu.pdu_data",
6162 FT_BYTES
, BASE_NONE
, NULL
, 0,
6165 { &hf_mbim_sms_send_cdma_encoding_id
,
6166 { "Encoding Id", "mbim.control.sms_send_cdma.encoding_id",
6167 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_cdma_encoding_vals
), 0,
6170 { &hf_mbim_sms_send_cdma_language_id
,
6171 { "Language Id", "mbim.control.sms_send_cdma.language_id",
6172 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_cdma_lang_vals
), 0,
6175 { &hf_mbim_sms_send_cdma_address_offset
,
6176 { "Address Offset", "mbim.control.sms_send_cdma.address.offset",
6177 FT_UINT32
, BASE_DEC
, NULL
, 0,
6180 { &hf_mbim_sms_send_cdma_address_size
,
6181 { "Address Size", "mbim.control.sms_send_cdma.address.size",
6182 FT_UINT32
, BASE_DEC
, NULL
, 0,
6185 { &hf_mbim_sms_send_cdma_encoded_message_offset
,
6186 { "Encoded Message Offset", "mbim.control.sms_send_cdma.encoded_message.offset",
6187 FT_UINT32
, BASE_DEC
, NULL
, 0,
6190 { &hf_mbim_sms_send_cdma_size_in_bytes
,
6191 { "Size In Bytes", "mbim.control.sms_send_cdma.size_in_bytes",
6192 FT_UINT32
, BASE_DEC
, NULL
, 0,
6195 { &hf_mbim_sms_send_cdma_size_in_characters
,
6196 { "Size In Characters", "mbim.control.sms_send_cdma.size_in_characters",
6197 FT_UINT32
, BASE_DEC
, NULL
, 0,
6200 { &hf_mbim_sms_send_cdma_address
,
6201 { "Address", "mbim.control.sms_send_cdma.address",
6202 FT_STRING
, BASE_NONE
, NULL
, 0,
6205 { &hf_mbim_sms_send_cdma_encoded_message
,
6206 { "Encoded Message", "mbim.control.sms_send_cdma.encoded_message",
6207 FT_BYTES
, BASE_NONE
, NULL
, 0,
6210 { &hf_mbim_set_sms_send_format
,
6211 { "Format", "mbim.control.set_sms_send.format",
6212 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_format_vals
), 0,
6215 { &hf_mbim_sms_send_info_message_reference
,
6216 { "Message Reference", "mbim.control.sms_send_info.message_reference",
6217 FT_UINT32
, BASE_DEC
, NULL
, 0,
6220 { &hf_mbim_set_sms_delete_flag
,
6221 { "Flag", "mbim.control.set_sms_delete.flag",
6222 FT_UINT32
, BASE_DEC
, VALS(mbim_sms_flag_vals
), 0,
6225 { &hf_mbim_set_sms_delete_message_index
,
6226 { "Message Index", "mbim.control.set_sms_delete.message_index",
6227 FT_UINT32
, BASE_DEC
, NULL
, 0,
6230 { &hf_mbim_sms_status_info_flags
,
6231 { "Flags", "mbim.control.sms_status_info.flags",
6232 FT_UINT32
, BASE_HEX
, NULL
, 0,
6235 { &hf_mbim_sms_status_info_flags_message_store_full
,
6236 { "Message Store Full", "mbim.control.sms_status_info.flags.message_store_full",
6237 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000001,
6240 { &hf_mbim_sms_status_info_flags_new_message
,
6241 { "New Message", "mbim.control.sms_status_info.flags.new_message",
6242 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000002,
6245 { &hf_mbim_sms_status_info_message_index
,
6246 { "Message Index", "mbim.control.sms_status_info.message_index",
6247 FT_UINT32
, BASE_DEC
, NULL
, 0,
6250 { &hf_mbim_set_ussd_ussd_action
,
6251 { "USSD Action", "mbim.control.set_ussd.ussd_action",
6252 FT_UINT32
, BASE_DEC
, VALS(mbim_ussd_action_vals
), 0,
6255 { &hf_mbim_set_ussd_ussd_data_coding_scheme
,
6256 { "USSD Data Coding Scheme", "mbim.control.set_ussd.ussd_data_coding_scheme",
6257 FT_UINT32
, BASE_HEX
, NULL
, 0,
6260 { &hf_mbim_set_ussd_ussd_ussd_payload_offset
,
6261 { "USSD Payload Offset", "mbim.control.set_ussd.ussd_payload.offset",
6262 FT_UINT32
, BASE_DEC
, NULL
, 0,
6265 { &hf_mbim_set_ussd_ussd_ussd_payload_length
,
6266 { "USSD Payload Length", "mbim.control.set_ussd.ussd_payload.length",
6267 FT_UINT32
, BASE_DEC
, NULL
, 0,
6270 { &hf_mbim_set_ussd_ussd_ussd_payload
,
6271 { "USSD Payload", "mbim.control.set_ussd.ussd_payload",
6272 FT_BYTES
, BASE_NONE
, NULL
, 0,
6275 { &hf_mbim_ussd_info_ussd_response
,
6276 { "USSD Response", "mbim.control.info_ussd.ussd_response",
6277 FT_UINT32
, BASE_DEC
, VALS(mbim_ussd_response_vals
), 0,
6280 { &hf_mbim_ussd_info_ussd_session_state
,
6281 { "USSD Session State", "mbim.control.info_ussd.ussd_session_state",
6282 FT_UINT32
, BASE_DEC
, VALS(mbim_ussd_session_state_vals
), 0,
6285 { &hf_mbim_ussd_info_ussd_data_coding_scheme
,
6286 { "USSD Data Coding Scheme", "mbim.control.ussd_info.ussd_data_coding_scheme",
6287 FT_UINT32
, BASE_HEX
, NULL
, 0,
6290 { &hf_mbim_ussd_info_ussd_payload_offset
,
6291 { "USSD Payload Offset", "mbim.control.ussd_info.ussd_payload.offset",
6292 FT_UINT32
, BASE_DEC
, NULL
, 0,
6295 { &hf_mbim_ussd_info_ussd_payload_length
,
6296 { "USSD Payload Length", "mbim.control.ussd_info.ussd_payload.length",
6297 FT_UINT32
, BASE_DEC
, NULL
, 0,
6300 { &hf_mbim_ussd_info_ussd_payload
,
6301 { "USSD Payload", "mbim.control.ussd_info.ussd_payload",
6302 FT_BYTES
, BASE_NONE
, NULL
, 0,
6305 { &hf_mbim_phonebook_configuration_info_phonebook_state
,
6306 { "Phonebook State", "mbim.control.phonebook_configuration_info.phonebook_state",
6307 FT_UINT32
, BASE_DEC
, VALS(mbim_phonebook_state_vals
), 0,
6310 { &hf_mbim_phonebook_configuration_info_total_nb_of_entries
,
6311 { "Total Number Of Entries", "mbim.control.phonebook_configuration_info.total_nb_of_entries",
6312 FT_UINT32
, BASE_DEC
, NULL
, 0,
6315 { &hf_mbim_phonebook_configuration_info_used_entries
,
6316 { "Used Entries", "mbim.control.phonebook_configuration_info.used_entries",
6317 FT_UINT32
, BASE_DEC
, NULL
, 0,
6320 { &hf_mbim_phonebook_configuration_info_max_number_length
,
6321 { "Max Number Length", "mbim.control.phonebook_configuration_info.max_number_length",
6322 FT_UINT32
, BASE_DEC
, NULL
, 0,
6325 { &hf_mbim_phonebook_configuration_info_max_name_length
,
6326 { "Max Name Length", "mbim.control.phonebook_configuration_info.max_name_length",
6327 FT_UINT32
, BASE_DEC
, NULL
, 0,
6330 { &hf_mbim_phonebook_entry_entry_index
,
6331 { "Entry Index", "mbim.control.phonebook_entry.entry_index",
6332 FT_UINT32
, BASE_DEC
, NULL
, 0,
6335 { &hf_mbim_phonebook_entry_number_offset
,
6336 { "Number Offset", "mbim.control.phonebook_entry.number.offset",
6337 FT_UINT32
, BASE_DEC
, NULL
, 0,
6340 { &hf_mbim_phonebook_entry_number_length
,
6341 { "Number Length", "mbim.control.phonebook_entry.number.length",
6342 FT_UINT32
, BASE_DEC
, NULL
, 0,
6345 { &hf_mbim_phonebook_entry_name_offset
,
6346 { "Name Offset", "mbim.control.phonebook_entry.name.offset",
6347 FT_UINT32
, BASE_DEC
, NULL
, 0,
6350 { &hf_mbim_phonebook_entry_name_length
,
6351 { "Name Length", "mbim.control.phonebook_entry.name.length",
6352 FT_UINT32
, BASE_DEC
, NULL
, 0,
6355 { &hf_mbim_phonebook_entry_number
,
6356 { "Number", "mbim.control.phonebook_entry.number",
6357 FT_STRING
, BASE_NONE
, NULL
, 0,
6360 { &hf_mbim_phonebook_entry_name
,
6361 { "Name", "mbim.control.phonebook_entry.name",
6362 FT_STRING
, BASE_NONE
, NULL
, 0,
6365 { &hf_mbim_phonebook_read_req_filter_flag
,
6366 { "Filter Flag", "mbim.control.phonebook_read_req.filter_flag",
6367 FT_UINT32
, BASE_DEC
, VALS(mbim_phonebook_flag_vals
), 0,
6370 { &hf_mbim_phonebook_read_req_filter_message_index
,
6371 { "Filter Message Index", "mbim.control.phonebook_read_req.filter_message_index",
6372 FT_UINT32
, BASE_DEC
, NULL
, 0,
6375 { &hf_mbim_phonebook_read_info_element_count
,
6376 { "Element Count", "mbim.control.phonebook_read_info.element_count",
6377 FT_UINT32
, BASE_DEC
, NULL
, 0,
6380 { &hf_mbim_phonebook_read_info_phonebook_offset
,
6381 { "Phonebook Offset", "mbim.control.phonebook_read_info.phonebook.offset",
6382 FT_UINT32
, BASE_DEC
, NULL
, 0,
6385 { &hf_mbim_phonebook_read_info_phonebook_size
,
6386 { "Phonebook Size", "mbim.control.phonebook_read_info.phonebook.size",
6387 FT_UINT32
, BASE_DEC
, NULL
, 0,
6390 { &hf_mbim_set_phonebook_delete_filter_flag
,
6391 { "Filter Flag", "mbim.control.set_phonebook_delete.filter_flag",
6392 FT_UINT32
, BASE_DEC
, VALS(mbim_phonebook_flag_vals
), 0,
6395 { &hf_mbim_set_phonebook_delete_filter_message_index
,
6396 { "Filter Message Index", "mbim.control.set_phonebook_delete.filter_message_index",
6397 FT_UINT32
, BASE_DEC
, NULL
, 0,
6400 { &hf_mbim_set_phonebook_write_save_flag
,
6401 { "Save Flag", "mbim.control.set_phonebook_write.save_flag",
6402 FT_UINT32
, BASE_DEC
, VALS(mbim_phonebook_write_flag_vals
), 0,
6405 { &hf_mbim_set_phonebook_write_save_index
,
6406 { "Save Index", "mbim.control.set_phonebook_write.save_index",
6407 FT_UINT32
, BASE_DEC
, NULL
, 0,
6410 { &hf_mbim_set_phonebook_write_number_offset
,
6411 { "Number Offset", "mbim.control.set_phonebook_write.number.offset",
6412 FT_UINT32
, BASE_DEC
, NULL
, 0,
6415 { &hf_mbim_set_phonebook_write_number_length
,
6416 { "Number Length", "mbim.control.set_phonebook_write.number.length",
6417 FT_UINT32
, BASE_DEC
, NULL
, 0,
6420 { &hf_mbim_set_phonebook_write_name_offset
,
6421 { "Name Offset", "mbim.control.set_phonebook_write.name.offset",
6422 FT_UINT32
, BASE_DEC
, NULL
, 0,
6425 { &hf_mbim_set_phonebook_write_name_length
,
6426 { "Name Length", "mbim.control.set_phonebook_write.name.length",
6427 FT_UINT32
, BASE_DEC
, NULL
, 0,
6430 { &hf_mbim_set_phonebook_write_number
,
6431 { "Number", "mbim.control.set_phonebook_write.number",
6432 FT_STRING
, BASE_NONE
, NULL
, 0,
6435 { &hf_mbim_set_phonebook_write_name
,
6436 { "Name", "mbim.control.set_phonebook_write.name",
6437 FT_STRING
, BASE_NONE
, NULL
, 0,
6440 { &hf_mbim_set_stk_pac_pac_host_control
,
6441 { "PAC Host Control", "mbim.control.set_stk_pac.pac_host_control",
6442 FT_BYTES
, BASE_NONE
, NULL
, 0,
6445 { &hf_mbim_stk_pac_info_pac_support
,
6446 { "PAC Host Control", "mbim.control.stk_pac_info.pac_support",
6447 FT_BYTES
, BASE_NONE
, NULL
, 0,
6450 { &hf_mbim_stk_pac_pac_type
,
6451 { "PAC Type", "mbim.control.stk_pac.pac_type",
6452 FT_UINT32
, BASE_DEC
, VALS(mbim_stk_pac_type_vals
), 0,
6455 { &hf_mbim_stk_pac_pac
,
6456 { "PAC", "mbim.control.stk_pac.pac",
6457 FT_BYTES
, BASE_NONE
, NULL
, 0,
6460 { &hf_mbim_set_stk_terminal_response_response_length
,
6461 { "Response Length", "mbim.control.set_stk_terminal_response.response_length",
6462 FT_UINT32
, BASE_DEC
, NULL
, 0,
6465 { &hf_mbim_set_stk_terminal_response_data_buffer
,
6466 { "Data Buffer", "mbim.control.set_stk_terminal_response.data_buffer",
6467 FT_BYTES
, BASE_NONE
, NULL
, 0,
6470 { &hf_mbim_stk_terminal_response_info_result_data_string_offset
,
6471 { "Result Data String Offset", "mbim.control.stk_terminal_response_info.result_data_string.offset",
6472 FT_UINT32
, BASE_DEC
, NULL
, 0,
6475 { &hf_mbim_stk_terminal_response_info_result_data_string_length
,
6476 { "Result Data String Length", "mbim.control.stk_terminal_response_info.result_data_string.length",
6477 FT_UINT32
, BASE_DEC
, NULL
, 0,
6480 { &hf_mbim_stk_terminal_response_info_status_word
,
6481 { "Status Word", "mbim.control.stk_terminal_response_info.status_word",
6482 FT_UINT32
, BASE_HEX
, NULL
, 0,
6485 { &hf_mbim_stk_terminal_response_info_result_data_string
,
6486 { "Result Data String", "mbim.control.stk_terminal_response_info.result_data_string",
6487 FT_BYTES
, BASE_NONE
, NULL
, 0,
6490 { &hf_mbim_set_stk_envelope_data_buffer
,
6491 { "Data Buffer", "mbim.control.set_stk_envelope.data_buffer",
6492 FT_BYTES
, BASE_NONE
, NULL
, 0,
6495 { &hf_mbim_stk_envelope_info_envelope_support
,
6496 { "Envelope Support", "mbim.control.stk_envelope_info.envelope_support",
6497 FT_BYTES
, BASE_NONE
, NULL
, 0,
6500 { &hf_mbim_aka_auth_req_rand
,
6501 { "RAND", "mbim.control.aka_auth_req.rand",
6502 FT_BYTES
, BASE_NONE
, NULL
, 0,
6505 { &hf_mbim_aka_auth_req_autn
,
6506 { "AUTN", "mbim.control.aka_auth_req.autn",
6507 FT_BYTES
, BASE_NONE
, NULL
, 0,
6510 { &hf_mbim_aka_auth_info_res
,
6511 { "RES", "mbim.control.aka_auth_info.res",
6512 FT_BYTES
, BASE_NONE
, NULL
, 0,
6515 { &hf_mbim_aka_auth_info_res_length
,
6516 { "RES Length", "mbim.control.aka_auth_info.res_length",
6517 FT_UINT32
, BASE_DEC
, NULL
, 0,
6520 { &hf_mbim_aka_auth_info_ik
,
6521 { "IK", "mbim.control.aka_auth_info.ik",
6522 FT_BYTES
, BASE_NONE
, NULL
, 0,
6525 { &hf_mbim_aka_auth_info_ck
,
6526 { "CK", "mbim.control.aka_auth_info.ck",
6527 FT_BYTES
, BASE_NONE
, NULL
, 0,
6530 { &hf_mbim_aka_auth_info_auts
,
6531 { "AUTS", "mbim.control.aka_auth_info.auts",
6532 FT_BYTES
, BASE_NONE
, NULL
, 0,
6535 { &hf_mbim_akap_auth_req_rand
,
6536 { "RAND", "mbim.control.akap_auth_req.rand",
6537 FT_BYTES
, BASE_NONE
, NULL
, 0,
6540 { &hf_mbim_akap_auth_req_autn
,
6541 { "AUTN", "mbim.control.akap_auth_req.autn",
6542 FT_BYTES
, BASE_NONE
, NULL
, 0,
6545 { &hf_mbim_akap_auth_req_network_name_offset
,
6546 { "Network Name Offset", "mbim.control.akap_auth_req.network_name.offset",
6547 FT_UINT32
, BASE_DEC
, NULL
, 0,
6550 { &hf_mbim_akap_auth_req_network_name_length
,
6551 { "Network Name Length", "mbim.control.akap_auth_req.network_name.length",
6552 FT_UINT32
, BASE_DEC
, NULL
, 0,
6555 { &hf_mbim_akap_auth_req_network_name
,
6556 { "Network Name", "mbim.control.akap_auth_req.network_name",
6557 FT_STRING
, BASE_NONE
, NULL
, 0,
6560 { &hf_mbim_akap_auth_info_res
,
6561 { "RES", "mbim.control.akap_auth_info.res",
6562 FT_BYTES
, BASE_NONE
, NULL
, 0,
6565 { &hf_mbim_akap_auth_info_res_length
,
6566 { "RES Length", "mbim.control.akap_auth_info.res_length",
6567 FT_UINT32
, BASE_DEC
, NULL
, 0,
6570 { &hf_mbim_akap_auth_info_ik
,
6571 { "IK", "mbim.control.akap_auth_info.ik",
6572 FT_BYTES
, BASE_NONE
, NULL
, 0,
6575 { &hf_mbim_akap_auth_info_ck
,
6576 { "CK", "mbim.control.akap_auth_info.ck",
6577 FT_BYTES
, BASE_NONE
, NULL
, 0,
6580 { &hf_mbim_akap_auth_info_auts
,
6581 { "AUTS", "mbim.control.akap_auth_info.auts",
6582 FT_BYTES
, BASE_NONE
, NULL
, 0,
6585 { &hf_mbim_sim_auth_req_rand1
,
6586 { "RAND1", "mbim.control.sim_auth_req.rand1",
6587 FT_BYTES
, BASE_NONE
, NULL
, 0,
6590 { &hf_mbim_sim_auth_req_rand2
,
6591 { "RAND2", "mbim.control.sim_auth_req.rand2",
6592 FT_BYTES
, BASE_NONE
, NULL
, 0,
6595 { &hf_mbim_sim_auth_req_rand3
,
6596 { "RAND3", "mbim.control.sim_auth_req.rand3",
6597 FT_BYTES
, BASE_NONE
, NULL
, 0,
6600 { &hf_mbim_sim_auth_req_n
,
6601 { "n", "mbim.control.sim_auth_req.n",
6602 FT_UINT32
, BASE_DEC
, NULL
, 0,
6605 { &hf_mbim_sim_auth_info_sres1
,
6606 { "SRES1", "mbim.control.sim_auth_info.sres1",
6607 FT_UINT32
, BASE_HEX
, NULL
, 0,
6610 { &hf_mbim_sim_auth_info_kc1
,
6611 { "KC1", "mbim.control.sim_auth_info.kc1",
6612 FT_UINT64
, BASE_HEX
, NULL
, 0,
6615 { &hf_mbim_sim_auth_info_sres2
,
6616 { "SRES2", "mbim.control.sim_auth_info.sres2",
6617 FT_UINT32
, BASE_HEX
, NULL
, 0,
6620 { &hf_mbim_sim_auth_info_kc2
,
6621 { "KC2", "mbim.control.sim_auth_info.kc2",
6622 FT_UINT64
, BASE_HEX
, NULL
, 0,
6625 { &hf_mbim_sim_auth_info_sres3
,
6626 { "SRES3", "mbim.control.sim_auth_info.sres3",
6627 FT_UINT32
, BASE_HEX
, NULL
, 0,
6630 { &hf_mbim_sim_auth_info_kc3
,
6631 { "KC3", "mbim.control.sim_auth_info.kc3",
6632 FT_UINT64
, BASE_HEX
, NULL
, 0,
6635 { &hf_mbim_sim_auth_info_n
,
6636 { "n", "mbim.control.sim_auth_info.n",
6637 FT_UINT32
, BASE_DEC
, NULL
, 0,
6640 { &hf_mbim_set_dss_connect_device_service_id
,
6641 { "Device Service Id", "mbim.control.set_dss_connect.device_service_id",
6642 FT_GUID
, BASE_NONE
, NULL
, 0,
6645 { &hf_mbim_set_dss_connect_dss_session_id
,
6646 { "DSS Session Id", "mbim.control.set_dss_connect.dss_session_id",
6647 FT_UINT32
, BASE_DEC
, NULL
, 0,
6650 { &hf_mbim_set_dss_connect_dss_link_state
,
6651 { "DSS Link State", "mbim.control.set_dss_connect.dss_link_state",
6652 FT_UINT32
, BASE_DEC
, VALS(mbim_dss_link_state_vals
), 0,
6655 { &hf_mbim_multicarrier_capabilities_info_capabilities
,
6656 { "Capabilities", "mbim.control.multicarrier_capabilities_info.capabilities",
6657 FT_UINT32
, BASE_HEX
, NULL
, 0,
6660 { &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan
,
6661 { "Static Scan", "mbim.control.multicarrier_capabilities_info.capabilities.static_scan",
6662 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000001,
6665 { &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot
,
6666 { "FW Requires Reboot", "mbim.control.multicarrier_capabilities_info.capabilities.fw_requires_reboot",
6667 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000002,
6670 { &hf_mbim_location_info_country
,
6671 { "Country", "mbim.control.location_info.country",
6672 FT_UINT32
, BASE_HEX
|BASE_EXT_STRING
, &mbim_geoid_vals_ext
, 0,
6675 { &hf_mbim_multicarrier_current_cid_list_req_uuid
,
6676 { "UUID", "mbim.control.multicarrier_current_cid_list_req.uuid",
6677 FT_GUID
, BASE_NONE
, NULL
, 0,
6680 { &hf_mbim_multicarrier_current_cid_list_info_cid_count
,
6681 { "CID Count", "mbim.control.multicarrier_current_cid_list_info.cid_count",
6682 FT_UINT32
, BASE_DEC
, NULL
, 0,
6685 { &hf_mbim_multicarrier_current_cid_list_info_cid
,
6686 { "CID", "mbim.control.multicarrier_current_cid_list_info.cid",
6687 FT_UINT32
, BASE_DEC
, VALS(mbim_uuid_multicarrier_cid_vals
), 0,
6690 { &hf_mbim_msfwid_firmwareid_info_firmware_id
,
6691 { "Firmware Id", "mbim.control.msfwid_firmwareid_info.firmware_id",
6692 FT_GUID
, BASE_NONE
, NULL
, 0,
6695 { &hf_mbim_fragmented_payload
,
6696 { "Fragmented Payload", "mbim.control.fragmented_payload",
6697 FT_BYTES
, BASE_NONE
, NULL
, 0,
6700 { &hf_mbim_request_in
,
6701 { "Request In", "mbim.control.request_in",
6702 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
6705 { &hf_mbim_response_in
,
6706 { "Response In", "mbim.control.response_in",
6707 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
6710 { &hf_mbim_descriptor
,
6711 { "Descriptor", "mbim.descriptor",
6712 FT_NONE
, BASE_NONE
, NULL
, 0,
6715 { &hf_mbim_descriptor_version
,
6716 { "bcdMBIMVersion", "mbim.descriptor.version",
6717 FT_UINT16
, BASE_HEX
, NULL
, 0,
6718 "MBIM Version", HFILL
}
6720 { &hf_mbim_descriptor_max_control_message
,
6721 { "wMaxControlMessage", "mbim.descriptor.max_control_message",
6722 FT_UINT16
, BASE_DEC
, NULL
, 0,
6723 "Max Control Message", HFILL
}
6725 { &hf_mbim_descriptor_number_filters
,
6726 { "bNumberFilters", "mbim.descriptor.number_filters",
6727 FT_UINT8
, BASE_DEC
, NULL
, 0,
6728 "Number Of Packet Filters", HFILL
}
6730 { &hf_mbim_descriptor_max_filter_size
,
6731 { "bMaxFilterSize", "mbim.descriptor.max_filter_size",
6732 FT_UINT8
, BASE_DEC
, NULL
, 0,
6733 "Max Packet Filter Size", HFILL
}
6735 { &hf_mbim_descriptor_max_segment_size
,
6736 { "wMaxSegmentSize", "mbim.descriptor.max_segment_size",
6737 FT_UINT16
, BASE_DEC
, NULL
, 0,
6738 "Max Segment Size", HFILL
}
6740 { &hf_mbim_descriptor_network_capabilities
,
6741 { "bmNetworkCapabilities", "mbim.descriptor.network_capabilities",
6742 FT_UINT8
, BASE_HEX
, NULL
, 0,
6743 "Network Capabilities", HFILL
}
6745 { &hf_mbim_descriptor_network_capabilities_max_datagram_size
,
6746 { "SetMaxDatagramSize/GetMaxDatagramSize", "mbim.descriptor.network_capabilities.max_datagram_size",
6747 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x08,
6750 { &hf_mbim_descriptor_network_capabilities_ntb_input_size
,
6751 { "8-byte GetNtbInputSize/SetNtbInputSize", "mbim.descriptor.network_capabilities.ntb_input_size",
6752 FT_BOOLEAN
, 8, TFS(&tfs_supported_not_supported
), 0x20,
6755 { &hf_mbim_descriptor_extended_version
,
6756 { "bcdMBIMExtendedVersion", "mbim.descriptor.extended_version",
6757 FT_UINT16
, BASE_HEX
, NULL
, 0,
6758 "MBIM Extended Version", HFILL
}
6760 { &hf_mbim_descriptor_max_outstanding_command_messages
,
6761 { "bMaxOutstandingCommandMessages", "mbim.descriptor.max_outstanding_command_messages",
6762 FT_UINT8
, BASE_DEC
, NULL
, 0,
6763 "Max Outstanding Messages", HFILL
}
6765 { &hf_mbim_descriptor_mtu
,
6766 { "wMTU", "mbim.descriptor.mtu",
6767 FT_UINT16
, BASE_DEC
, NULL
, 0,
6771 { "Bulk", "mbim.bulk",
6772 FT_NONE
, BASE_NONE
, NULL
, 0,
6775 { &hf_mbim_bulk_nth_signature
,
6776 { "Signature", "mbim.bulk.nth.signature",
6777 FT_STRING
, BASE_NONE
, NULL
, 0,
6780 { &hf_mbim_bulk_nth_header_length
,
6781 { "Header Length", "mbim.bulk.nth.header_length",
6782 FT_UINT16
, BASE_DEC
, NULL
, 0,
6785 { &hf_mbim_bulk_nth_sequence_number
,
6786 { "Sequence Number", "mbim.bulk.nth.sequence_number",
6787 FT_UINT16
, BASE_DEC
, NULL
, 0,
6790 { &hf_mbim_bulk_nth_block_length
,
6791 { "Block Length", "mbim.bulk.nth.block_length",
6792 FT_UINT16
, BASE_DEC
, NULL
, 0,
6795 { &hf_mbim_bulk_nth_block_length_32
,
6796 { "Block Length", "mbim.bulk.nth.block_length",
6797 FT_UINT32
, BASE_DEC
, NULL
, 0,
6800 { &hf_mbim_bulk_nth_ndp_index
,
6801 { "NDP Index", "mbim.bulk.nth.ndp_index",
6802 FT_UINT16
, BASE_DEC
, NULL
, 0,
6805 { &hf_mbim_bulk_nth_ndp_index_32
,
6806 { "NDP Index", "mbim.bulk.nth.ndp_index",
6807 FT_UINT32
, BASE_DEC
, NULL
, 0,
6810 { &hf_mbim_bulk_ndp_signature
,
6811 { "Signature", "mbim.bulk.ndp.signature",
6812 FT_UINT32
, BASE_HEX
, NULL
, 0,
6815 { &hf_mbim_bulk_ndp_signature_ips_session_id
,
6816 { "IPS Session Id", "mbim.bulk.ndp.signature.ips_session_id",
6817 FT_UINT8
, BASE_DEC
, NULL
, 0,
6820 { &hf_mbim_bulk_ndp_signature_dss_session_id
,
6821 { "DSS Session Id", "mbim.bulk.ndp.signature.dss_session_id",
6822 FT_UINT8
, BASE_DEC
, NULL
, 0,
6825 { &hf_mbim_bulk_ndp_length
,
6826 { "Length", "mbim.bulk.ndp.length",
6827 FT_UINT16
, BASE_DEC
, NULL
, 0,
6830 { &hf_mbim_bulk_ndp_next_ndp_index
,
6831 { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
6832 FT_UINT16
, BASE_DEC
, NULL
, 0,
6835 { &hf_mbim_bulk_ndp_next_ndp_index_32
,
6836 { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
6837 FT_UINT32
, BASE_DEC
, NULL
, 0,
6840 { &hf_mbim_bulk_ndp_reserved
,
6841 { "Reserved", "mbim.bulk.ndp.reserved",
6842 FT_UINT16
, BASE_HEX
, NULL
, 0,
6845 { &hf_mbim_bulk_ndp_reserved2
,
6846 { "Reserved", "mbim.bulk.ndp.reserved",
6847 FT_UINT32
, BASE_HEX
, NULL
, 0,
6850 { &hf_mbim_bulk_ndp_datagram_index
,
6851 { "Datagram Index", "mbim.bulk.ndp.datagram.index",
6852 FT_UINT16
, BASE_DEC
, NULL
, 0,
6855 { &hf_mbim_bulk_ndp_datagram_index_32
,
6856 { "Datagram Index", "mbim.bulk.ndp.datagram.index",
6857 FT_UINT32
, BASE_DEC
, NULL
, 0,
6860 { &hf_mbim_bulk_ndp_datagram_length
,
6861 { "Datagram Length", "mbim.bulk.ndp.datagram.length",
6862 FT_UINT16
, BASE_DEC
, NULL
, 0,
6865 { &hf_mbim_bulk_ndp_datagram_length_32
,
6866 { "Datagram Length", "mbim.bulk.ndp.datagram.length",
6867 FT_UINT32
, BASE_DEC
, NULL
, 0,
6870 { &hf_mbim_bulk_ndp_datagram
,
6871 { "Datagram", "mbim.bulk.ndp.datagram",
6872 FT_BYTES
, BASE_NONE
, NULL
, 0,
6875 { &hf_mbim_bulk_ndp_nb_datagrams
,
6876 { "Number Of Datagrams", "mbim.bulk.ndp.nb_datagrams",
6877 FT_UINT32
, BASE_DEC
, NULL
, 0,
6880 { &hf_mbim_bulk_total_nb_datagrams
,
6881 { "Total Number Of Datagrams", "mbim.bulk.total_nb_datagrams",
6882 FT_UINT32
, BASE_DEC
, NULL
, 0,
6885 { &hf_mbim_fragments
,
6886 { "Fragments", "mbim.control.fragments",
6887 FT_NONE
, BASE_NONE
, NULL
, 0,
6890 { &hf_mbim_fragment
,
6891 { "Fragment", "mbim.control.fragment",
6892 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
6895 { &hf_mbim_fragment_overlap
,
6896 { "Fragment Overlap", "mbim.control.fragment_overlap",
6897 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
6900 { &hf_mbim_fragment_overlap_conflict
,
6901 { "Fragment Overlap Conflict", "mbim.control.fragment_overlap_conflict",
6902 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
6905 { &hf_mbim_fragment_multiple_tails
,
6906 { "Fragment Multiple Tails", "mbim.control.fragment_multiple_tails",
6907 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
6910 { &hf_mbim_fragment_too_long_fragment
,
6911 { "Too Long Fragment", "mbim.control.fragment_too_long_fragment",
6912 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
6915 { &hf_mbim_fragment_error
,
6916 { "Fragment Error", "mbim.control.fragment_error",
6917 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
6920 { &hf_mbim_fragment_count
,
6921 { "Fragment Count", "mbim.control.fragment_count",
6922 FT_UINT32
, BASE_DEC
, NULL
, 0,
6925 { &hf_mbim_reassembled_in
,
6926 { "Reassembled In", "mbim.control.reassembled_in",
6927 FT_FRAMENUM
, BASE_NONE
, NULL
, 0,
6930 { &hf_mbim_reassembled_length
,
6931 { "Reassembled Length", "mbim.control.reassembled_length",
6932 FT_UINT32
, BASE_DEC
, NULL
, 0,
6935 { &hf_mbim_reassembled_data
,
6936 { "Reassembled Data", "mbim.control.reassembled_data",
6937 FT_BYTES
, BASE_NONE
, NULL
, 0,
6942 static gint
*ett
[] = {
6944 &ett_mbim_msg_header
,
6945 &ett_mbim_frag_header
,
6946 &ett_mbim_info_buffer
,
6948 &ett_mbim_pair_list
,
6955 static ei_register_info ei
[] = {
6956 { &ei_mbim_max_ctrl_transfer
,
6957 { "mbim.max_control_transfer_too_small", PI_MALFORMED
, PI_ERROR
,
6958 "Max Control Transfer is less than 64 bytes", EXPFILL
}},
6959 { &ei_mbim_unexpected_msg
,
6960 { "mbim.unexpected_msg", PI_MALFORMED
, PI_ERROR
,
6961 "Unexpected message", EXPFILL
}},
6962 { &ei_mbim_unexpected_info_buffer
,
6963 { "mbim.unexpected_info_buffer", PI_MALFORMED
, PI_WARN
,
6964 "Unexpected Information Buffer", EXPFILL
}},
6965 { &ei_mbim_illegal_on_link_prefix_length
,
6966 { "mbim.illegal_on_link_prefix_length", PI_MALFORMED
, PI_WARN
,
6967 "Illegal On Link Prefix Length", EXPFILL
}},
6968 { &ei_mbim_unknown_sms_format
,
6969 { "mbim.unknown_sms_format", PI_PROTOCOL
, PI_WARN
,
6970 "Unknown SMS format", EXPFILL
}},
6971 { &ei_mbim_unexpected_uuid_value
,
6972 { "mbim.unexpected_uuid_value", PI_PROTOCOL
, PI_WARN
,
6973 "Unexpected UUID value", EXPFILL
}},
6974 { &ei_mbim_too_many_items
,
6975 { "mbim.too_many_items", PI_PROTOCOL
, PI_WARN
,
6976 "Too many items", EXPFILL
}},
6977 { &ei_mbim_alignment_error
,
6978 { "mbim.alignment_error", PI_MALFORMED
, PI_ERROR
,
6979 "Alignment error", EXPFILL
}}
6982 proto_mbim
= proto_register_protocol("Mobile Broadband Interface Model",
6985 proto_register_field_array(proto_mbim
, hf
, array_length(hf
));
6986 proto_register_subtree_array(ett
, array_length(ett
));
6987 expert_mbim
= expert_register_protocol(proto_mbim
);
6988 expert_register_field_array(expert_mbim
, ei
, array_length(ei
));
6990 register_init_routine(mbim_reassembly_init
);
6992 new_register_dissector("mbim.control", dissect_mbim_control
, proto_mbim
);
6993 new_register_dissector("mbim.descriptor", dissect_mbim_descriptor
, proto_mbim
);
6994 new_register_dissector("mbim.bulk", dissect_mbim_bulk
, proto_mbim
);
6996 mbim_module
= prefs_register_protocol(proto_mbim
, proto_reg_handoff_mbim
);
6997 prefs_register_bool_preference(mbim_module
, "bulk_heuristic",
6998 "Try to identify data traffic with heuristic",
6999 "Try to identify MBIM data packets on \"usb.bulk\" using heuristic",
7000 &mbim_bulk_heuristic
);
7001 prefs_register_bool_preference(mbim_module
, "control_decode_unknown_itf",
7002 "Force decoding of unknown USB control data as MBIM",
7003 "Decode control data received on \"usb.control\" with an "
7004 "unknown interface class as MBIM",
7005 &mbim_control_decode_unknown_itf
);
7009 proto_reg_handoff_mbim(void)
7011 static gboolean initialized
= FALSE
;
7012 dissector_handle_t mbim_control_handle
;
7015 proactive_handle
= find_dissector("gsm_sim.bertlv");
7016 etsi_cat_handle
= find_dissector("etsi_cat");
7017 gsm_sms_handle
= find_dissector("gsm_sms_handle");
7018 cdma_sms_handle
= find_dissector("ansi_637_trans");
7019 eth_handle
= find_dissector("eth_withoutfcs");
7020 eth_fcs_handle
= find_dissector("eth_withfcs");
7021 ip_handle
= find_dissector("ip");
7022 data_handle
= find_dissector("data");
7023 heur_dissector_add("usb.bulk", dissect_mbim_bulk_heur
, proto_mbim
);
7026 heur_dissector_set_enabled("usb.bulk", dissect_mbim_bulk_heur
, proto_mbim
, mbim_bulk_heuristic
);
7027 mbim_control_handle
= find_dissector("mbim.control");
7028 if (mbim_control_decode_unknown_itf
) {
7029 dissector_add_uint("usb.control", IF_CLASS_UNKNOWN
, mbim_control_handle
);
7031 dissector_delete_uint("usb.control", IF_CLASS_UNKNOWN
, mbim_control_handle
);
7036 * Editor modelines - http://www.wireshark.org/tools/modelines.html
7041 * indent-tabs-mode: nil
7044 * vi: set shiftwidth=4 tabstop=8 expandtab:
7045 * :indentSize=4:tabSize=8:noTabs=true: