Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-mbim.c
blob64be238c9ac2059cefecdd2d7a992ad9306e2eb5
1 /* packet-mbim.c
2 * Routines for MBIM dissection
3 * Copyright 2013-2016, Pascal Quantin <pascal@wireshark.org>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 /* Dissector based on MBIM specification 1.0 Errata-1 and MBIM extended version 2.0
13 * http://www.usb.org/developers/devclass_docs/MBIM10Errata1_073013.zip
14 * http://compliance.usb.org/mbim/
15 * http://www.usb.org/developers/docs/devclass_docs/MBIMMultiflow10.zip
17 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/host-shutdown-device-service
19 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-provisioned-context-operations
20 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-network-blacklist-operations
21 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations
22 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-multi-sim-operations
23 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-protocol-configuration-options-pco-operations
24 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-modem-reset-operations
26 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-sar-platform-support
28 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-low-level-uicc-access
29 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-uicc-application-and-file-system-access
31 * https://learn.microsoft.com/en-us/windows-hardware/drivers/network/mb-nitz-support
33 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-5g-data-class-support
34 * https://download.microsoft.com/download/8/3/a/83a64106-a1f4-4a03-811f-4dbef2e3bf7a/MBIM extensions for 5G.docx
37 #include "config.h"
39 #include <epan/packet.h>
40 #include <epan/expert.h>
41 #include <epan/asn1.h>
42 #include <epan/prefs.h>
43 #include <epan/reassemble.h>
44 #include <epan/to_str.h>
45 #include <epan/strutil.h>
46 #include <epan/ipproto.h>
47 #include <epan/conversation.h>
48 #include <epan/tfs.h>
49 #include <epan/unit_strings.h>
50 #include <wiretap/wtap.h>
52 #include "packet-gsm_a_common.h"
53 #include "packet-gsm_map.h"
54 #include "packet-usb.h"
55 #include "packet-mbim.h"
57 void proto_register_mbim(void);
58 void proto_reg_handoff_mbim(void);
60 /* Initialize the protocol and registered fields */
61 static int proto_mbim;
62 static int hf_mbim_control;
63 static int hf_mbim_header_message_type;
64 static int hf_mbim_header_message_length;
65 static int hf_mbim_header_transaction_id;
66 static int hf_mbim_fragment_total;
67 static int hf_mbim_fragment_current;
68 static int hf_mbim_max_ctrl_transfer;
69 static int hf_mbim_device_service_id;
70 static int hf_mbim_uuid_basic_connect_cid;
71 static int hf_mbim_uuid_sms_cid;
72 static int hf_mbim_uuid_ussd_cid;
73 static int hf_mbim_uuid_phonebook_cid;
74 static int hf_mbim_uuid_stk_cid;
75 static int hf_mbim_uuid_auth_cid;
76 static int hf_mbim_uuid_dss_cid;
77 static int hf_mbim_uuid_multicarrier_cid;
78 static int hf_mbim_uuid_ms_hostshutdown_cid;
79 static int hf_mbim_uuid_msfwid_cid;
80 static int hf_mbim_uuid_qmi_cid;
81 static int hf_mbim_uuid_intel_fwusvc_cid;
82 static int hf_mbim_uuid_intel_dptf_cid;
83 static int hf_mbim_uuid_intel_sar_cid;
84 static int hf_mbim_uuid_intel_act_cid;
85 static int hf_mbim_uuid_intel_trcsvc_cid;
86 static int hf_mbim_uuid_intel_nrtc_cid;
87 static int hf_mbim_uuid_intel_usb_profile_cid;
88 static int hf_mbim_uuid_intel_ciq_cid;
89 static int hf_mbim_uuid_atds_cid;
90 static int hf_mbim_uuid_multiflow_cid;
91 static int hf_mbim_uuid_basic_connect_extensions_cid;
92 static int hf_mbim_uuid_ms_sarcontrol_cid;
93 static int hf_mbim_uuid_ms_uicc_low_level_cid;
94 static int hf_mbim_uuid_ms_voice_extensions_cid;
95 static int hf_mbim_cid;
96 static int hf_mbim_command_type;
97 static int hf_mbim_info_buffer_len;
98 static int hf_mbim_info_buffer;
99 static int hf_mbim_error_status_code;
100 static int hf_mbim_status;
101 static int hf_mbim_tlv_ie_type;
102 static int hf_mbim_tlv_ie_reserved;
103 static int hf_mbim_tlv_ie_padding_length;
104 static int hf_mbim_tlv_ie_data_length;
105 static int hf_mbim_tlv_ie_unnamed_data;
106 static int hf_mbim_tlv_ie_data_wchar_str;
107 static int hf_mbim_tlv_ie_data_int32;
108 static int hf_mbim_tlv_ie_data_guid;
109 static int hf_mbim_tlv_ie_padding;
110 static int hf_mbim_ms_ursp_tc_length;
111 static int hf_mbim_ms_ursp_precedence;
112 static int hf_mbim_ms_ursp_tc_type;
113 static int hf_mbim_ms_ursp_tc_os_id;
114 static int hf_mbim_ms_ursp_tc_dnn;
115 static int hf_mbim_ms_ursp_tc_fqdn;
116 static int hf_mbim_ms_ursp_tc_ipv4;
117 static int hf_mbim_ms_ursp_tc_ipv4_mask;
118 static int hf_mbim_ms_ursp_tc_ipv6;
119 static int hf_mbim_ms_ursp_tc_ipv6_prefix_length;
120 static int hf_mbim_ms_ursp_tc_proto_id;
121 static int hf_mbim_ms_ursp_tc_port;
122 static int hf_mbim_ms_ursp_tc_port_range_low;
123 static int hf_mbim_ms_ursp_tc_port_range_high;
124 static int hf_mbim_ms_ursp_tc_app_id;
125 static int hf_mbim_ms_ursp_tc_byte_value;
126 static int hf_mbim_ms_ursp_tc_capability;
127 static int hf_mbim_ms_ursp_tc_connection_capability_flag_ims;
128 static int hf_mbim_ms_ursp_tc_connection_capability_flag_mms;
129 static int hf_mbim_ms_ursp_tc_connection_capability_flag_supl;
130 static int hf_mbim_ms_ursp_tc_connection_capability_flag_internet;
131 static int hf_mbim_ms_snssai_length;
132 static int hf_mbim_ms_snssai_slice_service_type;
133 static int hf_mbim_ms_snssai_slice_differentiator;
134 static int hf_mbim_ms_snssai_mapped_slice_service_type;
135 static int hf_mbim_ms_snssai_mapped_slice_differentiator;
136 static int hf_mbim_ms_rej_snssai_cause;
137 static int hf_mbim_ms_pre_dflt_nssai_info_access_type;
138 static int hf_mbim_device_caps_info_device_type;
139 static int hf_mbim_device_caps_info_cellular_class;
140 static int hf_mbim_cellular_class_gsm;
141 static int hf_mbim_cellular_class_cdma;
142 static int hf_mbim_device_caps_info_voice_class;
143 static int hf_mbim_device_caps_info_sim_class;
144 static int hf_mbim_device_caps_info_sim_class_logical;
145 static int hf_mbim_device_caps_info_sim_class_removable;
146 static int hf_mbim_device_caps_info_data_class;
147 static int hf_mbim_data_class_gprs;
148 static int hf_mbim_data_class_edge;
149 static int hf_mbim_data_class_umts;
150 static int hf_mbim_data_class_hsdpa;
151 static int hf_mbim_data_class_hsupa;
152 static int hf_mbim_data_class_lte;
153 static int hf_mbim_data_class_5g;
154 static int hf_mbim_data_class_reserved_gsm;
155 static int hf_mbim_data_class_1xrtt;
156 static int hf_mbim_data_class_1xevdo;
157 static int hf_mbim_data_class_1xevdoreva;
158 static int hf_mbim_data_class_1xevdv;
159 static int hf_mbim_data_class_3xrtt;
160 static int hf_mbim_data_class_1xevdorevb;
161 static int hf_mbim_data_class_umb;
162 static int hf_mbim_data_class_reserved_cdma;
163 static int hf_mbim_data_class_custom;
164 static int hf_mbim_device_caps_info_sms_caps;
165 static int hf_mbim_device_caps_info_sms_caps_pdu_receive;
166 static int hf_mbim_device_caps_info_sms_caps_pdu_send;
167 static int hf_mbim_device_caps_info_sms_caps_text_receive;
168 static int hf_mbim_device_caps_info_sms_caps_text_send;
169 static int hf_mbim_device_caps_info_control_caps;
170 static int hf_mbim_device_caps_info_control_caps_reg_manual;
171 static int hf_mbim_device_caps_info_control_caps_hw_radio_switch;
172 static int hf_mbim_device_caps_info_control_caps_cdma_mobile_ip;
173 static int hf_mbim_device_caps_info_control_caps_cdma_simple_ip;
174 static int hf_mbim_device_caps_info_control_caps_multi_carrier;
175 static int hf_mbim_device_caps_info_control_caps_esim;
176 static int hf_mbim_device_caps_info_control_caps_ue_policy_route_selection;
177 static int hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable;
178 static int hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable;
179 static int hf_mbim_device_caps_info_data_subclass;
180 static int hf_mbim_data_subclass_5gendc;
181 static int hf_mbim_data_subclass_5gnr;
182 static int hf_mbim_data_subclass_5gnedc;
183 static int hf_mbim_data_subclass_5gelte;
184 static int hf_mbim_data_subclass_5gngendc;
185 static int hf_mbim_device_caps_info_max_sessions;
186 static int hf_mbim_device_caps_info_wcdma_band_class;
187 static int hf_mbim_device_caps_info_custom_data_class_offset;
188 static int hf_mbim_device_caps_info_custom_data_class_size;
189 static int hf_mbim_device_caps_info_device_id_offset;
190 static int hf_mbim_device_caps_info_device_id_size;
191 static int hf_mbim_device_caps_info_fw_info_offset;
192 static int hf_mbim_device_caps_info_fw_info_size;
193 static int hf_mbim_device_caps_info_hw_info_offset;
194 static int hf_mbim_device_caps_info_hw_info_size;
195 static int hf_mbim_device_caps_info_custom_data_class;
196 static int hf_mbim_device_caps_info_device_id;
197 static int hf_mbim_device_caps_info_fw_info;
198 static int hf_mbim_device_caps_info_hw_info;
199 static int hf_mbim_device_caps_info_v2_executor_index;
200 static int hf_mbim_subscr_ready_status_ready_state;
201 static int hf_mbim_subscr_ready_status_flags;
202 static int hf_mbim_subscr_ready_status_flag_esim;
203 static int hf_mbim_subscr_ready_status_flag_sim_removability_known;
204 static int hf_mbim_subscr_ready_status_flag_sim_removable;
205 static int hf_mbim_subscr_ready_status_flag_sim_slot_active;
206 static int hf_mbim_subscr_ready_status_susbcr_id_offset;
207 static int hf_mbim_subscr_ready_status_susbcr_id_size;
208 static int hf_mbim_subscr_ready_status_sim_icc_id_offset;
209 static int hf_mbim_subscr_ready_status_sim_icc_id_size;
210 static int hf_mbim_subscr_ready_status_ready_info;
211 static int hf_mbim_subscr_ready_status_elem_count;
212 static int hf_mbim_subscr_ready_status_tel_nb_offset;
213 static int hf_mbim_subscr_ready_status_tel_nb_size;
214 static int hf_mbim_subscr_ready_status_susbcr_id;
215 static int hf_mbim_subscr_ready_status_sim_icc_id;
216 static int hf_mbim_subscr_ready_status_tel_nb;
217 static int hf_mbim_radio_state_set;
218 static int hf_mbim_radio_state_hw_radio_state;
219 static int hf_mbim_radio_state_sw_radio_state;
220 static int hf_mbim_set_pin_pin_type;
221 static int hf_mbim_set_pin_pin_pin_operation;
222 static int hf_mbim_set_pin_pin_pin_offset;
223 static int hf_mbim_set_pin_pin_pin_size;
224 static int hf_mbim_set_pin_new_pin_offset;
225 static int hf_mbim_set_pin_new_pin_size;
226 static int hf_mbim_set_pin_pin;
227 static int hf_mbim_set_pin_new_pin;
228 static int hf_mbim_pin_info_pin_type;
229 static int hf_mbim_pin_info_pin_state;
230 static int hf_mbim_pin_info_remaining_attempts;
231 static int hf_mbim_pin_list_pin_mode;
232 static int hf_mbim_pin_list_pin_format;
233 static int hf_mbim_pin_list_pin_length_min;
234 static int hf_mbim_pin_list_pin_length_max;
235 static int hf_mbim_provider_state;
236 static int hf_mbim_provider_state_home;
237 static int hf_mbim_provider_state_forbidden;
238 static int hf_mbim_provider_state_preferred;
239 static int hf_mbim_provider_state_visible;
240 static int hf_mbim_provider_state_registered;
241 static int hf_mbim_provider_state_preferred_multicarrier;
242 static int hf_mbim_provider_provider_id_offset;
243 static int hf_mbim_provider_provider_id_size;
244 static int hf_mbim_provider_provider_name_offset;
245 static int hf_mbim_provider_provider_name_size;
246 static int hf_mbim_provider_cellular_class;
247 static int hf_mbim_provider_rssi;
248 static int hf_mbim_provider_error_rate;
249 static int hf_mbim_provider_provider_id;
250 static int hf_mbim_provider_provider_name;
251 static int hf_mbim_providers_elem_count;
252 static int hf_mbim_providers_provider_offset;
253 static int hf_mbim_providers_provider_size;
254 static int hf_mbim_visible_providers_req_action;
255 static int hf_mbim_set_register_state_provider_id_offset;
256 static int hf_mbim_set_register_state_provider_id_size;
257 static int hf_mbim_set_register_state_register_action;
258 static int hf_mbim_register_state_data_class;
259 static int hf_mbim_set_register_state_provider_id;
260 static int hf_mbim_registration_state_info_nw_error;
261 static int hf_mbim_registration_state_info_register_state;
262 static int hf_mbim_registration_state_info_register_mode;
263 static int hf_mbim_registration_state_info_available_data_classes;
264 static int hf_mbim_registration_state_info_current_cellular_class;
265 static int hf_mbim_registration_state_info_provider_id_offset;
266 static int hf_mbim_registration_state_info_provider_id_size;
267 static int hf_mbim_registration_state_info_provider_name_offset;
268 static int hf_mbim_registration_state_info_provider_name_size;
269 static int hf_mbim_registration_state_info_roaming_text_offset;
270 static int hf_mbim_registration_state_info_roaming_text_size;
271 static int hf_mbim_registration_state_info_registration_flags;
272 static int hf_mbim_registration_state_info_registration_flags_manual_selection_not_available;
273 static int hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach;
274 static int hf_mbim_registration_state_info_preferred_data_class;
275 static int hf_mbim_registration_state_info_provider_id;
276 static int hf_mbim_registration_state_info_provider_name;
277 static int hf_mbim_registration_state_info_roaming_text;
278 static int hf_mbim_set_packet_service_action;
279 static int hf_mbim_ms_plmn_mcc;
280 static int hf_mbim_ms_plmn_mnc;
281 static int hf_mbim_ms_tai_tac;
282 static int hf_mbim_ms_tai_list_type;
283 static int hf_mbim_ms_tai_list_single_plmn_tac_element;
284 static int hf_mbim_ms_tai_list_multi_plmn_tai_element;
285 static int hf_mbim_packet_service_info_nw_error;
286 static int hf_mbim_packet_service_info_packet_service_state;
287 static int hf_mbim_packet_service_info_highest_available_data_class;
288 static int hf_mbim_packet_service_info_current_data_class;
289 static int hf_mbim_packet_service_info_uplink_speed;
290 static int hf_mbim_packet_service_info_downlink_speed;
291 static int hf_mbim_packet_service_info_frequency_range;
292 static int hf_mbim_packet_service_info_data_subclass;
293 static int hf_mbim_set_signal_state_signal_strength_interval;
294 static int hf_mbim_set_signal_state_rssi_threshold;
295 static int hf_mbim_set_signal_state_error_rate_threshold;
296 static int hf_mbim_signal_state_element_rsrp;
297 static int hf_mbim_signal_state_element_snr;
298 static int hf_mbim_signal_state_element_rsrp_threshold;
299 static int hf_mbim_signal_state_element_snr_threshold;
300 static int hf_mbim_signal_state_element_system_type;
301 static int hf_mbim_signal_state_info_rssi;
302 static int hf_mbim_signal_state_info_error_rate;
303 static int hf_mbim_signal_state_info_signal_strength_interval;
304 static int hf_mbim_signal_state_info_rssi_threshold;
305 static int hf_mbim_signal_state_info_error_rate_threshold;
306 static int hf_mbim_signal_state_info_rsrp_snr_offset;
307 static int hf_mbim_signal_state_info_rsrp_snr_size;
308 static int hf_mbim_signal_state_info_elem_count;
309 static int hf_mbim_context_type;
310 static int hf_mbim_set_connect_session_id;
311 static int hf_mbim_set_connect_activation_command;
312 static int hf_mbim_set_connect_activation_option;
313 static int hf_mbim_set_connect_access_string_offset;
314 static int hf_mbim_set_connect_access_string_size;
315 static int hf_mbim_set_connect_user_name_offset;
316 static int hf_mbim_set_connect_user_name_size;
317 static int hf_mbim_set_connect_password_offset;
318 static int hf_mbim_set_connect_password_size;
319 static int hf_mbim_set_connect_compression;
320 static int hf_mbim_set_connect_auth_protocol;
321 static int hf_mbim_set_connect_ip_type;
322 static int hf_mbim_set_connect_access_string;
323 static int hf_mbim_set_connect_user_name;
324 static int hf_mbim_set_connect_password;
325 static int hf_mbim_set_connect_media_preference;
326 static int hf_mbim_connect_info_session_id;
327 static int hf_mbim_connect_info_activation_state;
328 static int hf_mbim_connect_info_voice_call_state;
329 static int hf_mbim_connect_info_ip_type;
330 static int hf_mbim_connect_info_nw_error;
331 static int hf_mbim_connect_info_access_media;
332 static int hf_mbim_context_context_id;
333 static int hf_mbim_context_access_string_offset;
334 static int hf_mbim_context_access_string_size;
335 static int hf_mbim_context_user_name_offset;
336 static int hf_mbim_context_user_name_size;
337 static int hf_mbim_context_password_offset;
338 static int hf_mbim_context_password_size;
339 static int hf_mbim_context_compression;
340 static int hf_mbim_context_auth_protocol;
341 static int hf_mbim_context_provider_id_offset;
342 static int hf_mbim_context_provider_id_size;
343 static int hf_mbim_context_provider_id;
344 static int hf_mbim_context_access_string;
345 static int hf_mbim_context_user_name;
346 static int hf_mbim_context_password;
347 static int hf_mbim_provisioned_contexts_info_elem_count;
348 static int hf_mbim_provisioned_contexts_info_provisioned_context_offset;
349 static int hf_mbim_provisioned_contexts_info_provisioned_context_size;
350 static int hf_mbim_set_service_activation_data_buffer;
351 static int hf_mbim_service_activation_info_nw_error;
352 static int hf_mbim_service_activation_info_data_buffer;
353 static int hf_mbim_ipv4_element_on_link_prefix_length;
354 static int hf_mbim_ipv4_element_ipv4_address;
355 static int hf_mbim_ipv6_element_on_link_prefix_length;
356 static int hf_mbim_ipv6_element_ipv6_address;
357 static int hf_mbim_ip_configuration_info_session_id;
358 static int hf_mbim_ip_configuration_info_ipv4_configuration_available;
359 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_address;
360 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway;
361 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_dns;
362 static int hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu;
363 static int hf_mbim_ip_configuration_info_ipv6_configuration_available;
364 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_address;
365 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway;
366 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_dns;
367 static int hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu;
368 static int hf_mbim_ip_configuration_info_ipv4_address_count;
369 static int hf_mbim_ip_configuration_info_ipv4_address_offset;
370 static int hf_mbim_ip_configuration_info_ipv6_address_count;
371 static int hf_mbim_ip_configuration_info_ipv6_address_offset;
372 static int hf_mbim_ip_configuration_info_ipv4_gateway_offset;
373 static int hf_mbim_ip_configuration_info_ipv6_gateway_offset;
374 static int hf_mbim_ip_configuration_info_ipv4_dns_count;
375 static int hf_mbim_ip_configuration_info_ipv4_dns_offset;
376 static int hf_mbim_ip_configuration_info_ipv6_dns_count;
377 static int hf_mbim_ip_configuration_info_ipv6_dns_offset;
378 static int hf_mbim_ip_configuration_info_ipv4_mtu;
379 static int hf_mbim_ip_configuration_info_ipv6_mtu;
380 static int hf_mbim_ip_configuration_info_ipv4_gateway;
381 static int hf_mbim_ip_configuration_info_ipv6_gateway;
382 static int hf_mbim_ip_configuration_info_ipv4_dns;
383 static int hf_mbim_ip_configuration_info_ipv6_dns;
384 static int hf_mbim_device_service_element_device_service_id;
385 static int hf_mbim_device_service_element_dss_payload;
386 static int hf_mbim_device_service_element_dss_payload_host_device;
387 static int hf_mbim_device_service_element_dss_payload_device_host;
388 static int hf_mbim_device_service_element_max_dss_instances;
389 static int hf_mbim_device_service_element_cid_count;
390 static int hf_mbim_device_service_element_cid;
391 static int hf_mbim_device_services_info_device_services_count;
392 static int hf_mbim_device_services_info_max_dss_sessions;
393 static int hf_mbim_device_services_info_device_services_offset;
394 static int hf_mbim_device_services_info_device_services_size;
395 static int hf_mbim_event_entry_device_service_id;
396 static int hf_mbim_event_entry_cid_count;
397 static int hf_mbim_event_entry_cid;
398 static int hf_mbim_device_service_subscribe_element_count;
399 static int hf_mbim_device_service_subscribe_device_service_offset;
400 static int hf_mbim_device_service_subscribe_device_service_size;
401 static int hf_mbim_packet_statistics_info_in_discards;
402 static int hf_mbim_packet_statistics_info_in_errors;
403 static int hf_mbim_packet_statistics_info_in_octets;
404 static int hf_mbim_packet_statistics_info_in_packets;
405 static int hf_mbim_packet_statistics_info_out_octets;
406 static int hf_mbim_packet_statistics_info_out_packets;
407 static int hf_mbim_packet_statistics_info_out_errors;
408 static int hf_mbim_packet_statistics_info_out_discards;
409 static int hf_mbim_network_idle_hint_state;
410 static int hf_mbim_emergency_mode_info_emergency_mode;
411 static int hf_mbim_single_packet_filter_filter_size;
412 static int hf_mbim_single_packet_filter_packet_filter_offset;
413 static int hf_mbim_single_packet_filter_packet_mask_offset;
414 static int hf_mbim_single_packet_filter_filter_id;
415 static int hf_mbim_single_packet_filter_packet_filter;
416 static int hf_mbim_single_packet_filter_packet_mask;
417 static int hf_mbim_packet_filters_session_id;
418 static int hf_mbim_packet_filters_packet_filters_count;
419 static int hf_mbim_packet_filters_packet_filters_packet_filter_offset;
420 static int hf_mbim_packet_filters_packet_filters_packet_filter_size;
421 static int hf_mbim_set_sms_configuration_format;
422 static int hf_mbim_set_sms_configuration_sc_address_offset;
423 static int hf_mbim_set_sms_configuration_sc_address_size;
424 static int hf_mbim_set_sms_configuration_sc_address;
425 static int hf_mbim_sms_configuration_info_sms_storage_state;
426 static int hf_mbim_sms_configuration_info_format;
427 static int hf_mbim_sms_configuration_info_max_messages;
428 static int hf_mbim_sms_configuration_info_cdma_short_message_size;
429 static int hf_mbim_sms_configuration_info_sc_address_offset;
430 static int hf_mbim_sms_configuration_info_sc_address_size;
431 static int hf_mbim_sms_configuration_info_sc_address;
432 static int hf_mbim_sms_pdu_record_message_index;
433 static int hf_mbim_sms_pdu_record_message_status;
434 static int hf_mbim_sms_pdu_record_pdu_data_offset;
435 static int hf_mbim_sms_pdu_record_pdu_data_size;
436 static int hf_mbim_sms_pdu_record_pdu_data;
437 static int hf_mbim_sms_pdu_record_pdu_data_sc_address_size;
438 static int hf_mbim_sms_cdma_record_message_index;
439 static int hf_mbim_sms_cdma_record_message_status;
440 static int hf_mbim_sms_cdma_record_address_offset;
441 static int hf_mbim_sms_cdma_record_address_size;
442 static int hf_mbim_sms_cdma_record_timestamp_offset;
443 static int hf_mbim_sms_cdma_record_timestamp_size;
444 static int hf_mbim_sms_cdma_record_encoding_id;
445 static int hf_mbim_sms_cdma_record_language_id;
446 static int hf_mbim_sms_cdma_record_encoded_message_offset;
447 static int hf_mbim_sms_cdma_record_size_in_bytes;
448 static int hf_mbim_sms_cdma_record_size_in_characters;
449 static int hf_mbim_sms_cdma_record_address;
450 static int hf_mbim_sms_cdma_record_timestamp;
451 static int hf_mbim_sms_cdma_record_encoded_message;
452 static int hf_mbim_sms_cdma_record_encoded_message_text;
453 static int hf_mbim_sms_read_req_format;
454 static int hf_mbim_sms_read_req_flag;
455 static int hf_mbim_sms_read_req_message_index;
456 static int hf_mbim_sms_read_info_format;
457 static int hf_mbim_sms_read_info_element_count;
458 static int hf_mbim_sms_read_info_sms_offset;
459 static int hf_mbim_sms_read_info_sms_size;
460 static int hf_mbim_sms_send_pdu_pdu_data_offset;
461 static int hf_mbim_sms_send_pdu_pdu_data_size;
462 static int hf_mbim_sms_send_pdu_pdu_data;
463 static int hf_mbim_sms_send_pdu_pdu_data_sc_address_size;
464 static int hf_mbim_sms_send_cdma_encoding_id;
465 static int hf_mbim_sms_send_cdma_language_id;
466 static int hf_mbim_sms_send_cdma_address_offset;
467 static int hf_mbim_sms_send_cdma_address_size;
468 static int hf_mbim_sms_send_cdma_encoded_message_offset;
469 static int hf_mbim_sms_send_cdma_size_in_bytes;
470 static int hf_mbim_sms_send_cdma_size_in_characters;
471 static int hf_mbim_sms_send_cdma_address;
472 static int hf_mbim_sms_send_cdma_encoded_message;
473 static int hf_mbim_sms_send_cdma_encoded_message_text;
474 static int hf_mbim_set_sms_send_format;
475 static int hf_mbim_sms_send_info_message_reference;
476 static int hf_mbim_set_sms_delete_flag;
477 static int hf_mbim_set_sms_delete_message_index;
478 static int hf_mbim_sms_status_info_flags;
479 static int hf_mbim_sms_status_info_flags_message_store_full;
480 static int hf_mbim_sms_status_info_flags_new_message;
481 static int hf_mbim_sms_status_info_message_index;
482 static int hf_mbim_set_ussd_ussd_action;
483 static int hf_mbim_set_ussd_ussd_data_coding_scheme;
484 static int hf_mbim_set_ussd_ussd_payload_offset;
485 static int hf_mbim_set_ussd_ussd_payload_length;
486 static int hf_mbim_set_ussd_ussd_payload;
487 static int hf_mbim_set_ussd_ussd_payload_text;
488 static int hf_mbim_ussd_info_ussd_response;
489 static int hf_mbim_ussd_info_ussd_session_state;
490 static int hf_mbim_ussd_info_ussd_data_coding_scheme;
491 static int hf_mbim_ussd_info_ussd_payload_offset;
492 static int hf_mbim_ussd_info_ussd_payload_length;
493 static int hf_mbim_ussd_info_ussd_payload;
494 static int hf_mbim_ussd_info_ussd_payload_text;
495 static int hf_mbim_phonebook_configuration_info_phonebook_state;
496 static int hf_mbim_phonebook_configuration_info_total_nb_of_entries;
497 static int hf_mbim_phonebook_configuration_info_used_entries;
498 static int hf_mbim_phonebook_configuration_info_max_number_length;
499 static int hf_mbim_phonebook_configuration_info_max_name_length;
500 static int hf_mbim_phonebook_entry_entry_index;
501 static int hf_mbim_phonebook_entry_number_offset;
502 static int hf_mbim_phonebook_entry_number_length;
503 static int hf_mbim_phonebook_entry_name_offset;
504 static int hf_mbim_phonebook_entry_name_length;
505 static int hf_mbim_phonebook_entry_number;
506 static int hf_mbim_phonebook_entry_name;
507 static int hf_mbim_phonebook_read_req_filter_flag;
508 static int hf_mbim_phonebook_read_req_filter_message_index;
509 static int hf_mbim_phonebook_read_info_element_count;
510 static int hf_mbim_phonebook_read_info_phonebook_offset;
511 static int hf_mbim_phonebook_read_info_phonebook_size;
512 static int hf_mbim_set_phonebook_delete_filter_flag;
513 static int hf_mbim_set_phonebook_delete_filter_message_index;
514 static int hf_mbim_set_phonebook_write_save_flag;
515 static int hf_mbim_set_phonebook_write_save_index;
516 static int hf_mbim_set_phonebook_write_number_offset;
517 static int hf_mbim_set_phonebook_write_number_length;
518 static int hf_mbim_set_phonebook_write_name_offset;
519 static int hf_mbim_set_phonebook_write_name_length;
520 static int hf_mbim_set_phonebook_write_number;
521 static int hf_mbim_set_phonebook_write_name;
522 static int hf_mbim_set_stk_pac_pac_host_control;
523 static int hf_mbim_set_stk_pac_pac_host_control_refresh;
524 static int hf_mbim_set_stk_pac_pac_host_control_more_time;
525 static int hf_mbim_set_stk_pac_pac_host_control_poll_interval;
526 static int hf_mbim_set_stk_pac_pac_host_control_polling_off;
527 static int hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list;
528 static int hf_mbim_set_stk_pac_pac_host_control_set_up_call;
529 static int hf_mbim_set_stk_pac_pac_host_control_send_ss;
530 static int hf_mbim_set_stk_pac_pac_host_control_send_ussd;
531 static int hf_mbim_set_stk_pac_pac_host_control_send_short_msg;
532 static int hf_mbim_set_stk_pac_pac_host_control_send_dtmf;
533 static int hf_mbim_set_stk_pac_pac_host_control_launch_browser;
534 static int hf_mbim_set_stk_pac_pac_host_control_geo_loc_req;
535 static int hf_mbim_set_stk_pac_pac_host_control_play_tone;
536 static int hf_mbim_set_stk_pac_pac_host_control_display_text;
537 static int hf_mbim_set_stk_pac_pac_host_control_get_inkey;
538 static int hf_mbim_set_stk_pac_pac_host_control_get_input;
539 static int hf_mbim_set_stk_pac_pac_host_control_select_item;
540 static int hf_mbim_set_stk_pac_pac_host_control_set_up_menu;
541 static int hf_mbim_set_stk_pac_pac_host_control_prov_local_info;
542 static int hf_mbim_set_stk_pac_pac_host_control_timer_management;
543 static int hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text;
544 static int hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu;
545 static int hf_mbim_set_stk_pac_pac_host_control_power_on_card;
546 static int hf_mbim_set_stk_pac_pac_host_control_power_off_card;
547 static int hf_mbim_set_stk_pac_pac_host_control_get_reader_status;
548 static int hf_mbim_set_stk_pac_pac_host_control_run_at_cmd;
549 static int hf_mbim_set_stk_pac_pac_host_control_lang_notif;
550 static int hf_mbim_set_stk_pac_pac_host_control_open_channel;
551 static int hf_mbim_set_stk_pac_pac_host_control_close_channel;
552 static int hf_mbim_set_stk_pac_pac_host_control_receive_data;
553 static int hf_mbim_set_stk_pac_pac_host_control_send_data;
554 static int hf_mbim_set_stk_pac_pac_host_control_get_channel_status;
555 static int hf_mbim_set_stk_pac_pac_host_control_service_search;
556 static int hf_mbim_set_stk_pac_pac_host_control_get_service_info;
557 static int hf_mbim_set_stk_pac_pac_host_control_declare_service;
558 static int hf_mbim_set_stk_pac_pac_host_control_set_frames;
559 static int hf_mbim_set_stk_pac_pac_host_control_get_frames_status;
560 static int hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg;
561 static int hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg;
562 static int hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg;
563 static int hf_mbim_set_stk_pac_pac_host_control_activate;
564 static int hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed;
565 static int hf_mbim_set_stk_pac_pac_host_control_cmd_container;
566 static int hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl;
567 static int hf_mbim_set_stk_pac_pac_host_control_end_proact_session;
568 static int hf_mbim_stk_pac_info_pac_support;
569 static int hf_mbim_stk_pac_info_pac_support_refresh;
570 static int hf_mbim_stk_pac_info_pac_support_more_time;
571 static int hf_mbim_stk_pac_info_pac_support_poll_interval;
572 static int hf_mbim_stk_pac_info_pac_support_polling_off;
573 static int hf_mbim_stk_pac_info_pac_support_set_up_evt_list;
574 static int hf_mbim_stk_pac_info_pac_support_set_up_call;
575 static int hf_mbim_stk_pac_info_pac_support_send_ss;
576 static int hf_mbim_stk_pac_info_pac_support_send_ussd;
577 static int hf_mbim_stk_pac_info_pac_support_send_short_msg;
578 static int hf_mbim_stk_pac_info_pac_support_send_dtmf;
579 static int hf_mbim_stk_pac_info_pac_support_launch_browser;
580 static int hf_mbim_stk_pac_info_pac_support_geo_loc_req;
581 static int hf_mbim_stk_pac_info_pac_support_play_tone;
582 static int hf_mbim_stk_pac_info_pac_support_display_text;
583 static int hf_mbim_stk_pac_info_pac_support_get_inkey;
584 static int hf_mbim_stk_pac_info_pac_support_get_input;
585 static int hf_mbim_stk_pac_info_pac_support_select_item;
586 static int hf_mbim_stk_pac_info_pac_support_set_up_menu;
587 static int hf_mbim_stk_pac_info_pac_support_prov_local_info;
588 static int hf_mbim_stk_pac_info_pac_support_timer_management;
589 static int hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text;
590 static int hf_mbim_stk_pac_info_pac_support_perform_card_apdu;
591 static int hf_mbim_stk_pac_info_pac_support_power_on_card;
592 static int hf_mbim_stk_pac_info_pac_support_power_off_card;
593 static int hf_mbim_stk_pac_info_pac_support_get_reader_status;
594 static int hf_mbim_stk_pac_info_pac_support_run_at_cmd;
595 static int hf_mbim_stk_pac_info_pac_support_lang_notif;
596 static int hf_mbim_stk_pac_info_pac_support_open_channel;
597 static int hf_mbim_stk_pac_info_pac_support_close_channel;
598 static int hf_mbim_stk_pac_info_pac_support_receive_data;
599 static int hf_mbim_stk_pac_info_pac_support_send_data;
600 static int hf_mbim_stk_pac_info_pac_support_get_channel_status;
601 static int hf_mbim_stk_pac_info_pac_support_service_search;
602 static int hf_mbim_stk_pac_info_pac_support_get_service_info;
603 static int hf_mbim_stk_pac_info_pac_support_declare_service;
604 static int hf_mbim_stk_pac_info_pac_support_set_frames;
605 static int hf_mbim_stk_pac_info_pac_support_get_frames_status;
606 static int hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg;
607 static int hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg;
608 static int hf_mbim_stk_pac_info_pac_support_display_multimedia_msg;
609 static int hf_mbim_stk_pac_info_pac_support_activate;
610 static int hf_mbim_stk_pac_info_pac_support_contactless_state_changed;
611 static int hf_mbim_stk_pac_info_pac_support_cmd_container;
612 static int hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl;
613 static int hf_mbim_stk_pac_info_pac_support_end_proact_session;
614 static int hf_mbim_stk_pac_pac_type;
615 static int hf_mbim_stk_pac_pac;
616 static int hf_mbim_set_stk_terminal_response_response_length;
617 static int hf_mbim_set_stk_terminal_response_data_buffer;
618 static int hf_mbim_stk_terminal_response_info_result_data_string_offset;
619 static int hf_mbim_stk_terminal_response_info_result_data_string_length;
620 static int hf_mbim_stk_terminal_response_info_status_word;
621 static int hf_mbim_stk_terminal_response_info_result_data_string;
622 static int hf_mbim_set_stk_envelope_data_buffer;
623 static int hf_mbim_stk_envelope_info_envelope_support;
624 static int hf_mbim_aka_auth_req_rand;
625 static int hf_mbim_aka_auth_req_autn;
626 static int hf_mbim_aka_auth_info_res;
627 static int hf_mbim_aka_auth_info_res_length;
628 static int hf_mbim_aka_auth_info_ik;
629 static int hf_mbim_aka_auth_info_ck;
630 static int hf_mbim_aka_auth_info_auts;
631 static int hf_mbim_akap_auth_req_rand;
632 static int hf_mbim_akap_auth_req_autn;
633 static int hf_mbim_akap_auth_req_network_name_offset;
634 static int hf_mbim_akap_auth_req_network_name_length;
635 static int hf_mbim_akap_auth_req_network_name;
636 static int hf_mbim_akap_auth_info_res;
637 static int hf_mbim_akap_auth_info_res_length;
638 static int hf_mbim_akap_auth_info_ik;
639 static int hf_mbim_akap_auth_info_ck;
640 static int hf_mbim_akap_auth_info_auts;
641 static int hf_mbim_sim_auth_req_rand1;
642 static int hf_mbim_sim_auth_req_rand2;
643 static int hf_mbim_sim_auth_req_rand3;
644 static int hf_mbim_sim_auth_req_n;
645 static int hf_mbim_sim_auth_info_sres1;
646 static int hf_mbim_sim_auth_info_kc1;
647 static int hf_mbim_sim_auth_info_sres2;
648 static int hf_mbim_sim_auth_info_kc2;
649 static int hf_mbim_sim_auth_info_sres3;
650 static int hf_mbim_sim_auth_info_kc3;
651 static int hf_mbim_sim_auth_info_n;
652 static int hf_mbim_set_dss_connect_device_service_id;
653 static int hf_mbim_set_dss_connect_dss_session_id;
654 static int hf_mbim_set_dss_connect_dss_link_state;
655 static int hf_mbim_multicarrier_capabilities_info_capabilities;
656 static int hf_mbim_multicarrier_capabilities_info_capabilities_static_scan;
657 static int hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot;
658 static int hf_mbim_location_info_country;
659 static int hf_mbim_multicarrier_current_cid_list_req_uuid;
660 static int hf_mbim_multicarrier_current_cid_list_info_cid_count;
661 static int hf_mbim_multicarrier_current_cid_list_info_cid;
662 static int hf_mbim_msfwid_firmwareid_info_firmware_id;
663 static int hf_mbim_qmi_buffer;
664 static int hf_mbim_thermal_config_enable;
665 static int hf_mbim_thermal_config_temp_sensor_id;
666 static int hf_mbim_thermal_config_alarm_id;
667 static int hf_mbim_thermal_config_threshold_value;
668 static int hf_mbim_thermal_config_hyst_value;
669 static int hf_mbim_thermal_config_sampling_period;
670 static int hf_mbim_query_thermal_state_temp_sensor_id;
671 static int hf_mbim_thermal_state_info_current_temp_value;
672 static int hf_mbim_thermal_state_info_enable;
673 static int hf_mbim_thermal_state_info_temp_sensor_id;
674 static int hf_mbim_thermal_state_info_alarm_id;
675 static int hf_mbim_thermal_state_info_threshold_value;
676 static int hf_mbim_thermal_state_info_hyst_value;
677 static int hf_mbim_thermal_state_info_sampling_period;
678 static int hf_mbim_sar_config_sar_status;
679 static int hf_mbim_sar_config_level;
680 static int hf_mbim_ms_sar_config_sar_mode;
681 static int hf_mbim_ms_sar_config_sar_backoff_status;
682 static int hf_mbim_ms_sar_config_sar_wifi_Integration;
683 static int hf_mbim_ms_sar_config_element_count;
684 static int hf_mbim_ms_sar_config_element_offset;
685 static int hf_mbim_ms_sar_config_element_size;
686 static int hf_mbim_ms_sar_config_state_sar_antenna_index;
687 static int hf_mbim_ms_sar_config_state_sar_backoff_index;
688 static int hf_mbim_ms_transmission_status_channel_notification;
689 static int hf_mbim_ms_transmission_status_transmission_status;
690 static int hf_mbim_ms_transmission_status_hysteresis_timer;
691 static int hf_mbim_adpclk_activate_state;
692 static int hf_mbim_adpclk_freq_info_elem_count;
693 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_offset;
694 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_size;
695 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq;
696 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread;
697 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power;
698 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi;
699 static int hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status;
700 static int hf_mbim_trace_config_config;
701 static int hf_mbim_nrtc_app_info_period;
702 static int hf_mbim_nrtc_app_info_duration;
703 static int hf_mbim_nrtcws_config_mode;
704 static int hf_mbim_nrtcws_config_wlan_active;
705 static int hf_mbim_nrtcws_config_wlan_safe_rx;
706 static int hf_mbim_nrtcws_config_wlan_bandwidth;
707 static int hf_mbim_nrtcws_config_bt_active;
708 static int hf_mbim_nrtcws_config_bt_safe_rx;
709 static int hf_mbim_nrtcws_info_lte_active;
710 static int hf_mbim_nrtcws_info_wlan_safe_rx_min;
711 static int hf_mbim_nrtcws_info_wlan_safe_rx_max;
712 static int hf_mbim_nrtcws_info_bt_safe_rx_min;
713 static int hf_mbim_nrtcws_info_bt_safe_rx_max;
714 static int hf_mbim_nrtcws_info_lte_sps_period;
715 static int hf_mbim_nrtcws_info_lte_sps_duration;
716 static int hf_mbim_nrtcws_info_lte_sps_initial_offset;
717 static int hf_mbim_usbprofile_cmd_length;
718 static int hf_mbim_usbprofile_cmd_buffer;
719 static int hf_mbim_usbprofile_rsp_length;
720 static int hf_mbim_usbprofile_rsp_buffer;
721 static int hf_mbim_ciq_set_mode;
722 static int hf_mbim_ciq_set_debug_info_size;
723 static int hf_mbim_ciq_set_debug_info;
724 static int hf_mbim_ciq_info_mode;
725 static int hf_mbim_atds_signal_info_rssi;
726 static int hf_mbim_atds_signal_info_ber;
727 static int hf_mbim_atds_signal_info_rscp;
728 static int hf_mbim_atds_signal_info_ecno;
729 static int hf_mbim_atds_signal_info_rsrq;
730 static int hf_mbim_atds_signal_info_rsrp;
731 static int hf_mbim_atds_signal_info_rssnr;
732 static int hf_mbim_atds_location_info_lac;
733 static int hf_mbim_atds_location_info_tac;
734 static int hf_mbim_atds_location_info_cellid;
735 static int hf_mbim_atds_operator_provider_id_offset;
736 static int hf_mbim_atds_operator_provider_id_size;
737 static int hf_mbim_atds_operator_provider_state;
738 static int hf_mbim_atds_operator_provider_name_offset;
739 static int hf_mbim_atds_operator_provider_name_size;
740 static int hf_mbim_atds_operator_plmn_mode;
741 static int hf_mbim_atds_operator_rssi;
742 static int hf_mbim_atds_operator_error_rate;
743 static int hf_mbim_atds_operator_provider_id;
744 static int hf_mbim_atds_operator_provider_name;
745 static int hf_mbim_atds_operators_elem_count;
746 static int hf_mbim_atds_operators_operator_offset;
747 static int hf_mbim_atds_operators_operator_size;
748 static int hf_mbim_atds_rat_info_mode;
749 static int hf_mbim_atds_projection_table_type;
750 static int hf_mbim_atds_projection_table_bar5min;
751 static int hf_mbim_atds_projection_table_a5;
752 static int hf_mbim_atds_projection_table_b5;
753 static int hf_mbim_atds_projection_table_bar4min;
754 static int hf_mbim_atds_projection_table_a4;
755 static int hf_mbim_atds_projection_table_b4;
756 static int hf_mbim_atds_projection_table_bar3min;
757 static int hf_mbim_atds_projection_table_a3;
758 static int hf_mbim_atds_projection_table_b3;
759 static int hf_mbim_atds_projection_table_bar2min;
760 static int hf_mbim_atds_projection_table_a2;
761 static int hf_mbim_atds_projection_table_b2;
762 static int hf_mbim_atds_projection_table_bar1min;
763 static int hf_mbim_atds_projection_table_a1;
764 static int hf_mbim_atds_projection_table_b1;
765 static int hf_mbim_atds_projection_table_bar0min;
766 static int hf_mbim_atds_projection_table_a0;
767 static int hf_mbim_atds_projection_table_b0;
768 static int hf_mbim_atds_projection_tables_elem_count;
769 static int hf_mbim_atds_projection_tables_projection_table_offset;
770 static int hf_mbim_atds_projection_tables_projection_table_size;
771 static int hf_mbim_multiflow_caps_info_control_caps;
772 static int hf_mbim_multiflow_caps_info_control_caps_uplink;
773 static int hf_mbim_multiflow_caps_info_control_caps_downlink;
774 static int hf_mbim_set_multiflow_state_state;
775 static int hf_mbim_multiflow_state_info_state;
776 static int hf_mbim_multiflow_tft_info_session_id;
777 static int hf_mbim_multiflow_tft_info_elem_count;
778 static int hf_mbim_multiflow_tft_info_tft_list_offset;
779 static int hf_mbim_multiflow_tft_info_tft_list_size;
780 static int hf_mbim_version;
781 static int hf_mbim_extended_version;
782 static int hf_mbim_set_ms_provisioned_context_v2_operation;
783 static int hf_mbim_set_ms_provisioned_context_v2_ip_type;
784 static int hf_mbim_set_ms_provisioned_context_v2_enable;
785 static int hf_mbim_set_ms_provisioned_context_v2_roaming;
786 static int hf_mbim_set_ms_provisioned_context_v2_media_type;
787 static int hf_mbim_set_ms_provisioned_context_v2_source;
788 static int hf_mbim_set_ms_provisioned_context_v2_access_string;
789 static int hf_mbim_set_ms_provisioned_context_v2_access_string_offset;
790 static int hf_mbim_set_ms_provisioned_context_v2_access_string_size;
791 static int hf_mbim_set_ms_provisioned_context_v2_user_name;
792 static int hf_mbim_set_ms_provisioned_context_v2_user_name_offset;
793 static int hf_mbim_set_ms_provisioned_context_v2_user_name_size;
794 static int hf_mbim_set_ms_provisioned_context_v2_password;
795 static int hf_mbim_set_ms_provisioned_context_v2_password_offset;
796 static int hf_mbim_set_ms_provisioned_context_v2_password_size;
797 static int hf_mbim_set_ms_provisioned_context_v2_compression;
798 static int hf_mbim_set_ms_provisioned_context_v2_auth_protocol;
799 static int hf_mbim_ms_provisioned_context_info_v2_elem_count;
800 static int hf_mbim_ms_provisioned_context_info_v2_list_offset;
801 static int hf_mbim_ms_provisioned_context_info_v2_list_size;
802 static int hf_mbim_ms_provisioned_context_info_v2_context_id;
803 static int hf_mbim_ms_network_blacklist_info_blacklist_state;
804 static int hf_mbim_ms_network_blacklist_state_sim_provider_actuated;
805 static int hf_mbim_ms_network_blacklist_state_network_provider_actuated;
806 static int hf_mbim_ms_network_blacklist_info_elem_count;
807 static int hf_mbim_ms_network_blacklist_info_list_offset;
808 static int hf_mbim_ms_network_blacklist_info_list_size;
809 static int hf_mbim_ms_network_blacklist_provider_mcc;
810 static int hf_mbim_ms_network_blacklist_provider_mnc;
811 static int hf_mbim_ms_network_blacklist_provider_type;
812 static int hf_mbim_sys_caps_info_number_of_executors;
813 static int hf_mbim_sys_caps_info_number_of_slots;
814 static int hf_mbim_sys_caps_info_concurrency;
815 static int hf_mbim_sys_caps_info_modem_id;
816 static int hf_mbim_ms_set_lte_attach_operation;
817 static int hf_mbim_ms_lte_attach_context_count;
818 static int hf_mbim_ms_lte_attach_context_offset;
819 static int hf_mbim_ms_lte_attach_context_size;
820 static int hf_mbim_ms_lte_attach_context_ip_type;
821 static int hf_mbim_ms_lte_attach_context_roaming;
822 static int hf_mbim_ms_lte_attach_context_source;
823 static int hf_mbim_ms_lte_attach_context_access_string;
824 static int hf_mbim_ms_lte_attach_context_access_string_offset;
825 static int hf_mbim_ms_lte_attach_context_access_string_size;
826 static int hf_mbim_ms_lte_attach_context_user_name;
827 static int hf_mbim_ms_lte_attach_context_user_name_offset;
828 static int hf_mbim_ms_lte_attach_context_user_name_size;
829 static int hf_mbim_ms_lte_attach_context_password;
830 static int hf_mbim_ms_lte_attach_context_password_offset;
831 static int hf_mbim_ms_lte_attach_context_password_size;
832 static int hf_mbim_ms_lte_attach_context_compression;
833 static int hf_mbim_ms_lte_attach_context_auth_protocol;
834 static int hf_mbim_ms_lte_attach_state;
835 static int hf_mbim_ms_device_slot_mapping_info_map_count;
836 static int hf_mbim_ms_device_slot_mapping_info_map_offset;
837 static int hf_mbim_ms_device_slot_mapping_info_map_size;
838 static int hf_mbim_ms_device_slot_mapping_info_executor_slot_index;
839 static int hf_mbim_ms_slot_info_req_slot_index;
840 static int hf_mbim_ms_slot_info_slot_index;
841 static int hf_mbim_ms_slot_info_state;
842 static int hf_mbim_base_station_max_gsm_count;
843 static int hf_mbim_base_station_max_umts_count;
844 static int hf_mbim_base_station_max_td_scdma_count;
845 static int hf_mbim_base_station_max_lte_count;
846 static int hf_mbim_base_station_max_cdma_count;
847 static int hf_mbim_base_station_max_nr_count;
848 static int hf_mbim_base_station_provider_id_offset;
849 static int hf_mbim_base_station_provider_id_size;
850 static int hf_mbim_base_station_location_area_code;
851 static int hf_mbim_base_station_cell_id;
852 static int hf_mbim_base_station_timing_advance;
853 static int hf_mbim_base_station_arfcn;
854 static int hf_mbim_base_station_base_station_id;
855 static int hf_mbim_base_station_rx_level;
856 static int hf_mbim_base_station_provider_id;
857 static int hf_mbim_base_station_frequency_info_ul;
858 static int hf_mbim_base_station_frequency_info_dl;
859 static int hf_mbim_base_station_frequency_info_nt;
860 static int hf_mbim_base_station_uarfcn;
861 static int hf_mbim_base_station_primary_scrambling_code;
862 static int hf_mbim_base_station_rscp;
863 static int hf_mbim_base_station_ecno;
864 static int hf_mbim_base_station_path_loss;
865 static int hf_mbim_base_station_call_parameter;
866 static int hf_mbim_base_station_earfcn;
867 static int hf_mbim_base_station_physical_cell_id;
868 static int hf_mbim_base_station_tac;
869 static int hf_mbim_base_station_rsrp;
870 static int hf_mbim_base_station_rsrq;
871 static int hf_mbim_base_station_serving_cell_flag;
872 static int hf_mbim_base_station_nid;
873 static int hf_mbim_base_station_sid;
874 static int hf_mbim_base_station_base_latitude;
875 static int hf_mbim_base_station_base_longitude;
876 static int hf_mbim_base_station_ref_pn;
877 static int hf_mbim_base_station_gps_seconds;
878 static int hf_mbim_base_station_pilot_strength;
879 static int hf_mbim_base_station_nci;
880 static int hf_mbim_base_station_cell_id_offset;
881 static int hf_mbim_base_station_cell_id_size;
882 static int hf_mbim_base_station_sinr;
883 static int hf_mbim_base_station_cell_id_string;
884 static int hf_mbim_base_station_system_type;
885 static int hf_mbim_base_station_system_sub_type;
886 static int hf_mbim_base_station_gsm_serving_cell_offset;
887 static int hf_mbim_base_station_gsm_serving_cell_size;
888 static int hf_mbim_base_station_umts_serving_cell_offset;
889 static int hf_mbim_base_station_umts_serving_cell_size;
890 static int hf_mbim_base_station_td_scdma_serving_cell_offset;
891 static int hf_mbim_base_station_td_scdma_serving_cell_size;
892 static int hf_mbim_base_station_lte_serving_cell_offset;
893 static int hf_mbim_base_station_lte_serving_cell_size;
894 static int hf_mbim_base_station_gsm_nmr_offset;
895 static int hf_mbim_base_station_gsm_nmr_size;
896 static int hf_mbim_base_station_umts_mrl_offset;
897 static int hf_mbim_base_station_umts_mrl_size;
898 static int hf_mbim_base_station_td_scdma_mrl_offset;
899 static int hf_mbim_base_station_td_scdma_mrl_size;
900 static int hf_mbim_base_station_lte_mrl_offset;
901 static int hf_mbim_base_station_lte_mrl_size;
902 static int hf_mbim_base_station_cdma_mrl_offset;
903 static int hf_mbim_base_station_cdma_mrl_size;
904 static int hf_mbim_base_station_nr_serving_cell_offset;
905 static int hf_mbim_base_station_nr_serving_cell_size;
906 static int hf_mbim_base_station_nr_neighbor_cells_offset;
907 static int hf_mbim_base_station_nr_neighbor_cells_size;
908 static int hf_mbim_base_station_count;
909 static int hf_mbim_ms_modem_config_config_status;
910 static int hf_mbim_ms_registration_params_info_mico_mode;
911 static int hf_mbim_ms_registration_params_info_drx_params;
912 static int hf_mbim_ms_registration_params_info_ladn_info;
913 static int hf_mbim_ms_registration_params_info_default_pdu_hint;
914 static int hf_mbim_ms_registration_params_info_re_register_if_needed;
915 static int hf_mbim_ms_network_params_info_mico_indication;
916 static int hf_mbim_ms_network_params_info_drx_params;
917 static int hf_mbim_ms_wake_reason_wake_type;
918 static int hf_mbim_ms_wake_reason_session_id;
919 static int hf_mbim_ms_wake_reason_command_payload_offset;
920 static int hf_mbim_ms_wake_reason_command_payload_size;
921 static int hf_mbim_ms_wake_reason_command_payload;
922 static int hf_mbim_ms_wake_reason_packet_original_size;
923 static int hf_mbim_ms_wake_reason_packet_saved_offset;
924 static int hf_mbim_ms_wake_reason_packet_saved_size;
925 static int hf_mbim_ms_wake_reason_packet_saved_data;
926 static int hf_mbim_ms_slot_id;
927 static int hf_mbim_ms_open_channel_app_id_size;
928 static int hf_mbim_ms_open_channel_app_id_offset;
929 static int hf_mbim_ms_open_channel_select_p2_arg;
930 static int hf_mbim_ms_uicc_channel_group;
931 static int hf_mbim_ms_open_channel_app_id;
932 static int hf_mbim_ms_uicc_status;
933 static int hf_mbim_ms_uicc_channel;
934 static int hf_mbim_ms_uicc_response_length;
935 static int hf_mbim_ms_uicc_response_offset;
936 static int hf_mbim_ms_uicc_response;
937 static int hf_mbim_ms_apdu_secure_messaging;
938 static int hf_mbim_ms_apdu_type;
939 static int hf_mbim_ms_apdu_command_size;
940 static int hf_mbim_ms_apdu_command_offset;
941 static int hf_mbim_ms_apdu_command;
942 static int hf_mbim_ms_terminal_capability_count;
943 static int hf_mbim_ms_terminal_capability_offset;
944 static int hf_mbim_ms_terminal_capability_size;
945 static int hf_mbim_ms_terminal_capability;
946 static int hf_mbim_ms_reset_pass_through_action;
947 static int hf_mbim_ms_atr_info_atr_offset;
948 static int hf_mbim_ms_atr_info_atr_size;
949 static int hf_mbim_ms_app_info_app_type;
950 static int hf_mbim_ms_app_info_app_id_offset;
951 static int hf_mbim_ms_app_info_app_id_size;
952 static int hf_mbim_ms_app_info_app_id;
953 static int hf_mbim_ms_app_info_app_name_offset;
954 static int hf_mbim_ms_app_info_app_name_size;
955 static int hf_mbim_ms_app_info_app_name;
956 static int hf_mbim_ms_app_info_num_pins;
957 static int hf_mbim_ms_app_info_pin_ref_offset;
958 static int hf_mbim_ms_app_info_pin_ref_size;
959 static int hf_mbim_ms_app_info_pin_ref;
960 static int hf_mbim_ms_app_list_version;
961 static int hf_mbim_ms_app_list_app_count;
962 static int hf_mbim_ms_app_list_active_app_index;
963 static int hf_mbim_ms_app_list_size;
964 static int hf_mbim_ms_app_list_app_info_offset;
965 static int hf_mbim_ms_app_list_app_info_size;
966 static int hf_mbim_ms_file_path_version;
967 static int hf_mbim_ms_file_path_app_id_offset;
968 static int hf_mbim_ms_file_path_app_id_size;
969 static int hf_mbim_ms_file_path_file_path_offset;
970 static int hf_mbim_ms_file_path_file_path_size;
971 static int hf_mbim_ms_file_path_app_id;
972 static int hf_mbim_ms_file_path_file_path;
973 static int hf_mbim_ms_file_status_version;
974 static int hf_mbim_ms_file_status_status_word_1;
975 static int hf_mbim_ms_file_status_status_word_2;
976 static int hf_mbim_ms_file_status_file_accessibility;
977 static int hf_mbim_ms_file_status_file_type;
978 static int hf_mbim_ms_file_status_file_structure;
979 static int hf_mbim_ms_file_status_item_count;
980 static int hf_mbim_ms_file_status_size;
981 static int hf_mbim_ms_file_status_file_lock_status;
982 static int hf_mbim_ms_response_version;
983 static int hf_mbim_ms_response_status_word_1;
984 static int hf_mbim_ms_response_status_word_2;
985 static int hf_mbim_ms_response_response_data_offset;
986 static int hf_mbim_ms_response_response_data_size;
987 static int hf_mbim_ms_response_response_data;
988 static int hf_mbim_ms_access_binary_version;
989 static int hf_mbim_ms_access_binary_app_id_offset;
990 static int hf_mbim_ms_access_binary_app_id_size;
991 static int hf_mbim_ms_access_binary_file_path_offset;
992 static int hf_mbim_ms_access_binary_file_path_size;
993 static int hf_mbim_ms_access_binary_file_offset;
994 static int hf_mbim_ms_access_binary_number_of_bytes;
995 static int hf_mbim_ms_access_binary_local_pin_offset;
996 static int hf_mbim_ms_access_binary_local_pin_size;
997 static int hf_mbim_ms_access_binary_binary_data_offset;
998 static int hf_mbim_ms_access_binary_binary_data_size;
999 static int hf_mbim_ms_access_binary_app_id;
1000 static int hf_mbim_ms_access_binary_file_path;
1001 static int hf_mbim_ms_access_binary_local_pin;
1002 static int hf_mbim_ms_access_binary_binary_data;
1003 static int hf_mbim_ms_access_record_version;
1004 static int hf_mbim_ms_access_record_app_id_offset;
1005 static int hf_mbim_ms_access_record_app_id_size;
1006 static int hf_mbim_ms_access_record_file_path_offset;
1007 static int hf_mbim_ms_access_record_file_path_size;
1008 static int hf_mbim_ms_access_record_record_number;
1009 static int hf_mbim_ms_access_record_local_pin_offset;
1010 static int hf_mbim_ms_access_record_local_pin_size;
1011 static int hf_mbim_ms_access_record_record_data_offset;
1012 static int hf_mbim_ms_access_record_record_data_size;
1013 static int hf_mbim_ms_access_record_app_id;
1014 static int hf_mbim_ms_access_record_file_path;
1015 static int hf_mbim_ms_access_record_local_pin;
1016 static int hf_mbim_ms_access_record_record_data;
1017 static int hf_mbim_nitz_year;
1018 static int hf_mbim_nitz_month;
1019 static int hf_mbim_nitz_day;
1020 static int hf_mbim_nitz_hour;
1021 static int hf_mbim_nitz_minute;
1022 static int hf_mbim_nitz_second;
1023 static int hf_mbim_nitz_timezone_offset_minutes;
1024 static int hf_mbim_nitz_daylight_saving_time_offset_minutes;
1025 static int hf_mbim_nitz_data_class;
1026 static int hf_mbim_fragmented_payload;
1027 static int hf_mbim_request_in;
1028 static int hf_mbim_response_in;
1029 static int hf_mbim_descriptor;
1030 static int hf_mbim_descriptor_version;
1031 static int hf_mbim_descriptor_max_control_message;
1032 static int hf_mbim_descriptor_number_filters;
1033 static int hf_mbim_descriptor_max_filter_size;
1034 static int hf_mbim_descriptor_max_segment_size;
1035 static int hf_mbim_descriptor_network_capabilities;
1036 static int hf_mbim_descriptor_network_capabilities_max_datagram_size;
1037 static int hf_mbim_descriptor_network_capabilities_ntb_input_size;
1038 static int hf_mbim_descriptor_extended_version;
1039 static int hf_mbim_descriptor_max_outstanding_command_messages;
1040 static int hf_mbim_descriptor_mtu;
1041 static int hf_mbim_bulk;
1042 static int hf_mbim_bulk_nth_signature;
1043 static int hf_mbim_bulk_nth_header_length;
1044 static int hf_mbim_bulk_nth_sequence_number;
1045 static int hf_mbim_bulk_nth_block_length;
1046 static int hf_mbim_bulk_nth_block_length_32;
1047 static int hf_mbim_bulk_nth_ndp_index;
1048 static int hf_mbim_bulk_nth_ndp_index_32;
1049 static int hf_mbim_bulk_ndp_signature;
1050 static int hf_mbim_bulk_ndp_signature_ips_session_id;
1051 static int hf_mbim_bulk_ndp_signature_ipc_session_id;
1052 static int hf_mbim_bulk_ndp_signature_dss_session_id;
1053 static int hf_mbim_bulk_ndp_signature_dsc_session_id;
1054 static int hf_mbim_bulk_ndp_length;
1055 static int hf_mbim_bulk_ndp_next_ndp_index;
1056 static int hf_mbim_bulk_ndp_next_ndp_index_32;
1057 static int hf_mbim_bulk_ndp_reserved;
1058 static int hf_mbim_bulk_ndp_reserved2;
1059 static int hf_mbim_bulk_ndp_datagram_index;
1060 static int hf_mbim_bulk_ndp_datagram_index_32;
1061 static int hf_mbim_bulk_ndp_datagram_length;
1062 static int hf_mbim_bulk_ndp_datagram_length_32;
1063 static int hf_mbim_bulk_ndp_datagram;
1064 static int hf_mbim_bulk_ndp_nb_datagrams;
1065 static int hf_mbim_bulk_total_nb_datagrams;
1066 static int hf_mbim_bulk_ndp_ctrl;
1067 static int hf_mbim_bulk_ndp_ctrl_message_type;
1068 static int hf_mbim_bulk_ndp_ctrl_message_length;
1069 static int hf_mbim_bulk_ndp_ctrl_multiflow_status;
1070 static int hf_mbim_bulk_ndp_ctrl_multiflow_watermark;
1071 static int hf_mbim_bulk_ndp_ctrl_message_payload;
1072 static int hf_mbim_fragments;
1073 static int hf_mbim_fragment;
1074 static int hf_mbim_fragment_overlap;
1075 static int hf_mbim_fragment_overlap_conflict;
1076 static int hf_mbim_fragment_multiple_tails;
1077 static int hf_mbim_fragment_too_long_fragment;
1078 static int hf_mbim_fragment_error;
1079 static int hf_mbim_fragment_count;
1080 static int hf_mbim_reassembled_in;
1081 static int hf_mbim_reassembled_length;
1082 static int hf_mbim_reassembled_data;
1084 static expert_field ei_mbim_max_ctrl_transfer;
1085 static expert_field ei_mbim_unexpected_msg;
1086 static expert_field ei_mbim_unexpected_info_buffer;
1087 static expert_field ei_mbim_illegal_on_link_prefix_length;
1088 static expert_field ei_mbim_unknown_sms_format;
1089 static expert_field ei_mbim_unexpected_uuid_value;
1090 static expert_field ei_mbim_too_many_items;
1091 static expert_field ei_mbim_alignment_error;
1092 static expert_field ei_mbim_invalid_block_len;
1093 static expert_field ei_mbim_out_of_bounds_index;
1094 static expert_field ei_mbim_oversized_string;
1095 static expert_field ei_mbim_oversized_pdu;
1097 /* Initialize the subtree pointers */
1098 static int ett_mbim;
1099 static int ett_mbim_msg_header;
1100 static int ett_mbim_frag_header;
1101 static int ett_mbim_info_buffer;
1102 static int ett_mbim_bitmap;
1103 static int ett_mbim_pair_list;
1104 static int ett_mbim_pin;
1105 static int ett_mbim_buffer;
1106 static int ett_mbim_sc_address;
1107 static int ett_mbim_pac;
1108 static int ett_mbim_thermal_threshold_setting;
1109 static int ett_mbim_fragment;
1110 static int ett_mbim_fragments;
1111 static int ett_mbim_bulk_ndp_ctrl;
1113 static dissector_table_t dss_dissector_table;
1114 static dissector_handle_t bertlv_handle;
1115 static dissector_handle_t gsm_sim_cmd_handle;
1116 static dissector_handle_t gsm_sim_rsp_handle;
1117 static dissector_handle_t etsi_cat_handle;
1118 static dissector_handle_t gsm_sms_handle;
1119 static dissector_handle_t cdma_sms_handle;
1120 static dissector_handle_t eth_handle;
1121 static dissector_handle_t eth_fcs_handle;
1122 static dissector_handle_t ip_handle;
1123 static dissector_handle_t data_handle;
1124 static dissector_handle_t bulk_ndp_ctrl_handle;
1125 static dissector_handle_t mbim_control_handle;
1126 static dissector_handle_t iso7816_atr_handle;
1127 static dissector_handle_t iso7816_handle;
1129 static bool mbim_control_decode_unknown_itf;
1131 enum {
1132 SMS_PDU_AUTOMATIC,
1133 SMS_PDU_3GPP,
1134 SMS_PDU_3GPP2
1137 static const enum_val_t mbim_sms_pdu_format_vals[] = {
1138 {"automatic", "Automatic", SMS_PDU_AUTOMATIC},
1139 {"3GPP", "3GPP", SMS_PDU_3GPP},
1140 {"3GPP2","3GPP2", SMS_PDU_3GPP2},
1141 {NULL, NULL, -1}
1143 static int mbim_sms_pdu_format = SMS_PDU_AUTOMATIC;
1145 enum mbim_extended_version_vals {
1146 MBIM_Extended_Version_Unknown,
1147 MBIM_Extended_Version_1,
1148 MBIM_Extended_Version_2,
1149 MBIM_Extended_Version_3,
1150 MBIM_Extended_Version_4,
1153 static const enum_val_t preferred_mbim_extended_version_vals[] = {
1154 {"1.0", "1.0", MBIM_Extended_Version_1},
1155 {"2.0", "2.0", MBIM_Extended_Version_2},
1156 {"3.0", "3.0", MBIM_Extended_Version_3},
1157 {"4.0", "4.0", MBIM_Extended_Version_4},
1158 {NULL, NULL, -1}
1160 static int preferred_mbim_extended_version = MBIM_Extended_Version_1;
1162 #define SHOULD_MBIM_EX2_BE_APPLIED(mbim_conv) \
1163 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_2 || \
1164 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version == MBIM_Extended_Version_2)) ? 1 : 0
1166 #define SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv) \
1167 (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_2 || \
1168 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_2)) ? 1 : 0
1170 #define SHOULD_MBIM_EX3_BE_APPLIED(mbim_conv) \
1171 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_3 || \
1172 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version == MBIM_Extended_Version_3)) ? 1 : 0
1174 #define SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv) \
1175 (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_3 || \
1176 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_3)) ? 1 : 0
1178 #define SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv) \
1179 (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_4 || \
1180 (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_4)) ? 1 : 0
1182 enum {
1183 UICC_APDU_GSM_SIM,
1184 UICC_APDU_ISO_7816
1187 static const enum_val_t mbim_uicc_apdu_dissector_vals[] = {
1188 {"gsm_sim", "GSM SIM", UICC_APDU_GSM_SIM},
1189 {"iso7816", "ISO 7816", UICC_APDU_ISO_7816},
1190 {NULL, NULL, -1}
1193 static int mbim_uicc_apdu_dissector = UICC_APDU_GSM_SIM;
1195 #define ROUND_UP_COUNT(Count,Pow2) \
1196 ( ((Count)+(Pow2)-1) & (~(((int)(Pow2))-1)) )
1198 static reassembly_table mbim_reassembly_table;
1200 static wmem_map_t *mbim_uuid_ext_hash;
1202 static const fragment_items mbim_frag_items = {
1203 &ett_mbim_fragment,
1204 &ett_mbim_fragments,
1205 &hf_mbim_fragments,
1206 &hf_mbim_fragment,
1207 &hf_mbim_fragment_overlap,
1208 &hf_mbim_fragment_overlap_conflict,
1209 &hf_mbim_fragment_multiple_tails,
1210 &hf_mbim_fragment_too_long_fragment,
1211 &hf_mbim_fragment_error,
1212 &hf_mbim_fragment_count,
1213 &hf_mbim_reassembled_in,
1214 &hf_mbim_reassembled_length,
1215 &hf_mbim_reassembled_data,
1216 "MBIM fragments"
1219 struct mbim_conv_info {
1220 wmem_map_t *trans;
1221 wmem_tree_t *open;
1222 uint32_t open_count;
1223 uint32_t cellular_class;
1224 enum mbim_extended_version_vals mbim_extended_version;
1227 struct mbim_pair_list {
1228 uint32_t offset;
1229 uint32_t size;
1232 #define MBIM_MAX_ITEMS 1000
1234 #define MBIM_OPEN_MSG 0x00000001
1235 #define MBIM_CLOSE_MSG 0x00000002
1236 #define MBIM_COMMAND_MSG 0x00000003
1237 #define MBIM_HOST_ERROR_MSG 0x00000004
1238 #define MBIM_OPEN_DONE 0x80000001
1239 #define MBIM_CLOSE_DONE 0x80000002
1240 #define MBIM_COMMAND_DONE 0x80000003
1241 #define MBIM_FUNCTION_ERROR_MSG 0x80000004
1242 #define MBIM_INDICATE_STATUS_MSG 0x80000007
1244 static const value_string mbim_msg_type_vals[] = {
1245 { MBIM_OPEN_MSG, "OPEN_MSG"},
1246 { MBIM_CLOSE_MSG, "CLOSE_MSG"},
1247 { MBIM_COMMAND_MSG, "COMMAND_MSG"},
1248 { MBIM_HOST_ERROR_MSG, "HOST_ERROR_MSG"},
1249 { MBIM_OPEN_DONE, "OPEN_DONE"},
1250 { MBIM_CLOSE_DONE, "CLOSE_DONE"},
1251 { MBIM_COMMAND_DONE, "COMMAND_DONE"},
1252 { MBIM_FUNCTION_ERROR_MSG, "FUNCTION_ERROR_MSG"},
1253 { MBIM_INDICATE_STATUS_MSG, "INDICATE_STATUS_MSG"},
1254 { 0, NULL}
1257 static const value_string mbim_command_type_vals[] = {
1258 { MBIM_COMMAND_QUERY, "Query"},
1259 { MBIM_COMMAND_SET, "Set"},
1260 { 0, NULL}
1263 static const value_string mbim_error_status_code_vals[] = {
1264 { 1, "TIMEOUT_FRAGMENT"},
1265 { 2, "FRAGMENT_OUT_OF_SEQUENCE"},
1266 { 3, "LENGTH_MISMATCH"},
1267 { 4, "DUPLICATED_TID"},
1268 { 5, "NOT_OPENED"},
1269 { 6, "UNKNOWN"},
1270 { 7, "CANCEL"},
1271 { 8, "MAX_TRANSFER"},
1272 { 0, NULL}
1275 static const value_string mbim_status_code_vals[] = {
1276 { 0, "SUCCESS"},
1277 { 1, "BUSY"},
1278 { 2, "FAILURE"},
1279 { 3, "SIM_NOT_INSERTED"},
1280 { 4, "BAD_SIM"},
1281 { 5, "PIN_REQUIRED"},
1282 { 6, "PIN_DISABLED"},
1283 { 7, "NOT_REGISTERED"},
1284 { 8, "PROVIDERS_NOT_FOUND"},
1285 { 9, "NO_DEVICE_SUPPORT"},
1286 { 10, "PROVIDER_NOT_VISIBLE"},
1287 { 11, "DATA_CLASS_NOT_AVAILABLE"},
1288 { 12, "PACKET_SERVICE_DETACHED"},
1289 { 13, "MAX_ACTIVATED_CONTEXTS"},
1290 { 14, "NOT_INITIALIZED"},
1291 { 15, "VOICE_CALL_IN_PROGRESS"},
1292 { 16, "CONTEXT_NOT_ACTIVATED"},
1293 { 17, "SERVICE_NOT_ACTIVATED"},
1294 { 18, "INVALID_ACCESS_STRING"},
1295 { 19, "INVALID_USER_NAME_PWD"},
1296 { 20, "RADIO_POWER_OFF"},
1297 { 21, "INVALID_PARAMETERS"},
1298 { 22, "READ_FAILURE"},
1299 { 23, "WRITE_FAILURE"},
1300 { 24, "Reserved"},
1301 { 25, "NO_PHONEBOOK"},
1302 { 26, "PARAMETER_TOO_LONG"},
1303 { 27, "STK_BUSY"},
1304 { 28, "OPERATION_NOT_ALLOWED"},
1305 { 29, "MEMORY_FAILURE"},
1306 { 30, "INVALID_MEMORY_INDEX"},
1307 { 31, "MEMORY_FULL"},
1308 { 32, "FILTER_NOT_SUPPORTED"},
1309 { 33, "DSS_INSTANCE_LIMIT"},
1310 { 34, "INVALID_DEVICE_SERVICE_OPERATION"},
1311 { 35, "AUTH_INCORRECT_AUTN"},
1312 { 36, "AUTH_SYNC_FAILURE"},
1313 { 37, "AUTH_AMF_NOT_SET"},
1314 { 38, "CONTEXT_NOT_SUPPORTED"},
1315 { 39, "SHAREABILITY_CONDITION_ERROR"},
1316 { 40, "PIN_FAILURE"},
1317 { 41, "NO_LTE_ATTACH_CONFIG"},
1318 { 42, "SESSION_ALREADY_EXISTS"},
1319 { 100, "SMS_UNKNOWN_SMSC_ADDRESS"},
1320 { 101, "SMS_NETWORK_TIMEOUT"},
1321 { 102, "SMS_LANG_NOT_SUPPORTED"},
1322 { 103, "SMS_ENCODING_NOT_SUPPORTED"},
1323 { 104, "SMS_FORMAT_NOT_SUPPORTED"},
1324 { 105, "SMS_MORE_DATA"},
1325 { 200, "MATCHING_PDU_SESSION_FOUND"},
1326 { 201, "DISSOCIATION_NEEDED_FOR_APPLICATION"},
1327 { 202, "ERROR_INVALID_SLOT"},
1328 { 203, "NO_MATCHING_URSP_RULE"},
1329 { 204, "DEFAULT_URSP_RULE"},
1330 { 0x87430001, "UICC_NO_LOGICAL_CHANNELS"},
1331 { 0x87430002, "UICC_SELECT_FAILED"},
1332 { 0x87430003, "UICC_INVALID_LOGICAL_CHANNEL"},
1333 { 0, NULL}
1335 static value_string_ext mbim_status_code_vals_ext = VALUE_STRING_EXT_INIT(mbim_status_code_vals);
1337 struct mbim_uuid {
1338 uint8_t service_idx;
1339 e_guid_t uuid;
1342 #define UUID_BASIC_CONNECT 0
1343 #define UUID_SMS 1
1344 #define UUID_USSD 2
1345 #define UUID_PHONEBOOK 3
1346 #define UUID_STK 4
1347 #define UUID_AUTH 5
1348 #define UUID_DSS 6
1349 #define UUID_MULTICARRIER 7
1350 #define UUID_MS_HOSTSHUTDOWN 8
1351 #define UUID_MSFWID 9
1352 #define UUID_QMI 10 /* Qualcomm proprietary UUID */
1353 #define UUID_INTEL_FWUSVC 11 /* Intel firmware update service proprietary UUID */
1354 #define UUID_INTEL_DPTF 12 /* Intel proprietary UUID */
1355 #define UUID_INTEL_SAR 13 /* Intel proprietary UUID */
1356 #define UUID_INTEL_ACT 14 /* Intel adaptive clocking proprietary UUID */
1357 #define UUID_INTEL_TRCSVC 15 /* Intel trace service proprietary UUID */
1358 #define UUID_INTEL_NRTC 16 /* Intel proprietary UUID */
1359 #define UUID_INTEL_USB_PROFILE 17 /* Intel USB profile proprietary UUID */
1360 #define UUID_INTEL_CIQ 18 /* Intel proprietary UUID */
1361 #define UUID_ATDS 19 /* AT&T extensions proprietary UUID */
1362 #define UUID_MULTIFLOW 20
1363 #define UUID_BASIC_CONNECT_EXTENSIONS 21 /* Microsoft */
1364 #define UUID_MS_SARCONTROL 22 /* Microsoft */
1365 #define UUID_MS_UICC_LOW_LEVEL 23
1366 #define UUID_MS_VOICE_EXTENSIONS 24
1367 #define UUID_MAX 25
1368 #define UUID_EXT_IDX 255
1370 static const struct mbim_uuid mbim_uuid_service_id_vals[UUID_MAX] = {
1371 { UUID_BASIC_CONNECT, {0xa289cc33, 0xbcbb, 0x8b4f, { 0xb6, 0xb0, 0x13, 0x3e, 0xc2, 0xaa, 0xe6, 0xdf}}},
1372 { UUID_SMS, {0x533fbeeb, 0x14fe, 0x4467, {0x9f, 0x90, 0x33, 0xa2, 0x23, 0xe5, 0x6c, 0x3f}}},
1373 { UUID_USSD, {0xe550a0c8, 0x5e82, 0x479e, {0x82, 0xf7, 0x10, 0xab, 0xf4, 0xc3, 0x35, 0x1f}}},
1374 { UUID_PHONEBOOK, {0x4bf38476, 0x1e6a, 0x41db, {0xb1, 0xd8, 0xbe, 0xd2, 0x89, 0xc2, 0x5b, 0xdb}}},
1375 { UUID_STK, {0xd8f20131, 0xfcb5, 0x4e17, {0x86, 0x02, 0xd6, 0xed, 0x38, 0x16, 0x16, 0x4c}}},
1376 { UUID_AUTH, {0x1d2b5ff7, 0x0aa1, 0x48b2, {0xaa, 0x52, 0x50, 0xf1, 0x57, 0x67, 0x17, 0x4e}}},
1377 { UUID_DSS, {0xc08a26dd, 0x7718, 0x4382, {0x84, 0x82, 0x6e, 0x0d, 0x58, 0x3c, 0x4d, 0x0e}}},
1378 { UUID_MULTICARRIER, {0x8b569648, 0x628d, 0x4653, {0x9b, 0x9f, 0x10, 0x25, 0x40, 0x44, 0x24, 0xe1}}},
1379 { UUID_MS_HOSTSHUTDOWN, {0x883b7c26, 0x985f, 0x43fa, {0x98, 0x04, 0x27, 0xd7, 0xfb, 0x80, 0x95, 0x9c}}},
1380 { UUID_MSFWID, {0xe9f7dea2, 0xfeaf, 0x4009, {0x93, 0xce, 0x90, 0xa3, 0x69, 0x41, 0x03, 0xb6}}},
1381 { UUID_QMI, {0xd1a30bc2, 0xf97a, 0x6e43, {0xbf, 0x65, 0xc7, 0xe2, 0x4f, 0xb0, 0xf0, 0xd3}}},
1382 { UUID_INTEL_FWUSVC, {0x0ed374cb, 0xf835, 0x4474, {0xbc, 0x11, 0x3b, 0x3f, 0xd7, 0x6f, 0x56, 0x41}}},
1383 { UUID_INTEL_DPTF, {0xfdc22af2, 0xf441, 0x4d46, {0xaf, 0x8d, 0x25, 0x9f, 0xcd, 0xde, 0x46, 0x35}}},
1384 { UUID_INTEL_SAR, {0x10e40d69, 0x375a, 0x42ce, {0xa2, 0x97, 0x90, 0x61, 0x64, 0xf2, 0x75, 0x4c}}},
1385 { UUID_INTEL_ACT, {0xed19555d, 0xa6ac, 0x4327, {0x8e, 0xb1, 0xfc, 0x02, 0x2e, 0x5e, 0x23, 0x88}}},
1386 { UUID_INTEL_TRCSVC, {0x59a7f323, 0xfe5a, 0x4301, {0xb1, 0x85, 0xb8, 0xea, 0x9e, 0x61, 0x67, 0xb7}}},
1387 { UUID_INTEL_NRTC, {0x2b6d8c5a, 0x0ca9, 0x418f, {0x8a, 0xac, 0x1a, 0x9d, 0xc8, 0xe3, 0x28, 0x66}}},
1388 { UUID_INTEL_USB_PROFILE, {0xfa142322, 0x166b, 0x4fd9, {0x89, 0xf0, 0x99, 0xbe, 0x90, 0xae, 0x8e, 0x3d}}},
1389 { UUID_INTEL_CIQ, {0x6A2A8150, 0xABCA, 0x4b11, {0xA4, 0xE2, 0xF2, 0xFC, 0x87, 0x9F, 0x54, 0x81}}},
1390 { UUID_ATDS, {0x5967bdcc, 0x7fd2, 0x49a2, {0x9f, 0x5c, 0xb2, 0xe7, 0x0e, 0x52, 0x7d, 0xb3}}},
1391 { UUID_MULTIFLOW, {0x8d8f32d9, 0xf7c2, 0x4419, {0xb2, 0x8b, 0xde, 0xdc, 0xde, 0x20, 0x5e, 0xd8}}},
1392 { UUID_BASIC_CONNECT_EXTENSIONS, {0x3d01dcc5, 0xfef5, 0x4d05, {0x0d, 0x3a, 0xbe, 0xf7, 0x05, 0x8e, 0x9a, 0xaf}}},
1393 { UUID_MS_SARCONTROL, {0x68223d04, 0x9f6c, 0x4e0f, {0x82, 0x2d, 0x28, 0x44, 0x1f, 0xb7, 0x23, 0x40}}},
1394 { UUID_MS_UICC_LOW_LEVEL, {0xc2f6588e, 0xf037, 0x4bc9, {0x86, 0x65, 0xf4, 0xd4, 0x4b, 0xd0, 0x93, 0x67}}},
1395 { UUID_MS_VOICE_EXTENSIONS, {0x8d8b9eba, 0x37be, 0x449b, {0x8f, 0x1e, 0x61, 0xcb, 0x03, 0x4a, 0x70, 0x2e}}}
1398 static const value_string mbim_service_id_vals[] = {
1399 { UUID_BASIC_CONNECT, "UUID_BASIC_CONNECT"},
1400 { UUID_SMS, "UUID_SMS"},
1401 { UUID_USSD, "UUID_USSD"},
1402 { UUID_PHONEBOOK, "UUID_PHONEBOOK"},
1403 { UUID_STK, "UUID_STK"},
1404 { UUID_AUTH, "UUID_AUTH"},
1405 { UUID_DSS, "UUID_DSS"},
1406 { UUID_MULTICARRIER, "UUID_MULTICARRIER"},
1407 { UUID_MS_HOSTSHUTDOWN, "UUID_MS_HOSTSHUTDOWN"},
1408 { UUID_MSFWID, "UUID_MSFWID"},
1409 { UUID_QMI, "UUID_QMI"},
1410 { UUID_INTEL_FWUSVC, "UUID_INTEL_FWUSVC"},
1411 { UUID_INTEL_DPTF, "UUID_INTEL_DPTF"},
1412 { UUID_INTEL_SAR, "UUID_INTEL_SAR"},
1413 { UUID_INTEL_ACT, "UUID_INTEL_ACT"},
1414 { UUID_INTEL_TRCSVC, "UUID_INTEL_TRCSVC"},
1415 { UUID_INTEL_NRTC, "UUID_INTEL_NRTC"},
1416 { UUID_INTEL_USB_PROFILE, "UUID_INTEL_USB_PROFILE"},
1417 { UUID_INTEL_CIQ, "UUID_INTEL_CIQ"},
1418 { UUID_ATDS, "UUID_ATDS"},
1419 { UUID_MULTIFLOW, "UUID_MULTIFLOW"},
1420 { UUID_BASIC_CONNECT_EXTENSIONS, "UUID_BASIC_CONNECT_EXTENSIONS"},
1421 { UUID_MS_SARCONTROL, "UUID_MS_SARCONTROL"},
1422 { UUID_MS_UICC_LOW_LEVEL, "UUID_MS_UICC_LOW_LEVEL"},
1423 { UUID_MS_VOICE_EXTENSIONS, "UUID_MS_VOICE_EXTENSIONS"},
1424 { 0, NULL}
1426 static value_string_ext mbim_service_id_vals_ext = VALUE_STRING_EXT_INIT(mbim_service_id_vals);
1428 #define MBIM_CID_DEVICE_CAPS 1
1429 #define MBIM_CID_SUBSCRIBER_READY_STATUS 2
1430 #define MBIM_CID_RADIO_STATE 3
1431 #define MBIM_CID_PIN 4
1432 #define MBIM_CID_PIN_LIST 5
1433 #define MBIM_CID_HOME_PROVIDER 6
1434 #define MBIM_CID_PREFERRED_PROVIDERS 7
1435 #define MBIM_CID_VISIBLE_PROVIDERS 8
1436 #define MBIM_CID_REGISTER_STATE 9
1437 #define MBIM_CID_PACKET_SERVICE 10
1438 #define MBIM_CID_SIGNAL_STATE 11
1439 #define MBIM_CID_CONNECT 12
1440 #define MBIM_CID_PROVISIONED_CONTEXTS 13
1441 #define MBIM_CID_SERVICE_ACTIVATION 14
1442 #define MBIM_CID_IP_CONFIGURATION 15
1443 #define MBIM_CID_DEVICE_SERVICES 16
1444 #define MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST 19
1445 #define MBIM_CID_PACKET_STATISTICS 20
1446 #define MBIM_CID_NETWORK_IDLE_HINT 21
1447 #define MBIM_CID_EMERGENCY_MODE 22
1448 #define MBIM_CID_IP_PACKET_FILTERS 23
1449 #define MBIM_CID_MULTICARRIER_PROVIDERS 24
1451 static const value_string mbim_uuid_basic_connect_cid_vals[] = {
1452 { MBIM_CID_DEVICE_CAPS, "DEVICE_CAPS"},
1453 { MBIM_CID_SUBSCRIBER_READY_STATUS, "SUBSCRIBER_READY_STATUS"},
1454 { MBIM_CID_RADIO_STATE, "RADIO_STATE"},
1455 { MBIM_CID_PIN, "PIN"},
1456 { MBIM_CID_PIN_LIST, "PIN_LIST"},
1457 { MBIM_CID_HOME_PROVIDER, "HOME_PROVIDER"},
1458 { MBIM_CID_PREFERRED_PROVIDERS, "PREFERRED_PROVIDERS"},
1459 { MBIM_CID_VISIBLE_PROVIDERS, "VISIBLE_PROVIDERS"},
1460 { MBIM_CID_REGISTER_STATE, "REGISTER_STATE"},
1461 { MBIM_CID_PACKET_SERVICE, "PACKET_SERVICE"},
1462 { MBIM_CID_SIGNAL_STATE, "SIGNAL_STATE"},
1463 { MBIM_CID_CONNECT, "CONNECT"},
1464 { MBIM_CID_PROVISIONED_CONTEXTS, "PROVISIONED_CONTEXTS"},
1465 { MBIM_CID_SERVICE_ACTIVATION, "SERVICE_ACTIVATION"},
1466 { MBIM_CID_IP_CONFIGURATION, "IP_CONFIGURATION"},
1467 { MBIM_CID_DEVICE_SERVICES, "DEVICE_SERVICES"},
1468 { MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST, "DEVICE_SERVICE_SUBSCRIBE_LIST"},
1469 { MBIM_CID_PACKET_STATISTICS, "PACKET_STATISTICS"},
1470 { MBIM_CID_NETWORK_IDLE_HINT, "NETWORK_IDLE_HINT"},
1471 { MBIM_CID_EMERGENCY_MODE, "EMERGENCY_MODE"},
1472 { MBIM_CID_IP_PACKET_FILTERS, "IP_PACKET_FILTERS"},
1473 { MBIM_CID_MULTICARRIER_PROVIDERS, "MULTICARRIER_PROVIDERS"},
1474 { 0, NULL}
1476 static value_string_ext mbim_uuid_basic_connect_cid_vals_ext = VALUE_STRING_EXT_INIT(mbim_uuid_basic_connect_cid_vals);
1478 #define MBIM_CID_SMS_CONFIGURATION 1
1479 #define MBIM_CID_SMS_READ 2
1480 #define MBIM_CID_SMS_SEND 3
1481 #define MBIM_CID_SMS_DELETE 4
1482 #define MBIM_CID_SMS_MESSAGE_STORE_STATUS 5
1484 static const value_string mbim_uuid_sms_cid_vals[] = {
1485 { MBIM_CID_SMS_CONFIGURATION, "SMS_CONFIGURATION"},
1486 { MBIM_CID_SMS_READ, "SMS_READ"},
1487 { MBIM_CID_SMS_SEND, "SMS_SEND"},
1488 { MBIM_CID_SMS_DELETE, "SMS_DELETE"},
1489 { MBIM_CID_SMS_MESSAGE_STORE_STATUS, "SMS_MESSAGE_STORE_STATUS"},
1490 { 0, NULL}
1493 #define MBIM_CID_USSD 1
1495 static const value_string mbim_uuid_ussd_cid_vals[] = {
1496 { MBIM_CID_USSD, "USSD"},
1497 { 0, NULL}
1500 #define MBIM_CID_PHONEBOOK_CONFIGURATION 1
1501 #define MBIM_CID_PHONEBOOK_READ 2
1502 #define MBIM_CID_PHONEBOOK_DELETE 3
1503 #define MBIM_CID_PHONEBOOK_WRITE 4
1505 static const value_string mbim_uuid_phonebook_cid_vals[] = {
1506 { MBIM_CID_PHONEBOOK_CONFIGURATION, "PHONEBOOK_CONFIGURATION"},
1507 { MBIM_CID_PHONEBOOK_READ, "PHONEBOOK_READ"},
1508 { MBIM_CID_PHONEBOOK_DELETE, "PHONEBOOK_DELETE"},
1509 { MBIM_CID_PHONEBOOK_WRITE, "PHONEBOOK_WRITE"},
1510 { 0, NULL}
1513 #define MBIM_CID_STK_PAC 1
1514 #define MBIM_CID_STK_TERMINAL_RESPONSE 2
1515 #define MBIM_CID_STK_ENVELOPE 3
1517 static const value_string mbim_uuid_stk_cid_vals[] = {
1518 { MBIM_CID_STK_PAC, "STK_PAC"},
1519 { MBIM_CID_STK_TERMINAL_RESPONSE, "STK_TERMINAL_RESPONSE"},
1520 { MBIM_CID_STK_ENVELOPE, "STK_ENVELOPE"},
1521 { 0, NULL}
1524 #define MBIM_CID_AKA_AUTH 1
1525 #define MBIM_CID_AKAP_AUTH 2
1526 #define MBIM_CID_SIM_AUTH 3
1528 static const value_string mbim_uuid_auth_cid_vals[] = {
1529 { MBIM_CID_AKA_AUTH, "AKA_AUTH"},
1530 { MBIM_CID_AKAP_AUTH, "AKAP_AUTH"},
1531 { MBIM_CID_SIM_AUTH, "SIM_AUTH"},
1532 { 0, NULL}
1535 #define MBIM_CID_DSS_CONNECT 1
1537 static const value_string mbim_uuid_dss_cid_vals[] = {
1538 { MBIM_CID_DSS_CONNECT, "DSS_CONNECT"},
1539 { 0, NULL}
1542 #define MBIM_CID_MULTICARRIER_CAPABILITIES 1
1543 #define MBIM_CID_LOCATION_INFO 2
1544 #define MBIM_CID_MULTICARRIER_CURRENT_CID_LIST 3
1546 static const value_string mbim_uuid_multicarrier_cid_vals[] = {
1547 { MBIM_CID_MULTICARRIER_CAPABILITIES, "MULTICARRIER_CAPABILITIES"},
1548 { MBIM_CID_LOCATION_INFO, "LOCATION_INFO"},
1549 { MBIM_CID_MULTICARRIER_CURRENT_CID_LIST, "MULTICARRIER_CURRENT_CID_LIST"},
1550 { 0, NULL}
1553 #define MBIM_CID_MS_HOSTSHUTDOWN 1
1554 #define MBIM_CID_MS_HOSTPRESHUTDOWN 2
1556 static const value_string mbim_uuid_ms_hostshutdown_cid_vals[] = {
1557 { MBIM_CID_MS_HOSTSHUTDOWN, "MS_HOSTSHUTDOWN"},
1558 { MBIM_CID_MS_HOSTPRESHUTDOWN, "MS_HOSTPRESHUTDOWN"},
1559 { 0, NULL}
1562 #define MBIM_CID_MSFWID_FIRMWAREID 1
1564 static const value_string mbim_uuid_msfwid_cid_vals[] = {
1565 { MBIM_CID_MSFWID_FIRMWAREID, "MSFWID_FIRMWAREID"},
1566 { 0, NULL}
1569 #define MBIM_CID_QMI_QMI 1
1571 static const value_string mbim_uuid_qmi_cid_vals[] = {
1572 { MBIM_CID_QMI_QMI, "QMI"},
1573 { 0, NULL}
1576 #define MBIM_CID_INTC_MODEM_REBOOT 1
1578 static const value_string mbim_uuid_intel_fwusvc_cid_vals[] = {
1579 { MBIM_CID_INTC_MODEM_REBOOT, "INTC_MODEM_REBOOT"},
1580 { 0, NULL}
1583 #define MBIM_CID_INTC_THERMAL_STATE 0x02000100
1585 static const value_string mbim_uuid_intel_dptf_cid_vals[] = {
1586 { MBIM_CID_INTC_THERMAL_STATE, "INTC_THERMAL_STATE"},
1587 { 0, NULL}
1590 #define MBIM_CID_INTC_SAR_CONFIG 1
1592 static const value_string mbim_uuid_intel_sar_cid_vals[] = {
1593 { MBIM_CID_INTC_SAR_CONFIG, "INTC_SAR_CONFIG"},
1594 { 0, NULL}
1597 #define MBIM_CID_INTC_ADPCLK_MODE 0x02000010
1599 static const value_string mbim_uuid_intel_act_cid_vals[] = {
1600 { MBIM_CID_INTC_ADPCLK_MODE, "INTC_ADPCLK_MODE"},
1601 { 0, NULL}
1604 #define MBIM_CID_INTC_TRACE 1
1605 #define MBIM_CID_INTC_TRACE_DATA 2
1607 static const value_string mbim_uuid_intel_trcsvc_cid_vals[] = {
1608 { MBIM_CID_INTC_TRACE, "INTC_TRACE"},
1609 { MBIM_CID_INTC_TRACE_DATA, "INTC_TRACE_DATA"},
1610 { 0, NULL}
1613 #define MBIM_CID_INTC_NRTAPP 1
1614 #define MBIM_CID_INTC_NRTCWS 2
1616 static const value_string mbim_uuid_intel_nrtc_cid_vals[] = {
1617 { MBIM_CID_INTC_NRTAPP, "INTC_NRTAPP"},
1618 { MBIM_CID_INTC_NRTCWS, "INTC_NRTCWS"},
1619 { 0, NULL}
1622 #define MBIM_CID_INTC_USBPROFILE 1
1624 static const value_string mbim_uuid_intel_usb_profile_cid_vals[] = {
1625 { MBIM_CID_INTC_USBPROFILE, "INTC_USBPROFILE"},
1626 { 0, NULL}
1629 #define MBIM_CID_INTC_CIQ 1
1631 static const value_string mbim_uuid_intel_ciq_cid_vals[] = {
1632 { MBIM_CID_INTC_CIQ, "INTC_CIQ"},
1633 { 0, NULL}
1636 #define MBIM_CID_ATDS_SIGNAL 1
1637 #define MBIM_CID_ATDS_LOCATION 2
1638 #define MBIM_CID_ATDS_OPERATORS 3
1639 #define MBIM_CID_ATDS_RAT 4
1640 #define MBIM_CID_ATDS_REGISTER_STATE 9
1641 #define MBIM_CID_ATDS_SET_PROJECTION_TABLES 10
1643 static const value_string mbim_uuid_atds_cid_vals[] = {
1644 { MBIM_CID_ATDS_SIGNAL, "ATDS_SIGNAL"},
1645 { MBIM_CID_ATDS_LOCATION, "ATDS_LOCATION"},
1646 { MBIM_CID_ATDS_OPERATORS, "ATDS_OPERATORS"},
1647 { MBIM_CID_ATDS_RAT, "ATDS_RAT"},
1648 { MBIM_CID_ATDS_REGISTER_STATE, "ATDS_REGISTER_STATE"},
1649 { MBIM_CID_ATDS_SET_PROJECTION_TABLES, "ATDS_SET_PROJECTION_TABLES"},
1650 { 0, NULL}
1653 #define MBIM_CID_MULTIFLOW_CAPS 1
1654 #define MBIM_CID_MULTIFLOW_UPLINK 2
1655 #define MBIM_CID_MULTIFLOW_DOWNLINK 3
1656 #define MBIM_CID_MULTIFLOW_TFT 4
1658 static const value_string mbim_uuid_multiflow_cid_vals[] = {
1659 { MBIM_CID_MULTIFLOW_CAPS, "MULTIFLOW_CAPS"},
1660 { MBIM_CID_MULTIFLOW_UPLINK, "MULTIFLOW_UPLINK"},
1661 { MBIM_CID_MULTIFLOW_DOWNLINK, "MULTIFLOW_DOWNLINK"},
1662 { MBIM_CID_MULTIFLOW_TFT, "MULTIFLOW_TFT"},
1663 { 0, NULL}
1666 #define MBIM_CID_MS_PROVISIONED_CONTEXT_V2 1
1667 #define MBIM_CID_MS_NETWORK_BLACKLIST 2
1668 #define MBIM_CID_MS_LTE_ATTACH_CONFIG 3
1669 #define MBIM_CID_MS_LTE_ATTACH_STATUS 4
1670 #define MBIM_CID_MS_SYS_CAPS 5
1671 #define MBIM_CID_MS_DEVICE_CAPS_V2 6
1672 #define MBIM_CID_MS_DEVICE_SLOT_MAPPINGS 7
1673 #define MBIM_CID_MS_SLOT_INFO_STATUS 8
1674 #define MBIM_CID_PCO 9
1675 #define MBIM_CID_MS_DEVICE_RESET 10
1676 #define MBIM_CID_BASE_STATIONS_INFO 11
1677 #define MBIM_CID_LOCATION_INFO_STATUS 12
1678 #define MBIM_CID_MS_MODEM_LOGGING_CONFIG 13
1679 #define MBIM_CID_MS_PIN_INFO_EX2 14
1680 #define MBIM_CID_VERSION 15
1681 #define MBIM_CID_MS_MODEM_CONFIG 16
1682 #define MBIM_CID_MS_REGISTRATION_PARAMS 17
1683 #define MBIM_CID_MS_NETWORK_PARAMS 18
1684 #define MBIM_CID_MS_WAKE_REASON 19
1685 #define MBIM_CID_MS_UE_POLICY 20
1687 static const value_string mbim_uuid_basic_connect_extensions_cid_vals[] = {
1688 { MBIM_CID_MS_PROVISIONED_CONTEXT_V2, "MS_PROVISIONED_CONTEXT_V2"},
1689 { MBIM_CID_MS_NETWORK_BLACKLIST, "MS_NETWORK_BLACKLIST"},
1690 { MBIM_CID_MS_LTE_ATTACH_CONFIG, "MS_LTE_ATTACH_CONFIG"},
1691 { MBIM_CID_MS_LTE_ATTACH_STATUS, "MS_LTE_ATTACH_STATUS"},
1692 { MBIM_CID_MS_SYS_CAPS, "MS_SYS_CAPS"},
1693 { MBIM_CID_MS_DEVICE_CAPS_V2, "MS_DEVICE_CAPS_V2"},
1694 { MBIM_CID_MS_DEVICE_SLOT_MAPPINGS, "MS_DEVICE_SLOT_MAPPINGS"},
1695 { MBIM_CID_MS_SLOT_INFO_STATUS, "MS_SLOT_INFO_STATUS"},
1696 { MBIM_CID_PCO, "PCO"},
1697 { MBIM_CID_MS_DEVICE_RESET, "MS_DEVICE_RESET"},
1698 { MBIM_CID_BASE_STATIONS_INFO, "BASE_STATIONS_INFO"},
1699 { MBIM_CID_LOCATION_INFO_STATUS, "LOCATION_INFO_STATUS"},
1700 { MBIM_CID_MS_MODEM_LOGGING_CONFIG, "MS_MODEM_LOGGING_CONFIG"},
1701 { MBIM_CID_MS_PIN_INFO_EX2, "MS_PIN_INFO_EX2"},
1702 { MBIM_CID_VERSION, "VERSION"},
1703 { MBIM_CID_MS_MODEM_CONFIG, "MS_MODEM_CONFIG"},
1704 { MBIM_CID_MS_REGISTRATION_PARAMS, "MS_REGISTRATION_PARAMS"},
1705 { MBIM_CID_MS_NETWORK_PARAMS, "MS_NETWORK_PARAMS"},
1706 { MBIM_CID_MS_WAKE_REASON, "MS_WAKE_REASON"},
1707 { MBIM_CID_MS_UE_POLICY, "MS_UE_POLICY"},
1708 { 0, NULL}
1711 #define MBIM_CID_MS_SAR_CONFIG 1
1712 #define MBIM_CID_MS_TRANSMISSION_STATUS 2
1714 static const value_string mbim_uuid_ms_sarcontrol_cid_vals[] = {
1715 { MBIM_CID_MS_SAR_CONFIG, "MS_SAR_CONFIG"},
1716 { MBIM_CID_MS_TRANSMISSION_STATUS, "MS_TRANSMISSION_STATUS"},
1717 { 0, NULL}
1720 #define MBIM_CID_MS_UICC_ATR 1
1721 #define MBIM_CID_MS_UICC_OPEN_CHANNEL 2
1722 #define MBIM_CID_MS_UICC_CLOSE_CHANNEL 3
1723 #define MBIM_CID_MS_UICC_APDU 4
1724 #define MBIM_CID_MS_UICC_TERMINAL_CAPABILITY 5
1725 #define MBIM_CID_MS_UICC_RESET 6
1726 #define MBIM_CID_MS_UICC_APP_LIST 7
1727 #define MBIM_CID_MS_UICC_FILE_STATUS 8
1728 #define MBIM_CID_MS_UICC_ACCESS_BINARY 9
1729 #define MBIM_CID_MS_UICC_ACCESS_RECORD 10
1731 static const value_string mbim_uuid_ms_uicc_low_level_cid_vals[] = {
1732 { MBIM_CID_MS_UICC_ATR, "MS_UICC_ATR" },
1733 { MBIM_CID_MS_UICC_OPEN_CHANNEL, "MS_UICC_OPEN_CHANNEL" },
1734 { MBIM_CID_MS_UICC_CLOSE_CHANNEL, "MS_UICC_CLOSE_CHANNEL" },
1735 { MBIM_CID_MS_UICC_APDU, "MS_UICC_APDU" },
1736 { MBIM_CID_MS_UICC_TERMINAL_CAPABILITY, "MS_UICC_TERMINAL_CAPABILITY" },
1737 { MBIM_CID_MS_UICC_RESET, "MS_UICC_RESET" },
1738 { MBIM_CID_MS_UICC_APP_LIST, "MS_UICC_APP_LIST" },
1739 { MBIM_CID_MS_UICC_FILE_STATUS, "MS_UICC_FILE_STATUS" },
1740 { MBIM_CID_MS_UICC_ACCESS_BINARY, "MS_UICC_ACCESS_BINARY" },
1741 { MBIM_CID_MS_UICC_ACCESS_RECORD, "MS_UICC_ACCESS_RECORD" },
1742 { 0, NULL}
1745 #define MBIM_CID_MS_VOICE_EXTENSIONS_NITZ 10
1746 static const value_string mbim_uuid_ms_voice_extensions_cid_vals[] = {
1747 { MBIM_CID_MS_VOICE_EXTENSIONS_NITZ, "MS_NITZ"},
1748 { 0, NULL}
1751 struct mbim_uuid_info_ {
1752 int *hf_entry;
1753 const value_string *cid_list;
1754 value_string_ext *cid_list_ext;
1757 static const struct mbim_uuid_info_ mbim_uuid_info[UUID_MAX] = {
1758 { &hf_mbim_uuid_basic_connect_cid, NULL, &mbim_uuid_basic_connect_cid_vals_ext}, /* UUID_BASIC_CONNECT */
1759 { &hf_mbim_uuid_sms_cid, mbim_uuid_sms_cid_vals, NULL}, /* UUID_SMS */
1760 { &hf_mbim_uuid_ussd_cid, mbim_uuid_ussd_cid_vals, NULL}, /* UUID_USSD */
1761 { &hf_mbim_uuid_phonebook_cid, mbim_uuid_phonebook_cid_vals, NULL}, /* UUID_PHONEBOOK */
1762 { &hf_mbim_uuid_stk_cid, mbim_uuid_stk_cid_vals, NULL}, /* UUID_STK */
1763 { &hf_mbim_uuid_auth_cid, mbim_uuid_auth_cid_vals, NULL}, /* UUID_AUTH */
1764 { &hf_mbim_uuid_dss_cid, mbim_uuid_dss_cid_vals, NULL}, /* UUID_DSS */
1765 { &hf_mbim_uuid_multicarrier_cid, mbim_uuid_multicarrier_cid_vals, NULL}, /* UUID_MULTICARRIER */
1766 { &hf_mbim_uuid_ms_hostshutdown_cid, mbim_uuid_ms_hostshutdown_cid_vals, NULL}, /* UUID_MS_HOSTSHUTDOWN */
1767 { &hf_mbim_uuid_msfwid_cid, mbim_uuid_msfwid_cid_vals, NULL}, /* UUID_MSFWID */
1768 { &hf_mbim_uuid_qmi_cid, mbim_uuid_qmi_cid_vals, NULL}, /* UUID_QMI */
1769 { &hf_mbim_uuid_intel_fwusvc_cid, mbim_uuid_intel_fwusvc_cid_vals, NULL}, /* UUID_INTEL_FWUSVC */
1770 { &hf_mbim_uuid_intel_dptf_cid, mbim_uuid_intel_dptf_cid_vals, NULL}, /* UUID_INTEL_DPTF */
1771 { &hf_mbim_uuid_intel_sar_cid, mbim_uuid_intel_sar_cid_vals, NULL}, /* UUID_INTEL_SAR */
1772 { &hf_mbim_uuid_intel_act_cid, mbim_uuid_intel_act_cid_vals, NULL}, /* UUID_INTEL_ACT */
1773 { &hf_mbim_uuid_intel_trcsvc_cid, mbim_uuid_intel_trcsvc_cid_vals, NULL}, /* UUID_INTEL_TRCSVC */
1774 { &hf_mbim_uuid_intel_nrtc_cid, mbim_uuid_intel_nrtc_cid_vals, NULL}, /* UUID_INTEL_NRTC */
1775 { &hf_mbim_uuid_intel_usb_profile_cid, mbim_uuid_intel_usb_profile_cid_vals, NULL}, /* UUID_INTEL_USB_PROFILE */
1776 { &hf_mbim_uuid_intel_ciq_cid, mbim_uuid_intel_ciq_cid_vals, NULL}, /* UUID_INTEL_CIQ */
1777 { &hf_mbim_uuid_atds_cid, mbim_uuid_atds_cid_vals, NULL}, /* UUID_ATDS */
1778 { &hf_mbim_uuid_multiflow_cid, mbim_uuid_multiflow_cid_vals, NULL}, /* UUID_MULTIFLOW */
1779 { &hf_mbim_uuid_basic_connect_extensions_cid, mbim_uuid_basic_connect_extensions_cid_vals, NULL}, /* UUID_BASIC_CONNECT_EXTENSIONS */
1780 { &hf_mbim_uuid_ms_sarcontrol_cid, mbim_uuid_ms_sarcontrol_cid_vals, NULL}, /* UUID_MS_SARCONTROL */
1781 { &hf_mbim_uuid_ms_uicc_low_level_cid, mbim_uuid_ms_uicc_low_level_cid_vals, NULL}, /* UUID_MS_UICC_LOW_LEVEL */
1782 { &hf_mbim_uuid_ms_voice_extensions_cid, mbim_uuid_ms_voice_extensions_cid_vals, NULL} /* UUID_MS_VOICE_EXTENSIONS */
1785 static const value_string mbim_device_caps_info_device_type_vals[] = {
1786 { 0, "Unknown"},
1787 { 1, "Embedded"},
1788 { 2, "Removable"},
1789 { 3, "Remote"},
1790 { 0, NULL}
1793 #define MBIM_CELLULAR_CLASS_GSM 1
1794 #define MBIM_CELLULAR_CLASS_CDMA 2
1796 static const value_string mbim_cellular_class_vals[] = {
1797 { MBIM_CELLULAR_CLASS_GSM, "GSM"},
1798 { MBIM_CELLULAR_CLASS_CDMA, "CDMA"},
1799 { 0, NULL}
1802 static int* const mbim_cellular_class_fields[] = {
1803 &hf_mbim_cellular_class_gsm,
1804 &hf_mbim_cellular_class_cdma,
1805 NULL
1808 static const value_string mbim_device_caps_info_voice_class_vals[] = {
1809 { 0, "Unknown"},
1810 { 1, "No Voice"},
1811 { 2, "Separate Voice Data"},
1812 { 3, "Simultaneous Voice Data"},
1813 { 0, NULL}
1816 static const value_string mbim_packet_service_info_frequency_range_vals[] = {
1817 { 0, "Unknown"},
1818 { 1, "Range1"},
1819 { 2, "Range2"},
1820 { 3, "Range1AndRange2"},
1821 { 0, NULL}
1824 static int * const mbim_device_caps_info_sim_class_fields[] = {
1825 &hf_mbim_device_caps_info_sim_class_logical,
1826 &hf_mbim_device_caps_info_sim_class_removable,
1827 NULL
1830 static int * const mbim_data_class_fields[] = {
1831 &hf_mbim_data_class_gprs,
1832 &hf_mbim_data_class_edge,
1833 &hf_mbim_data_class_umts,
1834 &hf_mbim_data_class_hsdpa,
1835 &hf_mbim_data_class_hsupa,
1836 &hf_mbim_data_class_lte,
1837 &hf_mbim_data_class_5g,
1838 &hf_mbim_data_class_reserved_gsm,
1839 &hf_mbim_data_class_1xrtt,
1840 &hf_mbim_data_class_1xevdo,
1841 &hf_mbim_data_class_1xevdoreva,
1842 &hf_mbim_data_class_1xevdv,
1843 &hf_mbim_data_class_3xrtt,
1844 &hf_mbim_data_class_1xevdorevb,
1845 &hf_mbim_data_class_umb,
1846 &hf_mbim_data_class_reserved_cdma,
1847 &hf_mbim_data_class_custom,
1848 NULL
1851 static int * const mbim_device_caps_info_sms_caps_fields[] = {
1852 &hf_mbim_device_caps_info_sms_caps_pdu_receive,
1853 &hf_mbim_device_caps_info_sms_caps_pdu_send,
1854 &hf_mbim_device_caps_info_sms_caps_text_receive,
1855 &hf_mbim_device_caps_info_sms_caps_text_send,
1856 NULL
1859 static int * const mbim_device_caps_info_control_caps_fields[] = {
1860 &hf_mbim_device_caps_info_control_caps_reg_manual,
1861 &hf_mbim_device_caps_info_control_caps_hw_radio_switch,
1862 &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip,
1863 &hf_mbim_device_caps_info_control_caps_cdma_simple_ip,
1864 &hf_mbim_device_caps_info_control_caps_multi_carrier,
1865 &hf_mbim_device_caps_info_control_caps_esim,
1866 &hf_mbim_device_caps_info_control_caps_ue_policy_route_selection,
1867 &hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable,
1868 &hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable,
1869 NULL
1872 static int * const mbim_data_subclass_fields[] = {
1873 &hf_mbim_data_subclass_5gendc,
1874 &hf_mbim_data_subclass_5gnr,
1875 &hf_mbim_data_subclass_5gnedc,
1876 &hf_mbim_data_subclass_5gelte,
1877 &hf_mbim_data_subclass_5gngendc,
1878 NULL
1881 static const value_string mbim_subscr_ready_status_ready_state_vals[] = {
1882 { 0, "Not Initialized"},
1883 { 1, "Initialized"},
1884 { 2, "SIM Not Inserted"},
1885 { 3, "Bad SIM"},
1886 { 4, "Failure"},
1887 { 5, "Not Activated"},
1888 { 6, "Device Locked"},
1889 { 0, NULL}
1892 static int * const mbim_subscr_ready_status_flags_fields[] = {
1893 &hf_mbim_subscr_ready_status_flag_esim,
1894 &hf_mbim_subscr_ready_status_flag_sim_removability_known,
1895 &hf_mbim_subscr_ready_status_flag_sim_removable,
1896 &hf_mbim_subscr_ready_status_flag_sim_slot_active,
1897 NULL
1900 static const value_string mbim_subscr_ready_status_ready_info_vals[] = {
1901 { 0, "None"},
1902 { 1, "Protect Unique ID"},
1903 { 0, NULL}
1906 static const value_string mbim_radio_state_vals[] = {
1907 { 0, "Radio Off"},
1908 { 1, "Radio On"},
1909 { 0, NULL}
1912 static const value_string mbim_pin_type_vals[] = {
1913 { 0, "None"},
1914 { 1, "Custom"},
1915 { 2, "PIN 1"},
1916 { 3, "PIN 2"},
1917 { 4, "Device SIM PIN"},
1918 { 5, "Device First SIM PIN"},
1919 { 6, "Network PIN"},
1920 { 7, "Network Subset PIN"},
1921 { 8, "Service Provider PIN"},
1922 { 9, "Corporate PIN"},
1923 { 10, "Subsidy Lock"},
1924 { 11, "PUK 1"},
1925 { 12, "PUK 2"},
1926 { 13, "Device First SIM PUK"},
1927 { 14, "Network PUK"},
1928 { 15, "Network Subset PUK"},
1929 { 16, "Service Provider PUK"},
1930 { 17, "Corporate PUK"},
1931 { 18, "Corporate NEV"},
1932 { 19, "Corporate ADM"},
1933 { 0, NULL}
1936 static const value_string mbim_pin_operation_vals[] = {
1937 { 0, "Enter"},
1938 { 1, "Enable"},
1939 { 2, "Disable"},
1940 { 3, "Change"},
1941 { 0, NULL}
1944 static const value_string mbim_pin_state_vals[] = {
1945 { 0, "Unlocked"},
1946 { 1, "Locked"},
1947 { 0, NULL}
1950 static const value_string mbim_pin_mode_vals[] = {
1951 { 0, "Not Supported"},
1952 { 1, "Enabled"},
1953 { 2, "Disabled"},
1954 { 0, NULL}
1957 static const value_string mbim_pin_format_vals[] = {
1958 { 0, "Unknown"},
1959 { 1, "Numeric"},
1960 { 2, "Alpha Numeric"},
1961 { 0, NULL}
1964 static const value_string mbim_ms_modem_config_status_vals[] = {
1965 { 0, "Unknown"},
1966 { 1, "Started"},
1967 { 2, "Completed"},
1968 { 0, NULL}
1971 static const value_string mbim_ms_mico_mode_vals[] = {
1972 { 0, "Disabled"},
1973 { 1, "Enabled"},
1974 { 2, "Unsupported"},
1975 { 3, "Default"},
1976 { 0, NULL}
1979 static const value_string mbim_ms_mico_indication_vals[] = {
1980 { 0, "Not Allocated"},
1981 { 1, "Allocated"},
1982 { 0xffffffff, "Not Available"},
1983 { 0, NULL}
1985 static const value_string mbim_ms_pre_dflt_nssai_info_access_type_vals[] = {
1986 { 0, "Unknown"},
1987 { 1, "3GPP"},
1988 { 2, "Non3GPP"},
1989 { 0, NULL}
1991 static const value_string mbim_ms_default_pdu_hint_vals[] = {
1992 { 0, "Activation Unlikely"},
1993 { 1, "Activation Likely"},
1994 { 0, NULL}
1997 static const value_string mbim_ms_ladn_ind_vals[] = {
1998 { 0, "Info Not Needed"},
1999 { 1, "Info Requested"},
2000 { 0, NULL}
2003 static const value_string mbim_ms_drx_params_vals[] = {
2004 { 0, "Not Specified"},
2005 { 1, "Not Supported"},
2006 { 2, "Cycle32"},
2007 { 3, "Cycle64"},
2008 { 4, "Cycle128"},
2009 { 5, "Cycle256"},
2010 { 0, NULL}
2013 static const value_string hf_mbim_ms_wake_reason_wake_type_vals[] = {
2014 { 0, "CID Response"},
2015 { 1, "CID Indication"},
2016 { 2, "Packet"},
2017 { 0, NULL}
2020 #define TLV_TYPE_UNKNOWN 0
2021 #define TLV_TYPE_UE_POLICIES 1
2022 #define TLV_TYPE_SINGLE_NSSAI 2
2023 #define TLV_TYPE_ALLOWED_NSSAI 3
2024 #define TLV_TYPE_CFG_NSSAI 4
2025 #define TLV_TYPE_DFLT_CFG_NSSAI 5
2026 #define TLV_TYPE_PRECFG_DFLT_CFG_NSSAI 6
2027 #define TLV_TYPE_REJ_NSSAI 7
2028 #define TLV_TYPE_LADN 8
2029 #define TLV_TYPE_TAI 9
2030 #define TLV_TYPE_WCHAR_STR 10
2031 #define TLV_TYPE_UINT16_TBL 11
2032 #define TLV_TYPE_EAP_PACKET 12
2033 #define TLV_TYPE_PCO 13
2034 #define TLV_TYPE_ROUTE_SELECTION_DESCRIPTORS 14
2035 #define TLV_TYPE_TRAFFIC_PARAMETERS 15
2036 #define TLV_TYPE_WAKE_COMMAND 16
2037 #define TLV_TYPE_WAKE_PACKET 17
2038 #define TLV_TYPE_TYPE_OSID 18
2039 #define TLV_TYPE_TYPE_3GPP_REL_VERSION 19
2040 #define TLV_TYPE_TYPE_URSP_RULES_TD_ONLY 20
2041 #define TLV_TYPE_TYPE_SESSION_ID 21
2043 static const value_string mbim_tlv_type_vals[] = {
2044 { TLV_TYPE_UNKNOWN, "UNKNOWN"},
2045 { TLV_TYPE_UE_POLICIES, "UE_POLICIES"},
2046 { TLV_TYPE_SINGLE_NSSAI, "SINGLE_NSSAI"},
2047 { TLV_TYPE_ALLOWED_NSSAI, "ALLOWED_NSSAI"},
2048 { TLV_TYPE_CFG_NSSAI, "CFG_NSSAI"},
2049 { TLV_TYPE_DFLT_CFG_NSSAI, "DFLT_CFG_NSSAI"},
2050 { TLV_TYPE_PRECFG_DFLT_CFG_NSSAI, "PRECFG_DFLT_CFG_NSSAI"},
2051 { TLV_TYPE_REJ_NSSAI, "REJ_NSSAI"},
2052 { TLV_TYPE_LADN, "LADN"},
2053 { TLV_TYPE_TAI, "TAI"},
2054 { TLV_TYPE_WCHAR_STR, "WCHAR_STR"},
2055 { TLV_TYPE_UINT16_TBL, "UINT16_TBL"},
2056 { TLV_TYPE_EAP_PACKET, "EAP_PACKET"},
2057 { TLV_TYPE_PCO, "PCO"},
2058 { TLV_TYPE_ROUTE_SELECTION_DESCRIPTORS, "ROUTE_SELECTION_DESCRIPTORS"},
2059 { TLV_TYPE_TRAFFIC_PARAMETERS, "TRAFFIC_PARAMETERS"},
2060 { TLV_TYPE_WAKE_COMMAND, "WAKE_COMMAND"},
2061 { TLV_TYPE_WAKE_PACKET, "WAKE_PACKET"},
2062 { TLV_TYPE_TYPE_OSID, "OS_ID"},
2063 { TLV_TYPE_TYPE_3GPP_REL_VERSION, "3GPP_REL_VERSION"},
2064 { TLV_TYPE_TYPE_URSP_RULES_TD_ONLY, "URSP_RULES_TD_ONLY"},
2065 { TLV_TYPE_TYPE_SESSION_ID, "SESSION_ID"},
2066 { 0, NULL}
2069 static int * const mbim_provider_state_fields[] = {
2070 &hf_mbim_provider_state_home,
2071 &hf_mbim_provider_state_forbidden,
2072 &hf_mbim_provider_state_preferred,
2073 &hf_mbim_provider_state_visible,
2074 &hf_mbim_provider_state_registered,
2075 &hf_mbim_provider_state_preferred_multicarrier,
2076 NULL
2079 #define URSP_TC_TYPE_MATCH_ALL 0x1
2080 #define URSP_TC_TYPE_OSID_APPID 0x8
2081 #define URSP_TC_TYPE_IPV4 0x10
2082 #define URSP_TC_TYPE_IPV6 0x21
2083 #define URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER 0x30
2084 #define URSP_TC_TYPE_PORT 0x50
2085 #define URSP_TC_TYPE_PORT_RANGE 0x51
2086 #define URSP_TC_TYPE_SECURITY_PARAM_INDEX 0x60
2087 #define URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS 0x70
2088 #define URSP_TC_TYPE_FLOW_LABEL 0x80
2089 #define URSP_TC_TYPE_MAC_ADDRESS 0x81
2090 #define URSP_TC_TYPE_C_TAG_VID 0x83
2091 #define URSP_TC_TYPE_S_TAG_VID 0x84
2092 #define URSP_TC_TYPE_C_TAG_PCP_AND_DEI 0x85
2093 #define URSP_TC_TYPE_S_TAG_PCP_AND_DEI 0x86
2094 #define URSP_TC_TYPE_ETHER 0x87
2095 #define URSP_TC_TYPE_DNN 0x88
2096 #define URSP_TC_TYPE_CONNECTION_CAPABILITY 0x90
2097 #define URSP_TC_TYPE_FQDN 0x91
2098 #define URSP_TC_TYPE_APPID 0xa0
2100 static const value_string ursp_tc_type_vals[] = {
2101 { URSP_TC_TYPE_MATCH_ALL, "Match all"},
2102 { URSP_TC_TYPE_OSID_APPID, "OS Id + OS App Id"},
2103 { URSP_TC_TYPE_IPV4, "IPv4 remote address"},
2104 { URSP_TC_TYPE_IPV6, "IPv6 remote address/prefix length"},
2105 { URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER, "Protocol identifier/next header"},
2106 { URSP_TC_TYPE_PORT, "Single remote port"},
2107 { URSP_TC_TYPE_PORT_RANGE, "Remote port range"},
2108 { URSP_TC_TYPE_SECURITY_PARAM_INDEX, "Security parameter index"},
2109 { URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS, "Type of service/traffic class"},
2110 { URSP_TC_TYPE_FLOW_LABEL, "Flow label"},
2111 { URSP_TC_TYPE_MAC_ADDRESS, "Destination MAC address"},
2112 { URSP_TC_TYPE_C_TAG_VID, "802.1Q C-TAG VID"},
2113 { URSP_TC_TYPE_S_TAG_VID, "802.1Q S-TAG VID"},
2114 { URSP_TC_TYPE_C_TAG_PCP_AND_DEI, "802.1Q C-TAG PCP/DEI"},
2115 { URSP_TC_TYPE_S_TAG_PCP_AND_DEI, "802.1Q S-TAG PCP/DEI"},
2116 { URSP_TC_TYPE_ETHER, "Ethertype"},
2117 { URSP_TC_TYPE_DNN, "DNN"},
2118 { URSP_TC_TYPE_CONNECTION_CAPABILITY, "Connection capabilities"},
2119 { URSP_TC_TYPE_FQDN, "Destination FQDN"},
2120 { URSP_TC_TYPE_APPID, "OS App Id"},
2121 { 0, NULL}
2123 static int* const ursp_tc_connection_capability_flags_fields[] = {
2124 &hf_mbim_ms_ursp_tc_connection_capability_flag_ims,
2125 &hf_mbim_ms_ursp_tc_connection_capability_flag_mms,
2126 &hf_mbim_ms_ursp_tc_connection_capability_flag_supl,
2127 &hf_mbim_ms_ursp_tc_connection_capability_flag_internet,
2128 NULL
2131 static void
2132 mbim_rssi_fmt(char *s, uint32_t val)
2134 if (val == 0) {
2135 snprintf(s, ITEM_LABEL_LENGTH, "-113 or less dBm (0)");
2136 } else if (val < 31) {
2137 snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -113 + 2*val, val);
2138 } else if (val == 31) {
2139 snprintf(s, ITEM_LABEL_LENGTH, "-51 or greater dBm (31)");
2140 } else if (val == 99) {
2141 snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (99)");
2142 } else {
2143 snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2147 static const value_string mbim_error_rate_vals[] = {
2148 { 0, "Frame error rate < 0.01%%"},
2149 { 1, "Frame error rate 0.01-0.1%%"},
2150 { 2, "Frame error rate 0.1-0.5%%"},
2151 { 3, "Frame error rate 0.5-1.0%%"},
2152 { 4, "Frame error rate 1.0-2.0%%"},
2153 { 5, "Frame error rate 2.0-4.0%%"},
2154 { 6, "Frame error rate 4.0-8.0%%"},
2155 { 7, "Frame error rate > 8.0%%"},
2156 { 99, "Unknown or undetectable"},
2157 { 0, NULL}
2160 static const value_string mbim_visible_providers_action_vals[] = {
2161 { 0, "Full Scan"},
2162 { 1, "Restricted Scan"},
2163 {0, NULL}
2166 static const value_string mbim_register_action_vals[] = {
2167 { 0, "Automatic"},
2168 { 1, "Manual"},
2169 { 0, NULL}
2172 static const value_string mbim_register_state_vals[] = {
2173 { 0, "Unknown"},
2174 { 1, "Deregistered"},
2175 { 2, "Searching"},
2176 { 3, "Home"},
2177 { 4, "Roaming"},
2178 { 5, "Partner"},
2179 { 6, "Denied"},
2180 { 0, NULL}
2183 static const value_string mbim_register_mode_vals[] = {
2184 { 0, "Unknown"},
2185 { 1, "Automatic"},
2186 { 2, "Manual"},
2187 { 0, NULL}
2190 static int * const mbim_registration_state_info_registration_flags_fields[] = {
2191 &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available,
2192 &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach,
2193 NULL
2196 static const value_string mbim_packet_service_action_vals[] = {
2197 { 0, "Attach"},
2198 { 1, "Detach"},
2199 { 0, NULL}
2202 static const value_string mbim_tai_list_type_vals[] = {
2203 { 0, "Non Consecutive TAC"},
2204 { 1, "Consecutive TAC"},
2205 { 2, "Multi PLMN TAC"},
2206 { 0, NULL}
2209 static const value_string mbim_packet_service_state_vals[] = {
2210 { 0, "Unknown"},
2211 { 1, "Attaching"},
2212 { 2, "Attached"},
2213 { 3, "Detaching"},
2214 { 4, "Detached"},
2215 { 0, NULL},
2218 static const value_string mbim_activation_command_vals[] = {
2219 { 0, "Deactivate"},
2220 { 1, "Activate"},
2221 { 0, NULL}
2224 static const value_string mbim_activation_option_vals[] = {
2225 { 0, "Default"},
2226 { 1, "Per Non Default URSP Rules"},
2227 { 2, "Per Default URSP Rules"},
2228 { 3, "Per URSP Rules"},
2229 { 0, NULL}
2232 static const value_string mbim_compression_vals[] = {
2233 { 0, "None"},
2234 { 1, "Enable"},
2235 { 0, NULL}
2238 static const value_string mbim_auth_protocol_vals[]= {
2239 { 0, "None"},
2240 { 1, "PAP"},
2241 { 2, "CHAP"},
2242 { 3, "MS CHAPv2"},
2243 { 0, NULL}
2246 static const value_string mbim_context_ip_type_vals[] = {
2247 { 0, "Default"},
2248 { 1, "IPv4"},
2249 { 2, "IPv6"},
2250 { 3, "IPv4v6"},
2251 { 4, "IPv4 and IPv6"},
2252 { 0, NULL}
2255 static const value_string mbim_activation_state_vals[] = {
2256 { 0, "Unknown"},
2257 { 1, "Activated"},
2258 { 2, "Activating"},
2259 { 3, "Deactivated"},
2260 { 4, "Deactivating"},
2261 { 0, NULL}
2264 static const value_string mbim_voice_call_state_vals[] = {
2265 { 0, "None"},
2266 { 1, "In Progress"},
2267 { 2, "Hang Up"},
2268 { 0, NULL}
2271 #define UUID_CONTEXT_NONE 0
2272 #define UUID_CONTEXT_INTERNET 1
2273 #define UUID_CONTEXT_VPN 2
2274 #define UUID_CONTEXT_VOICE 3
2275 #define UUID_CONTEXT_VIDEO_SHARE 4
2276 #define UUID_CONTEXT_PURCHASE 5
2277 #define UUID_CONTEXT_IMS 6
2278 #define UUID_CONTEXT_MMS 7
2279 #define UUID_CONTEXT_LOCAL 8
2280 #define UUID_CONTEXT_MS_ADMIN 9
2281 #define UUID_CONTEXT_MS_APP 10
2282 #define UUID_CONTEXT_MS_XCAP 11
2283 #define UUID_CONTEXT_MS_TETHERING 12
2284 #define UUID_CONTEXT_MS_EMERGENCY_CALLING 13
2286 static const struct mbim_uuid mbim_uuid_context_type_vals[] = {
2287 { UUID_CONTEXT_NONE, {0xb43f758c, 0xa560, 0x4b46, {0xb3, 0x5e, 0xc5, 0x86, 0x96, 0x41, 0xfb, 0x54}}},
2288 { UUID_CONTEXT_INTERNET, {0x7e5e2a7e, 0x4e6f, 0x7272, {0x73, 0x6b, 0x65, 0x6e, 0x7e, 0x5e, 0x2a, 0x7e}}},
2289 { UUID_CONTEXT_VPN, {0x9b9f7bbe, 0x8952, 0x44b7, {0x83, 0xac, 0xca, 0x41, 0x31, 0x8d, 0xf7, 0xa0}}},
2290 { UUID_CONTEXT_VOICE, {0x88918294, 0x0ef4, 0x4396, {0x8c, 0xca, 0xa8, 0x58, 0x8f, 0xbc, 0x02, 0xb2}}},
2291 { UUID_CONTEXT_VIDEO_SHARE, {0x05a2a716, 0x7c34, 0x4b4d, {0x9a, 0x91, 0xc5, 0xef, 0x0c, 0x7a, 0xaa, 0xcc}}},
2292 { UUID_CONTEXT_PURCHASE, {0xb3272496, 0xac6c, 0x422b, {0xa8, 0xc0, 0xac, 0xf6, 0x87, 0xa2, 0x72, 0x17}}},
2293 { UUID_CONTEXT_IMS, {0x21610D01, 0x3074, 0x4BCE, {0x94, 0x25, 0xB5, 0x3A, 0x07, 0xD6, 0x97, 0xD6}}},
2294 { UUID_CONTEXT_MMS, {0x46726664, 0x7269, 0x6bc6, {0x96, 0x24, 0xd1, 0xd3, 0x53, 0x89, 0xac, 0xa9}}},
2295 { UUID_CONTEXT_LOCAL, {0xa57a9afc, 0xb09f, 0x45d7, {0xbb, 0x40, 0x03, 0x3c, 0x39, 0xf6, 0x0d, 0xb9}}},
2296 { UUID_CONTEXT_MS_ADMIN, {0x5f7e4c2e, 0xe80b, 0x40a9, {0xa2, 0x39, 0xf0, 0xab, 0xcf, 0xd1, 0x1f, 0x4b}}},
2297 { UUID_CONTEXT_MS_APP, {0x74d88a3d, 0xdfbd, 0x4799, {0x9a, 0x8c, 0x73, 0x10, 0xa3, 0x7b, 0xb2, 0xee}}},
2298 { UUID_CONTEXT_MS_XCAP, {0x50d378a7, 0xbaa5, 0x4a50, {0xb8, 0x72, 0x3f, 0xe5, 0xbb, 0x46, 0x34, 0x11}}},
2299 { UUID_CONTEXT_MS_TETHERING, {0x5e4e0601, 0x48dc, 0x4e2b, {0xac, 0xb8, 0x08, 0xb4, 0x01, 0x6b, 0xba, 0xac}}},
2300 { UUID_CONTEXT_MS_EMERGENCY_CALLING, {0x5f41adb8, 0x204e, 0x4d31, {0x9d, 0xa8, 0xb3, 0xc9, 0x70, 0xe3, 0x60, 0xf2}}}
2303 static const value_string mbim_context_type_vals[] = {
2304 { UUID_CONTEXT_NONE, "None"},
2305 { UUID_CONTEXT_INTERNET, "Internet"},
2306 { UUID_CONTEXT_VPN, "VPN"},
2307 { UUID_CONTEXT_VOICE, "Voice"},
2308 { UUID_CONTEXT_VIDEO_SHARE, "Video Share"},
2309 { UUID_CONTEXT_PURCHASE, "Purchase"},
2310 { UUID_CONTEXT_IMS, "IMS"},
2311 { UUID_CONTEXT_MMS, "MMS"},
2312 { UUID_CONTEXT_LOCAL, "Local"},
2313 { UUID_CONTEXT_MS_ADMIN, "MS Administrative Purposes"},
2314 { UUID_CONTEXT_MS_APP, "MS Operator App"},
2315 { UUID_CONTEXT_MS_XCAP, "MS XCAP Provisioning for IMS"},
2316 { UUID_CONTEXT_MS_TETHERING, "MS Mobile Hotspot Tethering"},
2317 { UUID_CONTEXT_MS_EMERGENCY_CALLING, "MS IMS Emergency Calling"},
2318 { 0, NULL}
2321 static int * const mbim_ip_configuration_info_ipv4_configuration_available_fields[] = {
2322 &hf_mbim_ip_configuration_info_ipv4_configuration_available_address,
2323 &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway,
2324 &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns,
2325 &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu,
2326 NULL
2329 static int * const mbim_ip_configuration_info_ipv6_configuration_available_fields[] = {
2330 &hf_mbim_ip_configuration_info_ipv6_configuration_available_address,
2331 &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway,
2332 &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns,
2333 &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu,
2334 NULL
2337 static int * const mbim_device_service_element_dss_payload_fields[] = {
2338 &hf_mbim_device_service_element_dss_payload_host_device,
2339 &hf_mbim_device_service_element_dss_payload_device_host,
2340 NULL
2343 static const value_string mbim_network_idle_hint_states_vals[] = {
2344 { 0, "Disabled"},
2345 { 1, "Enabled"},
2346 { 0, NULL}
2349 static const value_string mbim_emergency_mode_states_vals[] = {
2350 { 0, "Off"},
2351 { 1, "On"},
2352 { 0, NULL}
2355 static const value_string mbim_sms_storage_state_vals[] = {
2356 { 0, "Not Initialized"},
2357 { 1, "Initialized"},
2358 { 0, NULL}
2361 #define MBIM_SMS_FORMAT_PDU 0
2362 #define MBIM_SMS_FORMAT_CDMA 1
2364 static const value_string mbim_sms_format_vals[] = {
2365 { MBIM_SMS_FORMAT_PDU, "PDU"},
2366 { MBIM_SMS_FORMAT_CDMA, "CDMA"},
2367 { 0, NULL}
2370 static const value_string mbim_sms_flag_vals[] = {
2371 { 0, "All"},
2372 { 1, "Index"},
2373 { 2, "New"},
2374 { 3, "Old"},
2375 { 4, "Sent"},
2376 { 5, "Draft"},
2377 { 0, NULL}
2380 static const value_string mbim_sms_cdma_lang_vals[] = {
2381 { 0, "Unknown"},
2382 { 1, "English"},
2383 { 2, "French"},
2384 { 3, "Spanish"},
2385 { 4, "Japanese"},
2386 { 5, "Korean"},
2387 { 6, "Chinese"},
2388 { 7, "Hebrew"},
2389 { 0, NULL}
2392 #define MBIM_ENCODING_OCTET 0
2393 #define MBIM_ENCODING_EPM 1
2394 #define MBIM_ENCODING_7BIT_ASCII 2
2395 #define MBIM_ENCODING_IA5 3
2396 #define MBIM_ENCODING_UNICODE 4
2397 #define MBIM_ENCODING_SHIFT_JIS 5
2398 #define MBIM_ENCODING_KOREAN 6
2399 #define MBIM_ENCODING_LATIN_HEBREW 7
2400 #define MBIM_ENCODING_LATIN 8
2401 #define MBIM_ENCODING_GSM_7BIT 9
2403 static const value_string mbim_sms_cdma_encoding_vals[] = {
2404 { MBIM_ENCODING_OCTET, "Octet"},
2405 { MBIM_ENCODING_EPM, "EPM"},
2406 { MBIM_ENCODING_7BIT_ASCII, "7 Bit ASCII"},
2407 { MBIM_ENCODING_IA5, "IA5"},
2408 { MBIM_ENCODING_UNICODE, "Unicode"},
2409 { MBIM_ENCODING_SHIFT_JIS, "Shift-JIS"},
2410 { MBIM_ENCODING_KOREAN, "Korean"},
2411 { MBIM_ENCODING_LATIN_HEBREW, "Latin Hebrew"},
2412 { MBIM_ENCODING_LATIN, "Latin"},
2413 { MBIM_ENCODING_GSM_7BIT, "GSM 7 Bit"},
2414 { 0, NULL}
2417 static const value_string mbim_sms_message_status_vals[] = {
2418 { 0, "New"},
2419 { 1, "Old"},
2420 { 2, "Draft"},
2421 { 3, "Sent"},
2422 { 0, NULL}
2425 static int * const mbim_sms_status_info_flags_fields[] = {
2426 &hf_mbim_sms_status_info_flags_message_store_full,
2427 &hf_mbim_sms_status_info_flags_new_message,
2428 NULL
2431 static const value_string mbim_ussd_action_vals[] = {
2432 { 0, "Initiate"},
2433 { 1, "Continue"},
2434 { 2, "Cancel"},
2435 { 0, NULL}
2438 static const value_string mbim_ussd_response_vals[] = {
2439 { 0, "No Action Required"},
2440 { 1, "Action Required"},
2441 { 2, "Terminated By NW"},
2442 { 3, "Other Local Client"},
2443 { 4, "Operation Not Supported"},
2444 { 5, "Network Time Out"},
2445 { 0, NULL}
2448 static const value_string mbim_ussd_session_state_vals[] = {
2449 { 0, "New Session"},
2450 { 1, "Existing Session"},
2451 { 0, NULL}
2454 static const value_string mbim_phonebook_state_vals[] = {
2455 { 0, "Not Initialized"},
2456 { 1, "Initialized"},
2457 { 0, NULL}
2460 static const value_string mbim_phonebook_flag_vals[] = {
2461 { 0, "All"},
2462 { 1, "Index"},
2463 { 0, NULL}
2466 static const value_string mbim_phonebook_write_flag_vals[] = {
2467 { 0, "Unused"},
2468 { 1, "Index"},
2469 { 0, NULL}
2472 static const true_false_string mbim_pac_host_control_val = {
2473 "Host wants to handle command",
2474 "Host does not want to handle command"
2477 static const value_string mbim_stk_pac_profile_vals[] = {
2478 { 0, "Not Handled By Function Cannot Be Handled By Host"},
2479 { 1, "Not Handled By Function May Be Handled By Host"},
2480 { 2, "Handled By Function Only Transparent To Host"},
2481 { 3, "Handled By Function Notification To Host Possible"},
2482 { 4, "Handled By Function Notification To Host Enabled"},
2483 { 5, "Handled By Function Can Be Overridden By Host"},
2484 { 6, "Handled By Host Function Not Able To Handle"},
2485 { 7, "Handled By Host Function Able To Handle"},
2486 { 0, NULL}
2489 static const value_string mbim_stk_pac_type_vals[] = {
2490 { 0, "Proactive Command"},
2491 { 1, "Notification"},
2492 { 0, NULL}
2495 static const value_string mbim_dss_link_state_vals[] = {
2496 { 0, "Deactivate"},
2497 { 1, "Activate"},
2498 { 0, NULL}
2501 static int * const mbim_multicarrier_capabilities_fields[] = {
2502 &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan,
2503 &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot,
2504 NULL
2507 static const value_string mbim_geoid_vals[] = {
2508 { 0x2, "Antigua and Barbuda"},
2509 { 0x3, "Afghanistan"},
2510 { 0x4, "Algeria"},
2511 { 0x5, "Azerbaijan"},
2512 { 0x6, "Albania"},
2513 { 0x7, "Armenia"},
2514 { 0x8, "Andorra"},
2515 { 0x9, "Angola"},
2516 { 0xA, "American Samoa"},
2517 { 0xB, "Argentina"},
2518 { 0xC, "Australia"},
2519 { 0xE, "Austria"},
2520 { 0x11, "Bahrain"},
2521 { 0x12, "Barbados"},
2522 { 0x13, "Botswana"},
2523 { 0x14, "Bermuda"},
2524 { 0x15, "Belgium"},
2525 { 0x16, "Bahamas, The"},
2526 { 0x17, "Bangladesh"},
2527 { 0x18, "Belize"},
2528 { 0x19, "Bosnia and Herzegovina"},
2529 { 0x1A, "Bolivia"},
2530 { 0x1B, "Myanmar"},
2531 { 0x1C, "Benin"},
2532 { 0x1D, "Belarus"},
2533 { 0x1E, "Solomon Islands"},
2534 { 0x20, "Brazil"},
2535 { 0x22, "Bhutan"},
2536 { 0x23, "Bulgaria"},
2537 { 0x25, "Brunei"},
2538 { 0x26, "Burundi"},
2539 { 0x27, "Canada"},
2540 { 0x28, "Cambodia"},
2541 { 0x29, "Chad"},
2542 { 0x2A, "Sri Lanka"},
2543 { 0x2B, "Congo"},
2544 { 0x2C, "Congo (DRC)"},
2545 { 0x2D, "China"},
2546 { 0x2E, "Chile"},
2547 { 0x31, "Cameroon"},
2548 { 0x32, "Comoros"},
2549 { 0x33, "Colombia"},
2550 { 0x36, "Costa Rica"},
2551 { 0x37, "Central African Republic"},
2552 { 0x38, "Cuba"},
2553 { 0x39, "Cape Verde"},
2554 { 0x3B, "Cyprus"},
2555 { 0x3D, "Denmark"},
2556 { 0x3E, "Djibouti"},
2557 { 0x3F, "Dominica"},
2558 { 0x41, "Dominican Republic"},
2559 { 0x42, "Ecuador"},
2560 { 0x43, "Egypt"},
2561 { 0x44, "Ireland"},
2562 { 0x45, "Equatorial Guinea"},
2563 { 0x46, "Estonia"},
2564 { 0x47, "Eritrea"},
2565 { 0x48, "El Salvador"},
2566 { 0x49, "Ethiopia"},
2567 { 0x4B, "Czech Republic"},
2568 { 0x4D, "Finland"},
2569 { 0x4E, "Fiji Islands"},
2570 { 0x50, "Micronesia"},
2571 { 0x51, "Faroe Islands"},
2572 { 0x54, "France"},
2573 { 0x56, "Gambia, The"},
2574 { 0x57, "Gabon"},
2575 { 0x58, "Georgia"},
2576 { 0x59, "Ghana"},
2577 { 0x5A, "Gibraltar"},
2578 { 0x5B, "Grenada"},
2579 { 0x5D, "Greenland"},
2580 { 0x5E, "Germany"},
2581 { 0x62, "Greece"},
2582 { 0x63, "Guatemala"},
2583 { 0x64, "Guinea"},
2584 { 0x65, "Guyana"},
2585 { 0x67, "Haiti"},
2586 { 0x68, "Hong Kong S.A.R."},
2587 { 0x6A, "Honduras"},
2588 { 0x6C, "Croatia"},
2589 { 0x6D, "Hungary"},
2590 { 0x6E, "Iceland"},
2591 { 0x6F, "Indonesia"},
2592 { 0x71, "India"},
2593 { 0x72, "British Indian Ocean Territory"},
2594 { 0x74, "Iran"},
2595 { 0x75, "Israel"},
2596 { 0x76, "Italy"},
2597 { 0x77, "Cote d'Ivoire"},
2598 { 0x79, "Iraq"},
2599 { 0x7A, "Japan"},
2600 { 0x7C, "Jamaica"},
2601 { 0x7D, "Jan Mayen"},
2602 { 0x7E, "Jordan"},
2603 { 0x7F, "Johnston Atoll"},
2604 { 0x81, "Kenya"},
2605 { 0x82, "Kyrgyzstan"},
2606 { 0x83, "North Korea"},
2607 { 0x85, "Kiribati"},
2608 { 0x86, "Korea"},
2609 { 0x88, "Kuwait"},
2610 { 0x89, "Kazakhstan"},
2611 { 0x8A, "Laos"},
2612 { 0x8B, "Lebanon"},
2613 { 0x8C, "Latvia"},
2614 { 0x8D, "Lithuania"},
2615 { 0x8E, "Liberia"},
2616 { 0x8F, "Slovakia"},
2617 { 0x91, "Liechtenstein"},
2618 { 0x92, "Lesotho"},
2619 { 0x93, "Luxembourg"},
2620 { 0x94, "Libya"},
2621 { 0x95, "Madagascar"},
2622 { 0x97, "Macao S.A.R."},
2623 { 0x98, "Moldova"},
2624 { 0x9A, "Mongolia"},
2625 { 0x9C, "Malawi"},
2626 { 0x9D, "Mali"},
2627 { 0x9E, "Monaco"},
2628 { 0x9F, "Morocco"},
2629 { 0xA0, "Mauritius"},
2630 { 0xA2, "Mauritania"},
2631 { 0xA3, "Malta"},
2632 { 0xA4, "Oman"},
2633 { 0xA5, "Maldives"},
2634 { 0xA6, "Mexico"},
2635 { 0xA7, "Malaysia"},
2636 { 0xA8, "Mozambique"},
2637 { 0xAD, "Niger"},
2638 { 0xAE, "Vanuatu"},
2639 { 0xAF, "Nigeria"},
2640 { 0xB0, "Netherlands"},
2641 { 0xB1, "Norway"},
2642 { 0xB2, "Nepal"},
2643 { 0xB4, "Nauru"},
2644 { 0xB5, "Suriname"},
2645 { 0xB6, "Nicaragua"},
2646 { 0xB7, "New Zealand"},
2647 { 0xB8, "Palestinian Authority"},
2648 { 0xB9, "Paraguay"},
2649 { 0xBB, "Peru"},
2650 { 0xBE, "Pakistan"},
2651 { 0xBF, "Poland"},
2652 { 0xC0, "Panama"},
2653 { 0xC1, "Portugal"},
2654 { 0xC2, "Papua New Guinea"},
2655 { 0xC3, "Palau"},
2656 { 0xC4, "Guinea-Bissau"},
2657 { 0xC5, "Qatar"},
2658 { 0xC6, "Reunion"},
2659 { 0xC7, "Marshall Islands"},
2660 { 0xC8, "Romania"},
2661 { 0xC9, "Philippines"},
2662 { 0xCA, "Puerto Rico"},
2663 { 0xCB, "Russia"},
2664 { 0xCC, "Rwanda"},
2665 { 0xCD, "Saudi Arabia"},
2666 { 0xCE, "St. Pierre and Miquelon"},
2667 { 0xCF, "St. Kitts and Nevis"},
2668 { 0xD0, "Seychelles"},
2669 { 0xD1, "South Africa"},
2670 { 0xD2, "Senegal"},
2671 { 0xD4, "Slovenia"},
2672 { 0xD5, "Sierra Leone"},
2673 { 0xD6, "San Marino"},
2674 { 0xD7, "Singapore"},
2675 { 0xD8, "Somalia"},
2676 { 0xD9, "Spain"},
2677 { 0xDA, "St. Lucia"},
2678 { 0xDB, "Sudan"},
2679 { 0xDC, "Svalbard"},
2680 { 0xDD, "Sweden"},
2681 { 0xDE, "Syria"},
2682 { 0xDF, "Switzerland"},
2683 { 0xE0, "United Arab Emirates"},
2684 { 0xE1, "Trinidad and Tobago"},
2685 { 0xE3, "Thailand"},
2686 { 0xE4, "Tajikistan"},
2687 { 0xE7, "Tonga"},
2688 { 0xE8, "Togo"},
2689 { 0xE9, "Sao Tome and Principe"},
2690 { 0xEA, "Tunisia"},
2691 { 0xEB, "Turkey"},
2692 { 0xEC, "Tuvalu"},
2693 { 0xED, "Taiwan"},
2694 { 0xEE, "Turkmenistan"},
2695 { 0xEF, "Tanzania"},
2696 { 0xF0, "Uganda"},
2697 { 0xF1, "Ukraine"},
2698 { 0xF2, "United Kingdom"},
2699 { 0xF4, "United States"},
2700 { 0xF5, "Burkina Faso"},
2701 { 0xF6, "Uruguay"},
2702 { 0xF7, "Uzbekistan"},
2703 { 0xF8, "St. Vincent and the Grenadines"},
2704 { 0xF9, "Venezuela"},
2705 { 0xFB, "Vietnam"},
2706 { 0xFC, "Virgin Islands"},
2707 { 0xFD, "Vatican City"},
2708 { 0xFE, "Namibia"},
2709 { 0x101, "Western Sahara (disputed)"},
2710 { 0x102, "Wake Island"},
2711 { 0x103, "Samoa"},
2712 { 0x104, "Swaziland"},
2713 { 0x105, "Yemen"},
2714 { 0x107, "Zambia"},
2715 { 0x108, "Zimbabwe"},
2716 { 0x10D, "Serbia and Montenegro (Former)"},
2717 { 0x10E, "Montenegro"},
2718 { 0x10F, "Serbia"},
2719 { 0x111, "Curacao"},
2720 { 0x114, "South Sudan"},
2721 { 0x12C, "Anguilla"},
2722 { 0x12D, "Antarctica"},
2723 { 0x12E, "Aruba"},
2724 { 0x12F, "Ascension Island"},
2725 { 0x130, "Ashmore and Cartier Islands"},
2726 { 0x131, "Baker Island"},
2727 { 0x132, "Bouvet Island"},
2728 { 0x133, "Cayman Islands"},
2729 { 0x135, "Christmas Island"},
2730 { 0x136, "Clipperton Island"},
2731 { 0x137, "Cocos (Keeling) Islands"},
2732 { 0x138, "Cook Islands"},
2733 { 0x139, "Coral Sea Islands"},
2734 { 0x13A, "Diego Garcia"},
2735 { 0x13B, "Falkland Islands (Islas Malvinas)"},
2736 { 0x13D, "French Guiana"},
2737 { 0x13E, "French Polynesia"},
2738 { 0x13F, "French Southern and Antarctic Lands"},
2739 { 0x141, "Guadeloupe"},
2740 { 0x142, "Guam"},
2741 { 0x143, "Guantanamo Bay"},
2742 { 0x144, "Guernsey"},
2743 { 0x145, "Heard Island and McDonald Islands"},
2744 { 0x146, "Howland Island"},
2745 { 0x147, "Jarvis Island"},
2746 { 0x148, "Jersey"},
2747 { 0x149, "Kingman Reef"},
2748 { 0x14A, "Martinique"},
2749 { 0x14B, "Mayotte"},
2750 { 0x14C, "Montserrat"},
2751 { 0x14E, "New Caledonia"},
2752 { 0x14F, "Niue"},
2753 { 0x150, "Norfolk Island"},
2754 { 0x151, "Northern Mariana Islands"},
2755 { 0x152, "Palmyra Atoll"},
2756 { 0x153, "Pitcairn Islands"},
2757 { 0x154, "Rota Island"},
2758 { 0x155, "Saipan"},
2759 { 0x156, "South Georgia and the South Sandwich Islands"},
2760 { 0x157, "St. Helena"},
2761 { 0x15A, "Tinian Island"},
2762 { 0x15B, "Tokelau"},
2763 { 0x15C, "Tristan da Cunha"},
2764 { 0x15D, "Turks and Caicos Islands"},
2765 { 0x15F, "Virgin Islands, British"},
2766 { 0x160, "Wallis and Futuna"},
2767 { 0x3B16, "Man, Isle of"},
2768 { 0x4CA2, "Macedonia, Former Yugoslav Republic of"},
2769 { 0x52FA, "Midway Islands"},
2770 { 0x78F7, "Sint Maarten (Dutch part)"},
2771 { 0x7BDA, "Saint Martin (French part)"},
2772 { 0x6F60E7, "Democratic Republic of Timor-Leste"},
2773 { 0x9906F5, "Aland Islands"},
2774 { 0x9A55C4F, "Saint Barthelemy"},
2775 { 0x9A55D40, "U.S. Minor Outlying Islands"},
2776 { 0x9A55D42, "Bonaire, Saint Eustatius and Saba"},
2777 { 0, NULL}
2779 static value_string_ext mbim_geoid_vals_ext = VALUE_STRING_EXT_INIT(mbim_geoid_vals);
2781 static int * const mbim_descriptor_network_capabilities_fields[] = {
2782 &hf_mbim_descriptor_network_capabilities_max_datagram_size,
2783 &hf_mbim_descriptor_network_capabilities_ntb_input_size,
2784 NULL
2787 static const value_string mbim_thermal_config_enable_vals[] = {
2788 { 0, "Disable"},
2789 { 1, "Enable"},
2790 { 0, NULL}
2793 static const value_string mbim_sar_status_vals[] = {
2794 { 0, "Disabled"},
2795 { 1, "Enabled"},
2796 { 0, NULL}
2799 static const value_string mbim_ms_sar_config_sar_mode_vals[] = {
2800 { 0, "Device"},
2801 { 1, "OS"},
2802 { 0, NULL}
2805 static const value_string mbim_ms_sar_config_sar_wifi_integration_vals[] = {
2806 { 0, "Not Integrated"},
2807 { 1, "Integrated"},
2808 { 0, NULL}
2811 static void
2812 mbim_degrees_fmt(char *s, uint32_t v)
2814 snprintf(s, ITEM_LABEL_LENGTH, "%.1f Degrees Celsius (%u)", (float)v/10.0, v);
2817 static const value_string mbim_adpclk_activate_state_vals[] = {
2818 { 0, "Deactivate"},
2819 { 1, "Activate"},
2820 { 0, NULL}
2823 static const value_string mbim_connect_status_vals[] = {
2824 { 0, "Disconnected from the Base Station"},
2825 { 1, "Connected to the Base Station"},
2826 { 0, NULL}
2829 static const value_string mbim_trace_config_vals[] = {
2830 { 0, "Tracing disabled"},
2831 { 1, "Default configuration for tracing"},
2832 { 0, NULL}
2835 static const value_string mbim_ber_vals[] = {
2836 { 0, "BER < 0,2%%"},
2837 { 1, "0,2%% < BER < 0,4%%"},
2838 { 2, "0,4%% < BER < 0,8%%"},
2839 { 3, "0,8%% < BER < 1,6%%"},
2840 { 4, "1,6%% < BER < 3,2%%"},
2841 { 5, "3,2%% < BER < 6,4%%"},
2842 { 6, "6,4%% < BER < 12,8%%"},
2843 { 7, "12,8%% < BER"},
2844 { 99, "Unknown or undetectable"},
2845 { 0, NULL}
2848 static void
2849 mbim_rscp_fmt(char *s, uint32_t val)
2851 if (val == 0) {
2852 snprintf(s, ITEM_LABEL_LENGTH, "-120 or less dBm (0)");
2853 } else if (val < 96) {
2854 snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -120 + val, val);
2855 } else if (val == 96) {
2856 snprintf(s, ITEM_LABEL_LENGTH, "-24 or greater dBm (96)");
2857 } else if (val == 255) {
2858 snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2859 } else {
2860 snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2864 static void
2865 mbim_ecno_fmt(char *s, uint32_t val)
2867 if (val == 0) {
2868 snprintf(s, ITEM_LABEL_LENGTH, "-24 or less dBm (0)");
2869 } else if (val < 49) {
2870 snprintf(s, ITEM_LABEL_LENGTH, "%.1f dBm (%u)", -24 + ((float)val/2), val);
2871 } else if (val == 49) {
2872 snprintf(s, ITEM_LABEL_LENGTH, "0.5 or greater dBm (49)");
2873 } else if (val == 255) {
2874 snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2875 } else {
2876 snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2880 static void
2881 mbim_rsrq_fmt(char *s, uint32_t val)
2883 if (val == 0) {
2884 snprintf(s, ITEM_LABEL_LENGTH, "-19.5 or less dBm (0)");
2885 } else if (val < 34) {
2886 snprintf(s, ITEM_LABEL_LENGTH, "%.1f dBm (%u)", -19.5 + ((float)val/2), val);
2887 } else if (val == 34) {
2888 snprintf(s, ITEM_LABEL_LENGTH, "-2.5 or greater dBm (34)");
2889 } else if (val == 255) {
2890 snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2891 } else {
2892 snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2896 static void
2897 mbim_rsrp_fmt(char *s, uint32_t val)
2899 if (val == 0) {
2900 snprintf(s, ITEM_LABEL_LENGTH, "-140 or less dBm (0)");
2901 } else if (val < 97) {
2902 snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -140 + val, val);
2903 } else if (val == 97) {
2904 snprintf(s, ITEM_LABEL_LENGTH, "-43 or greater dBm (97)");
2905 } else if (val == 255) {
2906 snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2907 } else {
2908 snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2912 static void
2913 mbim_rssnr_fmt(char *s, uint32_t val)
2915 if (val == 0) {
2916 snprintf(s, ITEM_LABEL_LENGTH, "-5 or less dB (0)");
2917 } else if (val < 35) {
2918 snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%u)", -5 + val, val);
2919 } else if (val == 35) {
2920 snprintf(s, ITEM_LABEL_LENGTH, "30 or greater dB (35)");
2921 } else if (val == 255) {
2922 snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2923 } else {
2924 snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2928 static void
2929 mbim_rsrp_signal_state_fmt(char *s, uint32_t val)
2931 if (val == 0) {
2932 snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)");
2933 } else if (val < 126) {
2934 snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", val - 157, val - 156, val);
2935 } else if (val == 126) {
2936 snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)");
2937 } else {
2938 snprintf(s, ITEM_LABEL_LENGTH, "invalid (127)");
2942 static void
2943 mbim_snr_signal_state_fmt(char *s, uint32_t val)
2945 if (val == 0) {
2946 snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)");
2947 } else if (val < 127) {
2948 snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)val - 1) / 2) - 23, ((float)val / 2) - 23, val);
2949 } else if (val == 127){
2950 snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)");
2951 } else {
2952 snprintf(s, ITEM_LABEL_LENGTH, "invalid (128)");
2956 static void
2957 mbim_version_fmt(char* s, uint32_t val)
2959 snprintf(s, ITEM_LABEL_LENGTH, "%u.%u", val / 256, val % 256);
2962 static const value_string mbim_atds_operator_plmn_mode_vals[] = {
2963 { 0, "GSM"},
2964 { 6, "UTRAN"},
2965 { 7, "LTE"},
2966 { 0, NULL}
2969 static const value_string mbim_adts_rat_info_mode_vals[]= {
2970 { 0, "Automatic"},
2971 { 1, "2G only"},
2972 { 2, "3G only"},
2973 { 3, "4G only"},
2974 { 0, NULL}
2977 static const value_string mbim_adts_projection_table_type_vals[]= {
2978 { 0, "RSSI"},
2979 { 1, "RSCP"},
2980 { 2, "Ec/No"},
2981 { 3, "RSRP"},
2982 { 7, "RS SNR"},
2983 { 0, NULL}
2986 static void
2987 mbim_projection_table_coeff_fmt(char *s, uint32_t val)
2989 int32_t coeff = (int32_t)val;
2991 snprintf(s, ITEM_LABEL_LENGTH, "%.3f (%d)", ((float)coeff)/1000, coeff);
2994 #define MBIM_NDP_CTRL_MULTIFLOW_STATUS 0
2996 static const value_string mbim_ndp_ctrl_msg_type_vals[] = {
2997 { MBIM_NDP_CTRL_MULTIFLOW_STATUS, "MULTIFLOW_STATUS"},
2998 { 0, NULL}
3001 static const value_string mbim_ndp_ctrl_multiflow_status_vals[] = {
3002 { 0, "OK"},
3003 { 1, "High Watermark"},
3004 { 2, "Low Watermark"},
3005 { 0, NULL}
3008 static int * const mbim_multiflow_caps_info_control_caps_fields[] = {
3009 &hf_mbim_multiflow_caps_info_control_caps_uplink,
3010 &hf_mbim_multiflow_caps_info_control_caps_downlink,
3011 NULL
3014 static const value_string mbim_multiflow_state_vals[] = {
3015 { 0, "Off"},
3016 { 1, "On"},
3017 { 0, NULL}
3020 static const value_string mbim_ms_context_roaming_control_vals[] = {
3021 { 0, "HomeOnly"},
3022 { 1, "PartnerOnly"},
3023 { 2, "NonPartnerOnly"},
3024 { 3, "HomeAndPartner"},
3025 { 4, "HomeAndNonPartner"},
3026 { 5, "PartnerAndNonPartner"},
3027 { 6, "AllowAll"},
3028 { 0, NULL}
3031 static const value_string mbim_ms_context_media_type_vals[] = {
3032 { 0, "CellularOnly"},
3033 { 1, "WifiOnly"},
3034 { 2, "All"},
3035 { 0, NULL}
3038 static const value_string mbim_ms_context_enable_vals[] = {
3039 { 0, "Disabled"},
3040 { 1, "Enabled"},
3041 { 0, NULL}
3044 static const value_string mbim_ms_context_source_vals[] = {
3045 { 0, "Admin"},
3046 { 1, "User"},
3047 { 2, "Operator"},
3048 { 3, "Modem"},
3049 { 4, "Device"},
3050 { 0, NULL}
3053 static const value_string mbim_ms_context_operations_vals[] = {
3054 { 0, "Default"},
3055 { 1, "Delete"},
3056 { 2, "RestoreFactory"},
3057 { 0, NULL}
3060 static const value_string mbim_ms_set_lte_attach_operations_vals[] = {
3061 { 0, "Default"},
3062 { 2, "RestoreFactory"},
3063 { 0, NULL}
3066 static const value_string mbim_ms_lte_attach_state_vals[] = {
3067 { 0, "Detached"},
3068 { 1, "Attached"},
3069 { 0, NULL}
3072 static int * const mbim_ms_network_blacklist_state_fields[] = {
3073 &hf_mbim_ms_network_blacklist_state_sim_provider_actuated,
3074 &hf_mbim_ms_network_blacklist_state_network_provider_actuated,
3075 NULL
3078 static const value_string mbim_ms_network_blacklist_type_vals[] = {
3079 { 0, "SIM"},
3080 { 1, "Network"},
3081 { 0, NULL}
3084 static const value_string mbim_ms_uiccslot_state_vals[] = {
3085 { 0, "Unknown"},
3086 { 1, "OffEmpty"},
3087 { 2, "Off"},
3088 { 3, "Empty"},
3089 { 4, "NotReady"},
3090 { 5, "Active"},
3091 { 6, "Error"},
3092 { 7, "ActiveEsim"},
3093 { 8, "ActiveEsimNoProfiles"},
3094 { 0, NULL}
3097 static const value_string mbim_base_station_serving_cell_flag_vals[] = {
3098 { 0, "Neighbor Cell"},
3099 { 1, "Serving cell"},
3100 { 0, NULL}
3103 static const value_string mbim_ms_uicc_app_type_vals[] = {
3104 { 0, "Unknown"},
3105 { 1, "Mf"},
3106 { 2, "SIM"},
3107 { 3, "RUIM"},
3108 { 4, "USIM"},
3109 { 5, "CSIM"},
3110 { 6, "ISIM"},
3111 { 0, NULL}
3113 static const value_string mbim_ms_apdu_secure_messaging_vals[] = {
3114 { 0, "None"},
3115 { 1, "No Hdr Auth"},
3116 { 0, NULL}
3118 static const value_string mbim_ms_apdu_type_vals[] = {
3119 { 0, "Interindustry"},
3120 { 1, "Extended"},
3121 { 0, NULL}
3123 static const value_string mbim_ms_reset_pass_through_action_vals[] = {
3124 { 0, "Disabled"},
3125 { 1, "Enabled"},
3126 { 0, NULL}
3129 static const value_string mbim_uicc_file_accessibility_vals[] = {
3130 { 0, "Unknown"},
3131 { 1, "NotShareable"},
3132 { 2, "Shareable"},
3133 { 0, NULL}
3136 static const value_string mbim_uicc_file_type_vals[] = {
3137 { 0, "Unknown"},
3138 { 1, "WorkingEf"},
3139 { 2, "InternalEf"},
3140 { 3, "DfOrAdf"},
3141 { 0, NULL}
3144 static const value_string mbim_uicc_file_structure_vals[] = {
3145 { 0, "Unknown"},
3146 { 1, "Transparent"},
3147 { 2, "Cyclic"},
3148 { 3, "Linear"},
3149 { 4, "BerTLV"},
3150 { 0, NULL}
3153 static void mbim_dissect_tlv_ie(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset);
3155 static uint8_t
3156 mbim_dissect_service_id_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int hf,
3157 int *offset, struct mbim_uuid_ext **uuid_ext_info, bool is_net_guid)
3159 e_guid_t uuid;
3160 unsigned i;
3161 uint32_t uuid_ext[4];
3163 if (is_net_guid)
3165 tvb_get_ntohguid(tvb, *offset, &uuid);
3167 else
3169 tvb_get_letohguid(tvb, *offset, &uuid);
3171 for (i = 0; i < UUID_MAX; i++) {
3172 if (memcmp(&uuid, &(mbim_uuid_service_id_vals[i].uuid), sizeof(e_guid_t)) == 0) {
3173 break;
3177 if ((i == UUID_MAX) && mbim_uuid_ext_hash && uuid_ext_info) {
3178 /* Let's check if UUID is known in extension table */
3179 uuid_ext[0] = tvb_get_ntohl(tvb, *offset);
3180 uuid_ext[1] = tvb_get_ntohl(tvb, *offset + 4);
3181 uuid_ext[2] = tvb_get_ntohl(tvb, *offset + 8);
3182 uuid_ext[3] = tvb_get_ntohl(tvb, *offset + 12);
3184 *uuid_ext_info = (struct mbim_uuid_ext *)wmem_map_lookup(mbim_uuid_ext_hash, uuid_ext);
3185 if (*uuid_ext_info) {
3186 proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)",
3187 (*uuid_ext_info)->uuid_name, guid_to_str(pinfo->pool, &uuid));
3188 *offset += 16;
3189 return UUID_EXT_IDX;
3193 proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)",
3194 val_to_str_ext_const(i, &mbim_service_id_vals_ext, "Unknown"),
3195 guid_to_str(pinfo->pool, &uuid));
3196 *offset += 16;
3198 return i;
3201 static uint32_t
3202 mbim_dissect_cid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, uint8_t uuid_idx,
3203 struct mbim_uuid_ext *uuid_ext_info)
3205 uint32_t cid;
3207 cid = tvb_get_letohl(tvb, *offset);
3208 if (uuid_idx < UUID_MAX) {
3209 proto_tree_add_uint(tree, *mbim_uuid_info[uuid_idx].hf_entry, tvb, *offset, 4, cid);
3210 if (mbim_uuid_info[uuid_idx].cid_list_ext) {
3211 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
3212 val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"));
3213 } else {
3214 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"));
3216 } else if (uuid_idx == UUID_EXT_IDX) {
3217 const char* cid_string = val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown");
3219 proto_tree_add_uint_format_value(tree, hf_mbim_cid, tvb, *offset, 4, cid, "%s (%u)", cid_string , cid);
3220 col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", cid_string);
3221 } else {
3222 proto_tree_add_uint(tree, hf_mbim_cid, tvb, *offset, 4, cid);
3223 col_append_str(pinfo->cinfo, COL_INFO, ": Unknown");
3225 *offset += 4;
3226 return cid;
3229 static void
3230 mbim_dissect_ms_plmn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3232 int16_t mnc;
3233 proto_tree_add_item(tree, hf_mbim_ms_plmn_mcc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3234 offset += 2;
3235 mnc = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
3236 if (mnc & 0x8000) {
3237 proto_tree_add_uint_format_value(tree, hf_mbim_ms_plmn_mnc, tvb, offset, 2, mnc, "%02u", mnc & 0x7fff);
3239 else {
3240 proto_tree_add_uint_format_value(tree, hf_mbim_ms_plmn_mnc, tvb, offset, 2, mnc, "%03u", mnc & 0x7fff);
3242 /* offset += 2; */
3245 static void
3246 mbim_dissect_ms_tai_list_single_plmn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3248 uint32_t tac_element, i;
3249 mbim_dissect_ms_plmn(tvb, pinfo, tree, *offset);
3250 *offset += 4;
3251 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_single_plmn_tac_element, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tac_element);
3252 *offset += 1;
3253 for (i = 0; i < tac_element; i++) {
3254 proto_tree_add_item(tree, hf_mbim_ms_tai_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
3255 *offset += 4;
3259 static void
3260 mbim_dissect_ms_tai_list_multi_plmn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3262 proto_tree* subtree;
3263 uint32_t tai_element, i;
3264 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_multi_plmn_tai_element, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tai_element);
3265 *offset += 1;
3266 for (i = 0; i < tai_element; i++) {
3267 subtree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "TAI #%u", i + 1);
3268 mbim_dissect_ms_plmn(tvb, pinfo, subtree, *offset);
3269 *offset += 4;
3270 proto_tree_add_item(subtree, hf_mbim_ms_tai_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
3271 *offset += 4;
3275 static bool
3276 mbim_dissect_ms_single_tai(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3278 uint32_t tai_list_type;
3279 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tai_list_type);
3280 *offset += 1;
3281 switch (tai_list_type) {
3282 case 0:
3283 case 1:
3284 mbim_dissect_ms_tai_list_single_plmn(tvb, pinfo, tree, offset);
3285 break;
3286 case 2:
3287 mbim_dissect_ms_tai_list_multi_plmn(tvb, pinfo, tree, offset);
3288 break;
3289 default:
3290 proto_tree_add_expert(tree, pinfo, &ei_mbim_unexpected_msg, tvb, *offset, 1);
3291 return false;
3293 return true;
3295 static void
3296 mbim_dissect_ms_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, uint32_t data_len)
3298 proto_tree* subtree;
3299 int32_t base_offset = offset;
3300 int32_t tai_list_info_element_pos = 1;
3301 while ((uint32_t)offset - base_offset < data_len) {
3302 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "TAI List Info #%u", tai_list_info_element_pos);
3303 if (!mbim_dissect_ms_single_tai(tvb, pinfo, subtree, &offset)) {
3304 break;
3306 tai_list_info_element_pos++;
3310 static void
3311 mbim_dissect_ms_wake_command(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
3313 uint8_t uuid_idx;
3314 struct mbim_uuid_ext *uuid_ext_info = NULL;
3315 unsigned payload_offset;
3316 uint32_t payload_size;
3317 proto_tree *wake_command_tree;
3319 int begin_offset = offset;
3321 wake_command_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Command");
3323 uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, wake_command_tree, hf_mbim_device_service_id, &offset, &uuid_ext_info, true);
3324 mbim_dissect_cid(tvb, pinfo, wake_command_tree, &offset, uuid_idx, uuid_ext_info);
3325 proto_tree_add_item_ret_uint(wake_command_tree, hf_mbim_ms_wake_reason_command_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &payload_offset);
3326 offset += 4;
3327 proto_tree_add_item_ret_uint(wake_command_tree, hf_mbim_ms_wake_reason_command_payload_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &payload_size);
3328 offset += 4;
3329 if (payload_offset && payload_size)
3331 proto_tree_add_bytes_format(wake_command_tree, hf_mbim_ms_wake_reason_command_payload, tvb, begin_offset + payload_offset, payload_size, NULL, "Payload");
3335 static void
3336 mbim_dissect_ms_wake_packet(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
3338 unsigned packet_offset;
3339 unsigned packet_size;
3340 proto_tree *wake_packet_tree;
3341 int begin_offset = offset;
3343 wake_packet_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Packet");
3345 proto_tree_add_item(wake_packet_tree, hf_mbim_single_packet_filter_filter_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3346 offset += 4;
3347 proto_tree_add_item(wake_packet_tree, hf_mbim_ms_wake_reason_packet_original_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3348 offset += 4;
3349 proto_tree_add_item_ret_uint(wake_packet_tree, hf_mbim_ms_wake_reason_packet_saved_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_offset);
3350 offset += 4;
3351 proto_tree_add_item_ret_uint(wake_packet_tree, hf_mbim_ms_wake_reason_packet_saved_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_size);
3352 /* offset += 4; */
3353 if (packet_offset && packet_size)
3355 proto_tree_add_bytes_format(wake_packet_tree, hf_mbim_ms_wake_reason_packet_saved_data, tvb, begin_offset + packet_offset, packet_size, NULL, "Saved Packet Data");
3359 static void
3360 mbim_dissect_snssai(tvbuff_t* tvb, proto_tree* tree, int* offset)
3362 unsigned snssai_length;
3363 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_snssai_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &snssai_length);
3364 *offset += 1;
3365 proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3366 *offset += 1;
3367 if(snssai_length >= 4) {
3368 proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3369 *offset += 3;
3371 if (snssai_length == 2 || snssai_length>=5) {
3372 proto_tree_add_item(tree, hf_mbim_ms_snssai_mapped_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3373 *offset += 1;
3375 if (snssai_length == 8) {
3376 proto_tree_add_item(tree, hf_mbim_ms_snssai_mapped_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3377 *offset += 3;
3381 static void
3382 mbim_dissect_nssai(tvbuff_t* tvb, proto_tree* tree, int offset, int nssai_buffer_length)
3384 proto_tree* subtree;
3385 int base_offset = offset;
3386 int snssai_pos = 1;
3387 while (offset - base_offset < nssai_buffer_length) {
3388 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI #%u", snssai_pos);
3389 mbim_dissect_snssai(tvb,subtree, &offset);
3390 snssai_pos++;
3394 static void
3395 // NOLINTNEXTLINE(misc-no-recursion)
3396 mbim_dissect_precfg_dflt_cfg_nssai(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int nssai_buffer_length)
3398 proto_tree* subtree;
3399 int base_offset = offset;
3400 int precfg_dflt_cfg_nssai_pos = 1;
3401 while ((offset - base_offset < nssai_buffer_length) && precfg_dflt_cfg_nssai_pos < 2) {
3402 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Preconfigured default configured NSSAI #%u", precfg_dflt_cfg_nssai_pos);
3403 proto_tree_add_item(subtree, hf_mbim_ms_pre_dflt_nssai_info_access_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3404 offset += 4;
3405 subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Default configured NSSAI");
3406 mbim_dissect_tlv_ie(tvb, pinfo, subtree, &offset);
3407 precfg_dflt_cfg_nssai_pos++;
3411 static void
3412 mbim_dissect_rej_snssai(tvbuff_t* tvb, proto_tree* tree, int* offset)
3414 unsigned snssai_length;
3415 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_snssai_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &snssai_length);
3416 *offset += 1;
3417 proto_tree_add_item(tree, hf_mbim_ms_rej_snssai_cause, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3418 *offset += 1;
3419 proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3420 *offset += 1;
3421 if (snssai_length == 4) {
3422 proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3423 *offset += 3;
3427 static void
3428 mbim_dissect_rej_nssai(tvbuff_t* tvb, proto_tree* tree, int offset, int rej_nssai_buffer_length)
3430 proto_tree* subtree;
3431 int base_offset = offset;
3432 int snssai_pos = 1;
3433 while (offset - base_offset < rej_nssai_buffer_length) {
3434 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Rejected S-NSSAI #%u", snssai_pos);
3435 mbim_dissect_rej_snssai(tvb, subtree, &offset);
3436 snssai_pos++;
3440 static void
3441 // NOLINTNEXTLINE(misc-no-recursion)
3442 mbim_dissect_ladn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int rej_nssai_buffer_length)
3444 proto_tree* subtree, * ladn_tree;
3445 int base_offset = offset;
3446 int ladn_pos = 1;
3447 while (offset - base_offset < rej_nssai_buffer_length) {
3448 ladn_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "LADN #%u", ladn_pos);
3449 subtree = proto_tree_add_subtree_format(ladn_tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "DNN");
3450 mbim_dissect_tlv_ie(tvb, pinfo, subtree, &offset);
3451 subtree = proto_tree_add_subtree_format(ladn_tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "TAI");
3452 if (!mbim_dissect_ms_single_tai(tvb, pinfo, subtree, &offset)) {
3453 break;
3455 ladn_pos++;
3459 static void
3460 mbim_dissect_tcs(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset, int tcs_buffer_length)
3462 proto_tree* subtree;
3463 int base_offset = *offset;
3464 int tc_pos = 1;
3465 int tc_type;
3466 int tc_value_length;
3467 while (*offset - base_offset < tcs_buffer_length) {
3468 subtree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "Traffic component #%u", tc_pos);
3469 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_type, tvb, *offset, 1, ENC_BIG_ENDIAN, &tc_type);
3470 *offset += 1;
3471 switch (tc_type) {
3472 case URSP_TC_TYPE_MATCH_ALL:
3473 break;
3474 case URSP_TC_TYPE_OSID_APPID:
3475 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_os_id, tvb, *offset, 16, ENC_NA);
3476 *offset += 16;
3477 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_BIG_ENDIAN, &tc_value_length);
3478 *offset += 1;
3479 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_app_id, tvb, *offset, tc_value_length, ENC_ASCII | ENC_NA);
3480 *offset += tc_value_length;
3481 break;
3482 case URSP_TC_TYPE_IPV4:
3483 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv4, tvb, *offset, 4, ENC_NA);
3484 *offset += 4;
3485 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv4_mask, tvb, *offset, 4, ENC_NA);
3486 *offset += 4;
3487 break;
3488 case URSP_TC_TYPE_IPV6:
3489 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv6, tvb, *offset, 16, ENC_NA);
3490 *offset += 16;
3491 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv6_prefix_length, tvb, *offset, 1, ENC_NA);
3492 *offset += 1;
3493 break;
3494 case URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER:
3495 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_proto_id, tvb, *offset, 1, ENC_BIG_ENDIAN);
3496 *offset += 1;
3497 break;
3498 case URSP_TC_TYPE_PORT:
3499 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port, tvb, *offset, 2, ENC_BIG_ENDIAN);
3500 *offset += 2;
3501 break;
3502 case URSP_TC_TYPE_PORT_RANGE:
3503 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port_range_low, tvb, *offset, 2, ENC_BIG_ENDIAN);
3504 *offset += 2;
3505 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port_range_high, tvb, *offset, 2, ENC_BIG_ENDIAN);
3506 *offset += 2;
3507 break;
3508 case URSP_TC_TYPE_SECURITY_PARAM_INDEX:
3509 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 4, ENC_NA);
3510 *offset += 4;
3511 break;
3512 case URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS:
3513 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3514 *offset += 2;
3515 break;
3516 case URSP_TC_TYPE_FLOW_LABEL:
3517 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 3, ENC_NA);
3518 *offset += 3;
3519 break;
3520 case URSP_TC_TYPE_MAC_ADDRESS:
3521 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 6, ENC_NA);
3522 *offset += 6;
3523 break;
3524 case URSP_TC_TYPE_C_TAG_VID:
3525 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3526 *offset += 2;
3527 break;
3528 case URSP_TC_TYPE_S_TAG_VID:
3529 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3530 *offset += 2;
3531 break;
3532 case URSP_TC_TYPE_C_TAG_PCP_AND_DEI:
3533 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 1, ENC_NA);
3534 *offset += 1;
3535 break;
3536 case URSP_TC_TYPE_S_TAG_PCP_AND_DEI:
3537 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 1, ENC_NA);
3538 *offset += 1;
3539 break;
3540 case URSP_TC_TYPE_ETHER:
3541 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3542 *offset += 2;
3543 break;
3544 case URSP_TC_TYPE_DNN:
3545 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3546 *offset += 1;
3547 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_dnn, tvb, *offset, tc_value_length, ENC_APN_STR | ENC_NA);
3548 *offset += tc_value_length;
3549 break;
3550 case URSP_TC_TYPE_CONNECTION_CAPABILITY:
3551 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3552 *offset += 1;
3553 for (int i = 0; i < tc_value_length; i++) {
3554 proto_tree_add_bitmask(subtree, tvb, *offset, hf_mbim_ms_ursp_tc_capability, ett_mbim_bitmap,
3555 ursp_tc_connection_capability_flags_fields, ENC_LITTLE_ENDIAN);
3556 *offset += 1;
3558 break;
3559 case URSP_TC_TYPE_FQDN:
3560 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3561 *offset += 1;
3562 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_fqdn, tvb, *offset, tc_value_length, ENC_APN_STR | ENC_NA);
3563 *offset += tc_value_length;
3564 break;
3565 case URSP_TC_TYPE_APPID:
3566 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3567 *offset += 1;
3568 proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_app_id, tvb, *offset, tc_value_length, ENC_LITTLE_ENDIAN | ENC_ASCII);
3569 *offset += tc_value_length;
3570 break;
3571 default:
3572 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, tvb, *offset, tcs_buffer_length - (*offset - base_offset));
3573 return;
3575 tc_pos++;
3579 static void
3580 mbim_dissect_td(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3582 proto_tree* subtree;
3583 unsigned tcs_length;
3584 subtree = proto_tree_add_subtree(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "Traffic descriptor");
3585 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 2, ENC_BIG_ENDIAN, &tcs_length);
3586 *offset += 2;
3587 mbim_dissect_tcs(tvb, pinfo, subtree, offset, tcs_length);
3590 static void
3591 mbim_dissect_tps(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int tp_buffer_length)
3593 proto_tree* subtree;
3594 int base_offset = offset;
3595 int tp_pos = 1;
3596 int tp_length;
3597 while (offset - base_offset < tp_buffer_length) {
3598 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Traffic parameter #%u", tp_pos);
3599 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, offset, 2, ENC_BIG_ENDIAN, &tp_length);
3600 offset += 2;
3601 mbim_dissect_tcs(tvb, pinfo, subtree, &offset, tp_length);
3602 tp_pos++;
3606 static void
3607 mbim_dissect_ursp_rules(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int ursp_rules_buffer_length)
3609 proto_tree* subtree;
3610 int base_offset = offset;
3611 int ursp_rule_pos = 1;
3612 while (offset - base_offset < ursp_rules_buffer_length) {
3613 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "URSP rule #%u", ursp_rule_pos);
3614 proto_tree_add_item(subtree, hf_mbim_ms_ursp_precedence, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3615 offset += 1;
3616 mbim_dissect_td(tvb, pinfo, subtree, &offset);
3617 ursp_rule_pos++;
3621 static void
3622 // NOLINTNEXTLINE(misc-no-recursion)
3623 mbim_dissect_tlv_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
3625 unsigned tlv_data_offset;
3626 unsigned padding_length;
3627 unsigned data_length;
3628 unsigned tlv_type = TLV_TYPE_UNKNOWN;
3630 proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN, &tlv_type);
3631 *offset += 2;
3632 proto_tree_add_item(tree, hf_mbim_tlv_ie_reserved, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3633 *offset += 1;
3634 proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_padding_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &padding_length);
3635 *offset += 1;
3636 proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_data_length, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &data_length);
3637 *offset += 4;
3638 tlv_data_offset = *offset;
3639 if (data_length) {
3640 increment_dissection_depth(pinfo);
3641 // New TLV types will be added here
3642 switch (tlv_type) {
3643 case TLV_TYPE_SINGLE_NSSAI:
3644 mbim_dissect_snssai(tvb, tree, offset);
3645 break;
3646 case TLV_TYPE_ALLOWED_NSSAI:
3647 case TLV_TYPE_CFG_NSSAI:
3648 case TLV_TYPE_DFLT_CFG_NSSAI:
3649 mbim_dissect_nssai(tvb, tree, *offset, data_length);
3650 break;
3651 case TLV_TYPE_PRECFG_DFLT_CFG_NSSAI:
3652 mbim_dissect_precfg_dflt_cfg_nssai(tvb, pinfo, tree, *offset, data_length);
3653 break;
3654 case TLV_TYPE_REJ_NSSAI:
3655 mbim_dissect_rej_nssai(tvb, tree, *offset, data_length);
3656 break;
3657 case TLV_TYPE_LADN:
3658 mbim_dissect_ladn(tvb, pinfo, tree, *offset, data_length);
3659 break;
3660 case TLV_TYPE_TAI:
3661 mbim_dissect_ms_tai(tvb, pinfo, tree, *offset, data_length);
3662 break;
3663 case TLV_TYPE_WCHAR_STR:
3664 proto_tree_add_item(tree, hf_mbim_tlv_ie_data_wchar_str, tvb, *offset, data_length, ENC_LITTLE_ENDIAN | ENC_UTF_16);
3665 break;
3666 case TLV_TYPE_TRAFFIC_PARAMETERS:
3667 mbim_dissect_tps(tvb, pinfo, tree, *offset, data_length);
3668 break;
3669 case TLV_TYPE_WAKE_COMMAND:
3670 mbim_dissect_ms_wake_command(tvb, pinfo, tree, *offset);
3671 break;
3672 case TLV_TYPE_WAKE_PACKET:
3673 mbim_dissect_ms_wake_packet(tvb, pinfo, tree, *offset);
3674 break;
3675 case TLV_TYPE_TYPE_OSID:
3676 proto_tree_add_item(tree, hf_mbim_tlv_ie_data_guid, tvb, *offset, 16, ENC_NA);
3677 break;
3678 case TLV_TYPE_TYPE_3GPP_REL_VERSION:
3679 proto_tree_add_item(tree, hf_mbim_tlv_ie_data_int32, tvb, *offset, data_length, ENC_LITTLE_ENDIAN);
3680 break;
3681 case TLV_TYPE_TYPE_URSP_RULES_TD_ONLY:
3682 mbim_dissect_ursp_rules(tvb,pinfo, tree, *offset, data_length);
3683 break;
3684 case TLV_TYPE_TYPE_SESSION_ID:
3685 proto_tree_add_item(tree, hf_mbim_tlv_ie_data_int32, tvb, *offset, data_length, ENC_LITTLE_ENDIAN);
3686 break;
3687 default:
3688 proto_tree_add_item(tree, hf_mbim_tlv_ie_unnamed_data, tvb, *offset, data_length, ENC_NA);
3689 break;
3691 decrement_dissection_depth(pinfo);
3692 *offset = tlv_data_offset + data_length;
3694 if (padding_length) {
3695 proto_tree_add_item(tree, hf_mbim_tlv_ie_padding, tvb, *offset, padding_length, ENC_NA);
3696 *offset += padding_length;
3700 static void
3701 mbim_dissect_tlv_ie_list(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int tlv_offset, int buffer_base_offset, int buffer_length)
3703 proto_tree* unnamed_ies;
3704 while (tlv_offset - buffer_base_offset < buffer_length) {
3705 unnamed_ies = proto_tree_add_subtree_format(tree, tvb, tlv_offset, 0, ett_mbim_pair_list, NULL, "Unnamed IE's");
3706 mbim_dissect_tlv_ie(tvb, pinfo, unnamed_ies, &tlv_offset);
3710 static void
3711 mbim_dissect_device_caps_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset,
3712 struct mbim_conv_info *mbim_conv)
3714 int base_offset;
3715 uint32_t custom_class_offset, custom_class_size, device_id_offset, device_id_size,
3716 fw_info_offset, fw_info_size, hw_info_offset, hw_info_size;
3717 proto_item *it;
3719 base_offset = offset;
3720 proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3721 offset += 4;
3722 mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
3723 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
3724 mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
3725 offset += 4;
3726 proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3727 offset += 4;
3728 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
3729 mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
3730 offset += 4;
3731 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
3732 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
3733 offset += 4;
3734 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
3735 mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
3736 offset += 4;
3737 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
3738 mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
3739 offset += 4;
3740 proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3741 offset += 4;
3742 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_custom_data_class_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &custom_class_offset);
3743 offset += 4;
3744 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_custom_data_class_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &custom_class_size);
3745 offset += 4;
3746 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_offset);
3747 offset += 4;
3748 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_size);
3749 offset += 4;
3750 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_offset);
3751 offset += 4;
3752 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_size);
3753 offset += 4;
3754 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_offset);
3755 offset += 4;
3756 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_size);
3757 /*offset += 4;*/
3758 if (custom_class_offset && custom_class_size) {
3759 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_custom_data_class, tvb, base_offset + custom_class_offset,
3760 custom_class_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3761 if (custom_class_size > 22) {
3762 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3765 if (device_id_offset && device_id_size) {
3766 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_device_id, tvb, base_offset + device_id_offset,
3767 device_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3768 if ((mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM) && (device_id_size > 30)) {
3769 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3770 } else if (device_id_size > 36) {
3771 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3774 if (fw_info_offset && fw_info_size) {
3775 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_fw_info, tvb, base_offset + fw_info_offset,
3776 fw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3777 if (fw_info_size > 60) {
3778 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3781 if (hw_info_offset && hw_info_size) {
3782 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_hw_info, tvb, base_offset + hw_info_offset,
3783 hw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3784 if (hw_info_size > 60) {
3785 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3790 static void
3791 mbim_dissect_subscriber_ready_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
3792 struct mbim_conv_info *mbim_conv)
3794 proto_tree *subtree;
3795 int base_offset;
3796 uint32_t i, subscriber_id_offset, subscriber_id_size, sim_icc_id_offset, sim_icc_id_size, elem_count;
3797 proto_item *it;
3798 wmem_array_t *pair_list = NULL;
3799 struct mbim_pair_list pair_list_item, *p_pair_list_item;
3801 base_offset = offset;
3802 proto_tree_add_item(tree, hf_mbim_subscr_ready_status_ready_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3803 offset += 4;
3804 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
3805 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_subscr_ready_status_flags, ett_mbim_bitmap,
3806 mbim_subscr_ready_status_flags_fields, ENC_LITTLE_ENDIAN);
3807 offset += 4;
3809 proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_susbcr_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &subscriber_id_offset);
3810 offset += 4;
3811 proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_susbcr_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &subscriber_id_size);
3812 offset += 4;
3813 proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_sim_icc_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sim_icc_id_offset);
3814 offset += 4;
3815 proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_sim_icc_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sim_icc_id_size);
3816 offset += 4;
3817 proto_tree_add_item(tree, hf_mbim_subscr_ready_status_ready_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3818 offset += 4;
3819 proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
3820 offset += 4;
3822 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
3823 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3824 offset += 4;
3826 if (elem_count) {
3827 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
3828 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Telephone Numbers Ref List");
3829 for (i = 0; i < elem_count; i++) {
3830 proto_tree_add_item_ret_uint(subtree, hf_mbim_subscr_ready_status_tel_nb_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
3831 offset += 4;
3832 proto_tree_add_item_ret_uint(subtree, hf_mbim_subscr_ready_status_tel_nb_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
3833 offset += 4;
3834 wmem_array_append_one(pair_list, pair_list_item);
3837 if (subscriber_id_offset && subscriber_id_size) {
3838 it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_susbcr_id, tvb, base_offset + subscriber_id_offset,
3839 subscriber_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3840 if ((mbim_conv->cellular_class == MBIM_CELLULAR_CLASS_CDMA) && (subscriber_id_size > 20)) {
3841 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3842 } else if (subscriber_id_size > 30) {
3843 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3846 if (sim_icc_id_offset && sim_icc_id_size) {
3847 it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_sim_icc_id, tvb, base_offset + sim_icc_id_offset,
3848 sim_icc_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3849 if (sim_icc_id_size > 40) {
3850 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3853 for (i = 0; i < elem_count; i++) {
3854 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
3855 if (p_pair_list_item->offset && p_pair_list_item->size) {
3856 it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_tel_nb, tvb, base_offset + p_pair_list_item->offset,
3857 p_pair_list_item->size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3858 if (p_pair_list_item->size > 44) {
3859 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3865 static void
3866 mbim_dissect_set_pin(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3868 int base_offset;
3869 uint32_t pin_offset, pin_size, new_pin_offset, new_pin_size;
3870 proto_item *it;
3872 base_offset = offset;
3873 proto_tree_add_item(tree, hf_mbim_set_pin_pin_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3874 offset += 4;
3875 proto_tree_add_item(tree, hf_mbim_set_pin_pin_pin_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3876 offset += 4;
3877 proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_pin_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_offset);
3878 offset += 4;
3879 proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_pin_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_size);
3880 offset += 4;
3881 proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_new_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &new_pin_offset);
3882 offset += 4;
3883 proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_new_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &new_pin_size);
3884 /*offset += 4;*/
3885 if (pin_offset && pin_size) {
3886 it = proto_tree_add_item(tree, hf_mbim_set_pin_pin, tvb, base_offset + pin_offset,
3887 pin_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3888 if (pin_size > 32) {
3889 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3892 if (new_pin_offset && new_pin_size) {
3893 it = proto_tree_add_item(tree, hf_mbim_set_pin_new_pin, tvb, base_offset + new_pin_offset,
3894 new_pin_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3895 if (new_pin_size > 32) {
3896 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3901 static void
3902 mbim_dissect_pin_list_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3904 static const char *pin_list[10] = { "PIN 1", "PIN 2", "Device SIM PIN", "Device First SIM PIN", "Network PIN",
3905 "Network Subset PIN", "Service Provider PIN", "Corporate PIN", "Subsidy Lock",
3906 "Custom"};
3907 unsigned i;
3908 uint32_t length;
3909 proto_tree *subtree;
3911 for (i = 0; i < 10; i++) {
3912 subtree = proto_tree_add_subtree(tree, tvb, offset, 16, ett_mbim_pin, NULL, pin_list[i]);
3913 proto_tree_add_item(subtree, hf_mbim_pin_list_pin_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3914 offset += 4;
3915 proto_tree_add_item(subtree, hf_mbim_pin_list_pin_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3916 offset += 4;
3917 length = tvb_get_letohl(tvb, offset);
3918 if (length == 0xffffffff) {
3919 proto_tree_add_uint_format_value(subtree, hf_mbim_pin_list_pin_length_min, tvb, offset, 4,
3920 length, "Not available (0xffffffff)");
3921 } else {
3922 proto_tree_add_uint(subtree, hf_mbim_pin_list_pin_length_min, tvb, offset, 4, length);
3924 offset += 4;
3925 length = tvb_get_letohl(tvb, offset);
3926 if (length == 0xffffffff) {
3927 proto_tree_add_uint_format_value(subtree, hf_mbim_pin_list_pin_length_max, tvb, offset, 4,
3928 length, "Not available (0xffffffff)");
3929 } else {
3930 proto_tree_add_uint(subtree, hf_mbim_pin_list_pin_length_max, tvb, offset, 4, length);
3932 offset += 4;
3936 static void
3937 mbim_dissect_provider(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3939 int base_offset;
3940 uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size;
3941 proto_item *it;
3943 base_offset = offset;
3944 proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
3945 offset += 4;
3946 proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
3947 offset += 4;
3948 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_provider_state, ett_mbim_bitmap,
3949 mbim_provider_state_fields, ENC_LITTLE_ENDIAN);
3950 offset += 4;
3951 proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
3952 offset += 4;
3953 proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
3954 offset += 4;
3955 proto_tree_add_item (tree, hf_mbim_provider_cellular_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3956 offset += 4;
3957 proto_tree_add_item (tree, hf_mbim_provider_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3958 offset += 4;
3959 proto_tree_add_item (tree, hf_mbim_provider_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3960 /*offset += 4;*/
3961 if (provider_id_offset && provider_id_size) {
3962 it = proto_tree_add_item(tree, hf_mbim_provider_provider_id, tvb, base_offset + provider_id_offset,
3963 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3964 if (provider_id_size > 12) {
3965 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3968 if (provider_name_offset && provider_name_size) {
3969 it = proto_tree_add_item(tree, hf_mbim_provider_provider_name, tvb, base_offset + provider_name_offset,
3970 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3971 if (provider_name_size > 40) {
3972 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3977 static void
3978 mbim_dissect_providers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
3980 proto_tree *subtree;
3981 int base_offset;
3982 uint32_t i, elem_count;
3983 wmem_array_t *pair_list;
3984 struct mbim_pair_list pair_list_item, *p_pair_list_item;
3986 base_offset = offset;
3987 proto_tree_add_item_ret_uint(tree, hf_mbim_providers_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
3988 offset += 4;
3989 if (elem_count) {
3990 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
3991 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Providers Ref List");
3992 for (i = 0; i < elem_count; i++) {
3993 proto_tree_add_item_ret_uint(subtree, hf_mbim_providers_provider_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
3994 offset += 4;
3995 proto_tree_add_item_ret_uint(subtree, hf_mbim_providers_provider_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
3996 offset += 4;
3997 wmem_array_append_one(pair_list, pair_list_item);
3999 for (i = 0; i < elem_count; i++) {
4000 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4001 if (p_pair_list_item->offset && p_pair_list_item->size) {
4002 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
4003 ett_mbim_pair_list, NULL, "Provider #%u", i+1);
4004 mbim_dissect_provider(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4010 static void
4011 mbim_dissect_set_register_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4013 int base_offset;
4014 uint32_t provider_id_offset, provider_id_size;
4015 proto_item *it;
4017 base_offset = offset;
4018 proto_tree_add_item_ret_uint(tree, hf_mbim_set_register_state_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4019 offset += 4;
4020 proto_tree_add_item_ret_uint(tree, hf_mbim_set_register_state_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4021 offset += 4;
4022 proto_tree_add_item(tree, hf_mbim_set_register_state_register_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4023 offset += 4;
4024 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_register_state_data_class, ett_mbim_bitmap,
4025 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4026 /*offset += 4;*/
4027 if (provider_id_offset && provider_id_size) {
4028 it = proto_tree_add_item(tree, hf_mbim_set_register_state_provider_id, tvb, base_offset + provider_id_offset,
4029 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4030 if (provider_id_size > 12) {
4031 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4036 static void
4037 mbim_dissect_registration_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4039 int base_offset;
4040 uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size,
4041 roaming_text_offset, roaming_text_size, nw_error;
4042 proto_item *it;
4044 base_offset = offset;
4045 nw_error = tvb_get_letohl(tvb, offset);
4046 if (nw_error == 0) {
4047 proto_tree_add_uint_format_value(tree, hf_mbim_registration_state_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4048 } else {
4049 proto_tree_add_uint(tree, hf_mbim_registration_state_info_nw_error, tvb, offset, 4, nw_error);
4051 offset += 4;
4052 proto_tree_add_item(tree, hf_mbim_registration_state_info_register_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4053 offset += 4;
4054 proto_tree_add_item(tree, hf_mbim_registration_state_info_register_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4055 offset += 4;
4056 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_available_data_classes, ett_mbim_bitmap,
4057 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4058 offset += 4;
4059 proto_tree_add_item(tree, hf_mbim_registration_state_info_current_cellular_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4060 offset += 4;
4061 proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4062 offset += 4;
4063 proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4064 offset += 4;
4065 proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
4066 offset += 4;
4067 proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
4068 offset += 4;
4069 proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_roaming_text_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &roaming_text_offset);
4070 offset += 4;
4071 proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_roaming_text_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &roaming_text_size);
4072 offset += 4;
4073 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_registration_flags, ett_mbim_bitmap,
4074 mbim_registration_state_info_registration_flags_fields, ENC_LITTLE_ENDIAN);
4075 if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4076 offset += 4;
4077 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_preferred_data_class, ett_mbim_bitmap,
4078 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4080 /*offset += 4;*/
4081 if (provider_id_offset && provider_id_size) {
4082 it = proto_tree_add_item(tree, hf_mbim_registration_state_info_provider_id, tvb, base_offset + provider_id_offset,
4083 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4084 if (provider_id_size > 12) {
4085 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4088 if (provider_name_offset && provider_name_size) {
4089 it = proto_tree_add_item(tree, hf_mbim_registration_state_info_provider_name, tvb, base_offset + provider_name_offset,
4090 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4091 if (provider_name_size > 40) {
4092 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4095 if (roaming_text_offset && roaming_text_size) {
4096 it = proto_tree_add_item(tree, hf_mbim_registration_state_info_roaming_text, tvb, base_offset + roaming_text_offset,
4097 roaming_text_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4098 if (roaming_text_size > 126) {
4099 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4104 static void
4105 mbim_dissect_packet_service_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv, uint32_t buffer_len)
4107 proto_tree *tai_ie;
4108 uint32_t nw_error;
4109 uint32_t base_offset = offset;
4111 nw_error = tvb_get_letohl(tvb, offset);
4112 if (nw_error == 0) {
4113 proto_tree_add_uint_format_value(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4114 } else {
4115 proto_tree_add_uint(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error);
4117 offset += 4;
4118 proto_tree_add_item(tree, hf_mbim_packet_service_info_packet_service_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4119 offset += 4;
4120 if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4121 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_current_data_class, ett_mbim_bitmap,
4122 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4123 } else {
4124 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_highest_available_data_class, ett_mbim_bitmap,
4125 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4127 offset += 4;
4128 proto_tree_add_item(tree, hf_mbim_packet_service_info_uplink_speed, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4129 offset += 8;
4130 proto_tree_add_item(tree, hf_mbim_packet_service_info_downlink_speed, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4131 offset += 8;
4132 if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4133 proto_tree_add_item(tree, hf_mbim_packet_service_info_frequency_range, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4134 offset += 4;
4136 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4137 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_data_subclass, ett_mbim_bitmap,
4138 mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
4139 offset += 4;
4140 tai_ie = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Tracking Area Identity");
4141 mbim_dissect_ms_plmn(tvb, pinfo, tai_ie, offset);
4142 offset += 4;
4143 proto_tree_add_item(tai_ie, hf_mbim_ms_tai_tac, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4144 offset += 4;
4145 mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4149 static void
4150 mbim_dissect_set_signal_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4152 uint32_t error_rate_threshold;
4154 proto_tree_add_item(tree, hf_mbim_set_signal_state_signal_strength_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4155 offset += 4;
4156 proto_tree_add_item(tree, hf_mbim_set_signal_state_rssi_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4157 offset += 4;
4158 error_rate_threshold = tvb_get_letohl(tvb, offset);
4159 if (error_rate_threshold == 0xffffffff) {
4160 proto_tree_add_uint_format_value(tree, hf_mbim_set_signal_state_error_rate_threshold, tvb, offset, 4,
4161 error_rate_threshold, "No report (0xffffffff)");
4162 } else {
4163 proto_tree_add_item(tree, hf_mbim_set_signal_state_error_rate_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4167 static void
4168 mbim_dissect_signal_state_element(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4170 proto_tree_add_item(tree, hf_mbim_signal_state_element_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4171 offset += 4;
4172 proto_tree_add_item(tree, hf_mbim_signal_state_element_snr, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4173 offset += 4;
4174 proto_tree_add_item(tree, hf_mbim_signal_state_element_rsrp_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4175 offset += 4;
4176 proto_tree_add_item(tree, hf_mbim_signal_state_element_snr_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4177 offset += 4;
4178 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_signal_state_element_system_type, ett_mbim_bitmap,
4179 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4182 static void
4183 mbim_dissect_signal_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4185 proto_tree *subtree;
4186 int base_offset;
4187 uint32_t error_rate_threshold, rsrp_snr_offset, rsrp_snr_size, elem_count, i;
4188 const int signal_state_elem_size = 20;
4189 base_offset = offset;
4190 proto_tree_add_item(tree, hf_mbim_signal_state_info_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4191 offset += 4;
4192 proto_tree_add_item(tree, hf_mbim_signal_state_info_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4193 offset += 4;
4194 proto_tree_add_item(tree, hf_mbim_signal_state_info_signal_strength_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4195 offset += 4;
4196 proto_tree_add_item(tree, hf_mbim_signal_state_info_rssi_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4197 offset += 4;
4198 error_rate_threshold = tvb_get_letohl(tvb, offset);
4199 if (error_rate_threshold == 0xffffffff) {
4200 proto_tree_add_uint_format_value(tree, hf_mbim_signal_state_info_error_rate_threshold, tvb, offset, 4,
4201 error_rate_threshold, "No report (0xffffffff)");
4202 } else {
4203 proto_tree_add_item(tree, hf_mbim_signal_state_info_error_rate_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4205 offset += 4;
4206 if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4207 proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_rsrp_snr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &rsrp_snr_offset);
4208 offset += 4;
4209 proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_rsrp_snr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &rsrp_snr_size);
4210 if (rsrp_snr_offset && rsrp_snr_size) {
4211 offset = base_offset + rsrp_snr_offset;
4212 proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
4213 offset += 4;
4214 for (i = 0; i < elem_count; i++) {
4215 offset += signal_state_elem_size * i;
4216 subtree = proto_tree_add_subtree_format(tree, tvb, offset, signal_state_elem_size, ett_mbim_pair_list, NULL, "RSRP SNR Info #%u", i + 1);
4217 mbim_dissect_signal_state_element(tvb, pinfo, subtree, offset);
4223 static uint8_t
4224 mbim_dissect_context_type_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
4226 e_guid_t uuid;
4227 unsigned i;
4229 tvb_get_ntohguid(tvb, *offset, &uuid);
4231 for (i = 0; i < array_length(mbim_uuid_context_type_vals); i++) {
4232 if (memcmp(&uuid, &(mbim_uuid_context_type_vals[i].uuid), sizeof(e_guid_t)) == 0) {
4233 break;
4236 proto_tree_add_guid_format_value(tree, hf_mbim_context_type, tvb, *offset, 16, &uuid, "%s (%s)",
4237 val_to_str_const(i, mbim_context_type_vals, "Unknown"), guid_to_str(pinfo->pool, &uuid));
4238 *offset += 16;
4240 return i;
4243 static void
4244 mbim_dissect_set_connect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4246 int base_offset;
4247 uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size,
4248 password_offset, password_size;
4249 proto_item *it;
4251 base_offset = offset;
4252 proto_tree_add_item(tree, hf_mbim_set_connect_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4253 offset += 4;
4254 proto_tree_add_item(tree, hf_mbim_set_connect_activation_command, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4255 offset += 4;
4256 proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
4257 offset += 4;
4258 proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
4259 offset += 4;
4260 proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
4261 offset += 4;
4262 proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
4263 offset += 4;
4264 proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
4265 offset += 4;
4266 proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
4267 offset += 4;
4268 proto_tree_add_item(tree, hf_mbim_set_connect_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4269 offset += 4;
4270 proto_tree_add_item(tree, hf_mbim_set_connect_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4271 offset += 4;
4272 proto_tree_add_item(tree, hf_mbim_set_connect_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4273 offset += 4;
4274 mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4275 if (access_string_offset && access_string_size) {
4276 it = proto_tree_add_item(tree, hf_mbim_set_connect_access_string, tvb, base_offset + access_string_offset,
4277 access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4278 if (access_string_size > 200) {
4279 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4282 if (user_name_offset && user_name_size) {
4283 it = proto_tree_add_item(tree, hf_mbim_set_connect_user_name, tvb, base_offset + user_name_offset,
4284 user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4285 if (user_name_size > 510) {
4286 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4289 if (password_offset && password_size) {
4290 it = proto_tree_add_item(tree, hf_mbim_set_connect_password, tvb, base_offset + password_offset,
4291 password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4292 if (password_size > 510) {
4293 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4298 static void
4299 mbim_dissect_set_connect_v3_and_higher(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, uint32_t buffer_len, struct mbim_conv_info* mbim_conv)
4301 int32_t base_offset = offset;
4302 proto_tree *access_string, *user_name, *password, *snssai;
4304 proto_tree_add_item(tree, hf_mbim_set_connect_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4305 offset += 4;
4306 proto_tree_add_item(tree, hf_mbim_set_connect_activation_command, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4307 offset += 4;
4308 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4309 proto_tree_add_item(tree, hf_mbim_set_connect_activation_option, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4310 offset += 4;
4312 proto_tree_add_item(tree, hf_mbim_set_connect_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4313 offset += 4;
4314 proto_tree_add_item(tree, hf_mbim_set_connect_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4315 offset += 4;
4316 proto_tree_add_item(tree, hf_mbim_set_connect_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4317 offset += 4;
4318 mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4319 proto_tree_add_item(tree, hf_mbim_set_connect_media_preference, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4320 offset += 4;
4321 access_string = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Access String");
4322 mbim_dissect_tlv_ie(tvb, pinfo, access_string, &offset);
4323 user_name = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "User Name");
4324 mbim_dissect_tlv_ie(tvb, pinfo, user_name, &offset);
4325 password = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Password");
4326 mbim_dissect_tlv_ie(tvb, pinfo, password, &offset);
4327 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4328 snssai = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
4329 mbim_dissect_tlv_ie(tvb, pinfo, snssai, &offset);
4331 mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4334 static void
4335 mbim_dissect_connect_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv, uint32_t buffer_len)
4337 int32_t base_offset = offset;
4338 proto_tree *access_string, *snssai;
4339 uint32_t nw_error;
4341 proto_tree_add_item(tree, hf_mbim_connect_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4342 offset += 4;
4343 proto_tree_add_item(tree, hf_mbim_connect_info_activation_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4344 offset += 4;
4345 proto_tree_add_item(tree, hf_mbim_connect_info_voice_call_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4346 offset += 4;
4347 proto_tree_add_item(tree, hf_mbim_connect_info_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4348 offset += 4;
4349 mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4350 nw_error = tvb_get_letohl(tvb, offset);
4351 if (nw_error == 0) {
4352 proto_tree_add_uint_format_value(tree, hf_mbim_connect_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4353 } else {
4354 proto_tree_add_uint(tree, hf_mbim_connect_info_nw_error, tvb, offset, 4, nw_error);
4356 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4357 offset += 4;
4358 proto_tree_add_item(tree, hf_mbim_connect_info_access_media, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4359 offset += 4;
4360 access_string = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Access String");
4361 mbim_dissect_tlv_ie(tvb, pinfo, access_string, &offset);
4362 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4363 snssai = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
4364 mbim_dissect_tlv_ie(tvb, pinfo, snssai, &offset);
4366 mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4370 static void
4371 mbim_dissect_context(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, bool is_set)
4373 int base_offset;
4374 uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size,
4375 password_offset, password_size, provider_id_offset = 0, provider_id_size = 0;
4376 proto_item *it;
4378 base_offset = offset;
4379 proto_tree_add_item(tree, hf_mbim_context_context_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4380 offset += 4;
4381 mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4382 proto_tree_add_item_ret_uint(tree, hf_mbim_context_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
4383 offset += 4;
4384 proto_tree_add_item_ret_uint(tree, hf_mbim_context_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
4385 offset += 4;
4386 proto_tree_add_item_ret_uint(tree, hf_mbim_context_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
4387 offset += 4;
4388 proto_tree_add_item_ret_uint(tree, hf_mbim_context_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
4389 offset += 4;
4390 proto_tree_add_item_ret_uint(tree, hf_mbim_context_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
4391 offset += 4;
4392 proto_tree_add_item_ret_uint(tree, hf_mbim_context_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
4393 offset += 4;
4394 proto_tree_add_item(tree, hf_mbim_context_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4395 offset += 4;
4396 proto_tree_add_item(tree, hf_mbim_context_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4397 offset += 4;
4398 if (is_set) {
4399 proto_tree_add_item_ret_uint(tree, hf_mbim_context_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4400 offset += 4;
4401 proto_tree_add_item_ret_uint(tree, hf_mbim_context_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4402 offset += 4;
4404 if (access_string_offset && access_string_size) {
4405 it = proto_tree_add_item(tree, hf_mbim_context_access_string, tvb, base_offset + access_string_offset,
4406 access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4407 if (access_string_size > 200) {
4408 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4411 if (user_name_offset && user_name_size) {
4412 it = proto_tree_add_item(tree, hf_mbim_context_user_name, tvb, base_offset + user_name_offset,
4413 user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4414 if (user_name_size > 510) {
4415 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4418 if (password_offset && password_size) {
4419 it = proto_tree_add_item(tree, hf_mbim_context_password, tvb, base_offset + password_offset,
4420 password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4421 if (password_size > 510) {
4422 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4425 if (provider_id_offset && provider_id_size) {
4426 it = proto_tree_add_item(tree, hf_mbim_context_provider_id, tvb, base_offset + provider_id_offset,
4427 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4428 if (provider_id_size > 12) {
4429 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4434 static void
4435 mbim_dissect_provisioned_contexts_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4437 proto_tree *subtree;
4438 int base_offset;
4439 uint32_t i, elem_count;
4440 wmem_array_t *pair_list;
4441 struct mbim_pair_list pair_list_item, *p_pair_list_item;
4443 base_offset = offset;
4444 proto_tree_add_item_ret_uint(tree, hf_mbim_provisioned_contexts_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
4445 offset += 4;
4446 if (elem_count) {
4447 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4448 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provisioned Context Ref List");
4449 for (i = 0; i < elem_count; i++) {
4450 proto_tree_add_item_ret_uint(subtree, hf_mbim_provisioned_contexts_info_provisioned_context_offset,
4451 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4452 offset += 4;
4453 proto_tree_add_item_ret_uint(subtree, hf_mbim_provisioned_contexts_info_provisioned_context_size,
4454 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4455 offset += 4;
4456 wmem_array_append_one(pair_list, pair_list_item);
4458 for (i = 0; i < elem_count; i++) {
4459 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4460 if (p_pair_list_item->offset && p_pair_list_item->size) {
4461 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4462 p_pair_list_item->size, ett_mbim_pair_list, NULL, "Provisioned Context #%u", i+1);
4463 mbim_dissect_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, false);
4469 static void
4470 mbim_dissect_ipv4_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
4472 uint32_t on_link_prefix_length;
4473 proto_item *ti;
4475 ti = proto_tree_add_item_ret_uint(tree, hf_mbim_ipv4_element_on_link_prefix_length,
4476 tvb, *offset, 4, ENC_LITTLE_ENDIAN, &on_link_prefix_length);
4477 *offset += 4;
4478 if (on_link_prefix_length > 32) {
4479 expert_add_info_format(pinfo, ti, &ei_mbim_illegal_on_link_prefix_length,
4480 "Illegal On Link Prefix Length %u (max is 32)", on_link_prefix_length);
4482 proto_tree_add_item(tree, hf_mbim_ipv4_element_ipv4_address, tvb, *offset, 4, ENC_NA);
4483 *offset += 4;
4486 static void
4487 mbim_dissect_ipv6_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
4489 uint32_t on_link_prefix_length;
4490 proto_item *ti;
4492 ti = proto_tree_add_item_ret_uint(tree, hf_mbim_ipv6_element_on_link_prefix_length, tvb,
4493 *offset, 4, ENC_LITTLE_ENDIAN, &on_link_prefix_length);
4494 *offset += 4;
4495 if (on_link_prefix_length > 128) {
4496 expert_add_info_format(pinfo, ti, &ei_mbim_illegal_on_link_prefix_length,
4497 "Illegal On Link Prefix Length %u (max is 128)", on_link_prefix_length);
4499 proto_tree_add_item(tree, hf_mbim_ipv6_element_ipv6_address, tvb, *offset, 16, ENC_NA);
4500 *offset += 16;
4503 static void
4504 mbim_dissect_ip_configuration_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4506 int base_offset;
4507 uint32_t i, ipv4_address_count, ipv4_address_offset, ipv6_address_count, ipv6_address_offset,
4508 ipv4_gateway_offset, ipv6_gateway_offset, ipv4_dns_count, ipv4_dns_offset,
4509 ipv6_dns_count, ipv6_dns_offset;
4511 base_offset = offset;
4512 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4513 offset += 4;
4514 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ip_configuration_info_ipv4_configuration_available,
4515 ett_mbim_bitmap, mbim_ip_configuration_info_ipv4_configuration_available_fields, ENC_LITTLE_ENDIAN);
4516 offset += 4;
4517 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ip_configuration_info_ipv6_configuration_available,
4518 ett_mbim_bitmap, mbim_ip_configuration_info_ipv6_configuration_available_fields, ENC_LITTLE_ENDIAN);
4519 offset += 4;
4520 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_address_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_address_count);
4521 offset += 4;
4522 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_address_offset);
4523 offset += 4;
4524 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_address_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_address_count);
4525 offset += 4;
4526 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_address_offset);
4527 offset += 4;
4528 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_gateway_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_gateway_offset);
4529 offset += 4;
4530 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_gateway_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_gateway_offset);
4531 offset += 4;
4532 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_dns_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_dns_count);
4533 offset += 4;
4534 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_dns_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_dns_offset);
4535 offset += 4;
4536 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_dns_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_dns_count);
4537 offset += 4;
4538 proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_dns_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_dns_offset);
4539 offset += 4;
4540 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_mtu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4541 offset += 4;
4542 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_mtu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4543 offset += 4;
4544 if (ipv4_address_count && ipv4_address_offset) {
4545 offset = base_offset + ipv4_address_offset;
4546 for (i = 0; i < ipv4_address_count; i++) {
4547 mbim_dissect_ipv4_element(tvb, pinfo, tree, &offset);
4550 if (ipv6_address_count && ipv6_address_offset) {
4551 offset = base_offset + ipv6_address_offset;
4552 for (i = 0; i < ipv6_address_count; i++) {
4553 mbim_dissect_ipv6_element(tvb, pinfo, tree, &offset);
4556 if (ipv4_gateway_offset) {
4557 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_gateway,
4558 tvb, base_offset + ipv4_gateway_offset, 4, ENC_NA);
4560 if (ipv6_gateway_offset) {
4561 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_gateway,
4562 tvb, base_offset + ipv6_gateway_offset, 16, ENC_NA);
4564 if (ipv4_dns_count && ipv4_dns_offset) {
4565 offset = base_offset + ipv4_dns_offset;
4566 for (i = 0; i < ipv4_dns_count; i++) {
4567 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_dns,
4568 tvb, offset, 4, ENC_NA);
4569 offset += 4;
4572 if (ipv6_dns_count && ipv6_dns_offset) {
4573 offset = base_offset + ipv6_dns_offset;
4574 for (i = 0; i < ipv6_dns_count; i++) {
4575 proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_dns,
4576 tvb, offset, 16, ENC_NA);
4577 offset += 16;
4582 static void
4583 mbim_dissect_device_service_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4585 uint8_t uuid_idx;
4586 uint32_t i, cid_count, cid;
4587 struct mbim_uuid_ext *uuid_ext_info = NULL;
4589 uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_device_service_element_device_service_id, &offset, &uuid_ext_info, true);
4590 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_service_element_dss_payload,
4591 ett_mbim_bitmap, mbim_device_service_element_dss_payload_fields, ENC_LITTLE_ENDIAN);
4592 offset += 4;
4593 proto_tree_add_item(tree, hf_mbim_device_service_element_max_dss_instances, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4594 offset += 4;
4595 proto_tree_add_item_ret_uint(tree, hf_mbim_device_service_element_cid_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
4596 offset += 4;
4597 for (i = 0; i < cid_count; i++) {
4598 cid = tvb_get_letohl(tvb, offset);
4599 if (uuid_idx < UUID_MAX) {
4600 if (mbim_uuid_info[uuid_idx].cid_list_ext) {
4601 proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4602 val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"), cid);
4603 } else {
4604 proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4605 val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"), cid);
4607 } else if (uuid_idx == UUID_EXT_IDX) {
4608 proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4609 val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown"), cid);
4610 } else {
4611 proto_tree_add_uint(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid);
4613 offset += 4;
4617 static void
4618 mbim_dissect_device_services_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4620 proto_tree *subtree;
4621 int base_offset;
4622 uint32_t i, device_services_count;
4623 wmem_array_t *pair_list;
4624 struct mbim_pair_list pair_list_item, *p_pair_list_item;
4626 base_offset = offset;
4627 proto_tree_add_item_ret_uint(tree, hf_mbim_device_services_info_device_services_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_services_count);
4628 offset += 4;
4629 proto_tree_add_item(tree, hf_mbim_device_services_info_max_dss_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4630 offset += 4;
4631 if (device_services_count) {
4632 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4633 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*device_services_count, ett_mbim_pair_list, NULL, "Device Services Ref List");
4634 for (i = 0; i < device_services_count; i++) {
4635 proto_tree_add_item_ret_uint(subtree, hf_mbim_device_services_info_device_services_offset,
4636 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4637 offset += 4;
4638 proto_tree_add_item_ret_uint(subtree, hf_mbim_device_services_info_device_services_size,
4639 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4640 offset += 4;
4641 wmem_array_append_one(pair_list, pair_list_item);
4643 for (i = 0; i < device_services_count; i++) {
4644 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4645 if (p_pair_list_item->offset && p_pair_list_item->size) {
4646 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4647 p_pair_list_item->size, ett_mbim_pair_list, NULL, "Device Service Element #%u", i+1);
4648 mbim_dissect_device_service_element(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4654 static void
4655 mbim_dissect_event_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4657 uint8_t uuid_idx;
4658 uint32_t i, cid_count, cid;
4659 struct mbim_uuid_ext *uuid_ext_info = NULL;
4661 uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_event_entry_device_service_id, &offset, &uuid_ext_info, true);
4662 proto_tree_add_item_ret_uint(tree, hf_mbim_event_entry_cid_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
4663 offset += 4;
4664 for (i = 0; i < cid_count; i++) {
4665 cid = tvb_get_letohl(tvb, offset);
4666 if (uuid_idx < UUID_MAX) {
4667 if (mbim_uuid_info[uuid_idx].cid_list_ext) {
4668 proto_tree_add_uint_format_value(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid, "%s (%u)",
4669 val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"), cid);
4670 } else {
4671 proto_tree_add_uint_format_value(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid, "%s (%u)",
4672 val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"), cid);
4674 } else if (uuid_idx == UUID_EXT_IDX) {
4675 proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4676 val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown"), cid);
4677 } else {
4678 proto_tree_add_uint(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid);
4680 offset += 4;
4684 static void
4685 mbim_dissect_device_service_subscribe_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4687 proto_tree *subtree;
4688 int base_offset;
4689 uint32_t i, element_count;
4690 wmem_array_t *pair_list;
4691 struct mbim_pair_list pair_list_item, *p_pair_list_item;
4693 base_offset = offset;
4694 proto_tree_add_item_ret_uint(tree, hf_mbim_device_service_subscribe_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
4695 offset += 4;
4696 if (element_count) {
4697 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4698 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "Device Service Subscribe Ref List");
4699 for (i = 0; i < element_count; i++) {
4700 proto_tree_add_item_ret_uint(subtree, hf_mbim_device_service_subscribe_device_service_offset,
4701 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4702 offset += 4;
4703 proto_tree_add_item_ret_uint(subtree, hf_mbim_device_service_subscribe_device_service_size,
4704 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4705 offset += 4;
4706 wmem_array_append_one(pair_list, pair_list_item);
4708 for (i = 0; i < element_count; i++) {
4709 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4710 if (p_pair_list_item->offset && p_pair_list_item->size) {
4711 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4712 p_pair_list_item->size, ett_mbim_pair_list, NULL, "Device Service Element #%u", i+1);
4713 mbim_dissect_event_entry(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4719 static void
4720 mbim_dissect_packet_statistics_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4722 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_discards, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4723 offset += 4;
4724 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_errors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4725 offset += 4;
4726 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_octets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4727 offset += 8;
4728 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_packets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4729 offset += 8;
4730 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_octets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4731 offset += 8;
4732 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_packets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4733 offset += 8;
4734 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_errors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4735 offset += 4;
4736 proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_discards, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4739 static void
4740 mbim_dissect_single_packet_filter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4742 int base_offset;
4743 uint32_t filter_size, packet_filter_offset, packet_mask_offset;
4745 base_offset = offset;
4746 proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_filter_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &filter_size);
4747 offset += 4;
4748 proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_packet_filter_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_filter_offset);
4749 offset += 4;
4750 proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_packet_mask_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_mask_offset);
4751 offset += 4;
4752 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4753 proto_tree_add_item(tree, hf_mbim_single_packet_filter_filter_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4754 /* offset += 4; */
4756 if (filter_size) {
4757 if (packet_filter_offset) {
4758 proto_tree_add_item(tree, hf_mbim_single_packet_filter_packet_filter, tvb, base_offset + packet_filter_offset,
4759 filter_size, ENC_NA);
4761 if (packet_mask_offset) {
4762 proto_tree_add_item(tree, hf_mbim_single_packet_filter_packet_mask, tvb, base_offset + packet_mask_offset,
4763 filter_size, ENC_NA);
4768 static void
4769 mbim_dissect_packet_filters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4771 proto_tree *subtree;
4772 int base_offset;
4773 uint32_t i, packet_filters_count;
4774 wmem_array_t *pair_list;
4775 struct mbim_pair_list pair_list_item, *p_pair_list_item;
4777 base_offset = offset;
4778 proto_tree_add_item(tree, hf_mbim_packet_filters_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4779 offset += 4;
4780 proto_tree_add_item_ret_uint(tree, hf_mbim_packet_filters_packet_filters_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_filters_count);
4781 offset += 4;
4782 if (packet_filters_count) {
4783 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4784 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*packet_filters_count, ett_mbim_pair_list, NULL, "Packet Filter Ref List");
4785 for (i = 0; i < packet_filters_count; i++) {
4786 proto_tree_add_item_ret_uint(subtree, hf_mbim_packet_filters_packet_filters_packet_filter_offset,
4787 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4788 offset += 4;
4789 proto_tree_add_item_ret_uint(subtree, hf_mbim_packet_filters_packet_filters_packet_filter_size,
4790 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4791 offset += 4;
4792 wmem_array_append_one(pair_list, pair_list_item);
4794 for (i = 0; i < packet_filters_count; i++) {
4795 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4796 if (p_pair_list_item->offset && p_pair_list_item->size) {
4797 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4798 p_pair_list_item->size, ett_mbim_pair_list, NULL, "Packet Filter Element #%u", i+1);
4799 mbim_dissect_single_packet_filter(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, mbim_conv);
4805 static void
4806 mbim_dissect_set_sms_configuration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4808 int base_offset;
4809 uint32_t sc_address_offset, sc_address_size;
4810 proto_item *it;
4812 base_offset = offset;
4813 proto_tree_add_item(tree, hf_mbim_set_sms_configuration_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4814 offset += 4;
4815 proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_configuration_sc_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_offset);
4816 offset += 4;
4817 proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_configuration_sc_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_size);
4818 /*offset += 4;*/
4819 if (sc_address_offset && sc_address_size) {
4820 it = proto_tree_add_item(tree, hf_mbim_set_sms_configuration_sc_address, tvb, base_offset + sc_address_offset,
4821 sc_address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4822 if (sc_address_size > 40) {
4823 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4828 static void
4829 mbim_dissect_sms_configuration_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4831 int base_offset;
4832 uint32_t sc_address_offset, sc_address_size;
4833 proto_item *it;
4835 base_offset = offset;
4836 proto_tree_add_item(tree, hf_mbim_sms_configuration_info_sms_storage_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4837 offset += 4;
4838 proto_tree_add_item(tree, hf_mbim_sms_configuration_info_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4839 offset += 4;
4840 proto_tree_add_item(tree, hf_mbim_sms_configuration_info_max_messages, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4841 offset += 4;
4842 proto_tree_add_item(tree, hf_mbim_sms_configuration_info_cdma_short_message_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4843 offset += 4;
4844 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_configuration_info_sc_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_offset);
4845 offset += 4;
4846 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_configuration_info_sc_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_size);
4847 /*offset += 4;*/
4848 if (sc_address_offset && sc_address_size) {
4849 it = proto_tree_add_item(tree, hf_mbim_sms_configuration_info_sc_address, tvb, base_offset + sc_address_offset,
4850 sc_address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4851 if (sc_address_size > 40) {
4852 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4857 static void
4858 mbim_dissect_sms_pdu_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
4859 struct mbim_conv_info *mbim_conv)
4861 int base_offset;
4862 uint32_t message_status, pdu_data_offset, pdu_data_size;
4863 tvbuff_t *sms_tvb;
4864 proto_item *ti;
4865 proto_tree *subtree, *sc_tree;
4866 uint8_t sc_address_size;
4868 base_offset = offset;
4869 proto_tree_add_item(tree, hf_mbim_sms_pdu_record_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4870 offset += 4;
4871 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_message_status, tvb, offset, 4, ENC_LITTLE_ENDIAN, &message_status);
4872 offset += 4;
4873 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_pdu_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_offset);
4874 offset += 4;
4875 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_pdu_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_size);
4876 /*offset += 4;*/
4877 if (pdu_data_offset && pdu_data_size) {
4878 if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM)) ||
4879 (mbim_sms_pdu_format == SMS_PDU_3GPP)) && gsm_sms_handle) {
4880 ti = proto_tree_add_item(tree, hf_mbim_sms_pdu_record_pdu_data, tvb, base_offset + pdu_data_offset,
4881 pdu_data_size, ENC_NA);
4882 if (pdu_data_size > 183) {
4883 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
4885 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
4886 sc_address_size = tvb_get_uint8(tvb, base_offset + pdu_data_offset);
4887 sc_tree = proto_tree_add_subtree(subtree, tvb, base_offset + pdu_data_offset, 1 + sc_address_size,
4888 ett_mbim_sc_address, NULL, "Service Center Address");
4889 proto_tree_add_uint(sc_tree, hf_mbim_sms_pdu_record_pdu_data_sc_address_size, tvb,
4890 base_offset + pdu_data_offset, 1, sc_address_size);
4891 if (sc_address_size) {
4892 de_cld_party_bcd_num(tvb, sc_tree, pinfo, base_offset + pdu_data_offset + 1,
4893 sc_address_size, NULL, 0);
4895 if (pdu_data_size > (uint32_t)(sc_address_size + 1)) {
4896 pdu_data_size -= sc_address_size + 1;
4897 sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset + 1 + sc_address_size,
4898 pdu_data_size);
4899 pinfo->p2p_dir = (message_status < 2) ? P2P_DIR_SENT : P2P_DIR_RECV;
4900 call_dissector(gsm_sms_handle, sms_tvb, pinfo, subtree);
4902 } else {
4903 ti = proto_tree_add_item(tree, hf_mbim_sms_pdu_record_pdu_data, tvb, base_offset + pdu_data_offset,
4904 pdu_data_size, ENC_NA);
4905 if (pdu_data_size > 255) {
4906 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
4908 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
4909 if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_CDMA)) ||
4910 (mbim_sms_pdu_format == SMS_PDU_3GPP2)) && cdma_sms_handle) {
4911 sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset, pdu_data_size);
4912 call_dissector(cdma_sms_handle, sms_tvb, pinfo, subtree);
4918 static void mbim_decode_sms_cdma_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const int hfindex, int offset,
4919 uint32_t encoding_id, uint32_t size_in_bytes, uint32_t size_in_chars)
4921 unsigned char *src, *dest;
4923 switch (encoding_id) {
4924 case MBIM_ENCODING_7BIT_ASCII:
4925 proto_tree_add_ascii_7bits_item(tree, hfindex, tvb, (offset << 3), size_in_chars);
4926 break;
4927 case MBIM_ENCODING_IA5:
4928 src = (unsigned char*)tvb_get_ascii_7bits_string(pinfo->pool, tvb, (offset << 3), size_in_chars);
4929 dest = (unsigned char*)wmem_alloc(pinfo->pool, (const size_t)size_in_chars + 1);
4930 IA5_7BIT_decode(dest, src, size_in_chars);
4931 proto_tree_add_string(tree, hfindex, tvb, offset, size_in_bytes, (const char*)dest);
4932 break;
4933 case MBIM_ENCODING_UNICODE:
4934 proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_UCS_2|ENC_BIG_ENDIAN);
4935 break;
4936 case MBIM_ENCODING_LATIN_HEBREW:
4937 proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_ISO_8859_8|ENC_NA);
4938 break;
4939 case MBIM_ENCODING_LATIN:
4940 proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_ISO_8859_1|ENC_NA);
4941 break;
4942 case MBIM_ENCODING_GSM_7BIT:
4943 proto_tree_add_ts_23_038_7bits_packed_item(tree, hfindex, tvb, (offset << 3), size_in_chars);
4944 break;
4945 default:
4946 break;
4950 static void
4951 mbim_dissect_sms_cdma_record(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4953 int base_offset;
4954 uint32_t address_offset, address_size, timestamp_offset, timestamp_size, encoding_id,
4955 encoded_message_offset, size_in_bytes, size_in_chars;
4956 proto_item *ti;
4957 proto_tree *subtree;
4958 proto_item *it;
4960 base_offset = offset;
4961 proto_tree_add_item(tree, hf_mbim_sms_cdma_record_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4962 offset += 4;
4963 proto_tree_add_item(tree, hf_mbim_sms_cdma_record_message_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4964 offset += 4;
4965 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_offset);
4966 offset += 4;
4967 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_size);
4968 offset += 4;
4969 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_timestamp_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &timestamp_offset);
4970 offset += 4;
4971 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_timestamp_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &timestamp_size);
4972 offset += 4;
4973 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_encoding_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &encoding_id);
4974 offset += 4;
4975 proto_tree_add_item(tree, hf_mbim_sms_cdma_record_language_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4976 offset += 4;
4977 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_encoded_message_offset, tvb, offset, 4,
4978 ENC_LITTLE_ENDIAN, &encoded_message_offset);
4979 offset += 4;
4980 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_size_in_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_bytes);
4981 offset += 4;
4982 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_size_in_characters, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_chars);
4983 /*offset += 4;*/
4984 if (address_offset && address_size) {
4985 it = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_address, tvb, base_offset + address_offset,
4986 address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4987 if (address_size > 40) {
4988 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4991 if (timestamp_offset && timestamp_size) {
4992 it = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_timestamp, tvb, base_offset + timestamp_offset,
4993 timestamp_size, ENC_NA|ENC_ASCII);
4994 if (timestamp_size > 21) {
4995 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4998 if (encoded_message_offset && size_in_bytes) {
4999 ti = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_encoded_message, tvb, base_offset + encoded_message_offset,
5000 size_in_bytes, ENC_NA);
5001 if (size_in_bytes > 160) {
5002 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5004 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5005 mbim_decode_sms_cdma_text(tvb, pinfo, subtree, hf_mbim_sms_cdma_record_encoded_message_text,
5006 (base_offset + encoded_message_offset), encoding_id, size_in_bytes, size_in_chars);
5010 static void
5011 mbim_dissect_sms_read_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5013 proto_tree_add_item(tree, hf_mbim_sms_read_req_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5014 offset += 4;
5015 proto_tree_add_item(tree, hf_mbim_sms_read_req_flag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5016 offset += 4;
5017 proto_tree_add_item(tree, hf_mbim_sms_read_req_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5020 static void
5021 mbim_dissect_sms_read_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
5022 struct mbim_conv_info *mbim_conv)
5024 proto_tree *subtree;
5025 int base_offset;
5026 uint32_t i, format, element_count;
5027 wmem_array_t *pair_list;
5028 struct mbim_pair_list pair_list_item, *p_pair_list_item;
5030 base_offset = offset;
5031 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_read_info_format, tvb, offset, 4, ENC_LITTLE_ENDIAN, &format);
5032 offset += 4;
5033 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_read_info_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
5034 offset += 4;
5035 if (element_count) {
5036 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5037 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "SMS Ref List");
5038 for (i = 0; i < element_count; i++) {
5039 proto_tree_add_item_ret_uint(subtree, hf_mbim_sms_read_info_sms_offset,
5040 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5041 offset += 4;
5042 proto_tree_add_item_ret_uint(subtree, hf_mbim_sms_read_info_sms_size,
5043 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5044 offset += 4;
5045 wmem_array_append_one(pair_list, pair_list_item);
5047 for (i = 0; i < element_count; i++) {
5048 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5049 if (p_pair_list_item->offset && p_pair_list_item->size) {
5050 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
5051 p_pair_list_item->size, ett_mbim_pair_list, NULL, "SMS Element #%u", i+1);
5052 if (format == MBIM_SMS_FORMAT_PDU) {
5053 mbim_dissect_sms_pdu_record(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, mbim_conv);
5054 } else if (format == MBIM_SMS_FORMAT_CDMA) {
5055 mbim_dissect_sms_cdma_record(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5056 } else {
5057 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unknown_sms_format, tvb,
5058 base_offset + p_pair_list_item->offset, p_pair_list_item->size);
5065 static void
5066 mbim_dissect_sms_send_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
5067 struct mbim_conv_info *mbim_conv)
5069 int base_offset;
5070 uint32_t pdu_data_offset, pdu_data_size;
5071 tvbuff_t *sms_tvb;
5072 proto_item *ti;
5073 proto_tree *subtree, *sc_tree;
5074 uint8_t sc_address_size;
5076 base_offset = offset;
5077 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_pdu_pdu_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_offset);
5078 offset += 4;
5079 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_pdu_pdu_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_size);
5080 /*offset += 4;*/
5081 if (pdu_data_offset && pdu_data_size) {
5082 if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM)) ||
5083 (mbim_sms_pdu_format == SMS_PDU_3GPP)) && gsm_sms_handle) {
5084 ti = proto_tree_add_item(tree, hf_mbim_sms_send_pdu_pdu_data, tvb, base_offset + pdu_data_offset,
5085 pdu_data_size, ENC_NA);
5086 if (pdu_data_size > 183) {
5087 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5089 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5090 sc_address_size = tvb_get_uint8(tvb, base_offset + pdu_data_offset);
5091 sc_tree = proto_tree_add_subtree(subtree, tvb, base_offset + pdu_data_offset, 1 + sc_address_size,
5092 ett_mbim_sc_address, NULL, "Service Center Address");
5093 proto_tree_add_uint(sc_tree, hf_mbim_sms_send_pdu_pdu_data_sc_address_size, tvb,
5094 base_offset + pdu_data_offset, 1, sc_address_size);
5095 if (sc_address_size) {
5096 de_cld_party_bcd_num(tvb, sc_tree, pinfo, base_offset + pdu_data_offset + 1,
5097 sc_address_size, NULL, 0);
5099 if (pdu_data_size > (uint32_t)(sc_address_size + 1)) {
5100 pdu_data_size -= sc_address_size + 1;
5101 sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset + 1 + sc_address_size,
5102 pdu_data_size);
5103 pinfo->p2p_dir = P2P_DIR_RECV;
5104 call_dissector(gsm_sms_handle, sms_tvb, pinfo, subtree);
5106 } else {
5107 ti = proto_tree_add_item(tree, hf_mbim_sms_send_pdu_pdu_data, tvb, base_offset + pdu_data_offset,
5108 pdu_data_size, ENC_NA);
5109 if (pdu_data_size > 255) {
5110 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5112 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5113 if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_CDMA)) ||
5114 (mbim_sms_pdu_format == SMS_PDU_3GPP2)) && cdma_sms_handle) {
5115 sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset, pdu_data_size);
5116 call_dissector(cdma_sms_handle, sms_tvb, pinfo, subtree);
5122 static void
5123 mbim_dissect_sms_send_cdma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5125 int base_offset;
5126 uint32_t encoding_id, address_offset, address_size, encoded_message_offset,
5127 size_in_bytes, size_in_chars;
5128 proto_item *ti;
5129 proto_tree *subtree;
5131 base_offset = offset;
5132 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_encoding_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &encoding_id);
5133 offset += 4;
5134 proto_tree_add_item(tree, hf_mbim_sms_send_cdma_language_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5135 offset += 4;
5136 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_offset);
5137 offset += 4;
5138 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_size);
5139 offset += 4;
5140 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_encoded_message_offset, tvb, offset, 4,
5141 ENC_LITTLE_ENDIAN, &encoded_message_offset);
5142 offset += 4;
5143 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_size_in_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_bytes);
5144 offset += 4;
5145 proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_size_in_characters, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_chars);
5146 /*offset += 4;*/
5147 if (address_offset && address_size) {
5148 ti = proto_tree_add_item(tree, hf_mbim_sms_send_cdma_address, tvb, base_offset + address_offset,
5149 address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5150 if (address_size > 40) {
5151 expert_add_info(pinfo, ti, &ei_mbim_oversized_string);
5154 if (encoded_message_offset && size_in_bytes) {
5155 ti = proto_tree_add_item(tree, hf_mbim_sms_send_cdma_encoded_message, tvb, base_offset + encoded_message_offset,
5156 size_in_bytes, ENC_NA);
5157 if (size_in_bytes > 160) {
5158 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5160 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5161 mbim_decode_sms_cdma_text(tvb, pinfo, subtree, hf_mbim_sms_send_cdma_encoded_message_text,
5162 (base_offset + encoded_message_offset), encoding_id, size_in_bytes, size_in_chars);
5166 static void
5167 mbim_dissect_set_sms_send(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
5168 struct mbim_conv_info *mbim_conv)
5170 uint32_t format;
5172 proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_send_format, tvb, offset, 4, ENC_LITTLE_ENDIAN, &format);
5173 offset += 4;
5174 if (format == MBIM_SMS_FORMAT_PDU) {
5175 mbim_dissect_sms_send_pdu(tvb, pinfo, tree, offset, mbim_conv);
5176 } else if (format == MBIM_SMS_FORMAT_CDMA) {
5177 mbim_dissect_sms_send_cdma(tvb, pinfo, tree, offset);
5178 } else {
5179 proto_tree_add_expert(tree, pinfo, &ei_mbim_unknown_sms_format, tvb, offset, -1);
5183 static void
5184 mbim_dissect_set_ussd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5186 proto_item *ti;
5187 proto_tree *subtree;
5188 int base_offset;
5189 uint32_t ussd_payload_offset, ussd_payload_length;
5190 uint8_t encoding;
5191 tvbuff_t *ussd_tvb;
5193 base_offset = offset;
5194 proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5195 offset += 4;
5196 ti = proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_data_coding_scheme, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5197 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5198 encoding = dissect_cbs_data_coding_scheme(tvb, pinfo, subtree, offset);
5199 offset += 4;
5200 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ussd_ussd_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_offset);
5201 offset += 4;
5202 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ussd_ussd_payload_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_length);
5203 /*offset += 4;*/
5204 if (ussd_payload_offset && ussd_payload_length) {
5205 ti = proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_payload, tvb, base_offset + ussd_payload_offset,
5206 ussd_payload_length, ENC_NA);
5207 if (ussd_payload_length > 160) {
5208 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5210 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5211 ussd_tvb = tvb_new_subset_length(tvb, base_offset + ussd_payload_offset, ussd_payload_length);
5212 switch (encoding) {
5213 case SMS_ENCODING_7BIT:
5214 case SMS_ENCODING_7BIT_LANG:
5215 proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5216 ussd_tvb, 0, ussd_payload_length, ENC_3GPP_TS_23_038_7BITS|ENC_NA);
5217 break;
5218 case SMS_ENCODING_8BIT:
5219 /* XXX - ASCII, or some extended ASCII? */
5220 proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5221 ussd_tvb , 0, ussd_payload_length, ENC_ASCII);
5222 break;
5223 case SMS_ENCODING_UCS2:
5224 case SMS_ENCODING_UCS2_LANG:
5225 proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5226 ussd_tvb , 0, ussd_payload_length, ENC_UCS_2|ENC_BIG_ENDIAN);
5227 break;
5228 default:
5229 break;
5234 static void
5235 mbim_dissect_ussd_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5237 proto_item *ti;
5238 proto_tree *subtree;
5239 int base_offset;
5240 uint32_t ussd_payload_offset, ussd_payload_length;
5241 uint8_t encoding;
5242 tvbuff_t *ussd_tvb;
5244 base_offset = offset;
5245 proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_response, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5246 offset += 4;
5247 proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_session_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5248 offset += 4;
5249 ti = proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_data_coding_scheme, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5250 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5251 encoding = dissect_cbs_data_coding_scheme(tvb, pinfo, subtree, offset);
5252 offset += 4;
5253 proto_tree_add_item_ret_uint(tree, hf_mbim_ussd_info_ussd_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_offset);
5254 offset += 4;
5255 proto_tree_add_item_ret_uint(tree, hf_mbim_ussd_info_ussd_payload_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_length);
5256 /*offset += 4;*/
5257 if (ussd_payload_offset && ussd_payload_length) {
5258 ti = proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_payload, tvb, base_offset + ussd_payload_offset,
5259 ussd_payload_length, ENC_NA);
5260 if (ussd_payload_length > 160) {
5261 expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5263 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5264 ussd_tvb = tvb_new_subset_length(tvb, base_offset + ussd_payload_offset, ussd_payload_length);
5265 switch (encoding) {
5266 case SMS_ENCODING_7BIT:
5267 case SMS_ENCODING_7BIT_LANG:
5268 proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5269 ussd_tvb, 0, ussd_payload_length, ENC_3GPP_TS_23_038_7BITS|ENC_NA);
5270 break;
5271 case SMS_ENCODING_8BIT:
5272 /* XXX - ASCII, or some extended ASCII? */
5273 proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5274 ussd_tvb , 0, ussd_payload_length, ENC_ASCII);
5275 break;
5276 case SMS_ENCODING_UCS2:
5277 case SMS_ENCODING_UCS2_LANG:
5278 proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5279 ussd_tvb , 0, ussd_payload_length, ENC_UCS_2|ENC_BIG_ENDIAN);
5280 break;
5281 default:
5282 break;
5287 static void
5288 mbim_dissect_phonebook_configuration_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5290 proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_phonebook_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5291 offset += 4;
5292 proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_total_nb_of_entries, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5293 offset += 4;
5294 proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_used_entries, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5295 offset += 4;
5296 proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_max_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5297 offset += 4;
5298 proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_max_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5301 static void
5302 mbim_dissect_phonebook_entry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5304 int base_offset;
5305 uint32_t number_offset, number_length, name_offset, name_length;
5307 base_offset = offset;
5308 proto_tree_add_item(tree, hf_mbim_phonebook_entry_entry_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5309 offset += 4;
5310 proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_number_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_offset);
5311 offset += 4;
5312 proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_length);
5313 offset += 4;
5314 proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_offset);
5315 offset += 4;
5316 proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_length);
5317 /*offset += 4;*/
5318 if (number_offset && number_length) {
5319 proto_tree_add_item(tree, hf_mbim_phonebook_entry_number, tvb, base_offset + number_offset,
5320 number_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5322 if (name_offset && name_length) {
5323 proto_tree_add_item(tree, hf_mbim_phonebook_entry_name, tvb, base_offset + name_offset,
5324 name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5328 static void
5329 mbim_dissect_phonebook_read_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5331 proto_tree *subtree;
5332 int base_offset;
5333 uint32_t i, element_count;
5334 wmem_array_t *pair_list;
5335 struct mbim_pair_list pair_list_item, *p_pair_list_item;
5337 base_offset = offset;
5338 proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_read_info_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
5339 offset += 4;
5340 if (element_count) {
5341 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5342 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "Phonebook Ref List");
5343 for (i = 0; i < element_count; i++) {
5344 proto_tree_add_item_ret_uint(subtree, hf_mbim_phonebook_read_info_phonebook_offset,
5345 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5346 offset += 4;
5347 proto_tree_add_item_ret_uint(subtree, hf_mbim_phonebook_read_info_phonebook_size,
5348 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5349 offset += 4;
5350 wmem_array_append_one(pair_list, pair_list_item);
5352 for (i = 0; i < element_count; i++) {
5353 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5354 if (p_pair_list_item->offset && p_pair_list_item->size) {
5355 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
5356 p_pair_list_item->size, ett_mbim_pair_list, NULL, "Phonebook Element #%u", i+1);
5357 mbim_dissect_phonebook_entry(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5363 static void
5364 mbim_dissect_set_phonebook_write(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5366 int base_offset;
5367 uint32_t number_offset, number_length, name_offset, name_length;
5369 base_offset = offset;
5370 proto_tree_add_item(tree, hf_mbim_set_phonebook_write_save_flag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5371 offset += 4;
5372 proto_tree_add_item(tree, hf_mbim_set_phonebook_write_save_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5373 offset += 4;
5374 proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_number_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_offset);
5375 offset += 4;
5376 proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_length);
5377 offset += 4;
5378 proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_offset);
5379 offset += 4;
5380 proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_length);
5381 /*offset += 4;*/
5382 if (number_offset && number_length) {
5383 proto_tree_add_item(tree, hf_mbim_set_phonebook_write_number, tvb, base_offset + number_offset,
5384 number_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5386 if (name_offset && name_length) {
5387 proto_tree_add_item(tree, hf_mbim_set_phonebook_write_name, tvb, base_offset + name_offset,
5388 name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5392 static void
5393 mbim_dissect_set_stk_pac(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5395 proto_item *ti;
5396 proto_tree *subtree;
5398 ti = proto_tree_add_item(tree, hf_mbim_set_stk_pac_pac_host_control, tvb, offset, 32, ENC_NA);
5399 subtree = proto_item_add_subtree(ti, ett_mbim_pac);
5400 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_refresh, tvb, offset, 1, ENC_NA);
5401 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_more_time, tvb, offset, 1, ENC_NA);
5402 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_poll_interval, tvb, offset, 1, ENC_NA);
5403 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_polling_off, tvb, offset, 1, ENC_NA);
5404 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list, tvb, offset, 1, ENC_NA);
5405 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_call, tvb, offset+1, 1, ENC_NA);
5406 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_ss, tvb, offset+1, 1, ENC_NA);
5407 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_ussd, tvb, offset+1, 1, ENC_NA);
5408 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_short_msg, tvb, offset+1, 1, ENC_NA);
5409 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_dtmf, tvb, offset+1, 1, ENC_NA);
5410 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_launch_browser, tvb, offset+1, 1, ENC_NA);
5411 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_geo_loc_req, tvb, offset+2, 1, ENC_NA);
5412 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_play_tone, tvb, offset+2, 1, ENC_NA);
5413 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_display_text, tvb, offset+2, 1, ENC_NA);
5414 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_inkey, tvb, offset+2, 1, ENC_NA);
5415 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_input, tvb, offset+2, 1, ENC_NA);
5416 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_select_item, tvb, offset+3, 1, ENC_NA);
5417 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_menu, tvb, offset+3, 1, ENC_NA);
5418 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_prov_local_info, tvb, offset+3, 1, ENC_NA);
5419 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_timer_management, tvb, offset+3, 1, ENC_NA);
5420 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text, tvb, offset+3, 1, ENC_NA);
5421 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu, tvb, offset+3, 1, ENC_NA);
5422 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_power_on_card, tvb, offset+3, 1, ENC_NA);
5423 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_power_off_card, tvb, offset+4, 1, ENC_NA);
5424 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_reader_status, tvb, offset+4, 1, ENC_NA);
5425 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_run_at_cmd, tvb, offset+4, 1, ENC_NA);
5426 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_lang_notif, tvb, offset+4, 1, ENC_NA);
5427 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_open_channel, tvb, offset+5, 1, ENC_NA);
5428 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_close_channel, tvb, offset+5, 1, ENC_NA);
5429 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_receive_data, tvb, offset+5, 1, ENC_NA);
5430 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_data, tvb, offset+5, 1, ENC_NA);
5431 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_channel_status, tvb, offset+5, 1, ENC_NA);
5432 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_service_search, tvb, offset+5, 1, ENC_NA);
5433 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_service_info, tvb, offset+5, 1, ENC_NA);
5434 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_declare_service, tvb, offset+5, 1, ENC_NA);
5435 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_frames, tvb, offset+6, 1, ENC_NA);
5436 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_frames_status, tvb, offset+6, 1, ENC_NA);
5437 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5438 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5439 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5440 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_activate, tvb, offset+8, 1, ENC_NA);
5441 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed, tvb, offset+8, 1, ENC_NA);
5442 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_cmd_container, tvb, offset+9, 1, ENC_NA);
5443 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl, tvb, offset+9, 1, ENC_NA);
5444 proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_end_proact_session, tvb, offset+10, 1, ENC_NA);
5447 static void
5448 mbim_dissect_stk_pac_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5450 proto_item *ti;
5451 proto_tree *subtree;
5453 ti = proto_tree_add_item(tree, hf_mbim_stk_pac_info_pac_support, tvb, offset, 256, ENC_NA);
5454 subtree = proto_item_add_subtree(ti, ett_mbim_pac);
5455 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_refresh, tvb, offset+1, 1, ENC_NA);
5456 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_more_time, tvb, offset+2, 1, ENC_NA);
5457 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_poll_interval, tvb, offset+3, 1, ENC_NA);
5458 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_polling_off, tvb, offset+4, 1, ENC_NA);
5459 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_evt_list, tvb, offset+5, 1, ENC_NA);
5460 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_call, tvb, offset+10, 1, ENC_NA);
5461 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_ss, tvb, offset+11, 1, ENC_NA);
5462 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_ussd, tvb, offset+12, 1, ENC_NA);
5463 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_short_msg, tvb, offset+13, 1, ENC_NA);
5464 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_dtmf, tvb, offset+14, 1, ENC_NA);
5465 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_launch_browser, tvb, offset+15, 1, ENC_NA);
5466 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_geo_loc_req, tvb, offset+16, 1, ENC_NA);
5467 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_play_tone, tvb, offset+20, 1, ENC_NA);
5468 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_display_text, tvb, offset+21, 1, ENC_NA);
5469 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_inkey, tvb, offset+22, 1, ENC_NA);
5470 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_input, tvb, offset+23, 1, ENC_NA);
5471 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_select_item, tvb, offset+24, 1, ENC_NA);
5472 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_menu, tvb, offset+25, 1, ENC_NA);
5473 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_prov_local_info, tvb, offset+26, 1, ENC_NA);
5474 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_timer_management, tvb, offset+27, 1, ENC_NA);
5475 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text, tvb, offset+28, 1, ENC_NA);
5476 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_perform_card_apdu, tvb, offset+30, 1, ENC_NA);
5477 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_power_on_card, tvb, offset+31, 1, ENC_NA);
5478 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_power_off_card, tvb, offset+32, 1, ENC_NA);
5479 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_reader_status, tvb, offset+33, 1, ENC_NA);
5480 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_run_at_cmd, tvb, offset+34, 1, ENC_NA);
5481 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_lang_notif, tvb, offset+35, 1, ENC_NA);
5482 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_open_channel, tvb, offset+40, 1, ENC_NA);
5483 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_close_channel, tvb, offset+41, 1, ENC_NA);
5484 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_receive_data, tvb, offset+42, 1, ENC_NA);
5485 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_data, tvb, offset+43, 1, ENC_NA);
5486 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_channel_status, tvb, offset+44, 1, ENC_NA);
5487 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_service_search, tvb, offset+45, 1, ENC_NA);
5488 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_service_info, tvb, offset+46, 1, ENC_NA);
5489 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_declare_service, tvb, offset+47, 1, ENC_NA);
5490 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_frames, tvb, offset+50, 1, ENC_NA);
5491 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_frames_status, tvb, offset+51, 1, ENC_NA);
5492 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg, tvb, offset+60, 1, ENC_NA);
5493 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg, tvb, offset+61, 1, ENC_NA);
5494 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_display_multimedia_msg, tvb, offset+62, 1, ENC_NA);
5495 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_activate, tvb, offset+70, 1, ENC_NA);
5496 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_contactless_state_changed, tvb, offset+71, 1, ENC_NA);
5497 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_cmd_container, tvb, offset+72, 1, ENC_NA);
5498 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl, tvb, offset+73, 1, ENC_NA);
5499 proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_end_proact_session, tvb, offset+81, 1, ENC_NA);
5502 static void
5503 mbim_dissect_set_stk_terminal_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5505 tvbuff_t *pac_tvb;
5506 uint32_t response_length;
5507 proto_item *ti;
5508 proto_tree *subtree;
5510 proto_tree_add_item_ret_uint(tree, hf_mbim_set_stk_terminal_response_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
5511 offset += 4;
5512 ti = proto_tree_add_item(tree, hf_mbim_set_stk_terminal_response_data_buffer, tvb, offset, response_length, ENC_NA);
5513 if (etsi_cat_handle) {
5514 subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5515 pac_tvb = tvb_new_subset_length(tvb, offset, response_length);
5516 call_dissector(etsi_cat_handle, pac_tvb, pinfo, subtree);
5520 static void
5521 mbim_dissect_stk_terminal_response_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5523 int base_offset;
5524 uint32_t result_data_string_offset, result_data_string_length;
5526 base_offset = offset;
5527 proto_tree_add_item_ret_uint(tree, hf_mbim_stk_terminal_response_info_result_data_string_offset,
5528 tvb, offset, 4, ENC_LITTLE_ENDIAN, &result_data_string_offset);
5529 offset += 4;
5530 proto_tree_add_item_ret_uint(tree, hf_mbim_stk_terminal_response_info_result_data_string_length,
5531 tvb, offset, 4, ENC_LITTLE_ENDIAN, &result_data_string_length);
5532 offset += 4;
5533 proto_tree_add_item(tree, hf_mbim_stk_terminal_response_info_status_word, tvb, offset,
5534 4, ENC_LITTLE_ENDIAN);
5535 if (result_data_string_offset && result_data_string_length) {
5536 proto_tree_add_item(tree, hf_mbim_stk_terminal_response_info_result_data_string, tvb,
5537 base_offset + result_data_string_offset, result_data_string_length, ENC_NA);
5541 static void
5542 mbim_dissect_aka_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5544 proto_tree_add_item(tree, hf_mbim_aka_auth_req_rand, tvb, offset, 16, ENC_NA);
5545 offset += 16;
5546 proto_tree_add_item(tree, hf_mbim_aka_auth_req_autn, tvb, offset, 16, ENC_NA);
5549 static void
5550 mbim_dissect_aka_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5552 proto_tree_add_item(tree, hf_mbim_aka_auth_info_res, tvb, offset, 16, ENC_NA);
5553 offset += 16;
5554 proto_tree_add_item(tree, hf_mbim_aka_auth_info_res_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5555 offset += 4;
5556 proto_tree_add_item(tree, hf_mbim_aka_auth_info_ik, tvb, offset, 16, ENC_NA);
5557 offset += 16;
5558 proto_tree_add_item(tree, hf_mbim_aka_auth_info_ck, tvb, offset, 16, ENC_NA);
5559 offset += 16;
5560 proto_tree_add_item(tree, hf_mbim_aka_auth_info_auts, tvb, offset, 14, ENC_NA);
5563 static void
5564 mbim_dissect_akap_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5566 int base_offset;
5567 uint32_t network_name_offset, network_name_length;
5569 base_offset = offset;
5570 proto_tree_add_item(tree, hf_mbim_akap_auth_req_rand, tvb, offset, 16, ENC_NA);
5571 offset += 16;
5572 proto_tree_add_item(tree, hf_mbim_akap_auth_req_autn, tvb, offset, 16, ENC_NA);
5573 offset += 16;
5574 proto_tree_add_item_ret_uint(tree, hf_mbim_akap_auth_req_network_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &network_name_offset);
5575 offset += 4;
5576 proto_tree_add_item_ret_uint(tree, hf_mbim_akap_auth_req_network_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &network_name_length);
5577 /*offset += 4;*/
5578 if (network_name_offset && network_name_length) {
5579 proto_tree_add_item(tree, hf_mbim_akap_auth_req_network_name, tvb, base_offset + network_name_offset,
5580 network_name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5584 static void
5585 mbim_dissect_akap_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5587 proto_tree_add_item(tree, hf_mbim_akap_auth_info_res, tvb, offset, 16, ENC_NA);
5588 offset += 16;
5589 proto_tree_add_item(tree, hf_mbim_akap_auth_info_res_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5590 offset += 4;
5591 proto_tree_add_item(tree, hf_mbim_akap_auth_info_ik, tvb, offset, 16, ENC_NA);
5592 offset += 16;
5593 proto_tree_add_item(tree, hf_mbim_akap_auth_info_ck, tvb, offset, 16, ENC_NA);
5594 offset += 16;
5595 proto_tree_add_item(tree, hf_mbim_akap_auth_info_auts, tvb, offset, 14, ENC_NA);
5598 static void
5599 mbim_dissect_sim_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5601 proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand1, tvb, offset, 16, ENC_NA);
5602 offset += 16;
5603 proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand2, tvb, offset, 16, ENC_NA);
5604 offset += 16;
5605 proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand3, tvb, offset, 16, ENC_NA);
5606 offset += 16;
5607 proto_tree_add_item(tree, hf_mbim_sim_auth_req_n, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5610 static void
5611 mbim_dissect_sim_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5613 proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5614 offset += 4;
5615 proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc1, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5616 offset += 8;
5617 proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5618 offset += 4;
5619 proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc2, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5620 offset += 8;
5621 proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5622 offset += 4;
5623 proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc3, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5624 offset += 8;
5625 proto_tree_add_item(tree, hf_mbim_sim_auth_info_n, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5628 static void
5629 mbim_dissect_set_dss_connect(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5631 uint32_t dss_session_id;
5632 struct mbim_uuid_ext *uuid_ext_info = NULL;
5634 mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_set_dss_connect_device_service_id, &offset, &uuid_ext_info, true);
5635 dss_session_id = tvb_get_letohl(tvb, offset);
5636 dissector_delete_uint("mbim.dss_session_id", dss_session_id, NULL);
5637 if ((dss_session_id <= 255) && uuid_ext_info && uuid_ext_info->dss_handle) {
5638 dissector_add_uint("mbim.dss_session_id", dss_session_id, uuid_ext_info->dss_handle);
5640 proto_tree_add_uint(tree, hf_mbim_set_dss_connect_dss_session_id, tvb, offset, 4, dss_session_id);
5641 offset += 4;
5642 proto_tree_add_item(tree, hf_mbim_set_dss_connect_dss_link_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5645 static void
5646 mbim_dissect_muticarrier_current_cid_list_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5648 uint8_t service_idx;
5650 service_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_multicarrier_current_cid_list_req_uuid, &offset, NULL, true);
5651 if (service_idx != UUID_MULTICARRIER) {
5652 expert_add_info_format(pinfo, NULL, &ei_mbim_unexpected_uuid_value,
5653 "Unexpected UUID value, should be UUID_MULTICARRIER");
5657 static void
5658 mbim_dissect_muticarrier_current_cid_list_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5660 uint32_t i, cid_count;
5662 proto_tree_add_item_ret_uint(tree, hf_mbim_multicarrier_current_cid_list_info_cid_count,
5663 tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
5664 offset += 4;
5665 for (i = 0; i < cid_count; i++) {
5666 proto_tree_add_item(tree, hf_mbim_multicarrier_current_cid_list_info_cid,
5667 tvb, offset, 4, ENC_LITTLE_ENDIAN);
5668 offset += 4;
5672 static void
5673 mbim_dissect_thermal_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5675 int i;
5676 proto_tree *subtree;
5678 for (i = 0; i < 4; i++) {
5679 subtree = proto_tree_add_subtree_format(tree, tvb, offset, 24, ett_mbim_thermal_threshold_setting, NULL, "Threshold %u", i);
5680 proto_tree_add_item(subtree, hf_mbim_thermal_config_enable, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5681 offset += 4;
5682 proto_tree_add_item(subtree, hf_mbim_thermal_config_temp_sensor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5683 offset += 4;
5684 proto_tree_add_item(subtree, hf_mbim_thermal_config_alarm_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5685 offset += 4;
5686 proto_tree_add_item(subtree, hf_mbim_thermal_config_threshold_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5687 offset += 4;
5688 proto_tree_add_item(subtree, hf_mbim_thermal_config_hyst_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5689 offset += 4;
5690 proto_tree_add_item(subtree, hf_mbim_thermal_config_sampling_period, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5691 offset += 4;
5695 static void
5696 mbim_dissect_thermal_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5698 proto_tree_add_item(tree, hf_mbim_thermal_state_info_current_temp_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5699 offset += 4;
5700 proto_tree_add_item(tree, hf_mbim_thermal_state_info_enable, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5701 offset += 4;
5702 proto_tree_add_item(tree, hf_mbim_thermal_state_info_temp_sensor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5703 offset += 4;
5704 proto_tree_add_item(tree, hf_mbim_thermal_state_info_alarm_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5705 offset += 4;
5706 proto_tree_add_item(tree, hf_mbim_thermal_state_info_threshold_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5707 offset += 4;
5708 proto_tree_add_item(tree, hf_mbim_thermal_state_info_hyst_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5709 offset += 4;
5710 proto_tree_add_item(tree, hf_mbim_thermal_state_info_sampling_period, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5713 static void
5714 mbim_dissect_sar_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
5716 proto_tree_add_item(tree, hf_mbim_sar_config_sar_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5717 offset += 4;
5718 if (buffer_len > 4) {
5719 proto_tree_add_item(tree, hf_mbim_sar_config_level, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5723 static void
5724 mbim_dissect_ms_sar_config_state(tvbuff_t* tvb, proto_tree* tree, int offset)
5726 proto_tree_add_item(tree, hf_mbim_ms_sar_config_state_sar_antenna_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5727 offset += 4;
5728 proto_tree_add_item(tree, hf_mbim_ms_sar_config_state_sar_backoff_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5731 static void
5732 mbim_dissect_ms_sar_config(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, bool is_response)
5734 proto_tree* subtree;
5735 uint32_t i, elem_count;
5736 wmem_array_t* pair_list;
5737 struct mbim_pair_list pair_list_item, * p_pair_list_item;
5738 int base_offset = offset;
5739 proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5740 offset += 4;
5741 proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_backoff_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5742 offset += 4;
5743 if (is_response) {
5744 proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_wifi_Integration, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5745 offset += 4;
5747 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_sar_config_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5748 offset += 4;
5749 if (elem_count) {
5750 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5751 subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "SAR Config State List");
5752 for (i = 0; i < elem_count; i++) {
5753 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_sar_config_element_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5754 offset += 4;
5755 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_sar_config_element_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5756 offset += 4;
5757 wmem_array_append_one(pair_list, pair_list_item);
5759 for (i = 0; i < elem_count; i++) {
5760 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5761 if (p_pair_list_item->offset && p_pair_list_item->size) {
5762 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5763 ett_mbim_pair_list, NULL, "SAR Config State #%u", i + 1);
5764 mbim_dissect_ms_sar_config_state(tvb, subtree, base_offset + p_pair_list_item->offset);
5770 static void
5771 mbim_dissect_ms_transmission_status(tvbuff_t* tvb, proto_tree* tree, int offset, bool is_response)
5773 proto_tree_add_item(tree, hf_mbim_ms_transmission_status_channel_notification, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5774 offset += 4;
5775 if (is_response) {
5776 proto_tree_add_item(tree, hf_mbim_ms_transmission_status_transmission_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5777 offset += 4;
5779 proto_tree_add_item(tree, hf_mbim_ms_transmission_status_hysteresis_timer, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5783 static void
5784 mbim_dissect_adpclk_freq_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
5786 proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5787 offset += 4;
5788 proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5789 offset += 4;
5790 if (buffer_len > 8) {
5791 proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5792 offset += 4;
5793 if (buffer_len > 12) {
5794 proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5795 offset += 4;
5796 if (buffer_len > 16) {
5797 proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5803 static void
5804 mbim_dissect_adpclk_freq_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5806 proto_tree *subtree;
5807 int base_offset;
5808 uint32_t i, elem_count;
5809 wmem_array_t *pair_list;
5810 struct mbim_pair_list pair_list_item, *p_pair_list_item;
5812 base_offset = offset;
5813 proto_tree_add_item_ret_uint(tree, hf_mbim_adpclk_freq_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5814 offset += 4;
5815 if (elem_count) {
5816 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5817 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Element Offset Length Pair");
5818 for (i = 0; i < elem_count; i++) {
5819 proto_tree_add_item_ret_uint(subtree, hf_mbim_adpclk_freq_info_adpclk_freq_value_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5820 offset += 4;
5821 proto_tree_add_item_ret_uint(subtree, hf_mbim_adpclk_freq_info_adpclk_freq_value_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5822 offset += 4;
5823 wmem_array_append_one(pair_list, pair_list_item);
5825 for (i = 0; i < elem_count; i++) {
5826 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5827 if (p_pair_list_item->offset && p_pair_list_item->size) {
5828 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5829 ett_mbim_pair_list, NULL, "ADPCLK Freq Value #%u", i+1);
5830 mbim_dissect_adpclk_freq_value(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, p_pair_list_item->size);
5836 static void
5837 mbim_dissect_nrtcws_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
5839 proto_tree_add_item(tree, hf_mbim_nrtcws_config_mode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5840 offset += 2;
5841 if (buffer_len > 2) {
5842 proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5843 offset += 2;
5844 proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_safe_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5845 offset += 2;
5846 proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_bandwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5847 offset += 2;
5848 proto_tree_add_item(tree, hf_mbim_nrtcws_config_bt_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5849 offset += 2;
5850 proto_tree_add_item(tree, hf_mbim_nrtcws_config_bt_safe_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5854 static void
5855 mbim_dissect_nrtcws_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5857 proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5858 offset += 2;
5859 proto_tree_add_item(tree, hf_mbim_nrtcws_info_wlan_safe_rx_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5860 offset += 2;
5861 proto_tree_add_item(tree, hf_mbim_nrtcws_info_wlan_safe_rx_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5862 offset += 2;
5863 proto_tree_add_item(tree, hf_mbim_nrtcws_info_bt_safe_rx_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5864 offset += 2;
5865 proto_tree_add_item(tree, hf_mbim_nrtcws_info_bt_safe_rx_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5866 offset += 2;
5867 proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5868 offset += 2;
5869 proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5870 offset += 2;
5871 proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_initial_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5874 static void
5875 mbim_dissect_atds_signal_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5877 proto_tree_add_item(tree, hf_mbim_atds_signal_info_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5878 offset += 4;
5879 proto_tree_add_item(tree, hf_mbim_atds_signal_info_ber, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5880 offset += 4;
5881 proto_tree_add_item(tree, hf_mbim_atds_signal_info_rscp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5882 offset += 4;
5883 proto_tree_add_item(tree, hf_mbim_atds_signal_info_ecno, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5884 offset += 4;
5885 proto_tree_add_item(tree, hf_mbim_atds_signal_info_rsrq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5886 offset += 4;
5887 proto_tree_add_item(tree, hf_mbim_atds_signal_info_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5888 offset += 4;
5889 proto_tree_add_item(tree, hf_mbim_atds_signal_info_rssnr, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5892 static void
5893 mbim_dissect_atds_operator(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5895 int base_offset;
5896 uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size;
5897 proto_item *it;
5899 base_offset = offset;
5900 proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
5901 offset += 4;
5902 proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
5903 offset += 4;
5904 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_atds_operator_provider_state, ett_mbim_bitmap,
5905 mbim_provider_state_fields, ENC_LITTLE_ENDIAN);
5906 offset += 4;
5907 proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
5908 offset += 4;
5909 proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
5910 offset += 4;
5911 proto_tree_add_item (tree, hf_mbim_atds_operator_plmn_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5912 offset += 4;
5913 proto_tree_add_item (tree, hf_mbim_atds_operator_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5914 offset += 4;
5915 proto_tree_add_item (tree, hf_mbim_atds_operator_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5916 if (provider_id_offset && provider_id_size) {
5917 it = proto_tree_add_item(tree, hf_mbim_atds_operator_provider_id, tvb, base_offset + provider_id_offset,
5918 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5919 if (provider_id_size > 12) {
5920 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5923 if (provider_name_offset && provider_name_size) {
5924 it = proto_tree_add_item(tree, hf_mbim_atds_operator_provider_name, tvb, base_offset + provider_name_offset,
5925 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5926 if (provider_name_size > 40) {
5927 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5932 static void
5933 mbim_dissect_atds_operators(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5935 proto_tree *subtree;
5936 int base_offset;
5937 uint32_t i, elem_count;
5938 wmem_array_t *pair_list;
5939 struct mbim_pair_list pair_list_item, *p_pair_list_item;
5941 base_offset = offset;
5942 proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operators_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5943 offset += 4;
5944 if (elem_count) {
5945 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5946 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Operators List");
5947 for (i = 0; i < elem_count; i++) {
5948 proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_operators_operator_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5949 offset += 4;
5950 proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_operators_operator_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5951 offset += 4;
5952 wmem_array_append_one(pair_list, pair_list_item);
5954 for (i = 0; i < elem_count; i++) {
5955 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5956 if (p_pair_list_item->offset && p_pair_list_item->size) {
5957 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5958 ett_mbim_pair_list, NULL, "Operator #%u", i+1);
5959 mbim_dissect_atds_operator(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5965 static void
5966 mbim_dissect_atds_projection_table(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5968 proto_tree_add_item(tree, hf_mbim_atds_projection_table_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5969 offset += 4;
5970 proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar5min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5971 offset += 4;
5972 proto_tree_add_item(tree, hf_mbim_atds_projection_table_a5, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5973 offset += 4;
5974 proto_tree_add_item(tree, hf_mbim_atds_projection_table_b5, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5975 offset += 4;
5976 proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar4min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5977 offset += 4;
5978 proto_tree_add_item(tree, hf_mbim_atds_projection_table_a4, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5979 offset += 4;
5980 proto_tree_add_item(tree, hf_mbim_atds_projection_table_b4, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5981 offset += 4;
5982 proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar3min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5983 offset += 4;
5984 proto_tree_add_item(tree, hf_mbim_atds_projection_table_a3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5985 offset += 4;
5986 proto_tree_add_item(tree, hf_mbim_atds_projection_table_b3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5987 offset += 4;
5988 proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar2min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5989 offset += 4;
5990 proto_tree_add_item(tree, hf_mbim_atds_projection_table_a2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5991 offset += 4;
5992 proto_tree_add_item(tree, hf_mbim_atds_projection_table_b2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5993 offset += 4;
5994 proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar1min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5995 offset += 4;
5996 proto_tree_add_item(tree, hf_mbim_atds_projection_table_a1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5997 offset += 4;
5998 proto_tree_add_item(tree, hf_mbim_atds_projection_table_b1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5999 offset += 4;
6000 proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar0min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6001 offset += 4;
6002 proto_tree_add_item(tree, hf_mbim_atds_projection_table_a0, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6003 offset += 4;
6004 proto_tree_add_item(tree, hf_mbim_atds_projection_table_b0, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6007 static void
6008 mbim_dissect_atds_projection_tables(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
6010 proto_tree *subtree;
6011 int base_offset;
6012 uint32_t i, elem_count;
6013 wmem_array_t *pair_list;
6014 struct mbim_pair_list pair_list_item, *p_pair_list_item;
6016 base_offset = offset;
6017 proto_tree_add_item_ret_uint(tree, hf_mbim_atds_projection_tables_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6018 offset += 4;
6019 if (elem_count) {
6020 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6021 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Projection Tables List");
6022 for (i = 0; i < elem_count; i++) {
6023 proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_projection_tables_projection_table_offset,
6024 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6025 offset += 4;
6026 proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_projection_tables_projection_table_size,
6027 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6028 offset += 4;
6029 wmem_array_append_one(pair_list, pair_list_item);
6031 for (i = 0; i < elem_count; i++) {
6032 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6033 if (p_pair_list_item->offset && p_pair_list_item->size) {
6034 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6035 ett_mbim_pair_list, NULL, "Projection Table #%u", i+1);
6036 mbim_dissect_atds_projection_table(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
6042 static void
6043 mbim_dissect_multiflow_tft_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
6045 proto_tree *subtree;
6046 int base_offset;
6047 uint32_t i, elem_count;
6048 wmem_array_t *pair_list;
6049 struct mbim_pair_list pair_list_item, *p_pair_list_item;
6051 base_offset = offset;
6052 proto_tree_add_item(tree, hf_mbim_multiflow_tft_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6053 offset += 4;
6054 proto_tree_add_item_ret_uint(tree, hf_mbim_multiflow_tft_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6055 offset += 4;
6056 if (elem_count) {
6057 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6058 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "TFT List");
6059 for (i = 0; i < elem_count; i++) {
6060 proto_tree_add_item_ret_uint(subtree, hf_mbim_multiflow_tft_info_tft_list_offset,
6061 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6062 offset += 4;
6063 proto_tree_add_item_ret_uint(subtree, hf_mbim_multiflow_tft_info_tft_list_size,
6064 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6065 offset += 4;
6066 wmem_array_append_one(pair_list, pair_list_item);
6068 for (i = 0; i < elem_count; i++) {
6069 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6070 if (p_pair_list_item->offset && p_pair_list_item->size) {
6071 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6072 ett_mbim_pair_list, NULL, "TFT #%u", i+1);
6073 de_sm_tflow_temp(tvb, subtree, pinfo, base_offset + p_pair_list_item->offset, p_pair_list_item->size, NULL, 0);
6079 static void
6080 mbim_dissect_ms_context_v2_base(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, int base_offset, struct mbim_conv_info* mbim_conv)
6082 uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size, password_offset, password_size;
6083 proto_item *it;
6084 proto_tree* snssai;
6086 mbim_dissect_context_type_uuid(tvb, pinfo, tree, offset);
6087 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_ip_type, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6088 *offset += 4;
6089 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_enable, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6090 *offset += 4;
6091 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_roaming, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6092 *offset += 4;
6093 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_media_type, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6094 *offset += 4;
6095 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_source, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6096 *offset += 4;
6097 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_access_string_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
6098 *offset += 4;
6099 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_access_string_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
6100 *offset += 4;
6101 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_user_name_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
6102 *offset += 4;
6103 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_user_name_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
6104 *offset += 4;
6105 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_password_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
6106 *offset += 4;
6107 proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_password_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &password_size);
6108 *offset += 4;
6109 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_compression, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6110 *offset += 4;
6111 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_auth_protocol, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6112 *offset += 4;
6113 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6114 snssai = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
6115 mbim_dissect_tlv_ie(tvb, pinfo, snssai, offset);
6117 if (access_string_offset && access_string_size) {
6118 it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_access_string, tvb,
6119 base_offset + access_string_offset, access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6120 if (access_string_size > 200) {
6121 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6124 if (user_name_offset && user_name_size) {
6125 it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_user_name, tvb,
6126 base_offset + user_name_offset, user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6127 if (user_name_size > 510) {
6128 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6131 if (password_offset && password_size) {
6132 it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_password, tvb,
6133 base_offset + password_offset, password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6134 if (password_size > 510) {
6135 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6140 static void
6141 mbim_dissect_set_ms_provisioned_context_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
6143 int base_offset;
6145 base_offset = offset;
6146 proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6147 offset += 4;
6148 mbim_dissect_ms_context_v2_base(tvb, pinfo, tree, &offset, base_offset, mbim_conv);
6151 static void
6152 mbim_dissect_ms_provisioned_context_info_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
6154 proto_tree *subtree;
6155 int base_offset, item_offset, base_item_offset;
6156 uint32_t i, elem_count;
6157 wmem_array_t *pair_list;
6158 struct mbim_pair_list pair_list_item, *p_pair_list_item;
6160 base_offset = offset;
6161 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_provisioned_context_info_v2_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6162 offset += 4;
6163 if (elem_count) {
6164 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6165 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provisioned Contexts Ref List");
6166 for (i = 0; i < elem_count; i++) {
6167 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_provisioned_context_info_v2_list_offset,
6168 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6169 offset += 4;
6170 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_provisioned_context_info_v2_list_size,
6171 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6172 offset += 4;
6173 wmem_array_append_one(pair_list, pair_list_item);
6175 for (i = 0; i < elem_count; i++) {
6176 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6177 if (p_pair_list_item->offset && p_pair_list_item->size) {
6178 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6179 ett_mbim_pair_list, NULL, "Context #%u", i+1);
6180 item_offset = base_offset + p_pair_list_item->offset;
6181 base_item_offset = item_offset;
6182 proto_tree_add_item(subtree, hf_mbim_ms_provisioned_context_info_v2_context_id, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6183 item_offset += 4;
6184 mbim_dissect_ms_context_v2_base(tvb, pinfo, subtree, &item_offset, base_item_offset, mbim_conv);
6190 static void
6191 mbim_dissect_ms_network_blacklist_info(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, int offset)
6193 proto_tree *subtree;
6194 int base_offset, item_offset;
6195 uint32_t i, elem_count;
6196 wmem_array_t *pair_list;
6197 struct mbim_pair_list pair_list_item, *p_pair_list_item;
6199 base_offset = offset;
6200 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ms_network_blacklist_info_blacklist_state,
6201 ett_mbim_bitmap, mbim_ms_network_blacklist_state_fields, ENC_LITTLE_ENDIAN);
6203 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_network_blacklist_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6204 offset += 4;
6205 if (elem_count) {
6206 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6207 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provider Blacklist Ref List");
6208 for (i = 0; i < elem_count; i++) {
6209 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_network_blacklist_info_list_offset,
6210 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6211 offset += 4;
6212 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_network_blacklist_info_list_size,
6213 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6214 offset += 4;
6215 wmem_array_append_one(pair_list, pair_list_item);
6217 for (i = 0; i < elem_count; i++) {
6218 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6219 if (p_pair_list_item->offset && p_pair_list_item->size) {
6220 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6221 ett_mbim_pair_list, NULL, "Blacklisted Provider #%u", i+1);
6222 item_offset = base_offset + p_pair_list_item->offset;
6223 proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_mcc, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6224 item_offset += 4;
6225 proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_mnc, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6226 item_offset += 4;
6227 proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_type, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6233 static void
6234 mbim_dissect_sys_caps_info(tvbuff_t *tvb, proto_tree *tree, int offset)
6236 proto_tree_add_item(tree, hf_mbim_sys_caps_info_number_of_executors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6237 offset += 4;
6238 proto_tree_add_item(tree, hf_mbim_sys_caps_info_number_of_slots, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6239 offset += 4;
6240 proto_tree_add_item(tree, hf_mbim_sys_caps_info_concurrency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6241 offset += 4;
6242 proto_tree_add_item(tree, hf_mbim_sys_caps_info_modem_id, tvb, offset, 8, ENC_LITTLE_ENDIAN);
6245 static void
6246 mbim_dissect_device_caps_v2_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset,
6247 struct mbim_conv_info *mbim_conv)
6249 int base_offset;
6250 uint32_t custom_class_offset, custom_class_size, device_id_offset, device_id_size,
6251 fw_info_offset, fw_info_size, hw_info_offset, hw_info_size;
6252 proto_item *it;
6254 base_offset = offset;
6255 proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6256 offset += 4;
6257 mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
6258 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
6259 mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
6260 offset += 4;
6261 proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6262 offset += 4;
6263 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
6264 mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
6265 offset += 4;
6266 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
6267 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6268 offset += 4;
6269 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
6270 mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
6271 offset += 4;
6272 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
6273 mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
6274 offset += 4;
6275 proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6276 offset += 4;
6277 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_custom_data_class_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &custom_class_offset);
6278 offset += 4;
6279 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_custom_data_class_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &custom_class_size);
6280 offset += 4;
6281 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_offset);
6282 offset += 4;
6283 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_size);
6284 offset += 4;
6285 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_offset);
6286 offset += 4;
6287 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_size);
6288 offset += 4;
6289 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_offset);
6290 offset += 4;
6291 proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_size);
6292 offset += 4;
6293 proto_tree_add_item(tree, hf_mbim_device_caps_info_v2_executor_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6294 if (custom_class_offset && custom_class_size) {
6295 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_custom_data_class, tvb, base_offset + custom_class_offset,
6296 custom_class_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6297 if (custom_class_size > 22) {
6298 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6301 if (device_id_offset && device_id_size) {
6302 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_device_id, tvb, base_offset + device_id_offset,
6303 device_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6304 if ((mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM) && (device_id_size > 30)) {
6305 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6306 } else if (device_id_size > 36) {
6307 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6310 if (fw_info_offset && fw_info_size) {
6311 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_fw_info, tvb, base_offset + fw_info_offset,
6312 fw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6313 if (fw_info_size > 60) {
6314 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6317 if (hw_info_offset && hw_info_size) {
6318 it = proto_tree_add_item(tree, hf_mbim_device_caps_info_hw_info, tvb, base_offset + hw_info_offset,
6319 hw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6320 if (hw_info_size > 60) {
6321 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6326 static void
6327 mbim_dissect_device_caps_v3_and_higher_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset,
6328 struct mbim_conv_info *mbim_conv)
6330 proto_tree *lte_band_class, *nr_band_class, *custom_data_class, *device_id, *firmware_info, *hardware_info;
6332 proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6333 offset += 4;
6334 mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
6335 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
6336 mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
6337 offset += 4;
6338 proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6339 offset += 4;
6340 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
6341 mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
6342 offset += 4;
6343 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
6344 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6345 offset += 4;
6346 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
6347 mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
6348 offset += 4;
6349 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
6350 mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
6351 offset += 4;
6352 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_subclass, ett_mbim_bitmap,
6353 mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6354 offset += 8;
6355 proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6356 offset += 4;
6357 proto_tree_add_item(tree, hf_mbim_device_caps_info_v2_executor_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6358 offset += 4;
6359 proto_tree_add_item(tree, hf_mbim_device_caps_info_wcdma_band_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6360 offset += 4;
6362 lte_band_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "LTE Band Class");
6363 mbim_dissect_tlv_ie(tvb, pinfo, lte_band_class, &offset);
6365 nr_band_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "NR Band Class");
6366 mbim_dissect_tlv_ie(tvb, pinfo, nr_band_class, &offset);
6368 custom_data_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Custom Data Class");
6369 mbim_dissect_tlv_ie(tvb, pinfo, custom_data_class, &offset);
6371 device_id = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Device ID");
6372 mbim_dissect_tlv_ie(tvb, pinfo, device_id, &offset);
6374 firmware_info = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Firmware Info");
6375 mbim_dissect_tlv_ie(tvb, pinfo, firmware_info, &offset);
6377 hardware_info = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Hardware Info");
6378 mbim_dissect_tlv_ie(tvb, pinfo, hardware_info, &offset);
6381 static void
6382 mbim_dissect_lte_attach_context(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int base_offset, bool include_roaming_source)
6384 uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size, password_offset, password_size;
6385 proto_item* it;
6387 proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6388 offset += 4;
6389 if (include_roaming_source)
6391 proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_roaming, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6392 offset += 4;
6393 proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_source, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6394 offset += 4;
6396 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
6397 offset += 4;
6398 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
6399 offset += 4;
6400 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
6401 offset += 4;
6402 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
6403 offset += 4;
6404 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
6405 offset += 4;
6406 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
6407 offset += 4;
6408 proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6409 offset += 4;
6410 proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6411 if (access_string_offset && access_string_size) {
6412 it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_access_string, tvb,
6413 base_offset + access_string_offset, access_string_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6414 if (access_string_size > 200) {
6415 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6418 if (user_name_offset && user_name_size) {
6419 it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_user_name, tvb,
6420 base_offset + user_name_offset, user_name_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6421 if (user_name_size > 510) {
6422 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6425 if (password_offset && password_size) {
6426 it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_password, tvb,
6427 base_offset + password_offset, password_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6428 if (password_size > 510) {
6429 expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6434 static void
6435 mbim_dissect_lte_attach_config_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
6437 proto_tree* subtree;
6438 int base_offset;
6439 uint32_t i, elem_count;
6440 wmem_array_t* pair_list;
6441 struct mbim_pair_list pair_list_item, * p_pair_list_item;
6443 base_offset = offset;
6444 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6445 offset += 4;
6446 if (elem_count) {
6447 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6448 subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "Context List");
6449 for (i = 0; i < elem_count; i++) {
6450 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_offset,
6451 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6452 offset += 4;
6453 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_size,
6454 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6455 offset += 4;
6456 wmem_array_append_one(pair_list, pair_list_item);
6458 for (i = 0; i < elem_count; i++) {
6459 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6460 if (p_pair_list_item->offset && p_pair_list_item->size) {
6461 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6462 ett_mbim_pair_list, NULL, "Context #%u", i + 1);
6463 mbim_dissect_lte_attach_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, base_offset + p_pair_list_item->offset, true);
6469 static void
6470 mbim_dissect_set_lte_attach_config(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
6472 proto_tree* subtree;
6473 int base_offset;
6474 uint32_t i, elem_count;
6475 wmem_array_t* pair_list;
6476 struct mbim_pair_list pair_list_item, * p_pair_list_item;
6478 base_offset = offset;
6479 proto_tree_add_item(tree, hf_mbim_ms_set_lte_attach_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6480 offset += 4;
6481 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6482 offset += 4;
6483 if (elem_count) {
6484 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6485 subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "Context List");
6486 for (i = 0; i < elem_count; i++) {
6487 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_offset,
6488 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6489 offset += 4;
6490 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_size,
6491 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6492 offset += 4;
6493 wmem_array_append_one(pair_list, pair_list_item);
6495 for (i = 0; i < elem_count; i++) {
6496 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6497 if (p_pair_list_item->offset && p_pair_list_item->size) {
6498 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6499 ett_mbim_pair_list, NULL, "Context #%u", i + 1);
6500 mbim_dissect_lte_attach_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, base_offset + p_pair_list_item->offset, true);
6506 static void
6507 mbim_dissect_lte_attach_status(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
6509 int base_offset = offset;
6510 proto_tree_add_item(tree, hf_mbim_ms_lte_attach_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6511 offset += 4;
6512 mbim_dissect_lte_attach_context(tvb, pinfo, tree, offset, base_offset, false);
6515 static void
6516 mbim_dissect_ms_device_slot_mapping_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
6518 proto_tree *subtree;
6519 int base_offset;
6520 uint32_t i, elem_count;
6521 wmem_array_t *pair_list;
6522 struct mbim_pair_list pair_list_item, *p_pair_list_item;
6524 base_offset = offset;
6525 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_device_slot_mapping_info_map_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6526 offset += 4;
6527 if (elem_count) {
6528 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6529 subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Slot Map List");
6530 for (i = 0; i < elem_count; i++) {
6531 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_device_slot_mapping_info_map_offset,
6532 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6533 offset += 4;
6534 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_device_slot_mapping_info_map_size,
6535 tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6536 offset += 4;
6537 wmem_array_append_one(pair_list, pair_list_item);
6539 for (i = 0; i < elem_count; i++) {
6540 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6541 if (p_pair_list_item->offset && p_pair_list_item->size) {
6542 subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6543 ett_mbim_pair_list, NULL, "Device #%u", i+1);
6544 proto_tree_add_item(subtree, hf_mbim_ms_device_slot_mapping_info_executor_slot_index, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size, ENC_LITTLE_ENDIAN);
6550 static void
6551 mbim_dissect_base_station_info_req(tvbuff_t* tvb, proto_tree* tree, int offset,
6552 struct mbim_conv_info* mbim_conv)
6554 proto_tree_add_item(tree, hf_mbim_base_station_max_gsm_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6555 offset += 4;
6556 proto_tree_add_item(tree, hf_mbim_base_station_max_umts_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6557 offset += 4;
6558 proto_tree_add_item(tree, hf_mbim_base_station_max_td_scdma_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6559 offset += 4;
6560 proto_tree_add_item(tree, hf_mbim_base_station_max_lte_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6561 offset += 4;
6562 proto_tree_add_item(tree, hf_mbim_base_station_max_cdma_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6563 offset += 4;
6564 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6565 proto_tree_add_item(tree, hf_mbim_base_station_max_nr_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6569 static void mbim_dissect_base_station_gsm_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int offset)
6571 int base_offset = offset;
6572 uint32_t provider_id_offset, provider_id_size;
6573 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6574 offset += 4;
6575 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6576 offset += 4;
6577 proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6578 offset += 4;
6579 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6580 offset += 4;
6581 proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6582 offset += 4;
6583 proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6584 offset += 4;
6585 proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6586 offset += 4;
6587 proto_tree_add_item(tree, hf_mbim_base_station_rx_level, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6588 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6589 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6592 static void mbim_dissect_base_station_gsm_nmr_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6594 int base_offset = *offset;
6595 uint32_t provider_id_offset, provider_id_size;
6596 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6597 *offset += 4;
6598 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6599 *offset += 4;
6600 proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6601 *offset += 4;
6602 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6603 *offset += 4;
6604 proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6605 *offset += 4;
6606 proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6607 *offset += 4;
6608 proto_tree_add_item(tree, hf_mbim_base_station_rx_level, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6609 *offset += 4;
6610 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6611 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6612 *offset += ROUND_UP_COUNT(provider_id_size, 4);
6615 static void mbim_dissect_base_station_umts_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int offset)
6617 int base_offset = offset;
6618 uint32_t provider_id_offset, provider_id_size;
6619 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6620 offset += 4;
6621 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6622 offset += 4;
6623 proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6624 offset += 4;
6625 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6626 offset += 4;
6627 proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_ul, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6628 offset += 4;
6629 proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_dl, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6630 offset += 4;
6631 proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_nt, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6632 offset += 4;
6633 proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6634 offset += 4;
6635 proto_tree_add_item(tree, hf_mbim_base_station_primary_scrambling_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6636 offset += 4;
6637 proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6638 offset += 4;
6639 proto_tree_add_item(tree, hf_mbim_base_station_ecno, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6640 offset += 4;
6641 proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6642 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6643 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6646 static void mbim_dissect_base_station_umts_mrl_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6648 int base_offset = *offset;
6649 uint32_t provider_id_offset, provider_id_size;
6650 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6651 *offset += 4;
6652 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6653 *offset += 4;
6654 proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6655 *offset += 4;
6656 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6657 *offset += 4;
6658 proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6659 *offset += 4;
6660 proto_tree_add_item(tree, hf_mbim_base_station_primary_scrambling_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6661 *offset += 4;
6662 proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6663 *offset += 4;
6664 proto_tree_add_item(tree, hf_mbim_base_station_ecno, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6665 *offset += 4;
6666 proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6667 *offset += 4;
6668 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6669 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6670 *offset += ROUND_UP_COUNT(provider_id_size, 4);
6673 static void mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6675 int base_offset = *offset;
6676 uint32_t provider_id_offset, provider_id_size;
6677 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6678 *offset += 4;
6679 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6680 *offset += 4;
6681 proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6682 *offset += 4;
6683 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6684 *offset += 4;
6685 proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6686 *offset += 4;
6687 proto_tree_add_item(tree, hf_mbim_base_station_call_parameter, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6688 *offset += 4;
6689 proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6690 *offset += 4;
6691 proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6692 *offset += 4;
6693 proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6694 *offset += 4;
6695 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6696 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6697 *offset += ROUND_UP_COUNT(provider_id_size, 4);
6700 static void mbim_dissect_base_station_lte_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int offset)
6702 int base_offset = offset;
6703 uint32_t provider_id_offset, provider_id_size;
6704 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6705 offset += 4;
6706 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6707 offset += 4;
6708 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6709 offset += 4;
6710 proto_tree_add_item(tree, hf_mbim_base_station_earfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6711 offset += 4;
6712 proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6713 offset += 4;
6714 proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6715 offset += 4;
6716 proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6717 offset += 4;
6718 proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6719 offset += 4;
6720 proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6721 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6722 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6725 static void mbim_dissect_base_station_lte_mrl_info(tvbuff_t* tvb, proto_tree* tree, int *offset)
6727 int base_offset = *offset;
6728 uint32_t provider_id_offset, provider_id_size;
6729 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6730 *offset += 4;
6731 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6732 *offset += 4;
6733 proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6734 *offset += 4;
6735 proto_tree_add_item(tree, hf_mbim_base_station_earfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6736 *offset += 4;
6737 proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6738 *offset += 4;
6739 proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6740 *offset += 4;
6741 proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6742 *offset += 4;
6743 proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb,* offset, 4, ENC_LITTLE_ENDIAN);
6744 *offset += 4;
6745 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6746 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6747 *offset += ROUND_UP_COUNT(provider_id_size, 4);
6750 static void mbim_dissect_base_station_cdma_mrl_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6752 proto_tree_add_item(tree, hf_mbim_base_station_serving_cell_flag, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6753 *offset += 4;
6754 proto_tree_add_item(tree, hf_mbim_base_station_nid, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6755 *offset += 4;
6756 proto_tree_add_item(tree, hf_mbim_base_station_sid, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6757 *offset += 4;
6758 proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6759 *offset += 4;
6760 proto_tree_add_item(tree, hf_mbim_base_station_base_latitude, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6761 *offset += 4;
6762 proto_tree_add_item(tree, hf_mbim_base_station_base_longitude, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6763 *offset += 4;
6764 proto_tree_add_item(tree, hf_mbim_base_station_ref_pn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6765 *offset += 4;
6766 proto_tree_add_item(tree, hf_mbim_base_station_gps_seconds, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6767 *offset += 4;
6768 proto_tree_add_item(tree, hf_mbim_base_station_pilot_strength, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6769 *offset += 4;
6772 static void mbim_dissect_base_station_nr_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6774 int base_offset = *offset;
6775 uint32_t provider_id_offset, provider_id_size;
6776 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6777 *offset += 4;
6778 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6779 *offset += 4;
6780 proto_tree_add_item(tree, hf_mbim_base_station_nci, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
6781 *offset += 8;
6782 proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6783 *offset += 4;
6784 proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6785 *offset += 4;
6786 proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6787 *offset += 4;
6788 proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6789 *offset += 4;
6790 proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6791 *offset += 4;
6792 proto_tree_add_item(tree, hf_mbim_base_station_sinr, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6793 *offset += 4;
6794 proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
6795 *offset += 8;
6796 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6797 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6798 *offset += ROUND_UP_COUNT(provider_id_size, 4);
6801 static void mbim_dissect_base_station_nr_neighbor_cell_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6803 int base_offset = *offset;
6804 uint32_t provider_id_offset, provider_id_size, cell_id_offset, cell_id_size;
6805 proto_tree_add_bitmask(tree, tvb, *offset, hf_mbim_base_station_system_sub_type, ett_mbim_bitmap,
6806 mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6807 *offset += 4;
6808 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6809 *offset += 4;
6810 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6811 *offset += 4;
6812 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cell_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &cell_id_offset);
6813 *offset += 4;
6814 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cell_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &cell_id_size);
6815 *offset += 4;
6816 proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6817 *offset += 4;
6818 proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6819 *offset += 4;
6820 proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6821 *offset += 4;
6822 proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6823 *offset += 4;
6824 proto_tree_add_item(tree, hf_mbim_base_station_sinr, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6825 *offset += 4;
6826 proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6827 provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6828 *offset += ROUND_UP_COUNT(provider_id_size, 4);
6829 proto_tree_add_item(tree, hf_mbim_base_station_cell_id_string, tvb, base_offset + cell_id_offset,
6830 cell_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6831 *offset += ROUND_UP_COUNT(cell_id_size, 4);
6834 static void
6835 mbim_dissect_base_station_info(tvbuff_t* tvb, proto_tree* tree, int offset,
6836 struct mbim_conv_info* mbim_conv)
6838 proto_tree* subtree, *sub_subtree;
6839 int base_offset = offset;
6840 uint32_t gsm_serving_cell_offset, gsm_serving_cell_size, umts_serving_cell_offset, umts_serving_cell_size, td_scdma_serving_cell_offset, td_scdma_serving_cell_size,
6841 lte_serving_cell_offset, lte_serving_cell_size, gsm_nmr_offset, gsm_nmr_size, umts_mrl_offset, umts_mrl_size, td_scdma_mrl_offset, td_scdma_mrl_size,
6842 lte_mrl_offset, lte_mrl_size, cdma_mrl_offset, cdma_mrl_size, nr_serving_cells_offset = 0, nr_serving_cells_size = 0, nr_neighbor_cells_offset = 0, nr_neighbor_cells_size = 0;
6844 uint32_t count;
6846 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_base_station_system_type, ett_mbim_bitmap,
6847 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6848 offset += 4;
6849 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6850 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_base_station_system_sub_type, ett_mbim_bitmap,
6851 mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6852 offset += 4;
6854 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_serving_cell_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_serving_cell_offset);
6855 offset += 4;
6856 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_serving_cell_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_serving_cell_size);
6857 offset += 4;
6858 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_serving_cell_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_serving_cell_offset);
6859 offset += 4;
6860 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_serving_cell_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_serving_cell_size);
6861 offset += 4;
6862 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_td_scdma_serving_cell_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &td_scdma_serving_cell_offset);
6863 offset += 4;
6864 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_td_scdma_serving_cell_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &td_scdma_serving_cell_size);
6865 offset += 4;
6866 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_serving_cell_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_serving_cell_offset);
6867 offset += 4;
6868 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_serving_cell_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_serving_cell_size);
6869 offset += 4;
6870 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_nmr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_nmr_offset);
6871 offset += 4;
6872 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_nmr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_nmr_size);
6873 offset += 4;
6874 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_mrl_offset);
6875 offset += 4;
6876 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_mrl_size);
6877 offset += 4;
6878 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_td_scdma_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &td_scdma_mrl_offset);
6879 offset += 4;
6880 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_td_scdma_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &td_scdma_mrl_size);
6881 offset += 4;
6882 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_mrl_offset);
6883 offset += 4;
6884 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_mrl_size);
6885 offset += 4;
6886 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cdma_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cdma_mrl_offset);
6887 offset += 4;
6888 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cdma_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cdma_mrl_size);
6889 offset += 4;
6890 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6891 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_nr_serving_cell_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &nr_serving_cells_offset);
6892 offset += 4;
6893 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_nr_serving_cell_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &nr_serving_cells_size);
6894 offset += 4;
6895 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_nr_neighbor_cells_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &nr_neighbor_cells_offset);
6896 offset += 4;
6897 proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_nr_neighbor_cells_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &nr_neighbor_cells_size);
6900 if (gsm_serving_cell_offset && gsm_serving_cell_size) {
6901 offset = base_offset + gsm_serving_cell_offset;
6902 subtree = proto_tree_add_subtree_format(tree, tvb, offset, gsm_serving_cell_size, ett_mbim_pair_list, NULL, "Gsm Serving Cell");
6903 mbim_dissect_base_station_gsm_serving_cell_info(tvb, subtree, offset);
6906 if (umts_serving_cell_offset && umts_serving_cell_size) {
6907 offset = base_offset + umts_serving_cell_offset;
6908 subtree = proto_tree_add_subtree_format(tree, tvb, offset, umts_serving_cell_size, ett_mbim_pair_list, NULL, "Umts Serving Cell");
6909 mbim_dissect_base_station_umts_serving_cell_info(tvb, subtree, offset);
6912 if (td_scdma_serving_cell_offset && td_scdma_serving_cell_size) {
6913 offset = base_offset + td_scdma_serving_cell_offset;
6914 subtree = proto_tree_add_subtree_format(tree, tvb, offset, td_scdma_serving_cell_size, ett_mbim_pair_list, NULL, "Td Scdma Serving Cell");
6915 mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvb, subtree, &offset);
6918 if (lte_serving_cell_offset && lte_serving_cell_size) {
6919 offset = base_offset + lte_serving_cell_offset;
6920 subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_serving_cell_size, ett_mbim_pair_list, NULL, "Lte Serving Cell");
6921 mbim_dissect_base_station_lte_serving_cell_info(tvb, subtree, offset);
6924 if (gsm_nmr_offset && gsm_nmr_size) {
6925 offset = base_offset + gsm_nmr_offset;
6926 subtree = proto_tree_add_subtree_format(tree, tvb, offset, gsm_nmr_size, ett_mbim_pair_list, NULL, "Gsm Nmr");
6927 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6928 offset += 4;
6929 for (uint32_t i = 0; i < count; i++) {
6930 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Nmr Info #%u", i);
6931 mbim_dissect_base_station_gsm_nmr_info(tvb, sub_subtree, &offset);
6935 if (umts_mrl_offset && umts_mrl_size) {
6936 offset = base_offset + umts_mrl_offset;
6937 subtree = proto_tree_add_subtree_format(tree, tvb, offset, umts_mrl_size, ett_mbim_pair_list, NULL, "Umts Mrl");
6938 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6939 offset += 4;
6940 for (uint32_t i = 0; i < count; i++) {
6941 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6942 mbim_dissect_base_station_umts_mrl_info(tvb, sub_subtree, &offset);
6946 if (td_scdma_mrl_offset && td_scdma_mrl_size) {
6947 offset = base_offset + td_scdma_mrl_offset;
6948 subtree = proto_tree_add_subtree_format(tree, tvb, offset, td_scdma_mrl_size, ett_mbim_pair_list, NULL, "Td Scdma Mrl");
6949 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6950 offset += 4;
6951 for (uint32_t i = 0; i < count; i++) {
6952 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6953 mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvb, sub_subtree, &offset);
6957 if (lte_mrl_offset && lte_mrl_size) {
6958 offset = base_offset + lte_mrl_offset;
6959 subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Lte Mrl");
6960 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6961 offset += 4;
6962 for (uint32_t i = 0; i < count; i++) {
6963 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6964 mbim_dissect_base_station_lte_mrl_info(tvb, sub_subtree, &offset);
6968 if (cdma_mrl_offset && cdma_mrl_size) {
6969 offset = base_offset + cdma_mrl_offset;
6970 subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Cdma Mrl");
6971 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6972 offset += 4;
6973 for (uint32_t i = 0; i < count; i++) {
6974 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6975 mbim_dissect_base_station_cdma_mrl_info(tvb, sub_subtree, &offset);
6979 if (nr_serving_cells_offset && nr_serving_cells_size)
6981 offset = base_offset + nr_serving_cells_offset;
6982 subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Nr Serving Cells");
6983 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6984 offset += 4;
6985 for (uint32_t i = 0; i < count; i++) {
6986 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Cell Info #%u", i);
6987 mbim_dissect_base_station_nr_serving_cell_info(tvb, sub_subtree, &offset);
6991 if (nr_neighbor_cells_offset && nr_neighbor_cells_size)
6993 offset = base_offset + nr_neighbor_cells_offset;
6994 subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Nr Neighbor Cells");
6995 proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6996 offset += 4;
6997 for (uint32_t i = 0; i < count; i++) {
6998 sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Cell Info #%u", i);
6999 mbim_dissect_base_station_nr_neighbor_cell_info(tvb, sub_subtree, &offset);
7004 static void
7005 mbim_dissect_version(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7007 uint32_t extended_version;
7009 proto_tree_add_item(tree, hf_mbim_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7010 offset += 2;
7011 proto_tree_add_item_ret_uint(tree, hf_mbim_extended_version, tvb, offset, 2, ENC_LITTLE_ENDIAN, &extended_version);
7012 switch (extended_version) {
7013 case 0x0100:
7014 mbim_conv->mbim_extended_version = MBIM_Extended_Version_1;
7015 break;
7016 case 0x0200:
7017 mbim_conv->mbim_extended_version = MBIM_Extended_Version_2;
7018 break;
7019 case 0x0300:
7020 mbim_conv->mbim_extended_version = MBIM_Extended_Version_3;
7021 break;
7022 case 0x0400:
7023 mbim_conv->mbim_extended_version = MBIM_Extended_Version_4;
7024 break;
7025 default:
7026 mbim_conv->mbim_extended_version = MBIM_Extended_Version_Unknown;
7027 break;
7031 static void
7032 mbim_dissect_ms_modem_config_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
7034 proto_tree *config_name, *unnamed_ies;
7035 uint32_t base_offset;
7037 base_offset = offset;
7038 proto_tree_add_item(tree, hf_mbim_ms_modem_config_config_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7039 offset += 4;
7040 config_name = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Config Name");
7041 mbim_dissect_tlv_ie(tvb, pinfo, config_name, &offset);
7042 while ((uint32_t)offset - base_offset < buffer_len) {
7043 unnamed_ies = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Unnamed IE's");
7044 mbim_dissect_tlv_ie(tvb, pinfo, unnamed_ies, &offset);
7048 static void
7049 mbim_dissect_ms_registration_params_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
7051 uint32_t base_offset;
7053 base_offset = offset;
7054 proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_mico_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7055 offset += 4;
7056 proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_drx_params, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7057 offset += 4;
7058 proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_ladn_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7059 offset += 4;
7060 proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_default_pdu_hint, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7061 offset += 4;
7062 proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_re_register_if_needed, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7063 offset += 4;
7065 mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
7068 static void
7069 mbim_dissect_ms_network_params_info(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset, uint32_t buffer_len)
7071 uint32_t base_offset = offset;
7072 proto_tree_add_item(tree, hf_mbim_ms_network_params_info_mico_indication, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7073 offset += 4;
7074 proto_tree_add_item(tree, hf_mbim_ms_network_params_info_drx_params, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7075 offset += 4;
7077 mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
7080 static void
7081 mbim_dissect_ms_wake_reason(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
7083 proto_tree *wake_reason_tree;
7084 proto_tree_add_item(tree, hf_mbim_ms_wake_reason_wake_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7085 offset += 4;
7086 proto_tree_add_item(tree, hf_mbim_ms_wake_reason_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7087 offset += 4;
7088 wake_reason_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Reason");
7089 mbim_dissect_tlv_ie(tvb, pinfo, wake_reason_tree, &offset);
7092 static void
7093 mbim_dissect_ms_atr_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
7095 int base_offset;
7096 uint32_t atr_offset, atr_size;
7097 tvbuff_t *next_tvb;
7099 base_offset = offset;
7100 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_atr_info_atr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &atr_size);
7101 offset += 4;
7102 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_atr_info_atr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &atr_offset);
7104 if (atr_offset && atr_size) {
7105 if (iso7816_atr_handle) {
7106 next_tvb = tvb_new_subset_length(tvb, base_offset + atr_offset, atr_size);
7107 call_dissector(iso7816_atr_handle, next_tvb, pinfo, tree);
7108 } else {
7109 proto_tree_add_item(tree, hf_mbim_info_buffer, tvb, base_offset + atr_offset, atr_size, ENC_NA);
7112 // TODO: check atr_size <= 33
7116 static void
7117 mbim_dissect_ms_open_channel(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7119 uint32_t base_offset = offset;
7120 uint32_t app_id_offset, app_id_size;
7122 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_open_channel_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7123 offset += 4;
7124 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_open_channel_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7125 offset += 4;
7126 proto_tree_add_item(tree, hf_mbim_ms_open_channel_select_p2_arg, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7127 offset += 4;
7128 proto_tree_add_item(tree, hf_mbim_ms_uicc_channel_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7129 offset += 4;
7131 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7132 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7134 if (app_id_offset && app_id_size) {
7135 proto_tree_add_item(tree, hf_mbim_ms_open_channel_app_id, tvb, base_offset + app_id_offset, app_id_size, ENC_NA);
7139 static void
7140 mbim_dissect_ms_open_channel_info(tvbuff_t* tvb, proto_tree* tree, int offset)
7142 uint32_t base_offset = offset;
7143 uint32_t response_offset, response_length;
7145 proto_tree_add_item(tree, hf_mbim_ms_uicc_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7146 offset += 4;
7147 proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7148 offset += 4;
7149 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
7150 offset += 4;
7151 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_offset);
7153 if (response_offset && response_length) {
7154 proto_tree_add_item(tree, hf_mbim_ms_uicc_response, tvb, base_offset + response_offset, response_length, ENC_NA);
7158 static void
7159 mbim_dissect_ms_close_channel(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7161 proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7162 offset += 4;
7163 proto_tree_add_item(tree, hf_mbim_ms_uicc_channel_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7164 offset += 4;
7166 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7167 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7171 static void
7172 mbim_dissect_ms_apdu(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7174 uint32_t base_offset = offset;
7175 uint32_t command_offset, command_size;
7176 proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7177 offset += 4;
7178 proto_tree_add_item(tree, hf_mbim_ms_apdu_secure_messaging, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7179 offset += 4;
7180 proto_tree_add_item(tree, hf_mbim_ms_apdu_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7181 offset += 4;
7182 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_apdu_command_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &command_size);
7183 offset += 4;
7184 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_apdu_command_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &command_offset);
7185 offset += 4;
7187 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7188 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7190 if (command_offset && command_size) {
7191 proto_item *item;
7192 proto_tree *sub_tree;
7194 item = proto_tree_add_item(tree, hf_mbim_ms_apdu_command, tvb, base_offset + command_offset, command_size, ENC_NA);
7195 if (mbim_uicc_apdu_dissector == UICC_APDU_GSM_SIM) {
7196 if (gsm_sim_cmd_handle) {
7197 sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7198 call_dissector(gsm_sim_cmd_handle, tvb_new_subset_length(tvb, base_offset + command_offset, command_size), pinfo, sub_tree);
7200 } else {
7201 if (iso7816_handle) {
7202 sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7203 pinfo->p2p_dir = P2P_DIR_SENT;
7204 call_dissector(iso7816_handle, tvb_new_subset_length(tvb, base_offset + command_offset, command_size), pinfo, sub_tree);
7210 static void
7211 mbim_dissect_ms_apdu_info(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int offset)
7213 uint32_t base_offset = offset;
7214 uint32_t response_offset, response_length;
7216 proto_tree_add_item(tree, hf_mbim_ms_uicc_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7217 offset += 4;
7218 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
7219 offset += 4;
7220 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_offset);
7222 if (response_offset && response_length) {
7223 proto_item *item;
7224 proto_tree *sub_tree;
7226 item = proto_tree_add_item(tree, hf_mbim_ms_uicc_response, tvb, base_offset + response_offset, response_length, ENC_NA);
7227 if (mbim_uicc_apdu_dissector == UICC_APDU_GSM_SIM) {
7228 if (gsm_sim_rsp_handle) {
7229 sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7230 call_dissector(gsm_sim_rsp_handle, tvb_new_subset_length(tvb, base_offset + response_offset, response_length), pinfo, sub_tree);
7232 } else {
7233 if (iso7816_handle) {
7234 sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7235 pinfo->p2p_dir = P2P_DIR_RECV;
7236 call_dissector(iso7816_handle, tvb_new_subset_length(tvb, base_offset + response_offset, response_length), pinfo, sub_tree);
7242 static void
7243 mbim_dissect_ms_terminal_capability_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int information_buffer_base_offset, int offset)
7245 uint32_t capability_count;
7246 wmem_array_t* pair_list = NULL;
7247 struct mbim_pair_list pair_list_item, * p_pair_list_item;
7248 proto_tree* subtree;
7250 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_terminal_capability_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &capability_count);
7251 offset += 4;
7252 if (capability_count) {
7253 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
7254 subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * capability_count, ett_mbim_pair_list, NULL, "Capability List");
7255 for (uint32_t i = 0; i < capability_count; i++) {
7256 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_terminal_capability_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
7257 offset += 4;
7258 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_terminal_capability_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
7259 offset += 4;
7260 wmem_array_append_one(pair_list, pair_list_item);
7263 for (uint32_t i = 0; i < capability_count; i++) {
7264 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
7265 offset = information_buffer_base_offset + p_pair_list_item->offset;
7266 subtree = proto_tree_add_subtree_format(tree, tvb, offset, p_pair_list_item->size,
7267 ett_mbim_pair_list, NULL, "Capability #%u", i + 1);
7268 if (p_pair_list_item->size && p_pair_list_item->offset) {
7269 proto_tree_add_item(subtree, hf_mbim_ms_terminal_capability, tvb, offset, p_pair_list_item->size, ENC_NA);
7274 static void
7275 mbim_dissect_ms_set_terminal_capability(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7277 int base_offset = offset;
7278 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7279 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7280 offset += 4;
7283 mbim_dissect_ms_terminal_capability_info(tvb,pinfo, tree, base_offset, offset);
7286 static void
7287 mbim_dissect_ms_set_reset(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7289 proto_tree_add_item(tree, hf_mbim_ms_reset_pass_through_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7290 offset += 4;
7291 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7292 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7296 static void
7297 mbim_dissect_ms_query_reset(tvbuff_t* tvb, proto_tree* tree, int offset)
7299 proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7302 static void
7303 mbim_dissect_ms_app_info_elements(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7305 uint32_t base_offset = offset;
7306 uint32_t app_id_offset, app_id_size, app_name_offset, app_name_size, pin_ref_offset, pin_ref_size, num_pins;
7308 proto_tree_add_item(tree, hf_mbim_ms_app_info_app_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7309 offset += 4;
7310 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7311 offset += 4;
7312 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7313 offset += 4;
7314 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_name_offset);
7315 offset += 4;
7316 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_name_size);
7317 offset += 4;
7318 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_num_pins, tvb, offset, 4, ENC_LITTLE_ENDIAN, &num_pins);
7319 offset += 4;
7320 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_pin_ref_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_ref_offset);
7321 offset += 4;
7322 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_pin_ref_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_ref_size);
7324 if (app_id_offset && app_id_size) {
7325 proto_tree_add_item(tree, hf_mbim_ms_app_info_app_id, tvb, base_offset + app_id_offset, app_id_size, ENC_NA);
7327 if (app_name_offset && app_name_size) {
7328 proto_tree_add_item(tree, hf_mbim_ms_app_info_app_name, tvb, base_offset + app_name_offset, app_name_size, ENC_UTF_8 | ENC_NA);
7330 if (num_pins) {
7331 proto_tree_add_item(tree, hf_mbim_ms_app_info_pin_ref, tvb, base_offset + pin_ref_offset, pin_ref_size, ENC_NA);
7335 static void
7336 mbim_dissect_ms_app_list(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
7338 int base_offset;
7339 uint32_t app_count;
7340 wmem_array_t* pair_list = NULL;
7341 struct mbim_pair_list pair_list_item, * p_pair_list_item;
7342 proto_tree* subtree;
7344 base_offset = offset;
7345 proto_tree_add_item(tree, hf_mbim_ms_app_list_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7346 offset += 4;
7347 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_list_app_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_count);
7348 offset += 4;
7349 proto_tree_add_item(tree, hf_mbim_ms_app_list_active_app_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7350 offset += 4;
7351 proto_tree_add_item(tree, hf_mbim_ms_app_list_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7352 offset += 4;
7353 if (app_count) {
7354 pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
7355 subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * app_count, ett_mbim_pair_list, NULL, "App List");
7356 for (uint32_t i = 0; i < app_count; i++) {
7357 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_app_list_app_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
7358 offset += 4;
7359 proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_app_list_app_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
7360 offset += 4;
7361 wmem_array_append_one(pair_list, pair_list_item);
7364 for (uint32_t i = 0; i < app_count; i++) {
7365 p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
7366 offset = base_offset + p_pair_list_item->offset;
7367 subtree = proto_tree_add_subtree_format(tree, tvb, offset, p_pair_list_item->size,
7368 ett_mbim_pair_list, NULL, "App Info #%u", i + 1);
7369 if (p_pair_list_item->size && p_pair_list_item->offset) {
7370 mbim_dissect_ms_app_info_elements(tvb, pinfo, subtree, offset);
7375 static void
7376 mbim_dissect_ms_file_path(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7378 int base_offset;
7379 uint32_t app_id_offset, app_id_size, file_path_offset, file_path_size;
7381 base_offset = offset;
7382 proto_tree_add_item(tree, hf_mbim_ms_file_path_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7383 offset += 4;
7384 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7385 offset += 4;
7386 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7387 offset += 4;
7388 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_file_path_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_offset);
7389 offset += 4;
7390 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_file_path_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_size);
7391 if (app_id_offset && app_id_size) {
7392 proto_tree_add_item(tree, hf_mbim_ms_file_path_app_id, tvb, base_offset + app_id_offset,
7393 app_id_size, ENC_NA);
7395 if (file_path_offset && file_path_size) {
7396 proto_tree_add_item(tree, hf_mbim_ms_file_path_file_path, tvb, base_offset + file_path_offset,
7397 file_path_size, ENC_NA);
7401 static void
7402 mbim_dissect_ms_file_status(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7404 uint32_t i;
7406 proto_tree_add_item(tree, hf_mbim_ms_file_status_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7407 offset += 4;
7408 proto_tree_add_item(tree, hf_mbim_ms_file_status_status_word_1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7409 offset += 4;
7410 proto_tree_add_item(tree, hf_mbim_ms_file_status_status_word_2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7411 offset += 4;
7412 proto_tree_add_item(tree, hf_mbim_ms_file_status_file_accessibility, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7413 offset += 4;
7414 proto_tree_add_item(tree, hf_mbim_ms_file_status_file_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7415 offset += 4;
7416 proto_tree_add_item(tree, hf_mbim_ms_file_status_file_structure, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7417 offset += 4;
7418 proto_tree_add_item(tree, hf_mbim_ms_file_status_item_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7419 offset += 4;
7420 proto_tree_add_item(tree, hf_mbim_ms_file_status_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7421 for (i = 0; i < 4; i++) {
7422 offset += 4;
7423 proto_tree_add_item(tree, hf_mbim_ms_file_status_file_lock_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7427 static void
7428 mbim_dissect_ms_response(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7430 int base_offset;
7431 uint32_t response_data_offset, response_data_size;
7433 base_offset = offset;
7434 proto_tree_add_item(tree, hf_mbim_ms_response_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7435 offset += 4;
7436 proto_tree_add_item(tree, hf_mbim_ms_response_status_word_1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7437 offset += 4;
7438 proto_tree_add_item(tree, hf_mbim_ms_response_status_word_2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7439 offset += 4;
7440 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_response_response_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_data_offset);
7441 offset += 4;
7442 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_response_response_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_data_size);
7443 if (response_data_offset && response_data_size) {
7444 proto_tree_add_item(tree, hf_mbim_ms_response_response_data, tvb, base_offset + response_data_offset,
7445 response_data_size, ENC_NA);
7449 static void
7450 mbim_dissect_ms_access_binary(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7452 int base_offset;
7453 uint32_t app_id_offset, app_id_size, file_path_offset, file_path_size, local_pin_offset, local_pin_size, binary_data_offset, binary_data_size;
7455 base_offset = offset;
7456 proto_tree_add_item(tree, hf_mbim_ms_access_binary_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7457 offset += 4;
7458 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7459 offset += 4;
7460 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7461 offset += 4;
7462 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_file_path_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_offset);
7463 offset += 4;
7464 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_file_path_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_size);
7465 offset += 4;
7466 proto_tree_add_item(tree, hf_mbim_ms_access_binary_file_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7467 offset += 4;
7468 proto_tree_add_item(tree, hf_mbim_ms_access_binary_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7469 offset += 4;
7470 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_local_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_offset);
7471 offset += 4;
7472 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_local_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_size);
7473 offset += 4;
7474 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_binary_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &binary_data_offset);
7475 offset += 4;
7476 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_binary_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &binary_data_size);
7477 if (app_id_offset && app_id_size) {
7478 proto_tree_add_item(tree, hf_mbim_ms_access_binary_app_id, tvb, base_offset + app_id_offset,
7479 app_id_size, ENC_NA);
7481 if (file_path_offset && file_path_size) {
7482 proto_tree_add_item(tree, hf_mbim_ms_access_binary_file_path, tvb, base_offset + file_path_offset,
7483 file_path_size, ENC_NA);
7485 if (local_pin_offset && local_pin_size) {
7486 proto_tree_add_item(tree, hf_mbim_ms_access_binary_local_pin, tvb, base_offset + local_pin_offset,
7487 local_pin_size, ENC_UTF_8 | ENC_NA);
7489 if (binary_data_offset && binary_data_size) {
7490 proto_tree_add_item(tree, hf_mbim_ms_access_binary_binary_data, tvb, base_offset + binary_data_offset,
7491 binary_data_size, ENC_NA);
7495 static void
7496 mbim_dissect_ms_access_record(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7498 int base_offset;
7499 uint32_t app_id_offset, app_id_size, file_path_offset, file_path_size, local_pin_offset, local_pin_size, record_data_offset, record_data_size;
7501 base_offset = offset;
7502 proto_tree_add_item(tree, hf_mbim_ms_access_record_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7503 offset += 4;
7504 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7505 offset += 4;
7506 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7507 offset += 4;
7508 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_file_path_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_offset);
7509 offset += 4;
7510 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_file_path_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_size);
7511 offset += 4;
7512 proto_tree_add_item(tree, hf_mbim_ms_access_record_record_number, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7513 offset += 4;
7514 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_local_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_offset);
7515 offset += 4;
7516 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_local_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_size);
7517 offset += 4;
7518 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_record_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &record_data_offset);
7519 offset += 4;
7520 proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_record_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &record_data_size);
7521 if (app_id_offset && app_id_size) {
7522 proto_tree_add_item(tree, hf_mbim_ms_access_record_app_id, tvb, base_offset + app_id_offset,
7523 app_id_size, ENC_NA);
7525 if (file_path_offset && file_path_size) {
7526 proto_tree_add_item(tree, hf_mbim_ms_access_record_file_path, tvb, base_offset + file_path_offset,
7527 file_path_size, ENC_NA);
7529 if (local_pin_offset && local_pin_size) {
7530 proto_tree_add_item(tree, hf_mbim_ms_access_record_local_pin, tvb, base_offset + local_pin_offset,
7531 local_pin_size, ENC_LITTLE_ENDIAN | ENC_UTF_8);
7533 if (record_data_offset && record_data_size) {
7534 proto_tree_add_item(tree, hf_mbim_ms_access_record_record_data, tvb, base_offset + record_data_offset,
7535 record_data_size, ENC_NA);
7539 static void
7540 mbim_dissect_ms_nitz(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7542 proto_tree_add_item(tree, hf_mbim_nitz_year, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7543 offset += 4;
7544 proto_tree_add_item(tree, hf_mbim_nitz_month, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7545 offset += 4;
7546 proto_tree_add_item(tree, hf_mbim_nitz_day, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7547 offset += 4;
7548 proto_tree_add_item(tree, hf_mbim_nitz_hour, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7549 offset += 4;
7550 proto_tree_add_item(tree, hf_mbim_nitz_minute, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7551 offset += 4;
7552 proto_tree_add_item(tree, hf_mbim_nitz_second, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7553 offset += 4;
7554 proto_tree_add_item(tree, hf_mbim_nitz_timezone_offset_minutes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7555 offset += 4;
7556 proto_tree_add_item(tree, hf_mbim_nitz_daylight_saving_time_offset_minutes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7557 offset += 4;
7558 proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_nitz_data_class, ett_mbim_bitmap,
7559 mbim_data_class_fields, ENC_LITTLE_ENDIAN);
7562 static int
7563 dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
7565 proto_item *ti;
7566 proto_tree *mbim_tree, *header_tree, *subtree;
7567 int offset = 0;
7568 uint32_t msg_type, trans_id, open_count;
7569 uint64_t trans_id_key, *p_trans_id_key;
7570 conversation_t *conversation;
7571 struct mbim_conv_info *mbim_conv;
7572 struct mbim_info *mbim_info = NULL;
7574 if (data) {
7575 usb_trans_info_t *usb_trans_info = ((urb_info_t *)data)->usb_trans_info;
7576 if (usb_trans_info && (usb_trans_info->setup.request == 0x00)) {
7577 tree = proto_tree_get_parent_tree(tree);
7581 if (mbim_control_decode_unknown_itf && (tvb_reported_length_remaining(tvb, offset) < 12)) {
7582 return 0;
7585 col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM");
7586 col_clear(pinfo->cinfo, COL_INFO);
7588 conversation = find_or_create_conversation(pinfo);
7589 mbim_conv = (struct mbim_conv_info *)conversation_get_proto_data(conversation, proto_mbim);
7590 if (!mbim_conv) {
7591 mbim_conv = wmem_new(wmem_file_scope(), struct mbim_conv_info);
7592 mbim_conv->trans = wmem_map_new(wmem_file_scope(), wmem_int64_hash, g_int64_equal);
7593 mbim_conv->open = wmem_tree_new(wmem_file_scope());
7594 mbim_conv->cellular_class = 0;
7595 mbim_conv->mbim_extended_version = MBIM_Extended_Version_Unknown;
7596 mbim_conv->open_count = 0;
7597 wmem_tree_insert32(mbim_conv->open, pinfo->num, GUINT_TO_POINTER(mbim_conv->open_count));
7598 conversation_add_proto_data(conversation, proto_mbim, mbim_conv);
7601 ti = proto_tree_add_item(tree, proto_mbim, tvb, offset, -1, ENC_NA);
7602 mbim_tree = proto_item_add_subtree(ti, ett_mbim);
7603 ti = proto_tree_add_item(mbim_tree, hf_mbim_control, tvb, offset, 0, ENC_NA);
7604 proto_item_set_hidden(ti);
7606 header_tree = proto_tree_add_subtree(mbim_tree, tvb, offset, 12, ett_mbim_msg_header, NULL, "Message Header");
7607 proto_tree_add_item_ret_uint(header_tree, hf_mbim_header_message_type, tvb, offset, 4, ENC_LITTLE_ENDIAN, &msg_type);
7608 col_add_fstr(pinfo->cinfo, COL_INFO, "%-19s", val_to_str_const(msg_type, mbim_msg_type_vals, "Unknown"));
7609 offset += 4;
7610 proto_tree_add_item(header_tree, hf_mbim_header_message_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7611 offset += 4;
7612 proto_tree_add_item_ret_uint(header_tree, hf_mbim_header_transaction_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &trans_id);
7613 offset += 4;
7615 switch (msg_type) {
7616 case MBIM_OPEN_MSG:
7618 uint32_t max_ctrl_transfer;
7620 if (!PINFO_FD_VISITED(pinfo)) {
7621 mbim_conv->open_count++;
7622 wmem_tree_insert32(mbim_conv->open, pinfo->num, GUINT_TO_POINTER(mbim_conv->open_count));
7624 max_ctrl_transfer = tvb_get_letohl(tvb, offset);
7625 if (max_ctrl_transfer == 8) {
7626 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);
7627 } else {
7628 ti = proto_tree_add_uint(mbim_tree, hf_mbim_max_ctrl_transfer, tvb, offset, 4, max_ctrl_transfer);
7629 if (max_ctrl_transfer < 64) {
7630 expert_add_info(pinfo, ti, &ei_mbim_max_ctrl_transfer);
7634 break;
7635 case MBIM_CLOSE_MSG:
7636 break;
7637 case MBIM_COMMAND_MSG:
7639 uint32_t info_buff_len, current_frag, total_frag, cid, cmd_type;
7640 uint8_t uuid_idx;
7641 fragment_head *frag_data;
7642 tvbuff_t *frag_tvb;
7643 struct mbim_uuid_ext *uuid_ext_info = NULL;
7645 subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 8, ett_mbim_frag_header, NULL, "Fragment Header");
7646 proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_total, tvb, offset, 4, ENC_LITTLE_ENDIAN, &total_frag);
7647 offset += 4;
7648 proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_current, tvb, offset, 4, ENC_LITTLE_ENDIAN, &current_frag);
7649 offset += 4;
7650 if (total_frag > 1) {
7651 frag_data = fragment_add_seq_check(&mbim_reassembly_table, tvb, offset, pinfo,
7652 trans_id, mbim_conv, current_frag,
7653 tvb_reported_length_remaining(tvb, offset),
7654 (current_frag != (total_frag-1)));
7655 frag_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled MBIM control message",
7656 frag_data, &mbim_frag_items, NULL, subtree);
7657 if (!frag_tvb) {
7658 /* Fragmentation reassembly not performed yet */
7659 proto_tree_add_item(mbim_tree, hf_mbim_fragmented_payload, tvb, offset, -1, ENC_NA);
7660 col_append_fstr(pinfo->cinfo, COL_INFO, ": [Fragment #%u out of %u]", current_frag+1, total_frag);
7661 break;
7663 offset = 0;
7664 } else {
7665 frag_tvb = tvb;
7668 open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
7669 trans_id_key = ((uint64_t)open_count << 32) | trans_id;
7670 if (!PINFO_FD_VISITED(pinfo)) {
7671 p_trans_id_key = wmem_new(wmem_file_scope(), uint64_t);
7672 *p_trans_id_key = trans_id_key;
7673 mbim_info = wmem_new(wmem_file_scope(), struct mbim_info);
7674 mbim_info->req_frame = pinfo->num;
7675 mbim_info->resp_frame = 0;
7676 wmem_map_insert(mbim_conv->trans, p_trans_id_key, mbim_info);
7677 } else {
7678 mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
7679 if (mbim_info && mbim_info->resp_frame) {
7680 proto_item *resp_it;
7682 resp_it = proto_tree_add_uint(header_tree, hf_mbim_response_in, tvb, 0, 0, mbim_info->resp_frame);
7683 proto_item_set_generated(resp_it);
7687 uuid_idx = mbim_dissect_service_id_uuid(frag_tvb, pinfo, mbim_tree, hf_mbim_device_service_id, &offset, &uuid_ext_info, pinfo->rec->rec_header.packet_header.pkt_encap != WTAP_ENCAP_ETW);
7688 cid = mbim_dissect_cid(frag_tvb, pinfo, mbim_tree, &offset, uuid_idx, uuid_ext_info);
7689 proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_command_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &cmd_type);
7690 if (mbim_info) {
7691 mbim_info->cmd_type = cmd_type;
7693 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(cmd_type, mbim_command_type_vals, "Unknown"));
7694 offset += 4;
7695 proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_info_buffer_len, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &info_buff_len);
7696 offset += 4;
7697 subtree = mbim_tree;
7698 if (info_buff_len) {
7699 subtree = proto_tree_add_subtree(mbim_tree, frag_tvb, offset, info_buff_len, ett_mbim_info_buffer, NULL, "Information Buffer");
7701 switch (uuid_idx) {
7702 case UUID_BASIC_CONNECT:
7703 switch (cid) {
7704 case MBIM_CID_DEVICE_CAPS:
7705 if (cmd_type == MBIM_COMMAND_SET) {
7706 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7707 } else if (info_buff_len) {
7708 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7710 break;
7711 case MBIM_CID_SUBSCRIBER_READY_STATUS:
7712 if (cmd_type == MBIM_COMMAND_SET) {
7713 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7714 } else if (info_buff_len) {
7715 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7716 proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7717 } else {
7718 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7721 break;
7722 case MBIM_CID_RADIO_STATE:
7723 if (cmd_type == MBIM_COMMAND_SET) {
7724 proto_tree_add_item(subtree, hf_mbim_radio_state_set, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7725 } else if (info_buff_len) {
7726 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7728 break;
7729 case MBIM_CID_PIN:
7730 if (cmd_type == MBIM_COMMAND_SET) {
7731 mbim_dissect_set_pin(frag_tvb, pinfo, subtree, offset);
7732 } else if (info_buff_len) {
7733 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7735 break;
7736 case MBIM_CID_PIN_LIST:
7737 if (cmd_type == MBIM_COMMAND_SET) {
7738 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7739 } else if (info_buff_len) {
7740 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7742 break;
7743 case MBIM_CID_HOME_PROVIDER:
7744 if (cmd_type == MBIM_COMMAND_SET) {
7745 mbim_dissect_provider(frag_tvb, pinfo, subtree, offset);
7746 } else if (info_buff_len) {
7747 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7749 break;
7750 case MBIM_CID_PREFERRED_PROVIDERS:
7751 if (cmd_type == MBIM_COMMAND_SET) {
7752 mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
7753 } else if (info_buff_len) {
7754 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7756 break;
7757 case MBIM_CID_VISIBLE_PROVIDERS:
7758 if (cmd_type == MBIM_COMMAND_SET) {
7759 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7760 } else {
7761 proto_tree_add_item(subtree, hf_mbim_visible_providers_req_action, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7763 break;
7764 case MBIM_CID_REGISTER_STATE:
7765 if (cmd_type == MBIM_COMMAND_SET) {
7766 mbim_dissect_set_register_state(frag_tvb, pinfo, subtree, offset);
7767 } else if (info_buff_len) {
7768 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7770 break;
7771 case MBIM_CID_PACKET_SERVICE:
7772 if (cmd_type == MBIM_COMMAND_SET) {
7773 proto_tree_add_item(subtree, hf_mbim_set_packet_service_action,
7774 frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7775 } else if (info_buff_len) {
7776 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7778 break;
7779 case MBIM_CID_SIGNAL_STATE:
7780 if (cmd_type == MBIM_COMMAND_SET) {
7781 mbim_dissect_set_signal_state(frag_tvb, pinfo, subtree, offset);
7782 } else if (info_buff_len) {
7783 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7785 break;
7786 case MBIM_CID_CONNECT:
7787 if (cmd_type == MBIM_COMMAND_SET) {
7788 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7789 mbim_dissect_set_connect_v3_and_higher(frag_tvb, pinfo, subtree, offset, info_buff_len, mbim_conv);
7790 } else {
7791 mbim_dissect_set_connect(frag_tvb, pinfo, subtree, offset);
7793 } else {
7794 proto_tree_add_item(subtree, hf_mbim_connect_info_session_id, frag_tvb,
7795 offset, 4, ENC_LITTLE_ENDIAN);
7797 break;
7798 case MBIM_CID_PROVISIONED_CONTEXTS:
7799 if (cmd_type == MBIM_COMMAND_SET) {
7800 mbim_dissect_context(frag_tvb, pinfo, subtree, offset, true);
7801 } else if (info_buff_len) {
7802 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7804 break;
7805 case MBIM_CID_SERVICE_ACTIVATION:
7806 if (cmd_type == MBIM_COMMAND_SET) {
7807 proto_tree_add_item(subtree, hf_mbim_set_service_activation_data_buffer,
7808 frag_tvb, offset, info_buff_len, ENC_NA);
7809 } else {
7810 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7812 break;
7813 case MBIM_CID_IP_CONFIGURATION:
7814 if (cmd_type == MBIM_COMMAND_SET) {
7815 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7816 } else {
7817 proto_tree_add_item(subtree, hf_mbim_ip_configuration_info_session_id, frag_tvb,
7818 offset, 4, ENC_LITTLE_ENDIAN);
7820 break;
7821 case MBIM_CID_DEVICE_SERVICES:
7822 if (cmd_type == MBIM_COMMAND_SET) {
7823 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7824 } else if (info_buff_len) {
7825 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7827 break;
7828 case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST:
7829 if (cmd_type == MBIM_COMMAND_SET) {
7830 mbim_dissect_device_service_subscribe_list(frag_tvb, pinfo, subtree, offset);
7831 } else {
7832 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7834 break;
7835 case MBIM_CID_PACKET_STATISTICS:
7836 if (cmd_type == MBIM_COMMAND_SET) {
7837 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7838 } else if (info_buff_len) {
7839 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7841 break;
7842 case MBIM_CID_NETWORK_IDLE_HINT:
7843 if (cmd_type == MBIM_COMMAND_SET) {
7844 proto_tree_add_item(subtree, hf_mbim_network_idle_hint_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7845 } else if (info_buff_len) {
7846 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7848 break;
7849 case MBIM_CID_EMERGENCY_MODE:
7850 if (cmd_type == MBIM_COMMAND_SET) {
7851 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7852 } else if (info_buff_len) {
7853 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7855 break;
7856 case MBIM_CID_IP_PACKET_FILTERS:
7857 mbim_dissect_packet_filters(frag_tvb, pinfo, subtree, offset, mbim_conv);
7858 break;
7859 case MBIM_CID_MULTICARRIER_PROVIDERS:
7860 if (cmd_type == MBIM_COMMAND_SET) {
7861 mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
7862 } else if (info_buff_len) {
7863 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7865 break;
7866 default:
7867 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7868 break;
7870 break;
7871 case UUID_SMS:
7872 switch (cid) {
7873 case MBIM_CID_SMS_CONFIGURATION:
7874 if (cmd_type == MBIM_COMMAND_SET) {
7875 mbim_dissect_set_sms_configuration(frag_tvb, pinfo, subtree, offset);
7876 } else if (info_buff_len) {
7877 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7879 break;
7880 case MBIM_CID_SMS_READ:
7881 if (cmd_type == MBIM_COMMAND_SET) {
7882 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7883 } else {
7884 mbim_dissect_sms_read_req(frag_tvb, pinfo, subtree, offset);
7886 break;
7887 case MBIM_CID_SMS_SEND:
7888 if (cmd_type == MBIM_COMMAND_SET) {
7889 mbim_dissect_set_sms_send(frag_tvb, pinfo, subtree, offset, mbim_conv);
7890 } else {
7891 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7893 break;
7894 case MBIM_CID_SMS_DELETE:
7895 if (cmd_type == MBIM_COMMAND_SET) {
7896 proto_tree_add_item(subtree, hf_mbim_set_sms_delete_flag,
7897 frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7898 offset += 4;
7899 proto_tree_add_item(subtree, hf_mbim_set_sms_delete_message_index,
7900 frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7901 } else {
7902 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7904 break;
7905 case MBIM_CID_SMS_MESSAGE_STORE_STATUS:
7906 if (cmd_type == MBIM_COMMAND_SET) {
7907 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7908 } else if (info_buff_len) {
7909 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7911 break;
7912 default:
7913 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7914 break;
7916 break;
7917 case UUID_USSD:
7918 switch (cid) {
7919 case MBIM_CID_USSD:
7920 if (cmd_type == MBIM_COMMAND_SET) {
7921 mbim_dissect_set_ussd(frag_tvb, pinfo, subtree, offset);
7922 } else {
7923 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7925 break;
7926 default:
7927 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7928 break;
7930 break;
7931 case UUID_PHONEBOOK:
7932 switch (cid) {
7933 case MBIM_CID_PHONEBOOK_CONFIGURATION:
7934 if (cmd_type == MBIM_COMMAND_SET) {
7935 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7936 } else if (info_buff_len) {
7937 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7939 break;
7940 case MBIM_CID_PHONEBOOK_READ:
7941 if (cmd_type == MBIM_COMMAND_SET) {
7942 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7943 } else {
7944 proto_tree_add_item(subtree, hf_mbim_phonebook_read_req_filter_flag, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7945 offset += 4;
7946 proto_tree_add_item(subtree, hf_mbim_phonebook_read_req_filter_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7948 break;
7949 case MBIM_CID_PHONEBOOK_DELETE:
7950 if (cmd_type == MBIM_COMMAND_SET) {
7951 proto_tree_add_item(subtree, hf_mbim_set_phonebook_delete_filter_flag, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7952 offset += 4;
7953 proto_tree_add_item(subtree, hf_mbim_set_phonebook_delete_filter_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7954 } else {
7955 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7957 break;
7958 case MBIM_CID_PHONEBOOK_WRITE:
7959 if (cmd_type == MBIM_COMMAND_SET) {
7960 mbim_dissect_set_phonebook_write(frag_tvb, pinfo, subtree, offset);
7961 } else {
7962 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7964 break;
7965 default:
7966 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7967 break;
7969 break;
7970 case UUID_STK:
7971 switch (cid) {
7972 case MBIM_CID_STK_PAC:
7973 if (cmd_type == MBIM_COMMAND_SET) {
7974 mbim_dissect_set_stk_pac(frag_tvb, pinfo, subtree, offset);
7975 } else {
7976 if (info_buff_len) {
7977 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7980 break;
7981 case MBIM_CID_STK_TERMINAL_RESPONSE:
7982 if (cmd_type == MBIM_COMMAND_SET) {
7983 mbim_dissect_set_stk_terminal_response(frag_tvb, pinfo, subtree, offset);
7984 } else {
7985 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7987 break;
7988 case MBIM_CID_STK_ENVELOPE:
7989 if (cmd_type == MBIM_COMMAND_SET) {
7990 tvbuff_t *env_tvb;
7991 proto_tree *env_tree;
7993 ti = proto_tree_add_item(subtree, hf_mbim_set_stk_envelope_data_buffer,
7994 frag_tvb, offset, info_buff_len, ENC_NA);
7995 if (bertlv_handle) {
7996 env_tree = proto_item_add_subtree(ti, ett_mbim_buffer);
7997 env_tvb = tvb_new_subset_length(frag_tvb, offset, info_buff_len);
7998 call_dissector(bertlv_handle, env_tvb, pinfo, env_tree);
8000 } else if (info_buff_len) {
8001 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8003 break;
8004 default:
8005 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8006 break;
8008 break;
8009 case UUID_AUTH:
8010 switch (cid) {
8011 case MBIM_CID_AKA_AUTH:
8012 if (cmd_type == MBIM_COMMAND_SET) {
8013 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8014 } else {
8015 mbim_dissect_aka_auth_req(frag_tvb, pinfo, subtree, offset);
8017 break;
8018 case MBIM_CID_AKAP_AUTH:
8019 if (cmd_type == MBIM_COMMAND_SET) {
8020 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8021 } else {
8022 mbim_dissect_akap_auth_req(frag_tvb, pinfo, subtree, offset);
8024 break;
8025 case MBIM_CID_SIM_AUTH:
8026 if (cmd_type == MBIM_COMMAND_SET) {
8027 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8028 } else {
8029 mbim_dissect_sim_auth_req(frag_tvb, pinfo, subtree, offset);
8031 break;
8032 default:
8033 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8034 break;
8036 break;
8037 case UUID_DSS:
8038 switch (cid) {
8039 case MBIM_CID_DSS_CONNECT:
8040 if (cmd_type == MBIM_COMMAND_SET) {
8041 mbim_dissect_set_dss_connect(frag_tvb, pinfo, subtree, offset);
8042 } else {
8043 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8045 break;
8046 default:
8047 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8048 break;
8050 break;
8051 case UUID_MULTICARRIER:
8052 switch (cid) {
8053 case MBIM_CID_MULTICARRIER_CAPABILITIES:
8054 if (cmd_type == MBIM_COMMAND_SET) {
8055 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8056 } else if (info_buff_len) {
8057 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8059 break;
8060 case MBIM_CID_LOCATION_INFO:
8061 if (cmd_type == MBIM_COMMAND_SET) {
8062 proto_tree_add_item(subtree, hf_mbim_location_info_country, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8063 } else if (info_buff_len) {
8064 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8066 break;
8067 case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST:
8068 if (cmd_type == MBIM_COMMAND_SET) {
8069 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
8070 } else {
8071 mbim_dissect_muticarrier_current_cid_list_req(frag_tvb, pinfo, subtree, offset);
8073 break;
8074 default:
8075 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8076 break;
8078 break;
8079 case UUID_MS_HOSTSHUTDOWN:
8080 switch (cid) {
8081 case MBIM_CID_MS_HOSTSHUTDOWN:
8082 case MBIM_CID_MS_HOSTPRESHUTDOWN:
8083 if (cmd_type == MBIM_COMMAND_SET) {
8084 if (info_buff_len) {
8085 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8087 } else {
8088 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8090 break;
8091 default:
8092 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8093 break;
8095 break;
8096 case UUID_MSFWID:
8097 switch (cid) {
8098 case MBIM_CID_MSFWID_FIRMWAREID:
8099 if (cmd_type == MBIM_COMMAND_SET) {
8100 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8101 } else if (info_buff_len) {
8102 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8104 break;
8105 default:
8106 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8107 break;
8109 break;
8110 case UUID_QMI:
8111 switch (cid) {
8112 case MBIM_CID_QMI_QMI:
8113 if (info_buff_len) {
8114 proto_tree_add_item(subtree, hf_mbim_qmi_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8116 break;
8117 default:
8118 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8119 break;
8121 break;
8122 case UUID_INTEL_FWUSVC:
8123 switch (cid) {
8124 case MBIM_CID_INTC_MODEM_REBOOT:
8125 if (cmd_type == MBIM_COMMAND_SET) {
8126 if (info_buff_len) {
8127 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8129 } else {
8130 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8132 break;
8133 default:
8134 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8135 break;
8137 break;
8138 case UUID_INTEL_DPTF:
8139 switch (cid) {
8140 case MBIM_CID_INTC_THERMAL_STATE:
8141 if (cmd_type == MBIM_COMMAND_SET) {
8142 mbim_dissect_thermal_config(frag_tvb, pinfo, subtree, offset);
8143 } else {
8144 proto_tree_add_item(subtree, hf_mbim_query_thermal_state_temp_sensor_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8146 break;
8147 default:
8148 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8149 break;
8151 break;
8152 case UUID_INTEL_SAR:
8153 switch (cid) {
8154 case MBIM_CID_INTC_SAR_CONFIG:
8155 if (cmd_type == MBIM_COMMAND_SET) {
8156 mbim_dissect_sar_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
8157 } else if (info_buff_len) {
8158 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8160 break;
8161 default:
8162 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8163 break;
8165 break;
8166 case UUID_INTEL_ACT:
8167 switch (cid) {
8168 case MBIM_CID_INTC_ADPCLK_MODE:
8169 if (cmd_type == MBIM_COMMAND_SET) {
8170 proto_tree_add_item(subtree, hf_mbim_adpclk_activate_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8171 } else if (info_buff_len) {
8172 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8174 break;
8175 default:
8176 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8177 break;
8179 break;
8180 case UUID_INTEL_TRCSVC:
8181 switch (cid) {
8182 case MBIM_CID_INTC_TRACE:
8183 if (cmd_type == MBIM_COMMAND_SET) {
8184 proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8185 } else if (info_buff_len) {
8186 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8188 break;
8189 case MBIM_CID_INTC_TRACE_DATA:
8190 if (cmd_type == MBIM_COMMAND_SET) {
8191 proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8192 } else if (info_buff_len) {
8193 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8195 break;
8196 default:
8197 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8198 break;
8200 break;
8201 case UUID_INTEL_NRTC:
8202 switch (cid) {
8203 case MBIM_CID_INTC_NRTAPP:
8204 if (cmd_type == MBIM_COMMAND_SET) {
8205 proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_period, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
8206 offset += 2;
8207 proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_duration, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
8208 } else if (info_buff_len) {
8209 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8211 break;
8212 case MBIM_CID_INTC_NRTCWS:
8213 if (cmd_type == MBIM_COMMAND_SET) {
8214 mbim_dissect_nrtcws_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
8215 } else if (info_buff_len) {
8216 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8218 break;
8219 default:
8220 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8221 break;
8223 break;
8224 case UUID_INTEL_USB_PROFILE:
8225 switch (cid) {
8226 case MBIM_CID_INTC_USBPROFILE:
8227 if (cmd_type == MBIM_COMMAND_SET) {
8228 uint32_t at_len;
8230 proto_tree_add_item_ret_uint(subtree, hf_mbim_usbprofile_cmd_length, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &at_len);
8231 offset += 4;
8232 proto_tree_add_item(subtree, hf_mbim_usbprofile_cmd_buffer, frag_tvb, offset, at_len, ENC_LITTLE_ENDIAN|ENC_UTF_16);
8233 } else {
8234 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8236 break;
8237 default:
8238 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8239 break;
8241 break;
8242 case UUID_INTEL_CIQ:
8243 switch (cid) {
8244 case MBIM_CID_INTC_CIQ:
8245 if (cmd_type == MBIM_COMMAND_SET) {
8246 uint32_t size;
8248 proto_tree_add_item(subtree, hf_mbim_ciq_set_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8249 offset += 4;
8250 proto_tree_add_item_ret_uint(subtree, hf_mbim_ciq_set_debug_info_size, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &size);
8251 offset += 4;
8252 proto_tree_add_item(subtree, hf_mbim_ciq_set_debug_info, frag_tvb, offset, size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
8253 } else if (info_buff_len) {
8254 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8256 break;
8257 default:
8258 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8259 break;
8261 break;
8262 case UUID_ATDS:
8263 switch (cid) {
8264 case MBIM_CID_ATDS_SIGNAL:
8265 if (cmd_type == MBIM_COMMAND_SET) {
8266 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8267 } else if (info_buff_len) {
8268 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8270 break;
8271 case MBIM_CID_ATDS_LOCATION:
8272 if (cmd_type == MBIM_COMMAND_SET) {
8273 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8274 } else if (info_buff_len) {
8275 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8277 break;
8278 case MBIM_CID_ATDS_OPERATORS:
8279 if (cmd_type == MBIM_COMMAND_SET) {
8280 mbim_dissect_atds_operators(frag_tvb, pinfo, subtree, offset);
8281 } else if (info_buff_len) {
8282 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8284 break;
8285 case MBIM_CID_ATDS_RAT:
8286 if (cmd_type == MBIM_COMMAND_SET) {
8287 proto_tree_add_item(subtree, hf_mbim_atds_rat_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8288 } else if (info_buff_len) {
8289 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8291 break;
8292 case MBIM_CID_ATDS_REGISTER_STATE:
8293 if (cmd_type == MBIM_COMMAND_SET) {
8294 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8295 } else if (info_buff_len) {
8296 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8298 break;
8299 case MBIM_CID_ATDS_SET_PROJECTION_TABLES:
8300 if (cmd_type == MBIM_COMMAND_SET) {
8301 mbim_dissect_atds_projection_tables(frag_tvb, pinfo, subtree, offset);
8302 } else if (info_buff_len) {
8303 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8305 break;
8306 default:
8307 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8308 break;
8310 break;
8311 case UUID_MULTIFLOW:
8312 switch (cid) {
8313 case MBIM_CID_MULTIFLOW_CAPS:
8314 if (cmd_type == MBIM_COMMAND_SET) {
8315 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8316 } else if (info_buff_len) {
8317 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8319 break;
8320 case MBIM_CID_MULTIFLOW_UPLINK:
8321 case MBIM_CID_MULTIFLOW_DOWNLINK:
8322 if (cmd_type == MBIM_COMMAND_SET) {
8323 proto_tree_add_item(subtree, hf_mbim_set_multiflow_state_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8324 } else if (info_buff_len) {
8325 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8327 break;
8328 case MBIM_CID_MULTIFLOW_TFT:
8329 if (cmd_type == MBIM_COMMAND_SET) {
8330 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8331 } else if (info_buff_len) {
8332 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8334 break;
8335 default:
8336 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8337 break;
8339 break;
8340 case UUID_BASIC_CONNECT_EXTENSIONS:
8341 switch (cid) {
8342 case MBIM_CID_MS_PROVISIONED_CONTEXT_V2:
8343 if (cmd_type == MBIM_COMMAND_SET) {
8344 mbim_dissect_set_ms_provisioned_context_v2(frag_tvb, pinfo, subtree, offset, mbim_conv);
8345 } else if (info_buff_len) {
8346 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8348 break;
8349 case MBIM_CID_MS_NETWORK_BLACKLIST:
8350 if (cmd_type == MBIM_COMMAND_SET) {
8351 mbim_dissect_ms_network_blacklist_info(pinfo, frag_tvb, subtree, offset);
8352 } else if (info_buff_len) {
8353 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8355 break;
8356 case MBIM_CID_MS_LTE_ATTACH_CONFIG:
8357 if (cmd_type == MBIM_COMMAND_SET) {
8358 mbim_dissect_set_lte_attach_config(frag_tvb, pinfo, subtree, offset);
8360 else if (info_buff_len) {
8361 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8363 break;
8364 case MBIM_CID_MS_LTE_ATTACH_STATUS:
8365 if (cmd_type == MBIM_COMMAND_SET) {
8366 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8368 else if (info_buff_len) {
8369 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8371 break;
8372 case MBIM_CID_MS_SYS_CAPS:
8373 case MBIM_CID_MS_DEVICE_CAPS_V2:
8374 if (cmd_type == MBIM_COMMAND_SET) {
8375 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8376 } else if (info_buff_len) {
8377 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8379 break;
8380 case MBIM_CID_MS_DEVICE_SLOT_MAPPINGS:
8381 if (cmd_type == MBIM_COMMAND_SET) {
8382 mbim_dissect_ms_device_slot_mapping_info(frag_tvb, pinfo, subtree, offset);
8383 } else if (info_buff_len) {
8384 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8386 break;
8387 case MBIM_CID_MS_SLOT_INFO_STATUS:
8388 if (cmd_type == MBIM_COMMAND_QUERY) {
8389 proto_tree_add_item(subtree, hf_mbim_ms_slot_info_req_slot_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8390 } else {
8391 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8393 break;
8394 case MBIM_CID_PCO:
8395 if (info_buff_len) {
8396 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8398 break;
8399 case MBIM_CID_MS_DEVICE_RESET:
8400 if (cmd_type == MBIM_COMMAND_SET) {
8401 if (info_buff_len) {
8402 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8404 } else {
8405 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8407 break;
8408 case MBIM_CID_BASE_STATIONS_INFO:
8409 if (cmd_type == MBIM_COMMAND_SET) {
8410 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8411 } else if (info_buff_len) {
8412 mbim_dissect_base_station_info_req(frag_tvb, subtree, offset, mbim_conv);
8414 break;
8415 case MBIM_CID_LOCATION_INFO_STATUS:
8416 if (cmd_type == MBIM_COMMAND_SET) {
8417 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8418 } else if (info_buff_len) {
8419 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8421 break;
8422 case MBIM_CID_MS_PIN_INFO_EX2:
8423 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8424 break;
8425 case MBIM_CID_VERSION:
8426 if (cmd_type == MBIM_COMMAND_SET) {
8427 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8428 } else if (info_buff_len) {
8429 mbim_dissect_version(frag_tvb, subtree, offset, mbim_conv);
8431 break;
8432 case MBIM_CID_MS_MODEM_CONFIG:
8433 if (cmd_type == MBIM_COMMAND_SET) {
8434 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8435 } else if (info_buff_len) {
8436 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8438 break;
8439 case MBIM_CID_MS_REGISTRATION_PARAMS:
8440 if (cmd_type == MBIM_COMMAND_SET) {
8441 mbim_dissect_ms_registration_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
8443 else if (info_buff_len) {
8444 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8446 break;
8447 case MBIM_CID_MS_NETWORK_PARAMS:
8448 if (cmd_type == MBIM_COMMAND_SET) {
8449 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8451 else if (info_buff_len) {
8452 mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
8454 break;
8455 case MBIM_CID_MS_WAKE_REASON:
8456 if (cmd_type == MBIM_COMMAND_SET) {
8457 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8458 } else if (info_buff_len) {
8459 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8461 break;
8462 case MBIM_CID_MS_UE_POLICY:
8463 if (cmd_type == MBIM_COMMAND_SET) {
8464 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8466 else if (info_buff_len) {
8467 mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
8469 break;
8470 default:
8471 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8472 break;
8474 break;
8475 case UUID_MS_SARCONTROL:
8476 switch (cid) {
8477 case MBIM_CID_MS_SAR_CONFIG:
8478 if (cmd_type == MBIM_COMMAND_SET) {
8479 mbim_dissect_ms_sar_config(frag_tvb, pinfo, subtree, offset, false);
8481 else if (info_buff_len) {
8482 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8484 break;
8485 case MBIM_CID_MS_TRANSMISSION_STATUS:
8486 if (cmd_type == MBIM_COMMAND_SET) {
8487 mbim_dissect_ms_transmission_status(frag_tvb, subtree, offset, false);
8489 else if (info_buff_len) {
8490 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8492 break;
8493 default:
8494 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8495 break;
8497 break;
8498 case UUID_MS_UICC_LOW_LEVEL:
8499 switch (cid) {
8500 case MBIM_CID_MS_UICC_ATR:
8501 if (cmd_type == MBIM_COMMAND_SET) {
8502 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8503 } else if (info_buff_len) {
8504 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8505 proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8506 } else {
8507 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8510 break;
8511 case MBIM_CID_MS_UICC_OPEN_CHANNEL:
8512 if (cmd_type == MBIM_COMMAND_SET) {
8513 mbim_dissect_ms_open_channel(frag_tvb, subtree, offset, mbim_conv);
8514 } else {
8515 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8517 break;
8518 case MBIM_CID_MS_UICC_CLOSE_CHANNEL:
8519 if (cmd_type == MBIM_COMMAND_SET) {
8520 mbim_dissect_ms_close_channel(frag_tvb, subtree, offset, mbim_conv);
8521 } else {
8522 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8524 break;
8525 case MBIM_CID_MS_UICC_APDU:
8526 if (cmd_type == MBIM_COMMAND_SET) {
8527 mbim_dissect_ms_apdu(frag_tvb, pinfo, subtree, offset, mbim_conv);
8528 } else {
8529 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8531 break;
8532 case MBIM_CID_MS_UICC_TERMINAL_CAPABILITY:
8533 if (cmd_type == MBIM_COMMAND_SET) {
8534 mbim_dissect_ms_set_terminal_capability(frag_tvb, pinfo, subtree, offset, mbim_conv);
8535 } else if (info_buff_len) {
8536 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8537 proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8538 } else {
8539 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8542 break;
8543 case MBIM_CID_MS_UICC_RESET:
8544 if (cmd_type == MBIM_COMMAND_SET) {
8545 mbim_dissect_ms_set_reset(frag_tvb, subtree, offset, mbim_conv);
8546 } else if (info_buff_len) {
8547 if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8548 mbim_dissect_ms_query_reset(frag_tvb, subtree, offset);
8549 } else {
8550 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8553 break;
8554 case MBIM_CID_MS_UICC_APP_LIST:
8555 if (cmd_type == MBIM_COMMAND_SET) {
8556 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8557 } else if (info_buff_len) {
8558 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8560 break;
8561 case MBIM_CID_MS_UICC_ACCESS_BINARY:
8562 mbim_dissect_ms_access_binary(frag_tvb, pinfo, subtree, offset);
8563 break;
8564 case MBIM_CID_MS_UICC_ACCESS_RECORD:
8565 mbim_dissect_ms_access_record(frag_tvb, pinfo, subtree, offset);
8566 break;
8567 case MBIM_CID_MS_UICC_FILE_STATUS:
8568 if (cmd_type == MBIM_COMMAND_SET) {
8569 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8570 } else if (info_buff_len) {
8571 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8572 } else {
8573 mbim_dissect_ms_file_path(frag_tvb, pinfo, subtree, offset);
8575 break;
8576 default:
8577 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8578 break;
8580 break;
8581 case UUID_MS_VOICE_EXTENSIONS:
8582 switch (cid) {
8583 case MBIM_CID_MS_VOICE_EXTENSIONS_NITZ:
8584 if (cmd_type == MBIM_COMMAND_SET) {
8585 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8587 else if (info_buff_len) {
8588 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8590 break;
8591 default:
8592 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8593 break;
8595 break;
8596 case UUID_EXT_IDX:
8598 int cid_idx;
8599 mbim_dissect_fct dissect_cid;
8601 try_val_to_str_idx(cid, uuid_ext_info->uuid_cid_list, &cid_idx);
8602 if (cid_idx != -1) {
8603 dissect_cid = (cmd_type == MBIM_COMMAND_SET) ? uuid_ext_info->uuid_fct_list[cid_idx].cmd_set :
8604 uuid_ext_info->uuid_fct_list[cid_idx].cmd_query;
8605 if (dissect_cid) {
8606 dissect_cid(frag_tvb, pinfo, subtree, offset, mbim_info);
8607 } else if (info_buff_len) {
8608 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8610 } else {
8611 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8614 break;
8615 default:
8616 if (info_buff_len) {
8617 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8619 break;
8622 break;
8623 case MBIM_FUNCTION_ERROR_MSG:
8624 open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
8625 trans_id_key = ((uint64_t)open_count << 32) | trans_id;
8626 mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
8627 if (!PINFO_FD_VISITED(pinfo)) {
8628 if (mbim_info) {
8629 mbim_info->resp_frame = pinfo->num;
8631 } else {
8632 if (mbim_info && mbim_info->req_frame) {
8633 proto_item *req_it;
8635 req_it = proto_tree_add_uint(header_tree, hf_mbim_request_in, tvb, 0, 0, mbim_info->req_frame);
8636 proto_item_set_generated(req_it);
8639 /* FALLTHROUGH */
8640 case MBIM_HOST_ERROR_MSG:
8641 proto_tree_add_item(mbim_tree, hf_mbim_error_status_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8642 break;
8643 case MBIM_OPEN_DONE:
8644 case MBIM_CLOSE_DONE:
8645 proto_tree_add_item(mbim_tree, hf_mbim_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8646 break;
8647 case MBIM_COMMAND_DONE:
8648 case MBIM_INDICATE_STATUS_MSG:
8650 uint32_t info_buff_len, current_frag, total_frag, cid;
8651 uint8_t uuid_idx;
8652 fragment_head *frag_data;
8653 tvbuff_t *frag_tvb;
8654 struct mbim_uuid_ext *uuid_ext_info = NULL;
8656 subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 8, ett_mbim_frag_header, NULL, "Fragment Header");
8657 proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_total, tvb, offset, 4, ENC_LITTLE_ENDIAN, &total_frag);
8658 offset += 4;
8659 proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_current, tvb, offset, 4, ENC_LITTLE_ENDIAN, &current_frag);
8660 offset += 4;
8661 if (total_frag > 1) {
8662 frag_data = fragment_add_seq_check(&mbim_reassembly_table, tvb, offset, pinfo,
8663 trans_id, mbim_conv, current_frag,
8664 tvb_reported_length_remaining(tvb, offset),
8665 (current_frag != (total_frag-1)));
8666 frag_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled MBIM control message",
8667 frag_data, &mbim_frag_items, NULL, subtree);
8668 if (!frag_tvb) {
8669 /* Fragmentation reassembly not performed yet */
8670 proto_tree_add_item(mbim_tree, hf_mbim_fragmented_payload, tvb, offset, -1, ENC_NA);
8671 col_append_fstr(pinfo->cinfo, COL_INFO, ": [Fragment #%u out of %u]", current_frag+1, total_frag);
8672 break;
8674 offset = 0;
8675 } else {
8676 frag_tvb = tvb;
8679 if (msg_type == MBIM_COMMAND_DONE) {
8680 open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
8681 trans_id_key = ((uint64_t)open_count << 32) | trans_id;
8682 mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
8683 if (!PINFO_FD_VISITED(pinfo)) {
8684 if (mbim_info) {
8685 mbim_info->resp_frame = pinfo->num;
8687 } else {
8688 if (mbim_info && mbim_info->req_frame) {
8689 proto_item *req_it;
8691 req_it = proto_tree_add_uint(header_tree, hf_mbim_request_in, tvb, 0, 0, mbim_info->req_frame);
8692 proto_item_set_generated(req_it);
8697 uuid_idx = mbim_dissect_service_id_uuid(frag_tvb, pinfo, mbim_tree, hf_mbim_device_service_id, &offset, &uuid_ext_info, pinfo->rec->rec_header.packet_header.pkt_encap != WTAP_ENCAP_ETW);
8698 cid = mbim_dissect_cid(frag_tvb, pinfo, mbim_tree, &offset, uuid_idx, uuid_ext_info);
8699 if (msg_type == MBIM_COMMAND_DONE) {
8700 proto_tree_add_item(mbim_tree, hf_mbim_status, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8701 offset += 4;
8703 proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_info_buffer_len, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &info_buff_len);
8704 offset += 4;
8705 if (info_buff_len == 0) {
8706 break;
8708 subtree = proto_tree_add_subtree(mbim_tree, frag_tvb, offset, info_buff_len, ett_mbim_info_buffer, NULL, "Information Buffer");
8709 switch (uuid_idx) {
8710 case UUID_BASIC_CONNECT:
8711 switch (cid) {
8712 case MBIM_CID_DEVICE_CAPS:
8713 if (msg_type == MBIM_COMMAND_DONE) {
8714 mbim_dissect_device_caps_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8715 } else {
8716 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8718 break;
8719 case MBIM_CID_SUBSCRIBER_READY_STATUS:
8720 mbim_dissect_subscriber_ready_status(frag_tvb, pinfo, subtree, offset, mbim_conv);
8721 break;
8722 case MBIM_CID_RADIO_STATE:
8723 proto_tree_add_item(subtree, hf_mbim_radio_state_hw_radio_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8724 offset += 4;
8725 proto_tree_add_item(subtree, hf_mbim_radio_state_sw_radio_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8726 break;
8727 case MBIM_CID_PIN:
8728 if (msg_type == MBIM_COMMAND_DONE) {
8729 uint32_t attempts;
8731 proto_tree_add_item(subtree, hf_mbim_pin_info_pin_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8732 offset += 4;
8733 proto_tree_add_item(subtree, hf_mbim_pin_info_pin_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8734 offset += 4;
8735 attempts = tvb_get_letohl(frag_tvb, offset);
8736 if (attempts == 0xffffffff) {
8737 proto_tree_add_uint_format(subtree, hf_mbim_pin_info_remaining_attempts, frag_tvb, offset, 4,
8738 attempts, "Not supported (0xffffffff)");
8739 } else {
8740 proto_tree_add_uint(subtree, hf_mbim_pin_info_remaining_attempts, frag_tvb, offset, 4, attempts);
8742 } else {
8743 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8745 break;
8746 case MBIM_CID_PIN_LIST:
8747 if (msg_type == MBIM_COMMAND_DONE) {
8748 mbim_dissect_pin_list_info(frag_tvb, pinfo, subtree, offset);
8749 } else {
8750 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8752 break;
8753 case MBIM_CID_HOME_PROVIDER:
8754 if (msg_type == MBIM_COMMAND_DONE) {
8755 mbim_dissect_provider(frag_tvb, pinfo, subtree, offset);
8756 } else {
8757 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8759 break;
8760 case MBIM_CID_PREFERRED_PROVIDERS:
8761 mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8762 break;
8763 case MBIM_CID_VISIBLE_PROVIDERS:
8764 if (msg_type == MBIM_COMMAND_DONE) {
8765 mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8766 } else {
8767 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8769 break;
8770 case MBIM_CID_REGISTER_STATE:
8771 mbim_dissect_registration_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8772 break;
8773 case MBIM_CID_PACKET_SERVICE:
8774 mbim_dissect_packet_service_info(frag_tvb, pinfo, subtree, offset, mbim_conv, info_buff_len);
8775 break;
8776 case MBIM_CID_SIGNAL_STATE:
8777 mbim_dissect_signal_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8778 break;
8779 case MBIM_CID_CONNECT:
8780 mbim_dissect_connect_info(frag_tvb, pinfo, subtree, offset, mbim_conv, info_buff_len);
8781 break;
8782 case MBIM_CID_PROVISIONED_CONTEXTS:
8783 mbim_dissect_provisioned_contexts_info(frag_tvb, pinfo, subtree, offset);
8784 break;
8785 case MBIM_CID_SERVICE_ACTIVATION:
8786 if (msg_type == MBIM_COMMAND_DONE) {
8787 uint32_t nw_error;
8789 nw_error = tvb_get_letohl(frag_tvb, offset);
8790 if (nw_error == 0) {
8791 proto_tree_add_uint_format_value(subtree, hf_mbim_service_activation_info_nw_error,
8792 frag_tvb, offset, 4, nw_error, "Success (0)");
8793 } else {
8794 proto_tree_add_uint(subtree, hf_mbim_service_activation_info_nw_error,
8795 frag_tvb, offset, 4, nw_error);
8797 proto_tree_add_item(subtree, hf_mbim_service_activation_info_data_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8798 } else {
8799 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8801 break;
8802 case MBIM_CID_IP_CONFIGURATION:
8803 mbim_dissect_ip_configuration_info(frag_tvb, pinfo, subtree, offset);
8804 break;
8805 case MBIM_CID_DEVICE_SERVICES:
8806 if (msg_type == MBIM_COMMAND_DONE) {
8807 mbim_dissect_device_services_info(frag_tvb, pinfo, subtree, offset);
8808 } else {
8809 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8811 break;
8812 case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST:
8813 if (msg_type == MBIM_COMMAND_DONE) {
8814 mbim_dissect_device_service_subscribe_list(frag_tvb, pinfo, subtree, offset);
8815 } else {
8816 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8818 break;
8819 case MBIM_CID_PACKET_STATISTICS:
8820 if (msg_type == MBIM_COMMAND_DONE) {
8821 mbim_dissect_packet_statistics_info(frag_tvb, pinfo, subtree, offset);
8822 } else {
8823 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8825 break;
8826 case MBIM_CID_NETWORK_IDLE_HINT:
8827 if (msg_type == MBIM_COMMAND_DONE) {
8828 proto_tree_add_item(subtree, hf_mbim_network_idle_hint_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8829 } else {
8830 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8832 break;
8833 case MBIM_CID_EMERGENCY_MODE:
8834 proto_tree_add_item(subtree, hf_mbim_emergency_mode_info_emergency_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8835 break;
8836 case MBIM_CID_IP_PACKET_FILTERS:
8837 if (msg_type == MBIM_COMMAND_DONE) {
8838 mbim_dissect_packet_filters(frag_tvb, pinfo, subtree, offset, mbim_conv);
8839 } else {
8840 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8842 break;
8843 case MBIM_CID_MULTICARRIER_PROVIDERS:
8844 mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8845 break;
8846 default:
8847 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8848 break;
8850 break;
8851 case UUID_SMS:
8852 switch (cid) {
8853 case MBIM_CID_SMS_CONFIGURATION:
8854 mbim_dissect_sms_configuration_info(frag_tvb, pinfo, subtree, offset);
8855 break;
8856 case MBIM_CID_SMS_READ:
8857 mbim_dissect_sms_read_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8858 break;
8859 case MBIM_CID_SMS_SEND:
8860 if (msg_type == MBIM_COMMAND_DONE) {
8861 proto_tree_add_item(subtree, hf_mbim_sms_send_info_message_reference, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8862 } else {
8863 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8865 break;
8866 case MBIM_CID_SMS_DELETE:
8867 if (msg_type == MBIM_COMMAND_DONE) {
8868 if (info_buff_len) {
8869 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8871 } else {
8872 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8874 break;
8875 case MBIM_CID_SMS_MESSAGE_STORE_STATUS:
8876 proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_sms_status_info_flags, ett_mbim_bitmap,
8877 mbim_sms_status_info_flags_fields, ENC_LITTLE_ENDIAN);
8878 offset += 4;
8879 proto_tree_add_item(subtree, hf_mbim_sms_status_info_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8880 break;
8881 default:
8882 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8883 break;
8885 break;
8886 case UUID_USSD:
8887 switch (cid) {
8888 case MBIM_CID_USSD:
8889 mbim_dissect_ussd_info(frag_tvb, pinfo, subtree, offset);
8890 break;
8891 default:
8892 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8893 break;
8895 break;
8896 case UUID_PHONEBOOK:
8897 switch (cid) {
8898 case MBIM_CID_PHONEBOOK_CONFIGURATION:
8899 mbim_dissect_phonebook_configuration_info(frag_tvb, pinfo, subtree, offset);
8900 break;
8901 case MBIM_CID_PHONEBOOK_READ:
8902 if (msg_type == MBIM_COMMAND_DONE) {
8903 mbim_dissect_phonebook_read_info(frag_tvb, pinfo, subtree, offset);
8904 } else {
8905 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8907 break;
8908 case MBIM_CID_PHONEBOOK_DELETE:
8909 case MBIM_CID_PHONEBOOK_WRITE:
8910 if (msg_type == MBIM_COMMAND_DONE) {
8911 if (info_buff_len) {
8912 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8914 } else {
8915 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8917 break;
8918 default:
8919 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8920 break;
8922 break;
8923 case UUID_STK:
8924 switch (cid) {
8925 case MBIM_CID_STK_PAC:
8926 if (msg_type == MBIM_COMMAND_DONE) {
8927 mbim_dissect_stk_pac_info(frag_tvb, pinfo, subtree, offset);
8928 } else {
8929 tvbuff_t *pac_tvb;
8930 int pac_length;
8931 proto_tree *pac_tree;
8933 proto_tree_add_item(subtree, hf_mbim_stk_pac_pac_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8934 offset += 4;
8935 pac_length = info_buff_len - 4;
8936 ti = proto_tree_add_item(subtree, hf_mbim_stk_pac_pac, frag_tvb, offset, pac_length, ENC_NA);
8937 if (bertlv_handle) {
8938 pac_tree = proto_item_add_subtree(ti, ett_mbim_buffer);
8939 pac_tvb = tvb_new_subset_length(frag_tvb, offset, pac_length);
8940 call_dissector(bertlv_handle, pac_tvb, pinfo, pac_tree);
8943 break;
8944 case MBIM_CID_STK_TERMINAL_RESPONSE:
8945 if (msg_type == MBIM_COMMAND_DONE) {
8946 mbim_dissect_stk_terminal_response_info(frag_tvb, pinfo, subtree, offset);
8947 } else {
8948 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8950 break;
8951 case MBIM_CID_STK_ENVELOPE:
8952 if (msg_type == MBIM_COMMAND_DONE) {
8953 proto_tree_add_item(subtree, hf_mbim_stk_envelope_info_envelope_support,
8954 frag_tvb, offset, 32, ENC_NA);
8955 } else {
8956 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8958 break;
8959 default:
8960 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8961 break;
8963 break;
8964 case UUID_AUTH:
8965 switch (cid) {
8966 case MBIM_CID_AKA_AUTH:
8967 if (msg_type == MBIM_COMMAND_DONE) {
8968 mbim_dissect_aka_auth_info(frag_tvb, pinfo, subtree, offset);
8969 } else {
8970 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8972 break;
8973 case MBIM_CID_AKAP_AUTH:
8974 if (msg_type == MBIM_COMMAND_DONE) {
8975 mbim_dissect_akap_auth_info(frag_tvb, pinfo, subtree, offset);
8976 } else {
8977 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8979 break;
8980 case MBIM_CID_SIM_AUTH:
8981 if (msg_type == MBIM_COMMAND_DONE) {
8982 mbim_dissect_sim_auth_info(frag_tvb, pinfo, subtree, offset);
8983 } else {
8984 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8986 break;
8987 default:
8988 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8989 break;
8991 break;
8992 case UUID_DSS:
8993 switch (cid) {
8994 case MBIM_CID_DSS_CONNECT:
8995 if (msg_type == MBIM_COMMAND_DONE) {
8996 if (info_buff_len) {
8997 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8999 } else {
9000 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9002 break;
9003 default:
9004 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9005 break;
9007 break;
9008 case UUID_MULTICARRIER:
9009 switch (cid) {
9010 case MBIM_CID_MULTICARRIER_CAPABILITIES:
9011 if (msg_type == MBIM_COMMAND_DONE) {
9012 proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_multicarrier_capabilities_info_capabilities,
9013 ett_mbim_bitmap, mbim_multicarrier_capabilities_fields, ENC_LITTLE_ENDIAN);
9014 } else {
9015 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9017 break;
9018 case MBIM_CID_LOCATION_INFO:
9019 if (msg_type == MBIM_COMMAND_DONE) {
9020 proto_tree_add_item(subtree, hf_mbim_location_info_country, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9021 } else if (info_buff_len) {
9022 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9024 break;
9025 case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST:
9026 if (msg_type == MBIM_COMMAND_DONE) {
9027 mbim_dissect_muticarrier_current_cid_list_info(frag_tvb, pinfo, subtree, offset);
9028 } else {
9029 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9031 break;
9032 default:
9033 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9034 break;
9036 break;
9037 case UUID_MS_HOSTSHUTDOWN:
9038 switch (cid) {
9039 case MBIM_CID_MS_HOSTSHUTDOWN:
9040 case MBIM_CID_MS_HOSTPRESHUTDOWN:
9041 if (msg_type == MBIM_COMMAND_DONE) {
9042 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) {
9043 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9044 } else if (info_buff_len) {
9045 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9047 } else {
9048 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9050 break;
9051 default:
9052 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9053 break;
9055 break;
9056 case UUID_MSFWID:
9057 switch (cid) {
9058 case MBIM_CID_MSFWID_FIRMWAREID:
9059 if (msg_type == MBIM_COMMAND_DONE) {
9060 proto_tree_add_item(subtree, hf_mbim_msfwid_firmwareid_info_firmware_id, frag_tvb, offset, 16, ENC_NA);
9061 } else if (info_buff_len) {
9062 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9064 break;
9065 default:
9066 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9067 break;
9069 break;
9070 case UUID_QMI:
9071 switch (cid) {
9072 case MBIM_CID_QMI_QMI:
9073 if (info_buff_len) {
9074 proto_tree_add_item(subtree, hf_mbim_qmi_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9076 break;
9077 default:
9078 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9079 break;
9081 break;
9082 case UUID_INTEL_FWUSVC:
9083 switch (cid) {
9084 case MBIM_CID_INTC_MODEM_REBOOT:
9085 if (msg_type == MBIM_COMMAND_DONE) {
9086 if (info_buff_len) {
9087 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9089 } else {
9090 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9092 break;
9093 default:
9094 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9095 break;
9097 break;
9098 case UUID_INTEL_DPTF:
9099 switch (cid) {
9100 case MBIM_CID_INTC_THERMAL_STATE:
9101 if ((msg_type == MBIM_COMMAND_DONE) && mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9102 mbim_dissect_thermal_config(frag_tvb, pinfo, subtree, offset);
9103 } else {
9104 mbim_dissect_thermal_state_info(frag_tvb, pinfo, subtree, offset);
9106 break;
9107 default:
9108 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9109 break;
9111 break;
9112 case UUID_INTEL_SAR:
9113 switch (cid) {
9114 case MBIM_CID_INTC_SAR_CONFIG:
9115 if (msg_type == MBIM_COMMAND_DONE) {
9116 mbim_dissect_sar_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
9117 } else {
9118 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9120 break;
9121 default:
9122 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9123 break;
9125 break;
9126 case UUID_INTEL_ACT:
9127 switch (cid) {
9128 case MBIM_CID_INTC_ADPCLK_MODE:
9129 if ((msg_type == MBIM_COMMAND_DONE) && info_buff_len &&
9130 mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9131 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9132 } else {
9133 mbim_dissect_adpclk_freq_info(frag_tvb, pinfo, subtree, offset);
9135 break;
9136 default:
9137 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9138 break;
9140 break;
9141 case UUID_INTEL_TRCSVC:
9142 switch (cid) {
9143 case MBIM_CID_INTC_TRACE:
9144 if (msg_type == MBIM_COMMAND_DONE) {
9145 proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9146 } else {
9147 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9149 break;
9150 case MBIM_CID_INTC_TRACE_DATA:
9151 if (msg_type == MBIM_COMMAND_DONE) {
9152 proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9153 } else {
9154 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9156 break;
9157 default:
9158 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9159 break;
9161 break;
9162 case UUID_INTEL_NRTC:
9163 switch (cid) {
9164 case MBIM_CID_INTC_NRTAPP:
9165 if (msg_type == MBIM_COMMAND_DONE) {
9166 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9167 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9168 } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9169 proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_period, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
9170 offset += 2;
9171 proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_duration, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
9173 } else {
9174 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9176 break;
9177 case MBIM_CID_INTC_NRTCWS:
9178 if (msg_type == MBIM_COMMAND_DONE) {
9179 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9180 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9181 } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9182 mbim_dissect_nrtcws_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
9184 } else {
9185 mbim_dissect_nrtcws_info(frag_tvb, pinfo, subtree, offset);
9187 break;
9188 default:
9189 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9190 break;
9192 break;
9193 case UUID_INTEL_USB_PROFILE:
9194 switch (cid) {
9195 case MBIM_CID_INTC_USBPROFILE:
9196 if ((msg_type == MBIM_COMMAND_DONE) && ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) || info_buff_len)) {
9197 uint32_t at_len;
9199 proto_tree_add_item_ret_uint(subtree, hf_mbim_usbprofile_rsp_length, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &at_len);
9200 offset += 4;
9201 proto_tree_add_item(subtree, hf_mbim_usbprofile_rsp_buffer, frag_tvb, offset, at_len, ENC_LITTLE_ENDIAN|ENC_UTF_16);
9202 } else {
9203 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9205 break;
9206 default:
9207 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9208 break;
9210 break;
9211 case UUID_INTEL_CIQ:
9212 switch (cid) {
9213 case MBIM_CID_INTC_CIQ:
9214 if (msg_type == MBIM_COMMAND_DONE) {
9215 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9216 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9217 } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9218 proto_tree_add_item(subtree, hf_mbim_ciq_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9220 } else {
9221 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9223 break;
9224 default:
9225 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9226 break;
9228 break;
9229 case UUID_ATDS:
9230 switch (cid) {
9231 case MBIM_CID_ATDS_SIGNAL:
9232 if (msg_type == MBIM_COMMAND_DONE) {
9233 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9234 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9235 } else {
9236 mbim_dissect_atds_signal_info(frag_tvb, pinfo, subtree, offset);
9238 } else {
9239 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9241 break;
9242 case MBIM_CID_ATDS_LOCATION:
9243 if (msg_type == MBIM_COMMAND_DONE) {
9244 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9245 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9246 } else {
9247 proto_tree_add_item(subtree, hf_mbim_atds_location_info_lac, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9248 offset += 4;
9249 proto_tree_add_item(subtree, hf_mbim_atds_location_info_tac, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9250 offset += 4;
9251 proto_tree_add_item(subtree, hf_mbim_atds_location_info_cellid, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9253 } else {
9254 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9256 break;
9257 case MBIM_CID_ATDS_OPERATORS:
9258 if (msg_type == MBIM_COMMAND_DONE) {
9259 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9260 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9261 } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9262 mbim_dissect_atds_operators(frag_tvb, pinfo, subtree, offset);
9264 } else {
9265 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9267 break;
9268 case MBIM_CID_ATDS_RAT:
9269 if (msg_type == MBIM_COMMAND_DONE) {
9270 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9271 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9272 } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9273 proto_tree_add_item(subtree, hf_mbim_atds_rat_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9275 } else {
9276 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9278 break;
9279 case MBIM_CID_ATDS_REGISTER_STATE:
9280 if (msg_type == MBIM_COMMAND_DONE) {
9281 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9282 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9283 } else {
9284 mbim_dissect_registration_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9286 } else {
9287 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9289 break;
9290 case MBIM_CID_ATDS_SET_PROJECTION_TABLES:
9291 if (msg_type == MBIM_COMMAND_DONE) {
9292 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9293 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9294 } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9295 mbim_dissect_atds_projection_tables(frag_tvb, pinfo, subtree, offset);
9297 } else {
9298 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9300 break;
9301 default:
9302 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9303 break;
9305 break;
9306 case UUID_MULTIFLOW:
9307 switch (cid) {
9308 case MBIM_CID_MULTIFLOW_CAPS:
9309 if (msg_type == MBIM_COMMAND_DONE) {
9310 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9311 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9312 } else {
9313 proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_multiflow_caps_info_control_caps,
9314 ett_mbim_bitmap, mbim_multiflow_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
9316 } else {
9317 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
9319 break;
9320 case MBIM_CID_MULTIFLOW_UPLINK:
9321 case MBIM_CID_MULTIFLOW_DOWNLINK:
9322 if (msg_type == MBIM_COMMAND_DONE) {
9323 proto_tree_add_item(subtree, hf_mbim_multiflow_state_info_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9324 } else {
9325 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
9327 break;
9328 case MBIM_CID_MULTIFLOW_TFT:
9329 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9330 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9331 } else {
9332 mbim_dissect_multiflow_tft_info(frag_tvb, pinfo, subtree, offset);
9334 break;
9335 default:
9336 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9337 break;
9339 break;
9340 case UUID_BASIC_CONNECT_EXTENSIONS:
9341 switch (cid) {
9342 case MBIM_CID_MS_PROVISIONED_CONTEXT_V2:
9343 mbim_dissect_ms_provisioned_context_info_v2(frag_tvb, pinfo, subtree, offset, mbim_conv);
9344 break;
9345 case MBIM_CID_MS_NETWORK_BLACKLIST:
9346 mbim_dissect_ms_network_blacklist_info(pinfo, frag_tvb, subtree, offset);
9347 break;
9348 case MBIM_CID_MS_LTE_ATTACH_CONFIG:
9349 mbim_dissect_lte_attach_config_info(frag_tvb, pinfo, subtree, offset);
9350 break;
9351 case MBIM_CID_MS_LTE_ATTACH_STATUS:
9352 mbim_dissect_lte_attach_status(frag_tvb, pinfo, subtree, offset);
9353 break;
9354 case MBIM_CID_MS_SYS_CAPS:
9355 if (msg_type == MBIM_COMMAND_DONE) {
9356 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9357 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9358 } else {
9359 mbim_dissect_sys_caps_info(frag_tvb, subtree, offset);
9361 } else {
9362 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9364 break;
9365 case MBIM_CID_MS_DEVICE_CAPS_V2:
9366 if (msg_type == MBIM_COMMAND_DONE) {
9367 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9368 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9369 } else {
9370 if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
9371 mbim_dissect_device_caps_v3_and_higher_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9372 } else {
9373 mbim_dissect_device_caps_v2_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9376 } else {
9377 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9379 break;
9380 case MBIM_CID_MS_DEVICE_SLOT_MAPPINGS:
9381 if (msg_type == MBIM_COMMAND_DONE) {
9382 mbim_dissect_ms_device_slot_mapping_info(frag_tvb, pinfo, subtree, offset);
9383 } else {
9384 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9386 break;
9387 case MBIM_CID_MS_SLOT_INFO_STATUS:
9388 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9389 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9390 } else {
9391 proto_tree_add_item(subtree, hf_mbim_ms_slot_info_slot_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9392 offset += 4;
9393 proto_tree_add_item(subtree, hf_mbim_ms_slot_info_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9395 break;
9396 case MBIM_CID_PCO:
9397 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9398 break;
9399 case MBIM_CID_MS_DEVICE_RESET:
9400 if (msg_type == MBIM_COMMAND_DONE) {
9401 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) {
9402 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9403 } else if (info_buff_len) {
9404 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9406 } else {
9407 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9409 break;
9410 case MBIM_CID_BASE_STATIONS_INFO:
9411 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9412 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9413 } else {
9414 mbim_dissect_base_station_info(frag_tvb, subtree, offset, mbim_conv);
9416 break;
9417 case MBIM_CID_LOCATION_INFO_STATUS:
9418 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9419 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9420 } else {
9421 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9423 break;
9424 case MBIM_CID_MS_PIN_INFO_EX2:
9425 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9426 break;
9427 case MBIM_CID_VERSION:
9428 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9429 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9431 else if (info_buff_len) {
9432 mbim_dissect_version(frag_tvb, subtree, offset, mbim_conv);
9434 break;
9435 case MBIM_CID_MS_MODEM_CONFIG:
9436 mbim_dissect_ms_modem_config_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9437 break;
9438 case MBIM_CID_MS_REGISTRATION_PARAMS:
9439 mbim_dissect_ms_registration_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9440 break;
9441 case MBIM_CID_MS_NETWORK_PARAMS:
9442 mbim_dissect_ms_network_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9443 break;
9444 case MBIM_CID_MS_UE_POLICY:
9445 mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
9446 break;
9447 case MBIM_CID_MS_WAKE_REASON:
9448 mbim_dissect_ms_wake_reason(frag_tvb, pinfo, subtree, offset);
9449 break;
9450 default:
9451 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9452 break;
9454 break;
9455 case UUID_MS_SARCONTROL:
9456 switch (cid) {
9457 case MBIM_CID_MS_SAR_CONFIG:
9458 mbim_dissect_ms_sar_config(frag_tvb, pinfo, subtree, offset, true);
9459 break;
9460 case MBIM_CID_MS_TRANSMISSION_STATUS:
9461 mbim_dissect_ms_transmission_status(frag_tvb, subtree, offset, true);
9462 break;
9463 default:
9464 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9465 break;
9467 break;
9468 case UUID_MS_UICC_LOW_LEVEL:
9469 switch (cid) {
9470 case MBIM_CID_MS_UICC_ATR:
9471 if (msg_type == MBIM_COMMAND_DONE) {
9472 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9473 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9474 } else {
9475 mbim_dissect_ms_atr_info(frag_tvb, pinfo, subtree, offset);
9477 } else {
9478 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9480 break;
9481 case MBIM_CID_MS_UICC_OPEN_CHANNEL:
9482 if (msg_type == MBIM_COMMAND_DONE) {
9483 mbim_dissect_ms_open_channel_info(frag_tvb, subtree, offset);
9484 } else {
9485 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9487 break;
9488 case MBIM_CID_MS_UICC_CLOSE_CHANNEL:
9489 if (msg_type == MBIM_COMMAND_DONE) {
9490 proto_tree_add_item(subtree, hf_mbim_ms_uicc_status, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9491 } else {
9492 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9494 break;
9495 case MBIM_CID_MS_UICC_APDU:
9496 if (msg_type == MBIM_COMMAND_DONE) {
9497 mbim_dissect_ms_apdu_info(frag_tvb, pinfo, subtree, offset);
9498 } else {
9499 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9501 break;
9502 case MBIM_CID_MS_UICC_TERMINAL_CAPABILITY:
9503 if (msg_type == MBIM_COMMAND_DONE) {
9504 mbim_dissect_ms_terminal_capability_info(frag_tvb, pinfo, subtree, offset, offset);
9505 } else {
9506 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9508 break;
9509 case MBIM_CID_MS_UICC_RESET:
9510 if (msg_type == MBIM_COMMAND_DONE) {
9511 proto_tree_add_item(subtree, hf_mbim_ms_reset_pass_through_action, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9512 } else {
9513 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9515 break;
9516 case MBIM_CID_MS_UICC_APP_LIST:
9517 if (msg_type == MBIM_COMMAND_DONE) {
9518 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9519 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9520 } else {
9521 mbim_dissect_ms_app_list(frag_tvb, pinfo, subtree, offset);
9523 } else {
9524 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9526 break;
9527 case MBIM_CID_MS_UICC_ACCESS_BINARY:
9528 mbim_dissect_ms_response(frag_tvb, pinfo, subtree, offset);
9529 break;
9530 case MBIM_CID_MS_UICC_ACCESS_RECORD:
9531 mbim_dissect_ms_response(frag_tvb, pinfo, subtree, offset);
9532 break;
9533 case MBIM_CID_MS_UICC_FILE_STATUS:
9534 if (msg_type == MBIM_COMMAND_DONE) {
9535 if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9536 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9537 } else {
9538 mbim_dissect_ms_file_status(frag_tvb, pinfo, subtree, offset);
9540 } else {
9541 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9543 break;
9544 default:
9545 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9546 break;
9548 break;
9549 case UUID_MS_VOICE_EXTENSIONS:
9550 switch (cid) {
9551 case MBIM_CID_MS_VOICE_EXTENSIONS_NITZ:
9552 mbim_dissect_ms_nitz(frag_tvb, pinfo, subtree, offset);
9553 break;
9554 default:
9555 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9556 break;
9558 break;
9559 case UUID_EXT_IDX:
9561 int cid_idx;
9562 mbim_dissect_fct dissect_cid;
9564 try_val_to_str_idx(cid, uuid_ext_info->uuid_cid_list, &cid_idx);
9565 if (cid_idx != -1) {
9566 dissect_cid = (msg_type == MBIM_COMMAND_DONE) ? uuid_ext_info->uuid_fct_list[cid_idx].cmd_done :
9567 uuid_ext_info->uuid_fct_list[cid_idx].ind_status;
9568 if (dissect_cid) {
9569 dissect_cid(frag_tvb, pinfo, subtree, offset, mbim_info);
9570 } else if (info_buff_len) {
9571 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9573 } else {
9574 proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9577 break;
9578 default:
9579 proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9580 break;
9583 break;
9584 default:
9585 break;
9588 return tvb_captured_length(tvb);
9591 static int
9592 dissect_mbim_descriptor(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
9594 proto_item *ti;
9595 uint8_t length, type, subtype;
9597 length = tvb_get_uint8(tvb, 0);
9598 type = tvb_get_uint8(tvb, 1);
9599 subtype = tvb_get_uint8(tvb, 2);
9601 if ((type != 0x24) ||
9602 !(((subtype == 0x1b) && (length == 12)) || ((subtype == 0x1c) && (length == 8)))){
9603 return 0;
9606 ti = proto_tree_add_item(tree, hf_mbim_descriptor, tvb, 0, 0, ENC_NA);
9607 proto_item_set_hidden(ti);
9609 if (subtype == 0x1b) {
9610 proto_tree_add_item(tree, hf_mbim_descriptor_version, tvb, 3, 2, ENC_LITTLE_ENDIAN);
9611 proto_tree_add_item(tree, hf_mbim_descriptor_max_control_message, tvb, 5, 2, ENC_LITTLE_ENDIAN);
9612 proto_tree_add_item(tree, hf_mbim_descriptor_number_filters, tvb, 7, 1, ENC_NA);
9613 proto_tree_add_item(tree, hf_mbim_descriptor_max_filter_size, tvb, 8, 1, ENC_NA);
9614 proto_tree_add_item(tree, hf_mbim_descriptor_max_segment_size, tvb, 9, 2, ENC_LITTLE_ENDIAN);
9615 proto_tree_add_bitmask(tree, tvb, 11, hf_mbim_descriptor_network_capabilities, ett_mbim_bitmap,
9616 mbim_descriptor_network_capabilities_fields, ENC_NA);
9617 } else {
9618 proto_tree_add_item(tree, hf_mbim_descriptor_extended_version, tvb, 3, 2, ENC_LITTLE_ENDIAN);
9619 proto_tree_add_item(tree, hf_mbim_descriptor_max_outstanding_command_messages, tvb, 5, 1, ENC_NA);
9620 proto_tree_add_item(tree, hf_mbim_descriptor_mtu, tvb, 6, 2, ENC_LITTLE_ENDIAN);
9623 return length;
9626 static int
9627 dissect_mbim_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
9629 proto_item *ti, *sig_ti, *pi;
9630 proto_tree *mbim_tree, *subtree, *sig_tree;
9631 bool is_32bits;
9632 uint32_t nth_sig, length, next_index, base_offset, offset, datagram_index, datagram_length,
9633 nb, total = 0, ndp = 0, block_len, dss_session_id;
9634 const char *signature;
9635 dissector_handle_t dissector;
9636 tvbuff_t *datagram_tvb;
9637 const uint32_t NTH16 = 0x484D434E;
9638 const uint32_t NTH32 = 0x686D636E;
9639 unsigned reported_length;
9641 if (tvb_captured_length(tvb) < 12) {
9642 return 0;
9645 nth_sig = tvb_get_letohl(tvb, 0);
9646 if (nth_sig == NTH16) {
9647 is_32bits = false;
9648 } else if (nth_sig == NTH32) {
9649 is_32bits = true;
9650 } else {
9651 return 0;
9654 col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM");
9655 col_clear(pinfo->cinfo, COL_INFO);
9657 ti = proto_tree_add_item(tree, proto_mbim, tvb, 0, -1, ENC_NA);
9658 mbim_tree = proto_item_add_subtree(ti, ett_mbim);
9659 ti =proto_tree_add_item(mbim_tree, hf_mbim_bulk, tvb, 0, 0, ENC_NA);
9660 proto_item_set_hidden(ti);
9662 subtree = proto_tree_add_subtree(mbim_tree, tvb, 0, 0, ett_mbim_msg_header, NULL, "NCM Transfer Header");
9663 proto_tree_add_item(subtree, hf_mbim_bulk_nth_signature, tvb, 0, 4, ENC_ASCII);
9664 proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_header_length, tvb, 4, 2, ENC_LITTLE_ENDIAN, &length);
9665 proto_item_set_len(ti, length);
9666 proto_tree_add_item(subtree, hf_mbim_bulk_nth_sequence_number, tvb, 6, 2, ENC_LITTLE_ENDIAN);
9667 if (!is_32bits) {
9668 ti = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_block_length, tvb, 8, 2, ENC_LITTLE_ENDIAN, &block_len);
9669 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_ndp_index, tvb, 10, 2, ENC_LITTLE_ENDIAN, &next_index);
9670 } else {
9671 ti = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_block_length_32, tvb, 8, 4, ENC_LITTLE_ENDIAN, &block_len);
9672 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_ndp_index_32, tvb, 12, 4, ENC_LITTLE_ENDIAN, &next_index);
9674 reported_length = tvb_reported_length(tvb);
9675 if (block_len != reported_length) {
9676 expert_add_info(pinfo, ti, &ei_mbim_invalid_block_len);
9678 if (next_index % 4) {
9679 expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error,
9680 "NDP Index is not a multiple of 4 bytes");
9681 return tvb_captured_length(tvb);
9683 if (next_index > reported_length) {
9684 expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9685 return tvb_captured_length(tvb);
9688 while (next_index) {
9689 base_offset = offset = next_index;
9690 nb = 0;
9691 subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 0, ett_mbim_msg_header, NULL, "NCM Datagram Pointer");
9692 signature = (const char*)tvb_get_string_enc(pinfo->pool, tvb, offset, 4, ENC_ASCII);
9693 if ((!is_32bits && !strncmp(signature, "IPS", 3)) ||
9694 (is_32bits && !strncmp(signature, "ips", 3))) {
9695 sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9696 4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9697 signature[1], signature[2], signature[3]);
9698 sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9699 proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_ips_session_id, tvb, offset+3, 1, ENC_NA);
9700 col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9701 signature[2], signature[3]);
9702 dissector = ip_handle;
9703 } else if ((!is_32bits && !strncmp(signature, "IPC", 3)) ||
9704 (is_32bits && !strncmp(signature, "ipc", 3))) {
9705 sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9706 4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9707 signature[1], signature[2], signature[3]);
9708 sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9709 proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_ipc_session_id, tvb, offset+3, 1, ENC_NA);
9710 col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9711 signature[2], signature[3]);
9712 dissector = bulk_ndp_ctrl_handle;
9713 } else if ((!is_32bits && !strncmp(signature, "DSS", 3)) ||
9714 (is_32bits && !strncmp(signature, "dss", 3))) {
9715 sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9716 4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9717 signature[1], signature[2], signature[3]);
9718 sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9719 proto_tree_add_item_ret_uint(sig_tree, hf_mbim_bulk_ndp_signature_dss_session_id,
9720 tvb, offset+3, 1, ENC_LITTLE_ENDIAN, &dss_session_id);
9721 col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9722 signature[2], signature[3]);
9723 dissector = dissector_get_uint_handle(dss_dissector_table, dss_session_id);
9724 if (dissector == NULL) {
9725 dissector = data_handle;
9727 } else if ((!is_32bits && !strncmp(signature, "DSC", 3)) ||
9728 (is_32bits && !strncmp(signature, "dsc", 3))) {
9729 sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9730 4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9731 signature[1], signature[2], signature[3]);
9732 sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9733 proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_dsc_session_id, tvb, offset+3, 1, ENC_LITTLE_ENDIAN);
9734 col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9735 signature[2], signature[3]);
9736 dissector = bulk_ndp_ctrl_handle;
9737 } else if ((!is_32bits && !strcmp(signature, "NCM0")) ||
9738 (is_32bits && !strcmp(signature, "ncm0"))) {
9739 proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4,
9740 tvb_get_letohl(tvb, offset), "%s", signature);
9741 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, signature);
9742 dissector = eth_handle;
9743 } else if ((!is_32bits && !strcmp(signature, "NCM1")) ||
9744 (is_32bits && !strcmp(signature, "ncm1"))) {
9745 proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4,
9746 tvb_get_letohl(tvb, offset), "%s", signature);
9747 col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, signature);
9748 dissector = eth_fcs_handle;
9749 } else {
9750 proto_tree_add_item(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4, ENC_BIG_ENDIAN);
9751 col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "0x%08X", tvb_get_ntohl(tvb, offset));
9752 dissector = data_handle;
9754 offset += 4;
9755 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &length);
9756 if (length % (is_32bits ? 8 : 4)) {
9757 expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error, "Length is not a multiple of %u bytes",
9758 is_32bits ? 8 : 4);
9759 return tvb_captured_length(tvb);
9761 proto_item_set_len(ti, length);
9762 offset += 2;
9763 if (!is_32bits) {
9764 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_next_ndp_index, tvb,
9765 offset, 2, ENC_LITTLE_ENDIAN, &next_index);
9766 offset += 2;
9767 } else {
9768 proto_tree_add_item(subtree, hf_mbim_bulk_ndp_reserved, tvb,
9769 offset, 2, ENC_LITTLE_ENDIAN);
9770 offset += 2;
9771 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_next_ndp_index_32,
9772 tvb, offset, 4, ENC_LITTLE_ENDIAN, &next_index);
9773 offset += 4;
9774 proto_tree_add_item(subtree, hf_mbim_bulk_ndp_reserved2, tvb,
9775 offset, 4, ENC_LITTLE_ENDIAN);
9776 offset += 4;
9778 if (next_index % 4) {
9779 expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error,
9780 "NDP Index is not a multiple of 4 bytes");
9781 return tvb_captured_length(tvb);
9783 if (next_index > reported_length) {
9784 expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9785 return tvb_captured_length(tvb);
9787 while ((offset - base_offset) < length) {
9788 if (!is_32bits) {
9789 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_index, tvb,
9790 offset, 2, ENC_LITTLE_ENDIAN, &datagram_index);
9791 offset += 2;
9792 proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_length, tvb,
9793 offset, 2, ENC_LITTLE_ENDIAN, &datagram_length);
9794 offset += 2;
9795 } else {
9796 pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_index_32, tvb,
9797 offset, 4, ENC_LITTLE_ENDIAN, &datagram_index);
9798 offset += 4;
9799 proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_length_32, tvb,
9800 offset, 4, ENC_LITTLE_ENDIAN, &datagram_length);
9801 offset += 4;
9803 if (next_index > reported_length) {
9804 expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9805 return tvb_captured_length(tvb);
9807 if (datagram_index && datagram_length) {
9808 proto_tree_add_item(subtree, hf_mbim_bulk_ndp_datagram, tvb,
9809 datagram_index, datagram_length, ENC_NA);
9810 datagram_tvb = tvb_new_subset_length(tvb, datagram_index, datagram_length);
9811 if (dissector) {
9812 if (total) {
9813 col_set_str(pinfo->cinfo, COL_PROTOCOL, "/");
9814 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
9815 col_set_str(pinfo->cinfo, COL_INFO, " | ");
9816 col_set_fence(pinfo->cinfo, COL_INFO);
9818 call_dissector(dissector, datagram_tvb, pinfo, tree);
9820 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
9821 col_set_fence(pinfo->cinfo, COL_INFO);
9822 nb++;
9823 if (++total > MBIM_MAX_ITEMS) {
9824 expert_add_info_format(pinfo, NULL, &ei_mbim_too_many_items,
9825 "More than %u datagrams, dissection seems suspicious",
9826 MBIM_MAX_ITEMS);
9827 return tvb_captured_length(tvb);
9831 ti = proto_tree_add_uint(subtree, hf_mbim_bulk_ndp_nb_datagrams, tvb, 0, 0, nb);
9832 proto_item_set_generated(ti);
9833 if (++ndp > MBIM_MAX_ITEMS) {
9834 expert_add_info_format(pinfo, NULL, &ei_mbim_too_many_items,
9835 "More than %u NCM Datagram Pointers, dissection seems suspicious",
9836 MBIM_MAX_ITEMS);
9837 return tvb_captured_length(tvb);
9840 ti = proto_tree_add_uint(mbim_tree, hf_mbim_bulk_total_nb_datagrams, tvb, 0, 0, total);
9841 proto_item_set_generated(ti);
9843 return tvb_captured_length(tvb);
9846 static bool
9847 dissect_mbim_bulk_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
9849 urb_info_t *urb = (urb_info_t *)data;
9851 if ((urb == NULL) || (urb->conv == NULL) ||
9852 ((urb->conv->interfaceClass != IF_CLASS_CDC_DATA) &&
9853 (urb->conv->interfaceClass != IF_CLASS_UNKNOWN))) {
9854 return false;
9857 if (dissect_mbim_bulk(tvb, pinfo, tree, urb)) {
9858 return true;
9860 return false;
9863 static int
9864 dissect_mbim_decode_as(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
9866 urb_info_t *urb;
9867 usb_trans_info_t *usb_trans_info;
9869 if (!data || (tvb_reported_length(tvb) == 0)) {
9870 return 0;
9873 urb = (urb_info_t *)data;
9874 usb_trans_info = urb->usb_trans_info;
9876 switch (urb->transfer_type) {
9877 case URB_CONTROL:
9878 if (!usb_trans_info) {
9879 return dissect_mbim_control(tvb, pinfo, tree, urb);
9880 } else if ((usb_trans_info->setup.request == 0x00) && (pinfo->srcport == NO_ENDPOINT)) {
9881 /* Skip Send Encapsulated Command header */
9882 tvbuff_t *mbim_tvb = tvb_new_subset_remaining(tvb, 7);
9883 return dissect_mbim_control(mbim_tvb, pinfo, tree, urb);
9884 } else if ((usb_trans_info->setup.request == 0x01) && (pinfo->srcport != NO_ENDPOINT)) {
9885 return dissect_mbim_control(tvb, pinfo, tree, urb);
9887 break;
9888 case URB_BULK:
9889 return dissect_mbim_bulk(tvb, pinfo, tree, urb);
9890 default:
9891 break;
9893 return 0;
9896 static int
9897 dissect_mbim_bulk_ndp_ctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
9899 proto_tree *ndp_ctrl_tree;
9900 proto_item *ti;
9901 int offset = 0;
9902 uint32_t msg_type, msg_len;
9904 col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM NDP Control");
9905 col_clear(pinfo->cinfo, COL_INFO);
9907 ti = proto_tree_add_protocol_format(tree, proto_mbim, tvb, 0, -1, "MBIM NDP Control");
9908 ndp_ctrl_tree = proto_item_add_subtree(ti, ett_mbim_bulk_ndp_ctrl);
9909 ti = proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl, tvb, offset, 0, ENC_NA);
9910 proto_item_set_hidden(ti);
9912 proto_tree_add_item_ret_uint(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_type, tvb, offset, 2, ENC_LITTLE_ENDIAN, &msg_type);
9913 offset += 2;
9914 col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(msg_type, mbim_ndp_ctrl_msg_type_vals, "Unknown"));
9915 proto_tree_add_item_ret_uint(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &msg_len);
9916 offset += 2;
9918 switch (msg_type) {
9919 case MBIM_NDP_CTRL_MULTIFLOW_STATUS:
9921 uint32_t watermark;
9923 proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_status, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9924 offset += 2;
9925 watermark = tvb_get_letohl(tvb, offset);
9926 if (watermark == 0xffffffff) {
9927 proto_tree_add_uint_format_value(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_watermark, tvb, offset, 4,
9928 watermark, "Not reported (0xffffffff)");
9929 } else {
9930 proto_tree_add_uint_format_value(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_watermark, tvb, offset, 4,
9931 watermark, "%u payload bytes", watermark);
9934 break;
9935 default:
9936 proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_payload, tvb, offset, msg_len-4, ENC_NA);
9937 break;
9939 return tvb_captured_length(tvb);
9942 static unsigned
9943 mbim_uuid_hash(const void *key)
9945 return wmem_strong_hash((const uint8_t *)key, 4*sizeof(uint32_t));
9948 static gboolean
9949 mbim_uuid_equal(const void *v1, const void *v2)
9951 const uint32_t *uuid1 = (const uint32_t*)v1;
9952 const uint32_t *uuid2 = (const uint32_t*)v2;
9954 return ((uuid1[0] == uuid2[0]) &&
9955 (uuid1[1] == uuid2[1]) &&
9956 (uuid1[2] == uuid2[2]) &&
9957 (uuid1[3] == uuid2[3]));
9960 void mbim_register_uuid_ext(struct mbim_uuid_ext *uuid_ext)
9962 uint32_t *uuid_key;
9964 if (!mbim_uuid_ext_hash) {
9965 mbim_uuid_ext_hash = wmem_map_new(wmem_epan_scope(), mbim_uuid_hash, mbim_uuid_equal);
9968 uuid_key = (uint32_t *)wmem_alloc(wmem_epan_scope(), 4*sizeof(uint32_t));
9969 memcpy(uuid_key, uuid_ext->uuid, 4*sizeof(uint32_t));
9970 wmem_map_insert(mbim_uuid_ext_hash, uuid_key, uuid_ext);
9973 void
9974 proto_register_mbim(void)
9976 module_t *mbim_module;
9977 expert_module_t* expert_mbim;
9979 static hf_register_info hf[] = {
9980 { &hf_mbim_control,
9981 { "Control", "mbim.control",
9982 FT_NONE, BASE_NONE, NULL, 0,
9983 NULL, HFILL }
9985 { &hf_mbim_header_message_type,
9986 { "Message Type", "mbim.control.header.message_type",
9987 FT_UINT32, BASE_HEX, VALS(mbim_msg_type_vals), 0,
9988 NULL, HFILL }
9990 { &hf_mbim_header_message_length,
9991 { "Message Length", "mbim.control.header.message_length",
9992 FT_UINT32, BASE_DEC, NULL, 0,
9993 NULL, HFILL }
9995 { &hf_mbim_header_transaction_id,
9996 { "Transaction Id", "mbim.control.header.transaction_id",
9997 FT_UINT32, BASE_DEC, NULL, 0,
9998 NULL, HFILL }
10000 { &hf_mbim_fragment_total,
10001 { "Total Fragments", "mbim.control.fragment.total",
10002 FT_UINT32, BASE_DEC, NULL, 0,
10003 NULL, HFILL }
10005 { &hf_mbim_fragment_current,
10006 { "Current Fragment", "mbim.control.fragment.current",
10007 FT_UINT32, BASE_DEC, NULL, 0,
10008 NULL, HFILL }
10010 { &hf_mbim_max_ctrl_transfer,
10011 { "Max Control Transfer", "mbim.control.max_control_transfer",
10012 FT_UINT32, BASE_DEC, NULL, 0,
10013 NULL, HFILL }
10015 { &hf_mbim_device_service_id,
10016 { "Device Service Id", "mbim.control.device_service_id",
10017 FT_GUID, BASE_NONE, NULL, 0,
10018 NULL, HFILL }
10020 { &hf_mbim_uuid_basic_connect_cid,
10021 { "CID", "mbim.control.cid",
10022 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mbim_uuid_basic_connect_cid_vals_ext, 0,
10023 NULL, HFILL }
10025 { &hf_mbim_uuid_sms_cid,
10026 { "CID", "mbim.control.cid",
10027 FT_UINT32, BASE_DEC, VALS(mbim_uuid_sms_cid_vals), 0,
10028 NULL, HFILL }
10030 { &hf_mbim_uuid_ussd_cid,
10031 { "CID", "mbim.control.cid",
10032 FT_UINT32, BASE_DEC, VALS(mbim_uuid_ussd_cid_vals), 0,
10033 NULL, HFILL }
10035 { &hf_mbim_uuid_phonebook_cid,
10036 { "CID", "mbim.control.cid",
10037 FT_UINT32, BASE_DEC, VALS(mbim_uuid_phonebook_cid_vals), 0,
10038 NULL, HFILL }
10040 { &hf_mbim_uuid_stk_cid,
10041 { "CID", "mbim.control.cid",
10042 FT_UINT32, BASE_DEC, VALS(mbim_uuid_stk_cid_vals), 0,
10043 NULL, HFILL }
10045 { &hf_mbim_uuid_auth_cid,
10046 { "CID", "mbim.control.cid",
10047 FT_UINT32, BASE_DEC, VALS(mbim_uuid_auth_cid_vals), 0,
10048 NULL, HFILL }
10050 { &hf_mbim_uuid_dss_cid,
10051 { "CID", "mbim.control.cid",
10052 FT_UINT32, BASE_DEC, VALS(mbim_uuid_dss_cid_vals), 0,
10053 NULL, HFILL }
10055 { &hf_mbim_uuid_multicarrier_cid,
10056 { "CID", "mbim.control.cid",
10057 FT_UINT32, BASE_DEC, VALS(mbim_uuid_multicarrier_cid_vals), 0,
10058 NULL, HFILL }
10060 { &hf_mbim_uuid_ms_hostshutdown_cid,
10061 { "CID", "mbim.control.cid",
10062 FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_hostshutdown_cid_vals), 0,
10063 NULL, HFILL }
10065 { &hf_mbim_uuid_msfwid_cid,
10066 { "CID", "mbim.control.cid",
10067 FT_UINT32, BASE_DEC, VALS(mbim_uuid_msfwid_cid_vals), 0,
10068 NULL, HFILL }
10070 { &hf_mbim_uuid_qmi_cid,
10071 { "CID", "mbim.control.cid",
10072 FT_UINT32, BASE_DEC, VALS(mbim_uuid_qmi_cid_vals), 0,
10073 NULL, HFILL }
10075 { &hf_mbim_uuid_intel_fwusvc_cid,
10076 { "CID", "mbim.control.cid",
10077 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_fwusvc_cid_vals), 0,
10078 NULL, HFILL }
10080 { &hf_mbim_uuid_intel_dptf_cid,
10081 { "CID", "mbim.control.cid",
10082 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_dptf_cid_vals), 0,
10083 NULL, HFILL }
10085 { &hf_mbim_uuid_intel_sar_cid,
10086 { "CID", "mbim.control.cid",
10087 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_sar_cid_vals), 0,
10088 NULL, HFILL }
10090 { &hf_mbim_uuid_intel_act_cid,
10091 { "CID", "mbim.control.cid",
10092 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_act_cid_vals), 0,
10093 NULL, HFILL }
10095 { &hf_mbim_uuid_intel_trcsvc_cid,
10096 { "CID", "mbim.control.cid",
10097 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_trcsvc_cid_vals), 0,
10098 NULL, HFILL }
10100 { &hf_mbim_uuid_intel_nrtc_cid,
10101 { "CID", "mbim.control.cid",
10102 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_nrtc_cid_vals), 0,
10103 NULL, HFILL }
10105 { &hf_mbim_uuid_intel_usb_profile_cid,
10106 { "CID", "mbim.control.cid",
10107 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_usb_profile_cid_vals), 0,
10108 NULL, HFILL }
10110 { &hf_mbim_uuid_intel_ciq_cid,
10111 { "CID", "mbim.control.cid",
10112 FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_ciq_cid_vals), 0,
10113 NULL, HFILL }
10115 { &hf_mbim_uuid_atds_cid,
10116 { "CID", "mbim.control.cid",
10117 FT_UINT32, BASE_DEC, VALS(mbim_uuid_atds_cid_vals), 0,
10118 NULL, HFILL }
10120 { &hf_mbim_uuid_multiflow_cid,
10121 { "CID", "mbim.control.cid",
10122 FT_UINT32, BASE_DEC, VALS(mbim_uuid_multiflow_cid_vals), 0,
10123 NULL, HFILL }
10125 { &hf_mbim_uuid_basic_connect_extensions_cid,
10126 { "CID", "mbim.control.cid",
10127 FT_UINT32, BASE_DEC, VALS(mbim_uuid_basic_connect_extensions_cid_vals), 0,
10128 NULL, HFILL }
10130 { &hf_mbim_uuid_ms_sarcontrol_cid,
10131 { "CID", "mbim.control.cid",
10132 FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_sarcontrol_cid_vals), 0,
10133 NULL, HFILL }
10135 { &hf_mbim_uuid_ms_uicc_low_level_cid,
10136 { "CID", "mbim.control.cid",
10137 FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_uicc_low_level_cid_vals), 0,
10138 NULL, HFILL }
10140 { &hf_mbim_uuid_ms_voice_extensions_cid,
10141 { "CID", "mbim.control.cid",
10142 FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_voice_extensions_cid_vals), 0,
10143 NULL, HFILL }
10145 { &hf_mbim_cid,
10146 { "CID", "mbim.control.cid",
10147 FT_UINT32, BASE_DEC, NULL, 0,
10148 NULL, HFILL }
10150 { &hf_mbim_command_type,
10151 { "Command Type", "mbim.control.command_type",
10152 FT_UINT32, BASE_DEC, VALS(mbim_command_type_vals), 0,
10153 NULL, HFILL }
10155 { &hf_mbim_info_buffer_len,
10156 { "Information Buffer Length", "mbim.control.info_buffer_len",
10157 FT_UINT32, BASE_DEC, NULL, 0,
10158 NULL, HFILL }
10160 { &hf_mbim_info_buffer,
10161 { "Information Buffer", "mbim.control.info_buffer",
10162 FT_BYTES, BASE_NONE, NULL, 0,
10163 NULL, HFILL }
10165 { &hf_mbim_error_status_code,
10166 { "Error Status Code", "mbim.control.error_status_code",
10167 FT_UINT32, BASE_DEC, VALS(mbim_error_status_code_vals), 0,
10168 NULL, HFILL }
10170 { &hf_mbim_status,
10171 { "Status", "mbim.control.status",
10172 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mbim_status_code_vals_ext, 0,
10173 NULL, HFILL }
10175 { &hf_mbim_tlv_ie_type,
10176 { "Type", "mbim.control.tlv_ie.type",
10177 FT_UINT16, BASE_DEC, VALS(mbim_tlv_type_vals), 0,
10178 NULL, HFILL }
10180 { &hf_mbim_tlv_ie_reserved,
10181 { "Reserved", "mbim.control.tlv_ie.reserved",
10182 FT_UINT8, BASE_DEC, NULL, 0,
10183 NULL, HFILL }
10185 { &hf_mbim_tlv_ie_padding_length,
10186 { "Padding Length", "mbim.control.tlv_ie.padding_length",
10187 FT_UINT8, BASE_DEC, NULL, 0,
10188 NULL, HFILL }
10190 { &hf_mbim_tlv_ie_data_length,
10191 { "Data Length", "mbim.control.tlv_ie.data_length",
10192 FT_UINT32, BASE_DEC, NULL, 0,
10193 NULL, HFILL }
10195 { &hf_mbim_tlv_ie_unnamed_data,
10196 { "Data", "mbim.control.tlv_ie.unnamed_data",
10197 FT_BYTES, BASE_NONE, NULL, 0,
10198 NULL, HFILL }
10200 { &hf_mbim_tlv_ie_data_wchar_str,
10201 { "Data", "mbim.control.tlv_ie.wchar_str_data",
10202 FT_STRING, BASE_NONE, NULL, 0,
10203 NULL, HFILL }
10205 { &hf_mbim_tlv_ie_data_int32,
10206 { "Data", "mbim.control.tlv_ie.int32_data",
10207 FT_UINT32, BASE_DEC, NULL, 0,
10208 NULL, HFILL }
10210 { &hf_mbim_tlv_ie_data_guid,
10211 { "Data", "mbim.control.tlv_ie.guid_data",
10212 FT_GUID, BASE_NONE, NULL, 0,
10213 NULL, HFILL }
10215 { &hf_mbim_tlv_ie_padding,
10216 { "Padding", "mbim.control.tlv_ie.padding",
10217 FT_BYTES, BASE_NONE, NULL, 0,
10218 NULL, HFILL }
10220 { &hf_mbim_ms_ursp_tc_length,
10221 { "Length", "mbim.control.ursp.tc_length",
10222 FT_UINT16, BASE_DEC, NULL, 0,
10223 NULL, HFILL }
10225 { &hf_mbim_ms_ursp_precedence,
10226 { "Precedence", "mbim.control.ursp.precedence",
10227 FT_UINT8, BASE_DEC, NULL, 0,
10228 NULL, HFILL }
10230 { &hf_mbim_ms_ursp_tc_type,
10231 { "Type", "mbim.control.ursp.tc_type",
10232 FT_UINT8, BASE_DEC, VALS(ursp_tc_type_vals), 0,
10233 NULL, HFILL }
10235 { &hf_mbim_ms_ursp_tc_os_id,
10236 { "Os Id", "mbim.control.ursp.tc_os_id",
10237 FT_GUID, BASE_NONE, NULL, 0,
10238 NULL, HFILL }
10240 { &hf_mbim_ms_ursp_tc_dnn,
10241 { "DNN", "mbim.control.ursp.tc_dnn",
10242 FT_STRING, BASE_NONE, NULL, 0,
10243 NULL, HFILL }
10245 { &hf_mbim_ms_ursp_tc_fqdn,
10246 { "FQDN", "mbim.control.ursp.tc_fqdn",
10247 FT_STRING, BASE_NONE, NULL, 0,
10248 NULL, HFILL }
10250 { &hf_mbim_ms_ursp_tc_ipv4,
10251 { "IPv4 Address", "mbim.control.ursp.tc_ipv4",
10252 FT_IPv4, BASE_NONE, NULL, 0,
10253 NULL, HFILL }
10255 { &hf_mbim_ms_ursp_tc_ipv4_mask,
10256 { "IPv4 Mask", "mbim.control.ursp.tc_ipv4_mask",
10257 FT_IPv4, BASE_NONE, NULL, 0,
10258 NULL, HFILL }
10260 { &hf_mbim_ms_ursp_tc_ipv6,
10261 { "IPv6 Address", "mbim.control.ursp.tc_ipv6",
10262 FT_IPv6, BASE_NONE, NULL, 0,
10263 NULL, HFILL }
10265 { &hf_mbim_ms_ursp_tc_ipv6_prefix_length,
10266 { "IPv6 Prefix Length", "mbim.control.ursp.tc_ipv6_prefix_length",
10267 FT_UINT8, BASE_DEC, NULL, 0,
10268 NULL, HFILL }
10270 { &hf_mbim_ms_ursp_tc_proto_id,
10271 { "Protocol Identifier", "mbim.control.ursp.tc_proto_id",
10272 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0,
10273 NULL, HFILL }
10275 { &hf_mbim_ms_ursp_tc_port,
10276 { "Port", "mbim.control.ursp.tc_port",
10277 FT_UINT16, BASE_DEC, NULL, 0,
10278 NULL, HFILL }
10280 { &hf_mbim_ms_ursp_tc_port_range_low,
10281 { "Port Range Low", "mbim.control.ursp.tc_port_range_low",
10282 FT_UINT16, BASE_DEC, NULL, 0,
10283 NULL, HFILL }
10285 { &hf_mbim_ms_ursp_tc_port_range_high,
10286 { "Port Range high", "mbim.control.ursp.tc_port_range_high",
10287 FT_UINT16, BASE_DEC, NULL, 0,
10288 NULL, HFILL }
10290 { &hf_mbim_ms_ursp_tc_app_id,
10291 { "App Id", "mbim.control.ursp.tc_app_id",
10292 FT_STRING, BASE_NONE, NULL, 0,
10293 NULL, HFILL }
10295 { &hf_mbim_ms_ursp_tc_byte_value,
10296 { "Value", "mbim.control.ursp.tc_byte_value",
10297 FT_BYTES, BASE_NONE, NULL, 0,
10298 NULL, HFILL }
10300 { &hf_mbim_ms_ursp_tc_capability,
10301 { "Capability", "mbim.control.ursp.tc_capability",
10302 FT_UINT8, BASE_HEX, NULL, 0,
10303 NULL, HFILL }
10305 { &hf_mbim_ms_ursp_tc_connection_capability_flag_ims,
10306 { "IMS", "mbim.control.ursp.tc_capability_ims",
10307 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10308 NULL, HFILL }
10310 { &hf_mbim_ms_ursp_tc_connection_capability_flag_mms,
10311 { "MMS", "mbim.control.ursp.tc_capability_mms",
10312 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10313 NULL, HFILL }
10315 { &hf_mbim_ms_ursp_tc_connection_capability_flag_supl,
10316 { "SUPL", "mbim.control.ursp.tc_capability_supl",
10317 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10318 NULL, HFILL }
10320 { &hf_mbim_ms_ursp_tc_connection_capability_flag_internet,
10321 { "Internet", "mbim.control.ursp.tc_capability_internet",
10322 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10323 NULL, HFILL }
10325 { &hf_mbim_ms_snssai_length,
10326 { "Length", "mbim.control.snssai.length",
10327 FT_UINT8, BASE_DEC, NULL, 0,
10328 NULL, HFILL }
10330 { &hf_mbim_ms_snssai_slice_service_type,
10331 { "SST", "mbim.control.snssai.sst",
10332 FT_UINT8, BASE_DEC, NULL, 0,
10333 NULL, HFILL }
10335 { &hf_mbim_ms_snssai_slice_differentiator,
10336 { "SD", "mbim.control.snssai.sd",
10337 FT_UINT24, BASE_DEC, NULL, 0,
10338 NULL, HFILL }
10340 { &hf_mbim_ms_snssai_mapped_slice_service_type,
10341 { "Mapped SST", "mbim.control.snssai.mapped_sst",
10342 FT_UINT8, BASE_DEC, NULL, 0,
10343 NULL, HFILL }
10345 { &hf_mbim_ms_snssai_mapped_slice_differentiator,
10346 { "Mapped SD", "mbim.control.snssai.mapped_sd",
10347 FT_UINT24, BASE_DEC, NULL, 0,
10348 NULL, HFILL }
10350 { &hf_mbim_ms_rej_snssai_cause,
10351 { "Rejected Cause", "mbim.control.rej_snssai.cause",
10352 FT_UINT8, BASE_DEC, NULL, 0,
10353 NULL, HFILL }
10355 { &hf_mbim_ms_pre_dflt_nssai_info_access_type,
10356 { "Access Type", "mbim.control.pre_dflt_nssai_info.access_type",
10357 FT_UINT32, BASE_DEC, VALS(mbim_ms_pre_dflt_nssai_info_access_type_vals), 0,
10358 NULL, HFILL }
10360 { &hf_mbim_device_caps_info_device_type,
10361 { "Device Type", "mbim.control.device_caps_info.device_type",
10362 FT_UINT32, BASE_DEC, VALS(mbim_device_caps_info_device_type_vals), 0,
10363 NULL, HFILL }
10365 { &hf_mbim_device_caps_info_cellular_class,
10366 { "Cellular Class", "mbim.control.device_caps_info.cellular_class",
10367 FT_UINT32, BASE_HEX, NULL, 0,
10368 NULL, HFILL }
10370 { &hf_mbim_cellular_class_gsm,
10371 { "GSM", "mbim.control.cellular_class.gsm",
10372 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10373 NULL, HFILL }
10375 { &hf_mbim_cellular_class_cdma,
10376 { "CDMA", "mbim.control.cellular_class.cdma",
10377 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10378 NULL, HFILL }
10380 { &hf_mbim_device_caps_info_voice_class,
10381 { "Voice Class", "mbim.control.device_caps_info.voice_class",
10382 FT_UINT32, BASE_DEC, VALS(mbim_device_caps_info_voice_class_vals), 0,
10383 NULL, HFILL }
10385 { &hf_mbim_device_caps_info_sim_class,
10386 { "SIM Class", "mbim.control.device_caps_info.sim_class",
10387 FT_UINT32, BASE_HEX, NULL, 0,
10388 NULL, HFILL }
10390 { &hf_mbim_device_caps_info_sim_class_logical,
10391 { "Logical", "mbim.control.device_caps_info.sim_class.logical",
10392 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10393 NULL, HFILL }
10395 { &hf_mbim_device_caps_info_sim_class_removable,
10396 { "Removable", "mbim.control.device_caps_info.sim_class.removable",
10397 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10398 NULL, HFILL }
10400 { &hf_mbim_device_caps_info_data_class,
10401 { "Data Class", "mbim.control.device_caps_info.data_class",
10402 FT_UINT32, BASE_HEX, NULL, 0,
10403 NULL, HFILL }
10405 { &hf_mbim_data_class_gprs,
10406 { "GPRS", "mbim.control.data_class.gprs",
10407 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10408 NULL, HFILL }
10410 { &hf_mbim_data_class_edge,
10411 { "EDGE", "mbim.control.data_class.edge",
10412 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10413 NULL, HFILL }
10415 { &hf_mbim_data_class_umts,
10416 { "UMTS", "mbim.control.data_class.umts",
10417 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10418 NULL, HFILL }
10420 { &hf_mbim_data_class_hsdpa,
10421 { "HSDPA", "mbim.control.data_class.hsdpa",
10422 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10423 NULL, HFILL }
10425 { &hf_mbim_data_class_hsupa,
10426 { "HSUPA", "mbim.control.data_class.hsupa",
10427 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10428 NULL, HFILL }
10430 { &hf_mbim_data_class_lte,
10431 { "LTE", "mbim.control.data_class.lte",
10432 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020,
10433 NULL, HFILL }
10435 { &hf_mbim_data_class_5g,
10436 { "5G", "mbim.control.data_class.5g",
10437 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040,
10438 NULL, HFILL }
10440 { &hf_mbim_data_class_reserved_gsm,
10441 { "Reserved for future GSM classes", "mbim.control.data_class.reserved_gsm",
10442 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x0000ff80,
10443 NULL, HFILL }
10445 { &hf_mbim_data_class_1xrtt,
10446 { "1xRTT", "mbim.control.data_class.1xrtt",
10447 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00010000,
10448 NULL, HFILL }
10450 { &hf_mbim_data_class_1xevdo,
10451 { "1xEV-DO", "mbim.control.data_class.1xevdo",
10452 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00020000,
10453 NULL, HFILL }
10455 { &hf_mbim_data_class_1xevdoreva,
10456 { "1xEV-DO RevA", "mbim.control.data_class.1xevdoreva",
10457 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00040000,
10458 NULL, HFILL }
10460 { &hf_mbim_data_class_1xevdv,
10461 { "1xEVDV", "mbim.control.data_class.1xevdv",
10462 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00080000,
10463 NULL, HFILL }
10465 { &hf_mbim_data_class_3xrtt,
10466 { "3xRTT", "mbim.control.data_class.3xrtt",
10467 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00100000,
10468 NULL, HFILL }
10470 { &hf_mbim_data_class_1xevdorevb,
10471 { "1xEV-DO RevB", "mbim.control.data_class.1xevdorevb",
10472 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00200000,
10473 NULL, HFILL }
10475 { &hf_mbim_data_class_umb,
10476 { "UMB", "mbim.control.data_class.umb",
10477 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00400000,
10478 NULL, HFILL }
10480 { &hf_mbim_data_class_reserved_cdma,
10481 { "Reserved for future CDMA classes", "mbim.control.data_class.reserved_cdma",
10482 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x7f800000,
10483 NULL, HFILL }
10485 { &hf_mbim_data_class_custom,
10486 { "Custom", "mbim.control.data_class.custom",
10487 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x80000000,
10488 NULL, HFILL }
10490 { &hf_mbim_device_caps_info_sms_caps,
10491 { "SMS Caps", "mbim.control.device_caps_info.sms_caps",
10492 FT_UINT32, BASE_HEX, NULL, 0,
10493 NULL, HFILL }
10495 { &hf_mbim_device_caps_info_sms_caps_pdu_receive,
10496 { "PDU Receive", "mbim.control.device_caps_info.sms_caps.pdu_receive",
10497 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10498 NULL, HFILL }
10500 { &hf_mbim_device_caps_info_sms_caps_pdu_send,
10501 { "PDU Send", "mbim.control.device_caps_info.sms_caps.pdu_send",
10502 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10503 NULL, HFILL }
10505 { &hf_mbim_device_caps_info_sms_caps_text_receive,
10506 { "Text Receive", "mbim.control.device_caps_info.sms_caps.text_receive",
10507 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10508 NULL, HFILL }
10510 { &hf_mbim_device_caps_info_sms_caps_text_send,
10511 { "Text Send", "mbim.control.device_caps_info.sms_caps.text_send",
10512 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10513 NULL, HFILL }
10515 { &hf_mbim_device_caps_info_control_caps,
10516 { "Control Caps", "mbim.control.device_caps_info.control_caps",
10517 FT_UINT32, BASE_HEX, NULL, 0,
10518 NULL, HFILL }
10520 { &hf_mbim_device_caps_info_control_caps_reg_manual,
10521 { "Reg Manual", "mbim.control.device_caps_info.control_caps.reg_manual",
10522 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10523 NULL, HFILL }
10525 { &hf_mbim_device_caps_info_control_caps_hw_radio_switch,
10526 { "HW Radio Switch", "mbim.control.device_caps_info.control_caps.hw_radio_switch",
10527 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10528 NULL, HFILL }
10530 { &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip,
10531 { "CDMA Mobile IP", "mbim.control.device_caps_info.control_caps.cdma_mobile_ip",
10532 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10533 NULL, HFILL }
10535 { &hf_mbim_device_caps_info_control_caps_cdma_simple_ip,
10536 { "CDMA Simple IP", "mbim.control.device_caps_info.control_caps.cdma_simple_ip",
10537 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10538 NULL, HFILL }
10540 { &hf_mbim_device_caps_info_control_caps_multi_carrier,
10541 { "Multi Carrier", "mbim.control.device_caps_info.control_caps.multi_carrier",
10542 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10543 NULL, HFILL }
10545 { &hf_mbim_device_caps_info_control_caps_esim,
10546 { "ESIM", "mbim.control.device_caps_info.control_caps.esim",
10547 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020,
10548 NULL, HFILL }
10550 { &hf_mbim_device_caps_info_control_caps_ue_policy_route_selection,
10551 { "UE Policy Route Selection", "mbim.control.device_caps_info.control_caps.ue_policy_route_selection",
10552 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040,
10553 NULL, HFILL }
10555 { &hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable,
10556 { "Hot Swap Capable", "mbim.control.device_caps_info.control_caps.hot_swap_capable",
10557 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000080,
10558 NULL, HFILL }
10560 { &hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable,
10561 { "Use URSP Rule On EPC Capable", "mbim.control.device_caps_info.control_caps.use_ursp_rule_on_epc_capable",
10562 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000100,
10563 NULL, HFILL }
10565 { &hf_mbim_device_caps_info_max_sessions,
10566 { "Max Sessions", "mbim.control.device_caps_info.max_sessions",
10567 FT_UINT32, BASE_DEC, NULL, 0,
10568 NULL, HFILL }
10570 { &hf_mbim_device_caps_info_data_subclass,
10571 { "Data Subclass", "mbim.control.device_caps_info.data_subclass",
10572 FT_UINT64, BASE_HEX, NULL, 0,
10573 NULL, HFILL }
10575 { &hf_mbim_data_subclass_5gendc,
10576 { "5G EN-DC", "mbim.control.data_subclass.5gendc",
10577 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10578 NULL, HFILL }
10580 { &hf_mbim_data_subclass_5gnr,
10581 { "5G NR", "mbim.control.data_subclass.5gnr",
10582 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10583 NULL, HFILL }
10585 { &hf_mbim_data_subclass_5gnedc,
10586 { "5G NE-DC", "mbim.control.data_subclass.5gnedc",
10587 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10588 NULL, HFILL }
10590 { &hf_mbim_data_subclass_5gelte,
10591 { "5G eLTE", "mbim.control.data_subclass.5gelte",
10592 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10593 NULL, HFILL }
10595 { &hf_mbim_data_subclass_5gngendc,
10596 { "5G NG-EN-DC", "mbim.control.data_subclass.5gngendc",
10597 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10598 NULL, HFILL }
10600 { &hf_mbim_device_caps_info_wcdma_band_class,
10601 { "WCDMA Band Class", "mbim.control.device_caps_info.wcdma_band_class",
10602 FT_UINT32, BASE_DEC, NULL, 0,
10603 NULL, HFILL }
10605 { &hf_mbim_device_caps_info_custom_data_class_offset,
10606 { "Custom Data Class Offset", "mbim.control.device_caps_info.custom_data_class.offset",
10607 FT_UINT32, BASE_DEC, NULL, 0,
10608 NULL, HFILL }
10610 { &hf_mbim_device_caps_info_custom_data_class_size,
10611 { "Custom Data Class Size", "mbim.control.device_caps_info.custom_data_class.size",
10612 FT_UINT32, BASE_DEC, NULL, 0,
10613 NULL, HFILL }
10615 { &hf_mbim_device_caps_info_device_id_offset,
10616 { "Device Id Offset", "mbim.control.device_caps_info.device_id.offset",
10617 FT_UINT32, BASE_DEC, NULL, 0,
10618 NULL, HFILL }
10620 { &hf_mbim_device_caps_info_device_id_size,
10621 { "Device Id Size", "mbim.control.device_caps_info.device_id.size",
10622 FT_UINT32, BASE_DEC, NULL, 0,
10623 NULL, HFILL }
10625 { &hf_mbim_device_caps_info_fw_info_offset,
10626 { "FW Info Offset", "mbim.control.device_caps_info.fw_info.offset",
10627 FT_UINT32, BASE_DEC, NULL, 0,
10628 NULL, HFILL }
10630 { &hf_mbim_device_caps_info_fw_info_size,
10631 { "FW Info Size", "mbim.control.device_caps_info.fw_info.size",
10632 FT_UINT32, BASE_DEC, NULL, 0,
10633 NULL, HFILL }
10635 { &hf_mbim_device_caps_info_hw_info_offset,
10636 { "HW Info Offset", "mbim.control.device_caps_info.hw_info.offset",
10637 FT_UINT32, BASE_DEC, NULL, 0,
10638 NULL, HFILL }
10640 { &hf_mbim_device_caps_info_hw_info_size,
10641 { "HW Info Size", "mbim.control.device_caps_info.hw_info.size",
10642 FT_UINT32, BASE_DEC, NULL, 0,
10643 NULL, HFILL }
10645 { &hf_mbim_device_caps_info_custom_data_class,
10646 { "Custom Data Class", "mbim.control.device_caps_info.custom_data_class",
10647 FT_STRING, BASE_NONE, NULL, 0,
10648 NULL, HFILL }
10650 { &hf_mbim_device_caps_info_device_id,
10651 { "Device Id", "mbim.control.device_caps_info.device_id",
10652 FT_STRING, BASE_NONE, NULL, 0,
10653 NULL, HFILL }
10655 { &hf_mbim_device_caps_info_fw_info,
10656 { "FW Info", "mbim.control.device_caps_info.fw_info",
10657 FT_STRING, BASE_NONE, NULL, 0,
10658 NULL, HFILL }
10660 { &hf_mbim_device_caps_info_hw_info,
10661 { "HW Info", "mbim.control.device_caps_info.hw_info",
10662 FT_STRING, BASE_NONE, NULL, 0,
10663 NULL, HFILL }
10665 { &hf_mbim_device_caps_info_v2_executor_index,
10666 { "Executor Index", "mbim.control.device_caps_info.executor_index",
10667 FT_UINT32, BASE_DEC, NULL, 0,
10668 NULL, HFILL }
10670 { &hf_mbim_subscr_ready_status_ready_state,
10671 { "Ready State", "mbim.control.subscriber_ready_status.ready_state",
10672 FT_UINT32, BASE_DEC, VALS(mbim_subscr_ready_status_ready_state_vals), 0,
10673 NULL, HFILL }
10675 { &hf_mbim_subscr_ready_status_flags,
10676 { "Flags", "mbim.control.subscriber_ready_status.flags",
10677 FT_UINT32, BASE_HEX, NULL, 0,
10678 NULL, HFILL }
10680 { &hf_mbim_subscr_ready_status_flag_esim,
10681 { "ESIM", "mbim.control.subscriber_ready_status.flags.esim",
10682 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10683 NULL, HFILL }
10685 { &hf_mbim_subscr_ready_status_flag_sim_removability_known,
10686 { "SIM Removability Known", "mbim.control.subscriber_ready_status.flags.sim_removability_known",
10687 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10688 NULL, HFILL }
10690 { &hf_mbim_subscr_ready_status_flag_sim_removable,
10691 { "SIM Removable", "mbim.control.subscriber_ready_status.flags.sim_removable",
10692 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10693 NULL, HFILL }
10695 { &hf_mbim_subscr_ready_status_flag_sim_slot_active,
10696 { "SIM Slot Active", "mbim.control.subscriber_ready_status.flags.sim_slot_active",
10697 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10698 NULL, HFILL }
10700 { &hf_mbim_subscr_ready_status_susbcr_id_offset,
10701 { "Subscriber Id Offset", "mbim.control.subscriber_ready_status.subscriber_id.offset",
10702 FT_UINT32, BASE_DEC, NULL, 0,
10703 NULL, HFILL }
10705 { &hf_mbim_subscr_ready_status_susbcr_id_size,
10706 { "Subscriber Id Size", "mbim.control.subscriber_ready_status.subscriber_id.size",
10707 FT_UINT32, BASE_DEC, NULL, 0,
10708 NULL, HFILL }
10710 { &hf_mbim_subscr_ready_status_sim_icc_id_offset,
10711 { "SIM ICC Id Offset", "mbim.control.subscriber_ready_status.sim_icc_id.offset",
10712 FT_UINT32, BASE_DEC, NULL, 0,
10713 NULL, HFILL }
10715 { &hf_mbim_subscr_ready_status_sim_icc_id_size,
10716 { "SIM ICC Id Size", "mbim.control.subscriber_ready_status.sim_icc_id.size",
10717 FT_UINT32, BASE_DEC, NULL, 0,
10718 NULL, HFILL }
10720 { &hf_mbim_subscr_ready_status_ready_info,
10721 { "Ready Info", "mbim.control.subscriber_ready_status.ready_info",
10722 FT_UINT32, BASE_DEC, VALS(mbim_subscr_ready_status_ready_info_vals), 0,
10723 NULL, HFILL }
10725 { &hf_mbim_subscr_ready_status_elem_count,
10726 { "Element Count", "mbim.control.subscriber_ready_status.element_count",
10727 FT_UINT32, BASE_DEC, NULL, 0,
10728 NULL, HFILL }
10730 { &hf_mbim_subscr_ready_status_tel_nb_offset,
10731 { "Telephone Number Offset", "mbim.control.subscriber_ready_status.tel_nb.offset",
10732 FT_UINT32, BASE_DEC, NULL, 0,
10733 NULL, HFILL }
10735 { &hf_mbim_subscr_ready_status_tel_nb_size,
10736 { "Telephone Number Size", "mbim.control.subscriber_ready_status.tel_nb.size",
10737 FT_UINT32, BASE_DEC, NULL, 0,
10738 NULL, HFILL }
10740 { &hf_mbim_subscr_ready_status_susbcr_id,
10741 { "Subscriber Id", "mbim.control.device_caps_info.subscriber_ready_status.subscriber_id",
10742 FT_STRING, BASE_NONE, NULL, 0,
10743 NULL, HFILL }
10745 { &hf_mbim_subscr_ready_status_sim_icc_id,
10746 { "SIM ICC Id", "mbim.control.device_caps_info.subscriber_ready_status.sim_icc_id",
10747 FT_STRING, BASE_NONE, NULL, 0,
10748 NULL, HFILL }
10750 { &hf_mbim_subscr_ready_status_tel_nb,
10751 { "Telephone Number", "mbim.control.device_caps_info.subscriber_ready_status.tel_nb",
10752 FT_STRING, BASE_NONE, NULL, 0,
10753 NULL, HFILL }
10755 { &hf_mbim_radio_state_set,
10756 { "Radio Set", "mbim.control.radio_state.set",
10757 FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10758 NULL, HFILL }
10760 { &hf_mbim_radio_state_hw_radio_state,
10761 { "HW Radio State", "mbim.control.radio_state.hw_radio_state",
10762 FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10763 NULL, HFILL }
10765 { &hf_mbim_radio_state_sw_radio_state,
10766 { "SW Radio State", "mbim.control.radio_state.sw_radio_stat",
10767 FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10768 NULL, HFILL }
10770 { &hf_mbim_set_pin_pin_type,
10771 { "PIN Type", "mbim.control.set_pin.pin_type",
10772 FT_UINT32, BASE_DEC, VALS(mbim_pin_type_vals), 0,
10773 NULL, HFILL }
10775 { &hf_mbim_set_pin_pin_pin_operation,
10776 { "PIN Operation", "mbim.control.set_pin.pin_operation",
10777 FT_UINT32, BASE_DEC, VALS(mbim_pin_operation_vals), 0,
10778 NULL, HFILL }
10780 { &hf_mbim_set_pin_pin_pin_offset,
10781 { "PIN Offset", "mbim.control.set_pin.pin.offset",
10782 FT_UINT32, BASE_DEC, NULL, 0,
10783 NULL, HFILL }
10785 { &hf_mbim_set_pin_pin_pin_size,
10786 { "PIN Size", "mbim.control.set_pin.pin.size",
10787 FT_UINT32, BASE_DEC, NULL, 0,
10788 NULL, HFILL }
10790 { &hf_mbim_set_pin_new_pin_offset,
10791 { "New PIN Offset", "mbim.control.set_pin.new_pin.offset",
10792 FT_UINT32, BASE_DEC, NULL, 0,
10793 NULL, HFILL }
10795 { &hf_mbim_set_pin_new_pin_size,
10796 { "New PIN Size", "mbim.control.set_pin.new_pin.size",
10797 FT_UINT32, BASE_DEC, NULL, 0,
10798 NULL, HFILL }
10800 { &hf_mbim_set_pin_pin,
10801 { "PIN", "mbim.control.set_pin.pin",
10802 FT_STRING, BASE_NONE, NULL, 0,
10803 NULL, HFILL }
10805 { &hf_mbim_set_pin_new_pin,
10806 { "New PIN", "mbim.control.set_pin.new_pin",
10807 FT_STRING, BASE_NONE, NULL, 0,
10808 NULL, HFILL }
10810 { &hf_mbim_pin_info_pin_type,
10811 { "PIN Type", "mbim.control.pin_info.pin_type",
10812 FT_UINT32, BASE_DEC, VALS(mbim_pin_type_vals), 0,
10813 NULL, HFILL }
10815 { &hf_mbim_pin_info_pin_state,
10816 { "PIN State", "mbim.control.pin_info.pin_state",
10817 FT_UINT32, BASE_DEC, VALS(mbim_pin_state_vals), 0,
10818 NULL, HFILL }
10820 { &hf_mbim_pin_info_remaining_attempts,
10821 { "Remaining Attempts", "mbim.control.pin_info.remaining_attempts",
10822 FT_UINT32, BASE_DEC, NULL, 0,
10823 NULL, HFILL }
10825 { &hf_mbim_pin_list_pin_mode,
10826 { "PIN Mode", "mbim.control.pin_list.pin_mode",
10827 FT_UINT32, BASE_DEC, VALS(mbim_pin_mode_vals), 0,
10828 NULL, HFILL }
10830 { &hf_mbim_pin_list_pin_format,
10831 { "PIN Format", "mbim.control.pin_list.pin_format",
10832 FT_UINT32, BASE_DEC, VALS(mbim_pin_format_vals), 0,
10833 NULL, HFILL }
10835 { &hf_mbim_pin_list_pin_length_min,
10836 { "PIN Length Min", "mbim.control.pin_list.pin_length_min",
10837 FT_UINT32, BASE_DEC, NULL, 0,
10838 NULL, HFILL }
10840 { &hf_mbim_pin_list_pin_length_max,
10841 { "PIN Length Max", "mbim.control.pin_list.pin_length_max",
10842 FT_UINT32, BASE_DEC, NULL, 0,
10843 NULL, HFILL }
10845 { &hf_mbim_provider_state,
10846 { "Provider State", "mbim.control.provider_state",
10847 FT_UINT32, BASE_HEX, NULL, 0,
10848 NULL, HFILL }
10850 { &hf_mbim_provider_state_home,
10851 { "Home", "mbim.control.provider_state.home",
10852 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10853 NULL, HFILL }
10855 { &hf_mbim_provider_state_forbidden,
10856 { "Forbidden", "mbim.control.provider_state.forbidden",
10857 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10858 NULL, HFILL }
10860 { &hf_mbim_provider_state_preferred,
10861 { "Preferred", "mbim.control.provider_state.preferred",
10862 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10863 NULL, HFILL }
10865 { &hf_mbim_provider_state_visible,
10866 { "Visible", "mbim.control.provider_state.visible",
10867 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10868 NULL, HFILL }
10870 { &hf_mbim_provider_state_registered,
10871 { "Registered", "mbim.control.provider_state.registered",
10872 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000010,
10873 NULL, HFILL }
10875 { &hf_mbim_provider_state_preferred_multicarrier,
10876 { "Preferred Multicarrier", "mbim.control.provider_state.preferred_multicarrier",
10877 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000020,
10878 NULL, HFILL }
10880 { &hf_mbim_provider_provider_id_offset,
10881 { "Provider Id Offset", "mbim.control.provider.provider_id_offset",
10882 FT_UINT32, BASE_DEC, NULL, 0,
10883 NULL, HFILL }
10885 { &hf_mbim_provider_provider_id_size,
10886 { "Provider Id Size", "mbim.control.provider.provider_id_size",
10887 FT_UINT32, BASE_DEC, NULL, 0,
10888 NULL, HFILL }
10890 { &hf_mbim_provider_provider_name_offset,
10891 { "Provider Name Offset", "mbim.control.provider.provider_name_offset",
10892 FT_UINT32, BASE_DEC, NULL, 0,
10893 NULL, HFILL }
10895 { &hf_mbim_provider_provider_name_size,
10896 { "Provider Name Size", "mbim.control.provider.provider_name_size",
10897 FT_UINT32, BASE_DEC, NULL, 0,
10898 NULL, HFILL }
10900 { &hf_mbim_provider_cellular_class,
10901 { "Cellular Class", "mbim.control.provider.cellular_class",
10902 FT_UINT32, BASE_DEC, VALS(mbim_cellular_class_vals), 0,
10903 NULL, HFILL }
10905 { &hf_mbim_provider_rssi,
10906 { "RSSI", "mbim.control.provider.rssi",
10907 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
10908 NULL, HFILL }
10910 { &hf_mbim_provider_error_rate,
10911 { "Error Rate", "mbim.control.provider.error_rate",
10912 FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
10913 NULL, HFILL }
10915 { &hf_mbim_provider_provider_id,
10916 { "Provider Id", "mbim.control.provider.provider_id",
10917 FT_STRING, BASE_NONE, NULL, 0,
10918 NULL, HFILL }
10920 { &hf_mbim_provider_provider_name,
10921 { "Provider Name", "mbim.control.provider.provider_name",
10922 FT_STRING, BASE_NONE, NULL, 0,
10923 NULL, HFILL }
10925 { &hf_mbim_providers_elem_count,
10926 { "Element Count", "mbim.control.providers.elem_count",
10927 FT_UINT32, BASE_DEC, NULL, 0,
10928 NULL, HFILL }
10930 { &hf_mbim_providers_provider_offset,
10931 { "Provider Offset", "mbim.control.providers.provider_offset",
10932 FT_UINT32, BASE_DEC, NULL, 0,
10933 NULL, HFILL }
10935 { &hf_mbim_providers_provider_size,
10936 { "Provider Size", "mbim.control.providers.provider_size",
10937 FT_UINT32, BASE_DEC, NULL, 0,
10938 NULL, HFILL }
10940 { &hf_mbim_visible_providers_req_action,
10941 { "Action", "mbim.control.visible_providers_req.action",
10942 FT_UINT32, BASE_DEC, VALS(mbim_visible_providers_action_vals), 0,
10943 NULL, HFILL }
10945 { &hf_mbim_set_register_state_provider_id_offset,
10946 { "Provider Id Offset", "mbim.control.set_register_state.provider_id.offset",
10947 FT_UINT32, BASE_DEC, NULL, 0,
10948 NULL, HFILL }
10950 { &hf_mbim_set_register_state_provider_id_size,
10951 { "Provider Id Size", "mbim.control.set_register_state.provider_id.size",
10952 FT_UINT32, BASE_DEC, NULL, 0,
10953 NULL, HFILL }
10955 { &hf_mbim_set_register_state_register_action,
10956 { "Register Action", "mbim.control.set_register_state.register_action",
10957 FT_UINT32, BASE_DEC, VALS(mbim_register_action_vals), 0,
10958 NULL, HFILL }
10960 { &hf_mbim_register_state_data_class,
10961 { "Data Class", "mbim.control.set_register_state.data_class",
10962 FT_UINT32, BASE_HEX, NULL, 0,
10963 NULL, HFILL }
10965 { &hf_mbim_set_register_state_provider_id,
10966 { "Provider Id", "mbim.control.set_register_state.provider_id",
10967 FT_STRING, BASE_NONE, NULL, 0,
10968 NULL, HFILL }
10970 { &hf_mbim_registration_state_info_nw_error,
10971 { "Network Error", "mbim.control.registration_state_info.nw_error",
10972 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
10973 NULL, HFILL }
10975 { &hf_mbim_registration_state_info_register_state,
10976 { "Register State", "mbim.control.registration_state_info.register_state",
10977 FT_UINT32, BASE_DEC, VALS(mbim_register_state_vals), 0,
10978 NULL, HFILL }
10980 { &hf_mbim_registration_state_info_register_mode,
10981 { "Register Mode", "mbim.control.registration_state_info.register_mode",
10982 FT_UINT32, BASE_DEC, VALS(mbim_register_mode_vals), 0,
10983 NULL, HFILL }
10985 { &hf_mbim_registration_state_info_available_data_classes,
10986 { "Available Data Classes", "mbim.control.registration_state_info.available_data_classes",
10987 FT_UINT32, BASE_HEX, NULL, 0,
10988 NULL, HFILL }
10990 { &hf_mbim_registration_state_info_current_cellular_class,
10991 { "Current Cellular Class", "mbim.control.registration_state_info.current_cellular_class",
10992 FT_UINT32, BASE_DEC, VALS(mbim_cellular_class_vals), 0,
10993 NULL, HFILL }
10995 { &hf_mbim_registration_state_info_provider_id_offset,
10996 { "Provider Id Offset", "mbim.control.registration_state_info.provider_id.offset",
10997 FT_UINT32, BASE_DEC, NULL, 0,
10998 NULL, HFILL }
11000 { &hf_mbim_registration_state_info_provider_id_size,
11001 { "Provider Id Size", "mbim.control.registration_state_info.provider_id.size",
11002 FT_UINT32, BASE_DEC, NULL, 0,
11003 NULL, HFILL }
11005 { &hf_mbim_registration_state_info_provider_name_offset,
11006 { "Provider Name Offset", "mbim.control.registration_state_info.provider_name.offset",
11007 FT_UINT32, BASE_DEC, NULL, 0,
11008 NULL, HFILL }
11010 { &hf_mbim_registration_state_info_provider_name_size,
11011 { "Provider Name Size", "mbim.control.registration_state_info.provider_name.size",
11012 FT_UINT32, BASE_DEC, NULL, 0,
11013 NULL, HFILL }
11015 { &hf_mbim_registration_state_info_roaming_text_offset,
11016 { "Roaming Text Offset", "mbim.control.registration_state_info.roaming_text.offset",
11017 FT_UINT32, BASE_DEC, NULL, 0,
11018 NULL, HFILL }
11020 { &hf_mbim_registration_state_info_roaming_text_size,
11021 { "Roaming Text Size", "mbim.control.registration_state_info.roaming_text.size",
11022 FT_UINT32, BASE_DEC, NULL, 0,
11023 NULL, HFILL }
11025 { &hf_mbim_registration_state_info_registration_flags,
11026 { "Registration Flags", "mbim.control.registration_state_info.registration_flags",
11027 FT_UINT32, BASE_HEX, NULL, 0,
11028 NULL, HFILL }
11030 { &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available,
11031 { "Manual Selection Not Available", "mbim.control.registration_state_info.registration_flags.manual_selection_not_available",
11032 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
11033 NULL, HFILL }
11035 { &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach,
11036 { "Packet Service Auto Attach", "mbim.control.registration_state_info.registration_flags.packet_service_auto_attach",
11037 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
11038 NULL, HFILL }
11040 { &hf_mbim_registration_state_info_preferred_data_class,
11041 { "Preferred Data Class", "mbim.control.registration_state_info.preferred_data_class",
11042 FT_UINT32, BASE_DEC, NULL, 0,
11043 NULL, HFILL }
11045 { &hf_mbim_registration_state_info_provider_id,
11046 { "Provider Id", "mbim.control.registration_state_info.provider_id",
11047 FT_STRING, BASE_NONE, NULL, 0,
11048 NULL, HFILL }
11050 { &hf_mbim_registration_state_info_provider_name,
11051 { "Provider Name", "mbim.control.registration_state_info.provider_name",
11052 FT_STRING, BASE_NONE, NULL, 0,
11053 NULL, HFILL }
11055 { &hf_mbim_registration_state_info_roaming_text,
11056 { "Roaming Text", "mbim.control.registration_state_info.roaming_text",
11057 FT_STRING, BASE_NONE, NULL, 0,
11058 NULL, HFILL }
11060 { &hf_mbim_set_packet_service_action,
11061 { "Action", "mbim.control.set_packet_service.action",
11062 FT_UINT32, BASE_DEC, VALS(mbim_packet_service_action_vals), 0,
11063 NULL, HFILL }
11065 { &hf_mbim_ms_plmn_mcc,
11066 { "Mobile Country Code", "mbim.control.ms_plmn.mcc",
11067 FT_UINT16, BASE_DEC, NULL, 0,
11068 NULL, HFILL }
11070 { &hf_mbim_ms_plmn_mnc,
11071 { "Mobile Network Code", "mbim.control.ms_plmn.mnc",
11072 FT_UINT16, BASE_DEC, NULL, 0,
11073 NULL, HFILL }
11075 { &hf_mbim_ms_tai_tac,
11076 { "Tracking Area Code", "mbim.control.ms_tai.tac",
11077 FT_UINT32, BASE_DEC, NULL, 0,
11078 NULL, HFILL }
11080 { &hf_mbim_ms_tai_list_type,
11081 { "TAI List Type", "mbim.control.ms_tai.list_type",
11082 FT_UINT8, BASE_DEC, VALS(mbim_tai_list_type_vals), 0,
11083 NULL, HFILL }
11085 { &hf_mbim_ms_tai_list_single_plmn_tac_element,
11086 { "TAC Element", "mbim.control.ms_tai.tac_element",
11087 FT_UINT8, BASE_DEC, NULL, 0,
11088 NULL, HFILL }
11090 { &hf_mbim_ms_tai_list_multi_plmn_tai_element,
11091 { "TAI Element", "mbim.control.ms_tai.tai_element",
11092 FT_UINT8, BASE_DEC, NULL, 0,
11093 NULL, HFILL }
11095 { &hf_mbim_packet_service_info_nw_error,
11096 { "Network Error", "mbim.control.packet_service_info.nw_error",
11097 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11098 NULL, HFILL }
11100 { &hf_mbim_packet_service_info_packet_service_state,
11101 { "Packet Service State", "mbim.control.packet_service_info.packet_service_state",
11102 FT_UINT32, BASE_DEC, VALS(mbim_packet_service_state_vals), 0,
11103 NULL, HFILL }
11105 { &hf_mbim_packet_service_info_highest_available_data_class,
11106 { "Highest Available Data Class", "mbim.control.packet_service_info.highest_available_data_class",
11107 FT_UINT32, BASE_HEX, NULL, 0,
11108 NULL, HFILL }
11110 { &hf_mbim_packet_service_info_current_data_class,
11111 { "Current Data Class", "mbim.control.packet_service_info.current_data_class",
11112 FT_UINT32, BASE_HEX, NULL, 0,
11113 NULL, HFILL }
11115 { &hf_mbim_packet_service_info_uplink_speed,
11116 { "Uplink Speed", "mbim.control.packet_service_info.uplink_speed",
11117 FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_bit_sec), 0,
11118 NULL, HFILL }
11120 { &hf_mbim_packet_service_info_downlink_speed,
11121 { "Downlink Speed", "mbim.control.packet_service_info.downlink_speed",
11122 FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_bit_sec), 0,
11123 NULL, HFILL }
11125 { &hf_mbim_packet_service_info_frequency_range,
11126 { "Frequency Range", "mbim.control.packet_service_info.frequency_range",
11127 FT_UINT32, BASE_DEC, VALS(mbim_packet_service_info_frequency_range_vals), 0,
11128 NULL, HFILL }
11130 { &hf_mbim_packet_service_info_data_subclass,
11131 { "Data Subclass", "mbim.control.packet_service_info.data_subclass",
11132 FT_UINT32, BASE_HEX, NULL, 0,
11133 NULL, HFILL }
11135 { &hf_mbim_set_signal_state_signal_strength_interval,
11136 { "Signal Strength Interval", "mbim.control.set_signal_state.signal_strength_interval",
11137 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
11138 NULL, HFILL }
11140 { &hf_mbim_set_signal_state_rssi_threshold,
11141 { "RSSI Threshold", "mbim.control.set_signal_state.rssi_threshold",
11142 FT_UINT32, BASE_DEC, NULL, 0,
11143 NULL, HFILL }
11145 { &hf_mbim_set_signal_state_error_rate_threshold,
11146 { "Error Rate Threshold", "mbim.control.set_signal_state.error_rate_threshold",
11147 FT_UINT32, BASE_DEC, NULL, 0,
11148 NULL, HFILL }
11150 { &hf_mbim_signal_state_element_rsrp,
11151 { "RSRP", "mbim.control.signal_state_element.rsrp",
11152 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrp_signal_state_fmt), 0,
11153 NULL, HFILL }
11155 { &hf_mbim_signal_state_element_snr,
11156 { "SNR", "mbim.control.signal_state_element.snr",
11157 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_snr_signal_state_fmt), 0,
11158 NULL, HFILL }
11160 { &hf_mbim_signal_state_element_rsrp_threshold,
11161 { "RSRP Threshold", "mbim.control.signal_state_element.rsrp_threshold",
11162 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
11163 NULL, HFILL }
11165 { &hf_mbim_signal_state_element_snr_threshold,
11166 { "SNR Threshold", "mbim.control.signal_state_element.snr_threshold",
11167 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0,
11168 NULL, HFILL }
11170 { &hf_mbim_signal_state_element_system_type,
11171 { "System Type", "mbim.control.signal_state_element.system_type",
11172 FT_UINT32, BASE_HEX, NULL, 0,
11173 NULL, HFILL }
11175 { &hf_mbim_signal_state_info_rssi,
11176 { "RSSI", "mbim.control.signal_state_info.rssi",
11177 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
11178 NULL, HFILL }
11180 { &hf_mbim_signal_state_info_error_rate,
11181 { "Error Rate", "mbim.control.signal_state_info.error_rate",
11182 FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
11183 NULL, HFILL }
11185 { &hf_mbim_signal_state_info_signal_strength_interval,
11186 { "Signal Strength Interval", "mbim.control.signal_state_info.signal_strength_interval",
11187 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
11188 NULL, HFILL }
11190 { &hf_mbim_signal_state_info_rssi_threshold,
11191 { "RSSI Threshold", "mbim.control.signal_state_info.rssi_threshold",
11192 FT_UINT32, BASE_DEC, NULL, 0,
11193 NULL, HFILL }
11195 { &hf_mbim_signal_state_info_error_rate_threshold,
11196 { "Error Rate Threshold", "mbim.control.signal_state_info.error_rate_threshold",
11197 FT_UINT32, BASE_DEC, NULL, 0,
11198 NULL, HFILL }
11200 { &hf_mbim_signal_state_info_rsrp_snr_offset,
11201 { "Rsrp Snr Offset", "mbim.control.signal_state_info.rsrp_snr_offset",
11202 FT_UINT32, BASE_DEC, NULL, 0,
11203 NULL, HFILL }
11205 { &hf_mbim_signal_state_info_rsrp_snr_size,
11206 { "Rsrp Snr Size", "mbim.control.signal_state_info.rsrp_snr_size",
11207 FT_UINT32, BASE_DEC, NULL, 0,
11208 NULL, HFILL }
11210 { &hf_mbim_signal_state_info_elem_count,
11211 { "Element Count", "mbim.control.signal_state_info.elem_count",
11212 FT_UINT32, BASE_DEC, NULL, 0,
11213 NULL, HFILL }
11215 { &hf_mbim_context_type,
11216 { "Context Type", "mbim.control.context_type",
11217 FT_GUID, BASE_NONE, NULL, 0,
11218 NULL, HFILL }
11220 { &hf_mbim_set_connect_session_id,
11221 { "Session Id", "mbim.control.set_connect.session_id",
11222 FT_UINT32, BASE_DEC, NULL, 0,
11223 NULL, HFILL }
11225 { &hf_mbim_set_connect_activation_command,
11226 { "Activation Command", "mbim.control.set_connect.activation_command",
11227 FT_UINT32, BASE_DEC, VALS(mbim_activation_command_vals), 0,
11228 NULL, HFILL }
11230 { &hf_mbim_set_connect_activation_option,
11231 { "Activation Option", "mbim.control.set_connect.activation_option",
11232 FT_UINT32, BASE_DEC, VALS(mbim_activation_option_vals), 0,
11233 NULL, HFILL }
11235 { &hf_mbim_set_connect_access_string_offset,
11236 { "Access String Offset", "mbim.control.set_connect.access_string_offset",
11237 FT_UINT32, BASE_DEC, NULL, 0,
11238 NULL, HFILL }
11240 { &hf_mbim_set_connect_access_string_size,
11241 { "Access String Size", "mbim.control.set_connect.access_string_size",
11242 FT_UINT32, BASE_DEC, NULL, 0,
11243 NULL, HFILL }
11245 { &hf_mbim_set_connect_user_name_offset,
11246 { "User Name Offset", "mbim.control.set_connect.user_name_offset",
11247 FT_UINT32, BASE_DEC, NULL, 0,
11248 NULL, HFILL }
11250 { &hf_mbim_set_connect_user_name_size,
11251 { "User Name Size", "mbim.control.set_connect.user_name_size",
11252 FT_UINT32, BASE_DEC, NULL, 0,
11253 NULL, HFILL }
11255 { &hf_mbim_set_connect_password_offset,
11256 { "Password Offset", "mbim.control.set_connect.password_offset",
11257 FT_UINT32, BASE_DEC, NULL, 0,
11258 NULL, HFILL }
11260 { &hf_mbim_set_connect_password_size,
11261 { "Password Size", "mbim.control.set_connect.password_size",
11262 FT_UINT32, BASE_DEC, NULL, 0,
11263 NULL, HFILL }
11265 { &hf_mbim_set_connect_compression,
11266 { "Compression", "mbim.control.set_connect.compression",
11267 FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
11268 NULL, HFILL }
11270 { &hf_mbim_set_connect_auth_protocol,
11271 { "Authentication Protocol", "mbim.control.set_connect.auth_protocol",
11272 FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
11273 NULL, HFILL }
11275 { &hf_mbim_set_connect_ip_type,
11276 { "IP Type", "mbim.control.set_connect.ip_type",
11277 FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
11278 NULL, HFILL }
11280 { &hf_mbim_set_connect_access_string,
11281 { "Access String", "mbim.control.set_connect.access_string",
11282 FT_STRING, BASE_NONE, NULL, 0,
11283 NULL, HFILL }
11285 { &hf_mbim_set_connect_user_name,
11286 { "User Name", "mbim.control.set_connect.user_name",
11287 FT_STRING, BASE_NONE, NULL, 0,
11288 NULL, HFILL }
11290 { &hf_mbim_set_connect_password,
11291 { "Password", "mbim.control.set_connect.password",
11292 FT_STRING, BASE_NONE, NULL, 0,
11293 NULL, HFILL }
11295 { &hf_mbim_set_connect_media_preference,
11296 { "Media Preference", "mbim.control.set_connect.media_preference",
11297 FT_UINT32, BASE_DEC, NULL, 0,
11298 NULL, HFILL }
11300 { &hf_mbim_connect_info_session_id,
11301 { "Session Id", "mbim.control.connect_info.session_id",
11302 FT_UINT32, BASE_DEC, NULL, 0,
11303 NULL, HFILL }
11305 { &hf_mbim_connect_info_activation_state,
11306 { "Activation State", "mbim.control.connect_info.activation_state",
11307 FT_UINT32, BASE_DEC, VALS(mbim_activation_state_vals), 0,
11308 NULL, HFILL }
11310 { &hf_mbim_connect_info_voice_call_state,
11311 { "Voice Call State", "mbim.control.connect_info.voice_call_state",
11312 FT_UINT32, BASE_DEC, VALS(mbim_voice_call_state_vals), 0,
11313 NULL, HFILL }
11315 { &hf_mbim_connect_info_ip_type,
11316 { "IP Type", "mbim.control.connect_info.ip_type",
11317 FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
11318 NULL, HFILL }
11320 { &hf_mbim_connect_info_nw_error,
11321 { "Network Error", "mbim.control.connect_info.nw_error",
11322 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11323 NULL, HFILL }
11325 { &hf_mbim_connect_info_access_media,
11326 { "Access Media", "mbim.control.connect_info.access_media",
11327 FT_UINT32, BASE_DEC, NULL, 0,
11328 NULL, HFILL }
11330 { &hf_mbim_context_context_id,
11331 { "Context Id", "mbim.control.context.context_id",
11332 FT_UINT32, BASE_DEC, NULL, 0,
11333 NULL, HFILL }
11335 { &hf_mbim_context_access_string_offset,
11336 { "Access String Offset", "mbim.control.context.access_string_offset",
11337 FT_UINT32, BASE_DEC, NULL, 0,
11338 NULL, HFILL }
11340 { &hf_mbim_context_access_string_size,
11341 { "Access String Size", "mbim.control.context.access_string_size",
11342 FT_UINT32, BASE_DEC, NULL, 0,
11343 NULL, HFILL }
11345 { &hf_mbim_context_user_name_offset,
11346 { "User Name Offset", "mbim.control.context.user_name_offset",
11347 FT_UINT32, BASE_DEC, NULL, 0,
11348 NULL, HFILL }
11350 { &hf_mbim_context_user_name_size,
11351 { "User Name Size", "mbim.control.context.user_name_size",
11352 FT_UINT32, BASE_DEC, NULL, 0,
11353 NULL, HFILL }
11355 { &hf_mbim_context_password_offset,
11356 { "Password Offset", "mbim.control.context.password_offset",
11357 FT_UINT32, BASE_DEC, NULL, 0,
11358 NULL, HFILL }
11360 { &hf_mbim_context_password_size,
11361 { "Password Size", "mbim.control.context.password_size",
11362 FT_UINT32, BASE_DEC, NULL, 0,
11363 NULL, HFILL }
11365 { &hf_mbim_context_compression,
11366 { "Compression", "mbim.control.context.compression",
11367 FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
11368 NULL, HFILL }
11370 { &hf_mbim_context_auth_protocol,
11371 { "Authentication Protocol", "mbim.control.context.auth_protocol",
11372 FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
11373 NULL, HFILL }
11375 { &hf_mbim_context_provider_id_offset,
11376 { "Provider Id Offset", "mbim.control.context.provider_id_offset",
11377 FT_UINT32, BASE_DEC, NULL, 0,
11378 NULL, HFILL }
11380 { &hf_mbim_context_provider_id_size,
11381 { "Provider Id Size", "mbim.control.context.provider_id_size",
11382 FT_UINT32, BASE_DEC, NULL, 0,
11383 NULL, HFILL }
11385 { &hf_mbim_context_access_string,
11386 { "Access String", "mbim.control.context.access_string",
11387 FT_STRING, BASE_NONE, NULL, 0,
11388 NULL, HFILL }
11390 { &hf_mbim_context_user_name,
11391 { "User Name", "mbim.control.context.user_name",
11392 FT_STRING, BASE_NONE, NULL, 0,
11393 NULL, HFILL }
11395 { &hf_mbim_context_password,
11396 { "Password", "mbim.control.context.password",
11397 FT_STRING, BASE_NONE, NULL, 0,
11398 NULL, HFILL }
11400 { &hf_mbim_context_provider_id,
11401 { "Provider Id", "mbim.control.context.provider_id",
11402 FT_STRING, BASE_NONE, NULL, 0,
11403 NULL, HFILL }
11405 { &hf_mbim_provisioned_contexts_info_elem_count,
11406 { "Element Count", "mbim.control.context.provisioned_contexts_info.elem_count",
11407 FT_UINT32, BASE_DEC, NULL, 0,
11408 NULL, HFILL }
11410 { &hf_mbim_provisioned_contexts_info_provisioned_context_offset,
11411 { "Provisioned Context Offset", "mbim.control.context.provisioned_contexts_info.provisioned_context_offset",
11412 FT_UINT32, BASE_DEC, NULL, 0,
11413 NULL, HFILL }
11415 { &hf_mbim_provisioned_contexts_info_provisioned_context_size,
11416 { "Provisioned Context Size", "mbim.control.context.provisioned_contexts_info.provisioned_context_size",
11417 FT_UINT32, BASE_DEC, NULL, 0,
11418 NULL, HFILL }
11420 { &hf_mbim_set_service_activation_data_buffer,
11421 { "Data Buffer", "mbim.control.set_service_activation.data_buffer",
11422 FT_BYTES, BASE_NONE, NULL, 0,
11423 NULL, HFILL }
11425 { &hf_mbim_service_activation_info_nw_error,
11426 { "Network Error", "mbim.control.service_activation_info.nw_error",
11427 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11428 NULL, HFILL }
11430 { &hf_mbim_service_activation_info_data_buffer,
11431 { "Data Buffer", "mbim.control.service_activation_info.data_buffer",
11432 FT_BYTES, BASE_NONE, NULL, 0,
11433 NULL, HFILL }
11435 { &hf_mbim_ipv4_element_on_link_prefix_length,
11436 { "On Link Prefix Length", "mbim.control.ipv4_element.on_link_prefix_length",
11437 FT_UINT32, BASE_DEC, NULL, 0,
11438 NULL, HFILL }
11440 { &hf_mbim_ipv4_element_ipv4_address,
11441 { "IPv4 Address", "mbim.control.ipv4_element.ipv4_address",
11442 FT_IPv4, BASE_NONE, NULL, 0,
11443 NULL, HFILL }
11445 { &hf_mbim_ipv6_element_on_link_prefix_length,
11446 { "On Link Prefix Length", "mbim.control.ipv6_element.on_link_prefix_length",
11447 FT_UINT32, BASE_DEC, NULL, 0,
11448 NULL, HFILL }
11450 { &hf_mbim_ipv6_element_ipv6_address,
11451 { "IPv6 Address", "mbim.control.ipv6_element.ipv6_address",
11452 FT_IPv6, BASE_NONE, NULL, 0,
11453 NULL, HFILL }
11455 { &hf_mbim_ip_configuration_info_session_id,
11456 { "Session Id", "mbim.control.ip_configuration_info.session_id",
11457 FT_UINT32, BASE_DEC, NULL, 0,
11458 NULL, HFILL }
11460 { &hf_mbim_ip_configuration_info_ipv4_configuration_available,
11461 { "IPv4 Configuration Available", "mbim.control.ip_configuration_info.ipv4_configuration_available",
11462 FT_UINT32, BASE_HEX, NULL, 0,
11463 NULL, HFILL }
11465 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_address,
11466 { "Address", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.address",
11467 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000001,
11468 NULL, HFILL }
11470 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway,
11471 { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.gateway",
11472 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000002,
11473 NULL, HFILL }
11475 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns,
11476 { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.dns",
11477 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000004,
11478 NULL, HFILL }
11480 { &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu,
11481 { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.mtu",
11482 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000008,
11483 NULL, HFILL }
11485 { &hf_mbim_ip_configuration_info_ipv6_configuration_available,
11486 { "IPv6 Configuration Available", "mbim.control.ip_configuration_info.ipv6_configuration_available",
11487 FT_UINT32, BASE_HEX, NULL, 0,
11488 NULL, HFILL }
11490 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_address,
11491 { "Address", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.address",
11492 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000001,
11493 NULL, HFILL }
11495 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway,
11496 { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.gateway",
11497 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000002,
11498 NULL, HFILL }
11500 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns,
11501 { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.dns",
11502 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000004,
11503 NULL, HFILL }
11505 { &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu,
11506 { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.mtu",
11507 FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000008,
11508 NULL, HFILL }
11510 { &hf_mbim_ip_configuration_info_ipv4_address_count,
11511 { "IPv4 Address Count", "mbim.control.ip_configuration_info.ipv4_address.count",
11512 FT_UINT32, BASE_DEC, NULL, 0,
11513 NULL, HFILL }
11515 { &hf_mbim_ip_configuration_info_ipv4_address_offset,
11516 { "IPv4 Address Offset", "mbim.control.ip_configuration_info.ipv4_address.offset",
11517 FT_UINT32, BASE_DEC, NULL, 0,
11518 NULL, HFILL }
11520 { &hf_mbim_ip_configuration_info_ipv6_address_count,
11521 { "IPv6 Address Count", "mbim.control.ip_configuration_info.ipv6_address.count",
11522 FT_UINT32, BASE_DEC, NULL, 0,
11523 NULL, HFILL }
11525 { &hf_mbim_ip_configuration_info_ipv6_address_offset,
11526 { "IPv6 Address Offset", "mbim.control.ip_configuration_info.ipv6_address.offset",
11527 FT_UINT32, BASE_DEC, NULL, 0,
11528 NULL, HFILL }
11530 { &hf_mbim_ip_configuration_info_ipv4_gateway_offset,
11531 { "IPv4 Gateway Offset", "mbim.control.ip_configuration_info.ipv4_gateway.offset",
11532 FT_UINT32, BASE_DEC, NULL, 0,
11533 NULL, HFILL }
11535 { &hf_mbim_ip_configuration_info_ipv6_gateway_offset,
11536 { "IPv6 Gateway Offset", "mbim.control.ip_configuration_info.ipv6_gateway.offset",
11537 FT_UINT32, BASE_DEC, NULL, 0,
11538 NULL, HFILL }
11540 { &hf_mbim_ip_configuration_info_ipv4_dns_count,
11541 { "IPv4 DNS Server Count", "mbim.control.ip_configuration_info.ipv4_dns.count",
11542 FT_UINT32, BASE_DEC, NULL, 0,
11543 NULL, HFILL }
11545 { &hf_mbim_ip_configuration_info_ipv4_dns_offset,
11546 { "IPv4 DNS Server Offset", "mbim.control.ip_configuration_info.ipv4_dns.offset",
11547 FT_UINT32, BASE_DEC, NULL, 0,
11548 NULL, HFILL }
11550 { &hf_mbim_ip_configuration_info_ipv6_dns_count,
11551 { "IPv6 DNS Server Count", "mbim.control.ip_configuration_info.ipv6_dns.count",
11552 FT_UINT32, BASE_DEC, NULL, 0,
11553 NULL, HFILL }
11555 { &hf_mbim_ip_configuration_info_ipv6_dns_offset,
11556 { "IPv6 DNS Server Offset", "mbim.control.ip_configuration_info.ipv6_dns.offset",
11557 FT_UINT32, BASE_DEC, NULL, 0,
11558 NULL, HFILL }
11560 { &hf_mbim_ip_configuration_info_ipv4_mtu,
11561 { "IPv4 MTU", "mbim.control.ip_configuration_info.ipv4_mtu",
11562 FT_UINT32, BASE_DEC, NULL, 0,
11563 NULL, HFILL }
11565 { &hf_mbim_ip_configuration_info_ipv6_mtu,
11566 { "IPv6 MTU", "mbim.control.ip_configuration_info.ipv6_mtu",
11567 FT_UINT32, BASE_DEC, NULL, 0,
11568 NULL, HFILL }
11570 { &hf_mbim_ip_configuration_info_ipv4_gateway,
11571 { "IPv4 Gateway", "mbim.control.ip_configuration_info.ipv4_gateway",
11572 FT_IPv4, BASE_NONE, NULL, 0,
11573 NULL, HFILL }
11575 { &hf_mbim_ip_configuration_info_ipv6_gateway,
11576 { "IPv6 Gateway", "mbim.control.ip_configuration_info.ipv6_gateway",
11577 FT_IPv6, BASE_NONE, NULL, 0,
11578 NULL, HFILL }
11580 { &hf_mbim_ip_configuration_info_ipv4_dns,
11581 { "IPv4 DNS Server", "mbim.control.ip_configuration_info.ipv4_dns",
11582 FT_IPv4, BASE_NONE, NULL, 0,
11583 NULL, HFILL }
11585 { &hf_mbim_ip_configuration_info_ipv6_dns,
11586 { "IPv6 DNS Server", "mbim.control.ip_configuration_info.ipv6_dns",
11587 FT_IPv6, BASE_NONE, NULL, 0,
11588 NULL, HFILL }
11590 { &hf_mbim_device_service_element_device_service_id,
11591 { "Device Service Id", "mbim.control.device_service_element.device_service_id",
11592 FT_GUID, BASE_NONE, NULL, 0,
11593 NULL, HFILL }
11595 { &hf_mbim_device_service_element_dss_payload,
11596 { "DSS Payload", "mbim.control.device_service_element.dss_payload",
11597 FT_UINT32, BASE_HEX, NULL, 0,
11598 NULL, HFILL }
11600 { &hf_mbim_device_service_element_dss_payload_host_device,
11601 { "Host To Device", "mbim.control.device_service_element.dss_payload.host_device",
11602 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
11603 NULL, HFILL }
11605 { &hf_mbim_device_service_element_dss_payload_device_host,
11606 { "Device To Host", "mbim.control.device_service_element.dss_payload.device_host",
11607 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
11608 NULL, HFILL }
11610 { &hf_mbim_device_service_element_max_dss_instances,
11611 { "Max DSS Instances", "mbim.control.device_service_element.max_dss_instances",
11612 FT_UINT32, BASE_DEC, NULL, 0,
11613 NULL, HFILL }
11615 { &hf_mbim_device_service_element_cid_count,
11616 { "CID Count", "mbim.control.device_service_element.cid.count",
11617 FT_UINT32, BASE_DEC, NULL, 0,
11618 NULL, HFILL }
11620 { &hf_mbim_device_service_element_cid,
11621 { "CID", "mbim.control.device_service_element.cid",
11622 FT_UINT32, BASE_DEC, NULL, 0,
11623 NULL, HFILL }
11625 { &hf_mbim_device_services_info_device_services_count,
11626 { "Device Services Count", "mbim.control.device_services_info.device_services_count",
11627 FT_UINT32, BASE_DEC, NULL, 0,
11628 NULL, HFILL }
11630 { &hf_mbim_device_services_info_max_dss_sessions,
11631 { "Max DSS Sessions", "mbim.control.device_services_info.max_dss_sessions",
11632 FT_UINT32, BASE_DEC, NULL, 0,
11633 NULL, HFILL }
11635 { &hf_mbim_device_services_info_device_services_offset,
11636 { "Device Services Offset", "mbim.control.device_services_info.device_services.offset",
11637 FT_UINT32, BASE_DEC, NULL, 0,
11638 NULL, HFILL }
11640 { &hf_mbim_device_services_info_device_services_size,
11641 { "Device Services Size", "mbim.control.device_services_info.device_services.size",
11642 FT_UINT32, BASE_DEC, NULL, 0,
11643 NULL, HFILL }
11645 { &hf_mbim_event_entry_device_service_id,
11646 { "Device Service Id", "mbim.control.event_entry.device_service_id",
11647 FT_GUID, BASE_NONE, NULL, 0,
11648 NULL, HFILL }
11650 { &hf_mbim_event_entry_cid_count,
11651 { "CID Count", "mbim.control.event_entry.cid.count",
11652 FT_UINT32, BASE_DEC, NULL, 0,
11653 NULL, HFILL }
11655 { &hf_mbim_event_entry_cid,
11656 { "CID", "mbim.control.event_entry.cid",
11657 FT_UINT32, BASE_DEC, NULL, 0,
11658 NULL, HFILL }
11660 { &hf_mbim_device_service_subscribe_element_count,
11661 { "Element Count", "mbim.control.device_service_subscribe.element_count",
11662 FT_UINT32, BASE_DEC, NULL, 0,
11663 NULL, HFILL }
11665 { &hf_mbim_device_service_subscribe_device_service_offset,
11666 { "Device Service Offset", "mbim.control.device_service_subscribe.device_service.offset",
11667 FT_UINT32, BASE_DEC, NULL, 0,
11668 NULL, HFILL }
11670 { &hf_mbim_device_service_subscribe_device_service_size,
11671 { "Device Service Size", "mbim.control.device_service_subscribe.device_service.size",
11672 FT_UINT32, BASE_DEC, NULL, 0,
11673 NULL, HFILL }
11675 { &hf_mbim_packet_statistics_info_in_discards,
11676 { "In Discards", "mbim.control.packet_statistics_info.in_discards",
11677 FT_UINT32, BASE_DEC, NULL, 0,
11678 NULL, HFILL }
11680 { &hf_mbim_packet_statistics_info_in_errors,
11681 { "In Errors", "mbim.control.packet_statistics_info.in_errors",
11682 FT_UINT32, BASE_DEC, NULL, 0,
11683 NULL, HFILL }
11685 { &hf_mbim_packet_statistics_info_in_octets,
11686 { "In Octets", "mbim.control.packet_statistics_info.in_octets",
11687 FT_UINT64, BASE_DEC, NULL, 0,
11688 NULL, HFILL }
11690 { &hf_mbim_packet_statistics_info_in_packets,
11691 { "In Packets", "mbim.control.packet_statistics_info.in_packets",
11692 FT_UINT64, BASE_DEC, NULL, 0,
11693 NULL, HFILL }
11695 { &hf_mbim_packet_statistics_info_out_octets,
11696 { "Out Octets", "mbim.control.packet_statistics_info.out_octets",
11697 FT_UINT64, BASE_DEC, NULL, 0,
11698 NULL, HFILL }
11700 { &hf_mbim_packet_statistics_info_out_packets,
11701 { "Out Packets", "mbim.control.packet_statistics_info.out_packets",
11702 FT_UINT64, BASE_DEC, NULL, 0,
11703 NULL, HFILL }
11705 { &hf_mbim_packet_statistics_info_out_errors,
11706 { "Out Errors", "mbim.control.packet_statistics_info.out_errors",
11707 FT_UINT32, BASE_DEC, NULL, 0,
11708 NULL, HFILL }
11710 { &hf_mbim_packet_statistics_info_out_discards,
11711 { "Out Discards", "mbim.control.packet_statistics_info.out_discards",
11712 FT_UINT32, BASE_DEC, NULL, 0,
11713 NULL, HFILL }
11715 { &hf_mbim_network_idle_hint_state,
11716 { "Network Idle Hint State", "mbim.control.network_idle_hint.state",
11717 FT_UINT32, BASE_DEC, VALS(mbim_network_idle_hint_states_vals), 0,
11718 NULL, HFILL }
11720 { &hf_mbim_emergency_mode_info_emergency_mode,
11721 { "Emergency Mode", "mbim.control.emergency_mode_info.mode",
11722 FT_UINT32, BASE_DEC, VALS(mbim_emergency_mode_states_vals), 0,
11723 NULL, HFILL }
11725 { &hf_mbim_single_packet_filter_filter_size,
11726 { "Filter Size", "mbim.control.single_packet_filter.filter_size",
11727 FT_UINT32, BASE_DEC, NULL, 0,
11728 NULL, HFILL }
11730 { &hf_mbim_single_packet_filter_packet_filter_offset,
11731 { "Packet Filter Offset", "mbim.control.single_packet_filter.packet_filter.offset",
11732 FT_UINT32, BASE_DEC, NULL, 0,
11733 NULL, HFILL }
11735 { &hf_mbim_single_packet_filter_packet_mask_offset,
11736 { "Packet Mask Offset", "mbim.control.single_packet_filter.packet_mask.offset",
11737 FT_UINT32, BASE_DEC, NULL, 0,
11738 NULL, HFILL }
11740 { &hf_mbim_single_packet_filter_filter_id,
11741 { "Filter ID", "mbim.control.single_packet_filter.filter_id",
11742 FT_UINT32, BASE_DEC, NULL, 0,
11743 NULL, HFILL }
11745 { &hf_mbim_single_packet_filter_packet_filter,
11746 { "Packet Filter", "mbim.control.single_packet_filter.packet_filter",
11747 FT_BYTES, BASE_NONE, NULL, 0,
11748 NULL, HFILL }
11750 { &hf_mbim_single_packet_filter_packet_mask,
11751 { "Packet Mask", "mbim.control.single_packet_filter.packet_mask",
11752 FT_BYTES, BASE_NONE, NULL, 0,
11753 NULL, HFILL }
11755 { &hf_mbim_packet_filters_session_id,
11756 { "Session Id", "mbim.control.packet_filters.session_id",
11757 FT_UINT32, BASE_DEC, NULL, 0,
11758 NULL, HFILL }
11760 { &hf_mbim_packet_filters_packet_filters_count,
11761 { "Packet Filters Count", "mbim.control.packet_filters.packet_filters_count",
11762 FT_UINT32, BASE_DEC, NULL, 0,
11763 NULL, HFILL }
11765 { &hf_mbim_packet_filters_packet_filters_packet_filter_offset,
11766 { "Packet Filter Offset", "mbim.control.packet_filters.packet_filter.offset",
11767 FT_UINT32, BASE_DEC, NULL, 0,
11768 NULL, HFILL }
11770 { &hf_mbim_packet_filters_packet_filters_packet_filter_size,
11771 { "Packet Filters Size", "mbim.control.packet_filters.packet_filter.size",
11772 FT_UINT32, BASE_DEC, NULL, 0,
11773 NULL, HFILL }
11775 { &hf_mbim_set_sms_configuration_format,
11776 { "Format", "mbim.control.set_sms_configuration.format",
11777 FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11778 NULL, HFILL }
11780 { &hf_mbim_set_sms_configuration_sc_address_offset,
11781 { "Service Center Address Offset", "mbim.control.set_sms_configuration.sc_address.offset",
11782 FT_UINT32, BASE_DEC, NULL, 0,
11783 NULL, HFILL }
11785 { &hf_mbim_set_sms_configuration_sc_address_size,
11786 { "Service Center Address Size", "mbim.control.set_sms_configuration.sc_address.size",
11787 FT_UINT32, BASE_DEC, NULL, 0,
11788 NULL, HFILL }
11790 { &hf_mbim_set_sms_configuration_sc_address,
11791 { "Service Center Address", "mbim.control.set_sms_configuration.sc_address",
11792 FT_STRING, BASE_NONE, NULL, 0,
11793 NULL, HFILL }
11795 { &hf_mbim_sms_configuration_info_sms_storage_state,
11796 { "SMS Storage State", "mbim.control.sms_configuration_info.sms_storage_state",
11797 FT_UINT32, BASE_DEC, VALS(mbim_sms_storage_state_vals), 0,
11798 NULL, HFILL }
11800 { &hf_mbim_sms_configuration_info_format,
11801 { "Format", "mbim.control.sms_configuration_info.format",
11802 FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11803 NULL, HFILL }
11805 { &hf_mbim_sms_configuration_info_max_messages,
11806 { "Max Messages", "mbim.control.sms_configuration_info.max_messages",
11807 FT_UINT32, BASE_DEC, NULL, 0,
11808 NULL, HFILL }
11810 { &hf_mbim_sms_configuration_info_cdma_short_message_size,
11811 { "CDMA Short Message Size", "mbim.control.sms_configuration_info.cdma_short_message_size",
11812 FT_UINT32, BASE_DEC, NULL, 0,
11813 NULL, HFILL }
11815 { &hf_mbim_sms_configuration_info_sc_address_offset,
11816 { "Service Center Address Offset", "mbim.control.sms_configuration_info.sc_address.offset",
11817 FT_UINT32, BASE_DEC, NULL, 0,
11818 NULL, HFILL }
11820 { &hf_mbim_sms_configuration_info_sc_address_size,
11821 { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address.size",
11822 FT_UINT32, BASE_DEC, NULL, 0,
11823 NULL, HFILL }
11825 { &hf_mbim_sms_configuration_info_sc_address,
11826 { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address",
11827 FT_STRING, BASE_NONE, NULL, 0,
11828 NULL, HFILL }
11830 { &hf_mbim_sms_pdu_record_message_index,
11831 { "Message Index", "mbim.control.sms_pdu_record.message_index",
11832 FT_UINT32, BASE_DEC, NULL, 0,
11833 NULL, HFILL }
11835 { &hf_mbim_sms_pdu_record_message_status,
11836 { "Message Status", "mbim.control.sms_pdu_record.message_status",
11837 FT_UINT32, BASE_DEC, VALS(mbim_sms_message_status_vals), 0,
11838 NULL, HFILL }
11840 { &hf_mbim_sms_pdu_record_pdu_data_offset,
11841 { "PDU Data Offset", "mbim.control.sms_pdu_record.pdu_data.offset",
11842 FT_UINT32, BASE_DEC, NULL, 0,
11843 NULL, HFILL }
11845 { &hf_mbim_sms_pdu_record_pdu_data_size,
11846 { "PDU Data Size", "mbim.control.sms_pdu_record.pdu_data.size",
11847 FT_UINT32, BASE_DEC, NULL, 0,
11848 NULL, HFILL }
11850 { &hf_mbim_sms_pdu_record_pdu_data,
11851 { "PDU Data", "mbim.control.sms_pdu_record.pdu_data",
11852 FT_BYTES, BASE_NONE, NULL, 0,
11853 NULL, HFILL }
11855 { &hf_mbim_sms_pdu_record_pdu_data_sc_address_size,
11856 { "Size", "mbim.control.sms_pdu_record.pdu_data.sc_address_size",
11857 FT_UINT8, BASE_DEC, NULL, 0,
11858 NULL, HFILL }
11860 { &hf_mbim_sms_cdma_record_message_index,
11861 { "Message Index", "mbim.control.sms_cdma_record.message_index",
11862 FT_UINT32, BASE_DEC, NULL, 0,
11863 NULL, HFILL }
11865 { &hf_mbim_sms_cdma_record_message_status,
11866 { "Message Status", "mbim.control.sms_cdma_record.message_status",
11867 FT_UINT32, BASE_DEC, VALS(mbim_sms_message_status_vals), 0,
11868 NULL, HFILL }
11870 { &hf_mbim_sms_cdma_record_address_offset,
11871 { "Address Offset", "mbim.control.sms_cdma_record.address.offset",
11872 FT_UINT32, BASE_DEC, NULL, 0,
11873 NULL, HFILL }
11875 { &hf_mbim_sms_cdma_record_address_size,
11876 { "Address Size", "mbim.control.sms_cdma_record.address.size",
11877 FT_UINT32, BASE_DEC, NULL, 0,
11878 NULL, HFILL }
11880 { &hf_mbim_sms_cdma_record_timestamp_offset,
11881 { "Timestamp Offset", "mbim.control.sms_cdma_record.timestamp.offset",
11882 FT_UINT32, BASE_DEC, NULL, 0,
11883 NULL, HFILL }
11885 { &hf_mbim_sms_cdma_record_timestamp_size,
11886 { "Timestamp Size", "mbim.control.sms_cdma_record.timestamp.size",
11887 FT_UINT32, BASE_DEC, NULL, 0,
11888 NULL, HFILL }
11890 { &hf_mbim_sms_cdma_record_encoding_id,
11891 { "Encoding Id", "mbim.control.sms_cdma_record.encoding_id",
11892 FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_encoding_vals), 0,
11893 NULL, HFILL }
11895 { &hf_mbim_sms_cdma_record_language_id,
11896 { "Language Id", "mbim.control.sms_cdma_record.language_id",
11897 FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_lang_vals), 0,
11898 NULL, HFILL }
11900 { &hf_mbim_sms_cdma_record_encoded_message_offset,
11901 { "Encoded Message Offset", "mbim.control.sms_cdma_record.encoded_message.offset",
11902 FT_UINT32, BASE_DEC, NULL, 0,
11903 NULL, HFILL }
11905 { &hf_mbim_sms_cdma_record_size_in_bytes,
11906 { "Size In Bytes", "mbim.control.sms_cdma_record.size_in_bytes",
11907 FT_UINT32, BASE_DEC, NULL, 0,
11908 NULL, HFILL }
11910 { &hf_mbim_sms_cdma_record_size_in_characters,
11911 { "Size In Characters", "mbim.control.sms_cdma_record.size_in_characters",
11912 FT_UINT32, BASE_DEC, NULL, 0,
11913 NULL, HFILL }
11915 { &hf_mbim_sms_cdma_record_address,
11916 { "Address", "mbim.control.sms_cdma_record.address",
11917 FT_STRING, BASE_NONE, NULL, 0,
11918 NULL, HFILL }
11920 { &hf_mbim_sms_cdma_record_timestamp,
11921 { "Timestamp", "mbim.control.sms_cdma_record.timestamp",
11922 FT_STRING, BASE_NONE, NULL, 0,
11923 NULL, HFILL }
11925 { &hf_mbim_sms_cdma_record_encoded_message,
11926 { "Encoded Message", "mbim.control.sms_cdma_record.encoded_message",
11927 FT_BYTES, BASE_NONE, NULL, 0,
11928 NULL, HFILL }
11930 { &hf_mbim_sms_cdma_record_encoded_message_text,
11931 { "Text", "mbim.control.sms_cdma_record.encoded_message.text",
11932 FT_STRING, BASE_NONE, NULL, 0,
11933 NULL, HFILL }
11935 { &hf_mbim_sms_read_req_format,
11936 { "Format", "mbim.control.sms_read_req.format",
11937 FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11938 NULL, HFILL }
11940 { &hf_mbim_sms_read_req_flag,
11941 { "Flag", "mbim.control.sms_read_req.flag",
11942 FT_UINT32, BASE_DEC, VALS(mbim_sms_flag_vals), 0,
11943 NULL, HFILL }
11945 { &hf_mbim_sms_read_req_message_index,
11946 { "Message Index", "mbim.control.sms_read_req.message_index",
11947 FT_UINT32, BASE_DEC, NULL, 0,
11948 NULL, HFILL }
11950 { &hf_mbim_sms_read_info_format,
11951 { "Format", "mbim.control.sms_read_info.format",
11952 FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11953 NULL, HFILL }
11955 { &hf_mbim_sms_read_info_element_count,
11956 { "Element Count", "mbim.control.sms_read_info.element_count",
11957 FT_UINT32, BASE_DEC, NULL, 0,
11958 NULL, HFILL }
11960 { &hf_mbim_sms_read_info_sms_offset,
11961 { "SMS Offset", "mbim.control.sms_read_info.sms.offset",
11962 FT_UINT32, BASE_DEC, NULL, 0,
11963 NULL, HFILL }
11965 { &hf_mbim_sms_read_info_sms_size,
11966 { "SMS Size", "mbim.control.sms_read_info.sms.size",
11967 FT_UINT32, BASE_DEC, NULL, 0,
11968 NULL, HFILL }
11970 { &hf_mbim_sms_send_pdu_pdu_data_offset,
11971 { "PDU Data Offset", "mbim.control.sms_send_pdu.pdu_data.offset",
11972 FT_UINT32, BASE_DEC, NULL, 0,
11973 NULL, HFILL }
11975 { &hf_mbim_sms_send_pdu_pdu_data_size,
11976 { "PDU Data Size", "mbim.control.sms_send_pdu.pdu_data.size",
11977 FT_UINT32, BASE_DEC, NULL, 0,
11978 NULL, HFILL }
11980 { &hf_mbim_sms_send_pdu_pdu_data,
11981 { "PDU Data", "mbim.control.sms_send_pdu.pdu_data",
11982 FT_BYTES, BASE_NONE, NULL, 0,
11983 NULL, HFILL }
11985 { &hf_mbim_sms_send_pdu_pdu_data_sc_address_size,
11986 { "Size", "mbim.control.sms_send_pdu.pdu_data.sc_address_size",
11987 FT_UINT8, BASE_DEC, NULL, 0,
11988 NULL, HFILL }
11990 { &hf_mbim_sms_send_cdma_encoding_id,
11991 { "Encoding Id", "mbim.control.sms_send_cdma.encoding_id",
11992 FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_encoding_vals), 0,
11993 NULL, HFILL }
11995 { &hf_mbim_sms_send_cdma_language_id,
11996 { "Language Id", "mbim.control.sms_send_cdma.language_id",
11997 FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_lang_vals), 0,
11998 NULL, HFILL }
12000 { &hf_mbim_sms_send_cdma_address_offset,
12001 { "Address Offset", "mbim.control.sms_send_cdma.address.offset",
12002 FT_UINT32, BASE_DEC, NULL, 0,
12003 NULL, HFILL }
12005 { &hf_mbim_sms_send_cdma_address_size,
12006 { "Address Size", "mbim.control.sms_send_cdma.address.size",
12007 FT_UINT32, BASE_DEC, NULL, 0,
12008 NULL, HFILL }
12010 { &hf_mbim_sms_send_cdma_encoded_message_offset,
12011 { "Encoded Message Offset", "mbim.control.sms_send_cdma.encoded_message.offset",
12012 FT_UINT32, BASE_DEC, NULL, 0,
12013 NULL, HFILL }
12015 { &hf_mbim_sms_send_cdma_size_in_bytes,
12016 { "Size In Bytes", "mbim.control.sms_send_cdma.size_in_bytes",
12017 FT_UINT32, BASE_DEC, NULL, 0,
12018 NULL, HFILL }
12020 { &hf_mbim_sms_send_cdma_size_in_characters,
12021 { "Size In Characters", "mbim.control.sms_send_cdma.size_in_characters",
12022 FT_UINT32, BASE_DEC, NULL, 0,
12023 NULL, HFILL }
12025 { &hf_mbim_sms_send_cdma_address,
12026 { "Address", "mbim.control.sms_send_cdma.address",
12027 FT_STRING, BASE_NONE, NULL, 0,
12028 NULL, HFILL }
12030 { &hf_mbim_sms_send_cdma_encoded_message,
12031 { "Encoded Message", "mbim.control.sms_send_cdma.encoded_message",
12032 FT_BYTES, BASE_NONE, NULL, 0,
12033 NULL, HFILL }
12035 { &hf_mbim_sms_send_cdma_encoded_message_text,
12036 { "Text", "mbim.control.sms_send_cdma.encoded_message.text",
12037 FT_STRING, BASE_NONE, NULL, 0,
12038 NULL, HFILL }
12040 { &hf_mbim_set_sms_send_format,
12041 { "Format", "mbim.control.set_sms_send.format",
12042 FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
12043 NULL, HFILL }
12045 { &hf_mbim_sms_send_info_message_reference,
12046 { "Message Reference", "mbim.control.sms_send_info.message_reference",
12047 FT_UINT32, BASE_DEC, NULL, 0,
12048 NULL, HFILL }
12050 { &hf_mbim_set_sms_delete_flag,
12051 { "Flag", "mbim.control.set_sms_delete.flag",
12052 FT_UINT32, BASE_DEC, VALS(mbim_sms_flag_vals), 0,
12053 NULL, HFILL }
12055 { &hf_mbim_set_sms_delete_message_index,
12056 { "Message Index", "mbim.control.set_sms_delete.message_index",
12057 FT_UINT32, BASE_DEC, NULL, 0,
12058 NULL, HFILL }
12060 { &hf_mbim_sms_status_info_flags,
12061 { "Flags", "mbim.control.sms_status_info.flags",
12062 FT_UINT32, BASE_HEX, NULL, 0,
12063 NULL, HFILL }
12065 { &hf_mbim_sms_status_info_flags_message_store_full,
12066 { "Message Store Full", "mbim.control.sms_status_info.flags.message_store_full",
12067 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
12068 NULL, HFILL }
12070 { &hf_mbim_sms_status_info_flags_new_message,
12071 { "New Message", "mbim.control.sms_status_info.flags.new_message",
12072 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
12073 NULL, HFILL }
12075 { &hf_mbim_sms_status_info_message_index,
12076 { "Message Index", "mbim.control.sms_status_info.message_index",
12077 FT_UINT32, BASE_DEC, NULL, 0,
12078 NULL, HFILL }
12080 { &hf_mbim_set_ussd_ussd_action,
12081 { "USSD Action", "mbim.control.set_ussd.ussd_action",
12082 FT_UINT32, BASE_DEC, VALS(mbim_ussd_action_vals), 0,
12083 NULL, HFILL }
12085 { &hf_mbim_set_ussd_ussd_data_coding_scheme,
12086 { "USSD Data Coding Scheme", "mbim.control.set_ussd.ussd_data_coding_scheme",
12087 FT_UINT32, BASE_HEX, NULL, 0,
12088 NULL, HFILL }
12090 { &hf_mbim_set_ussd_ussd_payload_offset,
12091 { "USSD Payload Offset", "mbim.control.set_ussd.ussd_payload.offset",
12092 FT_UINT32, BASE_DEC, NULL, 0,
12093 NULL, HFILL }
12095 { &hf_mbim_set_ussd_ussd_payload_length,
12096 { "USSD Payload Length", "mbim.control.set_ussd.ussd_payload.length",
12097 FT_UINT32, BASE_DEC, NULL, 0,
12098 NULL, HFILL }
12100 { &hf_mbim_set_ussd_ussd_payload,
12101 { "USSD Payload", "mbim.control.set_ussd.ussd_payload",
12102 FT_BYTES, BASE_NONE, NULL, 0,
12103 NULL, HFILL }
12105 { &hf_mbim_set_ussd_ussd_payload_text,
12106 { "USSD Payload Text", "mbim.control.set_ussd.ussd_payload.text",
12107 FT_STRING, BASE_NONE, NULL, 0,
12108 NULL, HFILL }
12110 { &hf_mbim_ussd_info_ussd_response,
12111 { "USSD Response", "mbim.control.info_ussd.ussd_response",
12112 FT_UINT32, BASE_DEC, VALS(mbim_ussd_response_vals), 0,
12113 NULL, HFILL }
12115 { &hf_mbim_ussd_info_ussd_session_state,
12116 { "USSD Session State", "mbim.control.info_ussd.ussd_session_state",
12117 FT_UINT32, BASE_DEC, VALS(mbim_ussd_session_state_vals), 0,
12118 NULL, HFILL }
12120 { &hf_mbim_ussd_info_ussd_data_coding_scheme,
12121 { "USSD Data Coding Scheme", "mbim.control.ussd_info.ussd_data_coding_scheme",
12122 FT_UINT32, BASE_HEX, NULL, 0,
12123 NULL, HFILL }
12125 { &hf_mbim_ussd_info_ussd_payload_offset,
12126 { "USSD Payload Offset", "mbim.control.ussd_info.ussd_payload.offset",
12127 FT_UINT32, BASE_DEC, NULL, 0,
12128 NULL, HFILL }
12130 { &hf_mbim_ussd_info_ussd_payload_length,
12131 { "USSD Payload Length", "mbim.control.ussd_info.ussd_payload.length",
12132 FT_UINT32, BASE_DEC, NULL, 0,
12133 NULL, HFILL }
12135 { &hf_mbim_ussd_info_ussd_payload,
12136 { "USSD Payload", "mbim.control.ussd_info.ussd_payload",
12137 FT_BYTES, BASE_NONE, NULL, 0,
12138 NULL, HFILL }
12140 { &hf_mbim_ussd_info_ussd_payload_text,
12141 { "USSD Payload Text", "mbim.control.ussd_info.ussd_payload.text",
12142 FT_STRING, BASE_NONE, NULL, 0,
12143 NULL, HFILL }
12145 { &hf_mbim_phonebook_configuration_info_phonebook_state,
12146 { "Phonebook State", "mbim.control.phonebook_configuration_info.phonebook_state",
12147 FT_UINT32, BASE_DEC, VALS(mbim_phonebook_state_vals), 0,
12148 NULL, HFILL }
12150 { &hf_mbim_phonebook_configuration_info_total_nb_of_entries,
12151 { "Total Number Of Entries", "mbim.control.phonebook_configuration_info.total_nb_of_entries",
12152 FT_UINT32, BASE_DEC, NULL, 0,
12153 NULL, HFILL }
12155 { &hf_mbim_phonebook_configuration_info_used_entries,
12156 { "Used Entries", "mbim.control.phonebook_configuration_info.used_entries",
12157 FT_UINT32, BASE_DEC, NULL, 0,
12158 NULL, HFILL }
12160 { &hf_mbim_phonebook_configuration_info_max_number_length,
12161 { "Max Number Length", "mbim.control.phonebook_configuration_info.max_number_length",
12162 FT_UINT32, BASE_DEC, NULL, 0,
12163 NULL, HFILL }
12165 { &hf_mbim_phonebook_configuration_info_max_name_length,
12166 { "Max Name Length", "mbim.control.phonebook_configuration_info.max_name_length",
12167 FT_UINT32, BASE_DEC, NULL, 0,
12168 NULL, HFILL }
12170 { &hf_mbim_phonebook_entry_entry_index,
12171 { "Entry Index", "mbim.control.phonebook_entry.entry_index",
12172 FT_UINT32, BASE_DEC, NULL, 0,
12173 NULL, HFILL }
12175 { &hf_mbim_phonebook_entry_number_offset,
12176 { "Number Offset", "mbim.control.phonebook_entry.number.offset",
12177 FT_UINT32, BASE_DEC, NULL, 0,
12178 NULL, HFILL }
12180 { &hf_mbim_phonebook_entry_number_length,
12181 { "Number Length", "mbim.control.phonebook_entry.number.length",
12182 FT_UINT32, BASE_DEC, NULL, 0,
12183 NULL, HFILL }
12185 { &hf_mbim_phonebook_entry_name_offset,
12186 { "Name Offset", "mbim.control.phonebook_entry.name.offset",
12187 FT_UINT32, BASE_DEC, NULL, 0,
12188 NULL, HFILL }
12190 { &hf_mbim_phonebook_entry_name_length,
12191 { "Name Length", "mbim.control.phonebook_entry.name.length",
12192 FT_UINT32, BASE_DEC, NULL, 0,
12193 NULL, HFILL }
12195 { &hf_mbim_phonebook_entry_number,
12196 { "Number", "mbim.control.phonebook_entry.number",
12197 FT_STRING, BASE_NONE, NULL, 0,
12198 NULL, HFILL }
12200 { &hf_mbim_phonebook_entry_name,
12201 { "Name", "mbim.control.phonebook_entry.name",
12202 FT_STRING, BASE_NONE, NULL, 0,
12203 NULL, HFILL }
12205 { &hf_mbim_phonebook_read_req_filter_flag,
12206 { "Filter Flag", "mbim.control.phonebook_read_req.filter_flag",
12207 FT_UINT32, BASE_DEC, VALS(mbim_phonebook_flag_vals), 0,
12208 NULL, HFILL }
12210 { &hf_mbim_phonebook_read_req_filter_message_index,
12211 { "Filter Message Index", "mbim.control.phonebook_read_req.filter_message_index",
12212 FT_UINT32, BASE_DEC, NULL, 0,
12213 NULL, HFILL }
12215 { &hf_mbim_phonebook_read_info_element_count,
12216 { "Element Count", "mbim.control.phonebook_read_info.element_count",
12217 FT_UINT32, BASE_DEC, NULL, 0,
12218 NULL, HFILL }
12220 { &hf_mbim_phonebook_read_info_phonebook_offset,
12221 { "Phonebook Offset", "mbim.control.phonebook_read_info.phonebook.offset",
12222 FT_UINT32, BASE_DEC, NULL, 0,
12223 NULL, HFILL }
12225 { &hf_mbim_phonebook_read_info_phonebook_size,
12226 { "Phonebook Size", "mbim.control.phonebook_read_info.phonebook.size",
12227 FT_UINT32, BASE_DEC, NULL, 0,
12228 NULL, HFILL }
12230 { &hf_mbim_set_phonebook_delete_filter_flag,
12231 { "Filter Flag", "mbim.control.set_phonebook_delete.filter_flag",
12232 FT_UINT32, BASE_DEC, VALS(mbim_phonebook_flag_vals), 0,
12233 NULL, HFILL }
12235 { &hf_mbim_set_phonebook_delete_filter_message_index,
12236 { "Filter Message Index", "mbim.control.set_phonebook_delete.filter_message_index",
12237 FT_UINT32, BASE_DEC, NULL, 0,
12238 NULL, HFILL }
12240 { &hf_mbim_set_phonebook_write_save_flag,
12241 { "Save Flag", "mbim.control.set_phonebook_write.save_flag",
12242 FT_UINT32, BASE_DEC, VALS(mbim_phonebook_write_flag_vals), 0,
12243 NULL, HFILL }
12245 { &hf_mbim_set_phonebook_write_save_index,
12246 { "Save Index", "mbim.control.set_phonebook_write.save_index",
12247 FT_UINT32, BASE_DEC, NULL, 0,
12248 NULL, HFILL }
12250 { &hf_mbim_set_phonebook_write_number_offset,
12251 { "Number Offset", "mbim.control.set_phonebook_write.number.offset",
12252 FT_UINT32, BASE_DEC, NULL, 0,
12253 NULL, HFILL }
12255 { &hf_mbim_set_phonebook_write_number_length,
12256 { "Number Length", "mbim.control.set_phonebook_write.number.length",
12257 FT_UINT32, BASE_DEC, NULL, 0,
12258 NULL, HFILL }
12260 { &hf_mbim_set_phonebook_write_name_offset,
12261 { "Name Offset", "mbim.control.set_phonebook_write.name.offset",
12262 FT_UINT32, BASE_DEC, NULL, 0,
12263 NULL, HFILL }
12265 { &hf_mbim_set_phonebook_write_name_length,
12266 { "Name Length", "mbim.control.set_phonebook_write.name.length",
12267 FT_UINT32, BASE_DEC, NULL, 0,
12268 NULL, HFILL }
12270 { &hf_mbim_set_phonebook_write_number,
12271 { "Number", "mbim.control.set_phonebook_write.number",
12272 FT_STRING, BASE_NONE, NULL, 0,
12273 NULL, HFILL }
12275 { &hf_mbim_set_phonebook_write_name,
12276 { "Name", "mbim.control.set_phonebook_write.name",
12277 FT_STRING, BASE_NONE, NULL, 0,
12278 NULL, HFILL }
12280 { &hf_mbim_set_stk_pac_pac_host_control,
12281 { "PAC Host Control", "mbim.control.set_stk_pac.pac_host_control",
12282 FT_BYTES, BASE_NONE, NULL, 0,
12283 NULL, HFILL }
12285 { &hf_mbim_set_stk_pac_pac_host_control_refresh,
12286 { "Refresh", "mbim.control.set_stk_pac.pac_host_control.refresh",
12287 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12288 NULL, HFILL }
12290 { &hf_mbim_set_stk_pac_pac_host_control_more_time,
12291 { "More Time", "mbim.control.set_stk_pac.pac_host_control.more_time",
12292 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12293 NULL, HFILL }
12295 { &hf_mbim_set_stk_pac_pac_host_control_poll_interval,
12296 { "Poll Interval", "mbim.control.set_stk_pac.pac_host_control.poll_interval",
12297 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12298 NULL, HFILL }
12300 { &hf_mbim_set_stk_pac_pac_host_control_polling_off,
12301 { "Polling Off", "mbim.control.set_stk_pac.pac_host_control.polling_off",
12302 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12303 NULL, HFILL }
12305 { &hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list,
12306 { "Set Up Event List", "mbim.control.set_stk_pac.pac_host_control.set_up_evt_list",
12307 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12308 NULL, HFILL }
12310 { &hf_mbim_set_stk_pac_pac_host_control_set_up_call,
12311 { "Set Up Call", "mbim.control.set_stk_pac.pac_host_control.set_up_call",
12312 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12313 NULL, HFILL }
12315 { &hf_mbim_set_stk_pac_pac_host_control_send_ss,
12316 { "Send SS", "mbim.control.set_stk_pac.pac_host_control.send_ss",
12317 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12318 NULL, HFILL }
12320 { &hf_mbim_set_stk_pac_pac_host_control_send_ussd,
12321 { "Send USSD", "mbim.control.set_stk_pac.pac_host_control.send_ussd",
12322 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12323 NULL, HFILL }
12325 { &hf_mbim_set_stk_pac_pac_host_control_send_short_msg,
12326 { "Send Short Message", "mbim.control.set_stk_pac.pac_host_control.send_short_msg",
12327 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12328 NULL, HFILL }
12330 { &hf_mbim_set_stk_pac_pac_host_control_send_dtmf,
12331 { "Send DTMF", "mbim.control.set_stk_pac.pac_host_control.send_dtmf",
12332 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12333 NULL, HFILL }
12335 { &hf_mbim_set_stk_pac_pac_host_control_launch_browser,
12336 { "Launch Browser", "mbim.control.set_stk_pac.pac_host_control.launch_browser",
12337 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12338 NULL, HFILL }
12340 { &hf_mbim_set_stk_pac_pac_host_control_geo_loc_req,
12341 { "Geographical Location Request", "mbim.control.set_stk_pac.pac_host_control.geo_loc_req",
12342 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12343 NULL, HFILL }
12345 { &hf_mbim_set_stk_pac_pac_host_control_play_tone,
12346 { "Play Tone", "mbim.control.set_stk_pac.pac_host_control.play_tone",
12347 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12348 NULL, HFILL }
12350 { &hf_mbim_set_stk_pac_pac_host_control_display_text,
12351 { "Display Text", "mbim.control.set_stk_pac.pac_host_control.display_text",
12352 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12353 NULL, HFILL }
12355 { &hf_mbim_set_stk_pac_pac_host_control_get_inkey,
12356 { "Get Inkey", "mbim.control.set_stk_pac.pac_host_control.get_inkey",
12357 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12358 NULL, HFILL }
12360 { &hf_mbim_set_stk_pac_pac_host_control_get_input,
12361 { "Get Input", "mbim.control.set_stk_pac.pac_host_control.get_input",
12362 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12363 NULL, HFILL }
12365 { &hf_mbim_set_stk_pac_pac_host_control_select_item,
12366 { "Select Item", "mbim.control.set_stk_pac.pac_host_control.select_item",
12367 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12368 NULL, HFILL }
12370 { &hf_mbim_set_stk_pac_pac_host_control_set_up_menu,
12371 { "Set Up Menu", "mbim.control.set_stk_pac.pac_host_control.set_up_menu",
12372 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12373 NULL, HFILL }
12375 { &hf_mbim_set_stk_pac_pac_host_control_prov_local_info,
12376 { "Provide Local Information", "mbim.control.set_stk_pac.pac_host_control.prov_local_info",
12377 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12378 NULL, HFILL }
12380 { &hf_mbim_set_stk_pac_pac_host_control_timer_management,
12381 { "Timer Management", "mbim.control.set_stk_pac.pac_host_control.timer_management",
12382 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12383 NULL, HFILL }
12385 { &hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text,
12386 { "Set Up Idle Mode Text", "mbim.control.set_stk_pac.pac_host_control.set_up_idle_mode_text",
12387 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12388 NULL, HFILL }
12390 { &hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu,
12391 { "Perform Card APDU", "mbim.control.set_stk_pac.pac_host_control.perform_card_apdu",
12392 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12393 NULL, HFILL }
12395 { &hf_mbim_set_stk_pac_pac_host_control_power_on_card,
12396 { "Power On Card", "mbim.control.set_stk_pac.pac_host_control.power_on_card",
12397 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12398 NULL, HFILL }
12400 { &hf_mbim_set_stk_pac_pac_host_control_power_off_card,
12401 { "Power Off Card", "mbim.control.set_stk_pac.pac_host_control.power_off_card",
12402 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12403 NULL, HFILL }
12405 { &hf_mbim_set_stk_pac_pac_host_control_get_reader_status,
12406 { "Get Reader Status", "mbim.control.set_stk_pac.pac_host_control.get_reader_status",
12407 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12408 NULL, HFILL }
12410 { &hf_mbim_set_stk_pac_pac_host_control_run_at_cmd,
12411 { "Run AT Command", "mbim.control.set_stk_pac.pac_host_control.run_at_cmd",
12412 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12413 NULL, HFILL }
12415 { &hf_mbim_set_stk_pac_pac_host_control_lang_notif,
12416 { "Language Notification", "mbim.control.set_stk_pac.pac_host_control.lang_notif",
12417 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12418 NULL, HFILL }
12420 { &hf_mbim_set_stk_pac_pac_host_control_open_channel,
12421 { "Open Channel", "mbim.control.set_stk_pac.pac_host_control.open_channel",
12422 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12423 NULL, HFILL }
12425 { &hf_mbim_set_stk_pac_pac_host_control_close_channel,
12426 { "Close Channel", "mbim.control.set_stk_pac.pac_host_control.close_channel",
12427 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12428 NULL, HFILL }
12430 { &hf_mbim_set_stk_pac_pac_host_control_receive_data,
12431 { "Receive Data", "mbim.control.set_stk_pac.pac_host_control.receive_data",
12432 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12433 NULL, HFILL }
12435 { &hf_mbim_set_stk_pac_pac_host_control_send_data,
12436 { "Send Data", "mbim.control.set_stk_pac.pac_host_control.send_data",
12437 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12438 NULL, HFILL }
12440 { &hf_mbim_set_stk_pac_pac_host_control_get_channel_status,
12441 { "Get Channel Status", "mbim.control.set_stk_pac.pac_host_control.get_channel_status",
12442 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12443 NULL, HFILL }
12445 { &hf_mbim_set_stk_pac_pac_host_control_service_search,
12446 { "Service Search", "mbim.control.set_stk_pac.pac_host_control.service_search",
12447 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12448 NULL, HFILL }
12450 { &hf_mbim_set_stk_pac_pac_host_control_get_service_info,
12451 { "Get Service Information", "mbim.control.set_stk_pac.pac_host_control.get_service_info",
12452 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12453 NULL, HFILL }
12455 { &hf_mbim_set_stk_pac_pac_host_control_declare_service,
12456 { "Declare Service", "mbim.control.set_stk_pac.pac_host_control.declare_service",
12457 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12458 NULL, HFILL }
12460 { &hf_mbim_set_stk_pac_pac_host_control_set_frames,
12461 { "Set Frames", "mbim.control.set_stk_pac.pac_host_control.set_frames",
12462 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12463 NULL, HFILL }
12465 { &hf_mbim_set_stk_pac_pac_host_control_get_frames_status,
12466 { "Get Frames Status", "mbim.control.set_stk_pac.pac_host_control.get_frames_status",
12467 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12468 NULL, HFILL }
12470 { &hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg,
12471 { "Retrieve Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.retrieve_multimedia_msg",
12472 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12473 NULL, HFILL }
12475 { &hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg,
12476 { "Submit Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.submit_multimedia_msg",
12477 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12478 NULL, HFILL }
12480 { &hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg,
12481 { "Display Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.display_multimedia_msg",
12482 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12483 NULL, HFILL }
12485 { &hf_mbim_set_stk_pac_pac_host_control_activate,
12486 { "Activate", "mbim.control.set_stk_pac.pac_host_control.activate",
12487 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12488 NULL, HFILL }
12490 { &hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed,
12491 { "Contactless State Changed", "mbim.control.set_stk_pac.pac_host_control.contactless_state_changed",
12492 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12493 NULL, HFILL }
12495 { &hf_mbim_set_stk_pac_pac_host_control_cmd_container,
12496 { "Command Container", "mbim.control.set_stk_pac.pac_host_control.cmd_container",
12497 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12498 NULL, HFILL }
12500 { &hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl,
12501 { "Encapsulated Session Control", "mbim.control.set_stk_pac.pac_host_control.encapsulated_session_ctrl",
12502 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12503 NULL, HFILL }
12505 { &hf_mbim_set_stk_pac_pac_host_control_end_proact_session,
12506 { "End Proactive Session", "mbim.control.set_stk_pac.pac_host_control.end_proact_session",
12507 FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12508 NULL, HFILL }
12510 { &hf_mbim_stk_pac_info_pac_support,
12511 { "PAC Host Control", "mbim.control.stk_pac_info.pac_support",
12512 FT_BYTES, BASE_NONE, NULL, 0,
12513 NULL, HFILL }
12515 { &hf_mbim_stk_pac_info_pac_support_refresh,
12516 { "Refresh", "mbim.control.stk_pac_info.pac_support.refresh",
12517 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12518 NULL, HFILL }
12520 { &hf_mbim_stk_pac_info_pac_support_more_time,
12521 { "More Time", "mbim.control.stk_pac_info.pac_support.more_time",
12522 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12523 NULL, HFILL }
12525 { &hf_mbim_stk_pac_info_pac_support_poll_interval,
12526 { "Poll Interval", "mbim.control.stk_pac_info.pac_support.poll_interval",
12527 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12528 NULL, HFILL }
12530 { &hf_mbim_stk_pac_info_pac_support_polling_off,
12531 { "Polling Off", "mbim.control.stk_pac_info.pac_support.polling_off",
12532 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12533 NULL, HFILL }
12535 { &hf_mbim_stk_pac_info_pac_support_set_up_evt_list,
12536 { "Set Up Event List", "mbim.control.stk_pac_info.pac_support.set_up_evt_list",
12537 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12538 NULL, HFILL }
12540 { &hf_mbim_stk_pac_info_pac_support_set_up_call,
12541 { "Set Up Call", "mbim.control.stk_pac_info.pac_support.set_up_call",
12542 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12543 NULL, HFILL }
12545 { &hf_mbim_stk_pac_info_pac_support_send_ss,
12546 { "Send SS", "mbim.control.stk_pac_info.pac_support.send_ss",
12547 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12548 NULL, HFILL }
12550 { &hf_mbim_stk_pac_info_pac_support_send_ussd,
12551 { "Send USSD", "mbim.control.stk_pac_info.pac_support.send_ussd",
12552 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12553 NULL, HFILL }
12555 { &hf_mbim_stk_pac_info_pac_support_send_short_msg,
12556 { "Send Short Message", "mbim.control.stk_pac_info.pac_support.send_short_msg",
12557 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12558 NULL, HFILL }
12560 { &hf_mbim_stk_pac_info_pac_support_send_dtmf,
12561 { "Send DTMF", "mbim.control.stk_pac_info.pac_support.send_dtmf",
12562 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12563 NULL, HFILL }
12565 { &hf_mbim_stk_pac_info_pac_support_launch_browser,
12566 { "Launch Browser", "mbim.control.stk_pac_info.pac_support.launch_browser",
12567 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12568 NULL, HFILL }
12570 { &hf_mbim_stk_pac_info_pac_support_geo_loc_req,
12571 { "Geographical Location Request", "mbim.control.stk_pac_info.pac_support.geo_loc_req",
12572 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12573 NULL, HFILL }
12575 { &hf_mbim_stk_pac_info_pac_support_play_tone,
12576 { "Play Tone", "mbim.control.stk_pac_info.pac_support.play_tone",
12577 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12578 NULL, HFILL }
12580 { &hf_mbim_stk_pac_info_pac_support_display_text,
12581 { "Display Text", "mbim.control.stk_pac_info.pac_support.display_text",
12582 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12583 NULL, HFILL }
12585 { &hf_mbim_stk_pac_info_pac_support_get_inkey,
12586 { "Get Inkey", "mbim.control.stk_pac_info.pac_support.get_inkey",
12587 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12588 NULL, HFILL }
12590 { &hf_mbim_stk_pac_info_pac_support_get_input,
12591 { "Get Input", "mbim.control.stk_pac_info.pac_support.get_input",
12592 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12593 NULL, HFILL }
12595 { &hf_mbim_stk_pac_info_pac_support_select_item,
12596 { "Select Item", "mbim.control.stk_pac_info.pac_support.select_item",
12597 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12598 NULL, HFILL }
12600 { &hf_mbim_stk_pac_info_pac_support_set_up_menu,
12601 { "Set Up Menu", "mbim.control.stk_pac_info.pac_support.set_up_menu",
12602 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12603 NULL, HFILL }
12605 { &hf_mbim_stk_pac_info_pac_support_prov_local_info,
12606 { "Provide Local Information", "mbim.control.stk_pac_info.pac_support.prov_local_info",
12607 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12608 NULL, HFILL }
12610 { &hf_mbim_stk_pac_info_pac_support_timer_management,
12611 { "Timer Management", "mbim.control.stk_pac_info.pac_support.timer_management",
12612 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12613 NULL, HFILL }
12615 { &hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text,
12616 { "Set Up Idle Mode Text", "mbim.control.stk_pac_info.pac_support.set_up_idle_mode_text",
12617 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12618 NULL, HFILL }
12620 { &hf_mbim_stk_pac_info_pac_support_perform_card_apdu,
12621 { "Perform Card APDU", "mbim.control.stk_pac_info.pac_support.perform_card_apdu",
12622 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12623 NULL, HFILL }
12625 { &hf_mbim_stk_pac_info_pac_support_power_on_card,
12626 { "Power On Card", "mbim.control.stk_pac_info.pac_support.power_on_card",
12627 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12628 NULL, HFILL }
12630 { &hf_mbim_stk_pac_info_pac_support_power_off_card,
12631 { "Power Off Card", "mbim.control.stk_pac_info.pac_support.power_off_card",
12632 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12633 NULL, HFILL }
12635 { &hf_mbim_stk_pac_info_pac_support_get_reader_status,
12636 { "Get Reader Status", "mbim.control.stk_pac_info.pac_support.get_reader_status",
12637 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12638 NULL, HFILL }
12640 { &hf_mbim_stk_pac_info_pac_support_run_at_cmd,
12641 { "Run AT Command", "mbim.control.stk_pac_info.pac_support.run_at_cmd",
12642 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12643 NULL, HFILL }
12645 { &hf_mbim_stk_pac_info_pac_support_lang_notif,
12646 { "Language Notification", "mbim.control.stk_pac_info.pac_support.lang_notif",
12647 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12648 NULL, HFILL }
12650 { &hf_mbim_stk_pac_info_pac_support_open_channel,
12651 { "Open Channel", "mbim.control.stk_pac_info.pac_support.open_channel",
12652 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12653 NULL, HFILL }
12655 { &hf_mbim_stk_pac_info_pac_support_close_channel,
12656 { "Close Channel", "mbim.control.stk_pac_info.pac_support.close_channel",
12657 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12658 NULL, HFILL }
12660 { &hf_mbim_stk_pac_info_pac_support_receive_data,
12661 { "Receive Data", "mbim.control.stk_pac_info.pac_support.receive_data",
12662 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12663 NULL, HFILL }
12665 { &hf_mbim_stk_pac_info_pac_support_send_data,
12666 { "Send Data", "mbim.control.stk_pac_info.pac_support.send_data",
12667 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12668 NULL, HFILL }
12670 { &hf_mbim_stk_pac_info_pac_support_get_channel_status,
12671 { "Get Channel Status", "mbim.control.stk_pac_info.pac_support.get_channel_status",
12672 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12673 NULL, HFILL }
12675 { &hf_mbim_stk_pac_info_pac_support_service_search,
12676 { "Service Search", "mbim.control.stk_pac_info.pac_support.service_search",
12677 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12678 NULL, HFILL }
12680 { &hf_mbim_stk_pac_info_pac_support_get_service_info,
12681 { "Get Service Information", "mbim.control.stk_pac_info.pac_support.get_service_info",
12682 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12683 NULL, HFILL }
12685 { &hf_mbim_stk_pac_info_pac_support_declare_service,
12686 { "Declare Service", "mbim.control.stk_pac_info.pac_support.declare_service",
12687 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12688 NULL, HFILL }
12690 { &hf_mbim_stk_pac_info_pac_support_set_frames,
12691 { "Set Frames", "mbim.control.stk_pac_info.pac_support.set_frames",
12692 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12693 NULL, HFILL }
12695 { &hf_mbim_stk_pac_info_pac_support_get_frames_status,
12696 { "Get Frames Status", "mbim.control.stk_pac_info.pac_support.get_frames_status",
12697 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12698 NULL, HFILL }
12700 { &hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg,
12701 { "Retrieve Multimedia Message", "mbim.control.stk_pac_info.pac_support.retrieve_multimedia_msg",
12702 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12703 NULL, HFILL }
12705 { &hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg,
12706 { "Submit Multimedia Message", "mbim.control.stk_pac_info.pac_support.submit_multimedia_msg",
12707 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12708 NULL, HFILL }
12710 { &hf_mbim_stk_pac_info_pac_support_display_multimedia_msg,
12711 { "Display Multimedia Message", "mbim.control.stk_pac_info.pac_support.display_multimedia_msg",
12712 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12713 NULL, HFILL }
12715 { &hf_mbim_stk_pac_info_pac_support_activate,
12716 { "Activate", "mbim.control.stk_pac_info.pac_support.activate",
12717 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12718 NULL, HFILL }
12720 { &hf_mbim_stk_pac_info_pac_support_contactless_state_changed,
12721 { "Contactless State Changed", "mbim.control.stk_pac_info.pac_support.contactless_state_changed",
12722 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12723 NULL, HFILL }
12725 { &hf_mbim_stk_pac_info_pac_support_cmd_container,
12726 { "Command Container", "mbim.control.stk_pac_info.pac_support.cmd_container",
12727 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12728 NULL, HFILL }
12730 { &hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl,
12731 { "Encapsulated Session Control", "mbim.control.stk_pac_info.pac_support.encapsulated_session_ctrl",
12732 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12733 NULL, HFILL }
12735 { &hf_mbim_stk_pac_info_pac_support_end_proact_session,
12736 { "End Proactive Session", "mbim.control.stk_pac_info.pac_support.end_proact_session",
12737 FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12738 NULL, HFILL }
12740 { &hf_mbim_stk_pac_pac_type,
12741 { "PAC Type", "mbim.control.stk_pac.pac_type",
12742 FT_UINT32, BASE_DEC, VALS(mbim_stk_pac_type_vals), 0,
12743 NULL, HFILL }
12745 { &hf_mbim_stk_pac_pac,
12746 { "PAC", "mbim.control.stk_pac.pac",
12747 FT_BYTES, BASE_NONE, NULL, 0,
12748 NULL, HFILL }
12750 { &hf_mbim_set_stk_terminal_response_response_length,
12751 { "Response Length", "mbim.control.set_stk_terminal_response.response_length",
12752 FT_UINT32, BASE_DEC, NULL, 0,
12753 NULL, HFILL }
12755 { &hf_mbim_set_stk_terminal_response_data_buffer,
12756 { "Data Buffer", "mbim.control.set_stk_terminal_response.data_buffer",
12757 FT_BYTES, BASE_NONE, NULL, 0,
12758 NULL, HFILL }
12760 { &hf_mbim_stk_terminal_response_info_result_data_string_offset,
12761 { "Result Data String Offset", "mbim.control.stk_terminal_response_info.result_data_string.offset",
12762 FT_UINT32, BASE_DEC, NULL, 0,
12763 NULL, HFILL }
12765 { &hf_mbim_stk_terminal_response_info_result_data_string_length,
12766 { "Result Data String Length", "mbim.control.stk_terminal_response_info.result_data_string.length",
12767 FT_UINT32, BASE_DEC, NULL, 0,
12768 NULL, HFILL }
12770 { &hf_mbim_stk_terminal_response_info_status_word,
12771 { "Status Word", "mbim.control.stk_terminal_response_info.status_word",
12772 FT_UINT32, BASE_HEX, NULL, 0,
12773 NULL, HFILL }
12775 { &hf_mbim_stk_terminal_response_info_result_data_string,
12776 { "Result Data String", "mbim.control.stk_terminal_response_info.result_data_string",
12777 FT_BYTES, BASE_NONE, NULL, 0,
12778 NULL, HFILL }
12780 { &hf_mbim_set_stk_envelope_data_buffer,
12781 { "Data Buffer", "mbim.control.set_stk_envelope.data_buffer",
12782 FT_BYTES, BASE_NONE, NULL, 0,
12783 NULL, HFILL }
12785 { &hf_mbim_stk_envelope_info_envelope_support,
12786 { "Envelope Support", "mbim.control.stk_envelope_info.envelope_support",
12787 FT_BYTES, BASE_NONE, NULL, 0,
12788 NULL, HFILL }
12790 { &hf_mbim_aka_auth_req_rand,
12791 { "RAND", "mbim.control.aka_auth_req.rand",
12792 FT_BYTES, BASE_NONE, NULL, 0,
12793 NULL, HFILL }
12795 { &hf_mbim_aka_auth_req_autn,
12796 { "AUTN", "mbim.control.aka_auth_req.autn",
12797 FT_BYTES, BASE_NONE, NULL, 0,
12798 NULL, HFILL }
12800 { &hf_mbim_aka_auth_info_res,
12801 { "RES", "mbim.control.aka_auth_info.res",
12802 FT_BYTES, BASE_NONE, NULL, 0,
12803 NULL, HFILL }
12805 { &hf_mbim_aka_auth_info_res_length,
12806 { "RES Length", "mbim.control.aka_auth_info.res_length",
12807 FT_UINT32, BASE_DEC, NULL, 0,
12808 NULL, HFILL }
12810 { &hf_mbim_aka_auth_info_ik,
12811 { "IK", "mbim.control.aka_auth_info.ik",
12812 FT_BYTES, BASE_NONE, NULL, 0,
12813 NULL, HFILL }
12815 { &hf_mbim_aka_auth_info_ck,
12816 { "CK", "mbim.control.aka_auth_info.ck",
12817 FT_BYTES, BASE_NONE, NULL, 0,
12818 NULL, HFILL }
12820 { &hf_mbim_aka_auth_info_auts,
12821 { "AUTS", "mbim.control.aka_auth_info.auts",
12822 FT_BYTES, BASE_NONE, NULL, 0,
12823 NULL, HFILL }
12825 { &hf_mbim_akap_auth_req_rand,
12826 { "RAND", "mbim.control.akap_auth_req.rand",
12827 FT_BYTES, BASE_NONE, NULL, 0,
12828 NULL, HFILL }
12830 { &hf_mbim_akap_auth_req_autn,
12831 { "AUTN", "mbim.control.akap_auth_req.autn",
12832 FT_BYTES, BASE_NONE, NULL, 0,
12833 NULL, HFILL }
12835 { &hf_mbim_akap_auth_req_network_name_offset,
12836 { "Network Name Offset", "mbim.control.akap_auth_req.network_name.offset",
12837 FT_UINT32, BASE_DEC, NULL, 0,
12838 NULL, HFILL }
12840 { &hf_mbim_akap_auth_req_network_name_length,
12841 { "Network Name Length", "mbim.control.akap_auth_req.network_name.length",
12842 FT_UINT32, BASE_DEC, NULL, 0,
12843 NULL, HFILL }
12845 { &hf_mbim_akap_auth_req_network_name,
12846 { "Network Name", "mbim.control.akap_auth_req.network_name",
12847 FT_STRING, BASE_NONE, NULL, 0,
12848 NULL, HFILL }
12850 { &hf_mbim_akap_auth_info_res,
12851 { "RES", "mbim.control.akap_auth_info.res",
12852 FT_BYTES, BASE_NONE, NULL, 0,
12853 NULL, HFILL }
12855 { &hf_mbim_akap_auth_info_res_length,
12856 { "RES Length", "mbim.control.akap_auth_info.res_length",
12857 FT_UINT32, BASE_DEC, NULL, 0,
12858 NULL, HFILL }
12860 { &hf_mbim_akap_auth_info_ik,
12861 { "IK", "mbim.control.akap_auth_info.ik",
12862 FT_BYTES, BASE_NONE, NULL, 0,
12863 NULL, HFILL }
12865 { &hf_mbim_akap_auth_info_ck,
12866 { "CK", "mbim.control.akap_auth_info.ck",
12867 FT_BYTES, BASE_NONE, NULL, 0,
12868 NULL, HFILL }
12870 { &hf_mbim_akap_auth_info_auts,
12871 { "AUTS", "mbim.control.akap_auth_info.auts",
12872 FT_BYTES, BASE_NONE, NULL, 0,
12873 NULL, HFILL }
12875 { &hf_mbim_sim_auth_req_rand1,
12876 { "RAND1", "mbim.control.sim_auth_req.rand1",
12877 FT_BYTES, BASE_NONE, NULL, 0,
12878 NULL, HFILL }
12880 { &hf_mbim_sim_auth_req_rand2,
12881 { "RAND2", "mbim.control.sim_auth_req.rand2",
12882 FT_BYTES, BASE_NONE, NULL, 0,
12883 NULL, HFILL }
12885 { &hf_mbim_sim_auth_req_rand3,
12886 { "RAND3", "mbim.control.sim_auth_req.rand3",
12887 FT_BYTES, BASE_NONE, NULL, 0,
12888 NULL, HFILL }
12890 { &hf_mbim_sim_auth_req_n,
12891 { "n", "mbim.control.sim_auth_req.n",
12892 FT_UINT32, BASE_DEC, NULL, 0,
12893 NULL, HFILL }
12895 { &hf_mbim_sim_auth_info_sres1,
12896 { "SRES1", "mbim.control.sim_auth_info.sres1",
12897 FT_UINT32, BASE_HEX, NULL, 0,
12898 NULL, HFILL }
12900 { &hf_mbim_sim_auth_info_kc1,
12901 { "KC1", "mbim.control.sim_auth_info.kc1",
12902 FT_UINT64, BASE_HEX, NULL, 0,
12903 NULL, HFILL }
12905 { &hf_mbim_sim_auth_info_sres2,
12906 { "SRES2", "mbim.control.sim_auth_info.sres2",
12907 FT_UINT32, BASE_HEX, NULL, 0,
12908 NULL, HFILL }
12910 { &hf_mbim_sim_auth_info_kc2,
12911 { "KC2", "mbim.control.sim_auth_info.kc2",
12912 FT_UINT64, BASE_HEX, NULL, 0,
12913 NULL, HFILL }
12915 { &hf_mbim_sim_auth_info_sres3,
12916 { "SRES3", "mbim.control.sim_auth_info.sres3",
12917 FT_UINT32, BASE_HEX, NULL, 0,
12918 NULL, HFILL }
12920 { &hf_mbim_sim_auth_info_kc3,
12921 { "KC3", "mbim.control.sim_auth_info.kc3",
12922 FT_UINT64, BASE_HEX, NULL, 0,
12923 NULL, HFILL }
12925 { &hf_mbim_sim_auth_info_n,
12926 { "n", "mbim.control.sim_auth_info.n",
12927 FT_UINT32, BASE_DEC, NULL, 0,
12928 NULL, HFILL }
12930 { &hf_mbim_set_dss_connect_device_service_id,
12931 { "Device Service Id", "mbim.control.set_dss_connect.device_service_id",
12932 FT_GUID, BASE_NONE, NULL, 0,
12933 NULL, HFILL }
12935 { &hf_mbim_set_dss_connect_dss_session_id,
12936 { "DSS Session Id", "mbim.control.set_dss_connect.dss_session_id",
12937 FT_UINT32, BASE_DEC, NULL, 0,
12938 NULL, HFILL }
12940 { &hf_mbim_set_dss_connect_dss_link_state,
12941 { "DSS Link State", "mbim.control.set_dss_connect.dss_link_state",
12942 FT_UINT32, BASE_DEC, VALS(mbim_dss_link_state_vals), 0,
12943 NULL, HFILL }
12945 { &hf_mbim_multicarrier_capabilities_info_capabilities,
12946 { "Capabilities", "mbim.control.multicarrier_capabilities_info.capabilities",
12947 FT_UINT32, BASE_HEX, NULL, 0,
12948 NULL, HFILL }
12950 { &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan,
12951 { "Static Scan", "mbim.control.multicarrier_capabilities_info.capabilities.static_scan",
12952 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
12953 NULL, HFILL }
12955 { &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot,
12956 { "FW Requires Reboot", "mbim.control.multicarrier_capabilities_info.capabilities.fw_requires_reboot",
12957 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
12958 NULL, HFILL }
12960 { &hf_mbim_location_info_country,
12961 { "Country", "mbim.control.location_info.country",
12962 FT_UINT32, BASE_HEX|BASE_EXT_STRING, &mbim_geoid_vals_ext, 0,
12963 NULL, HFILL }
12965 { &hf_mbim_multicarrier_current_cid_list_req_uuid,
12966 { "UUID", "mbim.control.multicarrier_current_cid_list_req.uuid",
12967 FT_GUID, BASE_NONE, NULL, 0,
12968 NULL, HFILL }
12970 { &hf_mbim_multicarrier_current_cid_list_info_cid_count,
12971 { "CID Count", "mbim.control.multicarrier_current_cid_list_info.cid_count",
12972 FT_UINT32, BASE_DEC, NULL, 0,
12973 NULL, HFILL }
12975 { &hf_mbim_multicarrier_current_cid_list_info_cid,
12976 { "CID", "mbim.control.multicarrier_current_cid_list_info.cid",
12977 FT_UINT32, BASE_DEC, VALS(mbim_uuid_multicarrier_cid_vals), 0,
12978 NULL, HFILL }
12980 { &hf_mbim_msfwid_firmwareid_info_firmware_id,
12981 { "Firmware Id", "mbim.control.msfwid_firmwareid_info.firmware_id",
12982 FT_GUID, BASE_NONE, NULL, 0,
12983 NULL, HFILL }
12985 { &hf_mbim_qmi_buffer,
12986 { "Buffer", "mbim.control.qmi.buffer",
12987 FT_BYTES, BASE_NONE, NULL, 0,
12988 NULL, HFILL }
12990 { &hf_mbim_thermal_config_enable,
12991 { "Enable", "mbim.control.thermal_config.enable",
12992 FT_UINT32, BASE_DEC, VALS(mbim_thermal_config_enable_vals), 0,
12993 NULL, HFILL }
12995 { &hf_mbim_thermal_config_temp_sensor_id,
12996 { "Temperature Sensor ID", "mbim.control.thermal_config.temp_sensor_id",
12997 FT_UINT32, BASE_DEC, NULL, 0,
12998 NULL, HFILL }
13000 { &hf_mbim_thermal_config_alarm_id,
13001 { "Alarm ID", "mbim.control.thermal_config.alarm_id",
13002 FT_UINT32, BASE_DEC, NULL, 0,
13003 NULL, HFILL }
13005 { &hf_mbim_thermal_config_threshold_value,
13006 { "Threshold Value", "mbim.control.thermal_config.threshold_value",
13007 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13008 NULL, HFILL }
13010 { &hf_mbim_thermal_config_hyst_value,
13011 { "Hysteresis Value", "mbim.control.thermal_config.hyst_value",
13012 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13013 NULL, HFILL }
13015 { &hf_mbim_thermal_config_sampling_period,
13016 { "Sampling Period", "mbim.control.thermal_config.sampling_period",
13017 FT_UINT32, BASE_DEC, NULL, 0,
13018 NULL, HFILL }
13020 { &hf_mbim_query_thermal_state_temp_sensor_id,
13021 { "Temperature Sensor ID", "mbim.control.query_thermal_state.temp_sensor_id",
13022 FT_UINT32, BASE_DEC, NULL, 0,
13023 NULL, HFILL }
13025 { &hf_mbim_thermal_state_info_current_temp_value,
13026 { "Current Temperature Value", "mbim.control.thermal_state_info.current_temp_value",
13027 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13028 NULL, HFILL }
13030 { &hf_mbim_thermal_state_info_enable,
13031 { "Enable", "mbim.control.thermal_state_info.enable",
13032 FT_UINT32, BASE_DEC, VALS(mbim_thermal_config_enable_vals), 0,
13033 NULL, HFILL }
13035 { &hf_mbim_thermal_state_info_temp_sensor_id,
13036 { "Temperature Sensor ID", "mbim.control.thermal_state_info.temp_sensor_id",
13037 FT_UINT32, BASE_DEC, NULL, 0,
13038 NULL, HFILL }
13040 { &hf_mbim_thermal_state_info_alarm_id,
13041 { "Alarm ID", "mbim.control.thermal_state_info.alarm_id",
13042 FT_UINT32, BASE_DEC, NULL, 0,
13043 NULL, HFILL }
13045 { &hf_mbim_thermal_state_info_threshold_value,
13046 { "Threshold Value", "mbim.control.thermal_state_info.threshold_value",
13047 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13048 NULL, HFILL }
13050 { &hf_mbim_thermal_state_info_hyst_value,
13051 { "Hysteresis Value", "mbim.control.thermal_state_info.hyst_value",
13052 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13053 NULL, HFILL }
13055 { &hf_mbim_thermal_state_info_sampling_period,
13056 { "Sampling Period", "mbim.control.thermal_state_info.sampling_period",
13057 FT_UINT32, BASE_DEC, NULL, 0,
13058 NULL, HFILL }
13060 { &hf_mbim_sar_config_sar_status,
13061 { "SAR Status", "mbim.control.sar_config.sar_status",
13062 FT_UINT32, BASE_DEC, VALS(mbim_sar_status_vals), 0,
13063 NULL, HFILL }
13065 { &hf_mbim_sar_config_level,
13066 { "Level", "mbim.control.sar_config.level",
13067 FT_UINT32, BASE_DEC, NULL, 0,
13068 NULL, HFILL }
13070 { &hf_mbim_ms_sar_config_sar_mode,
13071 { "SAR Mode", "mbim.control.ms_sar_config.sar_mode",
13072 FT_UINT32, BASE_DEC, VALS(mbim_ms_sar_config_sar_mode_vals), 0,
13073 NULL, HFILL }
13075 { &hf_mbim_ms_sar_config_sar_backoff_status,
13076 { "SAR Backoff Status", "mbim.control.ms_sar_config.sar_backoff_status",
13077 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0,
13078 NULL, HFILL }
13080 { &hf_mbim_ms_sar_config_sar_wifi_Integration,
13081 { "SAR Wifi Integration", "mbim.control.ms_sar_config.sar_wifi_integration",
13082 FT_UINT32, BASE_DEC, VALS(mbim_ms_sar_config_sar_wifi_integration_vals), 0,
13083 NULL, HFILL }
13085 { &hf_mbim_ms_sar_config_element_count,
13086 { "Element Count", "mbim.control.ms_sar_config.element_count",
13087 FT_UINT32, BASE_DEC, NULL, 0,
13088 NULL, HFILL }
13090 { &hf_mbim_ms_sar_config_element_offset,
13091 { "Element Offset", "mbim.control.ms_sar_config.element_offset",
13092 FT_UINT32, BASE_DEC, NULL, 0,
13093 NULL, HFILL }
13095 { &hf_mbim_ms_sar_config_element_size,
13096 { "Element Size", "mbim.control.ms_sar_config.element_size",
13097 FT_UINT32, BASE_DEC, NULL, 0,
13098 NULL, HFILL }
13100 { &hf_mbim_ms_sar_config_state_sar_antenna_index,
13101 { "SAR Antenna Index", "mbim.control.ms_sar_config.sar_antenna_index",
13102 FT_UINT32, BASE_DEC, NULL, 0,
13103 NULL, HFILL }
13105 { &hf_mbim_ms_sar_config_state_sar_backoff_index,
13106 { "SAR Backoff Index", "mbim.control.ms_sar_config.sar_backoff_index",
13107 FT_UINT32, BASE_DEC, NULL, 0,
13108 NULL, HFILL }
13110 { &hf_mbim_ms_transmission_status_channel_notification,
13111 { "Transmission Channel Notification", "mbim.control.ms_transmission_status.channel_notification",
13112 FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0,
13113 NULL, HFILL }
13115 { &hf_mbim_ms_transmission_status_transmission_status,
13116 { "Transmission Status", "mbim.control.ms_transmission_status.transmission_status",
13117 FT_BOOLEAN, BASE_NONE, TFS(&tfs_active_inactive), 0,
13118 NULL, HFILL }
13120 { &hf_mbim_ms_transmission_status_hysteresis_timer,
13121 { "Hysteresis Timer", "mbim.control.ms_transmission_status.hysteresis_timer",
13122 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
13123 NULL, HFILL }
13125 { &hf_mbim_adpclk_activate_state,
13126 { "State", "mbim.control.adpclk_activate.state",
13127 FT_UINT32, BASE_DEC, VALS(mbim_adpclk_activate_state_vals), 0,
13128 NULL, HFILL }
13130 { &hf_mbim_adpclk_freq_info_elem_count,
13131 { "Element Count", "mbim.control.adpclk_freq_info.elem_count",
13132 FT_UINT32, BASE_DEC, NULL, 0,
13133 NULL, HFILL }
13135 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_offset,
13136 { "ADPCLK Freq Value Offset", "mbim.control.adpclk_freq_info.adpclk_freq_value.offset",
13137 FT_UINT32, BASE_DEC, NULL, 0,
13138 NULL, HFILL }
13140 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_size,
13141 { "ADPCLK Freq Value Size", "mbim.control.adpclk_freq_info.adpclk_freq_value.size",
13142 FT_UINT32, BASE_DEC, NULL, 0,
13143 NULL, HFILL }
13145 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq,
13146 { "Center Frequency", "mbim.control.adpclk_freq_info.adpclk_freq_value.center_freq",
13147 FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_hz), 0,
13148 NULL, HFILL }
13150 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread,
13151 { "Frequency Spread", "mbim.control.adpclk_freq_info.adpclk_freq_value.freq_spread",
13152 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_hz), 0,
13153 NULL, HFILL }
13155 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power,
13156 { "Noise Power", "mbim.control.adpclk_freq_info.adpclk_freq_value.noise_power",
13157 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13158 NULL, HFILL }
13160 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi,
13161 { "Relative Signal Strength Indication", "mbim.control.adpclk_freq_info.adpclk_freq_value.rssi",
13162 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13163 NULL, HFILL }
13165 { &hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status,
13166 { "Connect Status", "mbim.control.adpclk_freq_info.adpclk_freq_value.connect_status",
13167 FT_UINT32, BASE_DEC, VALS(mbim_connect_status_vals), 0,
13168 NULL, HFILL }
13170 { &hf_mbim_trace_config_config,
13171 { "Configuration", "mbim.control.trace_config.config",
13172 FT_UINT32, BASE_DEC, VALS(mbim_trace_config_vals), 0,
13173 NULL, HFILL }
13175 { &hf_mbim_nrtc_app_info_period,
13176 { "Period", "mbim.control.nrtc_app_info.period",
13177 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0,
13178 NULL, HFILL }
13180 { &hf_mbim_nrtc_app_info_duration,
13181 { "Duration", "mbim.control.nrtc_app_info.duration",
13182 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0,
13183 NULL, HFILL }
13185 { &hf_mbim_nrtcws_config_mode,
13186 { "Mode", "mbim.control.nrtcws_config.mode",
13187 FT_UINT16, BASE_DEC, NULL, 0,
13188 NULL, HFILL }
13190 { &hf_mbim_nrtcws_config_wlan_active,
13191 { "WLAN Active", "mbim.control.nrtcws_config.wlan_active",
13192 FT_UINT16, BASE_DEC, NULL, 0,
13193 NULL, HFILL }
13195 { &hf_mbim_nrtcws_config_wlan_safe_rx,
13196 { "WLAN Safe Rx", "mbim.control.nrtcws_config.wlan_safe_rx",
13197 FT_UINT16, BASE_DEC, NULL, 0,
13198 NULL, HFILL }
13200 { &hf_mbim_nrtcws_config_wlan_bandwidth,
13201 { "WLAN Bandwidth", "mbim.control.nrtcws_config.wlan_bandwidth",
13202 FT_UINT16, BASE_DEC, NULL, 0,
13203 NULL, HFILL }
13205 { &hf_mbim_nrtcws_config_bt_active,
13206 { "BT Active", "mbim.control.nrtcws_config.bt_active",
13207 FT_UINT16, BASE_DEC, NULL, 0,
13208 NULL, HFILL }
13210 { &hf_mbim_nrtcws_config_bt_safe_rx,
13211 { "BT Safe Rx", "mbim.control.nrtcws_config.bt_safe_rx",
13212 FT_UINT16, BASE_DEC, NULL, 0,
13213 NULL, HFILL }
13215 { &hf_mbim_nrtcws_info_lte_active,
13216 { "LTE Active", "mbim.control.nrtcws_info.lte_active",
13217 FT_UINT16, BASE_DEC, NULL, 0,
13218 NULL, HFILL }
13220 { &hf_mbim_nrtcws_info_wlan_safe_rx_min,
13221 { "WLAN Safe Rx Min", "mbim.control.nrtcws_info.wlan_safe_rx_min",
13222 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13223 NULL, HFILL }
13225 { &hf_mbim_nrtcws_info_wlan_safe_rx_max,
13226 { "WLAN Safe Rx Max", "mbim.control.nrtcws_info.wlan_safe_rx_max",
13227 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13228 NULL, HFILL }
13230 { &hf_mbim_nrtcws_info_bt_safe_rx_min,
13231 { "BT Safe Rx Min", "mbim.control.nrtcws_info.bt_safe_rx_min",
13232 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13233 NULL, HFILL }
13235 { &hf_mbim_nrtcws_info_bt_safe_rx_max,
13236 { "BT Safe Rx Max", "mbim.control.nrtcws_info.bt_safe_rx_max",
13237 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13238 NULL, HFILL }
13240 { &hf_mbim_nrtcws_info_lte_sps_period,
13241 { "LTE SPS Periodicity", "mbim.control.nrtcws_info.lte_sps_period",
13242 FT_UINT16, BASE_DEC, NULL, 0,
13243 NULL, HFILL }
13245 { &hf_mbim_nrtcws_info_lte_sps_duration,
13246 { "LTE SPS Duration", "mbim.control.nrtcws_info.lte_sps_duration",
13247 FT_UINT16, BASE_DEC, NULL, 0,
13248 NULL, HFILL }
13250 { &hf_mbim_nrtcws_info_lte_sps_initial_offset,
13251 { "LTE SPS Initial Offset", "mbim.control.nrtcws_info.lte_sps_initial_offset",
13252 FT_UINT16, BASE_DEC, NULL, 0,
13253 NULL, HFILL }
13255 { &hf_mbim_usbprofile_cmd_length,
13256 { "Length", "mbim.control.usbprofile_cmd.length",
13257 FT_UINT32, BASE_DEC, NULL, 0,
13258 NULL, HFILL }
13260 { &hf_mbim_usbprofile_cmd_buffer,
13261 { "Buffer", "mbim.control.usbprofile_cmd.buffer",
13262 FT_STRING, BASE_NONE, NULL, 0,
13263 NULL, HFILL }
13265 { &hf_mbim_usbprofile_rsp_length,
13266 { "Length", "mbim.control.usbprofile_rsp.length",
13267 FT_UINT32, BASE_DEC, NULL, 0,
13268 NULL, HFILL }
13270 { &hf_mbim_usbprofile_rsp_buffer,
13271 { "Buffer", "mbim.control.usbprofile_rsp.buffer",
13272 FT_STRING, BASE_NONE, NULL, 0,
13273 NULL, HFILL }
13275 { &hf_mbim_ciq_set_mode,
13276 { "Mode", "mbim.control.ciq_set.mode",
13277 FT_UINT32, BASE_DEC, NULL, 0,
13278 NULL, HFILL }
13280 { &hf_mbim_ciq_set_debug_info_size,
13281 { "Debug Info Size", "mbim.control.ciq_set.debug_info.size",
13282 FT_UINT32, BASE_DEC, NULL, 0,
13283 NULL, HFILL }
13285 { &hf_mbim_ciq_set_debug_info,
13286 { "Debug Info", "mbim.control.ciq_set.debug_info",
13287 FT_STRING, BASE_NONE, NULL, 0,
13288 NULL, HFILL }
13290 { &hf_mbim_ciq_info_mode,
13291 { "Mode", "mbim.control.ciq_info.mode",
13292 FT_UINT32, BASE_DEC, NULL, 0,
13293 NULL, HFILL }
13295 { &hf_mbim_atds_signal_info_rssi,
13296 { "RSSI", "mbim.control.atds_signal_info.rssi",
13297 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
13298 NULL, HFILL }
13300 { &hf_mbim_atds_signal_info_ber,
13301 { "BER", "mbim.control.atds_signal_info.ber",
13302 FT_UINT32, BASE_DEC, VALS(mbim_ber_vals), 0,
13303 NULL, HFILL }
13305 { &hf_mbim_atds_signal_info_rscp,
13306 { "RSCP", "mbim.control.atds_signal_info.rscp",
13307 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rscp_fmt), 0,
13308 NULL, HFILL }
13310 { &hf_mbim_atds_signal_info_ecno,
13311 { "Ec/No", "mbim.control.atds_signal_info.ecno",
13312 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_ecno_fmt), 0,
13313 NULL, HFILL }
13315 { &hf_mbim_atds_signal_info_rsrq,
13316 { "RSRQ", "mbim.control.atds_signal_info.rsrq",
13317 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrq_fmt), 0,
13318 NULL, HFILL }
13320 { &hf_mbim_atds_signal_info_rsrp,
13321 { "RSRP", "mbim.control.atds_signal_info.rsrp",
13322 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrp_fmt), 0,
13323 NULL, HFILL }
13325 { &hf_mbim_atds_signal_info_rssnr,
13326 { "RS SNR", "mbim.control.atds_signal_info.rssnr",
13327 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssnr_fmt), 0,
13328 NULL, HFILL }
13330 { &hf_mbim_atds_location_info_lac,
13331 { "Location Area Code", "mbim.control.atds_location_info.lac",
13332 FT_UINT32, BASE_HEX_DEC, NULL, 0,
13333 NULL, HFILL }
13335 { &hf_mbim_atds_location_info_tac,
13336 { "Tracking Area Code", "mbim.control.atds_location_info.tac",
13337 FT_UINT32, BASE_HEX_DEC, NULL, 0,
13338 NULL, HFILL }
13340 { &hf_mbim_atds_location_info_cellid,
13341 { "Cell Identity", "mbim.control.atds_location_info.cellid",
13342 FT_UINT32, BASE_HEX_DEC, NULL, 0,
13343 NULL, HFILL }
13345 { &hf_mbim_atds_operator_provider_id_offset,
13346 { "Provider Id Offset", "mbim.control.atds_operator.provider_id_offset",
13347 FT_UINT32, BASE_DEC, NULL, 0,
13348 NULL, HFILL }
13350 { &hf_mbim_atds_operator_provider_id_size,
13351 { "Provider Id Size", "mbim.control.atds_operator.provider_id_size",
13352 FT_UINT32, BASE_DEC, NULL, 0,
13353 NULL, HFILL }
13355 { &hf_mbim_atds_operator_provider_state,
13356 { "Provider State", "mbim.control.atds_operator.provider_state",
13357 FT_UINT32, BASE_HEX, NULL, 0,
13358 NULL, HFILL }
13360 { &hf_mbim_atds_operator_provider_name_offset,
13361 { "Provider Name Offset", "mbim.control.atds_operator.provider_name_offset",
13362 FT_UINT32, BASE_DEC, NULL, 0,
13363 NULL, HFILL }
13365 { &hf_mbim_atds_operator_provider_name_size,
13366 { "Provider Name Size", "mbim.control.atds_operator.provider_name_size",
13367 FT_UINT32, BASE_DEC, NULL, 0,
13368 NULL, HFILL }
13370 { &hf_mbim_atds_operator_plmn_mode,
13371 { "PLMN Mode", "mbim.control.atds_operator.plmn_mode",
13372 FT_UINT32, BASE_DEC, VALS(mbim_atds_operator_plmn_mode_vals), 0,
13373 NULL, HFILL }
13375 { &hf_mbim_atds_operator_rssi,
13376 { "RSSI", "mbim.control.atds_operator.rssi",
13377 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
13378 NULL, HFILL }
13380 { &hf_mbim_atds_operator_error_rate,
13381 { "Error Rate", "mbim.control.atds_operator.error_rate",
13382 FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
13383 NULL, HFILL }
13385 { &hf_mbim_atds_operator_provider_id,
13386 { "Provider Id", "mbim.control.atds_operator.provider_id",
13387 FT_STRING, BASE_NONE, NULL, 0,
13388 NULL, HFILL }
13390 { &hf_mbim_atds_operator_provider_name,
13391 { "Provider Name", "mbim.control.atds_operator.provider_name",
13392 FT_STRING, BASE_NONE, NULL, 0,
13393 NULL, HFILL }
13395 { &hf_mbim_atds_operators_elem_count,
13396 { "Element Count", "mbim.control.atds_operators.elem_count",
13397 FT_UINT32, BASE_DEC, NULL, 0,
13398 NULL, HFILL }
13400 { &hf_mbim_atds_operators_operator_offset,
13401 { "Provider Offset", "mbim.control.atds_operators.provider_offset",
13402 FT_UINT32, BASE_DEC, NULL, 0,
13403 NULL, HFILL }
13405 { &hf_mbim_atds_operators_operator_size,
13406 { "Provider Size", "mbim.control.atds_operators.provider_size",
13407 FT_UINT32, BASE_DEC, NULL, 0,
13408 NULL, HFILL }
13410 { &hf_mbim_atds_rat_info_mode,
13411 { "Mode", "mbim.control.atds_rat_info.mode",
13412 FT_UINT32, BASE_DEC, VALS(mbim_adts_rat_info_mode_vals), 0,
13413 NULL, HFILL }
13415 { &hf_mbim_atds_projection_table_type,
13416 { "Type", "mbim.control.atds_projection_table.type",
13417 FT_UINT32, BASE_DEC, VALS(mbim_adts_projection_table_type_vals), 0,
13418 NULL, HFILL }
13420 { &hf_mbim_atds_projection_table_bar5min,
13421 { "Bar5 Min", "mbim.control.atds_projection_table.bar5min",
13422 FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13423 NULL, HFILL }
13425 { &hf_mbim_atds_projection_table_a5,
13426 { "A5", "mbim.control.atds_projection_table.a5",
13427 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13428 NULL, HFILL }
13430 { &hf_mbim_atds_projection_table_b5,
13431 { "B5", "mbim.control.atds_projection_table.b5",
13432 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13433 NULL, HFILL }
13435 { &hf_mbim_atds_projection_table_bar4min,
13436 { "Bar4 Min", "mbim.control.atds_projection_table.bar4min",
13437 FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13438 NULL, HFILL }
13440 { &hf_mbim_atds_projection_table_a4,
13441 { "A4", "mbim.control.atds_projection_table.a4",
13442 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13443 NULL, HFILL }
13445 { &hf_mbim_atds_projection_table_b4,
13446 { "B4", "mbim.control.atds_projection_table.b4",
13447 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13448 NULL, HFILL }
13450 { &hf_mbim_atds_projection_table_bar3min,
13451 { "Bar3 Min", "mbim.control.atds_projection_table.bar3min",
13452 FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13453 NULL, HFILL }
13455 { &hf_mbim_atds_projection_table_a3,
13456 { "A3", "mbim.control.atds_projection_table.a3",
13457 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13458 NULL, HFILL }
13460 { &hf_mbim_atds_projection_table_b3,
13461 { "B3", "mbim.control.atds_projection_table.b3",
13462 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13463 NULL, HFILL }
13465 { &hf_mbim_atds_projection_table_bar2min,
13466 { "Bar2 Min", "mbim.control.atds_projection_table.bar2min",
13467 FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13468 NULL, HFILL }
13470 { &hf_mbim_atds_projection_table_a2,
13471 { "A2", "mbim.control.atds_projection_table.a2",
13472 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13473 NULL, HFILL }
13475 { &hf_mbim_atds_projection_table_b2,
13476 { "B2", "mbim.control.atds_projection_table.b2",
13477 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13478 NULL, HFILL }
13480 { &hf_mbim_atds_projection_table_bar1min,
13481 { "Bar1 Min", "mbim.control.atds_projection_table.bar1min",
13482 FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13483 NULL, HFILL }
13485 { &hf_mbim_atds_projection_table_a1,
13486 { "A1", "mbim.control.atds_projection_table.a1",
13487 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13488 NULL, HFILL }
13490 { &hf_mbim_atds_projection_table_b1,
13491 { "B1", "mbim.control.atds_projection_table.b1",
13492 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13493 NULL, HFILL }
13495 { &hf_mbim_atds_projection_table_bar0min,
13496 { "Bar0 Min", "mbim.control.atds_projection_table.bar0min",
13497 FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13498 NULL, HFILL }
13500 { &hf_mbim_atds_projection_table_a0,
13501 { "A0", "mbim.control.atds_projection_table.a0",
13502 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13503 NULL, HFILL }
13505 { &hf_mbim_atds_projection_table_b0,
13506 { "B0", "mbim.control.atds_projection_table.b0",
13507 FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13508 NULL, HFILL }
13510 { &hf_mbim_atds_projection_tables_elem_count,
13511 { "Element Count", "mbim.control.atds_projection_tables.elem_count",
13512 FT_UINT32, BASE_DEC, NULL, 0,
13513 NULL, HFILL }
13515 { &hf_mbim_atds_projection_tables_projection_table_offset,
13516 { "Projection Table Offset", "mbim.control.atds_projection_tables.projection_table_offset",
13517 FT_UINT32, BASE_DEC, NULL, 0,
13518 NULL, HFILL }
13520 { &hf_mbim_atds_projection_tables_projection_table_size,
13521 { "Projection Table Size", "mbim.control.atds_projection_tables.projection_table_size",
13522 FT_UINT32, BASE_DEC, NULL, 0,
13523 NULL, HFILL }
13525 { &hf_mbim_multiflow_caps_info_control_caps,
13526 { "Control Caps", "mbim.control.multiflow_caps_info.control_caps",
13527 FT_UINT32, BASE_HEX, NULL, 0,
13528 NULL, HFILL }
13530 { &hf_mbim_multiflow_caps_info_control_caps_uplink,
13531 { "Uplink", "mbim.control.multiflow_caps_info.control_caps.uplink",
13532 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
13533 NULL, HFILL }
13535 { &hf_mbim_multiflow_caps_info_control_caps_downlink,
13536 { "Downlink", "mbim.control.multiflow_caps_info.control_caps.downlink",
13537 FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
13538 NULL, HFILL }
13540 { &hf_mbim_set_multiflow_state_state,
13541 { "State", "mbim.control.set_multiflow_state.state",
13542 FT_UINT32, BASE_DEC, VALS(mbim_multiflow_state_vals), 0,
13543 NULL, HFILL }
13545 { &hf_mbim_multiflow_state_info_state,
13546 { "State", "mbim.control.multiflow_state_info.state",
13547 FT_UINT32, BASE_DEC, VALS(mbim_multiflow_state_vals), 0,
13548 NULL, HFILL }
13550 { &hf_mbim_multiflow_tft_info_session_id,
13551 { "Session Id", "mbim.control.multiflow_tft_info.session_id",
13552 FT_UINT32, BASE_DEC, NULL, 0,
13553 NULL, HFILL }
13555 { &hf_mbim_multiflow_tft_info_elem_count,
13556 { "Element Count", "mbim.control.multiflow_tft_info.elem_count",
13557 FT_UINT32, BASE_DEC, NULL, 0,
13558 NULL, HFILL }
13560 { &hf_mbim_multiflow_tft_info_tft_list_offset,
13561 { "TFT List Offset", "mbim.control.multiflow_tft_info.tft_list_offset",
13562 FT_UINT32, BASE_DEC, NULL, 0,
13563 NULL, HFILL }
13565 { &hf_mbim_multiflow_tft_info_tft_list_size,
13566 { "TFT List Size", "mbim.control.multiflow_tft_info.tft_list_size",
13567 FT_UINT32, BASE_DEC, NULL, 0,
13568 NULL, HFILL }
13570 { &hf_mbim_set_ms_provisioned_context_v2_operation,
13571 { "Operation", "mbim.control.set_ms_provisioned_context_v2.operation",
13572 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_operations_vals), 0,
13573 NULL, HFILL }
13575 { &hf_mbim_set_ms_provisioned_context_v2_ip_type,
13576 { "IP Type", "mbim.control.set_ms_provisioned_context_v2.ip_type",
13577 FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
13578 NULL, HFILL }
13580 { &hf_mbim_set_ms_provisioned_context_v2_enable,
13581 { "Enable", "mbim.control.set_ms_provisioned_context_v2.enable",
13582 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_enable_vals), 0,
13583 NULL, HFILL }
13585 { &hf_mbim_set_ms_provisioned_context_v2_roaming,
13586 { "Roaming", "mbim.control.set_ms_provisioned_context_v2.roaming",
13587 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_roaming_control_vals), 0,
13588 NULL, HFILL }
13590 { &hf_mbim_set_ms_provisioned_context_v2_media_type,
13591 { "Media Type", "mbim.control.set_ms_provisioned_context_v2.media_type",
13592 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_media_type_vals), 0,
13593 NULL, HFILL }
13595 { &hf_mbim_set_ms_provisioned_context_v2_source,
13596 { "Source", "mbim.control.set_ms_provisioned_context_v2.source",
13597 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_source_vals), 0,
13598 NULL, HFILL }
13600 { &hf_mbim_set_ms_provisioned_context_v2_access_string,
13601 { "Access String", "mbim.control.set_ms_provisioned_context_v2.access_string",
13602 FT_STRING, BASE_NONE, NULL, 0,
13603 NULL, HFILL }
13605 { &hf_mbim_set_ms_provisioned_context_v2_access_string_offset,
13606 { "Access String Offset", "mbim.control.set_ms_provisioned_context_v2.access_string_offset",
13607 FT_UINT32, BASE_DEC, NULL, 0,
13608 NULL, HFILL }
13610 { &hf_mbim_set_ms_provisioned_context_v2_access_string_size,
13611 { "Access String Size", "mbim.control.set_ms_provisioned_context_v2.access_string_size",
13612 FT_UINT32, BASE_DEC, NULL, 0,
13613 NULL, HFILL }
13615 { &hf_mbim_set_ms_provisioned_context_v2_user_name,
13616 { "User Name", "mbim.control.set_ms_provisioned_context_v2.user_name",
13617 FT_STRING, BASE_NONE, NULL, 0,
13618 NULL, HFILL }
13620 { &hf_mbim_set_ms_provisioned_context_v2_user_name_offset,
13621 { "User Name Offset", "mbim.control.set_ms_provisioned_context_v2.user_name_offset",
13622 FT_UINT32, BASE_DEC, NULL, 0,
13623 NULL, HFILL }
13625 { &hf_mbim_set_ms_provisioned_context_v2_user_name_size,
13626 { "User Name Size", "mbim.control.set_ms_provisioned_context_v2.user_name_size",
13627 FT_UINT32, BASE_DEC, NULL, 0,
13628 NULL, HFILL }
13630 { &hf_mbim_set_ms_provisioned_context_v2_password,
13631 { "Password", "mbim.control.set_ms_provisioned_context_v2.password",
13632 FT_STRING, BASE_NONE, NULL, 0,
13633 NULL, HFILL }
13635 { &hf_mbim_set_ms_provisioned_context_v2_password_offset,
13636 { "Password Offset", "mbim.control.set_ms_provisioned_context_v2.password_offset",
13637 FT_UINT32, BASE_DEC, NULL, 0,
13638 NULL, HFILL }
13640 { &hf_mbim_set_ms_provisioned_context_v2_password_size,
13641 { "Password Size", "mbim.control.set_ms_provisioned_context_v2.password_size",
13642 FT_UINT32, BASE_DEC, NULL, 0,
13643 NULL, HFILL }
13645 { &hf_mbim_set_ms_provisioned_context_v2_compression,
13646 { "Compression", "mbim.control.set_ms_provisioned_context_v2.compression",
13647 FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
13648 NULL, HFILL }
13650 { &hf_mbim_set_ms_provisioned_context_v2_auth_protocol,
13651 { "Auth Protocol", "mbim.control.set_ms_provisioned_context_v2.auth_protocol",
13652 FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
13653 NULL, HFILL }
13655 { &hf_mbim_ms_provisioned_context_info_v2_elem_count,
13656 { "Element Count", "mbim.control.ms_provisioned_context_info_v2.auth_protocol",
13657 FT_UINT32, BASE_DEC, NULL, 0,
13658 NULL, HFILL }
13660 { &hf_mbim_ms_provisioned_context_info_v2_list_offset,
13661 { "Item Offset", "mbim.control.ms_provisioned_context_info_v2.list_offset",
13662 FT_UINT32, BASE_DEC, NULL, 0,
13663 NULL, HFILL }
13665 { &hf_mbim_ms_provisioned_context_info_v2_list_size,
13666 { "Item Size", "mbim.control.ms_provisioned_context_info_v2.list_size",
13667 FT_UINT32, BASE_DEC, NULL, 0,
13668 NULL, HFILL }
13670 { &hf_mbim_ms_provisioned_context_info_v2_context_id,
13671 { "Context ID", "mbim.control.ms_provisioned_context_info_v2.context_id",
13672 FT_UINT32, BASE_DEC, NULL, 0,
13673 NULL, HFILL }
13675 { &hf_mbim_ms_network_blacklist_state_sim_provider_actuated,
13676 { "SIM Provide Actuated", "mbim.control.ms_provisioned_context_info_v2.sim_provider_actuated",
13677 FT_BOOLEAN, 32, TFS(&tfs_activated_deactivated), 0x00000001,
13678 NULL, HFILL }
13680 { &hf_mbim_ms_network_blacklist_state_network_provider_actuated,
13681 { "Network Provider Actuated", "mbim.control.ms_provisioned_context_info_v2.network_provider_actuated",
13682 FT_BOOLEAN, 32, TFS(&tfs_activated_deactivated), 0x00000002,
13683 NULL, HFILL }
13685 { &hf_mbim_ms_network_blacklist_info_blacklist_state,
13686 { "Blacklist State", "mbim.control.mbim_ms_network_blacklist_info.blacklist_state",
13687 FT_UINT32, BASE_DEC, NULL, 0,
13688 NULL, HFILL }
13690 { &hf_mbim_ms_network_blacklist_info_elem_count,
13691 { "Element Count", "mbim.control.mbim_ms_network_blacklist_info.elem_count",
13692 FT_UINT32, BASE_DEC, NULL, 0,
13693 NULL, HFILL }
13695 { &hf_mbim_ms_network_blacklist_info_list_offset,
13696 { "Provider Blacklist Offset", "mbim.control.mbim_ms_network_blacklist_info.item_offset",
13697 FT_UINT32, BASE_DEC, NULL, 0,
13698 NULL, HFILL }
13700 { &hf_mbim_ms_network_blacklist_info_list_size,
13701 { "Provider Blacklist Size", "mbim.control.mbim_ms_network_blacklist_info.item_size",
13702 FT_UINT32, BASE_DEC, NULL, 0,
13703 NULL, HFILL }
13705 { &hf_mbim_ms_network_blacklist_provider_mcc,
13706 { "MCC", "mbim.control.ms_network_blacklist_provider.mcc",
13707 FT_UINT32, BASE_DEC, NULL, 0,
13708 NULL, HFILL }
13710 { &hf_mbim_ms_network_blacklist_provider_mnc,
13711 { "MNC", "mbim.control.ms_network_blacklist_provider.mnc",
13712 FT_UINT32, BASE_DEC, NULL, 0,
13713 NULL, HFILL }
13715 { &hf_mbim_ms_network_blacklist_provider_type,
13716 { "Blacklist Type", "mbim.control.ms_network_blacklist_provider.blacklist_type",
13717 FT_UINT32, BASE_DEC, VALS(mbim_ms_network_blacklist_type_vals), 0,
13718 NULL, HFILL }
13720 { &hf_mbim_sys_caps_info_number_of_executors,
13721 { "Number of Executors", "mbim.control.sys_caps_info.number_of_executors",
13722 FT_UINT32, BASE_DEC, NULL, 0,
13723 NULL, HFILL }
13725 { &hf_mbim_sys_caps_info_number_of_slots,
13726 { "Number of Slots", "mbim.control.sys_caps_info.number_of_slots",
13727 FT_UINT32, BASE_DEC, NULL, 0,
13728 NULL, HFILL }
13730 { &hf_mbim_sys_caps_info_concurrency,
13731 { "Concurrency", "mbim.control.sys_caps_info.concurrency",
13732 FT_UINT32, BASE_DEC, NULL, 0,
13733 NULL, HFILL }
13735 { &hf_mbim_sys_caps_info_modem_id,
13736 { "Modem Id", "mbim.control.sys_caps_info.modem_id",
13737 FT_UINT64, BASE_HEX, NULL, 0,
13738 NULL, HFILL }
13740 { &hf_mbim_ms_set_lte_attach_operation,
13741 { "Operation", "mbim.control.set_lte_attach.operation",
13742 FT_UINT32, BASE_DEC, VALS(mbim_ms_set_lte_attach_operations_vals), 0,
13743 NULL, HFILL }
13745 { &hf_mbim_ms_lte_attach_context_count,
13746 { "Context Count", "mbim.control.ms_lte_attach_context.count",
13747 FT_UINT32, BASE_DEC, NULL, 0,
13748 NULL, HFILL }
13750 { &hf_mbim_ms_lte_attach_context_offset,
13751 { "Context Offset", "mbim.control.ms_lte_attach_context.offset",
13752 FT_UINT32, BASE_DEC, NULL, 0,
13753 NULL, HFILL }
13755 { &hf_mbim_ms_lte_attach_context_size,
13756 { "Context Size", "mbim.control.ms_lte_attach_context.size",
13757 FT_UINT32, BASE_DEC, NULL, 0,
13758 NULL, HFILL }
13760 { &hf_mbim_ms_lte_attach_context_ip_type,
13761 { "IP Type", "mbim.control.ms_lte_attach_context.ip_type",
13762 FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
13763 NULL, HFILL }
13765 { &hf_mbim_ms_lte_attach_context_roaming,
13766 { "Roaming", "mbim.control.ms_lte_attach_context.roaming",
13767 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_roaming_control_vals), 0,
13768 NULL, HFILL }
13770 { &hf_mbim_ms_lte_attach_context_source,
13771 { "Source", "mbim.control.ms_lte_attach_context.source",
13772 FT_UINT32, BASE_DEC, VALS(mbim_ms_context_source_vals), 0,
13773 NULL, HFILL }
13775 { &hf_mbim_ms_lte_attach_context_access_string,
13776 { "Access String", "mbim.control.ms_lte_attach_context.access_string",
13777 FT_STRING, BASE_NONE, NULL, 0,
13778 NULL, HFILL }
13780 { &hf_mbim_ms_lte_attach_context_access_string_offset,
13781 { "Access String Offset", "mbim.control.ms_lte_attach_context.access_string_offset",
13782 FT_UINT32, BASE_DEC, NULL, 0,
13783 NULL, HFILL }
13785 { &hf_mbim_ms_lte_attach_context_access_string_size,
13786 { "Access String Size", "mbim.control.ms_lte_attach_context.access_string_size",
13787 FT_UINT32, BASE_DEC, NULL, 0,
13788 NULL, HFILL }
13790 { &hf_mbim_ms_lte_attach_context_user_name,
13791 { "User Name", "mbim.control.ms_lte_attach_context.user_name",
13792 FT_STRING, BASE_NONE, NULL, 0,
13793 NULL, HFILL }
13795 { &hf_mbim_ms_lte_attach_context_user_name_offset,
13796 { "User Name Offset", "mbim.control.ms_lte_attach_context.user_name_offset",
13797 FT_UINT32, BASE_DEC, NULL, 0,
13798 NULL, HFILL }
13800 { &hf_mbim_ms_lte_attach_context_user_name_size,
13801 { "User Name Size", "mbim.control.ms_lte_attach_context.user_name_size",
13802 FT_UINT32, BASE_DEC, NULL, 0,
13803 NULL, HFILL }
13805 { &hf_mbim_ms_lte_attach_context_password,
13806 { "Password", "mbim.control.ms_lte_attach_context.password",
13807 FT_STRING, BASE_NONE, NULL, 0,
13808 NULL, HFILL }
13810 { &hf_mbim_ms_lte_attach_context_password_offset,
13811 { "Password Offset", "mbim.control.ms_lte_attach_context.password_offset",
13812 FT_UINT32, BASE_DEC, NULL, 0,
13813 NULL, HFILL }
13815 { &hf_mbim_ms_lte_attach_context_password_size,
13816 { "Password Size", "mbim.control.ms_lte_attach_context.password_size",
13817 FT_UINT32, BASE_DEC, NULL, 0,
13818 NULL, HFILL }
13820 { &hf_mbim_ms_lte_attach_context_compression,
13821 { "Compression", "mbim.control.ms_lte_attach_context.compression",
13822 FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
13823 NULL, HFILL }
13825 { &hf_mbim_ms_lte_attach_context_auth_protocol,
13826 { "Auth Protocol", "mbim.control.ms_lte_attach_context.auth_protocol",
13827 FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
13828 NULL, HFILL }
13830 { &hf_mbim_ms_lte_attach_state,
13831 { "Auth Protocol", "mbim.control.ms_lte_attach.state",
13832 FT_UINT32, BASE_DEC, VALS(mbim_ms_lte_attach_state_vals), 0,
13833 NULL, HFILL }
13835 { &hf_mbim_ms_device_slot_mapping_info_map_count,
13836 { "Map Count", "mbim.control.ms_device_slot_mapping_info.map_count",
13837 FT_UINT32, BASE_DEC, NULL, 0,
13838 NULL, HFILL }
13840 { &hf_mbim_ms_device_slot_mapping_info_map_offset,
13841 { "Slot Map Offset", "mbim.control.ms_device_slot_mapping_info.map_offset",
13842 FT_UINT32, BASE_DEC, NULL, 0,
13843 NULL, HFILL }
13845 { &hf_mbim_ms_device_slot_mapping_info_map_size,
13846 { "Slot Map Size", "mbim.control.ms_device_slot_mapping_info.map_size",
13847 FT_UINT32, BASE_DEC, NULL, 0,
13848 NULL, HFILL }
13850 { &hf_mbim_ms_device_slot_mapping_info_executor_slot_index,
13851 { "Slot Index", "mbim.control.ms_device_slot_mapping_info.slot_index",
13852 FT_UINT32, BASE_DEC, NULL, 0,
13853 NULL, HFILL }
13855 { &hf_mbim_ms_slot_info_req_slot_index,
13856 { "Slot Index", "mbim.control.ms_slot_info_req.slot_index",
13857 FT_UINT32, BASE_DEC, NULL, 0,
13858 NULL, HFILL }
13860 { &hf_mbim_ms_slot_info_slot_index,
13861 { "Slot Index", "mbim.control.ms_slot_info.slot_index",
13862 FT_UINT32, BASE_DEC, NULL, 0,
13863 NULL, HFILL }
13865 { &hf_mbim_ms_slot_info_state,
13866 { "State", "mbim.control.ms_slot_info.state",
13867 FT_UINT32, BASE_DEC, VALS(mbim_ms_uiccslot_state_vals), 0,
13868 NULL, HFILL }
13870 { &hf_mbim_base_station_max_gsm_count,
13871 { "Max GSM Count", "mbim.control.base_station.max_gsm_count",
13872 FT_UINT32, BASE_DEC, NULL, 0,
13873 NULL, HFILL }
13875 { &hf_mbim_base_station_max_umts_count,
13876 { "Max UMTS Count", "mbim.control.base_station.max_umts_count",
13877 FT_UINT32, BASE_DEC, NULL, 0,
13878 NULL, HFILL }
13880 { &hf_mbim_base_station_max_td_scdma_count,
13881 { "Max TD-SCDMA Count", "mbim.control.base_station.max_td_scdma_count",
13882 FT_UINT32, BASE_DEC, NULL, 0,
13883 NULL, HFILL }
13885 { &hf_mbim_base_station_max_lte_count,
13886 { "Max LTE Count", "mbim.control.base_station.max_lte_count",
13887 FT_UINT32, BASE_DEC, NULL, 0,
13888 NULL, HFILL }
13890 { &hf_mbim_base_station_max_cdma_count,
13891 { "Max CDMA Count", "mbim.control.base_station.max_cdma_count",
13892 FT_UINT32, BASE_DEC, NULL, 0,
13893 NULL, HFILL }
13895 { &hf_mbim_base_station_max_nr_count,
13896 { "Max NR Count", "mbim.control.base_station.max_nr_count",
13897 FT_UINT32, BASE_DEC, NULL, 0,
13898 NULL, HFILL }
13900 { &hf_mbim_base_station_provider_id_offset,
13901 { "Provider Id Offset", "mbim.control.base_station.provider_id_offset",
13902 FT_UINT32, BASE_DEC, NULL, 0,
13903 NULL, HFILL }
13905 { &hf_mbim_base_station_provider_id_size,
13906 { "Provider Id Size", "mbim.control.base_station.provider_id_size",
13907 FT_UINT32, BASE_DEC, NULL, 0,
13908 NULL, HFILL }
13910 { &hf_mbim_base_station_location_area_code,
13911 { "Location Area Code", "mbim.control.base_station.location_area_code",
13912 FT_UINT32, BASE_DEC, NULL, 0,
13913 NULL, HFILL }
13915 { &hf_mbim_base_station_cell_id,
13916 { "Cell Id", "mbim.control.base_station.cell_id",
13917 FT_UINT32, BASE_DEC, NULL, 0,
13918 NULL, HFILL }
13920 { &hf_mbim_base_station_timing_advance,
13921 { "Timing Advance", "mbim.control.base_station.provider_timing_advance",
13922 FT_UINT64, BASE_DEC, NULL, 0,
13923 NULL, HFILL }
13925 { &hf_mbim_base_station_arfcn,
13926 { "ARFCN", "mbim.control.base_station.arfcn",
13927 FT_UINT32, BASE_DEC, NULL, 0,
13928 NULL, HFILL }
13930 { &hf_mbim_base_station_base_station_id,
13931 { "Base Station Id", "mbim.control.base_station.base_station_id",
13932 FT_UINT32, BASE_DEC, NULL, 0,
13933 NULL, HFILL }
13935 { &hf_mbim_base_station_rx_level,
13936 { "Rx Level", "mbim.control.base_station.rx_level",
13937 FT_UINT32, BASE_DEC, NULL, 0,
13938 NULL, HFILL }
13940 { &hf_mbim_base_station_provider_id,
13941 { "Provider Id", "mbim.control.base_station.provider_id",
13942 FT_STRING, BASE_NONE, NULL, 0,
13943 NULL, HFILL }
13945 { &hf_mbim_base_station_frequency_info_ul,
13946 { "Frequency Info Ul", "mbim.control.base_station.frequency_info_ul",
13947 FT_UINT32, BASE_DEC, NULL, 0,
13948 NULL, HFILL }
13950 { &hf_mbim_base_station_frequency_info_dl,
13951 { "Frequency Info Dl", "mbim.control.base_station.frequency_info_dl",
13952 FT_UINT32, BASE_DEC, NULL, 0,
13953 NULL, HFILL }
13955 { &hf_mbim_base_station_frequency_info_nt,
13956 { "Frequency Info Nt", "mbim.control.base_station.frequency_info_nt",
13957 FT_UINT32, BASE_DEC, NULL, 0,
13958 NULL, HFILL }
13960 { &hf_mbim_base_station_uarfcn,
13961 { "UARFCN", "mbim.control.base_station.uarfcn",
13962 FT_UINT32, BASE_DEC, NULL, 0,
13963 NULL, HFILL }
13965 { &hf_mbim_base_station_primary_scrambling_code,
13966 { "Primary Scrambling Code", "mbim.control.base_station.primary_scrambling_code",
13967 FT_UINT32, BASE_DEC, NULL, 0,
13968 NULL, HFILL }
13970 { &hf_mbim_base_station_ecno,
13971 { "EcNo", "mbim.control.base_station.ecno",
13972 FT_UINT32, BASE_DEC, NULL, 0,
13973 NULL, HFILL }
13975 { &hf_mbim_base_station_rscp,
13976 { "RSCP", "mbim.control.base_station.rscp",
13977 FT_UINT32, BASE_DEC, NULL, 0,
13978 NULL, HFILL }
13980 { &hf_mbim_base_station_path_loss,
13981 { "Path Loss", "mbim.control.base_station.path_loss",
13982 FT_UINT32, BASE_DEC, NULL, 0,
13983 NULL, HFILL }
13985 { &hf_mbim_base_station_call_parameter,
13986 { "Call Parameter", "mbim.control.base_station.call_parameter",
13987 FT_UINT32, BASE_DEC, NULL, 0,
13988 NULL, HFILL }
13990 { &hf_mbim_base_station_earfcn,
13991 { "EARFCN", "mbim.control.base_station.earfcn",
13992 FT_UINT32, BASE_DEC, NULL, 0,
13993 NULL, HFILL }
13995 { &hf_mbim_base_station_physical_cell_id,
13996 { "Physical Cell Id", "mbim.control.base_station.physical_cell_id",
13997 FT_UINT32, BASE_DEC, NULL, 0,
13998 NULL, HFILL }
14000 { &hf_mbim_base_station_tac,
14001 { "TAC", "mbim.control.base_station.tac",
14002 FT_UINT32, BASE_DEC, NULL, 0,
14003 NULL, HFILL }
14005 { &hf_mbim_base_station_rsrp,
14006 { "RSRP", "mbim.control.base_station.rsrp",
14007 FT_UINT32, BASE_DEC, NULL, 0,
14008 NULL, HFILL }
14010 { &hf_mbim_base_station_rsrq,
14011 { "RSRQ", "mbim.control.base_station.rsrq",
14012 FT_UINT32, BASE_DEC, NULL, 0,
14013 NULL, HFILL }
14015 { &hf_mbim_base_station_serving_cell_flag,
14016 { "Serving Cell Flag", "mbim.control.ms_slot_info.serving_cell_flag",
14017 FT_UINT32, BASE_DEC, VALS(mbim_base_station_serving_cell_flag_vals), 0,
14018 NULL, HFILL }
14020 { &hf_mbim_base_station_nid,
14021 { "NID", "mbim.control.base_station.nid",
14022 FT_UINT32, BASE_DEC, NULL, 0,
14023 NULL, HFILL }
14025 { &hf_mbim_base_station_sid,
14026 { "SID", "mbim.control.base_station.sid",
14027 FT_UINT32, BASE_DEC, NULL, 0,
14028 NULL, HFILL }
14030 { &hf_mbim_base_station_base_latitude,
14031 { "Base Latitude", "mbim.control.base_station.base_latitude",
14032 FT_UINT32, BASE_DEC, NULL, 0,
14033 NULL, HFILL }
14035 { &hf_mbim_base_station_base_longitude,
14036 { "Base Longitude", "mbim.control.base_station.base_longitude",
14037 FT_UINT32, BASE_DEC, NULL, 0,
14038 NULL, HFILL }
14040 { &hf_mbim_base_station_ref_pn,
14041 { "Ref PN", "mbim.control.base_station.ref_pn",
14042 FT_UINT32, BASE_DEC, NULL, 0,
14043 NULL, HFILL }
14045 { &hf_mbim_base_station_gps_seconds,
14046 { "GPS Seconds", "mbim.control.base_station.gps_seconds",
14047 FT_UINT32, BASE_DEC, NULL, 0,
14048 NULL, HFILL }
14050 { &hf_mbim_base_station_pilot_strength,
14051 { "Pilot Strength", "mbim.control.base_station.pilot_strength",
14052 FT_UINT32, BASE_DEC, NULL, 0,
14053 NULL, HFILL }
14055 { &hf_mbim_base_station_nci,
14056 { "NCI", "mbim.control.base_station.nci",
14057 FT_UINT64, BASE_DEC, NULL, 0,
14058 NULL, HFILL }
14060 { &hf_mbim_base_station_sinr,
14061 { "SINR", "mbim.control.base_station.sinr",
14062 FT_UINT32, BASE_DEC, NULL, 0,
14063 NULL, HFILL }
14065 { &hf_mbim_base_station_cell_id_offset,
14066 { "Cell Id Offset", "mbim.control.base_station.cell_id_offset",
14067 FT_UINT32, BASE_DEC, NULL, 0,
14068 NULL, HFILL }
14070 { &hf_mbim_base_station_cell_id_size,
14071 { "Cell Id Size", "mbim.control.base_station.cell_id_size",
14072 FT_UINT32, BASE_DEC, NULL, 0,
14073 NULL, HFILL }
14075 { &hf_mbim_base_station_cell_id_string,
14076 { "Cell Id", "mbim.control.ms_app_info.cell_id",
14077 FT_STRING, BASE_NONE, NULL, 0,
14078 NULL, HFILL }
14080 { &hf_mbim_base_station_system_type,
14081 { "System Type", "mbim.control.base_station.system_type",
14082 FT_UINT32, BASE_DEC, NULL, 0,
14083 NULL, HFILL }
14085 { &hf_mbim_base_station_system_sub_type,
14086 { "System Sub Type", "mbim.control.base_station.system_sub_type",
14087 FT_UINT32, BASE_DEC, NULL, 0,
14088 NULL, HFILL }
14090 { &hf_mbim_base_station_gsm_serving_cell_offset,
14091 { "GSM Serving Cell Offset", "mbim.control.base_station.gsm_serving_cell_offset",
14092 FT_UINT32, BASE_DEC, NULL, 0,
14093 NULL, HFILL }
14095 { &hf_mbim_base_station_gsm_serving_cell_size,
14096 { "GSM Serving Cell size", "mbim.control.base_station.gsm_serving_cell_size",
14097 FT_UINT32, BASE_DEC, NULL, 0,
14098 NULL, HFILL }
14100 { &hf_mbim_base_station_umts_serving_cell_offset,
14101 { "UMTS Serving Cell Offset", "mbim.control.base_station.umts_serving_cell_offset",
14102 FT_UINT32, BASE_DEC, NULL, 0,
14103 NULL, HFILL }
14105 { &hf_mbim_base_station_umts_serving_cell_size,
14106 { "UMTS Serving Cell Size", "mbim.control.base_station.umts_serving_cell_size",
14107 FT_UINT32, BASE_DEC, NULL, 0,
14108 NULL, HFILL }
14110 { &hf_mbim_base_station_td_scdma_serving_cell_offset,
14111 { "TD-SCDMA Serving Cell Offset", "mbim.control.base_station.td_scdma_serving_cell_offset",
14112 FT_UINT32, BASE_DEC, NULL, 0,
14113 NULL, HFILL }
14115 { &hf_mbim_base_station_td_scdma_serving_cell_size,
14116 { "TD-SCDMA Serving Cell Size", "mbim.control.base_station.td_scdma_serving_cell_size",
14117 FT_UINT32, BASE_DEC, NULL, 0,
14118 NULL, HFILL }
14120 { &hf_mbim_base_station_lte_serving_cell_offset,
14121 { "LTE Serving Cell Offset", "mbim.control.base_station.lte_serving_cell_offset",
14122 FT_UINT32, BASE_DEC, NULL, 0,
14123 NULL, HFILL }
14125 { &hf_mbim_base_station_lte_serving_cell_size,
14126 { "LTE Serving Cell Size", "mbim.control.base_station.lte_serving_cell_size",
14127 FT_UINT32, BASE_DEC, NULL, 0,
14128 NULL, HFILL }
14130 { &hf_mbim_base_station_gsm_nmr_offset,
14131 { "GSM NMR Offset", "mbim.control.base_station.gsm_nmr_offset",
14132 FT_UINT32, BASE_DEC, NULL, 0,
14133 NULL, HFILL }
14135 { &hf_mbim_base_station_gsm_nmr_size,
14136 { "GSM NMR Size", "mbim.control.base_station.gsm_nmr_size",
14137 FT_UINT32, BASE_DEC, NULL, 0,
14138 NULL, HFILL }
14140 { &hf_mbim_base_station_umts_mrl_offset,
14141 { "UMTS MRL Offset", "mbim.control.base_station.umts_mrl_offset",
14142 FT_UINT32, BASE_DEC, NULL, 0,
14143 NULL, HFILL }
14145 { &hf_mbim_base_station_umts_mrl_size,
14146 { "UMTS MRL Size", "mbim.control.base_station.umts_mrl_size",
14147 FT_UINT32, BASE_DEC, NULL, 0,
14148 NULL, HFILL }
14150 { &hf_mbim_base_station_td_scdma_mrl_offset,
14151 { "TD-SCDMA MRL Offset", "mbim.control.base_station.td_scdma_mrl_offset",
14152 FT_UINT32, BASE_DEC, NULL, 0,
14153 NULL, HFILL }
14155 { &hf_mbim_base_station_td_scdma_mrl_size,
14156 { "TD-SCDMA MRL Offset", "mbim.control.base_station.td_scdma_mrl_size",
14157 FT_UINT32, BASE_DEC, NULL, 0,
14158 NULL, HFILL }
14160 { &hf_mbim_base_station_lte_mrl_offset,
14161 { "LTE MRL Offset", "mbim.control.base_station.lte_mrl_offset",
14162 FT_UINT32, BASE_DEC, NULL, 0,
14163 NULL, HFILL }
14165 { &hf_mbim_base_station_lte_mrl_size,
14166 { "LTE MRL Size", "mbim.control.base_station.lte_mrl_size",
14167 FT_UINT32, BASE_DEC, NULL, 0,
14168 NULL, HFILL }
14170 { &hf_mbim_base_station_cdma_mrl_offset,
14171 { "CDMA MRL Offset", "mbim.control.base_station.cdma_mrl_offset",
14172 FT_UINT32, BASE_DEC, NULL, 0,
14173 NULL, HFILL }
14175 { &hf_mbim_base_station_cdma_mrl_size,
14176 { "CDMA MRL Size", "mbim.control.base_station.cdma_mrl_size",
14177 FT_UINT32, BASE_DEC, NULL, 0,
14178 NULL, HFILL }
14180 { &hf_mbim_base_station_nr_serving_cell_offset,
14181 { "NR Serving Cell Offset", "mbim.control.base_station.nr_serving_cell_offset",
14182 FT_UINT32, BASE_DEC, NULL, 0,
14183 NULL, HFILL }
14185 { &hf_mbim_base_station_nr_serving_cell_size,
14186 { "NR Serving Cell Size", "mbim.control.base_station.nr_serving_cell_size",
14187 FT_UINT32, BASE_DEC, NULL, 0,
14188 NULL, HFILL }
14190 { &hf_mbim_base_station_nr_neighbor_cells_offset,
14191 { "NR Neighbor Cells Offset", "mbim.control.base_station.nr_neighbor_cells_offset",
14192 FT_UINT32, BASE_DEC, NULL, 0,
14193 NULL, HFILL }
14195 { &hf_mbim_base_station_nr_neighbor_cells_size,
14196 { "NR Neighbor Cells Size", "mbim.control.base_station.nr_neighbor_cells_size",
14197 FT_UINT32, BASE_DEC, NULL, 0,
14198 NULL, HFILL }
14200 { &hf_mbim_base_station_count,
14201 { "Count", "mbim.control.base_station.count",
14202 FT_UINT32, BASE_DEC, NULL, 0,
14203 NULL, HFILL }
14205 { &hf_mbim_version,
14206 { "MBIM Version", "mbim.control.bcd_mbim_version",
14207 FT_UINT16, BASE_CUSTOM, CF_FUNC(mbim_version_fmt), 0,
14208 NULL, HFILL }
14210 { &hf_mbim_extended_version,
14211 { "MBIM Extended Version", "mbim.control.bcd_mbim_extended_version",
14212 FT_UINT16, BASE_CUSTOM, CF_FUNC(mbim_version_fmt), 0,
14213 NULL, HFILL }
14215 { &hf_mbim_ms_modem_config_config_status,
14216 { "Config Status", "mbim.control.ms_modem_config.config_status",
14217 FT_UINT32, BASE_DEC, VALS(mbim_ms_modem_config_status_vals), 0,
14218 NULL, HFILL }
14220 { &hf_mbim_ms_registration_params_info_mico_mode,
14221 { "Mico Mode", "mbim.control.ms_registration_params_info.mico_mode",
14222 FT_UINT32, BASE_DEC, VALS(mbim_ms_mico_mode_vals), 0,
14223 NULL, HFILL }
14225 { &hf_mbim_ms_registration_params_info_drx_params,
14226 { "DRX Params", "mbim.control.ms_registration_params_info.drx_params",
14227 FT_UINT32, BASE_DEC, VALS(mbim_ms_drx_params_vals), 0,
14228 NULL, HFILL }
14230 { &hf_mbim_ms_registration_params_info_ladn_info,
14231 { "LADN Info", "mbim.control.ms_registration_params_info.ladn_info",
14232 FT_UINT32, BASE_DEC, VALS(mbim_ms_ladn_ind_vals), 0,
14233 NULL, HFILL }
14235 { &hf_mbim_ms_registration_params_info_default_pdu_hint,
14236 { "Default PDU Hint", "mbim.control.ms_registration_params_info.default_pdu_hint",
14237 FT_UINT32, BASE_DEC, VALS(mbim_ms_default_pdu_hint_vals), 0,
14238 NULL, HFILL }
14240 { &hf_mbim_ms_registration_params_info_re_register_if_needed,
14241 { "Reregister If Needed", "mbim.control.ms_registration_params_info.re_register_if_needed",
14242 FT_UINT32, BASE_DEC, NULL, 0,
14243 NULL, HFILL }
14245 { &hf_mbim_ms_network_params_info_mico_indication,
14246 { "MICO indication", "mbim.control.ms_network_params_info.mico_indication",
14247 FT_UINT32, BASE_DEC, VALS(mbim_ms_mico_indication_vals), 0,
14248 NULL, HFILL }
14250 { &hf_mbim_ms_network_params_info_drx_params,
14251 { "DRX Params", "mbim.control.ms_network_params_info.drx_params",
14252 FT_UINT32, BASE_DEC, VALS(mbim_ms_drx_params_vals), 0,
14253 NULL, HFILL }
14255 { &hf_mbim_ms_wake_reason_wake_type,
14256 { "Wake Type", "mbim.control.ms_wake_reason.wake_type",
14257 FT_UINT32, BASE_DEC, VALS(hf_mbim_ms_wake_reason_wake_type_vals), 0,
14258 NULL, HFILL }
14260 { &hf_mbim_ms_wake_reason_session_id,
14261 { "Session ID", "mbim.control.ms_wake_reason.session_id",
14262 FT_UINT32, BASE_DEC, NULL, 0,
14263 NULL, HFILL }
14265 { &hf_mbim_ms_wake_reason_command_payload_offset,
14266 { "Payload Offset", "mbim.control.ms_wake_reason.command_payload_offset",
14267 FT_UINT32, BASE_DEC, NULL, 0,
14268 NULL, HFILL }
14270 { &hf_mbim_ms_wake_reason_command_payload_size,
14271 { "Payload Size", "mbim.control.ms_wake_reason.command_payload_size",
14272 FT_UINT32, BASE_DEC, NULL, 0,
14273 NULL, HFILL }
14275 { &hf_mbim_ms_wake_reason_command_payload,
14276 { "Payload", "mbim.control.ms_wake_reason.command_payload",
14277 FT_BYTES, BASE_NONE, NULL, 0,
14278 NULL, HFILL }
14280 { &hf_mbim_ms_wake_reason_packet_original_size,
14281 { "Original Size", "mbim.control.ms_wake_reason.packet_original_size",
14282 FT_UINT32, BASE_DEC, NULL, 0,
14283 NULL, HFILL }
14285 { &hf_mbim_ms_wake_reason_packet_saved_offset,
14286 { "Saved Offset", "mbim.control.ms_wake_reason.packet_saved_offset",
14287 FT_UINT32, BASE_DEC, NULL, 0,
14288 NULL, HFILL }
14290 { &hf_mbim_ms_wake_reason_packet_saved_size,
14291 { "Saved Size", "mbim.control.ms_wake_reason.packet_saved_size",
14292 FT_UINT32, BASE_DEC, NULL, 0,
14293 NULL, HFILL }
14295 { &hf_mbim_ms_wake_reason_packet_saved_data,
14296 { "Saved Data", "mbim.control.ms_wake_reason.packet_saved_data",
14297 FT_BYTES, BASE_NONE, NULL, 0,
14298 NULL, HFILL }
14300 { &hf_mbim_ms_slot_id,
14301 { "Slot Id", "mbim.control.ms_dual_sim.slot_id",
14302 FT_UINT32, BASE_DEC, NULL, 0,
14303 NULL, HFILL }
14305 { &hf_mbim_ms_open_channel_app_id_size,
14306 { "App Id Size", "mbim.control.ms_open_channel.app_id_size",
14307 FT_UINT32, BASE_DEC, NULL, 0,
14308 NULL, HFILL }
14310 { &hf_mbim_ms_open_channel_app_id_offset,
14311 { "App Id Offset", "mbim.control.ms_open_channel.app_id_offset",
14312 FT_UINT32, BASE_DEC, NULL, 0,
14313 NULL, HFILL }
14315 { &hf_mbim_ms_open_channel_select_p2_arg,
14316 { "Select P2 Arg", "mbim.control.ms_open_channel.select_p2_arg",
14317 FT_UINT32, BASE_DEC, NULL, 0,
14318 NULL, HFILL }
14320 { &hf_mbim_ms_uicc_channel_group,
14321 { "Channel Group", "mbim.control.ms_uicc.channel_group",
14322 FT_UINT32, BASE_DEC, NULL, 0,
14323 NULL, HFILL }
14325 { &hf_mbim_ms_open_channel_app_id,
14326 { "App Id", "mbim.control.ms_open_channel.app_id",
14327 FT_BYTES, BASE_NONE, NULL, 0,
14328 NULL, HFILL }
14330 { &hf_mbim_ms_uicc_status,
14331 { "Status", "mbim.control.ms_uicc.status",
14332 FT_UINT32, BASE_DEC, NULL, 0,
14333 NULL, HFILL }
14335 { &hf_mbim_ms_uicc_channel,
14336 { "Channel", "mbim.control.ms_uicc.channel",
14337 FT_UINT32, BASE_DEC, NULL, 0,
14338 NULL, HFILL }
14340 { &hf_mbim_ms_uicc_response_length,
14341 { "Response Length", "mbim.control.ms_uicc.response_length",
14342 FT_UINT32, BASE_DEC, NULL, 0,
14343 NULL, HFILL }
14345 { &hf_mbim_ms_uicc_response_offset,
14346 { "Response Offset", "mbim.control.ms_uicc.response_offset",
14347 FT_UINT32, BASE_DEC, NULL, 0,
14348 NULL, HFILL }
14350 { &hf_mbim_ms_uicc_response,
14351 { "Response", "mbim.control.ms_uicc.response",
14352 FT_BYTES, BASE_NONE, NULL, 0,
14353 NULL, HFILL }
14355 { &hf_mbim_ms_apdu_secure_messaging,
14356 { "Secure messaging", "mbim.control.ms_apdu.secure_messaging",
14357 FT_UINT32, BASE_DEC, VALS(mbim_ms_apdu_secure_messaging_vals), 0,
14358 NULL, HFILL }
14360 { &hf_mbim_ms_apdu_type,
14361 { "Type", "mbim.control.ms_apdu.type",
14362 FT_UINT32, BASE_DEC, VALS(mbim_ms_apdu_type_vals), 0,
14363 NULL, HFILL }
14365 { &hf_mbim_ms_apdu_command_size,
14366 { "Command Size", "mbim.control.ms_apdu.command_size",
14367 FT_UINT32, BASE_DEC, NULL, 0,
14368 NULL, HFILL }
14370 { &hf_mbim_ms_apdu_command_offset,
14371 { "Command Offset", "mbim.control.ms_apdu.command_offset",
14372 FT_UINT32, BASE_DEC, NULL, 0,
14373 NULL, HFILL }
14375 { &hf_mbim_ms_apdu_command,
14376 { "Command", "mbim.control.ms_apdu.command",
14377 FT_BYTES, BASE_NONE, NULL, 0,
14378 NULL, HFILL }
14380 { &hf_mbim_ms_terminal_capability_count,
14381 { "Capability Count", "mbim.control.ms_terminal_capability.count",
14382 FT_UINT32, BASE_DEC, NULL, 0,
14383 NULL, HFILL }
14385 { &hf_mbim_ms_terminal_capability_offset,
14386 { "Capability offset", "mbim.control.ms_terminal_capability.offset",
14387 FT_UINT32, BASE_DEC, NULL, 0,
14388 NULL, HFILL }
14390 { &hf_mbim_ms_terminal_capability_size,
14391 { "Capability size", "mbim.control.ms_terminal_capability.size",
14392 FT_UINT32, BASE_DEC, NULL, 0,
14393 NULL, HFILL }
14395 { &hf_mbim_ms_terminal_capability,
14396 { "Capability", "mbim.control.ms_terminal_capability.capability",
14397 FT_BYTES, BASE_NONE, NULL, 0,
14398 NULL, HFILL }
14400 { &hf_mbim_ms_reset_pass_through_action,
14401 { "Type", "mbim.control.ms_reset.pass_through_action",
14402 FT_UINT32, BASE_DEC, VALS(mbim_ms_reset_pass_through_action_vals), 0,
14403 NULL, HFILL }
14405 { &hf_mbim_ms_atr_info_atr_offset,
14406 { "ATR Offset", "mbim.control.ms_atr_info.atr_offset",
14407 FT_UINT32, BASE_DEC, NULL, 0,
14408 NULL, HFILL }
14410 { &hf_mbim_ms_atr_info_atr_size,
14411 { "ATR Size", "mbim.control.ms_atr_info.atr_size",
14412 FT_UINT32, BASE_DEC, NULL, 0,
14413 NULL, HFILL }
14415 { &hf_mbim_ms_app_info_app_type,
14416 { "App Type", "mbim.control.ms_app_info.app_type",
14417 FT_UINT32, BASE_DEC, VALS(mbim_ms_uicc_app_type_vals), 0,
14418 NULL, HFILL }
14420 { &hf_mbim_ms_app_info_app_id_offset,
14421 { "App ID Offset", "mbim.control.ms_app_info.app_id_offset",
14422 FT_UINT32, BASE_DEC, NULL, 0,
14423 NULL, HFILL }
14425 { &hf_mbim_ms_app_info_app_id_size,
14426 { "App ID Size", "mbim.control.ms_app_info.app_id_size",
14427 FT_UINT32, BASE_DEC, NULL, 0,
14428 NULL, HFILL }
14430 { &hf_mbim_ms_app_info_app_id,
14431 { "App ID", "mbim.control.ms_app_info.app_id",
14432 FT_BYTES, BASE_NONE, NULL, 0,
14433 NULL, HFILL }
14435 { &hf_mbim_ms_app_info_app_name_offset,
14436 { "App Name Offset", "mbim.control.ms_app_info.app_name_offset",
14437 FT_UINT32, BASE_DEC, NULL, 0,
14438 NULL, HFILL }
14440 { &hf_mbim_ms_app_info_app_name_size,
14441 { "App Name Size", "mbim.control.ms_app_info.app_name_size",
14442 FT_UINT32, BASE_DEC, NULL, 0,
14443 NULL, HFILL }
14445 { &hf_mbim_ms_app_info_app_name,
14446 { "App Name", "mbim.control.ms_app_info.app_name",
14447 FT_STRING, BASE_NONE, NULL, 0,
14448 NULL, HFILL }
14450 { &hf_mbim_ms_app_info_num_pins,
14451 { "Num Pins", "mbim.control.ms_app_info.num_pins",
14452 FT_UINT32, BASE_DEC, NULL, 0,
14453 NULL, HFILL }
14455 { &hf_mbim_ms_app_info_pin_ref_offset,
14456 { "Pin Ref Offset", "mbim.control.ms_app_info.pin_ref_offset",
14457 FT_UINT32, BASE_DEC, NULL, 0,
14458 NULL, HFILL }
14460 { &hf_mbim_ms_app_info_pin_ref_size,
14461 { "Pin Ref Size", "mbim.control.ms_app_info.pin_ref_size",
14462 FT_UINT32, BASE_DEC, NULL, 0,
14463 NULL, HFILL }
14465 { &hf_mbim_ms_app_info_pin_ref,
14466 { "Pin Ref", "mbim.control.ms_app_info.pin_ref",
14467 FT_BYTES, BASE_NONE, NULL, 0,
14468 NULL, HFILL }
14470 { &hf_mbim_ms_app_list_version,
14471 { "Version", "mbim.control.ms_app_list.version",
14472 FT_UINT32, BASE_DEC, NULL, 0,
14473 NULL, HFILL }
14475 { &hf_mbim_ms_app_list_app_count,
14476 { "App Count", "mbim.control.ms_app_list.app_count",
14477 FT_UINT32, BASE_DEC, NULL, 0,
14478 NULL, HFILL }
14480 { &hf_mbim_ms_app_list_active_app_index,
14481 { "Active App Index", "mbim.control.ms_app_list.active_app_index",
14482 FT_UINT32, BASE_DEC, NULL, 0,
14483 NULL, HFILL }
14485 { &hf_mbim_ms_app_list_size,
14486 { "App List Size", "mbim.control.ms_app_list.app_list_size",
14487 FT_UINT32, BASE_DEC, NULL, 0,
14488 NULL, HFILL }
14490 { &hf_mbim_ms_app_list_app_info_offset,
14491 { "App Info Offset", "mbim.control.ms_app_list.app_info_offset",
14492 FT_UINT32, BASE_DEC, NULL, 0,
14493 NULL, HFILL }
14495 { &hf_mbim_ms_app_list_app_info_size,
14496 { "App Info Size", "mbim.control.ms_app_list.app_info_size",
14497 FT_UINT32, BASE_DEC, NULL, 0,
14498 NULL, HFILL }
14500 { &hf_mbim_ms_file_path_version,
14501 { "Version", "mbim.control.ms_file_path.version",
14502 FT_UINT32, BASE_DEC, NULL, 0,
14503 NULL, HFILL }
14505 { &hf_mbim_ms_file_path_app_id_offset,
14506 { "App ID Offset", "mbim.control.ms_file_path.app_id_offset",
14507 FT_UINT32, BASE_DEC, NULL, 0,
14508 NULL, HFILL }
14510 { &hf_mbim_ms_file_path_app_id_size,
14511 { "App ID Size", "mbim.control.ms_file_path.app_id_size",
14512 FT_UINT32, BASE_DEC, NULL, 0,
14513 NULL, HFILL }
14515 { &hf_mbim_ms_file_path_file_path_offset,
14516 { "File Path Offset", "mbim.control.ms_file_path.file_path_offset",
14517 FT_UINT32, BASE_DEC, NULL, 0,
14518 NULL, HFILL }
14520 { &hf_mbim_ms_file_path_file_path_size,
14521 { "File Path Size", "mbim.control.ms_file_path.file_path_size",
14522 FT_UINT32, BASE_DEC, NULL, 0,
14523 NULL, HFILL }
14525 { &hf_mbim_ms_file_path_app_id,
14526 { "App ID", "mbim.control.ms_file_path.app_id",
14527 FT_BYTES, BASE_NONE, NULL, 0,
14528 NULL, HFILL }
14530 { &hf_mbim_ms_file_path_file_path,
14531 { "File Path", "mbim.control.ms_file_path.file_path",
14532 FT_BYTES, BASE_NONE, NULL, 0,
14533 NULL, HFILL }
14535 { &hf_mbim_ms_file_status_version,
14536 { "Version", "mbim.control.ms_file_status.version",
14537 FT_UINT32, BASE_DEC, NULL, 0,
14538 NULL, HFILL }
14540 { &hf_mbim_ms_file_status_status_word_1,
14541 { "Status Word 1", "mbim.control.ms_file_status.status_word_1",
14542 FT_UINT32, BASE_DEC, NULL, 0,
14543 NULL, HFILL }
14545 { &hf_mbim_ms_file_status_status_word_2,
14546 { "Status Word 2", "mbim.control.ms_file_status.status_word_2",
14547 FT_UINT32, BASE_DEC, NULL, 0,
14548 NULL, HFILL }
14550 { &hf_mbim_ms_file_status_file_accessibility,
14551 { "File Accessibility", "mbim.control.ms_file_status.file_accessibility",
14552 FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_accessibility_vals), 0,
14553 NULL, HFILL }
14555 { &hf_mbim_ms_file_status_file_type,
14556 { "File Type", "mbim.control.ms_file_status.file_type",
14557 FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_type_vals), 0,
14558 NULL, HFILL }
14560 { &hf_mbim_ms_file_status_file_structure,
14561 { "File Structure", "mbim.control.ms_file_status.file_structure",
14562 FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_structure_vals), 0,
14563 NULL, HFILL }
14565 { &hf_mbim_ms_file_status_item_count,
14566 { "Item Count", "mbim.control.ms_file_status.item_count",
14567 FT_UINT32, BASE_DEC, NULL, 0,
14568 NULL, HFILL }
14570 { &hf_mbim_ms_file_status_size,
14571 { "Size", "mbim.control.ms_file_status.size",
14572 FT_UINT32, BASE_DEC, NULL, 0,
14573 NULL, HFILL }
14575 { &hf_mbim_ms_file_status_file_lock_status,
14576 { "File Lock Status", "mbim.control.ms_file_status.file_lock_status",
14577 FT_UINT32, BASE_DEC, NULL, 0,
14578 NULL, HFILL }
14580 { &hf_mbim_ms_response_version,
14581 { "Version", "mbim.control.ms_response.version",
14582 FT_UINT32, BASE_DEC, NULL, 0,
14583 NULL, HFILL }
14585 { &hf_mbim_ms_response_status_word_1,
14586 { "Status Word 1", "mbim.control.ms_response.status_word_1",
14587 FT_UINT32, BASE_DEC, NULL, 0,
14588 NULL, HFILL }
14590 { &hf_mbim_ms_response_status_word_2,
14591 { "Status Word 2", "mbim.control.ms_response.status_word_2",
14592 FT_UINT32, BASE_DEC, NULL, 0,
14593 NULL, HFILL }
14595 { &hf_mbim_ms_response_response_data_offset,
14596 { "Data Offset", "mbim.control.ms_response.response_data_offset",
14597 FT_UINT32, BASE_DEC, NULL, 0,
14598 NULL, HFILL }
14600 { &hf_mbim_ms_response_response_data_size,
14601 { "Data Size", "mbim.control.ms_response.response_data_size",
14602 FT_UINT32, BASE_DEC, NULL, 0,
14603 NULL, HFILL }
14605 { &hf_mbim_ms_response_response_data,
14606 { "Response Data", "mbim.control.ms_response.response_data",
14607 FT_BYTES, BASE_NONE, NULL, 0,
14608 NULL, HFILL }
14610 { &hf_mbim_ms_access_binary_version,
14611 { "Version", "mbim.control.ms_access_binary.version",
14612 FT_UINT32, BASE_DEC, NULL, 0,
14613 NULL, HFILL }
14615 { &hf_mbim_ms_access_binary_app_id_offset,
14616 { "App ID Offset", "mbim.control.ms_access_binary.app_id_offset",
14617 FT_UINT32, BASE_DEC, NULL, 0,
14618 NULL, HFILL }
14620 { &hf_mbim_ms_access_binary_app_id_size,
14621 { "App ID Size", "mbim.control.ms_access_binary.app_id_size",
14622 FT_UINT32, BASE_DEC, NULL, 0,
14623 NULL, HFILL }
14625 { &hf_mbim_ms_access_binary_file_path_offset,
14626 { "File Path Offset", "mbim.control.ms_access_binary.file_path_offset",
14627 FT_UINT32, BASE_DEC, NULL, 0,
14628 NULL, HFILL }
14630 { &hf_mbim_ms_access_binary_file_path_size,
14631 { "File Path Size", "mbim.control.ms_access_binary.file_path_size",
14632 FT_UINT32, BASE_DEC, NULL, 0,
14633 NULL, HFILL }
14635 { &hf_mbim_ms_access_binary_file_offset,
14636 { "File Offset", "mbim.control.ms_access_binary.file_offset",
14637 FT_UINT32, BASE_DEC, NULL, 0,
14638 NULL, HFILL }
14640 { &hf_mbim_ms_access_binary_number_of_bytes,
14641 { "Number of Bytes", "mbim.control.ms_access_binary.number_of_bytes",
14642 FT_UINT32, BASE_DEC, NULL, 0,
14643 NULL, HFILL }
14645 { &hf_mbim_ms_access_binary_local_pin_offset,
14646 { "Local Pin Offset", "mbim.control.ms_access_binary.local_pin_offset",
14647 FT_UINT32, BASE_DEC, NULL, 0,
14648 NULL, HFILL }
14650 { &hf_mbim_ms_access_binary_local_pin_size,
14651 { "Local Pin Size", "mbim.control.ms_access_binary.local_pin_size",
14652 FT_UINT32, BASE_DEC, NULL, 0,
14653 NULL, HFILL }
14655 { &hf_mbim_ms_access_binary_binary_data_offset,
14656 { "Binary Data Offset", "mbim.control.ms_access_binary.binary_data_offset",
14657 FT_UINT32, BASE_DEC, NULL, 0,
14658 NULL, HFILL }
14660 { &hf_mbim_ms_access_binary_binary_data_size,
14661 { "Binary Data Size", "mbim.control.ms_access_binary.binary_data_size",
14662 FT_UINT32, BASE_DEC, NULL, 0,
14663 NULL, HFILL }
14665 { &hf_mbim_ms_access_binary_app_id,
14666 { "App ID", "mbim.control.ms_access_binary.app_id",
14667 FT_BYTES, BASE_NONE, NULL, 0,
14668 NULL, HFILL }
14670 { &hf_mbim_ms_access_binary_file_path,
14671 { "File Path", "mbim.control.ms_access_binary.file_path",
14672 FT_BYTES, BASE_NONE, NULL, 0,
14673 NULL, HFILL }
14675 { &hf_mbim_ms_access_binary_local_pin,
14676 { "Local Pin", "mbim.control.ms_access_binary.local_pin",
14677 FT_STRING, BASE_NONE, NULL, 0,
14678 NULL, HFILL }
14680 { &hf_mbim_ms_access_binary_binary_data,
14681 { "Binary Data", "mbim.control.ms_access_binary.binary_data",
14682 FT_BYTES, BASE_NONE, NULL, 0,
14683 NULL, HFILL }
14685 { &hf_mbim_ms_access_record_version,
14686 { "Version", "mbim.control.ms_access_record.version",
14687 FT_UINT32, BASE_DEC, NULL, 0,
14688 NULL, HFILL }
14690 { &hf_mbim_ms_access_record_app_id_offset,
14691 { "App ID Offset", "mbim.control.ms_access_record.app_id_offset",
14692 FT_UINT32, BASE_DEC, NULL, 0,
14693 NULL, HFILL }
14695 { &hf_mbim_ms_access_record_app_id_size,
14696 { "App ID Size", "mbim.control.ms_access_record.app_id_size",
14697 FT_UINT32, BASE_DEC, NULL, 0,
14698 NULL, HFILL }
14700 { &hf_mbim_ms_access_record_file_path_offset,
14701 { "File Path Offset", "mbim.control.ms_access_record.file_path_offset",
14702 FT_UINT32, BASE_DEC, NULL, 0,
14703 NULL, HFILL }
14705 { &hf_mbim_ms_access_record_file_path_size,
14706 { "File Path Size", "mbim.control.ms_access_record.file_path_size",
14707 FT_UINT32, BASE_DEC, NULL, 0,
14708 NULL, HFILL }
14710 { &hf_mbim_ms_access_record_record_number,
14711 { "Record Number", "mbim.control.ms_access_record.record_number",
14712 FT_UINT32, BASE_DEC, NULL, 0,
14713 NULL, HFILL }
14715 { &hf_mbim_ms_access_record_local_pin_offset,
14716 { "Local Pin Offset", "mbim.control.ms_access_record.local_pin_offset",
14717 FT_UINT32, BASE_DEC, NULL, 0,
14718 NULL, HFILL }
14720 { &hf_mbim_ms_access_record_local_pin_size,
14721 { "Local Pin Size", "mbim.control.ms_access_record.local_pin_size",
14722 FT_UINT32, BASE_DEC, NULL, 0,
14723 NULL, HFILL }
14725 { &hf_mbim_ms_access_record_record_data_offset,
14726 { "Record Data Offset", "mbim.control.ms_access_record.record_data_offset",
14727 FT_UINT32, BASE_DEC, NULL, 0,
14728 NULL, HFILL }
14730 { &hf_mbim_ms_access_record_record_data_size,
14731 { "Record Data Size", "mbim.control.ms_access_record.record_data_size",
14732 FT_UINT32, BASE_DEC, NULL, 0,
14733 NULL, HFILL }
14735 { &hf_mbim_ms_access_record_app_id,
14736 { "App ID", "mbim.control.ms_access_record.app_id",
14737 FT_BYTES, BASE_NONE, NULL, 0,
14738 NULL, HFILL }
14740 { &hf_mbim_ms_access_record_file_path,
14741 { "File Path", "mbim.control.ms_access_record.file_path",
14742 FT_BYTES, BASE_NONE, NULL, 0,
14743 NULL, HFILL }
14745 { &hf_mbim_ms_access_record_local_pin,
14746 { "Local Pin", "mbim.control.ms_access_record.local_pin",
14747 FT_STRING, BASE_NONE, NULL, 0,
14748 NULL, HFILL }
14750 { &hf_mbim_ms_access_record_record_data,
14751 { "Record_Data", "mbim.control.ms_access_record.record_data",
14752 FT_BYTES, BASE_NONE, NULL, 0,
14753 NULL, HFILL }
14755 { &hf_mbim_nitz_year,
14756 { "Year", "mbim.control.nitz.year",
14757 FT_UINT32, BASE_DEC, NULL, 0,
14758 NULL, HFILL }
14760 { &hf_mbim_nitz_month,
14761 { "Month", "mbim.control.nitz.month",
14762 FT_UINT32, BASE_DEC, NULL, 0,
14763 NULL, HFILL }
14765 { &hf_mbim_nitz_day,
14766 { "Day", "mbim.control.nitz.day",
14767 FT_UINT32, BASE_DEC, NULL, 0,
14768 NULL, HFILL }
14770 { &hf_mbim_nitz_hour,
14771 { "Hour", "mbim.control.nitz.hour",
14772 FT_UINT32, BASE_DEC, NULL, 0,
14773 NULL, HFILL }
14775 { &hf_mbim_nitz_minute,
14776 { "Minute", "mbim.control.nitz.minute",
14777 FT_UINT32, BASE_DEC, NULL, 0,
14778 NULL, HFILL }
14780 { &hf_mbim_nitz_second,
14781 { "Second", "mbim.control.nitz.second",
14782 FT_UINT32, BASE_DEC, NULL, 0,
14783 NULL, HFILL }
14785 { &hf_mbim_nitz_timezone_offset_minutes,
14786 { "Timezone Offset Minutes", "mbim.control.nitz.timezone_offset_minutes",
14787 FT_UINT32, BASE_DEC, NULL, 0,
14788 NULL, HFILL }
14790 { &hf_mbim_nitz_daylight_saving_time_offset_minutes,
14791 { "Daylight Saving Time Offset Minutes", "mbim.control.nitz.daylight_saving_time_offset_minutes",
14792 FT_UINT32, BASE_DEC, NULL, 0,
14793 NULL, HFILL }
14795 { &hf_mbim_nitz_data_class,
14796 { "Data Class", "mbim.control.nitz.data_class",
14797 FT_UINT32, BASE_HEX, NULL, 0,
14798 NULL, HFILL }
14800 { &hf_mbim_fragmented_payload,
14801 { "Fragmented Payload", "mbim.control.fragmented_payload",
14802 FT_BYTES, BASE_NONE, NULL, 0,
14803 NULL, HFILL }
14805 { &hf_mbim_request_in,
14806 { "Request In", "mbim.control.request_in",
14807 FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0,
14808 NULL, HFILL }
14810 { &hf_mbim_response_in,
14811 { "Response In", "mbim.control.response_in",
14812 FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0,
14813 NULL, HFILL }
14815 { &hf_mbim_descriptor,
14816 { "Descriptor", "mbim.descriptor",
14817 FT_NONE, BASE_NONE, NULL, 0,
14818 NULL, HFILL }
14820 { &hf_mbim_descriptor_version,
14821 { "bcdMBIMVersion", "mbim.descriptor.version",
14822 FT_UINT16, BASE_HEX, NULL, 0,
14823 "MBIM Version", HFILL }
14825 { &hf_mbim_descriptor_max_control_message,
14826 { "wMaxControlMessage", "mbim.descriptor.max_control_message",
14827 FT_UINT16, BASE_DEC, NULL, 0,
14828 "Max Control Message", HFILL }
14830 { &hf_mbim_descriptor_number_filters,
14831 { "bNumberFilters", "mbim.descriptor.number_filters",
14832 FT_UINT8, BASE_DEC, NULL, 0,
14833 "Number Of Packet Filters", HFILL }
14835 { &hf_mbim_descriptor_max_filter_size,
14836 { "bMaxFilterSize", "mbim.descriptor.max_filter_size",
14837 FT_UINT8, BASE_DEC, NULL, 0,
14838 "Max Packet Filter Size", HFILL }
14840 { &hf_mbim_descriptor_max_segment_size,
14841 { "wMaxSegmentSize", "mbim.descriptor.max_segment_size",
14842 FT_UINT16, BASE_DEC, NULL, 0,
14843 "Max Segment Size", HFILL }
14845 { &hf_mbim_descriptor_network_capabilities,
14846 { "bmNetworkCapabilities", "mbim.descriptor.network_capabilities",
14847 FT_UINT8, BASE_HEX, NULL, 0,
14848 "Network Capabilities", HFILL }
14850 { &hf_mbim_descriptor_network_capabilities_max_datagram_size,
14851 { "SetMaxDatagramSize/GetMaxDatagramSize", "mbim.descriptor.network_capabilities.max_datagram_size",
14852 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
14853 NULL, HFILL }
14855 { &hf_mbim_descriptor_network_capabilities_ntb_input_size,
14856 { "8-byte GetNtbInputSize/SetNtbInputSize", "mbim.descriptor.network_capabilities.ntb_input_size",
14857 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
14858 NULL, HFILL }
14860 { &hf_mbim_descriptor_extended_version,
14861 { "bcdMBIMExtendedVersion", "mbim.descriptor.extended_version",
14862 FT_UINT16, BASE_HEX, NULL, 0,
14863 "MBIM Extended Version", HFILL }
14865 { &hf_mbim_descriptor_max_outstanding_command_messages,
14866 { "bMaxOutstandingCommandMessages", "mbim.descriptor.max_outstanding_command_messages",
14867 FT_UINT8, BASE_DEC, NULL, 0,
14868 "Max Outstanding Messages", HFILL }
14870 { &hf_mbim_descriptor_mtu,
14871 { "wMTU", "mbim.descriptor.mtu",
14872 FT_UINT16, BASE_DEC, NULL, 0,
14873 "MTU", HFILL }
14875 { &hf_mbim_bulk,
14876 { "Bulk", "mbim.bulk",
14877 FT_NONE, BASE_NONE, NULL, 0,
14878 NULL, HFILL }
14880 { &hf_mbim_bulk_nth_signature,
14881 { "Signature", "mbim.bulk.nth.signature",
14882 FT_STRING, BASE_NONE, NULL, 0,
14883 NULL, HFILL }
14885 { &hf_mbim_bulk_nth_header_length,
14886 { "Header Length", "mbim.bulk.nth.header_length",
14887 FT_UINT16, BASE_DEC, NULL, 0,
14888 NULL, HFILL }
14890 { &hf_mbim_bulk_nth_sequence_number,
14891 { "Sequence Number", "mbim.bulk.nth.sequence_number",
14892 FT_UINT16, BASE_DEC, NULL, 0,
14893 NULL, HFILL }
14895 { &hf_mbim_bulk_nth_block_length,
14896 { "Block Length", "mbim.bulk.nth.block_length",
14897 FT_UINT16, BASE_DEC, NULL, 0,
14898 NULL, HFILL }
14900 { &hf_mbim_bulk_nth_block_length_32,
14901 { "Block Length", "mbim.bulk.nth.block_length",
14902 FT_UINT32, BASE_DEC, NULL, 0,
14903 NULL, HFILL }
14905 { &hf_mbim_bulk_nth_ndp_index,
14906 { "NDP Index", "mbim.bulk.nth.ndp_index",
14907 FT_UINT16, BASE_DEC, NULL, 0,
14908 NULL, HFILL }
14910 { &hf_mbim_bulk_nth_ndp_index_32,
14911 { "NDP Index", "mbim.bulk.nth.ndp_index",
14912 FT_UINT32, BASE_DEC, NULL, 0,
14913 NULL, HFILL }
14915 { &hf_mbim_bulk_ndp_signature,
14916 { "Signature", "mbim.bulk.ndp.signature",
14917 FT_UINT32, BASE_HEX, NULL, 0,
14918 NULL, HFILL }
14920 { &hf_mbim_bulk_ndp_signature_ips_session_id,
14921 { "IPS Session Id", "mbim.bulk.ndp.signature.ips_session_id",
14922 FT_UINT8, BASE_DEC, NULL, 0,
14923 NULL, HFILL }
14925 { &hf_mbim_bulk_ndp_signature_ipc_session_id,
14926 { "IPC Session Id", "mbim.bulk.ndp.signature.ipc_session_id",
14927 FT_UINT8, BASE_DEC, NULL, 0,
14928 NULL, HFILL }
14930 { &hf_mbim_bulk_ndp_signature_dss_session_id,
14931 { "DSS Session Id", "mbim.bulk.ndp.signature.dss_session_id",
14932 FT_UINT8, BASE_DEC, NULL, 0,
14933 NULL, HFILL }
14935 { &hf_mbim_bulk_ndp_signature_dsc_session_id,
14936 { "DSC Session Id", "mbim.bulk.ndp.signature.dsc_session_id",
14937 FT_UINT8, BASE_DEC, NULL, 0,
14938 NULL, HFILL }
14940 { &hf_mbim_bulk_ndp_length,
14941 { "Length", "mbim.bulk.ndp.length",
14942 FT_UINT16, BASE_DEC, NULL, 0,
14943 NULL, HFILL }
14945 { &hf_mbim_bulk_ndp_next_ndp_index,
14946 { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
14947 FT_UINT16, BASE_DEC, NULL, 0,
14948 NULL, HFILL }
14950 { &hf_mbim_bulk_ndp_next_ndp_index_32,
14951 { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
14952 FT_UINT32, BASE_DEC, NULL, 0,
14953 NULL, HFILL }
14955 { &hf_mbim_bulk_ndp_reserved,
14956 { "Reserved", "mbim.bulk.ndp.reserved",
14957 FT_UINT16, BASE_HEX, NULL, 0,
14958 NULL, HFILL }
14960 { &hf_mbim_bulk_ndp_reserved2,
14961 { "Reserved", "mbim.bulk.ndp.reserved",
14962 FT_UINT32, BASE_HEX, NULL, 0,
14963 NULL, HFILL }
14965 { &hf_mbim_bulk_ndp_datagram_index,
14966 { "Datagram Index", "mbim.bulk.ndp.datagram.index",
14967 FT_UINT16, BASE_DEC, NULL, 0,
14968 NULL, HFILL }
14970 { &hf_mbim_bulk_ndp_datagram_index_32,
14971 { "Datagram Index", "mbim.bulk.ndp.datagram.index",
14972 FT_UINT32, BASE_DEC, NULL, 0,
14973 NULL, HFILL }
14975 { &hf_mbim_bulk_ndp_datagram_length,
14976 { "Datagram Length", "mbim.bulk.ndp.datagram.length",
14977 FT_UINT16, BASE_DEC, NULL, 0,
14978 NULL, HFILL }
14980 { &hf_mbim_bulk_ndp_datagram_length_32,
14981 { "Datagram Length", "mbim.bulk.ndp.datagram.length",
14982 FT_UINT32, BASE_DEC, NULL, 0,
14983 NULL, HFILL }
14985 { &hf_mbim_bulk_ndp_datagram,
14986 { "Datagram", "mbim.bulk.ndp.datagram",
14987 FT_BYTES, BASE_NONE, NULL, 0,
14988 NULL, HFILL }
14990 { &hf_mbim_bulk_ndp_nb_datagrams,
14991 { "Number Of Datagrams", "mbim.bulk.ndp.nb_datagrams",
14992 FT_UINT32, BASE_DEC, NULL, 0,
14993 NULL, HFILL }
14995 { &hf_mbim_bulk_total_nb_datagrams,
14996 { "Total Number Of Datagrams", "mbim.bulk.total_nb_datagrams",
14997 FT_UINT32, BASE_DEC, NULL, 0,
14998 NULL, HFILL }
15000 { &hf_mbim_bulk_ndp_ctrl,
15001 { "NDP Control", "mbim.bulk.ndp_control",
15002 FT_NONE, BASE_NONE, NULL, 0,
15003 NULL, HFILL }
15005 { &hf_mbim_bulk_ndp_ctrl_message_type,
15006 { "Message Type", "mbim.bulk.ndp_control.message_type",
15007 FT_UINT16, BASE_HEX, VALS(mbim_ndp_ctrl_msg_type_vals), 0,
15008 NULL, HFILL }
15010 { &hf_mbim_bulk_ndp_ctrl_message_length,
15011 { "Message Length", "mbim.bulk.ndp_control.message_length",
15012 FT_UINT16, BASE_DEC, NULL, 0,
15013 NULL, HFILL }
15015 { &hf_mbim_bulk_ndp_ctrl_multiflow_status,
15016 { "Multiflow Status", "mbim.bulk.ndp_control.multiflow.status",
15017 FT_UINT16, BASE_DEC, VALS(mbim_ndp_ctrl_multiflow_status_vals), 0,
15018 NULL, HFILL }
15020 { &hf_mbim_bulk_ndp_ctrl_multiflow_watermark,
15021 { "Multiflow Watermark", "mbim.bulk.ndp_control.multiflow.watermark",
15022 FT_UINT32, BASE_DEC, NULL, 0,
15023 NULL, HFILL }
15025 { &hf_mbim_bulk_ndp_ctrl_message_payload,
15026 { "Message Payload", "mbim.bulk.ndp_control.message_payload",
15027 FT_BYTES, BASE_NONE, NULL, 0,
15028 NULL, HFILL }
15030 { &hf_mbim_fragments,
15031 { "Fragments", "mbim.control.fragments",
15032 FT_NONE, BASE_NONE, NULL, 0,
15033 NULL, HFILL }
15035 { &hf_mbim_fragment,
15036 { "Fragment", "mbim.control.fragment",
15037 FT_FRAMENUM, BASE_NONE, NULL, 0,
15038 NULL, HFILL }
15040 { &hf_mbim_fragment_overlap,
15041 { "Fragment Overlap", "mbim.control.fragment_overlap",
15042 FT_BOOLEAN, BASE_NONE, NULL, 0,
15043 NULL, HFILL }
15045 { &hf_mbim_fragment_overlap_conflict,
15046 { "Fragment Overlap Conflict", "mbim.control.fragment_overlap_conflict",
15047 FT_BOOLEAN, BASE_NONE, NULL, 0,
15048 NULL, HFILL }
15050 { &hf_mbim_fragment_multiple_tails,
15051 { "Fragment Multiple Tails", "mbim.control.fragment_multiple_tails",
15052 FT_BOOLEAN, BASE_NONE, NULL, 0,
15053 NULL, HFILL }
15055 { &hf_mbim_fragment_too_long_fragment,
15056 { "Too Long Fragment", "mbim.control.fragment_too_long_fragment",
15057 FT_BOOLEAN, BASE_NONE, NULL, 0,
15058 NULL, HFILL }
15060 { &hf_mbim_fragment_error,
15061 { "Fragment Error", "mbim.control.fragment_error",
15062 FT_FRAMENUM, BASE_NONE, NULL, 0,
15063 NULL, HFILL }
15065 { &hf_mbim_fragment_count,
15066 { "Fragment Count", "mbim.control.fragment_count",
15067 FT_UINT32, BASE_DEC, NULL, 0,
15068 NULL, HFILL }
15070 { &hf_mbim_reassembled_in,
15071 { "Reassembled In", "mbim.control.reassembled_in",
15072 FT_FRAMENUM, BASE_NONE, NULL, 0,
15073 NULL, HFILL }
15075 { &hf_mbim_reassembled_length,
15076 { "Reassembled Length", "mbim.control.reassembled_length",
15077 FT_UINT32, BASE_DEC, NULL, 0,
15078 NULL, HFILL }
15080 { &hf_mbim_reassembled_data,
15081 { "Reassembled Data", "mbim.control.reassembled_data",
15082 FT_BYTES, BASE_NONE, NULL, 0,
15083 NULL, HFILL }
15087 static int *ett[] = {
15088 &ett_mbim,
15089 &ett_mbim_msg_header,
15090 &ett_mbim_frag_header,
15091 &ett_mbim_info_buffer,
15092 &ett_mbim_bitmap,
15093 &ett_mbim_pair_list,
15094 &ett_mbim_pin,
15095 &ett_mbim_buffer,
15096 &ett_mbim_sc_address,
15097 &ett_mbim_pac,
15098 &ett_mbim_thermal_threshold_setting,
15099 &ett_mbim_fragment,
15100 &ett_mbim_fragments,
15101 &ett_mbim_bulk_ndp_ctrl
15104 static ei_register_info ei[] = {
15105 { &ei_mbim_max_ctrl_transfer,
15106 { "mbim.max_control_transfer_too_small", PI_MALFORMED, PI_ERROR,
15107 "Max Control Transfer is less than 64 bytes", EXPFILL }},
15108 { &ei_mbim_unexpected_msg,
15109 { "mbim.unexpected_msg", PI_MALFORMED, PI_ERROR,
15110 "Unexpected message", EXPFILL }},
15111 { &ei_mbim_unexpected_info_buffer,
15112 { "mbim.unexpected_info_buffer", PI_MALFORMED, PI_WARN,
15113 "Unexpected Information Buffer", EXPFILL }},
15114 { &ei_mbim_illegal_on_link_prefix_length,
15115 { "mbim.illegal_on_link_prefix_length", PI_MALFORMED, PI_WARN,
15116 "Illegal On Link Prefix Length", EXPFILL }},
15117 { &ei_mbim_unknown_sms_format,
15118 { "mbim.unknown_sms_format", PI_PROTOCOL, PI_WARN,
15119 "Unknown SMS format", EXPFILL }},
15120 { &ei_mbim_unexpected_uuid_value,
15121 { "mbim.unexpected_uuid_value", PI_PROTOCOL, PI_WARN,
15122 "Unexpected UUID value", EXPFILL }},
15123 { &ei_mbim_too_many_items,
15124 { "mbim.too_many_items", PI_PROTOCOL, PI_WARN,
15125 "Too many items", EXPFILL }},
15126 { &ei_mbim_alignment_error,
15127 { "mbim.alignment_error", PI_MALFORMED, PI_ERROR,
15128 "Alignment error", EXPFILL }},
15129 { &ei_mbim_invalid_block_len,
15130 { "mbim.invalid_block_len", PI_PROTOCOL, PI_WARN,
15131 "NTH Block Length does not match packet length", EXPFILL }},
15132 { &ei_mbim_out_of_bounds_index,
15133 { "mbim.out_of_bounds_index", PI_MALFORMED, PI_ERROR,
15134 "Index is out of bounds", EXPFILL }},
15135 { &ei_mbim_oversized_string,
15136 { "mbim.oversized_string", PI_PROTOCOL, PI_WARN,
15137 "String exceeds maximum size allowed", EXPFILL }},
15138 { &ei_mbim_oversized_pdu,
15139 { "mbim.oversized_pdu", PI_PROTOCOL, PI_WARN,
15140 "PDU exceeds maximum size allowed", EXPFILL }}
15143 proto_mbim = proto_register_protocol("Mobile Broadband Interface Model",
15144 "MBIM", "mbim");
15146 proto_register_field_array(proto_mbim, hf, array_length(hf));
15147 proto_register_subtree_array(ett, array_length(ett));
15148 expert_mbim = expert_register_protocol(proto_mbim);
15149 expert_register_field_array(expert_mbim, ei, array_length(ei));
15151 reassembly_table_register(&mbim_reassembly_table,
15152 &addresses_reassembly_table_functions);
15154 mbim_control_handle = register_dissector("mbim.control", dissect_mbim_control, proto_mbim);
15155 register_dissector("mbim.descriptor", dissect_mbim_descriptor, proto_mbim);
15156 register_dissector("mbim.bulk", dissect_mbim_bulk, proto_mbim);
15157 dss_dissector_table = register_dissector_table("mbim.dss_session_id",
15158 "MBIM DSS Session Id", proto_mbim, FT_UINT8, BASE_DEC);
15160 mbim_module = prefs_register_protocol(proto_mbim, proto_reg_handoff_mbim);
15161 prefs_register_obsolete_preference(mbim_module, "bulk_heuristic");
15162 prefs_register_bool_preference(mbim_module, "control_decode_unknown_itf",
15163 "Force decoding of unknown USB control data as MBIM",
15164 "Decode control data received on \"usb.control\" with an "
15165 "unknown interface class as MBIM",
15166 &mbim_control_decode_unknown_itf);
15167 prefs_register_enum_preference(mbim_module, "sms_pdu_format",
15168 "SMS PDU format",
15169 "Format used for SMS PDU decoding",
15170 &mbim_sms_pdu_format, mbim_sms_pdu_format_vals, false);
15171 prefs_register_enum_preference(mbim_module, "extended_version",
15172 "Preferred MBIM Extended Version for decoding when MBIM_CID_VERSION not captured",
15173 NULL,
15174 &preferred_mbim_extended_version, preferred_mbim_extended_version_vals, false);
15175 prefs_register_enum_preference(mbim_module, "uicc_apdu_dissector",
15176 "Dissector used for UICC APDU decoding",
15177 NULL,
15178 &mbim_uicc_apdu_dissector, mbim_uicc_apdu_dissector_vals, false);
15181 void
15182 proto_reg_handoff_mbim(void)
15184 static bool initialized = false, mbim_control_decode_unknown_itf_prev = false;
15186 if (!initialized) {
15187 dissector_handle_t mbim_decode_as_handle = create_dissector_handle(dissect_mbim_decode_as, proto_mbim);
15188 bertlv_handle = find_dissector_add_dependency("gsm_sim.bertlv", proto_mbim);
15189 gsm_sim_cmd_handle = find_dissector_add_dependency("gsm_sim.command", proto_mbim);
15190 gsm_sim_rsp_handle = find_dissector_add_dependency("gsm_sim.response", proto_mbim);
15191 etsi_cat_handle = find_dissector_add_dependency("etsi_cat", proto_mbim);
15192 gsm_sms_handle = find_dissector_add_dependency("gsm_sms", proto_mbim);
15193 cdma_sms_handle = find_dissector_add_dependency("ansi_637_trans", proto_mbim);
15194 eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_mbim);
15195 eth_fcs_handle = find_dissector_add_dependency("eth_withfcs", proto_mbim);
15196 ip_handle = find_dissector_add_dependency("ip", proto_mbim);
15197 iso7816_atr_handle = find_dissector_add_dependency("iso7816.atr", proto_mbim);
15198 iso7816_handle = find_dissector_add_dependency("iso7816", proto_mbim);
15199 data_handle = find_dissector("data");
15200 bulk_ndp_ctrl_handle = create_dissector_handle(dissect_mbim_bulk_ndp_ctrl, proto_mbim);
15201 heur_dissector_add("usb.bulk", dissect_mbim_bulk_heur, "MBIM USB bulk endpoint", "mbim_usb_bulk", proto_mbim, HEURISTIC_ENABLE);
15202 dissector_add_for_decode_as("usb.device", mbim_decode_as_handle);
15203 dissector_add_for_decode_as("usb.product", mbim_decode_as_handle);
15204 dissector_add_for_decode_as("usb.protocol", mbim_decode_as_handle);
15205 initialized = true;
15207 if (mbim_control_decode_unknown_itf != mbim_control_decode_unknown_itf_prev) {
15208 if (mbim_control_decode_unknown_itf) {
15209 dissector_add_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
15210 } else {
15211 dissector_delete_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
15213 mbim_control_decode_unknown_itf_prev = mbim_control_decode_unknown_itf;
15218 * Editor modelines - https://www.wireshark.org/tools/modelines.html
15220 * Local variables:
15221 * c-basic-offset: 4
15222 * tab-width: 8
15223 * indent-tabs-mode: nil
15224 * End:
15226 * vi: set shiftwidth=4 tabstop=8 expandtab:
15227 * :indentSize=4:tabSize=8:noTabs=true: