Coverage Report

Created: 2025-08-04 07:15

/src/wireshark/epan/dissectors/packet-mbim.c
Line
Count
Source (jump to first uncovered line)
1
/* packet-mbim.c
2
 * Routines for MBIM dissection
3
 * Copyright 2013-2016, Pascal Quantin <pascal@wireshark.org>
4
 *
5
 * Wireshark - Network traffic analyzer
6
 * By Gerald Combs <gerald@wireshark.org>
7
 * Copyright 1998 Gerald Combs
8
 *
9
 * SPDX-License-Identifier: GPL-2.0-or-later
10
 */
11
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
16
 *
17
 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/host-shutdown-device-service
18
 *
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
25
 *
26
 * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-sar-platform-support
27
 *
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
30
 *
31
 * https://learn.microsoft.com/en-us/windows-hardware/drivers/network/mb-nitz-support
32
 *
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
35
 */
36
37
#include "config.h"
38
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>
51
52
#include "packet-gsm_a_common.h"
53
#include "packet-gsm_map.h"
54
#include "packet-usb.h"
55
#include "packet-mbim.h"
56
57
void proto_register_mbim(void);
58
void proto_reg_handoff_mbim(void);
59
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_padding;
1065
static int hf_mbim_bulk_ndp_nb_datagrams;
1066
static int hf_mbim_bulk_total_nb_datagrams;
1067
static int hf_mbim_bulk_ndp_ctrl;
1068
static int hf_mbim_bulk_ndp_ctrl_message_type;
1069
static int hf_mbim_bulk_ndp_ctrl_message_length;
1070
static int hf_mbim_bulk_ndp_ctrl_multiflow_status;
1071
static int hf_mbim_bulk_ndp_ctrl_multiflow_watermark;
1072
static int hf_mbim_bulk_ndp_ctrl_message_payload;
1073
static int hf_mbim_fragments;
1074
static int hf_mbim_fragment;
1075
static int hf_mbim_fragment_overlap;
1076
static int hf_mbim_fragment_overlap_conflict;
1077
static int hf_mbim_fragment_multiple_tails;
1078
static int hf_mbim_fragment_too_long_fragment;
1079
static int hf_mbim_fragment_error;
1080
static int hf_mbim_fragment_count;
1081
static int hf_mbim_reassembled_in;
1082
static int hf_mbim_reassembled_length;
1083
static int hf_mbim_reassembled_data;
1084
1085
static expert_field ei_mbim_max_ctrl_transfer;
1086
static expert_field ei_mbim_unexpected_msg;
1087
static expert_field ei_mbim_unexpected_info_buffer;
1088
static expert_field ei_mbim_illegal_on_link_prefix_length;
1089
static expert_field ei_mbim_unknown_sms_format;
1090
static expert_field ei_mbim_unexpected_uuid_value;
1091
static expert_field ei_mbim_too_many_items;
1092
static expert_field ei_mbim_alignment_error;
1093
static expert_field ei_mbim_invalid_block_len;
1094
static expert_field ei_mbim_out_of_bounds_index;
1095
static expert_field ei_mbim_oversized_string;
1096
static expert_field ei_mbim_oversized_pdu;
1097
1098
/* Initialize the subtree pointers */
1099
static int ett_mbim;
1100
static int ett_mbim_msg_header;
1101
static int ett_mbim_frag_header;
1102
static int ett_mbim_info_buffer;
1103
static int ett_mbim_bitmap;
1104
static int ett_mbim_pair_list;
1105
static int ett_mbim_pin;
1106
static int ett_mbim_buffer;
1107
static int ett_mbim_sc_address;
1108
static int ett_mbim_pac;
1109
static int ett_mbim_thermal_threshold_setting;
1110
static int ett_mbim_fragment;
1111
static int ett_mbim_fragments;
1112
static int ett_mbim_bulk_ndp_ctrl;
1113
1114
static dissector_table_t dss_dissector_table;
1115
static dissector_handle_t bertlv_handle;
1116
static dissector_handle_t gsm_sim_cmd_handle;
1117
static dissector_handle_t gsm_sim_rsp_handle;
1118
static dissector_handle_t etsi_cat_handle;
1119
static dissector_handle_t gsm_sms_handle;
1120
static dissector_handle_t cdma_sms_handle;
1121
static dissector_handle_t eth_handle;
1122
static dissector_handle_t eth_fcs_handle;
1123
static dissector_handle_t ip_handle;
1124
static dissector_handle_t data_handle;
1125
static dissector_handle_t bulk_ndp_ctrl_handle;
1126
static dissector_handle_t mbim_control_handle;
1127
static dissector_handle_t iso7816_atr_handle;
1128
static dissector_handle_t iso7816_handle;
1129
1130
static bool mbim_control_decode_unknown_itf;
1131
1132
enum {
1133
    SMS_PDU_AUTOMATIC,
1134
    SMS_PDU_3GPP,
1135
    SMS_PDU_3GPP2
1136
};
1137
1138
static const enum_val_t mbim_sms_pdu_format_vals[] = {
1139
    {"automatic", "Automatic", SMS_PDU_AUTOMATIC},
1140
    {"3GPP", "3GPP", SMS_PDU_3GPP},
1141
    {"3GPP2","3GPP2", SMS_PDU_3GPP2},
1142
    {NULL, NULL, -1}
1143
};
1144
static int mbim_sms_pdu_format = SMS_PDU_AUTOMATIC;
1145
1146
enum mbim_extended_version_vals {
1147
    MBIM_Extended_Version_Unknown,
1148
    MBIM_Extended_Version_1,
1149
    MBIM_Extended_Version_2,
1150
    MBIM_Extended_Version_3,
1151
    MBIM_Extended_Version_4,
1152
};
1153
1154
static const enum_val_t preferred_mbim_extended_version_vals[] = {
1155
    {"1.0", "1.0", MBIM_Extended_Version_1},
1156
    {"2.0", "2.0", MBIM_Extended_Version_2},
1157
    {"3.0", "3.0", MBIM_Extended_Version_3},
1158
    {"4.0", "4.0", MBIM_Extended_Version_4},
1159
    {NULL, NULL, -1}
1160
};
1161
static int preferred_mbim_extended_version = MBIM_Extended_Version_1;
1162
1163
#define SHOULD_MBIM_EX2_BE_APPLIED(mbim_conv) \
1164
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_2 || \
1165
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version == MBIM_Extended_Version_2)) ? 1 : 0
1166
1167
#define SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv) \
1168
0
            (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_2 || \
1169
0
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_2)) ? 1 : 0
1170
1171
#define SHOULD_MBIM_EX3_BE_APPLIED(mbim_conv) \
1172
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_3 || \
1173
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version == MBIM_Extended_Version_3)) ? 1 : 0
1174
1175
#define SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv) \
1176
0
            (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_3 || \
1177
0
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_3)) ? 1 : 0
1178
1179
#define SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv) \
1180
0
            (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_4 || \
1181
0
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_4)) ? 1 : 0
1182
1183
enum {
1184
    UICC_APDU_GSM_SIM,
1185
    UICC_APDU_ISO_7816
1186
};
1187
1188
static const enum_val_t mbim_uicc_apdu_dissector_vals[] = {
1189
    {"gsm_sim", "GSM SIM", UICC_APDU_GSM_SIM},
1190
    {"iso7816", "ISO 7816", UICC_APDU_ISO_7816},
1191
    {NULL, NULL, -1}
1192
};
1193
1194
static int mbim_uicc_apdu_dissector = UICC_APDU_GSM_SIM;
1195
1196
#define ROUND_UP_COUNT(Count,Pow2) \
1197
0
        ( ((Count)+(Pow2)-1) & (~(((int)(Pow2))-1)) )
1198
1199
static reassembly_table mbim_reassembly_table;
1200
1201
static wmem_map_t *mbim_uuid_ext_hash;
1202
1203
static const fragment_items mbim_frag_items = {
1204
    &ett_mbim_fragment,
1205
    &ett_mbim_fragments,
1206
    &hf_mbim_fragments,
1207
    &hf_mbim_fragment,
1208
    &hf_mbim_fragment_overlap,
1209
    &hf_mbim_fragment_overlap_conflict,
1210
    &hf_mbim_fragment_multiple_tails,
1211
    &hf_mbim_fragment_too_long_fragment,
1212
    &hf_mbim_fragment_error,
1213
    &hf_mbim_fragment_count,
1214
    &hf_mbim_reassembled_in,
1215
    &hf_mbim_reassembled_length,
1216
    &hf_mbim_reassembled_data,
1217
    "MBIM fragments"
1218
};
1219
1220
struct mbim_conv_info {
1221
    wmem_map_t *trans;
1222
    wmem_tree_t *open;
1223
    uint32_t open_count;
1224
    uint32_t cellular_class;
1225
    enum mbim_extended_version_vals mbim_extended_version;
1226
};
1227
1228
struct mbim_pair_list {
1229
    uint32_t offset;
1230
    uint32_t size;
1231
};
1232
1233
0
#define MBIM_MAX_ITEMS 1000
1234
1235
0
#define MBIM_OPEN_MSG            0x00000001
1236
0
#define MBIM_CLOSE_MSG           0x00000002
1237
0
#define MBIM_COMMAND_MSG         0x00000003
1238
0
#define MBIM_HOST_ERROR_MSG      0x00000004
1239
0
#define MBIM_OPEN_DONE           0x80000001
1240
0
#define MBIM_CLOSE_DONE          0x80000002
1241
0
#define MBIM_COMMAND_DONE        0x80000003
1242
0
#define MBIM_FUNCTION_ERROR_MSG  0x80000004
1243
0
#define MBIM_INDICATE_STATUS_MSG 0x80000007
1244
1245
static const value_string mbim_msg_type_vals[] = {
1246
    { MBIM_OPEN_MSG, "OPEN_MSG"},
1247
    { MBIM_CLOSE_MSG, "CLOSE_MSG"},
1248
    { MBIM_COMMAND_MSG, "COMMAND_MSG"},
1249
    { MBIM_HOST_ERROR_MSG, "HOST_ERROR_MSG"},
1250
    { MBIM_OPEN_DONE, "OPEN_DONE"},
1251
    { MBIM_CLOSE_DONE, "CLOSE_DONE"},
1252
    { MBIM_COMMAND_DONE, "COMMAND_DONE"},
1253
    { MBIM_FUNCTION_ERROR_MSG, "FUNCTION_ERROR_MSG"},
1254
    { MBIM_INDICATE_STATUS_MSG, "INDICATE_STATUS_MSG"},
1255
    { 0, NULL}
1256
};
1257
1258
static const value_string mbim_command_type_vals[] = {
1259
    { MBIM_COMMAND_QUERY, "Query"},
1260
    { MBIM_COMMAND_SET, "Set"},
1261
    { 0, NULL}
1262
};
1263
1264
static const value_string mbim_error_status_code_vals[] = {
1265
    { 1, "TIMEOUT_FRAGMENT"},
1266
    { 2, "FRAGMENT_OUT_OF_SEQUENCE"},
1267
    { 3, "LENGTH_MISMATCH"},
1268
    { 4, "DUPLICATED_TID"},
1269
    { 5, "NOT_OPENED"},
1270
    { 6, "UNKNOWN"},
1271
    { 7, "CANCEL"},
1272
    { 8, "MAX_TRANSFER"},
1273
    { 0, NULL}
1274
};
1275
1276
static const value_string mbim_status_code_vals[] = {
1277
    {   0, "SUCCESS"},
1278
    {   1, "BUSY"},
1279
    {   2, "FAILURE"},
1280
    {   3, "SIM_NOT_INSERTED"},
1281
    {   4, "BAD_SIM"},
1282
    {   5, "PIN_REQUIRED"},
1283
    {   6, "PIN_DISABLED"},
1284
    {   7, "NOT_REGISTERED"},
1285
    {   8, "PROVIDERS_NOT_FOUND"},
1286
    {   9, "NO_DEVICE_SUPPORT"},
1287
    {  10, "PROVIDER_NOT_VISIBLE"},
1288
    {  11, "DATA_CLASS_NOT_AVAILABLE"},
1289
    {  12, "PACKET_SERVICE_DETACHED"},
1290
    {  13, "MAX_ACTIVATED_CONTEXTS"},
1291
    {  14, "NOT_INITIALIZED"},
1292
    {  15, "VOICE_CALL_IN_PROGRESS"},
1293
    {  16, "CONTEXT_NOT_ACTIVATED"},
1294
    {  17, "SERVICE_NOT_ACTIVATED"},
1295
    {  18, "INVALID_ACCESS_STRING"},
1296
    {  19, "INVALID_USER_NAME_PWD"},
1297
    {  20, "RADIO_POWER_OFF"},
1298
    {  21, "INVALID_PARAMETERS"},
1299
    {  22, "READ_FAILURE"},
1300
    {  23, "WRITE_FAILURE"},
1301
    {  24, "Reserved"},
1302
    {  25, "NO_PHONEBOOK"},
1303
    {  26, "PARAMETER_TOO_LONG"},
1304
    {  27, "STK_BUSY"},
1305
    {  28, "OPERATION_NOT_ALLOWED"},
1306
    {  29, "MEMORY_FAILURE"},
1307
    {  30, "INVALID_MEMORY_INDEX"},
1308
    {  31, "MEMORY_FULL"},
1309
    {  32, "FILTER_NOT_SUPPORTED"},
1310
    {  33, "DSS_INSTANCE_LIMIT"},
1311
    {  34, "INVALID_DEVICE_SERVICE_OPERATION"},
1312
    {  35, "AUTH_INCORRECT_AUTN"},
1313
    {  36, "AUTH_SYNC_FAILURE"},
1314
    {  37, "AUTH_AMF_NOT_SET"},
1315
    {  38, "CONTEXT_NOT_SUPPORTED"},
1316
    {  39, "SHAREABILITY_CONDITION_ERROR"},
1317
    {  40, "PIN_FAILURE"},
1318
    {  41, "NO_LTE_ATTACH_CONFIG"},
1319
    {  42, "SESSION_ALREADY_EXISTS"},
1320
    { 100, "SMS_UNKNOWN_SMSC_ADDRESS"},
1321
    { 101, "SMS_NETWORK_TIMEOUT"},
1322
    { 102, "SMS_LANG_NOT_SUPPORTED"},
1323
    { 103, "SMS_ENCODING_NOT_SUPPORTED"},
1324
    { 104, "SMS_FORMAT_NOT_SUPPORTED"},
1325
    { 105, "SMS_MORE_DATA"},
1326
    { 200, "MATCHING_PDU_SESSION_FOUND"},
1327
    { 201, "DISSOCIATION_NEEDED_FOR_APPLICATION"},
1328
    { 202, "ERROR_INVALID_SLOT"},
1329
    { 203, "NO_MATCHING_URSP_RULE"},
1330
    { 204, "DEFAULT_URSP_RULE"},
1331
    { 0x87430001, "UICC_NO_LOGICAL_CHANNELS"},
1332
    { 0x87430002, "UICC_SELECT_FAILED"},
1333
    { 0x87430003, "UICC_INVALID_LOGICAL_CHANNEL"},
1334
    { 0, NULL}
1335
};
1336
static value_string_ext mbim_status_code_vals_ext = VALUE_STRING_EXT_INIT(mbim_status_code_vals);
1337
1338
struct mbim_uuid {
1339
    uint8_t service_idx;
1340
    e_guid_t uuid;
1341
};
1342
1343
0
#define UUID_BASIC_CONNECT              0
1344
0
#define UUID_SMS                        1
1345
0
#define UUID_USSD                       2
1346
0
#define UUID_PHONEBOOK                  3
1347
0
#define UUID_STK                        4
1348
0
#define UUID_AUTH                       5
1349
0
#define UUID_DSS                        6
1350
0
#define UUID_MULTICARRIER               7
1351
0
#define UUID_MS_HOSTSHUTDOWN            8
1352
0
#define UUID_MSFWID                     9
1353
0
#define UUID_QMI                       10 /* Qualcomm proprietary UUID */
1354
0
#define UUID_INTEL_FWUSVC              11 /* Intel  firmware update service proprietary UUID */
1355
0
#define UUID_INTEL_DPTF                12 /* Intel proprietary UUID */
1356
0
#define UUID_INTEL_SAR                 13 /* Intel proprietary UUID */
1357
0
#define UUID_INTEL_ACT                 14 /* Intel adaptive clocking proprietary UUID */
1358
0
#define UUID_INTEL_TRCSVC              15 /* Intel trace service proprietary UUID */
1359
0
#define UUID_INTEL_NRTC                16 /* Intel proprietary UUID */
1360
0
#define UUID_INTEL_USB_PROFILE         17 /* Intel USB profile proprietary UUID */
1361
0
#define UUID_INTEL_CIQ                 18 /* Intel proprietary UUID */
1362
0
#define UUID_ATDS                      19 /* AT&T extensions proprietary UUID */
1363
0
#define UUID_MULTIFLOW                 20
1364
0
#define UUID_BASIC_CONNECT_EXTENSIONS  21 /* Microsoft */
1365
0
#define UUID_MS_SARCONTROL             22 /* Microsoft */
1366
0
#define UUID_MS_UICC_LOW_LEVEL         23
1367
0
#define UUID_MS_VOICE_EXTENSIONS       24
1368
0
#define UUID_MAX                       25
1369
0
#define UUID_EXT_IDX                  255
1370
1371
static const struct mbim_uuid mbim_uuid_service_id_vals[UUID_MAX] = {
1372
    { UUID_BASIC_CONNECT, {0xa289cc33, 0xbcbb, 0x8b4f, { 0xb6, 0xb0, 0x13, 0x3e, 0xc2, 0xaa, 0xe6, 0xdf}}},
1373
    { UUID_SMS, {0x533fbeeb, 0x14fe, 0x4467, {0x9f, 0x90, 0x33, 0xa2, 0x23, 0xe5, 0x6c, 0x3f}}},
1374
    { UUID_USSD, {0xe550a0c8, 0x5e82, 0x479e, {0x82, 0xf7, 0x10, 0xab, 0xf4, 0xc3, 0x35, 0x1f}}},
1375
    { UUID_PHONEBOOK, {0x4bf38476, 0x1e6a, 0x41db, {0xb1, 0xd8, 0xbe, 0xd2, 0x89, 0xc2, 0x5b, 0xdb}}},
1376
    { UUID_STK, {0xd8f20131, 0xfcb5, 0x4e17, {0x86, 0x02, 0xd6, 0xed, 0x38, 0x16, 0x16, 0x4c}}},
1377
    { UUID_AUTH, {0x1d2b5ff7, 0x0aa1, 0x48b2, {0xaa, 0x52, 0x50, 0xf1, 0x57, 0x67, 0x17, 0x4e}}},
1378
    { UUID_DSS, {0xc08a26dd, 0x7718, 0x4382, {0x84, 0x82, 0x6e, 0x0d, 0x58, 0x3c, 0x4d, 0x0e}}},
1379
    { UUID_MULTICARRIER, {0x8b569648, 0x628d, 0x4653, {0x9b, 0x9f, 0x10, 0x25, 0x40, 0x44, 0x24, 0xe1}}},
1380
    { UUID_MS_HOSTSHUTDOWN, {0x883b7c26, 0x985f, 0x43fa, {0x98, 0x04, 0x27, 0xd7, 0xfb, 0x80, 0x95, 0x9c}}},
1381
    { UUID_MSFWID, {0xe9f7dea2, 0xfeaf, 0x4009, {0x93, 0xce, 0x90, 0xa3, 0x69, 0x41, 0x03, 0xb6}}},
1382
    { UUID_QMI, {0xd1a30bc2, 0xf97a, 0x6e43, {0xbf, 0x65, 0xc7, 0xe2, 0x4f, 0xb0, 0xf0, 0xd3}}},
1383
    { UUID_INTEL_FWUSVC, {0x0ed374cb, 0xf835, 0x4474, {0xbc, 0x11, 0x3b, 0x3f, 0xd7, 0x6f, 0x56, 0x41}}},
1384
    { UUID_INTEL_DPTF, {0xfdc22af2, 0xf441, 0x4d46, {0xaf, 0x8d, 0x25, 0x9f, 0xcd, 0xde, 0x46, 0x35}}},
1385
    { UUID_INTEL_SAR, {0x10e40d69, 0x375a, 0x42ce, {0xa2, 0x97, 0x90, 0x61, 0x64, 0xf2, 0x75, 0x4c}}},
1386
    { UUID_INTEL_ACT, {0xed19555d, 0xa6ac, 0x4327, {0x8e, 0xb1, 0xfc, 0x02, 0x2e, 0x5e, 0x23, 0x88}}},
1387
    { UUID_INTEL_TRCSVC, {0x59a7f323, 0xfe5a, 0x4301, {0xb1, 0x85, 0xb8, 0xea, 0x9e, 0x61, 0x67, 0xb7}}},
1388
    { UUID_INTEL_NRTC, {0x2b6d8c5a, 0x0ca9, 0x418f, {0x8a, 0xac, 0x1a, 0x9d, 0xc8, 0xe3, 0x28, 0x66}}},
1389
    { UUID_INTEL_USB_PROFILE, {0xfa142322, 0x166b, 0x4fd9, {0x89, 0xf0, 0x99, 0xbe, 0x90, 0xae, 0x8e, 0x3d}}},
1390
    { UUID_INTEL_CIQ, {0x6A2A8150, 0xABCA, 0x4b11, {0xA4, 0xE2, 0xF2, 0xFC, 0x87, 0x9F, 0x54, 0x81}}},
1391
    { UUID_ATDS, {0x5967bdcc, 0x7fd2, 0x49a2, {0x9f, 0x5c, 0xb2, 0xe7, 0x0e, 0x52, 0x7d, 0xb3}}},
1392
    { UUID_MULTIFLOW, {0x8d8f32d9, 0xf7c2, 0x4419, {0xb2, 0x8b, 0xde, 0xdc, 0xde, 0x20, 0x5e, 0xd8}}},
1393
    { UUID_BASIC_CONNECT_EXTENSIONS, {0x3d01dcc5, 0xfef5, 0x4d05, {0x0d, 0x3a, 0xbe, 0xf7, 0x05, 0x8e, 0x9a, 0xaf}}},
1394
    { UUID_MS_SARCONTROL, {0x68223d04, 0x9f6c, 0x4e0f, {0x82, 0x2d, 0x28, 0x44, 0x1f, 0xb7, 0x23, 0x40}}},
1395
    { UUID_MS_UICC_LOW_LEVEL, {0xc2f6588e, 0xf037, 0x4bc9, {0x86, 0x65, 0xf4, 0xd4, 0x4b, 0xd0, 0x93, 0x67}}},
1396
    { UUID_MS_VOICE_EXTENSIONS, {0x8d8b9eba, 0x37be, 0x449b, {0x8f, 0x1e, 0x61, 0xcb, 0x03, 0x4a, 0x70, 0x2e}}}
1397
};
1398
1399
static const value_string mbim_service_id_vals[] = {
1400
    { UUID_BASIC_CONNECT, "UUID_BASIC_CONNECT"},
1401
    { UUID_SMS, "UUID_SMS"},
1402
    { UUID_USSD, "UUID_USSD"},
1403
    { UUID_PHONEBOOK, "UUID_PHONEBOOK"},
1404
    { UUID_STK, "UUID_STK"},
1405
    { UUID_AUTH, "UUID_AUTH"},
1406
    { UUID_DSS, "UUID_DSS"},
1407
    { UUID_MULTICARRIER, "UUID_MULTICARRIER"},
1408
    { UUID_MS_HOSTSHUTDOWN, "UUID_MS_HOSTSHUTDOWN"},
1409
    { UUID_MSFWID, "UUID_MSFWID"},
1410
    { UUID_QMI, "UUID_QMI"},
1411
    { UUID_INTEL_FWUSVC, "UUID_INTEL_FWUSVC"},
1412
    { UUID_INTEL_DPTF, "UUID_INTEL_DPTF"},
1413
    { UUID_INTEL_SAR, "UUID_INTEL_SAR"},
1414
    { UUID_INTEL_ACT, "UUID_INTEL_ACT"},
1415
    { UUID_INTEL_TRCSVC, "UUID_INTEL_TRCSVC"},
1416
    { UUID_INTEL_NRTC, "UUID_INTEL_NRTC"},
1417
    { UUID_INTEL_USB_PROFILE, "UUID_INTEL_USB_PROFILE"},
1418
    { UUID_INTEL_CIQ, "UUID_INTEL_CIQ"},
1419
    { UUID_ATDS, "UUID_ATDS"},
1420
    { UUID_MULTIFLOW, "UUID_MULTIFLOW"},
1421
    { UUID_BASIC_CONNECT_EXTENSIONS, "UUID_BASIC_CONNECT_EXTENSIONS"},
1422
    { UUID_MS_SARCONTROL, "UUID_MS_SARCONTROL"},
1423
    { UUID_MS_UICC_LOW_LEVEL, "UUID_MS_UICC_LOW_LEVEL"},
1424
    { UUID_MS_VOICE_EXTENSIONS, "UUID_MS_VOICE_EXTENSIONS"},
1425
    { 0, NULL}
1426
};
1427
static value_string_ext mbim_service_id_vals_ext = VALUE_STRING_EXT_INIT(mbim_service_id_vals);
1428
1429
0
#define MBIM_CID_DEVICE_CAPS                   1
1430
0
#define MBIM_CID_SUBSCRIBER_READY_STATUS       2
1431
0
#define MBIM_CID_RADIO_STATE                   3
1432
0
#define MBIM_CID_PIN                           4
1433
0
#define MBIM_CID_PIN_LIST                      5
1434
0
#define MBIM_CID_HOME_PROVIDER                 6
1435
0
#define MBIM_CID_PREFERRED_PROVIDERS           7
1436
0
#define MBIM_CID_VISIBLE_PROVIDERS             8
1437
0
#define MBIM_CID_REGISTER_STATE                9
1438
0
#define MBIM_CID_PACKET_SERVICE                10
1439
0
#define MBIM_CID_SIGNAL_STATE                  11
1440
0
#define MBIM_CID_CONNECT                       12
1441
0
#define MBIM_CID_PROVISIONED_CONTEXTS          13
1442
0
#define MBIM_CID_SERVICE_ACTIVATION            14
1443
0
#define MBIM_CID_IP_CONFIGURATION              15
1444
0
#define MBIM_CID_DEVICE_SERVICES               16
1445
0
#define MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST 19
1446
0
#define MBIM_CID_PACKET_STATISTICS             20
1447
0
#define MBIM_CID_NETWORK_IDLE_HINT             21
1448
0
#define MBIM_CID_EMERGENCY_MODE                22
1449
0
#define MBIM_CID_IP_PACKET_FILTERS             23
1450
0
#define MBIM_CID_MULTICARRIER_PROVIDERS        24
1451
1452
static const value_string mbim_uuid_basic_connect_cid_vals[] = {
1453
    { MBIM_CID_DEVICE_CAPS, "DEVICE_CAPS"},
1454
    { MBIM_CID_SUBSCRIBER_READY_STATUS, "SUBSCRIBER_READY_STATUS"},
1455
    { MBIM_CID_RADIO_STATE, "RADIO_STATE"},
1456
    { MBIM_CID_PIN, "PIN"},
1457
    { MBIM_CID_PIN_LIST, "PIN_LIST"},
1458
    { MBIM_CID_HOME_PROVIDER, "HOME_PROVIDER"},
1459
    { MBIM_CID_PREFERRED_PROVIDERS, "PREFERRED_PROVIDERS"},
1460
    { MBIM_CID_VISIBLE_PROVIDERS, "VISIBLE_PROVIDERS"},
1461
    { MBIM_CID_REGISTER_STATE, "REGISTER_STATE"},
1462
    { MBIM_CID_PACKET_SERVICE, "PACKET_SERVICE"},
1463
    { MBIM_CID_SIGNAL_STATE, "SIGNAL_STATE"},
1464
    { MBIM_CID_CONNECT, "CONNECT"},
1465
    { MBIM_CID_PROVISIONED_CONTEXTS, "PROVISIONED_CONTEXTS"},
1466
    { MBIM_CID_SERVICE_ACTIVATION, "SERVICE_ACTIVATION"},
1467
    { MBIM_CID_IP_CONFIGURATION, "IP_CONFIGURATION"},
1468
    { MBIM_CID_DEVICE_SERVICES, "DEVICE_SERVICES"},
1469
    { MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST, "DEVICE_SERVICE_SUBSCRIBE_LIST"},
1470
    { MBIM_CID_PACKET_STATISTICS, "PACKET_STATISTICS"},
1471
    { MBIM_CID_NETWORK_IDLE_HINT, "NETWORK_IDLE_HINT"},
1472
    { MBIM_CID_EMERGENCY_MODE, "EMERGENCY_MODE"},
1473
    { MBIM_CID_IP_PACKET_FILTERS, "IP_PACKET_FILTERS"},
1474
    { MBIM_CID_MULTICARRIER_PROVIDERS, "MULTICARRIER_PROVIDERS"},
1475
    { 0, NULL}
1476
};
1477
static value_string_ext mbim_uuid_basic_connect_cid_vals_ext = VALUE_STRING_EXT_INIT(mbim_uuid_basic_connect_cid_vals);
1478
1479
0
#define MBIM_CID_SMS_CONFIGURATION        1
1480
0
#define MBIM_CID_SMS_READ                 2
1481
0
#define MBIM_CID_SMS_SEND                 3
1482
0
#define MBIM_CID_SMS_DELETE               4
1483
0
#define MBIM_CID_SMS_MESSAGE_STORE_STATUS 5
1484
1485
static const value_string mbim_uuid_sms_cid_vals[] = {
1486
    { MBIM_CID_SMS_CONFIGURATION, "SMS_CONFIGURATION"},
1487
    { MBIM_CID_SMS_READ, "SMS_READ"},
1488
    { MBIM_CID_SMS_SEND, "SMS_SEND"},
1489
    { MBIM_CID_SMS_DELETE, "SMS_DELETE"},
1490
    { MBIM_CID_SMS_MESSAGE_STORE_STATUS, "SMS_MESSAGE_STORE_STATUS"},
1491
    { 0, NULL}
1492
};
1493
1494
0
#define MBIM_CID_USSD 1
1495
1496
static const value_string mbim_uuid_ussd_cid_vals[] = {
1497
    { MBIM_CID_USSD, "USSD"},
1498
    { 0, NULL}
1499
};
1500
1501
0
#define MBIM_CID_PHONEBOOK_CONFIGURATION 1
1502
0
#define MBIM_CID_PHONEBOOK_READ          2
1503
0
#define MBIM_CID_PHONEBOOK_DELETE        3
1504
0
#define MBIM_CID_PHONEBOOK_WRITE         4
1505
1506
static const value_string mbim_uuid_phonebook_cid_vals[] = {
1507
    { MBIM_CID_PHONEBOOK_CONFIGURATION, "PHONEBOOK_CONFIGURATION"},
1508
    { MBIM_CID_PHONEBOOK_READ, "PHONEBOOK_READ"},
1509
    { MBIM_CID_PHONEBOOK_DELETE, "PHONEBOOK_DELETE"},
1510
    { MBIM_CID_PHONEBOOK_WRITE, "PHONEBOOK_WRITE"},
1511
    { 0, NULL}
1512
};
1513
1514
0
#define MBIM_CID_STK_PAC               1
1515
0
#define MBIM_CID_STK_TERMINAL_RESPONSE 2
1516
0
#define MBIM_CID_STK_ENVELOPE          3
1517
1518
static const value_string mbim_uuid_stk_cid_vals[] = {
1519
    { MBIM_CID_STK_PAC, "STK_PAC"},
1520
    { MBIM_CID_STK_TERMINAL_RESPONSE, "STK_TERMINAL_RESPONSE"},
1521
    { MBIM_CID_STK_ENVELOPE, "STK_ENVELOPE"},
1522
    { 0, NULL}
1523
};
1524
1525
0
#define MBIM_CID_AKA_AUTH  1
1526
0
#define MBIM_CID_AKAP_AUTH 2
1527
0
#define MBIM_CID_SIM_AUTH  3
1528
1529
static const value_string mbim_uuid_auth_cid_vals[] = {
1530
    { MBIM_CID_AKA_AUTH, "AKA_AUTH"},
1531
    { MBIM_CID_AKAP_AUTH, "AKAP_AUTH"},
1532
    { MBIM_CID_SIM_AUTH, "SIM_AUTH"},
1533
    { 0, NULL}
1534
};
1535
1536
0
#define MBIM_CID_DSS_CONNECT 1
1537
1538
static const value_string mbim_uuid_dss_cid_vals[] = {
1539
    { MBIM_CID_DSS_CONNECT, "DSS_CONNECT"},
1540
    { 0, NULL}
1541
};
1542
1543
0
#define MBIM_CID_MULTICARRIER_CAPABILITIES     1
1544
0
#define MBIM_CID_LOCATION_INFO                 2
1545
0
#define MBIM_CID_MULTICARRIER_CURRENT_CID_LIST 3
1546
1547
static const value_string mbim_uuid_multicarrier_cid_vals[] = {
1548
    { MBIM_CID_MULTICARRIER_CAPABILITIES, "MULTICARRIER_CAPABILITIES"},
1549
    { MBIM_CID_LOCATION_INFO, "LOCATION_INFO"},
1550
    { MBIM_CID_MULTICARRIER_CURRENT_CID_LIST, "MULTICARRIER_CURRENT_CID_LIST"},
1551
    { 0, NULL}
1552
};
1553
1554
0
#define MBIM_CID_MS_HOSTSHUTDOWN    1
1555
0
#define MBIM_CID_MS_HOSTPRESHUTDOWN 2
1556
1557
static const value_string mbim_uuid_ms_hostshutdown_cid_vals[] = {
1558
    { MBIM_CID_MS_HOSTSHUTDOWN, "MS_HOSTSHUTDOWN"},
1559
    { MBIM_CID_MS_HOSTPRESHUTDOWN, "MS_HOSTPRESHUTDOWN"},
1560
    { 0, NULL}
1561
};
1562
1563
0
#define MBIM_CID_MSFWID_FIRMWAREID 1
1564
1565
static const value_string mbim_uuid_msfwid_cid_vals[] = {
1566
    { MBIM_CID_MSFWID_FIRMWAREID, "MSFWID_FIRMWAREID"},
1567
    { 0, NULL}
1568
};
1569
1570
0
#define MBIM_CID_QMI_QMI 1
1571
1572
static const value_string mbim_uuid_qmi_cid_vals[] = {
1573
    { MBIM_CID_QMI_QMI, "QMI"},
1574
    { 0, NULL}
1575
};
1576
1577
0
#define MBIM_CID_INTC_MODEM_REBOOT 1
1578
1579
static const value_string mbim_uuid_intel_fwusvc_cid_vals[] = {
1580
    { MBIM_CID_INTC_MODEM_REBOOT, "INTC_MODEM_REBOOT"},
1581
    { 0, NULL}
1582
};
1583
1584
0
#define MBIM_CID_INTC_THERMAL_STATE 0x02000100
1585
1586
static const value_string mbim_uuid_intel_dptf_cid_vals[] = {
1587
    { MBIM_CID_INTC_THERMAL_STATE, "INTC_THERMAL_STATE"},
1588
    { 0, NULL}
1589
};
1590
1591
0
#define MBIM_CID_INTC_SAR_CONFIG 1
1592
1593
static const value_string mbim_uuid_intel_sar_cid_vals[] = {
1594
    { MBIM_CID_INTC_SAR_CONFIG, "INTC_SAR_CONFIG"},
1595
    { 0, NULL}
1596
};
1597
1598
0
#define MBIM_CID_INTC_ADPCLK_MODE 0x02000010
1599
1600
static const value_string mbim_uuid_intel_act_cid_vals[] = {
1601
    { MBIM_CID_INTC_ADPCLK_MODE, "INTC_ADPCLK_MODE"},
1602
    { 0, NULL}
1603
};
1604
1605
0
#define MBIM_CID_INTC_TRACE      1
1606
0
#define MBIM_CID_INTC_TRACE_DATA 2
1607
1608
static const value_string mbim_uuid_intel_trcsvc_cid_vals[] = {
1609
    { MBIM_CID_INTC_TRACE, "INTC_TRACE"},
1610
    { MBIM_CID_INTC_TRACE_DATA, "INTC_TRACE_DATA"},
1611
    { 0, NULL}
1612
};
1613
1614
0
#define MBIM_CID_INTC_NRTAPP 1
1615
0
#define MBIM_CID_INTC_NRTCWS 2
1616
1617
static const value_string mbim_uuid_intel_nrtc_cid_vals[] = {
1618
    { MBIM_CID_INTC_NRTAPP, "INTC_NRTAPP"},
1619
    { MBIM_CID_INTC_NRTCWS, "INTC_NRTCWS"},
1620
    { 0, NULL}
1621
};
1622
1623
0
#define MBIM_CID_INTC_USBPROFILE 1
1624
1625
static const value_string mbim_uuid_intel_usb_profile_cid_vals[] = {
1626
    { MBIM_CID_INTC_USBPROFILE, "INTC_USBPROFILE"},
1627
    { 0, NULL}
1628
};
1629
1630
0
#define MBIM_CID_INTC_CIQ 1
1631
1632
static const value_string mbim_uuid_intel_ciq_cid_vals[] = {
1633
    { MBIM_CID_INTC_CIQ, "INTC_CIQ"},
1634
    { 0, NULL}
1635
};
1636
1637
0
#define MBIM_CID_ATDS_SIGNAL                 1
1638
0
#define MBIM_CID_ATDS_LOCATION               2
1639
0
#define MBIM_CID_ATDS_OPERATORS              3
1640
0
#define MBIM_CID_ATDS_RAT                    4
1641
0
#define MBIM_CID_ATDS_REGISTER_STATE         9
1642
0
#define MBIM_CID_ATDS_SET_PROJECTION_TABLES 10
1643
1644
static const value_string mbim_uuid_atds_cid_vals[] = {
1645
    { MBIM_CID_ATDS_SIGNAL, "ATDS_SIGNAL"},
1646
    { MBIM_CID_ATDS_LOCATION, "ATDS_LOCATION"},
1647
    { MBIM_CID_ATDS_OPERATORS, "ATDS_OPERATORS"},
1648
    { MBIM_CID_ATDS_RAT, "ATDS_RAT"},
1649
    { MBIM_CID_ATDS_REGISTER_STATE, "ATDS_REGISTER_STATE"},
1650
    { MBIM_CID_ATDS_SET_PROJECTION_TABLES, "ATDS_SET_PROJECTION_TABLES"},
1651
    { 0, NULL}
1652
};
1653
1654
0
#define MBIM_CID_MULTIFLOW_CAPS     1
1655
0
#define MBIM_CID_MULTIFLOW_UPLINK   2
1656
0
#define MBIM_CID_MULTIFLOW_DOWNLINK 3
1657
0
#define MBIM_CID_MULTIFLOW_TFT      4
1658
1659
static const value_string mbim_uuid_multiflow_cid_vals[] = {
1660
    { MBIM_CID_MULTIFLOW_CAPS, "MULTIFLOW_CAPS"},
1661
    { MBIM_CID_MULTIFLOW_UPLINK, "MULTIFLOW_UPLINK"},
1662
    { MBIM_CID_MULTIFLOW_DOWNLINK, "MULTIFLOW_DOWNLINK"},
1663
    { MBIM_CID_MULTIFLOW_TFT, "MULTIFLOW_TFT"},
1664
    { 0, NULL}
1665
};
1666
1667
0
#define MBIM_CID_MS_PROVISIONED_CONTEXT_V2  1
1668
0
#define MBIM_CID_MS_NETWORK_BLACKLIST       2
1669
0
#define MBIM_CID_MS_LTE_ATTACH_CONFIG       3
1670
0
#define MBIM_CID_MS_LTE_ATTACH_STATUS       4
1671
0
#define MBIM_CID_MS_SYS_CAPS                5
1672
0
#define MBIM_CID_MS_DEVICE_CAPS_V2          6
1673
0
#define MBIM_CID_MS_DEVICE_SLOT_MAPPINGS    7
1674
0
#define MBIM_CID_MS_SLOT_INFO_STATUS        8
1675
0
#define MBIM_CID_PCO                        9
1676
0
#define MBIM_CID_MS_DEVICE_RESET           10
1677
0
#define MBIM_CID_BASE_STATIONS_INFO        11
1678
0
#define MBIM_CID_LOCATION_INFO_STATUS      12
1679
#define MBIM_CID_MS_MODEM_LOGGING_CONFIG   13
1680
0
#define MBIM_CID_MS_PIN_INFO_EX2           14
1681
0
#define MBIM_CID_VERSION                   15
1682
0
#define MBIM_CID_MS_MODEM_CONFIG           16
1683
0
#define MBIM_CID_MS_REGISTRATION_PARAMS    17
1684
0
#define MBIM_CID_MS_NETWORK_PARAMS         18
1685
0
#define MBIM_CID_MS_WAKE_REASON            19
1686
0
#define MBIM_CID_MS_UE_POLICY              20
1687
1688
static const value_string mbim_uuid_basic_connect_extensions_cid_vals[] = {
1689
    { MBIM_CID_MS_PROVISIONED_CONTEXT_V2, "MS_PROVISIONED_CONTEXT_V2"},
1690
    { MBIM_CID_MS_NETWORK_BLACKLIST, "MS_NETWORK_BLACKLIST"},
1691
    { MBIM_CID_MS_LTE_ATTACH_CONFIG, "MS_LTE_ATTACH_CONFIG"},
1692
    { MBIM_CID_MS_LTE_ATTACH_STATUS, "MS_LTE_ATTACH_STATUS"},
1693
    { MBIM_CID_MS_SYS_CAPS, "MS_SYS_CAPS"},
1694
    { MBIM_CID_MS_DEVICE_CAPS_V2, "MS_DEVICE_CAPS_V2"},
1695
    { MBIM_CID_MS_DEVICE_SLOT_MAPPINGS, "MS_DEVICE_SLOT_MAPPINGS"},
1696
    { MBIM_CID_MS_SLOT_INFO_STATUS, "MS_SLOT_INFO_STATUS"},
1697
    { MBIM_CID_PCO, "PCO"},
1698
    { MBIM_CID_MS_DEVICE_RESET, "MS_DEVICE_RESET"},
1699
    { MBIM_CID_BASE_STATIONS_INFO, "BASE_STATIONS_INFO"},
1700
    { MBIM_CID_LOCATION_INFO_STATUS, "LOCATION_INFO_STATUS"},
1701
    { MBIM_CID_MS_MODEM_LOGGING_CONFIG, "MS_MODEM_LOGGING_CONFIG"},
1702
    { MBIM_CID_MS_PIN_INFO_EX2, "MS_PIN_INFO_EX2"},
1703
    { MBIM_CID_VERSION, "VERSION"},
1704
    { MBIM_CID_MS_MODEM_CONFIG, "MS_MODEM_CONFIG"},
1705
    { MBIM_CID_MS_REGISTRATION_PARAMS, "MS_REGISTRATION_PARAMS"},
1706
    { MBIM_CID_MS_NETWORK_PARAMS, "MS_NETWORK_PARAMS"},
1707
    { MBIM_CID_MS_WAKE_REASON, "MS_WAKE_REASON"},
1708
    { MBIM_CID_MS_UE_POLICY, "MS_UE_POLICY"},
1709
    { 0, NULL}
1710
};
1711
1712
0
#define MBIM_CID_MS_SAR_CONFIG          1
1713
0
#define MBIM_CID_MS_TRANSMISSION_STATUS 2
1714
1715
static const value_string mbim_uuid_ms_sarcontrol_cid_vals[] = {
1716
    { MBIM_CID_MS_SAR_CONFIG, "MS_SAR_CONFIG"},
1717
    { MBIM_CID_MS_TRANSMISSION_STATUS, "MS_TRANSMISSION_STATUS"},
1718
    { 0, NULL}
1719
};
1720
1721
0
#define MBIM_CID_MS_UICC_ATR                 1
1722
0
#define MBIM_CID_MS_UICC_OPEN_CHANNEL        2
1723
0
#define MBIM_CID_MS_UICC_CLOSE_CHANNEL       3
1724
0
#define MBIM_CID_MS_UICC_APDU                4
1725
0
#define MBIM_CID_MS_UICC_TERMINAL_CAPABILITY 5
1726
0
#define MBIM_CID_MS_UICC_RESET               6
1727
0
#define MBIM_CID_MS_UICC_APP_LIST            7
1728
0
#define MBIM_CID_MS_UICC_FILE_STATUS         8
1729
0
#define MBIM_CID_MS_UICC_ACCESS_BINARY       9
1730
0
#define MBIM_CID_MS_UICC_ACCESS_RECORD      10
1731
1732
static const value_string mbim_uuid_ms_uicc_low_level_cid_vals[] = {
1733
    { MBIM_CID_MS_UICC_ATR, "MS_UICC_ATR" },
1734
    { MBIM_CID_MS_UICC_OPEN_CHANNEL, "MS_UICC_OPEN_CHANNEL" },
1735
    { MBIM_CID_MS_UICC_CLOSE_CHANNEL, "MS_UICC_CLOSE_CHANNEL" },
1736
    { MBIM_CID_MS_UICC_APDU, "MS_UICC_APDU" },
1737
    { MBIM_CID_MS_UICC_TERMINAL_CAPABILITY, "MS_UICC_TERMINAL_CAPABILITY" },
1738
    { MBIM_CID_MS_UICC_RESET, "MS_UICC_RESET" },
1739
    { MBIM_CID_MS_UICC_APP_LIST, "MS_UICC_APP_LIST" },
1740
    { MBIM_CID_MS_UICC_FILE_STATUS, "MS_UICC_FILE_STATUS" },
1741
    { MBIM_CID_MS_UICC_ACCESS_BINARY, "MS_UICC_ACCESS_BINARY" },
1742
    { MBIM_CID_MS_UICC_ACCESS_RECORD, "MS_UICC_ACCESS_RECORD" },
1743
    { 0, NULL}
1744
};
1745
1746
0
#define MBIM_CID_MS_VOICE_EXTENSIONS_NITZ    10
1747
static const value_string mbim_uuid_ms_voice_extensions_cid_vals[] = {
1748
    { MBIM_CID_MS_VOICE_EXTENSIONS_NITZ, "MS_NITZ"},
1749
    { 0, NULL}
1750
};
1751
1752
struct mbim_uuid_info_ {
1753
    int *hf_entry;
1754
    const value_string *cid_list;
1755
    value_string_ext *cid_list_ext;
1756
};
1757
1758
static const struct mbim_uuid_info_ mbim_uuid_info[UUID_MAX] = {
1759
    { &hf_mbim_uuid_basic_connect_cid, NULL, &mbim_uuid_basic_connect_cid_vals_ext}, /* UUID_BASIC_CONNECT */
1760
    { &hf_mbim_uuid_sms_cid, mbim_uuid_sms_cid_vals, NULL}, /* UUID_SMS */
1761
    { &hf_mbim_uuid_ussd_cid, mbim_uuid_ussd_cid_vals, NULL}, /* UUID_USSD */
1762
    { &hf_mbim_uuid_phonebook_cid, mbim_uuid_phonebook_cid_vals, NULL}, /* UUID_PHONEBOOK */
1763
    { &hf_mbim_uuid_stk_cid, mbim_uuid_stk_cid_vals, NULL}, /* UUID_STK */
1764
    { &hf_mbim_uuid_auth_cid, mbim_uuid_auth_cid_vals, NULL}, /* UUID_AUTH */
1765
    { &hf_mbim_uuid_dss_cid, mbim_uuid_dss_cid_vals, NULL}, /* UUID_DSS */
1766
    { &hf_mbim_uuid_multicarrier_cid, mbim_uuid_multicarrier_cid_vals, NULL}, /* UUID_MULTICARRIER */
1767
    { &hf_mbim_uuid_ms_hostshutdown_cid, mbim_uuid_ms_hostshutdown_cid_vals, NULL}, /* UUID_MS_HOSTSHUTDOWN */
1768
    { &hf_mbim_uuid_msfwid_cid, mbim_uuid_msfwid_cid_vals, NULL}, /* UUID_MSFWID */
1769
    { &hf_mbim_uuid_qmi_cid, mbim_uuid_qmi_cid_vals, NULL}, /* UUID_QMI */
1770
    { &hf_mbim_uuid_intel_fwusvc_cid, mbim_uuid_intel_fwusvc_cid_vals, NULL}, /* UUID_INTEL_FWUSVC */
1771
    { &hf_mbim_uuid_intel_dptf_cid, mbim_uuid_intel_dptf_cid_vals, NULL}, /* UUID_INTEL_DPTF */
1772
    { &hf_mbim_uuid_intel_sar_cid, mbim_uuid_intel_sar_cid_vals, NULL}, /* UUID_INTEL_SAR */
1773
    { &hf_mbim_uuid_intel_act_cid, mbim_uuid_intel_act_cid_vals, NULL}, /* UUID_INTEL_ACT */
1774
    { &hf_mbim_uuid_intel_trcsvc_cid, mbim_uuid_intel_trcsvc_cid_vals, NULL}, /* UUID_INTEL_TRCSVC */
1775
    { &hf_mbim_uuid_intel_nrtc_cid, mbim_uuid_intel_nrtc_cid_vals, NULL}, /* UUID_INTEL_NRTC */
1776
    { &hf_mbim_uuid_intel_usb_profile_cid, mbim_uuid_intel_usb_profile_cid_vals, NULL}, /* UUID_INTEL_USB_PROFILE */
1777
    { &hf_mbim_uuid_intel_ciq_cid, mbim_uuid_intel_ciq_cid_vals, NULL}, /* UUID_INTEL_CIQ */
1778
    { &hf_mbim_uuid_atds_cid, mbim_uuid_atds_cid_vals, NULL}, /* UUID_ATDS */
1779
    { &hf_mbim_uuid_multiflow_cid, mbim_uuid_multiflow_cid_vals, NULL}, /* UUID_MULTIFLOW */
1780
    { &hf_mbim_uuid_basic_connect_extensions_cid, mbim_uuid_basic_connect_extensions_cid_vals, NULL}, /* UUID_BASIC_CONNECT_EXTENSIONS */
1781
    { &hf_mbim_uuid_ms_sarcontrol_cid, mbim_uuid_ms_sarcontrol_cid_vals, NULL}, /* UUID_MS_SARCONTROL */
1782
    { &hf_mbim_uuid_ms_uicc_low_level_cid, mbim_uuid_ms_uicc_low_level_cid_vals, NULL}, /* UUID_MS_UICC_LOW_LEVEL */
1783
    { &hf_mbim_uuid_ms_voice_extensions_cid, mbim_uuid_ms_voice_extensions_cid_vals, NULL} /* UUID_MS_VOICE_EXTENSIONS */
1784
};
1785
1786
static const value_string mbim_device_caps_info_device_type_vals[] = {
1787
    { 0, "Unknown"},
1788
    { 1, "Embedded"},
1789
    { 2, "Removable"},
1790
    { 3, "Remote"},
1791
    { 0, NULL}
1792
};
1793
1794
0
#define MBIM_CELLULAR_CLASS_GSM  1
1795
0
#define MBIM_CELLULAR_CLASS_CDMA 2
1796
1797
static const value_string mbim_cellular_class_vals[] = {
1798
    { MBIM_CELLULAR_CLASS_GSM, "GSM"},
1799
    { MBIM_CELLULAR_CLASS_CDMA, "CDMA"},
1800
    { 0, NULL}
1801
};
1802
1803
static int* const mbim_cellular_class_fields[] = {
1804
    &hf_mbim_cellular_class_gsm,
1805
    &hf_mbim_cellular_class_cdma,
1806
    NULL
1807
};
1808
1809
static const value_string mbim_device_caps_info_voice_class_vals[] = {
1810
    { 0, "Unknown"},
1811
    { 1, "No Voice"},
1812
    { 2, "Separate Voice Data"},
1813
    { 3, "Simultaneous Voice Data"},
1814
    { 0, NULL}
1815
};
1816
1817
static const value_string mbim_packet_service_info_frequency_range_vals[] = {
1818
    { 0, "Unknown"},
1819
    { 1, "Range1"},
1820
    { 2, "Range2"},
1821
    { 3, "Range1AndRange2"},
1822
    { 0, NULL}
1823
};
1824
1825
static int * const mbim_device_caps_info_sim_class_fields[] = {
1826
    &hf_mbim_device_caps_info_sim_class_logical,
1827
    &hf_mbim_device_caps_info_sim_class_removable,
1828
    NULL
1829
};
1830
1831
static int * const mbim_data_class_fields[] = {
1832
    &hf_mbim_data_class_gprs,
1833
    &hf_mbim_data_class_edge,
1834
    &hf_mbim_data_class_umts,
1835
    &hf_mbim_data_class_hsdpa,
1836
    &hf_mbim_data_class_hsupa,
1837
    &hf_mbim_data_class_lte,
1838
    &hf_mbim_data_class_5g,
1839
    &hf_mbim_data_class_reserved_gsm,
1840
    &hf_mbim_data_class_1xrtt,
1841
    &hf_mbim_data_class_1xevdo,
1842
    &hf_mbim_data_class_1xevdoreva,
1843
    &hf_mbim_data_class_1xevdv,
1844
    &hf_mbim_data_class_3xrtt,
1845
    &hf_mbim_data_class_1xevdorevb,
1846
    &hf_mbim_data_class_umb,
1847
    &hf_mbim_data_class_reserved_cdma,
1848
    &hf_mbim_data_class_custom,
1849
    NULL
1850
};
1851
1852
static int * const mbim_device_caps_info_sms_caps_fields[] = {
1853
    &hf_mbim_device_caps_info_sms_caps_pdu_receive,
1854
    &hf_mbim_device_caps_info_sms_caps_pdu_send,
1855
    &hf_mbim_device_caps_info_sms_caps_text_receive,
1856
    &hf_mbim_device_caps_info_sms_caps_text_send,
1857
    NULL
1858
};
1859
1860
static int * const mbim_device_caps_info_control_caps_fields[] = {
1861
    &hf_mbim_device_caps_info_control_caps_reg_manual,
1862
    &hf_mbim_device_caps_info_control_caps_hw_radio_switch,
1863
    &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip,
1864
    &hf_mbim_device_caps_info_control_caps_cdma_simple_ip,
1865
    &hf_mbim_device_caps_info_control_caps_multi_carrier,
1866
    &hf_mbim_device_caps_info_control_caps_esim,
1867
    &hf_mbim_device_caps_info_control_caps_ue_policy_route_selection,
1868
    &hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable,
1869
    &hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable,
1870
    NULL
1871
};
1872
1873
static int * const mbim_data_subclass_fields[] = {
1874
    &hf_mbim_data_subclass_5gendc,
1875
    &hf_mbim_data_subclass_5gnr,
1876
    &hf_mbim_data_subclass_5gnedc,
1877
    &hf_mbim_data_subclass_5gelte,
1878
    &hf_mbim_data_subclass_5gngendc,
1879
    NULL
1880
};
1881
1882
static const value_string mbim_subscr_ready_status_ready_state_vals[] = {
1883
    { 0, "Not Initialized"},
1884
    { 1, "Initialized"},
1885
    { 2, "SIM Not Inserted"},
1886
    { 3, "Bad SIM"},
1887
    { 4, "Failure"},
1888
    { 5, "Not Activated"},
1889
    { 6, "Device Locked"},
1890
    { 0, NULL}
1891
};
1892
1893
static int * const mbim_subscr_ready_status_flags_fields[] = {
1894
    &hf_mbim_subscr_ready_status_flag_esim,
1895
    &hf_mbim_subscr_ready_status_flag_sim_removability_known,
1896
    &hf_mbim_subscr_ready_status_flag_sim_removable,
1897
    &hf_mbim_subscr_ready_status_flag_sim_slot_active,
1898
    NULL
1899
};
1900
1901
static const value_string mbim_subscr_ready_status_ready_info_vals[] = {
1902
    { 0, "None"},
1903
    { 1, "Protect Unique ID"},
1904
    { 0, NULL}
1905
};
1906
1907
static const value_string mbim_radio_state_vals[] = {
1908
    { 0, "Radio Off"},
1909
    { 1, "Radio On"},
1910
    { 0, NULL}
1911
};
1912
1913
static const value_string mbim_pin_type_vals[] = {
1914
    {  0, "None"},
1915
    {  1, "Custom"},
1916
    {  2, "PIN 1"},
1917
    {  3, "PIN 2"},
1918
    {  4, "Device SIM PIN"},
1919
    {  5, "Device First SIM PIN"},
1920
    {  6, "Network PIN"},
1921
    {  7, "Network Subset PIN"},
1922
    {  8, "Service Provider PIN"},
1923
    {  9, "Corporate PIN"},
1924
    { 10, "Subsidy Lock"},
1925
    { 11, "PUK 1"},
1926
    { 12, "PUK 2"},
1927
    { 13, "Device First SIM PUK"},
1928
    { 14, "Network PUK"},
1929
    { 15, "Network Subset PUK"},
1930
    { 16, "Service Provider PUK"},
1931
    { 17, "Corporate PUK"},
1932
    { 18, "Corporate NEV"},
1933
    { 19, "Corporate ADM"},
1934
    { 0, NULL}
1935
};
1936
1937
static const value_string mbim_pin_operation_vals[] = {
1938
    { 0, "Enter"},
1939
    { 1, "Enable"},
1940
    { 2, "Disable"},
1941
    { 3, "Change"},
1942
    { 0, NULL}
1943
};
1944
1945
static const value_string mbim_pin_state_vals[] = {
1946
    { 0, "Unlocked"},
1947
    { 1, "Locked"},
1948
    { 0, NULL}
1949
};
1950
1951
static const value_string mbim_pin_mode_vals[] = {
1952
    { 0, "Not Supported"},
1953
    { 1, "Enabled"},
1954
    { 2, "Disabled"},
1955
    { 0, NULL}
1956
};
1957
1958
static const value_string mbim_pin_format_vals[] = {
1959
    { 0, "Unknown"},
1960
    { 1, "Numeric"},
1961
    { 2, "Alpha Numeric"},
1962
    { 0, NULL}
1963
};
1964
1965
static const value_string mbim_ms_modem_config_status_vals[] = {
1966
    { 0, "Unknown"},
1967
    { 1, "Started"},
1968
    { 2, "Completed"},
1969
    { 0, NULL}
1970
};
1971
1972
static const value_string mbim_ms_mico_mode_vals[] = {
1973
    { 0, "Disabled"},
1974
    { 1, "Enabled"},
1975
    { 2, "Unsupported"},
1976
    { 3, "Default"},
1977
    { 0, NULL}
1978
};
1979
1980
static const value_string mbim_ms_mico_indication_vals[] = {
1981
    { 0, "Not Allocated"},
1982
    { 1, "Allocated"},
1983
    { 0xffffffff, "Not Available"},
1984
    { 0, NULL}
1985
};
1986
static const value_string mbim_ms_pre_dflt_nssai_info_access_type_vals[] = {
1987
    { 0, "Unknown"},
1988
    { 1, "3GPP"},
1989
    { 2, "Non3GPP"},
1990
    { 0, NULL}
1991
};
1992
static const value_string mbim_ms_default_pdu_hint_vals[] = {
1993
    { 0, "Activation Unlikely"},
1994
    { 1, "Activation Likely"},
1995
    { 0, NULL}
1996
};
1997
1998
static const value_string mbim_ms_ladn_ind_vals[] = {
1999
    { 0, "Info Not Needed"},
2000
    { 1, "Info Requested"},
2001
    { 0, NULL}
2002
};
2003
2004
static const value_string mbim_ms_drx_params_vals[] = {
2005
    { 0, "Not Specified"},
2006
    { 1, "Not Supported"},
2007
    { 2, "Cycle32"},
2008
    { 3, "Cycle64"},
2009
    { 4, "Cycle128"},
2010
    { 5, "Cycle256"},
2011
    { 0, NULL}
2012
};
2013
2014
static const value_string hf_mbim_ms_wake_reason_wake_type_vals[] = {
2015
    { 0, "CID Response"},
2016
    { 1, "CID Indication"},
2017
    { 2, "Packet"},
2018
    { 0, NULL}
2019
};
2020
2021
0
#define TLV_TYPE_UNKNOWN                        0
2022
#define TLV_TYPE_UE_POLICIES                    1
2023
0
#define TLV_TYPE_SINGLE_NSSAI                   2
2024
0
#define TLV_TYPE_ALLOWED_NSSAI                  3
2025
0
#define TLV_TYPE_CFG_NSSAI                      4
2026
0
#define TLV_TYPE_DFLT_CFG_NSSAI                 5
2027
0
#define TLV_TYPE_PRECFG_DFLT_CFG_NSSAI          6
2028
0
#define TLV_TYPE_REJ_NSSAI                      7
2029
0
#define TLV_TYPE_LADN                           8
2030
0
#define TLV_TYPE_TAI                            9
2031
0
#define TLV_TYPE_WCHAR_STR                     10
2032
#define TLV_TYPE_UINT16_TBL                    11
2033
#define TLV_TYPE_EAP_PACKET                    12
2034
#define TLV_TYPE_PCO                           13
2035
#define TLV_TYPE_ROUTE_SELECTION_DESCRIPTORS   14
2036
0
#define TLV_TYPE_TRAFFIC_PARAMETERS            15
2037
0
#define TLV_TYPE_WAKE_COMMAND                  16
2038
0
#define TLV_TYPE_WAKE_PACKET                   17
2039
0
#define TLV_TYPE_TYPE_OSID                     18
2040
0
#define TLV_TYPE_TYPE_3GPP_REL_VERSION         19
2041
0
#define TLV_TYPE_TYPE_URSP_RULES_TD_ONLY       20
2042
0
#define TLV_TYPE_TYPE_SESSION_ID               21
2043
2044
static const value_string mbim_tlv_type_vals[] = {
2045
    { TLV_TYPE_UNKNOWN, "UNKNOWN"},
2046
    { TLV_TYPE_UE_POLICIES, "UE_POLICIES"},
2047
    { TLV_TYPE_SINGLE_NSSAI, "SINGLE_NSSAI"},
2048
    { TLV_TYPE_ALLOWED_NSSAI, "ALLOWED_NSSAI"},
2049
    { TLV_TYPE_CFG_NSSAI, "CFG_NSSAI"},
2050
    { TLV_TYPE_DFLT_CFG_NSSAI, "DFLT_CFG_NSSAI"},
2051
    { TLV_TYPE_PRECFG_DFLT_CFG_NSSAI, "PRECFG_DFLT_CFG_NSSAI"},
2052
    { TLV_TYPE_REJ_NSSAI, "REJ_NSSAI"},
2053
    { TLV_TYPE_LADN, "LADN"},
2054
    { TLV_TYPE_TAI, "TAI"},
2055
    { TLV_TYPE_WCHAR_STR, "WCHAR_STR"},
2056
    { TLV_TYPE_UINT16_TBL, "UINT16_TBL"},
2057
    { TLV_TYPE_EAP_PACKET, "EAP_PACKET"},
2058
    { TLV_TYPE_PCO, "PCO"},
2059
    { TLV_TYPE_ROUTE_SELECTION_DESCRIPTORS, "ROUTE_SELECTION_DESCRIPTORS"},
2060
    { TLV_TYPE_TRAFFIC_PARAMETERS, "TRAFFIC_PARAMETERS"},
2061
    { TLV_TYPE_WAKE_COMMAND, "WAKE_COMMAND"},
2062
    { TLV_TYPE_WAKE_PACKET, "WAKE_PACKET"},
2063
    { TLV_TYPE_TYPE_OSID, "OS_ID"},
2064
    { TLV_TYPE_TYPE_3GPP_REL_VERSION, "3GPP_REL_VERSION"},
2065
    { TLV_TYPE_TYPE_URSP_RULES_TD_ONLY, "URSP_RULES_TD_ONLY"},
2066
    { TLV_TYPE_TYPE_SESSION_ID, "SESSION_ID"},
2067
    { 0, NULL}
2068
};
2069
2070
static int * const mbim_provider_state_fields[] = {
2071
    &hf_mbim_provider_state_home,
2072
    &hf_mbim_provider_state_forbidden,
2073
    &hf_mbim_provider_state_preferred,
2074
    &hf_mbim_provider_state_visible,
2075
    &hf_mbim_provider_state_registered,
2076
    &hf_mbim_provider_state_preferred_multicarrier,
2077
    NULL
2078
};
2079
2080
0
#define URSP_TC_TYPE_MATCH_ALL                      0x1
2081
0
#define URSP_TC_TYPE_OSID_APPID                     0x8
2082
0
#define URSP_TC_TYPE_IPV4                           0x10
2083
0
#define URSP_TC_TYPE_IPV6                           0x21
2084
0
#define URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER     0x30
2085
0
#define URSP_TC_TYPE_PORT                           0x50
2086
0
#define URSP_TC_TYPE_PORT_RANGE                     0x51
2087
0
#define URSP_TC_TYPE_SECURITY_PARAM_INDEX           0x60
2088
0
#define URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS       0x70
2089
0
#define URSP_TC_TYPE_FLOW_LABEL                     0x80
2090
0
#define URSP_TC_TYPE_MAC_ADDRESS                    0x81
2091
0
#define URSP_TC_TYPE_C_TAG_VID                      0x83
2092
0
#define URSP_TC_TYPE_S_TAG_VID                      0x84
2093
0
#define URSP_TC_TYPE_C_TAG_PCP_AND_DEI              0x85
2094
0
#define URSP_TC_TYPE_S_TAG_PCP_AND_DEI              0x86
2095
0
#define URSP_TC_TYPE_ETHER                          0x87
2096
0
#define URSP_TC_TYPE_DNN                            0x88
2097
0
#define URSP_TC_TYPE_CONNECTION_CAPABILITY          0x90
2098
0
#define URSP_TC_TYPE_FQDN                           0x91
2099
0
#define URSP_TC_TYPE_APPID                          0xa0
2100
2101
static const value_string ursp_tc_type_vals[] = {
2102
    { URSP_TC_TYPE_MATCH_ALL, "Match all"},
2103
    { URSP_TC_TYPE_OSID_APPID, "OS Id + OS App Id"},
2104
    { URSP_TC_TYPE_IPV4, "IPv4 remote address"},
2105
    { URSP_TC_TYPE_IPV6, "IPv6 remote address/prefix length"},
2106
    { URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER, "Protocol identifier/next header"},
2107
    { URSP_TC_TYPE_PORT, "Single remote port"},
2108
    { URSP_TC_TYPE_PORT_RANGE, "Remote port range"},
2109
    { URSP_TC_TYPE_SECURITY_PARAM_INDEX, "Security parameter index"},
2110
    { URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS, "Type of service/traffic class"},
2111
    { URSP_TC_TYPE_FLOW_LABEL, "Flow label"},
2112
    { URSP_TC_TYPE_MAC_ADDRESS, "Destination MAC address"},
2113
    { URSP_TC_TYPE_C_TAG_VID, "802.1Q C-TAG VID"},
2114
    { URSP_TC_TYPE_S_TAG_VID, "802.1Q S-TAG VID"},
2115
    { URSP_TC_TYPE_C_TAG_PCP_AND_DEI, "802.1Q C-TAG PCP/DEI"},
2116
    { URSP_TC_TYPE_S_TAG_PCP_AND_DEI, "802.1Q S-TAG PCP/DEI"},
2117
    { URSP_TC_TYPE_ETHER, "Ethertype"},
2118
    { URSP_TC_TYPE_DNN, "DNN"},
2119
    { URSP_TC_TYPE_CONNECTION_CAPABILITY, "Connection capabilities"},
2120
    { URSP_TC_TYPE_FQDN, "Destination FQDN"},
2121
    { URSP_TC_TYPE_APPID, "OS App Id"},
2122
    { 0, NULL}
2123
};
2124
static int* const ursp_tc_connection_capability_flags_fields[] = {
2125
    &hf_mbim_ms_ursp_tc_connection_capability_flag_ims,
2126
    &hf_mbim_ms_ursp_tc_connection_capability_flag_mms,
2127
    &hf_mbim_ms_ursp_tc_connection_capability_flag_supl,
2128
    &hf_mbim_ms_ursp_tc_connection_capability_flag_internet,
2129
    NULL
2130
};
2131
2132
static void
2133
mbim_rssi_fmt(char *s, uint32_t val)
2134
0
{
2135
0
    if (val == 0) {
2136
0
        snprintf(s, ITEM_LABEL_LENGTH, "-113 or less dBm (0)");
2137
0
    } else if (val < 31) {
2138
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -113 + 2*val, val);
2139
0
    } else if (val == 31) {
2140
0
        snprintf(s, ITEM_LABEL_LENGTH, "-51 or greater dBm (31)");
2141
0
    } else if (val == 99) {
2142
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (99)");
2143
0
    } else {
2144
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2145
0
    }
2146
0
}
2147
2148
static const value_string mbim_error_rate_vals[] = {
2149
    {  0, "Frame error rate < 0.01%%"},
2150
    {  1, "Frame error rate 0.01-0.1%%"},
2151
    {  2, "Frame error rate 0.1-0.5%%"},
2152
    {  3, "Frame error rate 0.5-1.0%%"},
2153
    {  4, "Frame error rate 1.0-2.0%%"},
2154
    {  5, "Frame error rate 2.0-4.0%%"},
2155
    {  6, "Frame error rate 4.0-8.0%%"},
2156
    {  7, "Frame error rate > 8.0%%"},
2157
    { 99, "Unknown or undetectable"},
2158
    { 0, NULL}
2159
};
2160
2161
static const value_string mbim_visible_providers_action_vals[] = {
2162
    { 0, "Full Scan"},
2163
    { 1, "Restricted Scan"},
2164
    {0, NULL}
2165
};
2166
2167
static const value_string mbim_register_action_vals[] = {
2168
    { 0, "Automatic"},
2169
    { 1, "Manual"},
2170
    { 0, NULL}
2171
};
2172
2173
static const value_string mbim_register_state_vals[] = {
2174
    { 0, "Unknown"},
2175
    { 1, "Deregistered"},
2176
    { 2, "Searching"},
2177
    { 3, "Home"},
2178
    { 4, "Roaming"},
2179
    { 5, "Partner"},
2180
    { 6, "Denied"},
2181
    { 0, NULL}
2182
};
2183
2184
static const value_string mbim_register_mode_vals[] = {
2185
    { 0, "Unknown"},
2186
    { 1, "Automatic"},
2187
    { 2, "Manual"},
2188
    { 0, NULL}
2189
};
2190
2191
static int * const mbim_registration_state_info_registration_flags_fields[] = {
2192
    &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available,
2193
    &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach,
2194
    NULL
2195
};
2196
2197
static const value_string mbim_packet_service_action_vals[] = {
2198
    { 0, "Attach"},
2199
    { 1, "Detach"},
2200
    { 0, NULL}
2201
};
2202
2203
static const value_string mbim_tai_list_type_vals[] = {
2204
    { 0, "Non Consecutive TAC"},
2205
    { 1, "Consecutive TAC"},
2206
    { 2, "Multi PLMN TAC"},
2207
    { 0, NULL}
2208
};
2209
2210
static const value_string mbim_packet_service_state_vals[] = {
2211
    { 0, "Unknown"},
2212
    { 1, "Attaching"},
2213
    { 2, "Attached"},
2214
    { 3, "Detaching"},
2215
    { 4, "Detached"},
2216
    { 0, NULL},
2217
};
2218
2219
static const value_string mbim_activation_command_vals[] = {
2220
    { 0, "Deactivate"},
2221
    { 1, "Activate"},
2222
    { 0, NULL}
2223
};
2224
2225
static const value_string mbim_activation_option_vals[] = {
2226
    { 0, "Default"},
2227
    { 1, "Per Non Default URSP Rules"},
2228
    { 2, "Per Default URSP Rules"},
2229
    { 3, "Per URSP Rules"},
2230
    { 0, NULL}
2231
};
2232
2233
static const value_string mbim_compression_vals[] = {
2234
    { 0, "None"},
2235
    { 1, "Enable"},
2236
    { 0, NULL}
2237
};
2238
2239
static const value_string mbim_auth_protocol_vals[]= {
2240
    { 0, "None"},
2241
    { 1, "PAP"},
2242
    { 2, "CHAP"},
2243
    { 3, "MS CHAPv2"},
2244
    { 0, NULL}
2245
};
2246
2247
static const value_string mbim_context_ip_type_vals[] = {
2248
    { 0, "Default"},
2249
    { 1, "IPv4"},
2250
    { 2, "IPv6"},
2251
    { 3, "IPv4v6"},
2252
    { 4, "IPv4 and IPv6"},
2253
    { 0, NULL}
2254
};
2255
2256
static const value_string mbim_activation_state_vals[] = {
2257
    { 0, "Unknown"},
2258
    { 1, "Activated"},
2259
    { 2, "Activating"},
2260
    { 3, "Deactivated"},
2261
    { 4, "Deactivating"},
2262
    { 0, NULL}
2263
};
2264
2265
static const value_string mbim_voice_call_state_vals[] = {
2266
    { 0, "None"},
2267
    { 1, "In Progress"},
2268
    { 2, "Hang Up"},
2269
    { 0, NULL}
2270
};
2271
2272
#define UUID_CONTEXT_NONE                  0
2273
#define UUID_CONTEXT_INTERNET              1
2274
#define UUID_CONTEXT_VPN                   2
2275
#define UUID_CONTEXT_VOICE                 3
2276
#define UUID_CONTEXT_VIDEO_SHARE           4
2277
#define UUID_CONTEXT_PURCHASE              5
2278
#define UUID_CONTEXT_IMS                   6
2279
#define UUID_CONTEXT_MMS                   7
2280
#define UUID_CONTEXT_LOCAL                 8
2281
#define UUID_CONTEXT_MS_ADMIN              9
2282
#define UUID_CONTEXT_MS_APP               10
2283
#define UUID_CONTEXT_MS_XCAP              11
2284
#define UUID_CONTEXT_MS_TETHERING         12
2285
#define UUID_CONTEXT_MS_EMERGENCY_CALLING 13
2286
2287
static const struct mbim_uuid mbim_uuid_context_type_vals[] = {
2288
    { UUID_CONTEXT_NONE, {0xb43f758c, 0xa560, 0x4b46, {0xb3, 0x5e, 0xc5, 0x86, 0x96, 0x41, 0xfb, 0x54}}},
2289
    { UUID_CONTEXT_INTERNET, {0x7e5e2a7e, 0x4e6f, 0x7272, {0x73, 0x6b, 0x65, 0x6e, 0x7e, 0x5e, 0x2a, 0x7e}}},
2290
    { UUID_CONTEXT_VPN, {0x9b9f7bbe, 0x8952, 0x44b7, {0x83, 0xac, 0xca, 0x41, 0x31, 0x8d, 0xf7, 0xa0}}},
2291
    { UUID_CONTEXT_VOICE, {0x88918294, 0x0ef4, 0x4396, {0x8c, 0xca, 0xa8, 0x58, 0x8f, 0xbc, 0x02, 0xb2}}},
2292
    { UUID_CONTEXT_VIDEO_SHARE, {0x05a2a716, 0x7c34, 0x4b4d, {0x9a, 0x91, 0xc5, 0xef, 0x0c, 0x7a, 0xaa, 0xcc}}},
2293
    { UUID_CONTEXT_PURCHASE, {0xb3272496, 0xac6c, 0x422b, {0xa8, 0xc0, 0xac, 0xf6, 0x87, 0xa2, 0x72, 0x17}}},
2294
    { UUID_CONTEXT_IMS, {0x21610D01, 0x3074, 0x4BCE, {0x94, 0x25, 0xB5, 0x3A, 0x07, 0xD6, 0x97, 0xD6}}},
2295
    { UUID_CONTEXT_MMS, {0x46726664, 0x7269, 0x6bc6, {0x96, 0x24, 0xd1, 0xd3, 0x53, 0x89, 0xac, 0xa9}}},
2296
    { UUID_CONTEXT_LOCAL, {0xa57a9afc, 0xb09f, 0x45d7, {0xbb, 0x40, 0x03, 0x3c, 0x39, 0xf6, 0x0d, 0xb9}}},
2297
    { UUID_CONTEXT_MS_ADMIN, {0x5f7e4c2e, 0xe80b, 0x40a9, {0xa2, 0x39, 0xf0, 0xab, 0xcf, 0xd1, 0x1f, 0x4b}}},
2298
    { UUID_CONTEXT_MS_APP, {0x74d88a3d, 0xdfbd, 0x4799, {0x9a, 0x8c, 0x73, 0x10, 0xa3, 0x7b, 0xb2, 0xee}}},
2299
    { UUID_CONTEXT_MS_XCAP, {0x50d378a7, 0xbaa5, 0x4a50, {0xb8, 0x72, 0x3f, 0xe5, 0xbb, 0x46, 0x34, 0x11}}},
2300
    { UUID_CONTEXT_MS_TETHERING, {0x5e4e0601, 0x48dc, 0x4e2b, {0xac, 0xb8, 0x08, 0xb4, 0x01, 0x6b, 0xba, 0xac}}},
2301
    { UUID_CONTEXT_MS_EMERGENCY_CALLING, {0x5f41adb8, 0x204e, 0x4d31, {0x9d, 0xa8, 0xb3, 0xc9, 0x70, 0xe3, 0x60, 0xf2}}}
2302
};
2303
2304
static const value_string mbim_context_type_vals[] = {
2305
    { UUID_CONTEXT_NONE, "None"},
2306
    { UUID_CONTEXT_INTERNET, "Internet"},
2307
    { UUID_CONTEXT_VPN, "VPN"},
2308
    { UUID_CONTEXT_VOICE, "Voice"},
2309
    { UUID_CONTEXT_VIDEO_SHARE, "Video Share"},
2310
    { UUID_CONTEXT_PURCHASE, "Purchase"},
2311
    { UUID_CONTEXT_IMS, "IMS"},
2312
    { UUID_CONTEXT_MMS, "MMS"},
2313
    { UUID_CONTEXT_LOCAL, "Local"},
2314
    { UUID_CONTEXT_MS_ADMIN, "MS Administrative Purposes"},
2315
    { UUID_CONTEXT_MS_APP, "MS Operator App"},
2316
    { UUID_CONTEXT_MS_XCAP, "MS XCAP Provisioning for IMS"},
2317
    { UUID_CONTEXT_MS_TETHERING, "MS Mobile Hotspot Tethering"},
2318
    { UUID_CONTEXT_MS_EMERGENCY_CALLING, "MS IMS Emergency Calling"},
2319
    { 0, NULL}
2320
};
2321
2322
static int * const mbim_ip_configuration_info_ipv4_configuration_available_fields[] = {
2323
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_address,
2324
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway,
2325
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns,
2326
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu,
2327
    NULL
2328
};
2329
2330
static int * const mbim_ip_configuration_info_ipv6_configuration_available_fields[] = {
2331
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_address,
2332
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway,
2333
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns,
2334
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu,
2335
    NULL
2336
};
2337
2338
static int * const mbim_device_service_element_dss_payload_fields[] = {
2339
    &hf_mbim_device_service_element_dss_payload_host_device,
2340
    &hf_mbim_device_service_element_dss_payload_device_host,
2341
    NULL
2342
};
2343
2344
static const value_string mbim_network_idle_hint_states_vals[] = {
2345
    { 0, "Disabled"},
2346
    { 1, "Enabled"},
2347
    { 0, NULL}
2348
};
2349
2350
static const value_string mbim_emergency_mode_states_vals[] = {
2351
    { 0, "Off"},
2352
    { 1, "On"},
2353
    { 0, NULL}
2354
};
2355
2356
static const value_string mbim_sms_storage_state_vals[] = {
2357
    { 0, "Not Initialized"},
2358
    { 1, "Initialized"},
2359
    { 0, NULL}
2360
};
2361
2362
0
#define MBIM_SMS_FORMAT_PDU  0
2363
0
#define MBIM_SMS_FORMAT_CDMA 1
2364
2365
static const value_string mbim_sms_format_vals[] = {
2366
    { MBIM_SMS_FORMAT_PDU, "PDU"},
2367
    { MBIM_SMS_FORMAT_CDMA, "CDMA"},
2368
    { 0, NULL}
2369
};
2370
2371
static const value_string mbim_sms_flag_vals[] = {
2372
    { 0, "All"},
2373
    { 1, "Index"},
2374
    { 2, "New"},
2375
    { 3, "Old"},
2376
    { 4, "Sent"},
2377
    { 5, "Draft"},
2378
    { 0, NULL}
2379
};
2380
2381
static const value_string mbim_sms_cdma_lang_vals[] = {
2382
    { 0, "Unknown"},
2383
    { 1, "English"},
2384
    { 2, "French"},
2385
    { 3, "Spanish"},
2386
    { 4, "Japanese"},
2387
    { 5, "Korean"},
2388
    { 6, "Chinese"},
2389
    { 7, "Hebrew"},
2390
    { 0, NULL}
2391
};
2392
2393
#define MBIM_ENCODING_OCTET        0
2394
#define MBIM_ENCODING_EPM          1
2395
0
#define MBIM_ENCODING_7BIT_ASCII   2
2396
0
#define MBIM_ENCODING_IA5          3
2397
0
#define MBIM_ENCODING_UNICODE      4
2398
#define MBIM_ENCODING_SHIFT_JIS    5
2399
#define MBIM_ENCODING_KOREAN       6
2400
0
#define MBIM_ENCODING_LATIN_HEBREW 7
2401
0
#define MBIM_ENCODING_LATIN        8
2402
0
#define MBIM_ENCODING_GSM_7BIT     9
2403
2404
static const value_string mbim_sms_cdma_encoding_vals[] = {
2405
    { MBIM_ENCODING_OCTET, "Octet"},
2406
    { MBIM_ENCODING_EPM, "EPM"},
2407
    { MBIM_ENCODING_7BIT_ASCII, "7 Bit ASCII"},
2408
    { MBIM_ENCODING_IA5, "IA5"},
2409
    { MBIM_ENCODING_UNICODE, "Unicode"},
2410
    { MBIM_ENCODING_SHIFT_JIS, "Shift-JIS"},
2411
    { MBIM_ENCODING_KOREAN, "Korean"},
2412
    { MBIM_ENCODING_LATIN_HEBREW, "Latin Hebrew"},
2413
    { MBIM_ENCODING_LATIN, "Latin"},
2414
    { MBIM_ENCODING_GSM_7BIT, "GSM 7 Bit"},
2415
    { 0, NULL}
2416
};
2417
2418
static const value_string mbim_sms_message_status_vals[] = {
2419
    { 0, "New"},
2420
    { 1, "Old"},
2421
    { 2, "Draft"},
2422
    { 3, "Sent"},
2423
    { 0, NULL}
2424
};
2425
2426
static int * const mbim_sms_status_info_flags_fields[] = {
2427
    &hf_mbim_sms_status_info_flags_message_store_full,
2428
    &hf_mbim_sms_status_info_flags_new_message,
2429
    NULL
2430
};
2431
2432
static const value_string mbim_ussd_action_vals[] = {
2433
    { 0, "Initiate"},
2434
    { 1, "Continue"},
2435
    { 2, "Cancel"},
2436
    { 0, NULL}
2437
};
2438
2439
static const value_string mbim_ussd_response_vals[] = {
2440
    { 0, "No Action Required"},
2441
    { 1, "Action Required"},
2442
    { 2, "Terminated By NW"},
2443
    { 3, "Other Local Client"},
2444
    { 4, "Operation Not Supported"},
2445
    { 5, "Network Time Out"},
2446
    { 0, NULL}
2447
};
2448
2449
static const value_string mbim_ussd_session_state_vals[] = {
2450
    { 0, "New Session"},
2451
    { 1, "Existing Session"},
2452
    { 0, NULL}
2453
};
2454
2455
static const value_string mbim_phonebook_state_vals[] = {
2456
    { 0, "Not Initialized"},
2457
    { 1, "Initialized"},
2458
    { 0, NULL}
2459
};
2460
2461
static const value_string mbim_phonebook_flag_vals[] = {
2462
    { 0, "All"},
2463
    { 1, "Index"},
2464
    { 0, NULL}
2465
};
2466
2467
static const value_string mbim_phonebook_write_flag_vals[] = {
2468
    { 0, "Unused"},
2469
    { 1, "Index"},
2470
    { 0, NULL}
2471
};
2472
2473
static const true_false_string mbim_pac_host_control_val = {
2474
  "Host wants to handle command",
2475
  "Host does not want to handle command"
2476
};
2477
2478
static const value_string mbim_stk_pac_profile_vals[] = {
2479
    { 0, "Not Handled By Function Cannot Be Handled By Host"},
2480
    { 1, "Not Handled By Function May Be Handled By Host"},
2481
    { 2, "Handled By Function Only Transparent To Host"},
2482
    { 3, "Handled By Function Notification To Host Possible"},
2483
    { 4, "Handled By Function Notification To Host Enabled"},
2484
    { 5, "Handled By Function Can Be Overridden By Host"},
2485
    { 6, "Handled By Host Function Not Able To Handle"},
2486
    { 7, "Handled By Host Function Able To Handle"},
2487
    { 0, NULL}
2488
};
2489
2490
static const value_string mbim_stk_pac_type_vals[] = {
2491
    { 0, "Proactive Command"},
2492
    { 1, "Notification"},
2493
    { 0, NULL}
2494
};
2495
2496
static const value_string mbim_dss_link_state_vals[] = {
2497
    { 0, "Deactivate"},
2498
    { 1, "Activate"},
2499
    { 0, NULL}
2500
};
2501
2502
static int * const mbim_multicarrier_capabilities_fields[] = {
2503
    &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan,
2504
    &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot,
2505
    NULL
2506
};
2507
2508
static const value_string mbim_geoid_vals[] = {
2509
    {       0x2, "Antigua and Barbuda"},
2510
    {       0x3, "Afghanistan"},
2511
    {       0x4, "Algeria"},
2512
    {       0x5, "Azerbaijan"},
2513
    {       0x6, "Albania"},
2514
    {       0x7, "Armenia"},
2515
    {       0x8, "Andorra"},
2516
    {       0x9, "Angola"},
2517
    {       0xA, "American Samoa"},
2518
    {       0xB, "Argentina"},
2519
    {       0xC, "Australia"},
2520
    {       0xE, "Austria"},
2521
    {      0x11, "Bahrain"},
2522
    {      0x12, "Barbados"},
2523
    {      0x13, "Botswana"},
2524
    {      0x14, "Bermuda"},
2525
    {      0x15, "Belgium"},
2526
    {      0x16, "Bahamas, The"},
2527
    {      0x17, "Bangladesh"},
2528
    {      0x18, "Belize"},
2529
    {      0x19, "Bosnia and Herzegovina"},
2530
    {      0x1A, "Bolivia"},
2531
    {      0x1B, "Myanmar"},
2532
    {      0x1C, "Benin"},
2533
    {      0x1D, "Belarus"},
2534
    {      0x1E, "Solomon Islands"},
2535
    {      0x20, "Brazil"},
2536
    {      0x22, "Bhutan"},
2537
    {      0x23, "Bulgaria"},
2538
    {      0x25, "Brunei"},
2539
    {      0x26, "Burundi"},
2540
    {      0x27, "Canada"},
2541
    {      0x28, "Cambodia"},
2542
    {      0x29, "Chad"},
2543
    {      0x2A, "Sri Lanka"},
2544
    {      0x2B, "Congo"},
2545
    {      0x2C, "Congo (DRC)"},
2546
    {      0x2D, "China"},
2547
    {      0x2E, "Chile"},
2548
    {      0x31, "Cameroon"},
2549
    {      0x32, "Comoros"},
2550
    {      0x33, "Colombia"},
2551
    {      0x36, "Costa Rica"},
2552
    {      0x37, "Central African Republic"},
2553
    {      0x38, "Cuba"},
2554
    {      0x39, "Cape Verde"},
2555
    {      0x3B, "Cyprus"},
2556
    {      0x3D, "Denmark"},
2557
    {      0x3E, "Djibouti"},
2558
    {      0x3F, "Dominica"},
2559
    {      0x41, "Dominican Republic"},
2560
    {      0x42, "Ecuador"},
2561
    {      0x43, "Egypt"},
2562
    {      0x44, "Ireland"},
2563
    {      0x45, "Equatorial Guinea"},
2564
    {      0x46, "Estonia"},
2565
    {      0x47, "Eritrea"},
2566
    {      0x48, "El Salvador"},
2567
    {      0x49, "Ethiopia"},
2568
    {      0x4B, "Czech Republic"},
2569
    {      0x4D, "Finland"},
2570
    {      0x4E, "Fiji Islands"},
2571
    {      0x50, "Micronesia"},
2572
    {      0x51, "Faroe Islands"},
2573
    {      0x54, "France"},
2574
    {      0x56, "Gambia, The"},
2575
    {      0x57, "Gabon"},
2576
    {      0x58, "Georgia"},
2577
    {      0x59, "Ghana"},
2578
    {      0x5A, "Gibraltar"},
2579
    {      0x5B, "Grenada"},
2580
    {      0x5D, "Greenland"},
2581
    {      0x5E, "Germany"},
2582
    {      0x62, "Greece"},
2583
    {      0x63, "Guatemala"},
2584
    {      0x64, "Guinea"},
2585
    {      0x65, "Guyana"},
2586
    {      0x67, "Haiti"},
2587
    {      0x68, "Hong Kong S.A.R."},
2588
    {      0x6A, "Honduras"},
2589
    {      0x6C, "Croatia"},
2590
    {      0x6D, "Hungary"},
2591
    {      0x6E, "Iceland"},
2592
    {      0x6F, "Indonesia"},
2593
    {      0x71, "India"},
2594
    {      0x72, "British Indian Ocean Territory"},
2595
    {      0x74, "Iran"},
2596
    {      0x75, "Israel"},
2597
    {      0x76, "Italy"},
2598
    {      0x77, "Cote d'Ivoire"},
2599
    {      0x79, "Iraq"},
2600
    {      0x7A, "Japan"},
2601
    {      0x7C, "Jamaica"},
2602
    {      0x7D, "Jan Mayen"},
2603
    {      0x7E, "Jordan"},
2604
    {      0x7F, "Johnston Atoll"},
2605
    {      0x81, "Kenya"},
2606
    {      0x82, "Kyrgyzstan"},
2607
    {      0x83, "North Korea"},
2608
    {      0x85, "Kiribati"},
2609
    {      0x86, "Korea"},
2610
    {      0x88, "Kuwait"},
2611
    {      0x89, "Kazakhstan"},
2612
    {      0x8A, "Laos"},
2613
    {      0x8B, "Lebanon"},
2614
    {      0x8C, "Latvia"},
2615
    {      0x8D, "Lithuania"},
2616
    {      0x8E, "Liberia"},
2617
    {      0x8F, "Slovakia"},
2618
    {      0x91, "Liechtenstein"},
2619
    {      0x92, "Lesotho"},
2620
    {      0x93, "Luxembourg"},
2621
    {      0x94, "Libya"},
2622
    {      0x95, "Madagascar"},
2623
    {      0x97, "Macao S.A.R."},
2624
    {      0x98, "Moldova"},
2625
    {      0x9A, "Mongolia"},
2626
    {      0x9C, "Malawi"},
2627
    {      0x9D, "Mali"},
2628
    {      0x9E, "Monaco"},
2629
    {      0x9F, "Morocco"},
2630
    {      0xA0, "Mauritius"},
2631
    {      0xA2, "Mauritania"},
2632
    {      0xA3, "Malta"},
2633
    {      0xA4, "Oman"},
2634
    {      0xA5, "Maldives"},
2635
    {      0xA6, "Mexico"},
2636
    {      0xA7, "Malaysia"},
2637
    {      0xA8, "Mozambique"},
2638
    {      0xAD, "Niger"},
2639
    {      0xAE, "Vanuatu"},
2640
    {      0xAF, "Nigeria"},
2641
    {      0xB0, "Netherlands"},
2642
    {      0xB1, "Norway"},
2643
    {      0xB2, "Nepal"},
2644
    {      0xB4, "Nauru"},
2645
    {      0xB5, "Suriname"},
2646
    {      0xB6, "Nicaragua"},
2647
    {      0xB7, "New Zealand"},
2648
    {      0xB8, "Palestinian Authority"},
2649
    {      0xB9, "Paraguay"},
2650
    {      0xBB, "Peru"},
2651
    {      0xBE, "Pakistan"},
2652
    {      0xBF, "Poland"},
2653
    {      0xC0, "Panama"},
2654
    {      0xC1, "Portugal"},
2655
    {      0xC2, "Papua New Guinea"},
2656
    {      0xC3, "Palau"},
2657
    {      0xC4, "Guinea-Bissau"},
2658
    {      0xC5, "Qatar"},
2659
    {      0xC6, "Reunion"},
2660
    {      0xC7, "Marshall Islands"},
2661
    {      0xC8, "Romania"},
2662
    {      0xC9, "Philippines"},
2663
    {      0xCA, "Puerto Rico"},
2664
    {      0xCB, "Russia"},
2665
    {      0xCC, "Rwanda"},
2666
    {      0xCD, "Saudi Arabia"},
2667
    {      0xCE, "St. Pierre and Miquelon"},
2668
    {      0xCF, "St. Kitts and Nevis"},
2669
    {      0xD0, "Seychelles"},
2670
    {      0xD1, "South Africa"},
2671
    {      0xD2, "Senegal"},
2672
    {      0xD4, "Slovenia"},
2673
    {      0xD5, "Sierra Leone"},
2674
    {      0xD6, "San Marino"},
2675
    {      0xD7, "Singapore"},
2676
    {      0xD8, "Somalia"},
2677
    {      0xD9, "Spain"},
2678
    {      0xDA, "St. Lucia"},
2679
    {      0xDB, "Sudan"},
2680
    {      0xDC, "Svalbard"},
2681
    {      0xDD, "Sweden"},
2682
    {      0xDE, "Syria"},
2683
    {      0xDF, "Switzerland"},
2684
    {      0xE0, "United Arab Emirates"},
2685
    {      0xE1, "Trinidad and Tobago"},
2686
    {      0xE3, "Thailand"},
2687
    {      0xE4, "Tajikistan"},
2688
    {      0xE7, "Tonga"},
2689
    {      0xE8, "Togo"},
2690
    {      0xE9, "Sao Tome and Principe"},
2691
    {      0xEA, "Tunisia"},
2692
    {      0xEB, "Turkey"},
2693
    {      0xEC, "Tuvalu"},
2694
    {      0xED, "Taiwan"},
2695
    {      0xEE, "Turkmenistan"},
2696
    {      0xEF, "Tanzania"},
2697
    {      0xF0, "Uganda"},
2698
    {      0xF1, "Ukraine"},
2699
    {      0xF2, "United Kingdom"},
2700
    {      0xF4, "United States"},
2701
    {      0xF5, "Burkina Faso"},
2702
    {      0xF6, "Uruguay"},
2703
    {      0xF7, "Uzbekistan"},
2704
    {      0xF8, "St. Vincent and the Grenadines"},
2705
    {      0xF9, "Venezuela"},
2706
    {      0xFB, "Vietnam"},
2707
    {      0xFC, "Virgin Islands"},
2708
    {      0xFD, "Vatican City"},
2709
    {      0xFE, "Namibia"},
2710
    {     0x101, "Western Sahara (disputed)"},
2711
    {     0x102, "Wake Island"},
2712
    {     0x103, "Samoa"},
2713
    {     0x104, "Swaziland"},
2714
    {     0x105, "Yemen"},
2715
    {     0x107, "Zambia"},
2716
    {     0x108, "Zimbabwe"},
2717
    {     0x10D, "Serbia and Montenegro (Former)"},
2718
    {     0x10E, "Montenegro"},
2719
    {     0x10F, "Serbia"},
2720
    {     0x111, "Curacao"},
2721
    {     0x114, "South Sudan"},
2722
    {     0x12C, "Anguilla"},
2723
    {     0x12D, "Antarctica"},
2724
    {     0x12E, "Aruba"},
2725
    {     0x12F, "Ascension Island"},
2726
    {     0x130, "Ashmore and Cartier Islands"},
2727
    {     0x131, "Baker Island"},
2728
    {     0x132, "Bouvet Island"},
2729
    {     0x133, "Cayman Islands"},
2730
    {     0x135, "Christmas Island"},
2731
    {     0x136, "Clipperton Island"},
2732
    {     0x137, "Cocos (Keeling) Islands"},
2733
    {     0x138, "Cook Islands"},
2734
    {     0x139, "Coral Sea Islands"},
2735
    {     0x13A, "Diego Garcia"},
2736
    {     0x13B, "Falkland Islands (Islas Malvinas)"},
2737
    {     0x13D, "French Guiana"},
2738
    {     0x13E, "French Polynesia"},
2739
    {     0x13F, "French Southern and Antarctic Lands"},
2740
    {     0x141, "Guadeloupe"},
2741
    {     0x142, "Guam"},
2742
    {     0x143, "Guantanamo Bay"},
2743
    {     0x144, "Guernsey"},
2744
    {     0x145, "Heard Island and McDonald Islands"},
2745
    {     0x146, "Howland Island"},
2746
    {     0x147, "Jarvis Island"},
2747
    {     0x148, "Jersey"},
2748
    {     0x149, "Kingman Reef"},
2749
    {     0x14A, "Martinique"},
2750
    {     0x14B, "Mayotte"},
2751
    {     0x14C, "Montserrat"},
2752
    {     0x14E, "New Caledonia"},
2753
    {     0x14F, "Niue"},
2754
    {     0x150, "Norfolk Island"},
2755
    {     0x151, "Northern Mariana Islands"},
2756
    {     0x152, "Palmyra Atoll"},
2757
    {     0x153, "Pitcairn Islands"},
2758
    {     0x154, "Rota Island"},
2759
    {     0x155, "Saipan"},
2760
    {     0x156, "South Georgia and the South Sandwich Islands"},
2761
    {     0x157, "St. Helena"},
2762
    {     0x15A, "Tinian Island"},
2763
    {     0x15B, "Tokelau"},
2764
    {     0x15C, "Tristan da Cunha"},
2765
    {     0x15D, "Turks and Caicos Islands"},
2766
    {     0x15F, "Virgin Islands, British"},
2767
    {     0x160, "Wallis and Futuna"},
2768
    {    0x3B16, "Man, Isle of"},
2769
    {    0x4CA2, "Macedonia, Former Yugoslav Republic of"},
2770
    {    0x52FA, "Midway Islands"},
2771
    {    0x78F7, "Sint Maarten (Dutch part)"},
2772
    {    0x7BDA, "Saint Martin (French part)"},
2773
    {  0x6F60E7, "Democratic Republic of Timor-Leste"},
2774
    {  0x9906F5, "Aland Islands"},
2775
    { 0x9A55C4F, "Saint Barthelemy"},
2776
    { 0x9A55D40, "U.S. Minor Outlying Islands"},
2777
    { 0x9A55D42, "Bonaire, Saint Eustatius and Saba"},
2778
    { 0, NULL}
2779
};
2780
static value_string_ext mbim_geoid_vals_ext = VALUE_STRING_EXT_INIT(mbim_geoid_vals);
2781
2782
static int * const mbim_descriptor_network_capabilities_fields[] = {
2783
    &hf_mbim_descriptor_network_capabilities_max_datagram_size,
2784
    &hf_mbim_descriptor_network_capabilities_ntb_input_size,
2785
    NULL
2786
};
2787
2788
static const value_string mbim_thermal_config_enable_vals[] = {
2789
    { 0, "Disable"},
2790
    { 1, "Enable"},
2791
    { 0, NULL}
2792
};
2793
2794
static const value_string mbim_sar_status_vals[] = {
2795
    { 0, "Disabled"},
2796
    { 1, "Enabled"},
2797
    { 0, NULL}
2798
};
2799
2800
static const value_string mbim_ms_sar_config_sar_mode_vals[] = {
2801
    { 0, "Device"},
2802
    { 1, "OS"},
2803
    { 0, NULL}
2804
};
2805
2806
static const value_string mbim_ms_sar_config_sar_wifi_integration_vals[] = {
2807
    { 0, "Not Integrated"},
2808
    { 1, "Integrated"},
2809
    { 0, NULL}
2810
};
2811
2812
static void
2813
mbim_degrees_fmt(char *s, uint32_t v)
2814
0
{
2815
0
    snprintf(s, ITEM_LABEL_LENGTH, "%.1f Degrees Celsius (%u)", (float)v/10.0, v);
2816
0
}
2817
2818
static const value_string mbim_adpclk_activate_state_vals[] = {
2819
    { 0, "Deactivate"},
2820
    { 1, "Activate"},
2821
    { 0, NULL}
2822
};
2823
2824
static const value_string mbim_connect_status_vals[] = {
2825
    { 0, "Disconnected from the Base Station"},
2826
    { 1, "Connected to the Base Station"},
2827
    { 0, NULL}
2828
};
2829
2830
static const value_string mbim_trace_config_vals[] = {
2831
    { 0, "Tracing disabled"},
2832
    { 1, "Default configuration for tracing"},
2833
    { 0, NULL}
2834
};
2835
2836
static const value_string mbim_ber_vals[] = {
2837
    { 0, "BER < 0,2%%"},
2838
    { 1, "0,2%% < BER < 0,4%%"},
2839
    { 2, "0,4%% < BER < 0,8%%"},
2840
    { 3, "0,8%% < BER < 1,6%%"},
2841
    { 4, "1,6%% < BER < 3,2%%"},
2842
    { 5, "3,2%% < BER < 6,4%%"},
2843
    { 6, "6,4%% < BER < 12,8%%"},
2844
    { 7, "12,8%% < BER"},
2845
    { 99, "Unknown or undetectable"},
2846
    { 0, NULL}
2847
};
2848
2849
static void
2850
mbim_rscp_fmt(char *s, uint32_t val)
2851
0
{
2852
0
    if (val == 0) {
2853
0
        snprintf(s, ITEM_LABEL_LENGTH, "-120 or less dBm (0)");
2854
0
    } else if (val < 96) {
2855
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -120 + val, val);
2856
0
    } else if (val == 96) {
2857
0
        snprintf(s, ITEM_LABEL_LENGTH, "-24 or greater dBm (96)");
2858
0
    } else if (val == 255) {
2859
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2860
0
    } else {
2861
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2862
0
    }
2863
0
}
2864
2865
static void
2866
mbim_ecno_fmt(char *s, uint32_t val)
2867
0
{
2868
0
    if (val == 0) {
2869
0
        snprintf(s, ITEM_LABEL_LENGTH, "-24 or less dBm (0)");
2870
0
    } else if (val < 49) {
2871
0
        snprintf(s, ITEM_LABEL_LENGTH, "%.1f dBm (%u)", -24 + ((float)val/2), val);
2872
0
    } else if (val == 49) {
2873
0
        snprintf(s, ITEM_LABEL_LENGTH, "0.5 or greater dBm (49)");
2874
0
    } else if (val == 255) {
2875
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2876
0
    } else {
2877
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2878
0
    }
2879
0
}
2880
2881
static void
2882
mbim_rsrq_fmt(char *s, uint32_t val)
2883
0
{
2884
0
    if (val == 0) {
2885
0
        snprintf(s, ITEM_LABEL_LENGTH, "-19.5 or less dBm (0)");
2886
0
    } else if (val < 34) {
2887
0
        snprintf(s, ITEM_LABEL_LENGTH, "%.1f dBm (%u)", -19.5 + ((float)val/2), val);
2888
0
    } else if (val == 34) {
2889
0
        snprintf(s, ITEM_LABEL_LENGTH, "-2.5 or greater dBm (34)");
2890
0
    } else if (val == 255) {
2891
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2892
0
    } else {
2893
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2894
0
    }
2895
0
}
2896
2897
static void
2898
mbim_rsrp_fmt(char *s, uint32_t val)
2899
0
{
2900
0
    if (val == 0) {
2901
0
        snprintf(s, ITEM_LABEL_LENGTH, "-140 or less dBm (0)");
2902
0
    } else if (val < 97) {
2903
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -140 + val, val);
2904
0
    } else if (val == 97) {
2905
0
        snprintf(s, ITEM_LABEL_LENGTH, "-43 or greater dBm (97)");
2906
0
    } else if (val == 255) {
2907
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2908
0
    } else {
2909
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2910
0
    }
2911
0
}
2912
2913
static void
2914
mbim_rssnr_fmt(char *s, uint32_t val)
2915
0
{
2916
0
    if (val == 0) {
2917
0
        snprintf(s, ITEM_LABEL_LENGTH, "-5 or less dB (0)");
2918
0
    } else if (val < 35) {
2919
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%u)", -5 + val, val);
2920
0
    } else if (val == 35) {
2921
0
        snprintf(s, ITEM_LABEL_LENGTH, "30 or greater dB (35)");
2922
0
    } else if (val == 255) {
2923
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2924
0
    } else {
2925
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2926
0
    }
2927
0
}
2928
2929
static void
2930
mbim_rsrp_signal_state_fmt(char *s, uint32_t val)
2931
0
{
2932
0
    if (val == 0) {
2933
0
        snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)");
2934
0
    } else if (val < 126) {
2935
0
        snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", val - 157, val - 156, val);
2936
0
    } else if (val == 126) {
2937
0
        snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)");
2938
0
    } else {
2939
0
        snprintf(s, ITEM_LABEL_LENGTH, "invalid (127)");
2940
0
    }
2941
0
}
2942
2943
static void
2944
mbim_snr_signal_state_fmt(char *s, uint32_t val)
2945
0
{
2946
0
    if (val == 0) {
2947
0
        snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)");
2948
0
    } else if (val < 127) {
2949
0
        snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)val - 1) / 2) - 23, ((float)val / 2) - 23, val);
2950
0
    } else if (val == 127){
2951
0
        snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)");
2952
0
    } else {
2953
0
        snprintf(s, ITEM_LABEL_LENGTH, "invalid (128)");
2954
0
    }
2955
0
}
2956
2957
static void
2958
mbim_version_fmt(char* s, uint32_t val)
2959
0
{
2960
0
    snprintf(s, ITEM_LABEL_LENGTH, "%u.%u", val / 256, val % 256);
2961
0
}
2962
2963
static const value_string mbim_atds_operator_plmn_mode_vals[] = {
2964
    { 0, "GSM"},
2965
    { 6, "UTRAN"},
2966
    { 7, "LTE"},
2967
    { 0, NULL}
2968
};
2969
2970
static const value_string mbim_adts_rat_info_mode_vals[]= {
2971
    { 0, "Automatic"},
2972
    { 1, "2G only"},
2973
    { 2, "3G only"},
2974
    { 3, "4G only"},
2975
    { 0, NULL}
2976
};
2977
2978
static const value_string mbim_adts_projection_table_type_vals[]= {
2979
    { 0, "RSSI"},
2980
    { 1, "RSCP"},
2981
    { 2, "Ec/No"},
2982
    { 3, "RSRP"},
2983
    { 7, "RS SNR"},
2984
    { 0, NULL}
2985
};
2986
2987
static void
2988
mbim_projection_table_coeff_fmt(char *s, uint32_t val)
2989
0
{
2990
0
    int32_t coeff = (int32_t)val;
2991
2992
0
    snprintf(s, ITEM_LABEL_LENGTH, "%.3f (%d)", ((float)coeff)/1000, coeff);
2993
0
}
2994
2995
0
#define MBIM_NDP_CTRL_MULTIFLOW_STATUS 0
2996
2997
static const value_string mbim_ndp_ctrl_msg_type_vals[] = {
2998
    { MBIM_NDP_CTRL_MULTIFLOW_STATUS, "MULTIFLOW_STATUS"},
2999
    { 0, NULL}
3000
};
3001
3002
static const value_string mbim_ndp_ctrl_multiflow_status_vals[] = {
3003
    { 0, "OK"},
3004
    { 1, "High Watermark"},
3005
    { 2, "Low Watermark"},
3006
    { 0, NULL}
3007
};
3008
3009
static int * const mbim_multiflow_caps_info_control_caps_fields[] = {
3010
    &hf_mbim_multiflow_caps_info_control_caps_uplink,
3011
    &hf_mbim_multiflow_caps_info_control_caps_downlink,
3012
    NULL
3013
};
3014
3015
static const value_string mbim_multiflow_state_vals[] = {
3016
    { 0, "Off"},
3017
    { 1, "On"},
3018
    { 0, NULL}
3019
};
3020
3021
static const value_string mbim_ms_context_roaming_control_vals[] = {
3022
    { 0, "HomeOnly"},
3023
    { 1, "PartnerOnly"},
3024
    { 2, "NonPartnerOnly"},
3025
    { 3, "HomeAndPartner"},
3026
    { 4, "HomeAndNonPartner"},
3027
    { 5, "PartnerAndNonPartner"},
3028
    { 6, "AllowAll"},
3029
    { 0, NULL}
3030
};
3031
3032
static const value_string mbim_ms_context_media_type_vals[] = {
3033
    { 0, "CellularOnly"},
3034
    { 1, "WifiOnly"},
3035
    { 2, "All"},
3036
    { 0, NULL}
3037
};
3038
3039
static const value_string mbim_ms_context_enable_vals[] = {
3040
    { 0, "Disabled"},
3041
    { 1, "Enabled"},
3042
    { 0, NULL}
3043
};
3044
3045
static const value_string mbim_ms_context_source_vals[] = {
3046
    { 0, "Admin"},
3047
    { 1, "User"},
3048
    { 2, "Operator"},
3049
    { 3, "Modem"},
3050
    { 4, "Device"},
3051
    { 0, NULL}
3052
};
3053
3054
static const value_string mbim_ms_context_operations_vals[] = {
3055
    { 0, "Default"},
3056
    { 1, "Delete"},
3057
    { 2, "RestoreFactory"},
3058
    { 0, NULL}
3059
};
3060
3061
static const value_string mbim_ms_set_lte_attach_operations_vals[] = {
3062
    { 0, "Default"},
3063
    { 2, "RestoreFactory"},
3064
    { 0, NULL}
3065
};
3066
3067
static const value_string mbim_ms_lte_attach_state_vals[] = {
3068
    { 0, "Detached"},
3069
    { 1, "Attached"},
3070
    { 0, NULL}
3071
};
3072
3073
static int * const mbim_ms_network_blacklist_state_fields[] = {
3074
    &hf_mbim_ms_network_blacklist_state_sim_provider_actuated,
3075
    &hf_mbim_ms_network_blacklist_state_network_provider_actuated,
3076
    NULL
3077
};
3078
3079
static const value_string mbim_ms_network_blacklist_type_vals[] = {
3080
    { 0, "SIM"},
3081
    { 1, "Network"},
3082
    { 0, NULL}
3083
};
3084
3085
static const value_string mbim_ms_uiccslot_state_vals[] = {
3086
    { 0, "Unknown"},
3087
    { 1, "OffEmpty"},
3088
    { 2, "Off"},
3089
    { 3, "Empty"},
3090
    { 4, "NotReady"},
3091
    { 5, "Active"},
3092
    { 6, "Error"},
3093
    { 7, "ActiveEsim"},
3094
    { 8, "ActiveEsimNoProfiles"},
3095
    { 0, NULL}
3096
};
3097
3098
static const value_string mbim_base_station_serving_cell_flag_vals[] = {
3099
    { 0, "Neighbor Cell"},
3100
    { 1, "Serving cell"},
3101
    { 0, NULL}
3102
};
3103
3104
static const value_string mbim_ms_uicc_app_type_vals[] = {
3105
    { 0, "Unknown"},
3106
    { 1, "Mf"},
3107
    { 2, "SIM"},
3108
    { 3, "RUIM"},
3109
    { 4, "USIM"},
3110
    { 5, "CSIM"},
3111
    { 6, "ISIM"},
3112
    { 0, NULL}
3113
};
3114
static const value_string mbim_ms_apdu_secure_messaging_vals[] = {
3115
    { 0, "None"},
3116
    { 1, "No Hdr Auth"},
3117
    { 0, NULL}
3118
};
3119
static const value_string mbim_ms_apdu_type_vals[] = {
3120
    { 0, "Interindustry"},
3121
    { 1, "Extended"},
3122
    { 0, NULL}
3123
};
3124
static const value_string mbim_ms_reset_pass_through_action_vals[] = {
3125
    { 0, "Disabled"},
3126
    { 1, "Enabled"},
3127
    { 0, NULL}
3128
};
3129
3130
static const value_string mbim_uicc_file_accessibility_vals[] = {
3131
    { 0, "Unknown"},
3132
    { 1, "NotShareable"},
3133
    { 2, "Shareable"},
3134
    { 0, NULL}
3135
};
3136
3137
static const value_string mbim_uicc_file_type_vals[] = {
3138
    { 0, "Unknown"},
3139
    { 1, "WorkingEf"},
3140
    { 2, "InternalEf"},
3141
    { 3, "DfOrAdf"},
3142
    { 0, NULL}
3143
};
3144
3145
static const value_string mbim_uicc_file_structure_vals[] = {
3146
    { 0, "Unknown"},
3147
    { 1, "Transparent"},
3148
    { 2, "Cyclic"},
3149
    { 3, "Linear"},
3150
    { 4, "BerTLV"},
3151
    { 0, NULL}
3152
};
3153
3154
static void mbim_dissect_tlv_ie(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset);
3155
3156
static uint8_t
3157
mbim_dissect_service_id_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int hf,
3158
                             int *offset, struct mbim_uuid_ext **uuid_ext_info, bool is_net_guid)
3159
0
{
3160
0
    e_guid_t uuid;
3161
0
    unsigned i;
3162
0
    uint32_t uuid_ext[4];
3163
3164
0
    if (is_net_guid)
3165
0
    {
3166
0
        tvb_get_ntohguid(tvb, *offset, &uuid);
3167
0
    }
3168
0
    else
3169
0
    {
3170
0
        tvb_get_letohguid(tvb, *offset, &uuid);
3171
0
    }
3172
0
    for (i = 0; i < UUID_MAX; i++) {
3173
0
        if (memcmp(&uuid, &(mbim_uuid_service_id_vals[i].uuid), sizeof(e_guid_t)) == 0) {
3174
0
            break;
3175
0
        }
3176
0
    }
3177
3178
0
    if ((i == UUID_MAX) && mbim_uuid_ext_hash && uuid_ext_info) {
3179
        /* Let's check if UUID is known in extension table */
3180
0
        uuid_ext[0] = tvb_get_ntohl(tvb, *offset);
3181
0
        uuid_ext[1] = tvb_get_ntohl(tvb, *offset + 4);
3182
0
        uuid_ext[2] = tvb_get_ntohl(tvb, *offset + 8);
3183
0
        uuid_ext[3] = tvb_get_ntohl(tvb, *offset + 12);
3184
3185
0
        *uuid_ext_info = (struct mbim_uuid_ext *)wmem_map_lookup(mbim_uuid_ext_hash, uuid_ext);
3186
0
        if (*uuid_ext_info) {
3187
0
            proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)",
3188
0
                                             (*uuid_ext_info)->uuid_name, guid_to_str(pinfo->pool, &uuid));
3189
0
            *offset += 16;
3190
0
            return UUID_EXT_IDX;
3191
0
        }
3192
0
    }
3193
3194
0
    proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)",
3195
0
                                     val_to_str_ext_const(i, &mbim_service_id_vals_ext, "Unknown"),
3196
0
                                     guid_to_str(pinfo->pool, &uuid));
3197
0
    *offset += 16;
3198
3199
0
    return i;
3200
0
}
3201
3202
static uint32_t
3203
mbim_dissect_cid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, uint8_t uuid_idx,
3204
                 struct mbim_uuid_ext *uuid_ext_info)
3205
0
{
3206
0
    uint32_t cid;
3207
3208
0
    cid = tvb_get_letohl(tvb, *offset);
3209
0
    if (uuid_idx < UUID_MAX) {
3210
0
        proto_tree_add_uint(tree, *mbim_uuid_info[uuid_idx].hf_entry, tvb, *offset, 4, cid);
3211
0
        if (mbim_uuid_info[uuid_idx].cid_list_ext) {
3212
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
3213
0
                            val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"));
3214
0
        } else {
3215
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"));
3216
0
        }
3217
0
    } else if (uuid_idx == UUID_EXT_IDX) {
3218
0
        const char* cid_string = val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown");
3219
3220
0
        proto_tree_add_uint_format_value(tree, hf_mbim_cid, tvb, *offset, 4, cid, "%s (%u)", cid_string , cid);
3221
0
        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", cid_string);
3222
0
    } else {
3223
0
        proto_tree_add_uint(tree, hf_mbim_cid, tvb, *offset, 4, cid);
3224
0
        col_append_str(pinfo->cinfo, COL_INFO, ": Unknown");
3225
0
    }
3226
0
    *offset += 4;
3227
0
    return cid;
3228
0
}
3229
3230
static void
3231
mbim_dissect_ms_plmn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3232
0
{
3233
0
    int16_t mnc;
3234
0
    proto_tree_add_item(tree, hf_mbim_ms_plmn_mcc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3235
0
    offset += 2;
3236
0
    mnc = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
3237
0
    if (mnc & 0x8000) {
3238
0
        proto_tree_add_uint_format_value(tree, hf_mbim_ms_plmn_mnc, tvb, offset, 2, mnc, "%02u", mnc & 0x7fff);
3239
0
    }
3240
0
    else {
3241
0
        proto_tree_add_uint_format_value(tree, hf_mbim_ms_plmn_mnc, tvb, offset, 2, mnc, "%03u", mnc & 0x7fff);
3242
0
    }
3243
    /* offset += 2; */
3244
0
}
3245
3246
static void
3247
mbim_dissect_ms_tai_list_single_plmn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3248
0
{
3249
0
    uint32_t tac_element, i;
3250
0
    mbim_dissect_ms_plmn(tvb, pinfo, tree, *offset);
3251
0
    *offset += 4;
3252
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_single_plmn_tac_element, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tac_element);
3253
0
    *offset += 1;
3254
0
    for (i = 0; i < tac_element; i++) {
3255
0
        proto_tree_add_item(tree, hf_mbim_ms_tai_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
3256
0
        *offset += 4;
3257
0
    }
3258
0
}
3259
3260
static void
3261
mbim_dissect_ms_tai_list_multi_plmn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3262
0
{
3263
0
    proto_tree* subtree;
3264
0
    uint32_t tai_element, i;
3265
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_multi_plmn_tai_element, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tai_element);
3266
0
    *offset += 1;
3267
0
    for (i = 0; i < tai_element; i++) {
3268
0
        subtree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "TAI #%u", i + 1);
3269
0
        mbim_dissect_ms_plmn(tvb, pinfo, subtree, *offset);
3270
0
        *offset += 4;
3271
0
        proto_tree_add_item(subtree, hf_mbim_ms_tai_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
3272
0
        *offset += 4;
3273
0
    }
3274
0
}
3275
3276
static bool
3277
mbim_dissect_ms_single_tai(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3278
0
{
3279
0
    uint32_t tai_list_type;
3280
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tai_list_type);
3281
0
    *offset += 1;
3282
0
    switch (tai_list_type) {
3283
0
        case 0:
3284
0
        case 1:
3285
0
            mbim_dissect_ms_tai_list_single_plmn(tvb, pinfo, tree, offset);
3286
0
            break;
3287
0
        case 2:
3288
0
            mbim_dissect_ms_tai_list_multi_plmn(tvb, pinfo, tree, offset);
3289
0
            break;
3290
0
        default:
3291
0
            proto_tree_add_expert(tree, pinfo, &ei_mbim_unexpected_msg, tvb, *offset, 1);
3292
0
            return false;
3293
0
    }
3294
0
    return true;
3295
0
}
3296
static void
3297
mbim_dissect_ms_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, uint32_t data_len)
3298
0
{
3299
0
    proto_tree* subtree;
3300
0
    int32_t base_offset = offset;
3301
0
    int32_t tai_list_info_element_pos = 1;
3302
0
    while ((uint32_t)offset - base_offset < data_len) {
3303
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "TAI List Info #%u", tai_list_info_element_pos);
3304
0
        if (!mbim_dissect_ms_single_tai(tvb, pinfo, subtree, &offset)) {
3305
0
            break;
3306
0
        }
3307
0
        tai_list_info_element_pos++;
3308
0
    }
3309
0
}
3310
3311
static void
3312
mbim_dissect_ms_wake_command(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
3313
0
{
3314
0
    uint8_t uuid_idx;
3315
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
3316
0
    unsigned payload_offset;
3317
0
    uint32_t payload_size;
3318
0
    proto_tree *wake_command_tree;
3319
3320
0
    int begin_offset = offset;
3321
3322
0
    wake_command_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Command");
3323
3324
0
    uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, wake_command_tree, hf_mbim_device_service_id, &offset, &uuid_ext_info, true);
3325
0
    mbim_dissect_cid(tvb, pinfo, wake_command_tree, &offset, uuid_idx, uuid_ext_info);
3326
0
    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);
3327
0
    offset += 4;
3328
0
    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);
3329
0
    offset += 4;
3330
0
    if (payload_offset && payload_size)
3331
0
    {
3332
0
        proto_tree_add_bytes_format(wake_command_tree, hf_mbim_ms_wake_reason_command_payload, tvb, begin_offset + payload_offset, payload_size, NULL, "Payload");
3333
0
    }
3334
0
}
3335
3336
static void
3337
mbim_dissect_ms_wake_packet(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
3338
0
{
3339
0
    unsigned packet_offset;
3340
0
    unsigned packet_size;
3341
0
    proto_tree *wake_packet_tree;
3342
0
    int begin_offset = offset;
3343
3344
0
    wake_packet_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Packet");
3345
3346
0
    proto_tree_add_item(wake_packet_tree, hf_mbim_single_packet_filter_filter_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3347
0
    offset += 4;
3348
0
    proto_tree_add_item(wake_packet_tree, hf_mbim_ms_wake_reason_packet_original_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3349
0
    offset += 4;
3350
0
    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);
3351
0
    offset += 4;
3352
0
    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);
3353
    /* offset += 4; */
3354
0
    if (packet_offset && packet_size)
3355
0
    {
3356
0
        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");
3357
0
    }
3358
0
}
3359
3360
static void
3361
mbim_dissect_snssai(tvbuff_t* tvb, proto_tree* tree, int* offset)
3362
0
{
3363
0
    unsigned snssai_length;
3364
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_snssai_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &snssai_length);
3365
0
    *offset += 1;
3366
0
    proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3367
0
    *offset += 1;
3368
0
    if(snssai_length >= 4) {
3369
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3370
0
        *offset += 3;
3371
0
    }
3372
0
    if (snssai_length == 2 || snssai_length>=5) {
3373
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_mapped_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3374
0
        *offset += 1;
3375
0
    }
3376
0
    if (snssai_length == 8) {
3377
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_mapped_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3378
0
        *offset += 3;
3379
0
    }
3380
0
}
3381
3382
static void
3383
mbim_dissect_nssai(tvbuff_t* tvb, proto_tree* tree, int offset, int nssai_buffer_length)
3384
0
{
3385
0
    proto_tree* subtree;
3386
0
    int base_offset = offset;
3387
0
    int snssai_pos = 1;
3388
0
    while (offset - base_offset < nssai_buffer_length) {
3389
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI #%u", snssai_pos);
3390
0
        mbim_dissect_snssai(tvb,subtree, &offset);
3391
0
        snssai_pos++;
3392
0
    }
3393
0
}
3394
3395
static void
3396
// NOLINTNEXTLINE(misc-no-recursion)
3397
mbim_dissect_precfg_dflt_cfg_nssai(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int nssai_buffer_length)
3398
0
{
3399
0
    proto_tree* subtree;
3400
0
    int base_offset = offset;
3401
0
    int precfg_dflt_cfg_nssai_pos = 1;
3402
0
    while ((offset - base_offset < nssai_buffer_length) && precfg_dflt_cfg_nssai_pos < 2) {
3403
0
        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);
3404
0
        proto_tree_add_item(subtree, hf_mbim_ms_pre_dflt_nssai_info_access_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3405
0
        offset += 4;
3406
0
        subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Default configured NSSAI");
3407
0
        mbim_dissect_tlv_ie(tvb, pinfo, subtree, &offset);
3408
0
        precfg_dflt_cfg_nssai_pos++;
3409
0
    }
3410
0
}
3411
3412
static void
3413
mbim_dissect_rej_snssai(tvbuff_t* tvb, proto_tree* tree, int* offset)
3414
0
{
3415
0
    unsigned snssai_length;
3416
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_snssai_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &snssai_length);
3417
0
    *offset += 1;
3418
0
    proto_tree_add_item(tree, hf_mbim_ms_rej_snssai_cause, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3419
0
    *offset += 1;
3420
0
    proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3421
0
    *offset += 1;
3422
0
    if (snssai_length == 4) {
3423
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3424
0
        *offset += 3;
3425
0
    }
3426
0
}
3427
3428
static void
3429
mbim_dissect_rej_nssai(tvbuff_t* tvb, proto_tree* tree, int offset, int rej_nssai_buffer_length)
3430
0
{
3431
0
    proto_tree* subtree;
3432
0
    int base_offset = offset;
3433
0
    int snssai_pos = 1;
3434
0
    while (offset - base_offset < rej_nssai_buffer_length) {
3435
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Rejected S-NSSAI #%u", snssai_pos);
3436
0
        mbim_dissect_rej_snssai(tvb, subtree, &offset);
3437
0
        snssai_pos++;
3438
0
    }
3439
0
}
3440
3441
static void
3442
// NOLINTNEXTLINE(misc-no-recursion)
3443
mbim_dissect_ladn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int rej_nssai_buffer_length)
3444
0
{
3445
0
    proto_tree* subtree, * ladn_tree;
3446
0
    int base_offset = offset;
3447
0
    int ladn_pos = 1;
3448
0
    while (offset - base_offset < rej_nssai_buffer_length) {
3449
0
        ladn_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "LADN #%u", ladn_pos);
3450
0
        subtree = proto_tree_add_subtree_format(ladn_tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "DNN");
3451
0
        mbim_dissect_tlv_ie(tvb, pinfo, subtree, &offset);
3452
0
        subtree = proto_tree_add_subtree_format(ladn_tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "TAI");
3453
0
        if (!mbim_dissect_ms_single_tai(tvb, pinfo, subtree, &offset)) {
3454
0
            break;
3455
0
        }
3456
0
        ladn_pos++;
3457
0
    }
3458
0
}
3459
3460
static void
3461
mbim_dissect_tcs(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset, int tcs_buffer_length)
3462
0
{
3463
0
    proto_tree* subtree;
3464
0
    int base_offset = *offset;
3465
0
    int tc_pos = 1;
3466
0
    int tc_type;
3467
0
    int tc_value_length;
3468
0
    while (*offset - base_offset < tcs_buffer_length) {
3469
0
        subtree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "Traffic component #%u", tc_pos);
3470
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_type, tvb, *offset, 1, ENC_BIG_ENDIAN, &tc_type);
3471
0
        *offset += 1;
3472
0
        switch (tc_type) {
3473
0
            case URSP_TC_TYPE_MATCH_ALL:
3474
0
                break;
3475
0
            case URSP_TC_TYPE_OSID_APPID:
3476
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_os_id, tvb, *offset, 16, ENC_NA);
3477
0
                *offset += 16;
3478
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_BIG_ENDIAN, &tc_value_length);
3479
0
                *offset += 1;
3480
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_app_id, tvb, *offset, tc_value_length, ENC_ASCII);
3481
0
                *offset += tc_value_length;
3482
0
                break;
3483
0
            case URSP_TC_TYPE_IPV4:
3484
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv4, tvb, *offset, 4, ENC_BIG_ENDIAN);
3485
0
                *offset += 4;
3486
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv4_mask, tvb, *offset, 4, ENC_BIG_ENDIAN);
3487
0
                *offset += 4;
3488
0
                break;
3489
0
            case URSP_TC_TYPE_IPV6:
3490
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv6, tvb, *offset, 16, ENC_NA);
3491
0
                *offset += 16;
3492
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv6_prefix_length, tvb, *offset, 1, ENC_NA);
3493
0
                *offset += 1;
3494
0
                break;
3495
0
            case URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER:
3496
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_proto_id, tvb, *offset, 1, ENC_BIG_ENDIAN);
3497
0
                *offset += 1;
3498
0
                break;
3499
0
            case URSP_TC_TYPE_PORT:
3500
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port, tvb, *offset, 2, ENC_BIG_ENDIAN);
3501
0
                *offset += 2;
3502
0
                break;
3503
0
            case URSP_TC_TYPE_PORT_RANGE:
3504
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port_range_low, tvb, *offset, 2, ENC_BIG_ENDIAN);
3505
0
                *offset += 2;
3506
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port_range_high, tvb, *offset, 2, ENC_BIG_ENDIAN);
3507
0
                *offset += 2;
3508
0
                break;
3509
0
            case URSP_TC_TYPE_SECURITY_PARAM_INDEX:
3510
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 4, ENC_NA);
3511
0
                *offset += 4;
3512
0
                break;
3513
0
            case URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS:
3514
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3515
0
                *offset += 2;
3516
0
                break;
3517
0
            case URSP_TC_TYPE_FLOW_LABEL:
3518
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 3, ENC_NA);
3519
0
                *offset += 3;
3520
0
                break;
3521
0
            case URSP_TC_TYPE_MAC_ADDRESS:
3522
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 6, ENC_NA);
3523
0
                *offset += 6;
3524
0
                break;
3525
0
            case URSP_TC_TYPE_C_TAG_VID:
3526
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3527
0
                *offset += 2;
3528
0
                break;
3529
0
            case URSP_TC_TYPE_S_TAG_VID:
3530
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3531
0
                *offset += 2;
3532
0
                break;
3533
0
            case URSP_TC_TYPE_C_TAG_PCP_AND_DEI:
3534
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 1, ENC_NA);
3535
0
                *offset += 1;
3536
0
                break;
3537
0
            case URSP_TC_TYPE_S_TAG_PCP_AND_DEI:
3538
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 1, ENC_NA);
3539
0
                *offset += 1;
3540
0
                break;
3541
0
            case URSP_TC_TYPE_ETHER:
3542
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3543
0
                *offset += 2;
3544
0
                break;
3545
0
            case URSP_TC_TYPE_DNN:
3546
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3547
0
                *offset += 1;
3548
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_dnn, tvb, *offset, tc_value_length, ENC_APN_STR);
3549
0
                *offset += tc_value_length;
3550
0
                break;
3551
0
            case URSP_TC_TYPE_CONNECTION_CAPABILITY:
3552
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3553
0
                *offset += 1;
3554
0
                for (int i = 0; i < tc_value_length; i++) {
3555
0
                    proto_tree_add_bitmask(subtree, tvb, *offset, hf_mbim_ms_ursp_tc_capability, ett_mbim_bitmap,
3556
0
                        ursp_tc_connection_capability_flags_fields, ENC_LITTLE_ENDIAN);
3557
0
                    *offset += 1;
3558
0
                }
3559
0
                break;
3560
0
            case URSP_TC_TYPE_FQDN:
3561
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3562
0
                *offset += 1;
3563
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_fqdn, tvb, *offset, tc_value_length, ENC_APN_STR);
3564
0
                *offset += tc_value_length;
3565
0
                break;
3566
0
            case URSP_TC_TYPE_APPID:
3567
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3568
0
                *offset += 1;
3569
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_app_id, tvb, *offset, tc_value_length, ENC_LITTLE_ENDIAN | ENC_ASCII);
3570
0
                *offset += tc_value_length;
3571
0
                break;
3572
0
            default:
3573
0
                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, tvb, *offset, tcs_buffer_length - (*offset - base_offset));
3574
0
                return;
3575
0
        }
3576
0
        tc_pos++;
3577
0
    }
3578
0
}
3579
3580
static void
3581
mbim_dissect_td(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int* offset)
3582
0
{
3583
0
    proto_tree* subtree;
3584
0
    unsigned tcs_length;
3585
0
    subtree = proto_tree_add_subtree(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "Traffic descriptor");
3586
0
    proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 2, ENC_BIG_ENDIAN, &tcs_length);
3587
0
    *offset += 2;
3588
0
    mbim_dissect_tcs(tvb, pinfo, subtree, offset, tcs_length);
3589
0
}
3590
3591
static void
3592
mbim_dissect_tps(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int tp_buffer_length)
3593
0
{
3594
0
    proto_tree* subtree;
3595
0
    int base_offset = offset;
3596
0
    int tp_pos = 1;
3597
0
    int tp_length;
3598
0
    while (offset - base_offset < tp_buffer_length) {
3599
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Traffic parameter #%u", tp_pos);
3600
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, offset, 2, ENC_BIG_ENDIAN, &tp_length);
3601
0
        offset += 2;
3602
0
        mbim_dissect_tcs(tvb, pinfo, subtree, &offset, tp_length);
3603
0
        tp_pos++;
3604
0
    }
3605
0
}
3606
3607
static void
3608
mbim_dissect_ursp_rules(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int ursp_rules_buffer_length)
3609
0
{
3610
0
    proto_tree* subtree;
3611
0
    int base_offset = offset;
3612
0
    int ursp_rule_pos = 1;
3613
0
    while (offset - base_offset < ursp_rules_buffer_length) {
3614
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "URSP rule #%u", ursp_rule_pos);
3615
0
        proto_tree_add_item(subtree, hf_mbim_ms_ursp_precedence, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3616
0
        offset += 1;
3617
0
        mbim_dissect_td(tvb, pinfo, subtree, &offset);
3618
0
        ursp_rule_pos++;
3619
0
    }
3620
0
}
3621
3622
static void
3623
// NOLINTNEXTLINE(misc-no-recursion)
3624
mbim_dissect_tlv_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
3625
0
{
3626
0
    unsigned tlv_data_offset;
3627
0
    unsigned padding_length;
3628
0
    unsigned data_length;
3629
0
    unsigned tlv_type = TLV_TYPE_UNKNOWN;
3630
3631
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN, &tlv_type);
3632
0
    *offset += 2;
3633
0
    proto_tree_add_item(tree, hf_mbim_tlv_ie_reserved, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3634
0
    *offset += 1;
3635
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_padding_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &padding_length);
3636
0
    *offset += 1;
3637
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_data_length, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &data_length);
3638
0
    *offset += 4;
3639
0
    tlv_data_offset = *offset;
3640
0
    if (data_length) {
3641
0
        increment_dissection_depth(pinfo);
3642
        // New TLV types will be added here
3643
0
        switch (tlv_type) {
3644
0
            case TLV_TYPE_SINGLE_NSSAI:
3645
0
                mbim_dissect_snssai(tvb, tree, offset);
3646
0
                break;
3647
0
            case TLV_TYPE_ALLOWED_NSSAI:
3648
0
            case TLV_TYPE_CFG_NSSAI:
3649
0
            case TLV_TYPE_DFLT_CFG_NSSAI:
3650
0
                mbim_dissect_nssai(tvb, tree, *offset, data_length);
3651
0
                break;
3652
0
            case TLV_TYPE_PRECFG_DFLT_CFG_NSSAI:
3653
0
                mbim_dissect_precfg_dflt_cfg_nssai(tvb, pinfo, tree, *offset, data_length);
3654
0
                break;
3655
0
            case TLV_TYPE_REJ_NSSAI:
3656
0
                mbim_dissect_rej_nssai(tvb, tree, *offset, data_length);
3657
0
                break;
3658
0
            case TLV_TYPE_LADN:
3659
0
                mbim_dissect_ladn(tvb, pinfo, tree, *offset, data_length);
3660
0
                break;
3661
0
            case TLV_TYPE_TAI:
3662
0
                mbim_dissect_ms_tai(tvb, pinfo, tree, *offset, data_length);
3663
0
                break;
3664
0
            case TLV_TYPE_WCHAR_STR:
3665
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_wchar_str, tvb, *offset, data_length, ENC_LITTLE_ENDIAN | ENC_UTF_16);
3666
0
                break;
3667
0
            case TLV_TYPE_TRAFFIC_PARAMETERS:
3668
0
                mbim_dissect_tps(tvb, pinfo, tree, *offset, data_length);
3669
0
                break;
3670
0
            case TLV_TYPE_WAKE_COMMAND:
3671
0
                mbim_dissect_ms_wake_command(tvb, pinfo, tree, *offset);
3672
0
                break;
3673
0
            case TLV_TYPE_WAKE_PACKET:
3674
0
                mbim_dissect_ms_wake_packet(tvb, pinfo, tree, *offset);
3675
0
                break;
3676
0
            case TLV_TYPE_TYPE_OSID:
3677
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_guid, tvb, *offset, 16, ENC_NA);
3678
0
                break;
3679
0
            case TLV_TYPE_TYPE_3GPP_REL_VERSION:
3680
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_int32, tvb, *offset, data_length, ENC_LITTLE_ENDIAN);
3681
0
                break;
3682
0
            case TLV_TYPE_TYPE_URSP_RULES_TD_ONLY:
3683
0
                mbim_dissect_ursp_rules(tvb,pinfo, tree, *offset, data_length);
3684
0
                break;
3685
0
            case TLV_TYPE_TYPE_SESSION_ID:
3686
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_int32, tvb, *offset, data_length, ENC_LITTLE_ENDIAN);
3687
0
                break;
3688
0
            default:
3689
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_unnamed_data, tvb, *offset, data_length, ENC_NA);
3690
0
                break;
3691
0
        }
3692
0
        decrement_dissection_depth(pinfo);
3693
0
        *offset = tlv_data_offset + data_length;
3694
0
    }
3695
0
    if (padding_length) {
3696
0
        proto_tree_add_item(tree, hf_mbim_tlv_ie_padding, tvb, *offset, padding_length, ENC_NA);
3697
0
        *offset += padding_length;
3698
0
    }
3699
0
}
3700
3701
static void
3702
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
0
{
3704
0
    proto_tree* unnamed_ies;
3705
0
    while (tlv_offset - buffer_base_offset < buffer_length) {
3706
0
        unnamed_ies = proto_tree_add_subtree_format(tree, tvb, tlv_offset, 0, ett_mbim_pair_list, NULL, "Unnamed IE's");
3707
0
        mbim_dissect_tlv_ie(tvb, pinfo, unnamed_ies, &tlv_offset);
3708
0
    }
3709
0
}
3710
3711
static void
3712
mbim_dissect_device_caps_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset,
3713
                              struct mbim_conv_info *mbim_conv)
3714
0
{
3715
0
    int base_offset;
3716
0
    uint32_t custom_class_offset, custom_class_size, device_id_offset, device_id_size,
3717
0
            fw_info_offset, fw_info_size, hw_info_offset, hw_info_size;
3718
0
    proto_item *it;
3719
3720
0
    base_offset = offset;
3721
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3722
0
    offset += 4;
3723
0
    mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
3724
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
3725
0
        mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
3726
0
    offset += 4;
3727
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3728
0
    offset += 4;
3729
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
3730
0
                           mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
3731
0
    offset += 4;
3732
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
3733
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
3734
0
    offset += 4;
3735
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
3736
0
                           mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
3737
0
    offset += 4;
3738
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
3739
0
                           mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
3740
0
    offset += 4;
3741
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3742
0
    offset += 4;
3743
0
    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);
3744
0
    offset += 4;
3745
0
    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);
3746
0
    offset += 4;
3747
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_offset);
3748
0
    offset += 4;
3749
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_size);
3750
0
    offset += 4;
3751
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_offset);
3752
0
    offset += 4;
3753
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_size);
3754
0
    offset += 4;
3755
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_offset);
3756
0
    offset += 4;
3757
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_size);
3758
    /*offset += 4;*/
3759
0
    if (custom_class_offset && custom_class_size) {
3760
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_custom_data_class, tvb, base_offset + custom_class_offset,
3761
0
                                custom_class_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3762
0
        if (custom_class_size > 22) {
3763
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3764
0
        }
3765
0
    }
3766
0
    if (device_id_offset && device_id_size) {
3767
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_device_id, tvb, base_offset + device_id_offset,
3768
0
                                 device_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3769
0
        if ((mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM) && (device_id_size > 30)) {
3770
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3771
0
        } else if (device_id_size > 36) {
3772
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3773
0
        }
3774
0
    }
3775
0
    if (fw_info_offset && fw_info_size) {
3776
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_fw_info, tvb, base_offset + fw_info_offset,
3777
0
                                 fw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3778
0
        if (fw_info_size > 60) {
3779
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3780
0
        }
3781
0
    }
3782
0
    if (hw_info_offset && hw_info_size) {
3783
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_hw_info, tvb, base_offset + hw_info_offset,
3784
0
                                 hw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3785
0
        if (hw_info_size > 60) {
3786
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3787
0
        }
3788
0
    }
3789
0
}
3790
3791
static void
3792
mbim_dissect_subscriber_ready_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
3793
                                     struct mbim_conv_info *mbim_conv)
3794
0
{
3795
0
    proto_tree *subtree;
3796
0
    int base_offset;
3797
0
    uint32_t i, subscriber_id_offset, subscriber_id_size, sim_icc_id_offset, sim_icc_id_size, elem_count;
3798
0
    proto_item *it;
3799
0
    wmem_array_t *pair_list = NULL;
3800
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
3801
3802
0
    base_offset = offset;
3803
0
    proto_tree_add_item(tree, hf_mbim_subscr_ready_status_ready_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3804
0
    offset += 4;
3805
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
3806
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_subscr_ready_status_flags, ett_mbim_bitmap,
3807
0
            mbim_subscr_ready_status_flags_fields, ENC_LITTLE_ENDIAN);
3808
0
        offset += 4;
3809
0
    }
3810
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_susbcr_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &subscriber_id_offset);
3811
0
    offset += 4;
3812
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_susbcr_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &subscriber_id_size);
3813
0
    offset += 4;
3814
0
    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);
3815
0
    offset += 4;
3816
0
    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);
3817
0
    offset += 4;
3818
0
    proto_tree_add_item(tree, hf_mbim_subscr_ready_status_ready_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3819
0
    offset += 4;
3820
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
3821
0
    offset += 4;
3822
3823
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
3824
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3825
0
        offset += 4;
3826
0
    }
3827
0
    if (elem_count) {
3828
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
3829
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Telephone Numbers Ref List");
3830
0
        for (i = 0; i < elem_count; i++) {
3831
0
            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);
3832
0
            offset += 4;
3833
0
            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);
3834
0
            offset += 4;
3835
0
            wmem_array_append_one(pair_list, pair_list_item);
3836
0
        }
3837
0
    }
3838
0
    if (subscriber_id_offset && subscriber_id_size) {
3839
0
        it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_susbcr_id, tvb, base_offset + subscriber_id_offset,
3840
0
                                 subscriber_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3841
0
        if ((mbim_conv->cellular_class == MBIM_CELLULAR_CLASS_CDMA) && (subscriber_id_size > 20)) {
3842
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3843
0
        } else if (subscriber_id_size > 30) {
3844
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3845
0
        }
3846
0
    }
3847
0
    if (sim_icc_id_offset && sim_icc_id_size) {
3848
0
        it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_sim_icc_id, tvb, base_offset + sim_icc_id_offset,
3849
0
                                 sim_icc_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3850
0
        if (sim_icc_id_size > 40) {
3851
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3852
0
        }
3853
0
    }
3854
0
    for (i = 0; i < elem_count; i++) {
3855
0
        p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
3856
0
        if (p_pair_list_item->offset && p_pair_list_item->size) {
3857
0
            it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_tel_nb, tvb, base_offset + p_pair_list_item->offset,
3858
0
                                     p_pair_list_item->size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3859
0
            if (p_pair_list_item->size > 44) {
3860
0
                expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3861
0
            }
3862
0
        }
3863
0
    }
3864
0
}
3865
3866
static void
3867
mbim_dissect_set_pin(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3868
0
{
3869
0
    int base_offset;
3870
0
    uint32_t pin_offset, pin_size, new_pin_offset, new_pin_size;
3871
0
    proto_item *it;
3872
3873
0
    base_offset = offset;
3874
0
    proto_tree_add_item(tree, hf_mbim_set_pin_pin_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3875
0
    offset += 4;
3876
0
    proto_tree_add_item(tree, hf_mbim_set_pin_pin_pin_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3877
0
    offset += 4;
3878
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_pin_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_offset);
3879
0
    offset += 4;
3880
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_pin_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_size);
3881
0
    offset += 4;
3882
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_new_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &new_pin_offset);
3883
0
    offset += 4;
3884
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_new_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &new_pin_size);
3885
    /*offset += 4;*/
3886
0
    if (pin_offset && pin_size) {
3887
0
        it = proto_tree_add_item(tree, hf_mbim_set_pin_pin, tvb, base_offset + pin_offset,
3888
0
                                 pin_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3889
0
        if (pin_size > 32) {
3890
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3891
0
        }
3892
0
    }
3893
0
    if (new_pin_offset && new_pin_size) {
3894
0
        it = proto_tree_add_item(tree, hf_mbim_set_pin_new_pin, tvb, base_offset + new_pin_offset,
3895
0
                                 new_pin_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3896
0
        if (new_pin_size > 32) {
3897
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3898
0
        }
3899
0
    }
3900
0
}
3901
3902
static void
3903
mbim_dissect_pin_list_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3904
0
{
3905
0
    static const char *pin_list[10] = { "PIN 1", "PIN 2", "Device SIM PIN", "Device First SIM PIN", "Network PIN",
3906
0
                                        "Network Subset PIN", "Service Provider PIN", "Corporate PIN", "Subsidy Lock",
3907
0
                                        "Custom"};
3908
0
    unsigned i;
3909
0
    uint32_t length;
3910
0
    proto_tree *subtree;
3911
3912
0
    for (i = 0; i < 10; i++) {
3913
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 16, ett_mbim_pin, NULL, pin_list[i]);
3914
0
        proto_tree_add_item(subtree, hf_mbim_pin_list_pin_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3915
0
        offset += 4;
3916
0
        proto_tree_add_item(subtree, hf_mbim_pin_list_pin_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3917
0
        offset += 4;
3918
0
        length = tvb_get_letohl(tvb, offset);
3919
0
        if (length == 0xffffffff) {
3920
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_pin_list_pin_length_min, tvb, offset, 4,
3921
0
                                             length, "Not available (0xffffffff)");
3922
0
        } else {
3923
0
            proto_tree_add_uint(subtree, hf_mbim_pin_list_pin_length_min, tvb, offset, 4, length);
3924
0
        }
3925
0
        offset += 4;
3926
0
        length = tvb_get_letohl(tvb, offset);
3927
0
        if (length == 0xffffffff) {
3928
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_pin_list_pin_length_max, tvb, offset, 4,
3929
0
                                             length, "Not available (0xffffffff)");
3930
0
        } else {
3931
0
            proto_tree_add_uint(subtree, hf_mbim_pin_list_pin_length_max, tvb, offset, 4, length);
3932
0
        }
3933
0
        offset += 4;
3934
0
    }
3935
0
}
3936
3937
static void
3938
mbim_dissect_provider(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3939
0
{
3940
0
    int base_offset;
3941
0
    uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size;
3942
0
    proto_item *it;
3943
3944
0
    base_offset = offset;
3945
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
3946
0
    offset += 4;
3947
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
3948
0
    offset += 4;
3949
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_provider_state, ett_mbim_bitmap,
3950
0
                           mbim_provider_state_fields, ENC_LITTLE_ENDIAN);
3951
0
    offset += 4;
3952
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
3953
0
    offset += 4;
3954
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
3955
0
    offset += 4;
3956
0
    proto_tree_add_item (tree, hf_mbim_provider_cellular_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3957
0
    offset += 4;
3958
0
    proto_tree_add_item (tree, hf_mbim_provider_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3959
0
    offset += 4;
3960
0
    proto_tree_add_item (tree, hf_mbim_provider_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3961
    /*offset += 4;*/
3962
0
    if (provider_id_offset && provider_id_size) {
3963
0
        it = proto_tree_add_item(tree, hf_mbim_provider_provider_id, tvb, base_offset + provider_id_offset,
3964
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3965
0
        if (provider_id_size > 12) {
3966
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3967
0
        }
3968
0
    }
3969
0
    if (provider_name_offset && provider_name_size) {
3970
0
        it = proto_tree_add_item(tree, hf_mbim_provider_provider_name, tvb, base_offset + provider_name_offset,
3971
0
                                 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3972
0
        if (provider_name_size > 40) {
3973
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3974
0
        }
3975
0
    }
3976
0
}
3977
3978
static void
3979
mbim_dissect_providers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
3980
0
{
3981
0
    proto_tree *subtree;
3982
0
    int base_offset;
3983
0
    uint32_t i, elem_count;
3984
0
    wmem_array_t *pair_list;
3985
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
3986
3987
0
    base_offset = offset;
3988
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_providers_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
3989
0
    offset += 4;
3990
0
    if (elem_count) {
3991
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
3992
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Providers Ref List");
3993
0
        for (i = 0; i < elem_count; i++) {
3994
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_providers_provider_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
3995
0
            offset += 4;
3996
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_providers_provider_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
3997
0
            offset += 4;
3998
0
            wmem_array_append_one(pair_list, pair_list_item);
3999
0
        }
4000
0
        for (i = 0; i < elem_count; i++) {
4001
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4002
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4003
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
4004
0
                            ett_mbim_pair_list, NULL, "Provider #%u", i+1);
4005
0
                mbim_dissect_provider(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4006
0
            }
4007
0
        }
4008
0
    }
4009
0
}
4010
4011
static void
4012
mbim_dissect_set_register_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4013
0
{
4014
0
    int base_offset;
4015
0
    uint32_t provider_id_offset, provider_id_size;
4016
0
    proto_item *it;
4017
4018
0
    base_offset = offset;
4019
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_register_state_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4020
0
    offset += 4;
4021
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_register_state_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4022
0
    offset += 4;
4023
0
    proto_tree_add_item(tree, hf_mbim_set_register_state_register_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4024
0
    offset += 4;
4025
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_register_state_data_class, ett_mbim_bitmap,
4026
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4027
    /*offset += 4;*/
4028
0
    if (provider_id_offset && provider_id_size) {
4029
0
        it = proto_tree_add_item(tree, hf_mbim_set_register_state_provider_id, tvb, base_offset + provider_id_offset,
4030
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4031
0
        if (provider_id_size > 12) {
4032
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4033
0
        }
4034
0
    }
4035
0
}
4036
4037
static void
4038
mbim_dissect_registration_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4039
0
{
4040
0
    int base_offset;
4041
0
    uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size,
4042
0
            roaming_text_offset, roaming_text_size, nw_error;
4043
0
    proto_item *it;
4044
4045
0
    base_offset = offset;
4046
0
    nw_error = tvb_get_letohl(tvb, offset);
4047
0
    if (nw_error == 0) {
4048
0
        proto_tree_add_uint_format_value(tree, hf_mbim_registration_state_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4049
0
    } else {
4050
0
        proto_tree_add_uint(tree, hf_mbim_registration_state_info_nw_error, tvb, offset, 4, nw_error);
4051
0
    }
4052
0
    offset += 4;
4053
0
    proto_tree_add_item(tree, hf_mbim_registration_state_info_register_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4054
0
    offset += 4;
4055
0
    proto_tree_add_item(tree, hf_mbim_registration_state_info_register_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4056
0
    offset += 4;
4057
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_available_data_classes, ett_mbim_bitmap,
4058
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4059
0
    offset += 4;
4060
0
    proto_tree_add_item(tree, hf_mbim_registration_state_info_current_cellular_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4061
0
    offset += 4;
4062
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4063
0
    offset += 4;
4064
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4065
0
    offset += 4;
4066
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
4067
0
    offset += 4;
4068
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
4069
0
    offset += 4;
4070
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_roaming_text_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &roaming_text_offset);
4071
0
    offset += 4;
4072
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_registration_state_info_roaming_text_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &roaming_text_size);
4073
0
    offset += 4;
4074
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_registration_flags, ett_mbim_bitmap,
4075
0
                           mbim_registration_state_info_registration_flags_fields, ENC_LITTLE_ENDIAN);
4076
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4077
0
        offset += 4;
4078
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_preferred_data_class, ett_mbim_bitmap,
4079
0
                    mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4080
0
    }
4081
    /*offset += 4;*/
4082
0
    if (provider_id_offset && provider_id_size) {
4083
0
        it = proto_tree_add_item(tree, hf_mbim_registration_state_info_provider_id, tvb, base_offset + provider_id_offset,
4084
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4085
0
        if (provider_id_size > 12) {
4086
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4087
0
        }
4088
0
    }
4089
0
    if (provider_name_offset && provider_name_size) {
4090
0
        it = proto_tree_add_item(tree, hf_mbim_registration_state_info_provider_name, tvb, base_offset + provider_name_offset,
4091
0
                                 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4092
0
        if (provider_name_size > 40) {
4093
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4094
0
        }
4095
0
    }
4096
0
    if (roaming_text_offset && roaming_text_size) {
4097
0
        it = proto_tree_add_item(tree, hf_mbim_registration_state_info_roaming_text, tvb, base_offset + roaming_text_offset,
4098
0
                                 roaming_text_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4099
0
        if (roaming_text_size > 126) {
4100
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4101
0
        }
4102
0
    }
4103
0
}
4104
4105
static void
4106
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
0
{
4108
0
    proto_tree *tai_ie;
4109
0
    uint32_t nw_error;
4110
0
    uint32_t base_offset = offset;
4111
4112
0
    nw_error = tvb_get_letohl(tvb, offset);
4113
0
    if (nw_error == 0) {
4114
0
        proto_tree_add_uint_format_value(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4115
0
    } else {
4116
0
        proto_tree_add_uint(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error);
4117
0
    }
4118
0
    offset += 4;
4119
0
    proto_tree_add_item(tree, hf_mbim_packet_service_info_packet_service_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4120
0
    offset += 4;
4121
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4122
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_current_data_class, ett_mbim_bitmap,
4123
0
                    mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4124
0
    } else {
4125
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_highest_available_data_class, ett_mbim_bitmap,
4126
0
                    mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4127
0
    }
4128
0
    offset += 4;
4129
0
    proto_tree_add_item(tree, hf_mbim_packet_service_info_uplink_speed, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4130
0
    offset += 8;
4131
0
    proto_tree_add_item(tree, hf_mbim_packet_service_info_downlink_speed, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4132
0
    offset += 8;
4133
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4134
0
        proto_tree_add_item(tree, hf_mbim_packet_service_info_frequency_range, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4135
0
        offset += 4;
4136
0
    }
4137
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4138
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_data_subclass, ett_mbim_bitmap,
4139
0
            mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
4140
0
        offset += 4;
4141
0
        tai_ie = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Tracking Area Identity");
4142
0
        mbim_dissect_ms_plmn(tvb, pinfo, tai_ie, offset);
4143
0
        offset += 4;
4144
0
        proto_tree_add_item(tai_ie, hf_mbim_ms_tai_tac, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4145
0
        offset += 4;
4146
0
        mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4147
0
    }
4148
0
}
4149
4150
static void
4151
mbim_dissect_set_signal_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4152
0
{
4153
0
    uint32_t error_rate_threshold;
4154
4155
0
    proto_tree_add_item(tree, hf_mbim_set_signal_state_signal_strength_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4156
0
    offset += 4;
4157
0
    proto_tree_add_item(tree, hf_mbim_set_signal_state_rssi_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4158
0
    offset += 4;
4159
0
    error_rate_threshold = tvb_get_letohl(tvb, offset);
4160
0
    if (error_rate_threshold == 0xffffffff) {
4161
0
        proto_tree_add_uint_format_value(tree, hf_mbim_set_signal_state_error_rate_threshold, tvb, offset, 4,
4162
0
                                         error_rate_threshold, "No report (0xffffffff)");
4163
0
    } else {
4164
0
        proto_tree_add_item(tree, hf_mbim_set_signal_state_error_rate_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4165
0
    }
4166
0
}
4167
4168
static void
4169
mbim_dissect_signal_state_element(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4170
0
{
4171
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4172
0
    offset += 4;
4173
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_snr, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4174
0
    offset += 4;
4175
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_rsrp_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4176
0
    offset += 4;
4177
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_snr_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4178
0
    offset += 4;
4179
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_signal_state_element_system_type, ett_mbim_bitmap,
4180
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4181
0
}
4182
4183
static void
4184
mbim_dissect_signal_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4185
0
{
4186
0
    proto_tree *subtree;
4187
0
    int base_offset;
4188
0
    uint32_t error_rate_threshold, rsrp_snr_offset, rsrp_snr_size, elem_count, i;
4189
0
    const int signal_state_elem_size = 20;
4190
0
    base_offset = offset;
4191
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4192
0
    offset += 4;
4193
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4194
0
    offset += 4;
4195
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_signal_strength_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4196
0
    offset += 4;
4197
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_rssi_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4198
0
    offset += 4;
4199
0
    error_rate_threshold = tvb_get_letohl(tvb, offset);
4200
0
    if (error_rate_threshold == 0xffffffff) {
4201
0
        proto_tree_add_uint_format_value(tree, hf_mbim_signal_state_info_error_rate_threshold, tvb, offset, 4,
4202
0
            error_rate_threshold, "No report (0xffffffff)");
4203
0
    } else {
4204
0
        proto_tree_add_item(tree, hf_mbim_signal_state_info_error_rate_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4205
0
    }
4206
0
    offset += 4;
4207
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4208
0
        proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_rsrp_snr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &rsrp_snr_offset);
4209
0
        offset += 4;
4210
0
        proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_rsrp_snr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &rsrp_snr_size);
4211
0
        if (rsrp_snr_offset && rsrp_snr_size) {
4212
0
            offset = base_offset + rsrp_snr_offset;
4213
0
            proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
4214
0
            offset += 4;
4215
0
            for (i = 0; i < elem_count; i++) {
4216
0
                offset += signal_state_elem_size * i;
4217
0
                subtree = proto_tree_add_subtree_format(tree, tvb, offset, signal_state_elem_size, ett_mbim_pair_list, NULL, "RSRP SNR Info #%u", i + 1);
4218
0
                mbim_dissect_signal_state_element(tvb, pinfo, subtree, offset);
4219
0
            }
4220
0
        }
4221
0
    }
4222
0
}
4223
4224
static uint8_t
4225
mbim_dissect_context_type_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
4226
0
{
4227
0
    e_guid_t uuid;
4228
0
    unsigned i;
4229
4230
0
    tvb_get_ntohguid(tvb, *offset, &uuid);
4231
4232
0
    for (i = 0; i < array_length(mbim_uuid_context_type_vals); i++) {
4233
0
        if (memcmp(&uuid, &(mbim_uuid_context_type_vals[i].uuid), sizeof(e_guid_t)) == 0) {
4234
0
            break;
4235
0
        }
4236
0
    }
4237
0
    proto_tree_add_guid_format_value(tree, hf_mbim_context_type, tvb, *offset, 16, &uuid, "%s (%s)",
4238
0
                                     val_to_str_const(i, mbim_context_type_vals, "Unknown"), guid_to_str(pinfo->pool, &uuid));
4239
0
    *offset += 16;
4240
4241
0
    return i;
4242
0
}
4243
4244
static void
4245
mbim_dissect_set_connect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4246
0
{
4247
0
    int base_offset;
4248
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size,
4249
0
            password_offset, password_size;
4250
0
    proto_item *it;
4251
4252
0
    base_offset = offset;
4253
0
    proto_tree_add_item(tree, hf_mbim_set_connect_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4254
0
    offset += 4;
4255
0
    proto_tree_add_item(tree, hf_mbim_set_connect_activation_command, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4256
0
    offset += 4;
4257
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
4258
0
    offset += 4;
4259
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
4260
0
    offset += 4;
4261
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
4262
0
    offset += 4;
4263
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
4264
0
    offset += 4;
4265
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
4266
0
    offset += 4;
4267
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
4268
0
    offset += 4;
4269
0
    proto_tree_add_item(tree, hf_mbim_set_connect_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4270
0
    offset += 4;
4271
0
    proto_tree_add_item(tree, hf_mbim_set_connect_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4272
0
    offset += 4;
4273
0
    proto_tree_add_item(tree, hf_mbim_set_connect_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4274
0
    offset += 4;
4275
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4276
0
    if (access_string_offset && access_string_size) {
4277
0
        it = proto_tree_add_item(tree, hf_mbim_set_connect_access_string, tvb, base_offset + access_string_offset,
4278
0
                                 access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4279
0
        if (access_string_size > 200) {
4280
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4281
0
        }
4282
0
    }
4283
0
    if (user_name_offset && user_name_size) {
4284
0
        it = proto_tree_add_item(tree, hf_mbim_set_connect_user_name, tvb, base_offset + user_name_offset,
4285
0
                                 user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4286
0
        if (user_name_size > 510) {
4287
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4288
0
        }
4289
0
    }
4290
0
    if (password_offset && password_size) {
4291
0
        it = proto_tree_add_item(tree, hf_mbim_set_connect_password, tvb, base_offset + password_offset,
4292
0
                                 password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4293
0
        if (password_size > 510) {
4294
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4295
0
        }
4296
0
    }
4297
0
}
4298
4299
static void
4300
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
0
{
4302
0
    int32_t base_offset = offset;
4303
0
    proto_tree *access_string, *user_name, *password, *snssai;
4304
4305
0
    proto_tree_add_item(tree, hf_mbim_set_connect_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4306
0
    offset += 4;
4307
0
    proto_tree_add_item(tree, hf_mbim_set_connect_activation_command, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4308
0
    offset += 4;
4309
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4310
0
        proto_tree_add_item(tree, hf_mbim_set_connect_activation_option, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4311
0
        offset += 4;
4312
0
    }
4313
0
    proto_tree_add_item(tree, hf_mbim_set_connect_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4314
0
    offset += 4;
4315
0
    proto_tree_add_item(tree, hf_mbim_set_connect_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4316
0
    offset += 4;
4317
0
    proto_tree_add_item(tree, hf_mbim_set_connect_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4318
0
    offset += 4;
4319
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4320
0
    proto_tree_add_item(tree, hf_mbim_set_connect_media_preference, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4321
0
    offset += 4;
4322
0
    access_string = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Access String");
4323
0
    mbim_dissect_tlv_ie(tvb, pinfo, access_string, &offset);
4324
0
    user_name = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "User Name");
4325
0
    mbim_dissect_tlv_ie(tvb, pinfo, user_name, &offset);
4326
0
    password = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Password");
4327
0
    mbim_dissect_tlv_ie(tvb, pinfo, password, &offset);
4328
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4329
0
        snssai = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
4330
0
        mbim_dissect_tlv_ie(tvb, pinfo, snssai, &offset);
4331
0
    }
4332
0
    mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4333
0
}
4334
4335
static void
4336
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
0
{
4338
0
    int32_t base_offset = offset;
4339
0
    proto_tree *access_string, *snssai;
4340
0
    uint32_t nw_error;
4341
4342
0
    proto_tree_add_item(tree, hf_mbim_connect_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4343
0
    offset += 4;
4344
0
    proto_tree_add_item(tree, hf_mbim_connect_info_activation_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4345
0
    offset += 4;
4346
0
    proto_tree_add_item(tree, hf_mbim_connect_info_voice_call_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4347
0
    offset += 4;
4348
0
    proto_tree_add_item(tree, hf_mbim_connect_info_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4349
0
    offset += 4;
4350
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4351
0
    nw_error = tvb_get_letohl(tvb, offset);
4352
0
    if (nw_error == 0) {
4353
0
        proto_tree_add_uint_format_value(tree, hf_mbim_connect_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4354
0
    } else {
4355
0
        proto_tree_add_uint(tree, hf_mbim_connect_info_nw_error, tvb, offset, 4, nw_error);
4356
0
    }
4357
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4358
0
        offset += 4;
4359
0
        proto_tree_add_item(tree, hf_mbim_connect_info_access_media, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4360
0
        offset += 4;
4361
0
        access_string = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Access String");
4362
0
        mbim_dissect_tlv_ie(tvb, pinfo, access_string, &offset);
4363
0
        if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4364
0
            snssai = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
4365
0
            mbim_dissect_tlv_ie(tvb, pinfo, snssai, &offset);
4366
0
        }
4367
0
        mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4368
0
    }
4369
0
}
4370
4371
static void
4372
mbim_dissect_context(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, bool is_set)
4373
0
{
4374
0
    int base_offset;
4375
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size,
4376
0
            password_offset, password_size, provider_id_offset = 0, provider_id_size = 0;
4377
0
    proto_item *it;
4378
4379
0
    base_offset = offset;
4380
0
    proto_tree_add_item(tree, hf_mbim_context_context_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4381
0
    offset += 4;
4382
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4383
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
4384
0
    offset += 4;
4385
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
4386
0
    offset += 4;
4387
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
4388
0
    offset += 4;
4389
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
4390
0
    offset += 4;
4391
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
4392
0
    offset += 4;
4393
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
4394
0
    offset += 4;
4395
0
    proto_tree_add_item(tree, hf_mbim_context_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4396
0
    offset += 4;
4397
0
    proto_tree_add_item(tree, hf_mbim_context_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4398
0
    offset += 4;
4399
0
    if (is_set) {
4400
0
        proto_tree_add_item_ret_uint(tree, hf_mbim_context_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4401
0
        offset += 4;
4402
0
        proto_tree_add_item_ret_uint(tree, hf_mbim_context_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4403
0
        offset += 4;
4404
0
    }
4405
0
    if (access_string_offset && access_string_size) {
4406
0
        it = proto_tree_add_item(tree, hf_mbim_context_access_string, tvb, base_offset + access_string_offset,
4407
0
                                 access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4408
0
        if (access_string_size > 200) {
4409
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4410
0
        }
4411
0
    }
4412
0
    if (user_name_offset && user_name_size) {
4413
0
        it = proto_tree_add_item(tree, hf_mbim_context_user_name, tvb, base_offset + user_name_offset,
4414
0
                                 user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4415
0
        if (user_name_size > 510) {
4416
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4417
0
        }
4418
0
    }
4419
0
    if (password_offset && password_size) {
4420
0
        it = proto_tree_add_item(tree, hf_mbim_context_password, tvb, base_offset + password_offset,
4421
0
                                 password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4422
0
        if (password_size > 510) {
4423
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4424
0
        }
4425
0
    }
4426
0
    if (provider_id_offset && provider_id_size) {
4427
0
        it = proto_tree_add_item(tree, hf_mbim_context_provider_id, tvb, base_offset + provider_id_offset,
4428
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4429
0
        if (provider_id_size > 12) {
4430
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4431
0
        }
4432
0
    }
4433
0
}
4434
4435
static void
4436
mbim_dissect_provisioned_contexts_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4437
0
{
4438
0
    proto_tree *subtree;
4439
0
    int base_offset;
4440
0
    uint32_t i, elem_count;
4441
0
    wmem_array_t *pair_list;
4442
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4443
4444
0
    base_offset = offset;
4445
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provisioned_contexts_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
4446
0
    offset += 4;
4447
0
    if (elem_count) {
4448
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4449
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provisioned Context Ref List");
4450
0
        for (i = 0; i < elem_count; i++) {
4451
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_provisioned_contexts_info_provisioned_context_offset,
4452
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4453
0
            offset += 4;
4454
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_provisioned_contexts_info_provisioned_context_size,
4455
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4456
0
            offset += 4;
4457
0
            wmem_array_append_one(pair_list, pair_list_item);
4458
0
        }
4459
0
        for (i = 0; i < elem_count; i++) {
4460
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4461
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4462
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4463
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Provisioned Context #%u", i+1);
4464
0
                mbim_dissect_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, false);
4465
0
            }
4466
0
        }
4467
0
    }
4468
0
}
4469
4470
static void
4471
mbim_dissect_ipv4_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
4472
0
{
4473
0
    uint32_t on_link_prefix_length;
4474
0
    proto_item *ti;
4475
4476
0
    ti = proto_tree_add_item_ret_uint(tree, hf_mbim_ipv4_element_on_link_prefix_length,
4477
0
                                      tvb, *offset, 4, ENC_LITTLE_ENDIAN, &on_link_prefix_length);
4478
0
    *offset += 4;
4479
0
    if (on_link_prefix_length > 32) {
4480
0
        expert_add_info_format(pinfo, ti, &ei_mbim_illegal_on_link_prefix_length,
4481
0
                               "Illegal On Link Prefix Length %u (max is 32)", on_link_prefix_length);
4482
0
    }
4483
0
    proto_tree_add_item(tree, hf_mbim_ipv4_element_ipv4_address, tvb, *offset, 4, ENC_BIG_ENDIAN);
4484
0
    *offset += 4;
4485
0
}
4486
4487
static void
4488
mbim_dissect_ipv6_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset)
4489
0
{
4490
0
    uint32_t on_link_prefix_length;
4491
0
    proto_item *ti;
4492
4493
0
    ti = proto_tree_add_item_ret_uint(tree, hf_mbim_ipv6_element_on_link_prefix_length, tvb,
4494
0
                                      *offset, 4, ENC_LITTLE_ENDIAN, &on_link_prefix_length);
4495
0
    *offset += 4;
4496
0
    if (on_link_prefix_length > 128) {
4497
0
        expert_add_info_format(pinfo, ti, &ei_mbim_illegal_on_link_prefix_length,
4498
0
                               "Illegal On Link Prefix Length %u (max is 128)", on_link_prefix_length);
4499
0
    }
4500
0
    proto_tree_add_item(tree, hf_mbim_ipv6_element_ipv6_address, tvb, *offset, 16, ENC_NA);
4501
0
    *offset += 16;
4502
0
}
4503
4504
static void
4505
mbim_dissect_ip_configuration_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4506
0
{
4507
0
    int base_offset;
4508
0
    uint32_t i, ipv4_address_count, ipv4_address_offset, ipv6_address_count, ipv6_address_offset,
4509
0
            ipv4_gateway_offset, ipv6_gateway_offset, ipv4_dns_count, ipv4_dns_offset,
4510
0
            ipv6_dns_count, ipv6_dns_offset;
4511
4512
0
    base_offset = offset;
4513
0
    proto_tree_add_item(tree, hf_mbim_ip_configuration_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4514
0
    offset += 4;
4515
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ip_configuration_info_ipv4_configuration_available,
4516
0
                           ett_mbim_bitmap, mbim_ip_configuration_info_ipv4_configuration_available_fields, ENC_LITTLE_ENDIAN);
4517
0
    offset += 4;
4518
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ip_configuration_info_ipv6_configuration_available,
4519
0
                           ett_mbim_bitmap, mbim_ip_configuration_info_ipv6_configuration_available_fields, ENC_LITTLE_ENDIAN);
4520
0
    offset += 4;
4521
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_address_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_address_count);
4522
0
    offset += 4;
4523
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_address_offset);
4524
0
    offset += 4;
4525
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_address_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_address_count);
4526
0
    offset += 4;
4527
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_address_offset);
4528
0
    offset += 4;
4529
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_gateway_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_gateway_offset);
4530
0
    offset += 4;
4531
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_gateway_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_gateway_offset);
4532
0
    offset += 4;
4533
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_dns_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_dns_count);
4534
0
    offset += 4;
4535
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv4_dns_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv4_dns_offset);
4536
0
    offset += 4;
4537
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_dns_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_dns_count);
4538
0
    offset += 4;
4539
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ip_configuration_info_ipv6_dns_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ipv6_dns_offset);
4540
0
    offset += 4;
4541
0
    proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_mtu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4542
0
    offset += 4;
4543
0
    proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_mtu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4544
0
    offset += 4;
4545
0
    if (ipv4_address_count && ipv4_address_offset) {
4546
0
        offset = base_offset + ipv4_address_offset;
4547
0
        for (i = 0; i < ipv4_address_count; i++) {
4548
0
            mbim_dissect_ipv4_element(tvb, pinfo, tree, &offset);
4549
0
        }
4550
0
    }
4551
0
    if (ipv6_address_count && ipv6_address_offset) {
4552
0
        offset = base_offset + ipv6_address_offset;
4553
0
        for (i = 0; i < ipv6_address_count; i++) {
4554
0
            mbim_dissect_ipv6_element(tvb, pinfo, tree, &offset);
4555
0
        }
4556
0
    }
4557
0
    if (ipv4_gateway_offset) {
4558
0
        proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_gateway,
4559
0
                            tvb, base_offset + ipv4_gateway_offset, 4, ENC_BIG_ENDIAN);
4560
0
    }
4561
0
    if (ipv6_gateway_offset) {
4562
0
        proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_gateway,
4563
0
                            tvb, base_offset + ipv6_gateway_offset, 16, ENC_NA);
4564
0
    }
4565
0
    if (ipv4_dns_count && ipv4_dns_offset) {
4566
0
        offset = base_offset + ipv4_dns_offset;
4567
0
        for (i = 0; i < ipv4_dns_count; i++) {
4568
0
            proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_dns,
4569
0
                                tvb, offset, 4, ENC_BIG_ENDIAN);
4570
0
            offset += 4;
4571
0
        }
4572
0
    }
4573
0
    if (ipv6_dns_count && ipv6_dns_offset) {
4574
0
        offset = base_offset + ipv6_dns_offset;
4575
0
        for (i = 0; i < ipv6_dns_count; i++) {
4576
0
            proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_dns,
4577
0
                                tvb, offset, 16, ENC_NA);
4578
0
            offset += 16;
4579
0
        }
4580
0
    }
4581
0
}
4582
4583
static void
4584
mbim_dissect_device_service_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4585
0
{
4586
0
    uint8_t uuid_idx;
4587
0
    uint32_t i, cid_count, cid;
4588
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
4589
4590
0
    uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_device_service_element_device_service_id, &offset, &uuid_ext_info, true);
4591
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_service_element_dss_payload,
4592
0
                           ett_mbim_bitmap, mbim_device_service_element_dss_payload_fields, ENC_LITTLE_ENDIAN);
4593
0
    offset += 4;
4594
0
    proto_tree_add_item(tree, hf_mbim_device_service_element_max_dss_instances, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4595
0
    offset += 4;
4596
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_service_element_cid_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
4597
0
    offset += 4;
4598
0
    for (i = 0; i < cid_count; i++) {
4599
0
        cid = tvb_get_letohl(tvb, offset);
4600
0
        if (uuid_idx < UUID_MAX) {
4601
0
            if (mbim_uuid_info[uuid_idx].cid_list_ext) {
4602
0
                proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4603
0
                                                 val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"), cid);
4604
0
            } else {
4605
0
                proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4606
0
                                                 val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"), cid);
4607
0
            }
4608
0
        } else if (uuid_idx == UUID_EXT_IDX) {
4609
0
            proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4610
0
                                             val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown"), cid);
4611
0
        } else {
4612
0
            proto_tree_add_uint(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid);
4613
0
        }
4614
0
        offset += 4;
4615
0
    }
4616
0
 }
4617
4618
static void
4619
mbim_dissect_device_services_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4620
0
{
4621
0
    proto_tree *subtree;
4622
0
    int base_offset;
4623
0
    uint32_t i, device_services_count;
4624
0
    wmem_array_t *pair_list;
4625
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4626
4627
0
    base_offset = offset;
4628
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_services_info_device_services_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_services_count);
4629
0
    offset += 4;
4630
0
    proto_tree_add_item(tree, hf_mbim_device_services_info_max_dss_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4631
0
    offset += 4;
4632
0
    if (device_services_count) {
4633
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4634
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*device_services_count, ett_mbim_pair_list, NULL, "Device Services Ref List");
4635
0
        for (i = 0; i < device_services_count; i++) {
4636
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_services_info_device_services_offset,
4637
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4638
0
            offset += 4;
4639
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_services_info_device_services_size,
4640
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4641
0
            offset += 4;
4642
0
            wmem_array_append_one(pair_list, pair_list_item);
4643
0
        }
4644
0
        for (i = 0; i < device_services_count; i++) {
4645
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4646
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4647
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4648
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Device Service Element #%u", i+1);
4649
0
                mbim_dissect_device_service_element(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4650
0
            }
4651
0
        }
4652
0
    }
4653
0
}
4654
4655
static void
4656
mbim_dissect_event_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4657
0
{
4658
0
    uint8_t uuid_idx;
4659
0
    uint32_t i, cid_count, cid;
4660
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
4661
4662
0
    uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_event_entry_device_service_id, &offset, &uuid_ext_info, true);
4663
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_event_entry_cid_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
4664
0
    offset += 4;
4665
0
    for (i = 0; i < cid_count; i++) {
4666
0
        cid = tvb_get_letohl(tvb, offset);
4667
0
        if (uuid_idx < UUID_MAX) {
4668
0
            if (mbim_uuid_info[uuid_idx].cid_list_ext) {
4669
0
                proto_tree_add_uint_format_value(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid, "%s (%u)",
4670
0
                                                 val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"), cid);
4671
0
            } else {
4672
0
                proto_tree_add_uint_format_value(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid, "%s (%u)",
4673
0
                                                 val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"), cid);
4674
0
            }
4675
0
        } else if (uuid_idx == UUID_EXT_IDX) {
4676
0
            proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4677
0
                                             val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown"), cid);
4678
0
        } else {
4679
0
            proto_tree_add_uint(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid);
4680
0
        }
4681
0
        offset += 4;
4682
0
    }
4683
0
 }
4684
4685
static void
4686
mbim_dissect_device_service_subscribe_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
4687
0
{
4688
0
    proto_tree *subtree;
4689
0
    int base_offset;
4690
0
    uint32_t i, element_count;
4691
0
    wmem_array_t *pair_list;
4692
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4693
4694
0
    base_offset = offset;
4695
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_service_subscribe_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
4696
0
    offset += 4;
4697
0
    if (element_count) {
4698
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4699
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "Device Service Subscribe Ref List");
4700
0
        for (i = 0; i < element_count; i++) {
4701
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_service_subscribe_device_service_offset,
4702
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4703
0
            offset += 4;
4704
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_service_subscribe_device_service_size,
4705
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4706
0
            offset += 4;
4707
0
            wmem_array_append_one(pair_list, pair_list_item);
4708
0
        }
4709
0
        for (i = 0; i < element_count; i++) {
4710
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4711
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4712
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4713
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Device Service Element #%u", i+1);
4714
0
                mbim_dissect_event_entry(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4715
0
            }
4716
0
        }
4717
0
    }
4718
0
}
4719
4720
static void
4721
mbim_dissect_packet_statistics_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4722
0
{
4723
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_discards, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4724
0
    offset += 4;
4725
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_errors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4726
0
    offset += 4;
4727
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_octets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4728
0
    offset += 8;
4729
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_packets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4730
0
    offset += 8;
4731
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_octets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4732
0
    offset += 8;
4733
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_packets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4734
0
    offset += 8;
4735
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_errors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4736
0
    offset += 4;
4737
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_discards, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4738
0
}
4739
4740
static void
4741
mbim_dissect_single_packet_filter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4742
0
{
4743
0
    int base_offset;
4744
0
    uint32_t filter_size, packet_filter_offset, packet_mask_offset;
4745
4746
0
    base_offset = offset;
4747
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_filter_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &filter_size);
4748
0
    offset += 4;
4749
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_packet_filter_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_filter_offset);
4750
0
    offset += 4;
4751
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_packet_mask_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_mask_offset);
4752
0
    offset += 4;
4753
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4754
0
        proto_tree_add_item(tree, hf_mbim_single_packet_filter_filter_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4755
        /* offset += 4; */
4756
0
    }
4757
0
    if (filter_size) {
4758
0
        if (packet_filter_offset) {
4759
0
            proto_tree_add_item(tree, hf_mbim_single_packet_filter_packet_filter, tvb, base_offset + packet_filter_offset,
4760
0
                                filter_size, ENC_NA);
4761
0
        }
4762
0
        if (packet_mask_offset) {
4763
0
            proto_tree_add_item(tree, hf_mbim_single_packet_filter_packet_mask, tvb, base_offset + packet_mask_offset,
4764
0
                                filter_size, ENC_NA);
4765
0
        }
4766
0
    }
4767
0
}
4768
4769
static void
4770
mbim_dissect_packet_filters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct mbim_conv_info* mbim_conv)
4771
0
{
4772
0
    proto_tree *subtree;
4773
0
    int base_offset;
4774
0
    uint32_t i, packet_filters_count;
4775
0
    wmem_array_t *pair_list;
4776
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4777
4778
0
    base_offset = offset;
4779
0
    proto_tree_add_item(tree, hf_mbim_packet_filters_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4780
0
    offset += 4;
4781
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_packet_filters_packet_filters_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_filters_count);
4782
0
    offset += 4;
4783
0
    if (packet_filters_count) {
4784
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4785
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*packet_filters_count, ett_mbim_pair_list, NULL, "Packet Filter Ref List");
4786
0
        for (i = 0; i < packet_filters_count; i++) {
4787
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_packet_filters_packet_filters_packet_filter_offset,
4788
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4789
0
            offset += 4;
4790
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_packet_filters_packet_filters_packet_filter_size,
4791
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4792
0
            offset += 4;
4793
0
            wmem_array_append_one(pair_list, pair_list_item);
4794
0
        }
4795
0
        for (i = 0; i < packet_filters_count; i++) {
4796
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4797
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4798
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4799
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Packet Filter Element #%u", i+1);
4800
0
                mbim_dissect_single_packet_filter(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, mbim_conv);
4801
0
            }
4802
0
        }
4803
0
    }
4804
0
}
4805
4806
static void
4807
mbim_dissect_set_sms_configuration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4808
0
{
4809
0
    int base_offset;
4810
0
    uint32_t sc_address_offset, sc_address_size;
4811
0
    proto_item *it;
4812
4813
0
    base_offset = offset;
4814
0
    proto_tree_add_item(tree, hf_mbim_set_sms_configuration_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4815
0
    offset += 4;
4816
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_configuration_sc_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_offset);
4817
0
    offset += 4;
4818
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_configuration_sc_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_size);
4819
    /*offset += 4;*/
4820
0
    if (sc_address_offset && sc_address_size) {
4821
0
        it = proto_tree_add_item(tree, hf_mbim_set_sms_configuration_sc_address, tvb, base_offset + sc_address_offset,
4822
0
                                 sc_address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4823
0
        if (sc_address_size > 40) {
4824
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4825
0
        }
4826
0
    }
4827
0
}
4828
4829
static void
4830
mbim_dissect_sms_configuration_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4831
0
{
4832
0
    int base_offset;
4833
0
    uint32_t sc_address_offset, sc_address_size;
4834
0
    proto_item *it;
4835
4836
0
    base_offset = offset;
4837
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_sms_storage_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4838
0
    offset += 4;
4839
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4840
0
    offset += 4;
4841
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_max_messages, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4842
0
    offset += 4;
4843
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_cdma_short_message_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4844
0
    offset += 4;
4845
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_configuration_info_sc_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_offset);
4846
0
    offset += 4;
4847
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_configuration_info_sc_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &sc_address_size);
4848
    /*offset += 4;*/
4849
0
    if (sc_address_offset && sc_address_size) {
4850
0
        it = proto_tree_add_item(tree, hf_mbim_sms_configuration_info_sc_address, tvb, base_offset + sc_address_offset,
4851
0
                                 sc_address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4852
0
        if (sc_address_size > 40) {
4853
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4854
0
        }
4855
0
    }
4856
0
}
4857
4858
static void
4859
mbim_dissect_sms_pdu_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
4860
                            struct mbim_conv_info *mbim_conv)
4861
0
{
4862
0
    int base_offset;
4863
0
    uint32_t message_status, pdu_data_offset, pdu_data_size;
4864
0
    tvbuff_t *sms_tvb;
4865
0
    proto_item *ti;
4866
0
    proto_tree *subtree, *sc_tree;
4867
0
    uint8_t sc_address_size;
4868
4869
0
    base_offset = offset;
4870
0
    proto_tree_add_item(tree, hf_mbim_sms_pdu_record_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4871
0
    offset += 4;
4872
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_message_status, tvb, offset, 4, ENC_LITTLE_ENDIAN, &message_status);
4873
0
    offset += 4;
4874
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_pdu_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_offset);
4875
0
    offset += 4;
4876
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_pdu_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_size);
4877
    /*offset += 4;*/
4878
0
    if (pdu_data_offset && pdu_data_size) {
4879
0
        if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM)) ||
4880
0
             (mbim_sms_pdu_format == SMS_PDU_3GPP)) && gsm_sms_handle) {
4881
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_pdu_record_pdu_data, tvb, base_offset + pdu_data_offset,
4882
0
                                     pdu_data_size, ENC_NA);
4883
0
            if (pdu_data_size > 183) {
4884
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
4885
0
            }
4886
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
4887
0
            sc_address_size = tvb_get_uint8(tvb, base_offset + pdu_data_offset);
4888
0
            sc_tree = proto_tree_add_subtree(subtree, tvb, base_offset + pdu_data_offset, 1 + sc_address_size,
4889
0
                                     ett_mbim_sc_address, NULL, "Service Center Address");
4890
0
            proto_tree_add_uint(sc_tree, hf_mbim_sms_pdu_record_pdu_data_sc_address_size, tvb,
4891
0
                                base_offset + pdu_data_offset, 1, sc_address_size);
4892
0
            if (sc_address_size) {
4893
0
                de_cld_party_bcd_num(tvb, sc_tree, pinfo, base_offset + pdu_data_offset + 1,
4894
0
                                     sc_address_size, NULL, 0);
4895
0
            }
4896
0
            if (pdu_data_size > (uint32_t)(sc_address_size + 1)) {
4897
0
                pdu_data_size -= sc_address_size + 1;
4898
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset + 1 + sc_address_size,
4899
0
                                         pdu_data_size);
4900
0
                pinfo->p2p_dir = (message_status < 2) ? P2P_DIR_SENT : P2P_DIR_RECV;
4901
0
                call_dissector(gsm_sms_handle, sms_tvb, pinfo, subtree);
4902
0
            }
4903
0
        } else {
4904
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_pdu_record_pdu_data, tvb, base_offset + pdu_data_offset,
4905
0
                                     pdu_data_size, ENC_NA);
4906
0
            if (pdu_data_size > 255) {
4907
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
4908
0
            }
4909
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
4910
0
            if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_CDMA)) ||
4911
0
                 (mbim_sms_pdu_format == SMS_PDU_3GPP2)) && cdma_sms_handle) {
4912
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset, pdu_data_size);
4913
0
                call_dissector(cdma_sms_handle, sms_tvb, pinfo, subtree);
4914
0
            }
4915
0
        }
4916
0
    }
4917
0
}
4918
4919
static void mbim_decode_sms_cdma_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const int hfindex, int offset,
4920
                                      uint32_t encoding_id, uint32_t size_in_bytes, uint32_t size_in_chars)
4921
0
{
4922
0
    unsigned char *src, *dest;
4923
4924
0
    switch (encoding_id) {
4925
0
        case MBIM_ENCODING_7BIT_ASCII:
4926
0
            proto_tree_add_ascii_7bits_item(tree, hfindex, tvb, (offset << 3), size_in_chars);
4927
0
            break;
4928
0
        case MBIM_ENCODING_IA5:
4929
0
            src = (unsigned char*)tvb_get_ascii_7bits_string(pinfo->pool, tvb, (offset << 3), size_in_chars);
4930
0
            dest = (unsigned char*)wmem_alloc(pinfo->pool, (const size_t)size_in_chars + 1);
4931
0
            IA5_7BIT_decode(dest, src, size_in_chars);
4932
0
            proto_tree_add_string(tree, hfindex, tvb, offset, size_in_bytes, (const char*)dest);
4933
0
            break;
4934
0
        case MBIM_ENCODING_UNICODE:
4935
0
            proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_UCS_2|ENC_BIG_ENDIAN);
4936
0
            break;
4937
0
        case MBIM_ENCODING_LATIN_HEBREW:
4938
0
            proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_ISO_8859_8|ENC_NA);
4939
0
            break;
4940
0
        case MBIM_ENCODING_LATIN:
4941
0
            proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_ISO_8859_1|ENC_NA);
4942
0
            break;
4943
0
        case MBIM_ENCODING_GSM_7BIT:
4944
0
            proto_tree_add_ts_23_038_7bits_packed_item(tree, hfindex, tvb, (offset << 3), size_in_chars);
4945
0
            break;
4946
0
        default:
4947
0
            break;
4948
0
    }
4949
0
}
4950
4951
static void
4952
mbim_dissect_sms_cdma_record(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
4953
0
{
4954
0
    int base_offset;
4955
0
    uint32_t address_offset, address_size, timestamp_offset, timestamp_size, encoding_id,
4956
0
            encoded_message_offset, size_in_bytes, size_in_chars;
4957
0
    proto_item *ti;
4958
0
    proto_tree *subtree;
4959
0
    proto_item *it;
4960
4961
0
    base_offset = offset;
4962
0
    proto_tree_add_item(tree, hf_mbim_sms_cdma_record_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4963
0
    offset += 4;
4964
0
    proto_tree_add_item(tree, hf_mbim_sms_cdma_record_message_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4965
0
    offset += 4;
4966
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_offset);
4967
0
    offset += 4;
4968
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_size);
4969
0
    offset += 4;
4970
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_timestamp_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &timestamp_offset);
4971
0
    offset += 4;
4972
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_timestamp_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &timestamp_size);
4973
0
    offset += 4;
4974
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_encoding_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &encoding_id);
4975
0
    offset += 4;
4976
0
    proto_tree_add_item(tree, hf_mbim_sms_cdma_record_language_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4977
0
    offset += 4;
4978
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_encoded_message_offset, tvb, offset, 4,
4979
0
                                 ENC_LITTLE_ENDIAN, &encoded_message_offset);
4980
0
    offset += 4;
4981
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_size_in_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_bytes);
4982
0
    offset += 4;
4983
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_size_in_characters, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_chars);
4984
    /*offset += 4;*/
4985
0
    if (address_offset && address_size) {
4986
0
        it = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_address, tvb, base_offset + address_offset,
4987
0
                                 address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4988
0
        if (address_size > 40) {
4989
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4990
0
        }
4991
0
    }
4992
0
    if (timestamp_offset && timestamp_size) {
4993
0
        it = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_timestamp, tvb, base_offset + timestamp_offset,
4994
0
                                 timestamp_size, ENC_ASCII);
4995
0
        if (timestamp_size > 21) {
4996
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4997
0
        }
4998
0
    }
4999
0
    if (encoded_message_offset && size_in_bytes) {
5000
0
        ti = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_encoded_message, tvb, base_offset + encoded_message_offset,
5001
0
                                 size_in_bytes, ENC_NA);
5002
0
        if (size_in_bytes > 160) {
5003
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5004
0
        }
5005
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5006
0
        mbim_decode_sms_cdma_text(tvb, pinfo, subtree, hf_mbim_sms_cdma_record_encoded_message_text,
5007
0
                                  (base_offset + encoded_message_offset), encoding_id, size_in_bytes, size_in_chars);
5008
0
    }
5009
0
}
5010
5011
static void
5012
mbim_dissect_sms_read_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5013
0
{
5014
0
    proto_tree_add_item(tree, hf_mbim_sms_read_req_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5015
0
    offset += 4;
5016
0
    proto_tree_add_item(tree, hf_mbim_sms_read_req_flag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5017
0
    offset += 4;
5018
0
    proto_tree_add_item(tree, hf_mbim_sms_read_req_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5019
0
}
5020
5021
static void
5022
mbim_dissect_sms_read_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
5023
                           struct mbim_conv_info *mbim_conv)
5024
0
{
5025
0
    proto_tree *subtree;
5026
0
    int base_offset;
5027
0
    uint32_t i, format, element_count;
5028
0
    wmem_array_t *pair_list;
5029
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5030
5031
0
    base_offset = offset;
5032
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_read_info_format, tvb, offset, 4, ENC_LITTLE_ENDIAN, &format);
5033
0
    offset += 4;
5034
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_read_info_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
5035
0
    offset += 4;
5036
0
    if (element_count) {
5037
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5038
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "SMS Ref List");
5039
0
        for (i = 0; i < element_count; i++) {
5040
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_sms_read_info_sms_offset,
5041
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5042
0
            offset += 4;
5043
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_sms_read_info_sms_size,
5044
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5045
0
            offset += 4;
5046
0
            wmem_array_append_one(pair_list, pair_list_item);
5047
0
        }
5048
0
        for (i = 0; i < element_count; i++) {
5049
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5050
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5051
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
5052
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "SMS Element #%u", i+1);
5053
0
                if (format == MBIM_SMS_FORMAT_PDU) {
5054
0
                    mbim_dissect_sms_pdu_record(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, mbim_conv);
5055
0
                } else if (format == MBIM_SMS_FORMAT_CDMA) {
5056
0
                    mbim_dissect_sms_cdma_record(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5057
0
                } else {
5058
0
                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unknown_sms_format, tvb,
5059
0
                                          base_offset + p_pair_list_item->offset, p_pair_list_item->size);
5060
0
                }
5061
0
            }
5062
0
        }
5063
0
    }
5064
0
}
5065
5066
static void
5067
mbim_dissect_sms_send_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
5068
                          struct mbim_conv_info *mbim_conv)
5069
0
{
5070
0
    int base_offset;
5071
0
    uint32_t pdu_data_offset, pdu_data_size;
5072
0
    tvbuff_t *sms_tvb;
5073
0
    proto_item *ti;
5074
0
    proto_tree *subtree, *sc_tree;
5075
0
    uint8_t sc_address_size;
5076
5077
0
    base_offset = offset;
5078
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_pdu_pdu_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_offset);
5079
0
    offset += 4;
5080
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_pdu_pdu_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pdu_data_size);
5081
    /*offset += 4;*/
5082
0
    if (pdu_data_offset && pdu_data_size) {
5083
0
        if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM)) ||
5084
0
             (mbim_sms_pdu_format == SMS_PDU_3GPP)) && gsm_sms_handle) {
5085
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_send_pdu_pdu_data, tvb, base_offset + pdu_data_offset,
5086
0
                                     pdu_data_size, ENC_NA);
5087
0
            if (pdu_data_size > 183) {
5088
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5089
0
            }
5090
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5091
0
            sc_address_size = tvb_get_uint8(tvb, base_offset + pdu_data_offset);
5092
0
            sc_tree = proto_tree_add_subtree(subtree, tvb, base_offset + pdu_data_offset, 1 + sc_address_size,
5093
0
                                     ett_mbim_sc_address, NULL, "Service Center Address");
5094
0
            proto_tree_add_uint(sc_tree, hf_mbim_sms_send_pdu_pdu_data_sc_address_size, tvb,
5095
0
                                base_offset + pdu_data_offset, 1, sc_address_size);
5096
0
            if (sc_address_size) {
5097
0
                de_cld_party_bcd_num(tvb, sc_tree, pinfo, base_offset + pdu_data_offset + 1,
5098
0
                                     sc_address_size, NULL, 0);
5099
0
            }
5100
0
            if (pdu_data_size > (uint32_t)(sc_address_size + 1)) {
5101
0
                pdu_data_size -= sc_address_size + 1;
5102
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset + 1 + sc_address_size,
5103
0
                                         pdu_data_size);
5104
0
                pinfo->p2p_dir = P2P_DIR_RECV;
5105
0
                call_dissector(gsm_sms_handle, sms_tvb, pinfo, subtree);
5106
0
            }
5107
0
        } else {
5108
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_send_pdu_pdu_data, tvb, base_offset + pdu_data_offset,
5109
0
                                     pdu_data_size, ENC_NA);
5110
0
            if (pdu_data_size > 255) {
5111
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5112
0
            }
5113
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5114
0
            if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_CDMA)) ||
5115
0
                 (mbim_sms_pdu_format == SMS_PDU_3GPP2)) && cdma_sms_handle) {
5116
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset, pdu_data_size);
5117
0
                call_dissector(cdma_sms_handle, sms_tvb, pinfo, subtree);
5118
0
            }
5119
0
        }
5120
0
    }
5121
0
}
5122
5123
static void
5124
mbim_dissect_sms_send_cdma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5125
0
{
5126
0
    int base_offset;
5127
0
    uint32_t encoding_id, address_offset, address_size, encoded_message_offset,
5128
0
            size_in_bytes, size_in_chars;
5129
0
    proto_item *ti;
5130
0
    proto_tree *subtree;
5131
5132
0
    base_offset = offset;
5133
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_encoding_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &encoding_id);
5134
0
    offset += 4;
5135
0
    proto_tree_add_item(tree, hf_mbim_sms_send_cdma_language_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5136
0
    offset += 4;
5137
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_offset);
5138
0
    offset += 4;
5139
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_size);
5140
0
    offset += 4;
5141
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_encoded_message_offset, tvb, offset, 4,
5142
0
                                 ENC_LITTLE_ENDIAN, &encoded_message_offset);
5143
0
    offset += 4;
5144
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_size_in_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_bytes);
5145
0
    offset += 4;
5146
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_size_in_characters, tvb, offset, 4, ENC_LITTLE_ENDIAN, &size_in_chars);
5147
    /*offset += 4;*/
5148
0
    if (address_offset && address_size) {
5149
0
        ti = proto_tree_add_item(tree, hf_mbim_sms_send_cdma_address, tvb, base_offset + address_offset,
5150
0
                                 address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5151
0
        if (address_size > 40) {
5152
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_string);
5153
0
        }
5154
0
    }
5155
0
    if (encoded_message_offset && size_in_bytes) {
5156
0
        ti = proto_tree_add_item(tree, hf_mbim_sms_send_cdma_encoded_message, tvb, base_offset + encoded_message_offset,
5157
0
                                 size_in_bytes, ENC_NA);
5158
0
        if (size_in_bytes > 160) {
5159
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5160
0
        }
5161
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5162
0
        mbim_decode_sms_cdma_text(tvb, pinfo, subtree, hf_mbim_sms_send_cdma_encoded_message_text,
5163
0
                                  (base_offset + encoded_message_offset), encoding_id, size_in_bytes, size_in_chars);
5164
0
    }
5165
0
}
5166
5167
static void
5168
mbim_dissect_set_sms_send(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
5169
                          struct mbim_conv_info *mbim_conv)
5170
0
{
5171
0
    uint32_t format;
5172
5173
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_send_format, tvb, offset, 4, ENC_LITTLE_ENDIAN, &format);
5174
0
    offset += 4;
5175
0
    if (format == MBIM_SMS_FORMAT_PDU) {
5176
0
        mbim_dissect_sms_send_pdu(tvb, pinfo, tree, offset, mbim_conv);
5177
0
    } else if (format == MBIM_SMS_FORMAT_CDMA) {
5178
0
        mbim_dissect_sms_send_cdma(tvb, pinfo, tree, offset);
5179
0
    } else {
5180
0
        proto_tree_add_expert(tree, pinfo, &ei_mbim_unknown_sms_format, tvb, offset, -1);
5181
0
    }
5182
0
}
5183
5184
static void
5185
mbim_dissect_set_ussd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5186
0
{
5187
0
    proto_item *ti;
5188
0
    proto_tree *subtree;
5189
0
    int base_offset;
5190
0
    uint32_t ussd_payload_offset, ussd_payload_length;
5191
0
    uint8_t encoding;
5192
0
    tvbuff_t *ussd_tvb;
5193
5194
0
    base_offset = offset;
5195
0
    proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5196
0
    offset += 4;
5197
0
    ti = proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_data_coding_scheme, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5198
0
    subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5199
0
    encoding = dissect_cbs_data_coding_scheme(tvb, pinfo, subtree, offset);
5200
0
    offset += 4;
5201
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_ussd_ussd_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_offset);
5202
0
    offset += 4;
5203
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_ussd_ussd_payload_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_length);
5204
    /*offset += 4;*/
5205
0
    if (ussd_payload_offset && ussd_payload_length) {
5206
0
        ti = proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_payload, tvb, base_offset + ussd_payload_offset,
5207
0
                                 ussd_payload_length, ENC_NA);
5208
0
        if (ussd_payload_length > 160) {
5209
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5210
0
        }
5211
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5212
0
        ussd_tvb = tvb_new_subset_length(tvb, base_offset + ussd_payload_offset, ussd_payload_length);
5213
0
        switch (encoding) {
5214
0
            case SMS_ENCODING_7BIT:
5215
0
            case SMS_ENCODING_7BIT_LANG:
5216
0
                proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5217
0
                                    ussd_tvb, 0, ussd_payload_length, ENC_3GPP_TS_23_038_7BITS);
5218
0
                break;
5219
0
            case SMS_ENCODING_8BIT:
5220
                /* XXX - ASCII, or some extended ASCII? */
5221
0
                proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5222
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_ASCII);
5223
0
                break;
5224
0
            case SMS_ENCODING_UCS2:
5225
0
            case SMS_ENCODING_UCS2_LANG:
5226
0
                proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5227
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_UCS_2|ENC_BIG_ENDIAN);
5228
0
                break;
5229
0
            default:
5230
0
                break;
5231
0
        }
5232
0
    }
5233
0
}
5234
5235
static void
5236
mbim_dissect_ussd_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5237
0
{
5238
0
    proto_item *ti;
5239
0
    proto_tree *subtree;
5240
0
    int base_offset;
5241
0
    uint32_t ussd_payload_offset, ussd_payload_length;
5242
0
    uint8_t encoding;
5243
0
    tvbuff_t *ussd_tvb;
5244
5245
0
    base_offset = offset;
5246
0
    proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_response, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5247
0
    offset += 4;
5248
0
    proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_session_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5249
0
    offset += 4;
5250
0
    ti = proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_data_coding_scheme, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5251
0
    subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5252
0
    encoding = dissect_cbs_data_coding_scheme(tvb, pinfo, subtree, offset);
5253
0
    offset += 4;
5254
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ussd_info_ussd_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_offset);
5255
0
    offset += 4;
5256
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ussd_info_ussd_payload_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_length);
5257
    /*offset += 4;*/
5258
0
    if (ussd_payload_offset && ussd_payload_length) {
5259
0
        ti = proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_payload, tvb, base_offset + ussd_payload_offset,
5260
0
                                 ussd_payload_length, ENC_NA);
5261
0
        if (ussd_payload_length > 160) {
5262
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5263
0
        }
5264
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5265
0
        ussd_tvb = tvb_new_subset_length(tvb, base_offset + ussd_payload_offset, ussd_payload_length);
5266
0
        switch (encoding) {
5267
0
            case SMS_ENCODING_7BIT:
5268
0
            case SMS_ENCODING_7BIT_LANG:
5269
0
                proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5270
0
                                    ussd_tvb, 0, ussd_payload_length, ENC_3GPP_TS_23_038_7BITS);
5271
0
                break;
5272
0
            case SMS_ENCODING_8BIT:
5273
                /* XXX - ASCII, or some extended ASCII? */
5274
0
                proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5275
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_ASCII);
5276
0
                break;
5277
0
            case SMS_ENCODING_UCS2:
5278
0
            case SMS_ENCODING_UCS2_LANG:
5279
0
                proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5280
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_UCS_2|ENC_BIG_ENDIAN);
5281
0
                break;
5282
0
            default:
5283
0
                break;
5284
0
        }
5285
0
    }
5286
0
}
5287
5288
static void
5289
mbim_dissect_phonebook_configuration_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5290
0
{
5291
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_phonebook_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5292
0
    offset += 4;
5293
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_total_nb_of_entries, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5294
0
    offset += 4;
5295
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_used_entries, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5296
0
    offset += 4;
5297
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_max_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5298
0
    offset += 4;
5299
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_max_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5300
0
}
5301
5302
static void
5303
mbim_dissect_phonebook_entry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5304
0
{
5305
0
    int base_offset;
5306
0
    uint32_t number_offset, number_length, name_offset, name_length;
5307
5308
0
    base_offset = offset;
5309
0
    proto_tree_add_item(tree, hf_mbim_phonebook_entry_entry_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5310
0
    offset += 4;
5311
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_number_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_offset);
5312
0
    offset += 4;
5313
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_length);
5314
0
    offset += 4;
5315
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_offset);
5316
0
    offset += 4;
5317
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_length);
5318
    /*offset += 4;*/
5319
0
    if (number_offset && number_length) {
5320
0
        proto_tree_add_item(tree, hf_mbim_phonebook_entry_number, tvb, base_offset + number_offset,
5321
0
                            number_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5322
0
    }
5323
0
    if (name_offset && name_length) {
5324
0
        proto_tree_add_item(tree, hf_mbim_phonebook_entry_name, tvb, base_offset + name_offset,
5325
0
                            name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5326
0
    }
5327
0
}
5328
5329
static void
5330
mbim_dissect_phonebook_read_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5331
0
{
5332
0
    proto_tree *subtree;
5333
0
    int base_offset;
5334
0
    uint32_t i, element_count;
5335
0
    wmem_array_t *pair_list;
5336
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5337
5338
0
    base_offset = offset;
5339
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_read_info_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
5340
0
    offset += 4;
5341
0
    if (element_count) {
5342
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5343
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "Phonebook Ref List");
5344
0
        for (i = 0; i < element_count; i++) {
5345
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_phonebook_read_info_phonebook_offset,
5346
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5347
0
            offset += 4;
5348
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_phonebook_read_info_phonebook_size,
5349
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5350
0
            offset += 4;
5351
0
            wmem_array_append_one(pair_list, pair_list_item);
5352
0
        }
5353
0
        for (i = 0; i < element_count; i++) {
5354
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5355
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5356
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
5357
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Phonebook Element #%u", i+1);
5358
0
                mbim_dissect_phonebook_entry(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5359
0
            }
5360
0
        }
5361
0
    }
5362
0
}
5363
5364
static void
5365
mbim_dissect_set_phonebook_write(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5366
0
{
5367
0
    int base_offset;
5368
0
    uint32_t number_offset, number_length, name_offset, name_length;
5369
5370
0
    base_offset = offset;
5371
0
    proto_tree_add_item(tree, hf_mbim_set_phonebook_write_save_flag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5372
0
    offset += 4;
5373
0
    proto_tree_add_item(tree, hf_mbim_set_phonebook_write_save_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5374
0
    offset += 4;
5375
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_number_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_offset);
5376
0
    offset += 4;
5377
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_length);
5378
0
    offset += 4;
5379
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_offset);
5380
0
    offset += 4;
5381
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_length);
5382
    /*offset += 4;*/
5383
0
    if (number_offset && number_length) {
5384
0
        proto_tree_add_item(tree, hf_mbim_set_phonebook_write_number, tvb, base_offset + number_offset,
5385
0
                            number_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5386
0
    }
5387
0
    if (name_offset && name_length) {
5388
0
        proto_tree_add_item(tree, hf_mbim_set_phonebook_write_name, tvb, base_offset + name_offset,
5389
0
                            name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5390
0
    }
5391
0
}
5392
5393
static void
5394
mbim_dissect_set_stk_pac(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5395
0
{
5396
0
    proto_item *ti;
5397
0
    proto_tree *subtree;
5398
5399
0
    ti = proto_tree_add_item(tree, hf_mbim_set_stk_pac_pac_host_control, tvb, offset, 32, ENC_NA);
5400
0
    subtree = proto_item_add_subtree(ti, ett_mbim_pac);
5401
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_refresh, tvb, offset, 1, ENC_NA);
5402
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_more_time, tvb, offset, 1, ENC_NA);
5403
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_poll_interval, tvb, offset, 1, ENC_NA);
5404
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_polling_off, tvb, offset, 1, ENC_NA);
5405
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list, tvb, offset, 1, ENC_NA);
5406
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_call, tvb, offset+1, 1, ENC_NA);
5407
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_ss, tvb, offset+1, 1, ENC_NA);
5408
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_ussd, tvb, offset+1, 1, ENC_NA);
5409
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_short_msg, tvb, offset+1, 1, ENC_NA);
5410
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_dtmf, tvb, offset+1, 1, ENC_NA);
5411
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_launch_browser, tvb, offset+1, 1, ENC_NA);
5412
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_geo_loc_req, tvb, offset+2, 1, ENC_NA);
5413
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_play_tone, tvb, offset+2, 1, ENC_NA);
5414
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_display_text, tvb, offset+2, 1, ENC_NA);
5415
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_inkey, tvb, offset+2, 1, ENC_NA);
5416
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_input, tvb, offset+2, 1, ENC_NA);
5417
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_select_item, tvb, offset+3, 1, ENC_NA);
5418
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_menu, tvb, offset+3, 1, ENC_NA);
5419
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_prov_local_info, tvb, offset+3, 1, ENC_NA);
5420
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_timer_management, tvb, offset+3, 1, ENC_NA);
5421
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text, tvb, offset+3, 1, ENC_NA);
5422
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu, tvb, offset+3, 1, ENC_NA);
5423
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_power_on_card, tvb, offset+3, 1, ENC_NA);
5424
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_power_off_card, tvb, offset+4, 1, ENC_NA);
5425
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_reader_status, tvb, offset+4, 1, ENC_NA);
5426
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_run_at_cmd, tvb, offset+4, 1, ENC_NA);
5427
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_lang_notif, tvb, offset+4, 1, ENC_NA);
5428
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_open_channel, tvb, offset+5, 1, ENC_NA);
5429
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_close_channel, tvb, offset+5, 1, ENC_NA);
5430
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_receive_data, tvb, offset+5, 1, ENC_NA);
5431
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_data, tvb, offset+5, 1, ENC_NA);
5432
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_channel_status, tvb, offset+5, 1, ENC_NA);
5433
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_service_search, tvb, offset+5, 1, ENC_NA);
5434
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_service_info, tvb, offset+5, 1, ENC_NA);
5435
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_declare_service, tvb, offset+5, 1, ENC_NA);
5436
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_frames, tvb, offset+6, 1, ENC_NA);
5437
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_frames_status, tvb, offset+6, 1, ENC_NA);
5438
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5439
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5440
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5441
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_activate, tvb, offset+8, 1, ENC_NA);
5442
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed, tvb, offset+8, 1, ENC_NA);
5443
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_cmd_container, tvb, offset+9, 1, ENC_NA);
5444
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl, tvb, offset+9, 1, ENC_NA);
5445
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_end_proact_session, tvb, offset+10, 1, ENC_NA);
5446
0
}
5447
5448
static void
5449
mbim_dissect_stk_pac_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5450
0
{
5451
0
    proto_item *ti;
5452
0
    proto_tree *subtree;
5453
5454
0
    ti = proto_tree_add_item(tree, hf_mbim_stk_pac_info_pac_support, tvb, offset, 256, ENC_NA);
5455
0
    subtree = proto_item_add_subtree(ti, ett_mbim_pac);
5456
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_refresh, tvb, offset+1, 1, ENC_NA);
5457
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_more_time, tvb, offset+2, 1, ENC_NA);
5458
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_poll_interval, tvb, offset+3, 1, ENC_NA);
5459
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_polling_off, tvb, offset+4, 1, ENC_NA);
5460
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_evt_list, tvb, offset+5, 1, ENC_NA);
5461
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_call, tvb, offset+10, 1, ENC_NA);
5462
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_ss, tvb, offset+11, 1, ENC_NA);
5463
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_ussd, tvb, offset+12, 1, ENC_NA);
5464
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_short_msg, tvb, offset+13, 1, ENC_NA);
5465
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_dtmf, tvb, offset+14, 1, ENC_NA);
5466
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_launch_browser, tvb, offset+15, 1, ENC_NA);
5467
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_geo_loc_req, tvb, offset+16, 1, ENC_NA);
5468
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_play_tone, tvb, offset+20, 1, ENC_NA);
5469
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_display_text, tvb, offset+21, 1, ENC_NA);
5470
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_inkey, tvb, offset+22, 1, ENC_NA);
5471
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_input, tvb, offset+23, 1, ENC_NA);
5472
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_select_item, tvb, offset+24, 1, ENC_NA);
5473
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_menu, tvb, offset+25, 1, ENC_NA);
5474
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_prov_local_info, tvb, offset+26, 1, ENC_NA);
5475
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_timer_management, tvb, offset+27, 1, ENC_NA);
5476
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text, tvb, offset+28, 1, ENC_NA);
5477
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_perform_card_apdu, tvb, offset+30, 1, ENC_NA);
5478
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_power_on_card, tvb, offset+31, 1, ENC_NA);
5479
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_power_off_card, tvb, offset+32, 1, ENC_NA);
5480
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_reader_status, tvb, offset+33, 1, ENC_NA);
5481
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_run_at_cmd, tvb, offset+34, 1, ENC_NA);
5482
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_lang_notif, tvb, offset+35, 1, ENC_NA);
5483
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_open_channel, tvb, offset+40, 1, ENC_NA);
5484
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_close_channel, tvb, offset+41, 1, ENC_NA);
5485
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_receive_data, tvb, offset+42, 1, ENC_NA);
5486
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_data, tvb, offset+43, 1, ENC_NA);
5487
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_channel_status, tvb, offset+44, 1, ENC_NA);
5488
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_service_search, tvb, offset+45, 1, ENC_NA);
5489
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_service_info, tvb, offset+46, 1, ENC_NA);
5490
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_declare_service, tvb, offset+47, 1, ENC_NA);
5491
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_frames, tvb, offset+50, 1, ENC_NA);
5492
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_frames_status, tvb, offset+51, 1, ENC_NA);
5493
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg, tvb, offset+60, 1, ENC_NA);
5494
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg, tvb, offset+61, 1, ENC_NA);
5495
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_display_multimedia_msg, tvb, offset+62, 1, ENC_NA);
5496
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_activate, tvb, offset+70, 1, ENC_NA);
5497
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_contactless_state_changed, tvb, offset+71, 1, ENC_NA);
5498
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_cmd_container, tvb, offset+72, 1, ENC_NA);
5499
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl, tvb, offset+73, 1, ENC_NA);
5500
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_end_proact_session, tvb, offset+81, 1, ENC_NA);
5501
0
}
5502
5503
static void
5504
mbim_dissect_set_stk_terminal_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5505
0
{
5506
0
    tvbuff_t *pac_tvb;
5507
0
    uint32_t response_length;
5508
0
    proto_item *ti;
5509
0
    proto_tree *subtree;
5510
5511
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_stk_terminal_response_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
5512
0
    offset += 4;
5513
0
    ti = proto_tree_add_item(tree, hf_mbim_set_stk_terminal_response_data_buffer, tvb, offset, response_length, ENC_NA);
5514
0
    if (etsi_cat_handle) {
5515
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5516
0
        pac_tvb = tvb_new_subset_length(tvb, offset, response_length);
5517
0
        call_dissector(etsi_cat_handle, pac_tvb, pinfo, subtree);
5518
0
    }
5519
0
}
5520
5521
static void
5522
mbim_dissect_stk_terminal_response_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5523
0
{
5524
0
    int base_offset;
5525
0
    uint32_t result_data_string_offset, result_data_string_length;
5526
5527
0
    base_offset = offset;
5528
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_stk_terminal_response_info_result_data_string_offset,
5529
0
                                 tvb, offset, 4, ENC_LITTLE_ENDIAN, &result_data_string_offset);
5530
0
    offset += 4;
5531
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_stk_terminal_response_info_result_data_string_length,
5532
0
                                 tvb, offset, 4, ENC_LITTLE_ENDIAN, &result_data_string_length);
5533
0
    offset += 4;
5534
0
    proto_tree_add_item(tree, hf_mbim_stk_terminal_response_info_status_word, tvb, offset,
5535
0
                        4, ENC_LITTLE_ENDIAN);
5536
0
    if (result_data_string_offset && result_data_string_length) {
5537
0
        proto_tree_add_item(tree, hf_mbim_stk_terminal_response_info_result_data_string, tvb,
5538
0
                            base_offset + result_data_string_offset, result_data_string_length, ENC_NA);
5539
0
    }
5540
0
}
5541
5542
static void
5543
mbim_dissect_aka_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5544
0
{
5545
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_req_rand, tvb, offset, 16, ENC_NA);
5546
0
    offset += 16;
5547
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_req_autn, tvb, offset, 16, ENC_NA);
5548
0
}
5549
5550
static void
5551
mbim_dissect_aka_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5552
0
{
5553
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_res, tvb, offset, 16, ENC_NA);
5554
0
    offset += 16;
5555
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_res_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5556
0
    offset += 4;
5557
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_ik, tvb, offset, 16, ENC_NA);
5558
0
    offset += 16;
5559
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_ck, tvb, offset, 16, ENC_NA);
5560
0
    offset += 16;
5561
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_auts, tvb, offset, 14, ENC_NA);
5562
0
}
5563
5564
static void
5565
mbim_dissect_akap_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5566
0
{
5567
0
    int base_offset;
5568
0
    uint32_t network_name_offset, network_name_length;
5569
5570
0
    base_offset = offset;
5571
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_req_rand, tvb, offset, 16, ENC_NA);
5572
0
    offset += 16;
5573
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_req_autn, tvb, offset, 16, ENC_NA);
5574
0
    offset += 16;
5575
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_akap_auth_req_network_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &network_name_offset);
5576
0
    offset += 4;
5577
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_akap_auth_req_network_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &network_name_length);
5578
    /*offset += 4;*/
5579
0
    if (network_name_offset && network_name_length) {
5580
0
        proto_tree_add_item(tree, hf_mbim_akap_auth_req_network_name, tvb, base_offset + network_name_offset,
5581
0
                            network_name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5582
0
    }
5583
0
}
5584
5585
static void
5586
mbim_dissect_akap_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5587
0
{
5588
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_res, tvb, offset, 16, ENC_NA);
5589
0
    offset += 16;
5590
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_res_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5591
0
    offset += 4;
5592
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_ik, tvb, offset, 16, ENC_NA);
5593
0
    offset += 16;
5594
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_ck, tvb, offset, 16, ENC_NA);
5595
0
    offset += 16;
5596
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_auts, tvb, offset, 14, ENC_NA);
5597
0
}
5598
5599
static void
5600
mbim_dissect_sim_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5601
0
{
5602
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand1, tvb, offset, 16, ENC_NA);
5603
0
    offset += 16;
5604
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand2, tvb, offset, 16, ENC_NA);
5605
0
    offset += 16;
5606
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand3, tvb, offset, 16, ENC_NA);
5607
0
    offset += 16;
5608
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_n, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5609
0
}
5610
5611
static void
5612
mbim_dissect_sim_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5613
0
{
5614
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5615
0
    offset += 4;
5616
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc1, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5617
0
    offset += 8;
5618
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5619
0
    offset += 4;
5620
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc2, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5621
0
    offset += 8;
5622
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5623
0
    offset += 4;
5624
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc3, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5625
0
    offset += 8;
5626
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_n, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5627
0
}
5628
5629
static void
5630
mbim_dissect_set_dss_connect(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5631
0
{
5632
0
    uint32_t dss_session_id;
5633
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
5634
5635
0
    mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_set_dss_connect_device_service_id, &offset, &uuid_ext_info, true);
5636
0
    dss_session_id = tvb_get_letohl(tvb, offset);
5637
0
    dissector_delete_uint("mbim.dss_session_id", dss_session_id, NULL);
5638
0
    if ((dss_session_id <= 255) && uuid_ext_info && uuid_ext_info->dss_handle) {
5639
0
        dissector_add_uint("mbim.dss_session_id", dss_session_id, uuid_ext_info->dss_handle);
5640
0
    }
5641
0
    proto_tree_add_uint(tree, hf_mbim_set_dss_connect_dss_session_id, tvb, offset, 4, dss_session_id);
5642
0
    offset += 4;
5643
0
    proto_tree_add_item(tree, hf_mbim_set_dss_connect_dss_link_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5644
0
}
5645
5646
static void
5647
mbim_dissect_muticarrier_current_cid_list_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5648
0
{
5649
0
    uint8_t service_idx;
5650
5651
0
    service_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_multicarrier_current_cid_list_req_uuid, &offset, NULL, true);
5652
0
    if (service_idx != UUID_MULTICARRIER) {
5653
0
        expert_add_info_format(pinfo, NULL, &ei_mbim_unexpected_uuid_value,
5654
0
                               "Unexpected UUID value, should be UUID_MULTICARRIER");
5655
0
    }
5656
0
}
5657
5658
static void
5659
mbim_dissect_muticarrier_current_cid_list_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5660
0
{
5661
0
    uint32_t i, cid_count;
5662
5663
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_multicarrier_current_cid_list_info_cid_count,
5664
0
                                 tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
5665
0
    offset += 4;
5666
0
    for (i = 0; i < cid_count; i++) {
5667
0
        proto_tree_add_item(tree, hf_mbim_multicarrier_current_cid_list_info_cid,
5668
0
                            tvb, offset, 4, ENC_LITTLE_ENDIAN);
5669
0
        offset += 4;
5670
0
    }
5671
0
}
5672
5673
static void
5674
mbim_dissect_thermal_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5675
0
{
5676
0
    int i;
5677
0
    proto_tree *subtree;
5678
5679
0
    for (i = 0; i < 4; i++) {
5680
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 24, ett_mbim_thermal_threshold_setting, NULL, "Threshold %u", i);
5681
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_enable, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5682
0
        offset += 4;
5683
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_temp_sensor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5684
0
        offset += 4;
5685
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_alarm_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5686
0
        offset += 4;
5687
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_threshold_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5688
0
        offset += 4;
5689
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_hyst_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5690
0
        offset += 4;
5691
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_sampling_period, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5692
0
        offset += 4;
5693
0
    }
5694
0
}
5695
5696
static void
5697
mbim_dissect_thermal_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5698
0
{
5699
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_current_temp_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5700
0
    offset += 4;
5701
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_enable, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5702
0
    offset += 4;
5703
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_temp_sensor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5704
0
    offset += 4;
5705
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_alarm_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5706
0
    offset += 4;
5707
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_threshold_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5708
0
    offset += 4;
5709
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_hyst_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5710
0
    offset += 4;
5711
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_sampling_period, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5712
0
}
5713
5714
static void
5715
mbim_dissect_sar_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
5716
0
{
5717
0
    proto_tree_add_item(tree, hf_mbim_sar_config_sar_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5718
0
    offset += 4;
5719
0
    if (buffer_len > 4) {
5720
0
        proto_tree_add_item(tree, hf_mbim_sar_config_level, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5721
0
    }
5722
0
}
5723
5724
static void
5725
mbim_dissect_ms_sar_config_state(tvbuff_t* tvb, proto_tree* tree, int offset)
5726
0
{
5727
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_state_sar_antenna_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5728
0
    offset += 4;
5729
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_state_sar_backoff_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5730
0
}
5731
5732
static void
5733
mbim_dissect_ms_sar_config(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, bool is_response)
5734
0
{
5735
0
    proto_tree* subtree;
5736
0
    uint32_t i, elem_count;
5737
0
    wmem_array_t* pair_list;
5738
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
5739
0
    int base_offset = offset;
5740
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5741
0
    offset += 4;
5742
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_backoff_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5743
0
    offset += 4;
5744
0
    if (is_response) {
5745
0
        proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_wifi_Integration, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5746
0
        offset += 4;
5747
0
    }
5748
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_sar_config_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5749
0
    offset += 4;
5750
0
    if (elem_count) {
5751
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5752
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "SAR Config State List");
5753
0
        for (i = 0; i < elem_count; i++) {
5754
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_sar_config_element_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5755
0
            offset += 4;
5756
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_sar_config_element_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5757
0
            offset += 4;
5758
0
            wmem_array_append_one(pair_list, pair_list_item);
5759
0
        }
5760
0
        for (i = 0; i < elem_count; i++) {
5761
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5762
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5763
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5764
0
                    ett_mbim_pair_list, NULL, "SAR Config State #%u", i + 1);
5765
0
                mbim_dissect_ms_sar_config_state(tvb, subtree, base_offset + p_pair_list_item->offset);
5766
0
            }
5767
0
        }
5768
0
    }
5769
0
}
5770
5771
static void
5772
mbim_dissect_ms_transmission_status(tvbuff_t* tvb, proto_tree* tree, int offset, bool is_response)
5773
0
{
5774
0
    proto_tree_add_item(tree, hf_mbim_ms_transmission_status_channel_notification, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5775
0
    offset += 4;
5776
0
    if (is_response) {
5777
0
        proto_tree_add_item(tree, hf_mbim_ms_transmission_status_transmission_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5778
0
        offset += 4;
5779
0
    }
5780
0
    proto_tree_add_item(tree, hf_mbim_ms_transmission_status_hysteresis_timer, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5781
0
}
5782
5783
5784
static void
5785
mbim_dissect_adpclk_freq_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
5786
0
{
5787
0
    proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5788
0
    offset += 4;
5789
0
    proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5790
0
    offset += 4;
5791
0
    if (buffer_len > 8) {
5792
0
        proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5793
0
        offset += 4;
5794
0
        if (buffer_len > 12) {
5795
0
            proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5796
0
            offset += 4;
5797
0
            if (buffer_len > 16) {
5798
0
                proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5799
0
            }
5800
0
        }
5801
0
    }
5802
0
}
5803
5804
static void
5805
mbim_dissect_adpclk_freq_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5806
0
{
5807
0
    proto_tree *subtree;
5808
0
    int base_offset;
5809
0
    uint32_t i, elem_count;
5810
0
    wmem_array_t *pair_list;
5811
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5812
5813
0
    base_offset = offset;
5814
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_adpclk_freq_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5815
0
    offset += 4;
5816
0
    if (elem_count) {
5817
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5818
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Element Offset Length Pair");
5819
0
        for (i = 0; i < elem_count; i++) {
5820
0
            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);
5821
0
            offset += 4;
5822
0
            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);
5823
0
            offset += 4;
5824
0
            wmem_array_append_one(pair_list, pair_list_item);
5825
0
        }
5826
0
        for (i = 0; i < elem_count; i++) {
5827
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5828
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5829
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5830
0
                            ett_mbim_pair_list, NULL, "ADPCLK Freq Value #%u", i+1);
5831
0
                mbim_dissect_adpclk_freq_value(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, p_pair_list_item->size);
5832
0
            }
5833
0
        }
5834
0
    }
5835
0
}
5836
5837
static void
5838
mbim_dissect_nrtcws_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
5839
0
{
5840
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_config_mode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5841
0
    offset += 2;
5842
0
    if (buffer_len > 2) {
5843
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5844
0
        offset += 2;
5845
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_safe_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5846
0
        offset += 2;
5847
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_bandwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5848
0
        offset += 2;
5849
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_bt_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5850
0
        offset += 2;
5851
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_bt_safe_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5852
0
    }
5853
0
}
5854
5855
static void
5856
mbim_dissect_nrtcws_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5857
0
{
5858
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5859
0
    offset += 2;
5860
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_wlan_safe_rx_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5861
0
    offset += 2;
5862
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_wlan_safe_rx_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5863
0
    offset += 2;
5864
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_bt_safe_rx_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5865
0
    offset += 2;
5866
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_bt_safe_rx_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5867
0
    offset += 2;
5868
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5869
0
    offset += 2;
5870
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5871
0
    offset += 2;
5872
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_initial_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5873
0
}
5874
5875
static void
5876
mbim_dissect_atds_signal_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5877
0
{
5878
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5879
0
    offset += 4;
5880
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_ber, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5881
0
    offset += 4;
5882
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rscp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5883
0
    offset += 4;
5884
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_ecno, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5885
0
    offset += 4;
5886
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rsrq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5887
0
    offset += 4;
5888
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5889
0
    offset += 4;
5890
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rssnr, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5891
0
}
5892
5893
static void
5894
mbim_dissect_atds_operator(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5895
0
{
5896
0
    int base_offset;
5897
0
    uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size;
5898
0
    proto_item *it;
5899
5900
0
    base_offset = offset;
5901
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
5902
0
    offset += 4;
5903
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
5904
0
    offset += 4;
5905
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_atds_operator_provider_state, ett_mbim_bitmap,
5906
0
                           mbim_provider_state_fields, ENC_LITTLE_ENDIAN);
5907
0
    offset += 4;
5908
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
5909
0
    offset += 4;
5910
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
5911
0
    offset += 4;
5912
0
    proto_tree_add_item (tree, hf_mbim_atds_operator_plmn_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5913
0
    offset += 4;
5914
0
    proto_tree_add_item (tree, hf_mbim_atds_operator_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5915
0
    offset += 4;
5916
0
    proto_tree_add_item (tree, hf_mbim_atds_operator_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5917
0
    if (provider_id_offset && provider_id_size) {
5918
0
        it = proto_tree_add_item(tree, hf_mbim_atds_operator_provider_id, tvb, base_offset + provider_id_offset,
5919
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5920
0
        if (provider_id_size > 12) {
5921
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5922
0
        }
5923
0
    }
5924
0
    if (provider_name_offset && provider_name_size) {
5925
0
        it = proto_tree_add_item(tree, hf_mbim_atds_operator_provider_name, tvb, base_offset + provider_name_offset,
5926
0
                                 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5927
0
        if (provider_name_size > 40) {
5928
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5929
0
        }
5930
0
    }
5931
0
}
5932
5933
static void
5934
mbim_dissect_atds_operators(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
5935
0
{
5936
0
    proto_tree *subtree;
5937
0
    int base_offset;
5938
0
    uint32_t i, elem_count;
5939
0
    wmem_array_t *pair_list;
5940
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5941
5942
0
    base_offset = offset;
5943
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operators_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5944
0
    offset += 4;
5945
0
    if (elem_count) {
5946
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5947
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Operators List");
5948
0
        for (i = 0; i < elem_count; i++) {
5949
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_operators_operator_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5950
0
            offset += 4;
5951
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_operators_operator_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5952
0
            offset += 4;
5953
0
            wmem_array_append_one(pair_list, pair_list_item);
5954
0
        }
5955
0
        for (i = 0; i < elem_count; i++) {
5956
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5957
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5958
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5959
0
                            ett_mbim_pair_list, NULL, "Operator #%u", i+1);
5960
0
                mbim_dissect_atds_operator(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5961
0
            }
5962
0
        }
5963
0
    }
5964
0
}
5965
5966
static void
5967
mbim_dissect_atds_projection_table(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
5968
0
{
5969
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5970
0
    offset += 4;
5971
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar5min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5972
0
    offset += 4;
5973
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a5, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5974
0
    offset += 4;
5975
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b5, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5976
0
    offset += 4;
5977
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar4min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5978
0
    offset += 4;
5979
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a4, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5980
0
    offset += 4;
5981
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b4, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5982
0
    offset += 4;
5983
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar3min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5984
0
    offset += 4;
5985
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5986
0
    offset += 4;
5987
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5988
0
    offset += 4;
5989
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar2min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5990
0
    offset += 4;
5991
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5992
0
    offset += 4;
5993
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5994
0
    offset += 4;
5995
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar1min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5996
0
    offset += 4;
5997
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5998
0
    offset += 4;
5999
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6000
0
    offset += 4;
6001
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar0min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6002
0
    offset += 4;
6003
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a0, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6004
0
    offset += 4;
6005
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b0, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6006
0
}
6007
6008
static void
6009
mbim_dissect_atds_projection_tables(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
6010
0
{
6011
0
    proto_tree *subtree;
6012
0
    int base_offset;
6013
0
    uint32_t i, elem_count;
6014
0
    wmem_array_t *pair_list;
6015
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6016
6017
0
    base_offset = offset;
6018
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_projection_tables_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6019
0
    offset += 4;
6020
0
    if (elem_count) {
6021
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6022
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Projection Tables List");
6023
0
        for (i = 0; i < elem_count; i++) {
6024
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_projection_tables_projection_table_offset,
6025
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6026
0
            offset += 4;
6027
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_projection_tables_projection_table_size,
6028
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6029
0
            offset += 4;
6030
0
            wmem_array_append_one(pair_list, pair_list_item);
6031
0
        }
6032
0
        for (i = 0; i < elem_count; i++) {
6033
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6034
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6035
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6036
0
                            ett_mbim_pair_list, NULL, "Projection Table #%u", i+1);
6037
0
                mbim_dissect_atds_projection_table(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
6038
0
            }
6039
0
        }
6040
0
    }
6041
0
}
6042
6043
static void
6044
mbim_dissect_multiflow_tft_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
6045
0
{
6046
0
    proto_tree *subtree;
6047
0
    int base_offset;
6048
0
    uint32_t i, elem_count;
6049
0
    wmem_array_t *pair_list;
6050
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6051
6052
0
    base_offset = offset;
6053
0
    proto_tree_add_item(tree, hf_mbim_multiflow_tft_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6054
0
    offset += 4;
6055
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_multiflow_tft_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6056
0
    offset += 4;
6057
0
    if (elem_count) {
6058
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6059
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "TFT List");
6060
0
        for (i = 0; i < elem_count; i++) {
6061
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_multiflow_tft_info_tft_list_offset,
6062
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6063
0
            offset += 4;
6064
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_multiflow_tft_info_tft_list_size,
6065
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6066
0
            offset += 4;
6067
0
            wmem_array_append_one(pair_list, pair_list_item);
6068
0
        }
6069
0
        for (i = 0; i < elem_count; i++) {
6070
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6071
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6072
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6073
0
                            ett_mbim_pair_list, NULL, "TFT #%u", i+1);
6074
0
                de_sm_tflow_temp(tvb, subtree, pinfo, base_offset + p_pair_list_item->offset, p_pair_list_item->size, NULL, 0);
6075
0
            }
6076
0
        }
6077
0
    }
6078
0
}
6079
6080
static void
6081
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
0
{
6083
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size, password_offset, password_size;
6084
0
    proto_item *it;
6085
0
    proto_tree* snssai;
6086
6087
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, offset);
6088
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_ip_type, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6089
0
    *offset += 4;
6090
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_enable, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6091
0
    *offset += 4;
6092
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_roaming, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6093
0
    *offset += 4;
6094
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_media_type, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6095
0
    *offset += 4;
6096
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_source, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6097
0
    *offset += 4;
6098
0
    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);
6099
0
    *offset += 4;
6100
0
    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);
6101
0
    *offset += 4;
6102
0
    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);
6103
0
    *offset += 4;
6104
0
    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);
6105
0
    *offset += 4;
6106
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_password_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
6107
0
    *offset += 4;
6108
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_ms_provisioned_context_v2_password_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &password_size);
6109
0
    *offset += 4;
6110
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_compression, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6111
0
    *offset += 4;
6112
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_auth_protocol, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6113
0
    *offset += 4;
6114
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6115
0
        snssai = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
6116
0
        mbim_dissect_tlv_ie(tvb, pinfo, snssai, offset);
6117
0
    }
6118
0
    if (access_string_offset && access_string_size) {
6119
0
        it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_access_string, tvb,
6120
0
                                 base_offset + access_string_offset, access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6121
0
        if (access_string_size > 200) {
6122
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6123
0
        }
6124
0
    }
6125
0
    if (user_name_offset && user_name_size) {
6126
0
        it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_user_name, tvb,
6127
0
                                 base_offset + user_name_offset, user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6128
0
        if (user_name_size > 510) {
6129
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6130
0
        }
6131
0
    }
6132
0
    if (password_offset && password_size) {
6133
0
        it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_password, tvb,
6134
0
                              base_offset + password_offset, password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6135
0
        if (password_size > 510) {
6136
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6137
0
        }
6138
0
    }
6139
0
}
6140
6141
static void
6142
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
0
{
6144
0
    int base_offset;
6145
6146
0
    base_offset = offset;
6147
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6148
0
    offset += 4;
6149
0
    mbim_dissect_ms_context_v2_base(tvb, pinfo, tree, &offset, base_offset, mbim_conv);
6150
0
}
6151
6152
static void
6153
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
0
{
6155
0
    proto_tree *subtree;
6156
0
    int base_offset, item_offset, base_item_offset;
6157
0
    uint32_t i, elem_count;
6158
0
    wmem_array_t *pair_list;
6159
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6160
6161
0
    base_offset = offset;
6162
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_provisioned_context_info_v2_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6163
0
    offset += 4;
6164
0
    if (elem_count) {
6165
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6166
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provisioned Contexts Ref List");
6167
0
        for (i = 0; i < elem_count; i++) {
6168
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_provisioned_context_info_v2_list_offset,
6169
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6170
0
            offset += 4;
6171
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_provisioned_context_info_v2_list_size,
6172
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6173
0
            offset += 4;
6174
0
            wmem_array_append_one(pair_list, pair_list_item);
6175
0
        }
6176
0
        for (i = 0; i < elem_count; i++) {
6177
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6178
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6179
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6180
0
                            ett_mbim_pair_list, NULL, "Context #%u", i+1);
6181
0
                item_offset = base_offset + p_pair_list_item->offset;
6182
0
                base_item_offset = item_offset;
6183
0
                proto_tree_add_item(subtree, hf_mbim_ms_provisioned_context_info_v2_context_id, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6184
0
                item_offset += 4;
6185
0
                mbim_dissect_ms_context_v2_base(tvb, pinfo, subtree, &item_offset, base_item_offset, mbim_conv);
6186
0
            }
6187
0
        }
6188
0
    }
6189
0
}
6190
6191
static void
6192
mbim_dissect_ms_network_blacklist_info(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, int offset)
6193
0
{
6194
0
    proto_tree *subtree;
6195
0
    int base_offset, item_offset;
6196
0
    uint32_t i, elem_count;
6197
0
    wmem_array_t *pair_list;
6198
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6199
6200
0
    base_offset = offset;
6201
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ms_network_blacklist_info_blacklist_state,
6202
0
                           ett_mbim_bitmap, mbim_ms_network_blacklist_state_fields, ENC_LITTLE_ENDIAN);
6203
6204
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_network_blacklist_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6205
0
    offset += 4;
6206
0
    if (elem_count) {
6207
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6208
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provider Blacklist Ref List");
6209
0
        for (i = 0; i < elem_count; i++) {
6210
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_network_blacklist_info_list_offset,
6211
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6212
0
            offset += 4;
6213
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_network_blacklist_info_list_size,
6214
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6215
0
            offset += 4;
6216
0
            wmem_array_append_one(pair_list, pair_list_item);
6217
0
        }
6218
0
        for (i = 0; i < elem_count; i++) {
6219
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6220
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6221
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6222
0
                            ett_mbim_pair_list, NULL, "Blacklisted Provider #%u", i+1);
6223
0
                item_offset = base_offset + p_pair_list_item->offset;
6224
0
                proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_mcc, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6225
0
                item_offset += 4;
6226
0
                proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_mnc, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6227
0
                item_offset += 4;
6228
0
                proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_type, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6229
0
            }
6230
0
        }
6231
0
    }
6232
0
}
6233
6234
static void
6235
mbim_dissect_sys_caps_info(tvbuff_t *tvb, proto_tree *tree, int offset)
6236
0
{
6237
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_number_of_executors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6238
0
    offset += 4;
6239
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_number_of_slots, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6240
0
    offset += 4;
6241
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_concurrency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6242
0
    offset += 4;
6243
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_modem_id, tvb, offset, 8, ENC_LITTLE_ENDIAN);
6244
0
}
6245
6246
static void
6247
mbim_dissect_device_caps_v2_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset,
6248
                              struct mbim_conv_info *mbim_conv)
6249
0
{
6250
0
    int base_offset;
6251
0
    uint32_t custom_class_offset, custom_class_size, device_id_offset, device_id_size,
6252
0
            fw_info_offset, fw_info_size, hw_info_offset, hw_info_size;
6253
0
    proto_item *it;
6254
6255
0
    base_offset = offset;
6256
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6257
0
    offset += 4;
6258
0
    mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
6259
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
6260
0
        mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
6261
0
    offset += 4;
6262
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6263
0
    offset += 4;
6264
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
6265
0
                           mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
6266
0
    offset += 4;
6267
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
6268
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6269
0
    offset += 4;
6270
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
6271
0
                           mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
6272
0
    offset += 4;
6273
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
6274
0
                           mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
6275
0
    offset += 4;
6276
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6277
0
    offset += 4;
6278
0
    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);
6279
0
    offset += 4;
6280
0
    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);
6281
0
    offset += 4;
6282
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_offset);
6283
0
    offset += 4;
6284
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_device_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &device_id_size);
6285
0
    offset += 4;
6286
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_offset);
6287
0
    offset += 4;
6288
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_fw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &fw_info_size);
6289
0
    offset += 4;
6290
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_offset);
6291
0
    offset += 4;
6292
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_caps_info_hw_info_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &hw_info_size);
6293
0
    offset += 4;
6294
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_v2_executor_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6295
0
    if (custom_class_offset && custom_class_size) {
6296
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_custom_data_class, tvb, base_offset + custom_class_offset,
6297
0
                                custom_class_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6298
0
        if (custom_class_size > 22) {
6299
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6300
0
        }
6301
0
    }
6302
0
    if (device_id_offset && device_id_size) {
6303
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_device_id, tvb, base_offset + device_id_offset,
6304
0
                                 device_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6305
0
        if ((mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM) && (device_id_size > 30)) {
6306
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6307
0
        } else if (device_id_size > 36) {
6308
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6309
0
        }
6310
0
    }
6311
0
    if (fw_info_offset && fw_info_size) {
6312
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_fw_info, tvb, base_offset + fw_info_offset,
6313
0
                                 fw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6314
0
        if (fw_info_size > 60) {
6315
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6316
0
        }
6317
0
    }
6318
0
    if (hw_info_offset && hw_info_size) {
6319
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_hw_info, tvb, base_offset + hw_info_offset,
6320
0
                                 hw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6321
0
        if (hw_info_size > 60) {
6322
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6323
0
        }
6324
0
    }
6325
0
}
6326
6327
static void
6328
mbim_dissect_device_caps_v3_and_higher_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset,
6329
    struct mbim_conv_info *mbim_conv)
6330
0
{
6331
0
    proto_tree *lte_band_class, *nr_band_class, *custom_data_class, *device_id, *firmware_info, *hardware_info;
6332
6333
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6334
0
    offset += 4;
6335
0
    mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
6336
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
6337
0
        mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
6338
0
    offset += 4;
6339
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6340
0
    offset += 4;
6341
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
6342
0
        mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
6343
0
    offset += 4;
6344
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
6345
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6346
0
    offset += 4;
6347
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
6348
0
        mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
6349
0
    offset += 4;
6350
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
6351
0
        mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
6352
0
    offset += 4;
6353
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_subclass, ett_mbim_bitmap,
6354
0
        mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6355
0
    offset += 8;
6356
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6357
0
    offset += 4;
6358
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_v2_executor_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6359
0
    offset += 4;
6360
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_wcdma_band_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6361
0
    offset += 4;
6362
6363
0
    lte_band_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "LTE Band Class");
6364
0
    mbim_dissect_tlv_ie(tvb, pinfo, lte_band_class, &offset);
6365
6366
0
    nr_band_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "NR Band Class");
6367
0
    mbim_dissect_tlv_ie(tvb, pinfo, nr_band_class, &offset);
6368
6369
0
    custom_data_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Custom Data Class");
6370
0
    mbim_dissect_tlv_ie(tvb, pinfo, custom_data_class, &offset);
6371
6372
0
    device_id = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Device ID");
6373
0
    mbim_dissect_tlv_ie(tvb, pinfo, device_id, &offset);
6374
6375
0
    firmware_info = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Firmware Info");
6376
0
    mbim_dissect_tlv_ie(tvb, pinfo, firmware_info, &offset);
6377
6378
0
    hardware_info = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Hardware Info");
6379
0
    mbim_dissect_tlv_ie(tvb, pinfo, hardware_info, &offset);
6380
0
}
6381
6382
static void
6383
mbim_dissect_lte_attach_context(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, int base_offset, bool include_roaming_source)
6384
0
{
6385
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size, password_offset, password_size;
6386
0
    proto_item* it;
6387
6388
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6389
0
    offset += 4;
6390
0
    if (include_roaming_source)
6391
0
    {
6392
0
        proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_roaming, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6393
0
        offset += 4;
6394
0
        proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_source, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6395
0
        offset += 4;
6396
0
    }
6397
0
    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);
6398
0
    offset += 4;
6399
0
    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);
6400
0
    offset += 4;
6401
0
    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);
6402
0
    offset += 4;
6403
0
    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);
6404
0
    offset += 4;
6405
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
6406
0
    offset += 4;
6407
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
6408
0
    offset += 4;
6409
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6410
0
    offset += 4;
6411
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6412
0
    if (access_string_offset && access_string_size) {
6413
0
        it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_access_string, tvb,
6414
0
            base_offset + access_string_offset, access_string_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6415
0
        if (access_string_size > 200) {
6416
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6417
0
        }
6418
0
    }
6419
0
    if (user_name_offset && user_name_size) {
6420
0
        it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_user_name, tvb,
6421
0
            base_offset + user_name_offset, user_name_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6422
0
        if (user_name_size > 510) {
6423
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6424
0
        }
6425
0
    }
6426
0
    if (password_offset && password_size) {
6427
0
        it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_password, tvb,
6428
0
            base_offset + password_offset, password_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6429
0
        if (password_size > 510) {
6430
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6431
0
        }
6432
0
    }
6433
0
}
6434
6435
static void
6436
mbim_dissect_lte_attach_config_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
6437
0
{
6438
0
    proto_tree* subtree;
6439
0
    int base_offset;
6440
0
    uint32_t i, elem_count;
6441
0
    wmem_array_t* pair_list;
6442
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
6443
6444
0
    base_offset = offset;
6445
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6446
0
    offset += 4;
6447
0
    if (elem_count) {
6448
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6449
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "Context List");
6450
0
        for (i = 0; i < elem_count; i++) {
6451
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_offset,
6452
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6453
0
            offset += 4;
6454
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_size,
6455
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6456
0
            offset += 4;
6457
0
            wmem_array_append_one(pair_list, pair_list_item);
6458
0
        }
6459
0
        for (i = 0; i < elem_count; i++) {
6460
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6461
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6462
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6463
0
                    ett_mbim_pair_list, NULL, "Context #%u", i + 1);
6464
0
                mbim_dissect_lte_attach_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, base_offset + p_pair_list_item->offset, true);
6465
0
            }
6466
0
        }
6467
0
    }
6468
0
}
6469
6470
static void
6471
mbim_dissect_set_lte_attach_config(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
6472
0
{
6473
0
    proto_tree* subtree;
6474
0
    int base_offset;
6475
0
    uint32_t i, elem_count;
6476
0
    wmem_array_t* pair_list;
6477
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
6478
6479
0
    base_offset = offset;
6480
0
    proto_tree_add_item(tree, hf_mbim_ms_set_lte_attach_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6481
0
    offset += 4;
6482
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6483
0
    offset += 4;
6484
0
    if (elem_count) {
6485
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6486
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "Context List");
6487
0
        for (i = 0; i < elem_count; i++) {
6488
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_offset,
6489
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6490
0
            offset += 4;
6491
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_size,
6492
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6493
0
            offset += 4;
6494
0
            wmem_array_append_one(pair_list, pair_list_item);
6495
0
        }
6496
0
        for (i = 0; i < elem_count; i++) {
6497
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6498
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6499
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6500
0
                    ett_mbim_pair_list, NULL, "Context #%u", i + 1);
6501
0
                mbim_dissect_lte_attach_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, base_offset + p_pair_list_item->offset, true);
6502
0
            }
6503
0
        }
6504
0
    }
6505
0
}
6506
6507
static void
6508
mbim_dissect_lte_attach_status(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
6509
0
{
6510
0
    int base_offset = offset;
6511
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6512
0
    offset += 4;
6513
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6514
0
        uint32_t nw_error = tvb_get_letohl(tvb, offset);
6515
0
        if (nw_error == 0) {
6516
0
            proto_tree_add_uint_format_value(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
6517
0
        }
6518
0
        else {
6519
0
            proto_tree_add_uint(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error);
6520
0
        }
6521
0
        offset += 4;
6522
0
    }
6523
0
    mbim_dissect_lte_attach_context(tvb, pinfo, tree, offset, base_offset, false);
6524
0
}
6525
6526
static void
6527
mbim_dissect_ms_device_slot_mapping_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
6528
0
{
6529
0
    proto_tree *subtree;
6530
0
    int base_offset;
6531
0
    uint32_t i, elem_count;
6532
0
    wmem_array_t *pair_list;
6533
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6534
6535
0
    base_offset = offset;
6536
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_device_slot_mapping_info_map_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6537
0
    offset += 4;
6538
0
    if (elem_count) {
6539
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6540
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Slot Map List");
6541
0
        for (i = 0; i < elem_count; i++) {
6542
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_device_slot_mapping_info_map_offset,
6543
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6544
0
            offset += 4;
6545
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_device_slot_mapping_info_map_size,
6546
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6547
0
            offset += 4;
6548
0
            wmem_array_append_one(pair_list, pair_list_item);
6549
0
        }
6550
0
        for (i = 0; i < elem_count; i++) {
6551
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6552
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6553
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6554
0
                            ett_mbim_pair_list, NULL, "Device #%u", i+1);
6555
0
                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);
6556
0
            }
6557
0
        }
6558
0
    }
6559
0
}
6560
6561
static void
6562
mbim_dissect_base_station_info_req(tvbuff_t* tvb, proto_tree* tree, int offset,
6563
    struct mbim_conv_info* mbim_conv)
6564
0
{
6565
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_gsm_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6566
0
    offset += 4;
6567
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_umts_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6568
0
    offset += 4;
6569
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_td_scdma_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6570
0
    offset += 4;
6571
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_lte_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6572
0
    offset += 4;
6573
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_cdma_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6574
0
    offset += 4;
6575
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6576
0
        proto_tree_add_item(tree, hf_mbim_base_station_max_nr_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6577
0
    }
6578
0
}
6579
6580
static void mbim_dissect_base_station_gsm_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int offset)
6581
0
{
6582
0
    int base_offset = offset;
6583
0
    uint32_t provider_id_offset, provider_id_size;
6584
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6585
0
    offset += 4;
6586
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6587
0
    offset += 4;
6588
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6589
0
    offset += 4;
6590
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6591
0
    offset += 4;
6592
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6593
0
    offset += 4;
6594
0
    proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6595
0
    offset += 4;
6596
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6597
0
    offset += 4;
6598
0
    proto_tree_add_item(tree, hf_mbim_base_station_rx_level, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6599
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6600
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6601
0
}
6602
6603
static void mbim_dissect_base_station_gsm_nmr_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6604
0
{
6605
0
    int base_offset = *offset;
6606
0
    uint32_t provider_id_offset, provider_id_size;
6607
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6608
0
    *offset += 4;
6609
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6610
0
    *offset += 4;
6611
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6612
0
    *offset += 4;
6613
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6614
0
    *offset += 4;
6615
0
    proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6616
0
    *offset += 4;
6617
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6618
0
    *offset += 4;
6619
0
    proto_tree_add_item(tree, hf_mbim_base_station_rx_level, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6620
0
    *offset += 4;
6621
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6622
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6623
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6624
0
}
6625
6626
static void mbim_dissect_base_station_umts_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int offset)
6627
0
{
6628
0
    int base_offset = offset;
6629
0
    uint32_t provider_id_offset, provider_id_size;
6630
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6631
0
    offset += 4;
6632
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6633
0
    offset += 4;
6634
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6635
0
    offset += 4;
6636
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6637
0
    offset += 4;
6638
0
    proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_ul, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6639
0
    offset += 4;
6640
0
    proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_dl, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6641
0
    offset += 4;
6642
0
    proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_nt, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6643
0
    offset += 4;
6644
0
    proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6645
0
    offset += 4;
6646
0
    proto_tree_add_item(tree, hf_mbim_base_station_primary_scrambling_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6647
0
    offset += 4;
6648
0
    proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6649
0
    offset += 4;
6650
0
    proto_tree_add_item(tree, hf_mbim_base_station_ecno, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6651
0
    offset += 4;
6652
0
    proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6653
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6654
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6655
0
}
6656
6657
static void mbim_dissect_base_station_umts_mrl_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6658
0
{
6659
0
    int base_offset = *offset;
6660
0
    uint32_t provider_id_offset, provider_id_size;
6661
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6662
0
    *offset += 4;
6663
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6664
0
    *offset += 4;
6665
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6666
0
    *offset += 4;
6667
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6668
0
    *offset += 4;
6669
0
    proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6670
0
    *offset += 4;
6671
0
    proto_tree_add_item(tree, hf_mbim_base_station_primary_scrambling_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6672
0
    *offset += 4;
6673
0
    proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6674
0
    *offset += 4;
6675
0
    proto_tree_add_item(tree, hf_mbim_base_station_ecno, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6676
0
    *offset += 4;
6677
0
    proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6678
0
    *offset += 4;
6679
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6680
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6681
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6682
0
}
6683
6684
static void mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6685
0
{
6686
0
    int base_offset = *offset;
6687
0
    uint32_t provider_id_offset, provider_id_size;
6688
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6689
0
    *offset += 4;
6690
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6691
0
    *offset += 4;
6692
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6693
0
    *offset += 4;
6694
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6695
0
    *offset += 4;
6696
0
    proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6697
0
    *offset += 4;
6698
0
    proto_tree_add_item(tree, hf_mbim_base_station_call_parameter, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6699
0
    *offset += 4;
6700
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6701
0
    *offset += 4;
6702
0
    proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6703
0
    *offset += 4;
6704
0
    proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6705
0
    *offset += 4;
6706
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6707
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6708
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6709
0
}
6710
6711
static void mbim_dissect_base_station_lte_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int offset)
6712
0
{
6713
0
    int base_offset = offset;
6714
0
    uint32_t provider_id_offset, provider_id_size;
6715
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6716
0
    offset += 4;
6717
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6718
0
    offset += 4;
6719
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6720
0
    offset += 4;
6721
0
    proto_tree_add_item(tree, hf_mbim_base_station_earfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6722
0
    offset += 4;
6723
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6724
0
    offset += 4;
6725
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6726
0
    offset += 4;
6727
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6728
0
    offset += 4;
6729
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6730
0
    offset += 4;
6731
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6732
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6733
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6734
0
}
6735
6736
static void mbim_dissect_base_station_lte_mrl_info(tvbuff_t* tvb, proto_tree* tree, int *offset)
6737
0
{
6738
0
    int base_offset = *offset;
6739
0
    uint32_t provider_id_offset, provider_id_size;
6740
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6741
0
    *offset += 4;
6742
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6743
0
    *offset += 4;
6744
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6745
0
    *offset += 4;
6746
0
    proto_tree_add_item(tree, hf_mbim_base_station_earfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6747
0
    *offset += 4;
6748
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6749
0
    *offset += 4;
6750
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6751
0
    *offset += 4;
6752
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6753
0
    *offset += 4;
6754
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb,* offset, 4, ENC_LITTLE_ENDIAN);
6755
0
    *offset += 4;
6756
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6757
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6758
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6759
0
}
6760
6761
static void mbim_dissect_base_station_cdma_mrl_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6762
0
{
6763
0
    proto_tree_add_item(tree, hf_mbim_base_station_serving_cell_flag, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6764
0
    *offset += 4;
6765
0
    proto_tree_add_item(tree, hf_mbim_base_station_nid, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6766
0
    *offset += 4;
6767
0
    proto_tree_add_item(tree, hf_mbim_base_station_sid, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6768
0
    *offset += 4;
6769
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6770
0
    *offset += 4;
6771
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_latitude, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6772
0
    *offset += 4;
6773
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_longitude, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6774
0
    *offset += 4;
6775
0
    proto_tree_add_item(tree, hf_mbim_base_station_ref_pn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6776
0
    *offset += 4;
6777
0
    proto_tree_add_item(tree, hf_mbim_base_station_gps_seconds, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6778
0
    *offset += 4;
6779
0
    proto_tree_add_item(tree, hf_mbim_base_station_pilot_strength, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6780
0
    *offset += 4;
6781
0
}
6782
6783
static void mbim_dissect_base_station_nr_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6784
0
{
6785
0
    int base_offset = *offset;
6786
0
    uint32_t provider_id_offset, provider_id_size;
6787
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6788
0
    *offset += 4;
6789
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6790
0
    *offset += 4;
6791
0
    proto_tree_add_item(tree, hf_mbim_base_station_nci, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
6792
0
    *offset += 8;
6793
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6794
0
    *offset += 4;
6795
0
    proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6796
0
    *offset += 4;
6797
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6798
0
    *offset += 4;
6799
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6800
0
    *offset += 4;
6801
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6802
0
    *offset += 4;
6803
0
    proto_tree_add_item(tree, hf_mbim_base_station_sinr, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6804
0
    *offset += 4;
6805
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
6806
0
    *offset += 8;
6807
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6808
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6809
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6810
0
}
6811
6812
static void mbim_dissect_base_station_nr_neighbor_cell_info(tvbuff_t* tvb, proto_tree* tree, int* offset)
6813
0
{
6814
0
    int base_offset = *offset;
6815
0
    uint32_t provider_id_offset, provider_id_size, cell_id_offset, cell_id_size;
6816
0
    proto_tree_add_bitmask(tree, tvb, *offset, hf_mbim_base_station_system_sub_type, ett_mbim_bitmap,
6817
0
        mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6818
0
    *offset += 4;
6819
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6820
0
    *offset += 4;
6821
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6822
0
    *offset += 4;
6823
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cell_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &cell_id_offset);
6824
0
    *offset += 4;
6825
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cell_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &cell_id_size);
6826
0
    *offset += 4;
6827
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6828
0
    *offset += 4;
6829
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6830
0
    *offset += 4;
6831
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6832
0
    *offset += 4;
6833
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6834
0
    *offset += 4;
6835
0
    proto_tree_add_item(tree, hf_mbim_base_station_sinr, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6836
0
    *offset += 4;
6837
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6838
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6839
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6840
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id_string, tvb, base_offset + cell_id_offset,
6841
0
        cell_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6842
0
    *offset += ROUND_UP_COUNT(cell_id_size, 4);
6843
0
}
6844
6845
static void
6846
mbim_dissect_base_station_info(tvbuff_t* tvb, proto_tree* tree, int offset,
6847
    struct mbim_conv_info* mbim_conv)
6848
0
{
6849
0
    proto_tree* subtree, *sub_subtree;
6850
0
    int base_offset = offset;
6851
0
    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,
6852
0
        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,
6853
0
        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;
6854
6855
0
    uint32_t count;
6856
6857
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_base_station_system_type, ett_mbim_bitmap,
6858
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6859
0
    offset += 4;
6860
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6861
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_base_station_system_sub_type, ett_mbim_bitmap,
6862
0
            mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6863
0
        offset += 4;
6864
0
    }
6865
0
    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);
6866
0
    offset += 4;
6867
0
    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);
6868
0
    offset += 4;
6869
0
    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);
6870
0
    offset += 4;
6871
0
    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);
6872
0
    offset += 4;
6873
0
    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);
6874
0
    offset += 4;
6875
0
    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);
6876
0
    offset += 4;
6877
0
    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);
6878
0
    offset += 4;
6879
0
    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);
6880
0
    offset += 4;
6881
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_nmr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_nmr_offset);
6882
0
    offset += 4;
6883
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_nmr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_nmr_size);
6884
0
    offset += 4;
6885
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_mrl_offset);
6886
0
    offset += 4;
6887
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_mrl_size);
6888
0
    offset += 4;
6889
0
    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);
6890
0
    offset += 4;
6891
0
    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);
6892
0
    offset += 4;
6893
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_mrl_offset);
6894
0
    offset += 4;
6895
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_mrl_size);
6896
0
    offset += 4;
6897
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cdma_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cdma_mrl_offset);
6898
0
    offset += 4;
6899
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cdma_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cdma_mrl_size);
6900
0
    offset += 4;
6901
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6902
0
        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);
6903
0
        offset += 4;
6904
0
        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);
6905
0
        offset += 4;
6906
0
        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);
6907
0
        offset += 4;
6908
0
        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);
6909
0
    }
6910
6911
0
    if (gsm_serving_cell_offset && gsm_serving_cell_size) {
6912
0
        offset = base_offset + gsm_serving_cell_offset;
6913
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, gsm_serving_cell_size, ett_mbim_pair_list, NULL, "Gsm Serving Cell");
6914
0
        mbim_dissect_base_station_gsm_serving_cell_info(tvb, subtree, offset);
6915
0
    }
6916
6917
0
    if (umts_serving_cell_offset && umts_serving_cell_size) {
6918
0
        offset = base_offset + umts_serving_cell_offset;
6919
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, umts_serving_cell_size, ett_mbim_pair_list, NULL, "Umts Serving Cell");
6920
0
        mbim_dissect_base_station_umts_serving_cell_info(tvb, subtree, offset);
6921
0
    }
6922
6923
0
    if (td_scdma_serving_cell_offset && td_scdma_serving_cell_size) {
6924
0
        offset = base_offset + td_scdma_serving_cell_offset;
6925
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, td_scdma_serving_cell_size, ett_mbim_pair_list, NULL, "Td Scdma Serving Cell");
6926
0
        mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvb, subtree, &offset);
6927
0
    }
6928
6929
0
    if (lte_serving_cell_offset && lte_serving_cell_size) {
6930
0
        offset = base_offset + lte_serving_cell_offset;
6931
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_serving_cell_size, ett_mbim_pair_list, NULL, "Lte Serving Cell");
6932
0
        mbim_dissect_base_station_lte_serving_cell_info(tvb, subtree, offset);
6933
0
    }
6934
6935
0
    if (gsm_nmr_offset && gsm_nmr_size) {
6936
0
        offset = base_offset + gsm_nmr_offset;
6937
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, gsm_nmr_size, ett_mbim_pair_list, NULL, "Gsm Nmr");
6938
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6939
0
        offset += 4;
6940
0
        for (uint32_t i = 0; i < count; i++) {
6941
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Nmr Info #%u", i);
6942
0
            mbim_dissect_base_station_gsm_nmr_info(tvb, sub_subtree, &offset);
6943
0
        }
6944
0
    }
6945
6946
0
    if (umts_mrl_offset && umts_mrl_size) {
6947
0
        offset = base_offset + umts_mrl_offset;
6948
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, umts_mrl_size, ett_mbim_pair_list, NULL, "Umts Mrl");
6949
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6950
0
        offset += 4;
6951
0
        for (uint32_t i = 0; i < count; i++) {
6952
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6953
0
            mbim_dissect_base_station_umts_mrl_info(tvb, sub_subtree, &offset);
6954
0
        }
6955
0
    }
6956
6957
0
    if (td_scdma_mrl_offset && td_scdma_mrl_size) {
6958
0
        offset = base_offset + td_scdma_mrl_offset;
6959
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, td_scdma_mrl_size, ett_mbim_pair_list, NULL, "Td Scdma Mrl");
6960
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6961
0
        offset += 4;
6962
0
        for (uint32_t i = 0; i < count; i++) {
6963
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6964
0
            mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvb, sub_subtree, &offset);
6965
0
        }
6966
0
    }
6967
6968
0
    if (lte_mrl_offset && lte_mrl_size) {
6969
0
        offset = base_offset + lte_mrl_offset;
6970
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Lte Mrl");
6971
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6972
0
        offset += 4;
6973
0
        for (uint32_t i = 0; i < count; i++) {
6974
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6975
0
            mbim_dissect_base_station_lte_mrl_info(tvb, sub_subtree, &offset);
6976
0
        }
6977
0
    }
6978
6979
0
    if (cdma_mrl_offset && cdma_mrl_size) {
6980
0
        offset = base_offset + cdma_mrl_offset;
6981
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Cdma Mrl");
6982
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6983
0
        offset += 4;
6984
0
        for (uint32_t i = 0; i < count; i++) {
6985
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6986
0
            mbim_dissect_base_station_cdma_mrl_info(tvb, sub_subtree, &offset);
6987
0
        }
6988
0
    }
6989
6990
0
    if (nr_serving_cells_offset && nr_serving_cells_size)
6991
0
    {
6992
0
        offset = base_offset + nr_serving_cells_offset;
6993
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Nr Serving Cells");
6994
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6995
0
        offset += 4;
6996
0
        for (uint32_t i = 0; i < count; i++) {
6997
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Cell Info #%u", i);
6998
0
            mbim_dissect_base_station_nr_serving_cell_info(tvb, sub_subtree, &offset);
6999
0
        }
7000
0
    }
7001
7002
0
    if (nr_neighbor_cells_offset && nr_neighbor_cells_size)
7003
0
    {
7004
0
        offset = base_offset + nr_neighbor_cells_offset;
7005
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Nr Neighbor Cells");
7006
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
7007
0
        offset += 4;
7008
0
        for (uint32_t i = 0; i < count; i++) {
7009
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Cell Info #%u", i);
7010
0
            mbim_dissect_base_station_nr_neighbor_cell_info(tvb, sub_subtree, &offset);
7011
0
        }
7012
0
    }
7013
0
}
7014
7015
static void
7016
mbim_dissect_version(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7017
0
{
7018
0
    uint32_t extended_version;
7019
7020
0
    proto_tree_add_item(tree, hf_mbim_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7021
0
    offset += 2;
7022
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_extended_version, tvb, offset, 2, ENC_LITTLE_ENDIAN, &extended_version);
7023
0
    switch (extended_version) {
7024
0
        case 0x0100:
7025
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_1;
7026
0
            break;
7027
0
        case 0x0200:
7028
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_2;
7029
0
            break;
7030
0
        case 0x0300:
7031
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_3;
7032
0
            break;
7033
0
        case 0x0400:
7034
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_4;
7035
0
            break;
7036
0
        default:
7037
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_Unknown;
7038
0
            break;
7039
0
    }
7040
0
}
7041
7042
static void
7043
mbim_dissect_ms_modem_config_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
7044
0
{
7045
0
    proto_tree *config_name, *unnamed_ies;
7046
0
    uint32_t base_offset;
7047
7048
0
    base_offset = offset;
7049
0
    proto_tree_add_item(tree, hf_mbim_ms_modem_config_config_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7050
0
    offset += 4;
7051
0
    config_name = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Config Name");
7052
0
    mbim_dissect_tlv_ie(tvb, pinfo, config_name, &offset);
7053
0
    while ((uint32_t)offset - base_offset < buffer_len) {
7054
0
        unnamed_ies = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Unnamed IE's");
7055
0
        mbim_dissect_tlv_ie(tvb, pinfo, unnamed_ies, &offset);
7056
0
    }
7057
0
}
7058
7059
static void
7060
mbim_dissect_ms_registration_params_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, uint32_t buffer_len)
7061
0
{
7062
0
    uint32_t base_offset;
7063
7064
0
    base_offset = offset;
7065
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_mico_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7066
0
    offset += 4;
7067
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_drx_params, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7068
0
    offset += 4;
7069
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_ladn_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7070
0
    offset += 4;
7071
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_default_pdu_hint, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7072
0
    offset += 4;
7073
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_re_register_if_needed, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7074
0
    offset += 4;
7075
7076
0
    mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
7077
0
}
7078
7079
static void
7080
mbim_dissect_ms_network_params_info(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset, uint32_t buffer_len)
7081
0
{
7082
0
    uint32_t base_offset =  offset;
7083
0
    proto_tree_add_item(tree, hf_mbim_ms_network_params_info_mico_indication, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7084
0
    offset += 4;
7085
0
    proto_tree_add_item(tree, hf_mbim_ms_network_params_info_drx_params, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7086
0
    offset += 4;
7087
7088
0
    mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
7089
0
}
7090
7091
static void
7092
mbim_dissect_ms_wake_reason(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
7093
0
{
7094
0
    proto_tree *wake_reason_tree;
7095
0
    proto_tree_add_item(tree, hf_mbim_ms_wake_reason_wake_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7096
0
    offset += 4;
7097
0
    proto_tree_add_item(tree, hf_mbim_ms_wake_reason_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7098
0
    offset += 4;
7099
0
    wake_reason_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Reason");
7100
0
    mbim_dissect_tlv_ie(tvb, pinfo, wake_reason_tree, &offset);
7101
0
}
7102
7103
static void
7104
mbim_dissect_ms_atr_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
7105
0
{
7106
0
    int base_offset;
7107
0
    uint32_t atr_offset, atr_size;
7108
0
    tvbuff_t *next_tvb;
7109
7110
0
    base_offset = offset;
7111
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_atr_info_atr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &atr_size);
7112
0
    offset += 4;
7113
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_atr_info_atr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &atr_offset);
7114
7115
0
    if (atr_offset && atr_size) {
7116
0
        if (iso7816_atr_handle) {
7117
0
            next_tvb = tvb_new_subset_length(tvb, base_offset + atr_offset, atr_size);
7118
0
            call_dissector(iso7816_atr_handle, next_tvb, pinfo, tree);
7119
0
        } else {
7120
0
            proto_tree_add_item(tree, hf_mbim_info_buffer, tvb, base_offset + atr_offset, atr_size, ENC_NA);
7121
0
        }
7122
7123
        // TODO: check atr_size <= 33
7124
0
    }
7125
0
}
7126
7127
static void
7128
mbim_dissect_ms_open_channel(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7129
0
{
7130
0
    uint32_t base_offset = offset;
7131
0
    uint32_t app_id_offset, app_id_size;
7132
7133
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_open_channel_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7134
0
    offset += 4;
7135
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_open_channel_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7136
0
    offset += 4;
7137
0
    proto_tree_add_item(tree, hf_mbim_ms_open_channel_select_p2_arg, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7138
0
    offset += 4;
7139
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7140
0
    offset += 4;
7141
7142
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7143
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7144
0
    }
7145
0
    if (app_id_offset && app_id_size) {
7146
0
        proto_tree_add_item(tree, hf_mbim_ms_open_channel_app_id, tvb, base_offset + app_id_offset, app_id_size, ENC_NA);
7147
0
    }
7148
0
}
7149
7150
static void
7151
mbim_dissect_ms_open_channel_info(tvbuff_t* tvb, proto_tree* tree, int offset)
7152
0
{
7153
0
    uint32_t base_offset = offset;
7154
0
    uint32_t response_offset, response_length;
7155
7156
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7157
0
    offset += 4;
7158
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7159
0
    offset += 4;
7160
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
7161
0
    offset += 4;
7162
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_offset);
7163
7164
0
    if (response_offset && response_length) {
7165
0
        proto_tree_add_item(tree, hf_mbim_ms_uicc_response, tvb, base_offset + response_offset, response_length, ENC_NA);
7166
0
    }
7167
0
}
7168
7169
static void
7170
mbim_dissect_ms_close_channel(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7171
0
{
7172
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7173
0
    offset += 4;
7174
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7175
0
    offset += 4;
7176
7177
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7178
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7179
0
    }
7180
0
}
7181
7182
static void
7183
mbim_dissect_ms_apdu(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7184
0
{
7185
0
    uint32_t base_offset = offset;
7186
0
    uint32_t command_offset, command_size;
7187
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7188
0
    offset += 4;
7189
0
    proto_tree_add_item(tree, hf_mbim_ms_apdu_secure_messaging, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7190
0
    offset += 4;
7191
0
    proto_tree_add_item(tree, hf_mbim_ms_apdu_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7192
0
    offset += 4;
7193
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_apdu_command_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &command_size);
7194
0
    offset += 4;
7195
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_apdu_command_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &command_offset);
7196
0
    offset += 4;
7197
7198
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7199
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7200
0
    }
7201
0
    if (command_offset && command_size) {
7202
0
        proto_item *item;
7203
0
        proto_tree *sub_tree;
7204
7205
0
        item = proto_tree_add_item(tree, hf_mbim_ms_apdu_command, tvb, base_offset + command_offset, command_size, ENC_NA);
7206
0
        if (mbim_uicc_apdu_dissector == UICC_APDU_GSM_SIM) {
7207
0
            if (gsm_sim_cmd_handle) {
7208
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7209
0
                call_dissector(gsm_sim_cmd_handle, tvb_new_subset_length(tvb, base_offset + command_offset, command_size), pinfo, sub_tree);
7210
0
            }
7211
0
        } else {
7212
0
            if (iso7816_handle) {
7213
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7214
0
                pinfo->p2p_dir = P2P_DIR_SENT;
7215
0
                call_dissector(iso7816_handle, tvb_new_subset_length(tvb, base_offset + command_offset, command_size), pinfo, sub_tree);
7216
0
            }
7217
0
        }
7218
0
    }
7219
0
}
7220
7221
static void
7222
mbim_dissect_ms_apdu_info(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, int offset)
7223
0
{
7224
0
    uint32_t base_offset = offset;
7225
0
    uint32_t response_offset, response_length;
7226
7227
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7228
0
    offset += 4;
7229
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
7230
0
    offset += 4;
7231
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_offset);
7232
7233
0
    if (response_offset && response_length) {
7234
0
        proto_item *item;
7235
0
        proto_tree *sub_tree;
7236
7237
0
        item = proto_tree_add_item(tree, hf_mbim_ms_uicc_response, tvb, base_offset + response_offset, response_length, ENC_NA);
7238
0
        if (mbim_uicc_apdu_dissector == UICC_APDU_GSM_SIM) {
7239
0
            if (gsm_sim_rsp_handle) {
7240
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7241
0
                call_dissector(gsm_sim_rsp_handle, tvb_new_subset_length(tvb, base_offset + response_offset, response_length), pinfo, sub_tree);
7242
0
            }
7243
0
        } else {
7244
0
            if (iso7816_handle) {
7245
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7246
0
                pinfo->p2p_dir = P2P_DIR_RECV;
7247
0
                call_dissector(iso7816_handle, tvb_new_subset_length(tvb, base_offset + response_offset, response_length), pinfo, sub_tree);
7248
0
            }
7249
0
        }
7250
0
    }
7251
0
}
7252
7253
static void
7254
mbim_dissect_ms_terminal_capability_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int information_buffer_base_offset, int offset)
7255
0
{
7256
0
    uint32_t capability_count;
7257
0
    wmem_array_t* pair_list = NULL;
7258
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
7259
0
    proto_tree* subtree;
7260
7261
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_terminal_capability_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &capability_count);
7262
0
    offset += 4;
7263
0
    if (capability_count) {
7264
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
7265
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * capability_count, ett_mbim_pair_list, NULL, "Capability List");
7266
0
        for (uint32_t i = 0; i < capability_count; i++) {
7267
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_terminal_capability_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
7268
0
            offset += 4;
7269
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_terminal_capability_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
7270
0
            offset += 4;
7271
0
            wmem_array_append_one(pair_list, pair_list_item);
7272
0
        }
7273
0
    }
7274
0
    for (uint32_t i = 0; i < capability_count; i++) {
7275
0
        p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
7276
0
        offset = information_buffer_base_offset + p_pair_list_item->offset;
7277
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, p_pair_list_item->size,
7278
0
            ett_mbim_pair_list, NULL, "Capability #%u", i + 1);
7279
0
        if (p_pair_list_item->size && p_pair_list_item->offset) {
7280
0
            proto_tree_add_item(subtree, hf_mbim_ms_terminal_capability, tvb, offset, p_pair_list_item->size, ENC_NA);
7281
0
        }
7282
0
    }
7283
0
}
7284
7285
static void
7286
mbim_dissect_ms_set_terminal_capability(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7287
0
{
7288
0
    int base_offset = offset;
7289
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7290
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7291
0
        offset += 4;
7292
0
    }
7293
7294
0
    mbim_dissect_ms_terminal_capability_info(tvb,pinfo, tree, base_offset, offset);
7295
0
}
7296
7297
static void
7298
mbim_dissect_ms_set_reset(tvbuff_t* tvb, proto_tree* tree, int offset, struct mbim_conv_info* mbim_conv)
7299
0
{
7300
0
    proto_tree_add_item(tree, hf_mbim_ms_reset_pass_through_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7301
0
    offset += 4;
7302
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7303
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7304
0
    }
7305
0
}
7306
7307
static void
7308
mbim_dissect_ms_query_reset(tvbuff_t* tvb, proto_tree* tree, int offset)
7309
0
{
7310
0
    proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7311
0
}
7312
7313
static void
7314
mbim_dissect_ms_app_info_elements(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7315
0
{
7316
0
    uint32_t base_offset = offset;
7317
0
    uint32_t app_id_offset, app_id_size, app_name_offset, app_name_size, pin_ref_offset, pin_ref_size, num_pins;
7318
7319
0
    proto_tree_add_item(tree, hf_mbim_ms_app_info_app_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7320
0
    offset += 4;
7321
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7322
0
    offset += 4;
7323
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7324
0
    offset += 4;
7325
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_name_offset);
7326
0
    offset += 4;
7327
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_app_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_name_size);
7328
0
    offset += 4;
7329
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_num_pins, tvb, offset, 4, ENC_LITTLE_ENDIAN, &num_pins);
7330
0
    offset += 4;
7331
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_pin_ref_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_ref_offset);
7332
0
    offset += 4;
7333
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_pin_ref_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_ref_size);
7334
7335
0
    if (app_id_offset && app_id_size) {
7336
0
        proto_tree_add_item(tree, hf_mbim_ms_app_info_app_id, tvb, base_offset + app_id_offset, app_id_size, ENC_NA);
7337
0
    }
7338
0
    if (app_name_offset && app_name_size) {
7339
0
        proto_tree_add_item(tree, hf_mbim_ms_app_info_app_name, tvb, base_offset + app_name_offset, app_name_size, ENC_UTF_8);
7340
0
    }
7341
0
    if (num_pins) {
7342
0
        proto_tree_add_item(tree, hf_mbim_ms_app_info_pin_ref, tvb, base_offset + pin_ref_offset, pin_ref_size, ENC_NA);
7343
0
    }
7344
0
}
7345
7346
static void
7347
mbim_dissect_ms_app_list(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, int offset)
7348
0
{
7349
0
    int base_offset;
7350
0
    uint32_t app_count;
7351
0
    wmem_array_t* pair_list = NULL;
7352
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
7353
0
    proto_tree* subtree;
7354
7355
0
    base_offset = offset;
7356
0
    proto_tree_add_item(tree, hf_mbim_ms_app_list_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7357
0
    offset += 4;
7358
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_list_app_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_count);
7359
0
    offset += 4;
7360
0
    proto_tree_add_item(tree, hf_mbim_ms_app_list_active_app_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7361
0
    offset += 4;
7362
0
    proto_tree_add_item(tree, hf_mbim_ms_app_list_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7363
0
    offset += 4;
7364
0
    if (app_count) {
7365
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
7366
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * app_count, ett_mbim_pair_list, NULL, "App List");
7367
0
        for (uint32_t i = 0; i < app_count; i++) {
7368
0
            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);
7369
0
            offset += 4;
7370
0
            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);
7371
0
            offset += 4;
7372
0
            wmem_array_append_one(pair_list, pair_list_item);
7373
0
        }
7374
0
    }
7375
0
    for (uint32_t i = 0; i < app_count; i++) {
7376
0
        p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
7377
0
        offset = base_offset + p_pair_list_item->offset;
7378
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, p_pair_list_item->size,
7379
0
            ett_mbim_pair_list, NULL, "App Info #%u", i + 1);
7380
0
        if (p_pair_list_item->size && p_pair_list_item->offset) {
7381
0
            mbim_dissect_ms_app_info_elements(tvb, pinfo, subtree, offset);
7382
0
        }
7383
0
    }
7384
0
}
7385
7386
static void
7387
mbim_dissect_ms_file_path(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7388
0
{
7389
0
    int base_offset;
7390
0
    uint32_t app_id_offset, app_id_size, file_path_offset, file_path_size;
7391
7392
0
    base_offset = offset;
7393
0
    proto_tree_add_item(tree, hf_mbim_ms_file_path_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7394
0
    offset += 4;
7395
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7396
0
    offset += 4;
7397
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7398
0
    offset += 4;
7399
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_file_path_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_offset);
7400
0
    offset += 4;
7401
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_file_path_file_path_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_size);
7402
0
    if (app_id_offset && app_id_size) {
7403
0
        proto_tree_add_item(tree, hf_mbim_ms_file_path_app_id, tvb, base_offset + app_id_offset,
7404
0
            app_id_size, ENC_NA);
7405
0
    }
7406
0
    if (file_path_offset && file_path_size) {
7407
0
        proto_tree_add_item(tree, hf_mbim_ms_file_path_file_path, tvb, base_offset + file_path_offset,
7408
0
            file_path_size, ENC_NA);
7409
0
    }
7410
0
}
7411
7412
static void
7413
mbim_dissect_ms_file_status(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7414
0
{
7415
0
    uint32_t i;
7416
7417
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7418
0
    offset += 4;
7419
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_status_word_1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7420
0
    offset += 4;
7421
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_status_word_2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7422
0
    offset += 4;
7423
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_file_accessibility, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7424
0
    offset += 4;
7425
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_file_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7426
0
    offset += 4;
7427
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_file_structure, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7428
0
    offset += 4;
7429
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_item_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7430
0
    offset += 4;
7431
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7432
0
    for (i = 0; i < 4; i++) {
7433
0
        offset += 4;
7434
0
        proto_tree_add_item(tree, hf_mbim_ms_file_status_file_lock_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7435
0
    }
7436
0
}
7437
7438
static void
7439
mbim_dissect_ms_response(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7440
0
{
7441
0
    int base_offset;
7442
0
    uint32_t response_data_offset, response_data_size;
7443
7444
0
    base_offset = offset;
7445
0
    proto_tree_add_item(tree, hf_mbim_ms_response_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7446
0
    offset += 4;
7447
0
    proto_tree_add_item(tree, hf_mbim_ms_response_status_word_1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7448
0
    offset += 4;
7449
0
    proto_tree_add_item(tree, hf_mbim_ms_response_status_word_2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7450
0
    offset += 4;
7451
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_response_response_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_data_offset);
7452
0
    offset += 4;
7453
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_response_response_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_data_size);
7454
0
    if (response_data_offset && response_data_size) {
7455
0
        proto_tree_add_item(tree, hf_mbim_ms_response_response_data, tvb, base_offset + response_data_offset,
7456
0
            response_data_size, ENC_NA);
7457
0
    }
7458
0
}
7459
7460
static void
7461
mbim_dissect_ms_access_binary(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7462
0
{
7463
0
    int base_offset;
7464
0
    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;
7465
7466
0
    base_offset = offset;
7467
0
    proto_tree_add_item(tree, hf_mbim_ms_access_binary_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7468
0
    offset += 4;
7469
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7470
0
    offset += 4;
7471
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7472
0
    offset += 4;
7473
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_file_path_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_offset);
7474
0
    offset += 4;
7475
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_file_path_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_size);
7476
0
    offset += 4;
7477
0
    proto_tree_add_item(tree, hf_mbim_ms_access_binary_file_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7478
0
    offset += 4;
7479
0
    proto_tree_add_item(tree, hf_mbim_ms_access_binary_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7480
0
    offset += 4;
7481
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_local_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_offset);
7482
0
    offset += 4;
7483
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_local_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_size);
7484
0
    offset += 4;
7485
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_binary_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &binary_data_offset);
7486
0
    offset += 4;
7487
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_binary_binary_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &binary_data_size);
7488
0
    if (app_id_offset && app_id_size) {
7489
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_app_id, tvb, base_offset + app_id_offset,
7490
0
            app_id_size, ENC_NA);
7491
0
    }
7492
0
    if (file_path_offset && file_path_size) {
7493
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_file_path, tvb, base_offset + file_path_offset,
7494
0
            file_path_size, ENC_NA);
7495
0
    }
7496
0
    if (local_pin_offset && local_pin_size) {
7497
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_local_pin, tvb, base_offset + local_pin_offset,
7498
0
            local_pin_size, ENC_UTF_8);
7499
0
    }
7500
0
    if (binary_data_offset && binary_data_size) {
7501
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_binary_data, tvb, base_offset + binary_data_offset,
7502
0
            binary_data_size, ENC_NA);
7503
0
    }
7504
0
}
7505
7506
static void
7507
mbim_dissect_ms_access_record(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7508
0
{
7509
0
    int base_offset;
7510
0
    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;
7511
7512
0
    base_offset = offset;
7513
0
    proto_tree_add_item(tree, hf_mbim_ms_access_record_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7514
0
    offset += 4;
7515
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_app_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_offset);
7516
0
    offset += 4;
7517
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_app_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_id_size);
7518
0
    offset += 4;
7519
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_file_path_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_offset);
7520
0
    offset += 4;
7521
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_file_path_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &file_path_size);
7522
0
    offset += 4;
7523
0
    proto_tree_add_item(tree, hf_mbim_ms_access_record_record_number, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7524
0
    offset += 4;
7525
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_local_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_offset);
7526
0
    offset += 4;
7527
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_local_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &local_pin_size);
7528
0
    offset += 4;
7529
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_record_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &record_data_offset);
7530
0
    offset += 4;
7531
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_access_record_record_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &record_data_size);
7532
0
    if (app_id_offset && app_id_size) {
7533
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_app_id, tvb, base_offset + app_id_offset,
7534
0
            app_id_size, ENC_NA);
7535
0
    }
7536
0
    if (file_path_offset && file_path_size) {
7537
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_file_path, tvb, base_offset + file_path_offset,
7538
0
            file_path_size, ENC_NA);
7539
0
    }
7540
0
    if (local_pin_offset && local_pin_size) {
7541
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_local_pin, tvb, base_offset + local_pin_offset,
7542
0
            local_pin_size, ENC_LITTLE_ENDIAN | ENC_UTF_8);
7543
0
    }
7544
0
    if (record_data_offset && record_data_size) {
7545
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_record_data, tvb, base_offset + record_data_offset,
7546
0
            record_data_size, ENC_NA);
7547
0
    }
7548
0
}
7549
7550
static void
7551
mbim_dissect_ms_nitz(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, int offset)
7552
0
{
7553
0
    proto_tree_add_item(tree, hf_mbim_nitz_year, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7554
0
    offset += 4;
7555
0
    proto_tree_add_item(tree, hf_mbim_nitz_month, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7556
0
    offset += 4;
7557
0
    proto_tree_add_item(tree, hf_mbim_nitz_day, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7558
0
    offset += 4;
7559
0
    proto_tree_add_item(tree, hf_mbim_nitz_hour, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7560
0
    offset += 4;
7561
0
    proto_tree_add_item(tree, hf_mbim_nitz_minute, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7562
0
    offset += 4;
7563
0
    proto_tree_add_item(tree, hf_mbim_nitz_second, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7564
0
    offset += 4;
7565
0
    proto_tree_add_item(tree, hf_mbim_nitz_timezone_offset_minutes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7566
0
    offset += 4;
7567
0
    proto_tree_add_item(tree, hf_mbim_nitz_daylight_saving_time_offset_minutes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7568
0
    offset += 4;
7569
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_nitz_data_class, ett_mbim_bitmap,
7570
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
7571
0
}
7572
7573
static int
7574
dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
7575
0
{
7576
0
    proto_item *ti;
7577
0
    proto_tree *mbim_tree, *header_tree, *subtree;
7578
0
    int offset = 0;
7579
0
    uint32_t msg_type, trans_id, open_count;
7580
0
    uint64_t trans_id_key, *p_trans_id_key;
7581
0
    conversation_t *conversation;
7582
0
    struct mbim_conv_info *mbim_conv;
7583
0
    struct mbim_info *mbim_info = NULL;
7584
7585
0
    if (data) {
7586
0
        usb_trans_info_t *usb_trans_info = ((urb_info_t *)data)->usb_trans_info;
7587
0
        if (usb_trans_info && (usb_trans_info->setup.request == 0x00)) {
7588
0
            tree = proto_tree_get_parent_tree(tree);
7589
0
        }
7590
0
    }
7591
7592
0
    if (mbim_control_decode_unknown_itf && (tvb_reported_length_remaining(tvb, offset) < 12)) {
7593
0
        return 0;
7594
0
    }
7595
7596
0
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM");
7597
0
    col_clear(pinfo->cinfo, COL_INFO);
7598
7599
0
    conversation = find_or_create_conversation(pinfo);
7600
0
    mbim_conv = (struct mbim_conv_info *)conversation_get_proto_data(conversation, proto_mbim);
7601
0
    if (!mbim_conv) {
7602
0
        mbim_conv = wmem_new(wmem_file_scope(), struct mbim_conv_info);
7603
0
        mbim_conv->trans = wmem_map_new(wmem_file_scope(), wmem_int64_hash, g_int64_equal);
7604
0
        mbim_conv->open = wmem_tree_new(wmem_file_scope());
7605
0
        mbim_conv->cellular_class = 0;
7606
0
        mbim_conv->mbim_extended_version = MBIM_Extended_Version_Unknown;
7607
0
        mbim_conv->open_count = 0;
7608
0
        wmem_tree_insert32(mbim_conv->open, pinfo->num, GUINT_TO_POINTER(mbim_conv->open_count));
7609
0
        conversation_add_proto_data(conversation, proto_mbim, mbim_conv);
7610
0
    }
7611
7612
0
    ti = proto_tree_add_item(tree, proto_mbim, tvb, offset, -1, ENC_NA);
7613
0
    mbim_tree = proto_item_add_subtree(ti, ett_mbim);
7614
0
    ti = proto_tree_add_item(mbim_tree, hf_mbim_control, tvb, offset, 0, ENC_NA);
7615
0
    proto_item_set_hidden(ti);
7616
7617
0
    header_tree = proto_tree_add_subtree(mbim_tree, tvb, offset, 12, ett_mbim_msg_header, NULL, "Message Header");
7618
0
    proto_tree_add_item_ret_uint(header_tree, hf_mbim_header_message_type, tvb, offset, 4, ENC_LITTLE_ENDIAN, &msg_type);
7619
0
    col_add_fstr(pinfo->cinfo, COL_INFO, "%-19s", val_to_str_const(msg_type, mbim_msg_type_vals, "Unknown"));
7620
0
    offset += 4;
7621
0
    proto_tree_add_item(header_tree, hf_mbim_header_message_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7622
0
    offset += 4;
7623
0
    proto_tree_add_item_ret_uint(header_tree, hf_mbim_header_transaction_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &trans_id);
7624
0
    offset += 4;
7625
7626
0
    switch (msg_type) {
7627
0
        case MBIM_OPEN_MSG:
7628
0
            {
7629
0
                uint32_t max_ctrl_transfer;
7630
7631
0
                if (!PINFO_FD_VISITED(pinfo)) {
7632
0
                    mbim_conv->open_count++;
7633
0
                    wmem_tree_insert32(mbim_conv->open, pinfo->num, GUINT_TO_POINTER(mbim_conv->open_count));
7634
0
                }
7635
0
                max_ctrl_transfer = tvb_get_letohl(tvb, offset);
7636
0
                if (max_ctrl_transfer == 8) {
7637
0
                    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);
7638
0
                } else {
7639
0
                    ti = proto_tree_add_uint(mbim_tree, hf_mbim_max_ctrl_transfer, tvb, offset, 4, max_ctrl_transfer);
7640
0
                    if (max_ctrl_transfer < 64) {
7641
0
                        expert_add_info(pinfo, ti, &ei_mbim_max_ctrl_transfer);
7642
0
                    }
7643
0
                }
7644
0
            }
7645
0
            break;
7646
0
        case MBIM_CLOSE_MSG:
7647
0
            break;
7648
0
        case MBIM_COMMAND_MSG:
7649
0
            {
7650
0
                uint32_t info_buff_len, current_frag, total_frag, cid, cmd_type;
7651
0
                uint8_t uuid_idx;
7652
0
                fragment_head *frag_data;
7653
0
                tvbuff_t *frag_tvb;
7654
0
                struct mbim_uuid_ext *uuid_ext_info = NULL;
7655
7656
0
                subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 8, ett_mbim_frag_header, NULL, "Fragment Header");
7657
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_total, tvb, offset, 4, ENC_LITTLE_ENDIAN, &total_frag);
7658
0
                offset += 4;
7659
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_current, tvb, offset, 4, ENC_LITTLE_ENDIAN, &current_frag);
7660
0
                offset += 4;
7661
0
                if (total_frag > 1) {
7662
0
                    frag_data = fragment_add_seq_check(&mbim_reassembly_table, tvb, offset, pinfo,
7663
0
                                                       trans_id, mbim_conv, current_frag,
7664
0
                                                       tvb_reported_length_remaining(tvb, offset),
7665
0
                                                       (current_frag != (total_frag-1)));
7666
0
                    frag_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled MBIM control message",
7667
0
                                                        frag_data, &mbim_frag_items, NULL, subtree);
7668
0
                    if (!frag_tvb) {
7669
                        /* Fragmentation reassembly not performed yet */
7670
0
                        proto_tree_add_item(mbim_tree, hf_mbim_fragmented_payload, tvb, offset, -1, ENC_NA);
7671
0
                        col_append_fstr(pinfo->cinfo, COL_INFO, ": [Fragment #%u out of %u]", current_frag+1, total_frag);
7672
0
                        break;
7673
0
                    }
7674
0
                    offset = 0;
7675
0
                } else {
7676
0
                    frag_tvb = tvb;
7677
0
                }
7678
7679
0
                open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
7680
0
                trans_id_key = ((uint64_t)open_count << 32) | trans_id;
7681
0
                if (!PINFO_FD_VISITED(pinfo)) {
7682
0
                    p_trans_id_key = wmem_new(wmem_file_scope(), uint64_t);
7683
0
                    *p_trans_id_key = trans_id_key;
7684
0
                    mbim_info = wmem_new(wmem_file_scope(), struct mbim_info);
7685
0
                    mbim_info->req_frame = pinfo->num;
7686
0
                    mbim_info->resp_frame = 0;
7687
0
                    wmem_map_insert(mbim_conv->trans, p_trans_id_key, mbim_info);
7688
0
                } else {
7689
0
                    mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
7690
0
                    if (mbim_info && mbim_info->resp_frame) {
7691
0
                        proto_item *resp_it;
7692
7693
0
                        resp_it = proto_tree_add_uint(header_tree, hf_mbim_response_in, tvb, 0, 0, mbim_info->resp_frame);
7694
0
                        proto_item_set_generated(resp_it);
7695
0
                    }
7696
0
                }
7697
7698
0
                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);
7699
0
                cid = mbim_dissect_cid(frag_tvb, pinfo, mbim_tree, &offset, uuid_idx, uuid_ext_info);
7700
0
                proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_command_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &cmd_type);
7701
0
                if (mbim_info) {
7702
0
                    mbim_info->cmd_type = cmd_type;
7703
0
                }
7704
0
                col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(cmd_type, mbim_command_type_vals, "Unknown"));
7705
0
                offset += 4;
7706
0
                proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_info_buffer_len, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &info_buff_len);
7707
0
                offset += 4;
7708
0
                subtree = mbim_tree;
7709
0
                if (info_buff_len) {
7710
0
                    subtree = proto_tree_add_subtree(mbim_tree, frag_tvb, offset, info_buff_len, ett_mbim_info_buffer, NULL, "Information Buffer");
7711
0
                }
7712
0
                switch (uuid_idx) {
7713
0
                    case UUID_BASIC_CONNECT:
7714
0
                        switch (cid) {
7715
0
                            case MBIM_CID_DEVICE_CAPS:
7716
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7717
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7718
0
                                } else if (info_buff_len) {
7719
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7720
0
                                }
7721
0
                                break;
7722
0
                            case MBIM_CID_SUBSCRIBER_READY_STATUS:
7723
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7724
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7725
0
                                } else if (info_buff_len) {
7726
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7727
0
                                        proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7728
0
                                    } else {
7729
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7730
0
                                    }
7731
0
                                }
7732
0
                                break;
7733
0
                            case MBIM_CID_RADIO_STATE:
7734
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7735
0
                                    proto_tree_add_item(subtree, hf_mbim_radio_state_set, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7736
0
                                } else if (info_buff_len) {
7737
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7738
0
                                }
7739
0
                                break;
7740
0
                            case MBIM_CID_PIN:
7741
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7742
0
                                    mbim_dissect_set_pin(frag_tvb, pinfo, subtree, offset);
7743
0
                                } else if (info_buff_len) {
7744
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7745
0
                                }
7746
0
                                break;
7747
0
                            case MBIM_CID_PIN_LIST:
7748
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7749
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7750
0
                                } else if (info_buff_len) {
7751
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7752
0
                                }
7753
0
                                break;
7754
0
                            case MBIM_CID_HOME_PROVIDER:
7755
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7756
0
                                    mbim_dissect_provider(frag_tvb, pinfo, subtree, offset);
7757
0
                                } else if (info_buff_len) {
7758
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7759
0
                                }
7760
0
                                break;
7761
0
                            case MBIM_CID_PREFERRED_PROVIDERS:
7762
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7763
0
                                    mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
7764
0
                                } else if (info_buff_len) {
7765
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7766
0
                                }
7767
0
                                break;
7768
0
                            case MBIM_CID_VISIBLE_PROVIDERS:
7769
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7770
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7771
0
                                } else {
7772
0
                                    proto_tree_add_item(subtree, hf_mbim_visible_providers_req_action, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7773
0
                                }
7774
0
                                break;
7775
0
                            case MBIM_CID_REGISTER_STATE:
7776
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7777
0
                                    mbim_dissect_set_register_state(frag_tvb, pinfo, subtree, offset);
7778
0
                                } else if (info_buff_len) {
7779
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7780
0
                                }
7781
0
                                break;
7782
0
                            case MBIM_CID_PACKET_SERVICE:
7783
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7784
0
                                    proto_tree_add_item(subtree, hf_mbim_set_packet_service_action,
7785
0
                                                        frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7786
0
                                } else if (info_buff_len) {
7787
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7788
0
                                }
7789
0
                                break;
7790
0
                            case MBIM_CID_SIGNAL_STATE:
7791
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7792
0
                                    mbim_dissect_set_signal_state(frag_tvb, pinfo, subtree, offset);
7793
0
                                } else if (info_buff_len) {
7794
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7795
0
                                }
7796
0
                                break;
7797
0
                            case MBIM_CID_CONNECT:
7798
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7799
0
                                    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7800
0
                                        mbim_dissect_set_connect_v3_and_higher(frag_tvb, pinfo, subtree, offset, info_buff_len, mbim_conv);
7801
0
                                    } else {
7802
0
                                        mbim_dissect_set_connect(frag_tvb, pinfo, subtree, offset);
7803
0
                                    }
7804
0
                                } else {
7805
0
                                    proto_tree_add_item(subtree, hf_mbim_connect_info_session_id, frag_tvb,
7806
0
                                                        offset, 4, ENC_LITTLE_ENDIAN);
7807
0
                                }
7808
0
                                break;
7809
0
                            case MBIM_CID_PROVISIONED_CONTEXTS:
7810
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7811
0
                                    mbim_dissect_context(frag_tvb, pinfo, subtree, offset, true);
7812
0
                                } else if (info_buff_len) {
7813
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7814
0
                                }
7815
0
                                break;
7816
0
                            case MBIM_CID_SERVICE_ACTIVATION:
7817
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7818
0
                                    proto_tree_add_item(subtree, hf_mbim_set_service_activation_data_buffer,
7819
0
                                                        frag_tvb, offset, info_buff_len, ENC_NA);
7820
0
                                } else {
7821
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7822
0
                                }
7823
0
                                break;
7824
0
                            case MBIM_CID_IP_CONFIGURATION:
7825
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7826
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7827
0
                                } else {
7828
0
                                    proto_tree_add_item(subtree, hf_mbim_ip_configuration_info_session_id, frag_tvb,
7829
0
                                                        offset, 4, ENC_LITTLE_ENDIAN);
7830
0
                                }
7831
0
                                break;
7832
0
                            case MBIM_CID_DEVICE_SERVICES:
7833
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7834
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7835
0
                                } else if (info_buff_len) {
7836
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7837
0
                                }
7838
0
                                break;
7839
0
                            case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST:
7840
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7841
0
                                    mbim_dissect_device_service_subscribe_list(frag_tvb, pinfo, subtree, offset);
7842
0
                                } else {
7843
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7844
0
                                }
7845
0
                                break;
7846
0
                            case MBIM_CID_PACKET_STATISTICS:
7847
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7848
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7849
0
                                } else if (info_buff_len) {
7850
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7851
0
                                }
7852
0
                                break;
7853
0
                            case MBIM_CID_NETWORK_IDLE_HINT:
7854
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7855
0
                                    proto_tree_add_item(subtree, hf_mbim_network_idle_hint_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7856
0
                                } else if (info_buff_len) {
7857
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7858
0
                                }
7859
0
                                break;
7860
0
                            case MBIM_CID_EMERGENCY_MODE:
7861
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7862
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7863
0
                                } else if (info_buff_len) {
7864
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7865
0
                                }
7866
0
                                break;
7867
0
                            case MBIM_CID_IP_PACKET_FILTERS:
7868
0
                                mbim_dissect_packet_filters(frag_tvb, pinfo, subtree, offset, mbim_conv);
7869
0
                                break;
7870
0
                            case MBIM_CID_MULTICARRIER_PROVIDERS:
7871
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7872
0
                                    mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
7873
0
                                } else if (info_buff_len) {
7874
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7875
0
                                }
7876
0
                                break;
7877
0
                            default:
7878
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7879
0
                                break;
7880
0
                        }
7881
0
                        break;
7882
0
                    case UUID_SMS:
7883
0
                        switch (cid) {
7884
0
                            case MBIM_CID_SMS_CONFIGURATION:
7885
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7886
0
                                    mbim_dissect_set_sms_configuration(frag_tvb, pinfo, subtree, offset);
7887
0
                                } else if (info_buff_len) {
7888
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7889
0
                                }
7890
0
                                break;
7891
0
                            case MBIM_CID_SMS_READ:
7892
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7893
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7894
0
                                } else {
7895
0
                                    mbim_dissect_sms_read_req(frag_tvb, pinfo, subtree, offset);
7896
0
                                }
7897
0
                                break;
7898
0
                            case MBIM_CID_SMS_SEND:
7899
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7900
0
                                    mbim_dissect_set_sms_send(frag_tvb, pinfo, subtree, offset, mbim_conv);
7901
0
                                } else {
7902
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7903
0
                                }
7904
0
                                break;
7905
0
                            case MBIM_CID_SMS_DELETE:
7906
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7907
0
                                    proto_tree_add_item(subtree, hf_mbim_set_sms_delete_flag,
7908
0
                                                        frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7909
0
                                    offset += 4;
7910
0
                                    proto_tree_add_item(subtree, hf_mbim_set_sms_delete_message_index,
7911
0
                                                        frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7912
0
                                } else {
7913
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7914
0
                                }
7915
0
                                break;
7916
0
                            case MBIM_CID_SMS_MESSAGE_STORE_STATUS:
7917
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7918
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7919
0
                                } else if (info_buff_len) {
7920
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7921
0
                                }
7922
0
                                break;
7923
0
                            default:
7924
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7925
0
                                break;
7926
0
                        }
7927
0
                        break;
7928
0
                    case UUID_USSD:
7929
0
                        switch (cid) {
7930
0
                            case MBIM_CID_USSD:
7931
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7932
0
                                    mbim_dissect_set_ussd(frag_tvb, pinfo, subtree, offset);
7933
0
                                } else {
7934
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7935
0
                                }
7936
0
                                break;
7937
0
                            default:
7938
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7939
0
                                break;
7940
0
                        }
7941
0
                        break;
7942
0
                    case UUID_PHONEBOOK:
7943
0
                        switch (cid) {
7944
0
                            case MBIM_CID_PHONEBOOK_CONFIGURATION:
7945
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7946
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7947
0
                                } else if (info_buff_len) {
7948
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7949
0
                                }
7950
0
                                break;
7951
0
                            case MBIM_CID_PHONEBOOK_READ:
7952
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7953
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7954
0
                                } else {
7955
0
                                    proto_tree_add_item(subtree, hf_mbim_phonebook_read_req_filter_flag, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7956
0
                                    offset += 4;
7957
0
                                    proto_tree_add_item(subtree, hf_mbim_phonebook_read_req_filter_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7958
0
                                }
7959
0
                                break;
7960
0
                            case MBIM_CID_PHONEBOOK_DELETE:
7961
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7962
0
                                    proto_tree_add_item(subtree, hf_mbim_set_phonebook_delete_filter_flag, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7963
0
                                    offset += 4;
7964
0
                                    proto_tree_add_item(subtree, hf_mbim_set_phonebook_delete_filter_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7965
0
                                } else {
7966
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7967
0
                                }
7968
0
                                break;
7969
0
                            case MBIM_CID_PHONEBOOK_WRITE:
7970
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7971
0
                                    mbim_dissect_set_phonebook_write(frag_tvb, pinfo, subtree, offset);
7972
0
                                } else {
7973
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7974
0
                                }
7975
0
                                break;
7976
0
                            default:
7977
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7978
0
                                break;
7979
0
                        }
7980
0
                        break;
7981
0
                    case UUID_STK:
7982
0
                        switch (cid) {
7983
0
                            case MBIM_CID_STK_PAC:
7984
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7985
0
                                    mbim_dissect_set_stk_pac(frag_tvb, pinfo, subtree, offset);
7986
0
                                } else {
7987
0
                                    if (info_buff_len) {
7988
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7989
0
                                    }
7990
0
                                }
7991
0
                                break;
7992
0
                            case MBIM_CID_STK_TERMINAL_RESPONSE:
7993
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7994
0
                                    mbim_dissect_set_stk_terminal_response(frag_tvb, pinfo, subtree, offset);
7995
0
                                } else {
7996
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
7997
0
                                }
7998
0
                                break;
7999
0
                            case MBIM_CID_STK_ENVELOPE:
8000
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8001
0
                                    tvbuff_t *env_tvb;
8002
0
                                    proto_tree *env_tree;
8003
8004
0
                                    ti = proto_tree_add_item(subtree, hf_mbim_set_stk_envelope_data_buffer,
8005
0
                                                             frag_tvb, offset, info_buff_len, ENC_NA);
8006
0
                                    if (bertlv_handle) {
8007
0
                                        env_tree = proto_item_add_subtree(ti, ett_mbim_buffer);
8008
0
                                        env_tvb = tvb_new_subset_length(frag_tvb, offset, info_buff_len);
8009
0
                                        call_dissector(bertlv_handle, env_tvb, pinfo, env_tree);
8010
0
                                    }
8011
0
                                } else if (info_buff_len) {
8012
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8013
0
                                }
8014
0
                                break;
8015
0
                            default:
8016
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8017
0
                                break;
8018
0
                        }
8019
0
                        break;
8020
0
                    case UUID_AUTH:
8021
0
                        switch (cid) {
8022
0
                            case MBIM_CID_AKA_AUTH:
8023
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8024
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8025
0
                                } else {
8026
0
                                    mbim_dissect_aka_auth_req(frag_tvb, pinfo, subtree, offset);
8027
0
                                }
8028
0
                                break;
8029
0
                            case MBIM_CID_AKAP_AUTH:
8030
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8031
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8032
0
                                } else {
8033
0
                                    mbim_dissect_akap_auth_req(frag_tvb, pinfo, subtree, offset);
8034
0
                                }
8035
0
                                break;
8036
0
                            case MBIM_CID_SIM_AUTH:
8037
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8038
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8039
0
                                } else {
8040
0
                                    mbim_dissect_sim_auth_req(frag_tvb, pinfo, subtree, offset);
8041
0
                                }
8042
0
                                break;
8043
0
                            default:
8044
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8045
0
                                break;
8046
0
                        }
8047
0
                        break;
8048
0
                    case UUID_DSS:
8049
0
                        switch (cid) {
8050
0
                            case MBIM_CID_DSS_CONNECT:
8051
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8052
0
                                    mbim_dissect_set_dss_connect(frag_tvb, pinfo, subtree, offset);
8053
0
                                } else {
8054
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8055
0
                                }
8056
0
                                break;
8057
0
                            default:
8058
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8059
0
                                break;
8060
0
                        }
8061
0
                        break;
8062
0
                    case UUID_MULTICARRIER:
8063
0
                        switch (cid) {
8064
0
                            case MBIM_CID_MULTICARRIER_CAPABILITIES:
8065
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8066
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8067
0
                                } else if (info_buff_len) {
8068
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8069
0
                                }
8070
0
                                break;
8071
0
                            case MBIM_CID_LOCATION_INFO:
8072
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8073
0
                                    proto_tree_add_item(subtree, hf_mbim_location_info_country, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8074
0
                                } else if (info_buff_len) {
8075
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8076
0
                                }
8077
0
                                break;
8078
0
                            case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST:
8079
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8080
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
8081
0
                                } else {
8082
0
                                    mbim_dissect_muticarrier_current_cid_list_req(frag_tvb, pinfo, subtree, offset);
8083
0
                                }
8084
0
                                break;
8085
0
                            default:
8086
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8087
0
                                break;
8088
0
                        }
8089
0
                        break;
8090
0
                    case UUID_MS_HOSTSHUTDOWN:
8091
0
                        switch (cid) {
8092
0
                            case MBIM_CID_MS_HOSTSHUTDOWN:
8093
0
                            case MBIM_CID_MS_HOSTPRESHUTDOWN:
8094
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8095
0
                                    if (info_buff_len) {
8096
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8097
0
                                    }
8098
0
                                } else {
8099
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8100
0
                                }
8101
0
                                break;
8102
0
                            default:
8103
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8104
0
                                break;
8105
0
                        }
8106
0
                        break;
8107
0
                    case UUID_MSFWID:
8108
0
                        switch (cid) {
8109
0
                            case MBIM_CID_MSFWID_FIRMWAREID:
8110
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8111
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8112
0
                                } else if (info_buff_len) {
8113
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8114
0
                                }
8115
0
                                break;
8116
0
                            default:
8117
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8118
0
                                break;
8119
0
                        }
8120
0
                        break;
8121
0
                    case UUID_QMI:
8122
0
                        switch (cid) {
8123
0
                            case MBIM_CID_QMI_QMI:
8124
0
                                if (info_buff_len) {
8125
0
                                    proto_tree_add_item(subtree, hf_mbim_qmi_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8126
0
                                }
8127
0
                                break;
8128
0
                            default:
8129
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8130
0
                                break;
8131
0
                        }
8132
0
                        break;
8133
0
                    case UUID_INTEL_FWUSVC:
8134
0
                        switch (cid) {
8135
0
                            case MBIM_CID_INTC_MODEM_REBOOT:
8136
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8137
0
                                    if (info_buff_len) {
8138
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8139
0
                                    }
8140
0
                                } else {
8141
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8142
0
                                }
8143
0
                                break;
8144
0
                            default:
8145
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8146
0
                                break;
8147
0
                        }
8148
0
                        break;
8149
0
                    case UUID_INTEL_DPTF:
8150
0
                        switch (cid) {
8151
0
                            case MBIM_CID_INTC_THERMAL_STATE:
8152
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8153
0
                                    mbim_dissect_thermal_config(frag_tvb, pinfo, subtree, offset);
8154
0
                                } else {
8155
0
                                    proto_tree_add_item(subtree, hf_mbim_query_thermal_state_temp_sensor_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8156
0
                                }
8157
0
                                break;
8158
0
                            default:
8159
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8160
0
                                break;
8161
0
                        }
8162
0
                        break;
8163
0
                    case UUID_INTEL_SAR:
8164
0
                        switch (cid) {
8165
0
                            case MBIM_CID_INTC_SAR_CONFIG:
8166
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8167
0
                                    mbim_dissect_sar_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
8168
0
                                } else if (info_buff_len) {
8169
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8170
0
                                }
8171
0
                                break;
8172
0
                            default:
8173
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8174
0
                                break;
8175
0
                        }
8176
0
                        break;
8177
0
                    case UUID_INTEL_ACT:
8178
0
                        switch (cid) {
8179
0
                            case MBIM_CID_INTC_ADPCLK_MODE:
8180
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8181
0
                                    proto_tree_add_item(subtree, hf_mbim_adpclk_activate_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8182
0
                                } else if (info_buff_len) {
8183
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8184
0
                                }
8185
0
                                break;
8186
0
                            default:
8187
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8188
0
                                break;
8189
0
                        }
8190
0
                        break;
8191
0
                    case UUID_INTEL_TRCSVC:
8192
0
                        switch (cid) {
8193
0
                            case MBIM_CID_INTC_TRACE:
8194
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8195
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8196
0
                                } else if (info_buff_len) {
8197
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8198
0
                                }
8199
0
                                break;
8200
0
                            case MBIM_CID_INTC_TRACE_DATA:
8201
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8202
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8203
0
                                } else if (info_buff_len) {
8204
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8205
0
                                }
8206
0
                                break;
8207
0
                            default:
8208
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8209
0
                                break;
8210
0
                        }
8211
0
                        break;
8212
0
                    case UUID_INTEL_NRTC:
8213
0
                        switch (cid) {
8214
0
                            case MBIM_CID_INTC_NRTAPP:
8215
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8216
0
                                    proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_period, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
8217
0
                                    offset += 2;
8218
0
                                    proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_duration, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
8219
0
                                } else if (info_buff_len) {
8220
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8221
0
                                }
8222
0
                                break;
8223
0
                            case MBIM_CID_INTC_NRTCWS:
8224
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8225
0
                                    mbim_dissect_nrtcws_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
8226
0
                                } else if (info_buff_len) {
8227
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8228
0
                                }
8229
0
                                break;
8230
0
                            default:
8231
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8232
0
                                break;
8233
0
                        }
8234
0
                        break;
8235
0
                    case UUID_INTEL_USB_PROFILE:
8236
0
                        switch (cid) {
8237
0
                            case MBIM_CID_INTC_USBPROFILE:
8238
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8239
0
                                    uint32_t at_len;
8240
8241
0
                                    proto_tree_add_item_ret_uint(subtree, hf_mbim_usbprofile_cmd_length, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &at_len);
8242
0
                                    offset += 4;
8243
0
                                    proto_tree_add_item(subtree, hf_mbim_usbprofile_cmd_buffer, frag_tvb, offset, at_len, ENC_LITTLE_ENDIAN|ENC_UTF_16);
8244
0
                                } else {
8245
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8246
0
                                }
8247
0
                                break;
8248
0
                            default:
8249
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8250
0
                                break;
8251
0
                        }
8252
0
                        break;
8253
0
                    case UUID_INTEL_CIQ:
8254
0
                        switch (cid) {
8255
0
                            case MBIM_CID_INTC_CIQ:
8256
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8257
0
                                    uint32_t size;
8258
8259
0
                                    proto_tree_add_item(subtree, hf_mbim_ciq_set_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8260
0
                                    offset += 4;
8261
0
                                    proto_tree_add_item_ret_uint(subtree, hf_mbim_ciq_set_debug_info_size, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &size);
8262
0
                                    offset += 4;
8263
0
                                    proto_tree_add_item(subtree, hf_mbim_ciq_set_debug_info, frag_tvb, offset, size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
8264
0
                                } else if (info_buff_len) {
8265
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8266
0
                                }
8267
0
                                break;
8268
0
                            default:
8269
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8270
0
                                break;
8271
0
                        }
8272
0
                        break;
8273
0
                    case UUID_ATDS:
8274
0
                        switch (cid) {
8275
0
                            case MBIM_CID_ATDS_SIGNAL:
8276
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8277
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8278
0
                                } else if (info_buff_len) {
8279
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8280
0
                                }
8281
0
                                break;
8282
0
                            case MBIM_CID_ATDS_LOCATION:
8283
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8284
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8285
0
                                } else if (info_buff_len) {
8286
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8287
0
                                }
8288
0
                                break;
8289
0
                            case MBIM_CID_ATDS_OPERATORS:
8290
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8291
0
                                    mbim_dissect_atds_operators(frag_tvb, pinfo, subtree, offset);
8292
0
                                } else if (info_buff_len) {
8293
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8294
0
                                }
8295
0
                                break;
8296
0
                            case MBIM_CID_ATDS_RAT:
8297
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8298
0
                                    proto_tree_add_item(subtree, hf_mbim_atds_rat_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8299
0
                                } else if (info_buff_len) {
8300
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8301
0
                                }
8302
0
                                break;
8303
0
                            case MBIM_CID_ATDS_REGISTER_STATE:
8304
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8305
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8306
0
                                } else if (info_buff_len) {
8307
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8308
0
                                }
8309
0
                                break;
8310
0
                            case MBIM_CID_ATDS_SET_PROJECTION_TABLES:
8311
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8312
0
                                    mbim_dissect_atds_projection_tables(frag_tvb, pinfo, subtree, offset);
8313
0
                                } else if (info_buff_len) {
8314
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8315
0
                                }
8316
0
                                break;
8317
0
                            default:
8318
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8319
0
                                break;
8320
0
                        }
8321
0
                        break;
8322
0
                    case UUID_MULTIFLOW:
8323
0
                        switch (cid) {
8324
0
                            case MBIM_CID_MULTIFLOW_CAPS:
8325
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8326
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8327
0
                                } else if (info_buff_len) {
8328
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8329
0
                                }
8330
0
                                break;
8331
0
                            case MBIM_CID_MULTIFLOW_UPLINK:
8332
0
                            case MBIM_CID_MULTIFLOW_DOWNLINK:
8333
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8334
0
                                    proto_tree_add_item(subtree, hf_mbim_set_multiflow_state_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8335
0
                                } else if (info_buff_len) {
8336
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8337
0
                                }
8338
0
                                break;
8339
0
                            case MBIM_CID_MULTIFLOW_TFT:
8340
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8341
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8342
0
                                } else if (info_buff_len) {
8343
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8344
0
                                }
8345
0
                                break;
8346
0
                            default:
8347
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8348
0
                                break;
8349
0
                        }
8350
0
                        break;
8351
0
                    case UUID_BASIC_CONNECT_EXTENSIONS:
8352
0
                        switch (cid) {
8353
0
                            case MBIM_CID_MS_PROVISIONED_CONTEXT_V2:
8354
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8355
0
                                    mbim_dissect_set_ms_provisioned_context_v2(frag_tvb, pinfo, subtree, offset, mbim_conv);
8356
0
                                } else if (info_buff_len) {
8357
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8358
0
                                }
8359
0
                                break;
8360
0
                            case MBIM_CID_MS_NETWORK_BLACKLIST:
8361
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8362
0
                                    mbim_dissect_ms_network_blacklist_info(pinfo, frag_tvb, subtree, offset);
8363
0
                                } else if (info_buff_len) {
8364
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8365
0
                                }
8366
0
                                break;
8367
0
                            case MBIM_CID_MS_LTE_ATTACH_CONFIG:
8368
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8369
0
                                    mbim_dissect_set_lte_attach_config(frag_tvb, pinfo, subtree, offset);
8370
0
                                }
8371
0
                                else if (info_buff_len) {
8372
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8373
0
                                }
8374
0
                                break;
8375
0
                            case MBIM_CID_MS_LTE_ATTACH_STATUS:
8376
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8377
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8378
0
                                }
8379
0
                                else if (info_buff_len) {
8380
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8381
0
                                }
8382
0
                                break;
8383
0
                            case MBIM_CID_MS_SYS_CAPS:
8384
0
                            case MBIM_CID_MS_DEVICE_CAPS_V2:
8385
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8386
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8387
0
                                } else if (info_buff_len) {
8388
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8389
0
                                }
8390
0
                                break;
8391
0
                            case MBIM_CID_MS_DEVICE_SLOT_MAPPINGS:
8392
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8393
0
                                    mbim_dissect_ms_device_slot_mapping_info(frag_tvb, pinfo, subtree, offset);
8394
0
                                } else if (info_buff_len) {
8395
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8396
0
                                }
8397
0
                                break;
8398
0
                            case MBIM_CID_MS_SLOT_INFO_STATUS:
8399
0
                                if (cmd_type == MBIM_COMMAND_QUERY) {
8400
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_slot_info_req_slot_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8401
0
                                } else {
8402
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8403
0
                                }
8404
0
                                break;
8405
0
                            case MBIM_CID_PCO:
8406
0
                                if (info_buff_len) {
8407
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8408
0
                                }
8409
0
                                break;
8410
0
                            case MBIM_CID_MS_DEVICE_RESET:
8411
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8412
0
                                    if (info_buff_len) {
8413
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8414
0
                                    }
8415
0
                                } else {
8416
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8417
0
                                }
8418
0
                                break;
8419
0
                            case MBIM_CID_BASE_STATIONS_INFO:
8420
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8421
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8422
0
                                } else if (info_buff_len) {
8423
0
                                    mbim_dissect_base_station_info_req(frag_tvb, subtree, offset, mbim_conv);
8424
0
                                }
8425
0
                                break;
8426
0
                            case MBIM_CID_LOCATION_INFO_STATUS:
8427
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8428
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8429
0
                                } else if (info_buff_len) {
8430
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8431
0
                                }
8432
0
                                break;
8433
0
                            case MBIM_CID_MS_PIN_INFO_EX2:
8434
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8435
0
                                break;
8436
0
                            case MBIM_CID_VERSION:
8437
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8438
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8439
0
                                } else if (info_buff_len) {
8440
0
                                    mbim_dissect_version(frag_tvb, subtree, offset, mbim_conv);
8441
0
                                }
8442
0
                                break;
8443
0
                            case MBIM_CID_MS_MODEM_CONFIG:
8444
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8445
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8446
0
                                } else if (info_buff_len) {
8447
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8448
0
                                }
8449
0
                                break;
8450
0
                            case MBIM_CID_MS_REGISTRATION_PARAMS:
8451
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8452
0
                                    mbim_dissect_ms_registration_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
8453
0
                                }
8454
0
                                else if (info_buff_len) {
8455
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8456
0
                                }
8457
0
                                break;
8458
0
                            case MBIM_CID_MS_NETWORK_PARAMS:
8459
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8460
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8461
0
                                }
8462
0
                                else if (info_buff_len) {
8463
0
                                    mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
8464
0
                                }
8465
0
                                break;
8466
0
                            case MBIM_CID_MS_WAKE_REASON:
8467
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8468
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8469
0
                                } else if (info_buff_len) {
8470
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8471
0
                                }
8472
0
                                break;
8473
0
                            case MBIM_CID_MS_UE_POLICY:
8474
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8475
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8476
0
                                }
8477
0
                                else if (info_buff_len) {
8478
0
                                    mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
8479
0
                                }
8480
0
                                break;
8481
0
                            default:
8482
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8483
0
                                break;
8484
0
                        }
8485
0
                        break;
8486
0
                    case UUID_MS_SARCONTROL:
8487
0
                        switch (cid) {
8488
0
                            case MBIM_CID_MS_SAR_CONFIG:
8489
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8490
0
                                    mbim_dissect_ms_sar_config(frag_tvb, pinfo, subtree, offset, false);
8491
0
                                }
8492
0
                                else if (info_buff_len) {
8493
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8494
0
                                }
8495
0
                                break;
8496
0
                            case MBIM_CID_MS_TRANSMISSION_STATUS:
8497
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8498
0
                                    mbim_dissect_ms_transmission_status(frag_tvb, subtree, offset, false);
8499
0
                                }
8500
0
                                else if (info_buff_len) {
8501
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8502
0
                                }
8503
0
                                break;
8504
0
                            default:
8505
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8506
0
                                break;
8507
0
                        }
8508
0
                        break;
8509
0
                    case UUID_MS_UICC_LOW_LEVEL:
8510
0
                        switch (cid) {
8511
0
                            case MBIM_CID_MS_UICC_ATR:
8512
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8513
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8514
0
                                } else if (info_buff_len) {
8515
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8516
0
                                        proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8517
0
                                    } else {
8518
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8519
0
                                    }
8520
0
                                }
8521
0
                                break;
8522
0
                            case MBIM_CID_MS_UICC_OPEN_CHANNEL:
8523
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8524
0
                                    mbim_dissect_ms_open_channel(frag_tvb, subtree, offset, mbim_conv);
8525
0
                                } else {
8526
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8527
0
                                }
8528
0
                                break;
8529
0
                            case MBIM_CID_MS_UICC_CLOSE_CHANNEL:
8530
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8531
0
                                    mbim_dissect_ms_close_channel(frag_tvb, subtree, offset, mbim_conv);
8532
0
                                } else {
8533
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8534
0
                                }
8535
0
                                break;
8536
0
                            case MBIM_CID_MS_UICC_APDU:
8537
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8538
0
                                    mbim_dissect_ms_apdu(frag_tvb, pinfo, subtree, offset, mbim_conv);
8539
0
                                } else {
8540
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8541
0
                                }
8542
0
                                break;
8543
0
                            case MBIM_CID_MS_UICC_TERMINAL_CAPABILITY:
8544
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8545
0
                                    mbim_dissect_ms_set_terminal_capability(frag_tvb, pinfo, subtree, offset, mbim_conv);
8546
0
                                } else if (info_buff_len) {
8547
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8548
0
                                        proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8549
0
                                    } else {
8550
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8551
0
                                    }
8552
0
                                }
8553
0
                                break;
8554
0
                            case MBIM_CID_MS_UICC_RESET:
8555
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8556
0
                                    mbim_dissect_ms_set_reset(frag_tvb, subtree, offset, mbim_conv);
8557
0
                                } else if (info_buff_len) {
8558
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8559
0
                                        mbim_dissect_ms_query_reset(frag_tvb, subtree, offset);
8560
0
                                    } else {
8561
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8562
0
                                    }
8563
0
                                }
8564
0
                                break;
8565
0
                            case MBIM_CID_MS_UICC_APP_LIST:
8566
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8567
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8568
0
                                } else if (info_buff_len) {
8569
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8570
0
                                }
8571
0
                                break;
8572
0
                            case MBIM_CID_MS_UICC_ACCESS_BINARY:
8573
0
                                mbim_dissect_ms_access_binary(frag_tvb, pinfo, subtree, offset);
8574
0
                                break;
8575
0
                            case MBIM_CID_MS_UICC_ACCESS_RECORD:
8576
0
                                mbim_dissect_ms_access_record(frag_tvb, pinfo, subtree, offset);
8577
0
                                break;
8578
0
                            case MBIM_CID_MS_UICC_FILE_STATUS:
8579
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8580
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8581
0
                                } else if (info_buff_len) {
8582
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8583
0
                                } else {
8584
0
                                    mbim_dissect_ms_file_path(frag_tvb, pinfo, subtree, offset);
8585
0
                                }
8586
0
                                break;
8587
0
                            default:
8588
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8589
0
                                break;
8590
0
                        }
8591
0
                        break;
8592
0
                    case UUID_MS_VOICE_EXTENSIONS:
8593
0
                        switch (cid) {
8594
0
                        case MBIM_CID_MS_VOICE_EXTENSIONS_NITZ:
8595
0
                            if (cmd_type == MBIM_COMMAND_SET) {
8596
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8597
0
                            }
8598
0
                            else if (info_buff_len) {
8599
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8600
0
                            }
8601
0
                            break;
8602
0
                        default:
8603
0
                            proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8604
0
                            break;
8605
0
                        }
8606
0
                        break;
8607
0
                    case UUID_EXT_IDX:
8608
0
                        {
8609
0
                            int cid_idx;
8610
0
                            mbim_dissect_fct dissect_cid;
8611
8612
0
                            try_val_to_str_idx(cid, uuid_ext_info->uuid_cid_list, &cid_idx);
8613
0
                            if (cid_idx != -1) {
8614
0
                                dissect_cid = (cmd_type == MBIM_COMMAND_SET) ? uuid_ext_info->uuid_fct_list[cid_idx].cmd_set :
8615
0
                                    uuid_ext_info->uuid_fct_list[cid_idx].cmd_query;
8616
0
                                if (dissect_cid) {
8617
0
                                    dissect_cid(frag_tvb, pinfo, subtree, offset, mbim_info);
8618
0
                                } else if (info_buff_len) {
8619
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8620
0
                                }
8621
0
                            } else {
8622
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8623
0
                            }
8624
0
                        }
8625
0
                        break;
8626
0
                    default:
8627
0
                        if (info_buff_len) {
8628
0
                            proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8629
0
                        }
8630
0
                        break;
8631
0
                }
8632
0
            }
8633
0
            break;
8634
0
        case MBIM_FUNCTION_ERROR_MSG:
8635
0
            open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
8636
0
            trans_id_key = ((uint64_t)open_count << 32) | trans_id;
8637
0
            mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
8638
0
            if (!PINFO_FD_VISITED(pinfo)) {
8639
0
                if (mbim_info) {
8640
0
                    mbim_info->resp_frame = pinfo->num;
8641
0
                }
8642
0
            } else {
8643
0
                if (mbim_info && mbim_info->req_frame) {
8644
0
                    proto_item *req_it;
8645
8646
0
                    req_it = proto_tree_add_uint(header_tree, hf_mbim_request_in, tvb, 0, 0, mbim_info->req_frame);
8647
0
                    proto_item_set_generated(req_it);
8648
0
                }
8649
0
            }
8650
            /* FALLTHROUGH */
8651
0
        case MBIM_HOST_ERROR_MSG:
8652
0
            proto_tree_add_item(mbim_tree, hf_mbim_error_status_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8653
0
            break;
8654
0
        case MBIM_OPEN_DONE:
8655
0
        case MBIM_CLOSE_DONE:
8656
0
            proto_tree_add_item(mbim_tree, hf_mbim_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8657
0
            break;
8658
0
        case MBIM_COMMAND_DONE:
8659
0
        case MBIM_INDICATE_STATUS_MSG:
8660
0
            {
8661
0
                uint32_t info_buff_len, current_frag, total_frag, cid;
8662
0
                uint8_t uuid_idx;
8663
0
                fragment_head *frag_data;
8664
0
                tvbuff_t *frag_tvb;
8665
0
                struct mbim_uuid_ext *uuid_ext_info = NULL;
8666
8667
0
                subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 8, ett_mbim_frag_header, NULL, "Fragment Header");
8668
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_total, tvb, offset, 4, ENC_LITTLE_ENDIAN, &total_frag);
8669
0
                offset += 4;
8670
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_current, tvb, offset, 4, ENC_LITTLE_ENDIAN, &current_frag);
8671
0
                offset += 4;
8672
0
                if (total_frag > 1) {
8673
0
                    frag_data = fragment_add_seq_check(&mbim_reassembly_table, tvb, offset, pinfo,
8674
0
                                                       trans_id, mbim_conv, current_frag,
8675
0
                                                       tvb_reported_length_remaining(tvb, offset),
8676
0
                                                       (current_frag != (total_frag-1)));
8677
0
                    frag_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled MBIM control message",
8678
0
                                                        frag_data, &mbim_frag_items, NULL, subtree);
8679
0
                    if (!frag_tvb) {
8680
                        /* Fragmentation reassembly not performed yet */
8681
0
                        proto_tree_add_item(mbim_tree, hf_mbim_fragmented_payload, tvb, offset, -1, ENC_NA);
8682
0
                        col_append_fstr(pinfo->cinfo, COL_INFO, ": [Fragment #%u out of %u]", current_frag+1, total_frag);
8683
0
                        break;
8684
0
                    }
8685
0
                    offset = 0;
8686
0
                } else {
8687
0
                    frag_tvb = tvb;
8688
0
                }
8689
8690
0
                if (msg_type == MBIM_COMMAND_DONE) {
8691
0
                    open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
8692
0
                    trans_id_key = ((uint64_t)open_count << 32) | trans_id;
8693
0
                    mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
8694
0
                    if (!PINFO_FD_VISITED(pinfo)) {
8695
0
                        if (mbim_info) {
8696
0
                            mbim_info->resp_frame = pinfo->num;
8697
0
                        }
8698
0
                    } else {
8699
0
                        if (mbim_info && mbim_info->req_frame) {
8700
0
                            proto_item *req_it;
8701
8702
0
                            req_it = proto_tree_add_uint(header_tree, hf_mbim_request_in, tvb, 0, 0, mbim_info->req_frame);
8703
0
                            proto_item_set_generated(req_it);
8704
0
                        }
8705
0
                    }
8706
0
                }
8707
8708
0
                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);
8709
0
                cid = mbim_dissect_cid(frag_tvb, pinfo, mbim_tree, &offset, uuid_idx, uuid_ext_info);
8710
0
                if (msg_type == MBIM_COMMAND_DONE) {
8711
0
                    proto_tree_add_item(mbim_tree, hf_mbim_status, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8712
0
                    offset += 4;
8713
0
                }
8714
0
                proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_info_buffer_len, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &info_buff_len);
8715
0
                offset += 4;
8716
0
                if (info_buff_len == 0) {
8717
0
                    break;
8718
0
                }
8719
0
                subtree = proto_tree_add_subtree(mbim_tree, frag_tvb, offset, info_buff_len, ett_mbim_info_buffer, NULL, "Information Buffer");
8720
0
                switch (uuid_idx) {
8721
0
                    case UUID_BASIC_CONNECT:
8722
0
                        switch (cid) {
8723
0
                            case MBIM_CID_DEVICE_CAPS:
8724
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8725
0
                                    mbim_dissect_device_caps_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8726
0
                                } else {
8727
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8728
0
                                }
8729
0
                                break;
8730
0
                            case MBIM_CID_SUBSCRIBER_READY_STATUS:
8731
0
                                mbim_dissect_subscriber_ready_status(frag_tvb, pinfo, subtree, offset, mbim_conv);
8732
0
                                break;
8733
0
                            case MBIM_CID_RADIO_STATE:
8734
0
                                proto_tree_add_item(subtree, hf_mbim_radio_state_hw_radio_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8735
0
                                offset += 4;
8736
0
                                proto_tree_add_item(subtree, hf_mbim_radio_state_sw_radio_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8737
0
                                break;
8738
0
                            case MBIM_CID_PIN:
8739
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8740
0
                                    uint32_t attempts;
8741
8742
0
                                    proto_tree_add_item(subtree, hf_mbim_pin_info_pin_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8743
0
                                    offset += 4;
8744
0
                                    proto_tree_add_item(subtree, hf_mbim_pin_info_pin_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8745
0
                                    offset += 4;
8746
0
                                    attempts = tvb_get_letohl(frag_tvb, offset);
8747
0
                                    if (attempts == 0xffffffff) {
8748
0
                                        proto_tree_add_uint_format(subtree, hf_mbim_pin_info_remaining_attempts, frag_tvb, offset, 4,
8749
0
                                                                   attempts, "Not supported (0xffffffff)");
8750
0
                                    } else {
8751
0
                                        proto_tree_add_uint(subtree, hf_mbim_pin_info_remaining_attempts, frag_tvb, offset, 4, attempts);
8752
0
                                    }
8753
0
                                } else {
8754
0
                                     proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8755
0
                                }
8756
0
                                break;
8757
0
                            case MBIM_CID_PIN_LIST:
8758
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8759
0
                                    mbim_dissect_pin_list_info(frag_tvb, pinfo, subtree, offset);
8760
0
                                } else {
8761
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8762
0
                                }
8763
0
                                break;
8764
0
                            case MBIM_CID_HOME_PROVIDER:
8765
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8766
0
                                    mbim_dissect_provider(frag_tvb, pinfo, subtree, offset);
8767
0
                                } else {
8768
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8769
0
                                }
8770
0
                                break;
8771
0
                            case MBIM_CID_PREFERRED_PROVIDERS:
8772
0
                                mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8773
0
                                break;
8774
0
                            case MBIM_CID_VISIBLE_PROVIDERS:
8775
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8776
0
                                    mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8777
0
                                } else {
8778
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8779
0
                                }
8780
0
                                break;
8781
0
                            case MBIM_CID_REGISTER_STATE:
8782
0
                                mbim_dissect_registration_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8783
0
                                break;
8784
0
                            case MBIM_CID_PACKET_SERVICE:
8785
0
                                mbim_dissect_packet_service_info(frag_tvb, pinfo, subtree, offset, mbim_conv, info_buff_len);
8786
0
                                break;
8787
0
                            case MBIM_CID_SIGNAL_STATE:
8788
0
                                mbim_dissect_signal_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8789
0
                                break;
8790
0
                            case MBIM_CID_CONNECT:
8791
0
                                mbim_dissect_connect_info(frag_tvb, pinfo, subtree, offset, mbim_conv, info_buff_len);
8792
0
                                break;
8793
0
                            case MBIM_CID_PROVISIONED_CONTEXTS:
8794
0
                                mbim_dissect_provisioned_contexts_info(frag_tvb, pinfo, subtree, offset);
8795
0
                                break;
8796
0
                            case MBIM_CID_SERVICE_ACTIVATION:
8797
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8798
0
                                    uint32_t nw_error;
8799
8800
0
                                    nw_error = tvb_get_letohl(frag_tvb, offset);
8801
0
                                    if (nw_error == 0) {
8802
0
                                        proto_tree_add_uint_format_value(subtree, hf_mbim_service_activation_info_nw_error,
8803
0
                                                                         frag_tvb, offset, 4, nw_error, "Success (0)");
8804
0
                                    } else {
8805
0
                                        proto_tree_add_uint(subtree, hf_mbim_service_activation_info_nw_error,
8806
0
                                                            frag_tvb, offset, 4, nw_error);
8807
0
                                    }
8808
0
                                    proto_tree_add_item(subtree, hf_mbim_service_activation_info_data_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8809
0
                                } else {
8810
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8811
0
                                }
8812
0
                                break;
8813
0
                            case MBIM_CID_IP_CONFIGURATION:
8814
0
                                mbim_dissect_ip_configuration_info(frag_tvb, pinfo, subtree, offset);
8815
0
                                break;
8816
0
                            case MBIM_CID_DEVICE_SERVICES:
8817
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8818
0
                                    mbim_dissect_device_services_info(frag_tvb, pinfo, subtree, offset);
8819
0
                                } else {
8820
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8821
0
                                }
8822
0
                                break;
8823
0
                            case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST:
8824
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8825
0
                                    mbim_dissect_device_service_subscribe_list(frag_tvb, pinfo, subtree, offset);
8826
0
                                } else {
8827
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8828
0
                                }
8829
0
                                break;
8830
0
                            case MBIM_CID_PACKET_STATISTICS:
8831
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8832
0
                                    mbim_dissect_packet_statistics_info(frag_tvb, pinfo, subtree, offset);
8833
0
                                } else {
8834
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8835
0
                                }
8836
0
                                break;
8837
0
                            case MBIM_CID_NETWORK_IDLE_HINT:
8838
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8839
0
                                    proto_tree_add_item(subtree, hf_mbim_network_idle_hint_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8840
0
                                } else {
8841
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8842
0
                                }
8843
0
                                break;
8844
0
                            case MBIM_CID_EMERGENCY_MODE:
8845
0
                                proto_tree_add_item(subtree, hf_mbim_emergency_mode_info_emergency_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8846
0
                                break;
8847
0
                            case MBIM_CID_IP_PACKET_FILTERS:
8848
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8849
0
                                    mbim_dissect_packet_filters(frag_tvb, pinfo, subtree, offset, mbim_conv);
8850
0
                                } else {
8851
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8852
0
                                }
8853
0
                                break;
8854
0
                            case MBIM_CID_MULTICARRIER_PROVIDERS:
8855
0
                                mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8856
0
                                break;
8857
0
                            default:
8858
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8859
0
                                break;
8860
0
                        }
8861
0
                        break;
8862
0
                    case UUID_SMS:
8863
0
                        switch (cid) {
8864
0
                            case MBIM_CID_SMS_CONFIGURATION:
8865
0
                                mbim_dissect_sms_configuration_info(frag_tvb, pinfo, subtree, offset);
8866
0
                                break;
8867
0
                            case MBIM_CID_SMS_READ:
8868
0
                                mbim_dissect_sms_read_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8869
0
                                break;
8870
0
                            case MBIM_CID_SMS_SEND:
8871
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8872
0
                                    proto_tree_add_item(subtree, hf_mbim_sms_send_info_message_reference, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8873
0
                                } else {
8874
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8875
0
                                }
8876
0
                                break;
8877
0
                            case MBIM_CID_SMS_DELETE:
8878
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8879
0
                                    if (info_buff_len) {
8880
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8881
0
                                    }
8882
0
                                } else {
8883
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8884
0
                                }
8885
0
                                break;
8886
0
                            case MBIM_CID_SMS_MESSAGE_STORE_STATUS:
8887
0
                                proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_sms_status_info_flags, ett_mbim_bitmap,
8888
0
                                                       mbim_sms_status_info_flags_fields, ENC_LITTLE_ENDIAN);
8889
0
                                offset += 4;
8890
0
                                proto_tree_add_item(subtree, hf_mbim_sms_status_info_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8891
0
                                break;
8892
0
                            default:
8893
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8894
0
                                break;
8895
0
                        }
8896
0
                        break;
8897
0
                    case UUID_USSD:
8898
0
                        switch (cid) {
8899
0
                            case MBIM_CID_USSD:
8900
0
                                mbim_dissect_ussd_info(frag_tvb, pinfo, subtree, offset);
8901
0
                                break;
8902
0
                            default:
8903
0
                               proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8904
0
                                break;
8905
0
                        }
8906
0
                        break;
8907
0
                    case UUID_PHONEBOOK:
8908
0
                        switch (cid) {
8909
0
                            case MBIM_CID_PHONEBOOK_CONFIGURATION:
8910
0
                                mbim_dissect_phonebook_configuration_info(frag_tvb, pinfo, subtree, offset);
8911
0
                                break;
8912
0
                            case MBIM_CID_PHONEBOOK_READ:
8913
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8914
0
                                    mbim_dissect_phonebook_read_info(frag_tvb, pinfo, subtree, offset);
8915
0
                                } else {
8916
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8917
0
                                }
8918
0
                                break;
8919
0
                            case MBIM_CID_PHONEBOOK_DELETE:
8920
0
                            case MBIM_CID_PHONEBOOK_WRITE:
8921
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8922
0
                                    if (info_buff_len) {
8923
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8924
0
                                    }
8925
0
                                } else {
8926
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8927
0
                                }
8928
0
                                break;
8929
0
                            default:
8930
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8931
0
                                break;
8932
0
                        }
8933
0
                        break;
8934
0
                    case UUID_STK:
8935
0
                        switch (cid) {
8936
0
                            case MBIM_CID_STK_PAC:
8937
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8938
0
                                    mbim_dissect_stk_pac_info(frag_tvb, pinfo, subtree, offset);
8939
0
                                } else {
8940
0
                                    tvbuff_t *pac_tvb;
8941
0
                                    int pac_length;
8942
0
                                    proto_tree *pac_tree;
8943
8944
0
                                    proto_tree_add_item(subtree, hf_mbim_stk_pac_pac_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8945
0
                                    offset += 4;
8946
0
                                    pac_length = info_buff_len - 4;
8947
0
                                    ti = proto_tree_add_item(subtree, hf_mbim_stk_pac_pac, frag_tvb, offset, pac_length, ENC_NA);
8948
0
                                    if (bertlv_handle) {
8949
0
                                        pac_tree = proto_item_add_subtree(ti, ett_mbim_buffer);
8950
0
                                        pac_tvb = tvb_new_subset_length(frag_tvb, offset, pac_length);
8951
0
                                        call_dissector(bertlv_handle, pac_tvb, pinfo, pac_tree);
8952
0
                                    }
8953
0
                                }
8954
0
                                break;
8955
0
                            case MBIM_CID_STK_TERMINAL_RESPONSE:
8956
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8957
0
                                    mbim_dissect_stk_terminal_response_info(frag_tvb, pinfo, subtree, offset);
8958
0
                                } else {
8959
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8960
0
                                }
8961
0
                                break;
8962
0
                            case MBIM_CID_STK_ENVELOPE:
8963
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8964
0
                                    proto_tree_add_item(subtree, hf_mbim_stk_envelope_info_envelope_support,
8965
0
                                                        frag_tvb, offset, 32, ENC_NA);
8966
0
                                } else {
8967
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8968
0
                                }
8969
0
                                break;
8970
0
                            default:
8971
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8972
0
                                break;
8973
0
                        }
8974
0
                        break;
8975
0
                    case UUID_AUTH:
8976
0
                        switch (cid) {
8977
0
                            case MBIM_CID_AKA_AUTH:
8978
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8979
0
                                    mbim_dissect_aka_auth_info(frag_tvb, pinfo, subtree, offset);
8980
0
                                } else {
8981
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8982
0
                                }
8983
0
                                break;
8984
0
                            case MBIM_CID_AKAP_AUTH:
8985
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8986
0
                                    mbim_dissect_akap_auth_info(frag_tvb, pinfo, subtree, offset);
8987
0
                                } else {
8988
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8989
0
                                }
8990
0
                                break;
8991
0
                            case MBIM_CID_SIM_AUTH:
8992
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8993
0
                                    mbim_dissect_sim_auth_info(frag_tvb, pinfo, subtree, offset);
8994
0
                                } else {
8995
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
8996
0
                                }
8997
0
                                break;
8998
0
                            default:
8999
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9000
0
                                break;
9001
0
                        }
9002
0
                        break;
9003
0
                    case UUID_DSS:
9004
0
                        switch (cid) {
9005
0
                            case MBIM_CID_DSS_CONNECT:
9006
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9007
0
                                    if (info_buff_len) {
9008
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9009
0
                                    }
9010
0
                                } else {
9011
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9012
0
                                }
9013
0
                                break;
9014
0
                            default:
9015
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9016
0
                                break;
9017
0
                        }
9018
0
                        break;
9019
0
                    case UUID_MULTICARRIER:
9020
0
                        switch (cid) {
9021
0
                            case MBIM_CID_MULTICARRIER_CAPABILITIES:
9022
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9023
0
                                    proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_multicarrier_capabilities_info_capabilities,
9024
0
                                                           ett_mbim_bitmap, mbim_multicarrier_capabilities_fields, ENC_LITTLE_ENDIAN);
9025
0
                                } else {
9026
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9027
0
                                }
9028
0
                                break;
9029
0
                            case MBIM_CID_LOCATION_INFO:
9030
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9031
0
                                    proto_tree_add_item(subtree, hf_mbim_location_info_country, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9032
0
                                } else if (info_buff_len) {
9033
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9034
0
                                }
9035
0
                                break;
9036
0
                            case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST:
9037
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9038
0
                                    mbim_dissect_muticarrier_current_cid_list_info(frag_tvb, pinfo, subtree, offset);
9039
0
                                } else {
9040
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9041
0
                                }
9042
0
                                break;
9043
0
                            default:
9044
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9045
0
                                break;
9046
0
                        }
9047
0
                        break;
9048
0
                    case UUID_MS_HOSTSHUTDOWN:
9049
0
                        switch (cid) {
9050
0
                            case MBIM_CID_MS_HOSTSHUTDOWN:
9051
0
                            case MBIM_CID_MS_HOSTPRESHUTDOWN:
9052
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9053
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) {
9054
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9055
0
                                    } else if (info_buff_len) {
9056
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9057
0
                                    }
9058
0
                                } else {
9059
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9060
0
                                }
9061
0
                                break;
9062
0
                            default:
9063
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9064
0
                                break;
9065
0
                        }
9066
0
                        break;
9067
0
                    case UUID_MSFWID:
9068
0
                        switch (cid) {
9069
0
                            case MBIM_CID_MSFWID_FIRMWAREID:
9070
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9071
0
                                    proto_tree_add_item(subtree, hf_mbim_msfwid_firmwareid_info_firmware_id, frag_tvb, offset, 16, ENC_NA);
9072
0
                                } else if (info_buff_len) {
9073
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9074
0
                                }
9075
0
                                break;
9076
0
                            default:
9077
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9078
0
                                break;
9079
0
                        }
9080
0
                        break;
9081
0
                    case UUID_QMI:
9082
0
                        switch (cid) {
9083
0
                            case MBIM_CID_QMI_QMI:
9084
0
                                if (info_buff_len) {
9085
0
                                    proto_tree_add_item(subtree, hf_mbim_qmi_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9086
0
                                }
9087
0
                                break;
9088
0
                            default:
9089
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9090
0
                                break;
9091
0
                        }
9092
0
                        break;
9093
0
                    case UUID_INTEL_FWUSVC:
9094
0
                        switch (cid) {
9095
0
                            case MBIM_CID_INTC_MODEM_REBOOT:
9096
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9097
0
                                    if (info_buff_len) {
9098
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9099
0
                                    }
9100
0
                                } else {
9101
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9102
0
                                }
9103
0
                                break;
9104
0
                            default:
9105
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9106
0
                                break;
9107
0
                        }
9108
0
                        break;
9109
0
                    case UUID_INTEL_DPTF:
9110
0
                        switch (cid) {
9111
0
                            case MBIM_CID_INTC_THERMAL_STATE:
9112
0
                                if ((msg_type == MBIM_COMMAND_DONE) && mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9113
0
                                    mbim_dissect_thermal_config(frag_tvb, pinfo, subtree, offset);
9114
0
                                } else {
9115
0
                                    mbim_dissect_thermal_state_info(frag_tvb, pinfo, subtree, offset);
9116
0
                                }
9117
0
                                break;
9118
0
                            default:
9119
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9120
0
                                break;
9121
0
                        }
9122
0
                        break;
9123
0
                    case UUID_INTEL_SAR:
9124
0
                        switch (cid) {
9125
0
                            case MBIM_CID_INTC_SAR_CONFIG:
9126
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9127
0
                                    mbim_dissect_sar_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
9128
0
                                } else {
9129
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9130
0
                                }
9131
0
                                break;
9132
0
                            default:
9133
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9134
0
                                break;
9135
0
                        }
9136
0
                        break;
9137
0
                    case UUID_INTEL_ACT:
9138
0
                        switch (cid) {
9139
0
                            case MBIM_CID_INTC_ADPCLK_MODE:
9140
0
                                if ((msg_type == MBIM_COMMAND_DONE) && info_buff_len &&
9141
0
                                    mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9142
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9143
0
                                } else {
9144
0
                                    mbim_dissect_adpclk_freq_info(frag_tvb, pinfo, subtree, offset);
9145
0
                                }
9146
0
                                break;
9147
0
                            default:
9148
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9149
0
                                break;
9150
0
                        }
9151
0
                        break;
9152
0
                    case UUID_INTEL_TRCSVC:
9153
0
                        switch (cid) {
9154
0
                            case MBIM_CID_INTC_TRACE:
9155
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9156
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9157
0
                                } else {
9158
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9159
0
                                }
9160
0
                                break;
9161
0
                            case MBIM_CID_INTC_TRACE_DATA:
9162
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9163
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9164
0
                                } else {
9165
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9166
0
                                }
9167
0
                                break;
9168
0
                            default:
9169
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9170
0
                                break;
9171
0
                        }
9172
0
                        break;
9173
0
                    case UUID_INTEL_NRTC:
9174
0
                        switch (cid) {
9175
0
                            case MBIM_CID_INTC_NRTAPP:
9176
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9177
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9178
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9179
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9180
0
                                        proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_period, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
9181
0
                                        offset += 2;
9182
0
                                        proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_duration, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
9183
0
                                    }
9184
0
                                } else {
9185
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9186
0
                                }
9187
0
                                break;
9188
0
                            case MBIM_CID_INTC_NRTCWS:
9189
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9190
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9191
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9192
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9193
0
                                        mbim_dissect_nrtcws_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
9194
0
                                    }
9195
0
                                } else {
9196
0
                                    mbim_dissect_nrtcws_info(frag_tvb, pinfo, subtree, offset);
9197
0
                                }
9198
0
                                break;
9199
0
                            default:
9200
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9201
0
                                break;
9202
0
                        }
9203
0
                        break;
9204
0
                    case UUID_INTEL_USB_PROFILE:
9205
0
                        switch (cid) {
9206
0
                            case MBIM_CID_INTC_USBPROFILE:
9207
0
                                if ((msg_type == MBIM_COMMAND_DONE) && ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) || info_buff_len)) {
9208
0
                                    uint32_t at_len;
9209
9210
0
                                    proto_tree_add_item_ret_uint(subtree, hf_mbim_usbprofile_rsp_length, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &at_len);
9211
0
                                    offset += 4;
9212
0
                                    proto_tree_add_item(subtree, hf_mbim_usbprofile_rsp_buffer, frag_tvb, offset, at_len, ENC_LITTLE_ENDIAN|ENC_UTF_16);
9213
0
                                } else {
9214
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9215
0
                                }
9216
0
                                break;
9217
0
                            default:
9218
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9219
0
                                break;
9220
0
                        }
9221
0
                        break;
9222
0
                    case UUID_INTEL_CIQ:
9223
0
                        switch (cid) {
9224
0
                            case MBIM_CID_INTC_CIQ:
9225
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9226
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9227
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9228
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9229
0
                                        proto_tree_add_item(subtree, hf_mbim_ciq_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9230
0
                                    }
9231
0
                                } else {
9232
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9233
0
                                }
9234
0
                                break;
9235
0
                            default:
9236
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9237
0
                                break;
9238
0
                        }
9239
0
                        break;
9240
0
                    case UUID_ATDS:
9241
0
                        switch (cid) {
9242
0
                            case MBIM_CID_ATDS_SIGNAL:
9243
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9244
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9245
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9246
0
                                    } else {
9247
0
                                        mbim_dissect_atds_signal_info(frag_tvb, pinfo, subtree, offset);
9248
0
                                    }
9249
0
                                } else {
9250
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9251
0
                                }
9252
0
                                break;
9253
0
                            case MBIM_CID_ATDS_LOCATION:
9254
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9255
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9256
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9257
0
                                    } else {
9258
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_location_info_lac, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9259
0
                                        offset += 4;
9260
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_location_info_tac, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9261
0
                                        offset += 4;
9262
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_location_info_cellid, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9263
0
                                    }
9264
0
                                } else {
9265
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9266
0
                                }
9267
0
                                break;
9268
0
                            case MBIM_CID_ATDS_OPERATORS:
9269
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9270
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9271
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9272
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9273
0
                                        mbim_dissect_atds_operators(frag_tvb, pinfo, subtree, offset);
9274
0
                                    }
9275
0
                                } else {
9276
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9277
0
                                }
9278
0
                                break;
9279
0
                            case MBIM_CID_ATDS_RAT:
9280
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9281
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9282
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9283
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9284
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_rat_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9285
0
                                    }
9286
0
                                } else {
9287
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9288
0
                                }
9289
0
                                break;
9290
0
                            case MBIM_CID_ATDS_REGISTER_STATE:
9291
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9292
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9293
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9294
0
                                    } else {
9295
0
                                        mbim_dissect_registration_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9296
0
                                    }
9297
0
                                } else {
9298
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9299
0
                                }
9300
0
                                break;
9301
0
                            case MBIM_CID_ATDS_SET_PROJECTION_TABLES:
9302
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9303
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9304
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9305
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9306
0
                                        mbim_dissect_atds_projection_tables(frag_tvb, pinfo, subtree, offset);
9307
0
                                    }
9308
0
                                } else {
9309
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9310
0
                                }
9311
0
                                break;
9312
0
                            default:
9313
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9314
0
                                break;
9315
0
                        }
9316
0
                        break;
9317
0
                    case UUID_MULTIFLOW:
9318
0
                        switch (cid) {
9319
0
                            case MBIM_CID_MULTIFLOW_CAPS:
9320
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9321
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9322
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9323
0
                                    } else {
9324
0
                                        proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_multiflow_caps_info_control_caps,
9325
0
                                                               ett_mbim_bitmap, mbim_multiflow_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
9326
0
                                    }
9327
0
                                } else {
9328
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
9329
0
                                }
9330
0
                                break;
9331
0
                            case MBIM_CID_MULTIFLOW_UPLINK:
9332
0
                            case MBIM_CID_MULTIFLOW_DOWNLINK:
9333
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9334
0
                                    proto_tree_add_item(subtree, hf_mbim_multiflow_state_info_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9335
0
                                } else {
9336
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
9337
0
                                }
9338
0
                                break;
9339
0
                            case MBIM_CID_MULTIFLOW_TFT:
9340
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9341
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9342
0
                                } else {
9343
0
                                    mbim_dissect_multiflow_tft_info(frag_tvb, pinfo, subtree, offset);
9344
0
                                }
9345
0
                                break;
9346
0
                            default:
9347
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9348
0
                                break;
9349
0
                        }
9350
0
                        break;
9351
0
                    case UUID_BASIC_CONNECT_EXTENSIONS:
9352
0
                        switch (cid) {
9353
0
                            case MBIM_CID_MS_PROVISIONED_CONTEXT_V2:
9354
0
                                mbim_dissect_ms_provisioned_context_info_v2(frag_tvb, pinfo, subtree, offset, mbim_conv);
9355
0
                                break;
9356
0
                            case MBIM_CID_MS_NETWORK_BLACKLIST:
9357
0
                                mbim_dissect_ms_network_blacklist_info(pinfo, frag_tvb, subtree, offset);
9358
0
                                break;
9359
0
                            case MBIM_CID_MS_LTE_ATTACH_CONFIG:
9360
0
                                mbim_dissect_lte_attach_config_info(frag_tvb, pinfo, subtree, offset);
9361
0
                                break;
9362
0
                            case MBIM_CID_MS_LTE_ATTACH_STATUS:
9363
0
                                mbim_dissect_lte_attach_status(frag_tvb, pinfo, subtree, offset, mbim_conv);
9364
0
                                break;
9365
0
                            case MBIM_CID_MS_SYS_CAPS:
9366
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9367
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9368
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9369
0
                                    } else {
9370
0
                                        mbim_dissect_sys_caps_info(frag_tvb, subtree, offset);
9371
0
                                    }
9372
0
                                } else {
9373
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9374
0
                                }
9375
0
                                break;
9376
0
                            case MBIM_CID_MS_DEVICE_CAPS_V2:
9377
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9378
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9379
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9380
0
                                    } else {
9381
0
                                        if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
9382
0
                                            mbim_dissect_device_caps_v3_and_higher_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9383
0
                                        } else {
9384
0
                                            mbim_dissect_device_caps_v2_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9385
0
                                        }
9386
0
                                    }
9387
0
                                } else {
9388
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9389
0
                                }
9390
0
                                break;
9391
0
                            case MBIM_CID_MS_DEVICE_SLOT_MAPPINGS:
9392
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9393
0
                                    mbim_dissect_ms_device_slot_mapping_info(frag_tvb, pinfo, subtree, offset);
9394
0
                                } else {
9395
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9396
0
                                }
9397
0
                                break;
9398
0
                            case MBIM_CID_MS_SLOT_INFO_STATUS:
9399
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9400
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9401
0
                                } else {
9402
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_slot_info_slot_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9403
0
                                    offset += 4;
9404
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_slot_info_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9405
0
                                }
9406
0
                                break;
9407
0
                            case MBIM_CID_PCO:
9408
0
                                proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9409
0
                                break;
9410
0
                            case MBIM_CID_MS_DEVICE_RESET:
9411
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9412
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) {
9413
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9414
0
                                    } else if (info_buff_len) {
9415
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9416
0
                                    }
9417
0
                                } else {
9418
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9419
0
                                }
9420
0
                                break;
9421
0
                            case MBIM_CID_BASE_STATIONS_INFO:
9422
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9423
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9424
0
                                } else {
9425
0
                                    mbim_dissect_base_station_info(frag_tvb, subtree, offset, mbim_conv);
9426
0
                                }
9427
0
                                break;
9428
0
                            case MBIM_CID_LOCATION_INFO_STATUS:
9429
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9430
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9431
0
                                } else {
9432
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9433
0
                                }
9434
0
                                break;
9435
0
                            case MBIM_CID_MS_PIN_INFO_EX2:
9436
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9437
0
                                break;
9438
0
                            case MBIM_CID_VERSION:
9439
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9440
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9441
0
                                }
9442
0
                                else if (info_buff_len) {
9443
0
                                    mbim_dissect_version(frag_tvb, subtree, offset, mbim_conv);
9444
0
                                }
9445
0
                                break;
9446
0
                            case MBIM_CID_MS_MODEM_CONFIG:
9447
0
                                mbim_dissect_ms_modem_config_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9448
0
                                break;
9449
0
                            case MBIM_CID_MS_REGISTRATION_PARAMS:
9450
0
                                mbim_dissect_ms_registration_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9451
0
                                break;
9452
0
                            case MBIM_CID_MS_NETWORK_PARAMS:
9453
0
                                mbim_dissect_ms_network_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9454
0
                                break;
9455
0
                            case MBIM_CID_MS_UE_POLICY:
9456
0
                                mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
9457
0
                                break;
9458
0
                            case MBIM_CID_MS_WAKE_REASON:
9459
0
                                mbim_dissect_ms_wake_reason(frag_tvb, pinfo, subtree, offset);
9460
0
                                break;
9461
0
                            default:
9462
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9463
0
                                break;
9464
0
                        }
9465
0
                        break;
9466
0
                    case UUID_MS_SARCONTROL:
9467
0
                        switch (cid) {
9468
0
                            case MBIM_CID_MS_SAR_CONFIG:
9469
0
                                mbim_dissect_ms_sar_config(frag_tvb, pinfo, subtree, offset, true);
9470
0
                                break;
9471
0
                            case MBIM_CID_MS_TRANSMISSION_STATUS:
9472
0
                                mbim_dissect_ms_transmission_status(frag_tvb, subtree, offset, true);
9473
0
                                break;
9474
0
                            default:
9475
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9476
0
                                break;
9477
0
                        }
9478
0
                        break;
9479
0
                    case UUID_MS_UICC_LOW_LEVEL:
9480
0
                        switch (cid) {
9481
0
                            case MBIM_CID_MS_UICC_ATR:
9482
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9483
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9484
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9485
0
                                    } else {
9486
0
                                        mbim_dissect_ms_atr_info(frag_tvb, pinfo, subtree, offset);
9487
0
                                    }
9488
0
                                } else {
9489
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9490
0
                                }
9491
0
                                break;
9492
0
                            case MBIM_CID_MS_UICC_OPEN_CHANNEL:
9493
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9494
0
                                    mbim_dissect_ms_open_channel_info(frag_tvb, subtree, offset);
9495
0
                                } else {
9496
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9497
0
                                }
9498
0
                                break;
9499
0
                            case MBIM_CID_MS_UICC_CLOSE_CHANNEL:
9500
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9501
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_uicc_status, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9502
0
                                } else {
9503
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9504
0
                                }
9505
0
                                break;
9506
0
                            case MBIM_CID_MS_UICC_APDU:
9507
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9508
0
                                    mbim_dissect_ms_apdu_info(frag_tvb, pinfo, subtree, offset);
9509
0
                                } else {
9510
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9511
0
                                }
9512
0
                                break;
9513
0
                            case MBIM_CID_MS_UICC_TERMINAL_CAPABILITY:
9514
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9515
0
                                    mbim_dissect_ms_terminal_capability_info(frag_tvb, pinfo, subtree, offset, offset);
9516
0
                                } else {
9517
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9518
0
                                }
9519
0
                                break;
9520
0
                            case MBIM_CID_MS_UICC_RESET:
9521
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9522
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_reset_pass_through_action, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9523
0
                                } else {
9524
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9525
0
                                }
9526
0
                                break;
9527
0
                            case MBIM_CID_MS_UICC_APP_LIST:
9528
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9529
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9530
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9531
0
                                    } else {
9532
0
                                        mbim_dissect_ms_app_list(frag_tvb, pinfo, subtree, offset);
9533
0
                                    }
9534
0
                                } else {
9535
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9536
0
                                }
9537
0
                                break;
9538
0
                            case MBIM_CID_MS_UICC_ACCESS_BINARY:
9539
0
                                mbim_dissect_ms_response(frag_tvb, pinfo, subtree, offset);
9540
0
                                break;
9541
0
                            case MBIM_CID_MS_UICC_ACCESS_RECORD:
9542
0
                                mbim_dissect_ms_response(frag_tvb, pinfo, subtree, offset);
9543
0
                                break;
9544
0
                            case MBIM_CID_MS_UICC_FILE_STATUS:
9545
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9546
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9547
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9548
0
                                    } else {
9549
0
                                        mbim_dissect_ms_file_status(frag_tvb, pinfo, subtree, offset);
9550
0
                                    }
9551
0
                                } else {
9552
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9553
0
                                }
9554
0
                                break;
9555
0
                            default:
9556
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9557
0
                                break;
9558
0
                        }
9559
0
                        break;
9560
0
                    case UUID_MS_VOICE_EXTENSIONS:
9561
0
                        switch (cid) {
9562
0
                        case MBIM_CID_MS_VOICE_EXTENSIONS_NITZ:
9563
0
                                mbim_dissect_ms_nitz(frag_tvb, pinfo, subtree, offset);
9564
0
                                break;
9565
0
                            default:
9566
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9567
0
                                break;
9568
0
                        }
9569
0
                        break;
9570
0
                    case UUID_EXT_IDX:
9571
0
                        {
9572
0
                            int cid_idx;
9573
0
                            mbim_dissect_fct dissect_cid;
9574
9575
0
                            try_val_to_str_idx(cid, uuid_ext_info->uuid_cid_list, &cid_idx);
9576
0
                            if (cid_idx != -1) {
9577
0
                                dissect_cid = (msg_type == MBIM_COMMAND_DONE) ? uuid_ext_info->uuid_fct_list[cid_idx].cmd_done :
9578
0
                                    uuid_ext_info->uuid_fct_list[cid_idx].ind_status;
9579
0
                                if (dissect_cid) {
9580
0
                                    dissect_cid(frag_tvb, pinfo, subtree, offset, mbim_info);
9581
0
                                } else if (info_buff_len) {
9582
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9583
0
                                }
9584
0
                            } else {
9585
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
9586
0
                            }
9587
0
                        }
9588
0
                        break;
9589
0
                    default:
9590
0
                        proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9591
0
                        break;
9592
0
                }
9593
0
            }
9594
0
            break;
9595
0
        default:
9596
0
            break;
9597
0
    }
9598
9599
0
    return tvb_captured_length(tvb);
9600
0
}
9601
9602
static int
9603
dissect_mbim_descriptor(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
9604
0
{
9605
0
    proto_item *ti;
9606
0
    uint8_t length, type, subtype;
9607
9608
0
    length = tvb_get_uint8(tvb, 0);
9609
0
    type = tvb_get_uint8(tvb, 1);
9610
0
    subtype = tvb_get_uint8(tvb, 2);
9611
9612
0
    if ((type != 0x24) ||
9613
0
        !(((subtype == 0x1b) && (length == 12)) || ((subtype == 0x1c) && (length == 8)))){
9614
0
        return 0;
9615
0
    }
9616
9617
0
    ti = proto_tree_add_item(tree, hf_mbim_descriptor, tvb, 0, 0, ENC_NA);
9618
0
    proto_item_set_hidden(ti);
9619
9620
0
    if (subtype == 0x1b) {
9621
0
        proto_tree_add_item(tree, hf_mbim_descriptor_version, tvb, 3, 2, ENC_LITTLE_ENDIAN);
9622
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_control_message, tvb, 5, 2, ENC_LITTLE_ENDIAN);
9623
0
        proto_tree_add_item(tree, hf_mbim_descriptor_number_filters, tvb, 7, 1, ENC_NA);
9624
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_filter_size, tvb, 8, 1, ENC_NA);
9625
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_segment_size, tvb, 9, 2, ENC_LITTLE_ENDIAN);
9626
0
        proto_tree_add_bitmask(tree, tvb, 11, hf_mbim_descriptor_network_capabilities, ett_mbim_bitmap,
9627
0
                               mbim_descriptor_network_capabilities_fields, ENC_NA);
9628
0
    } else {
9629
0
        proto_tree_add_item(tree, hf_mbim_descriptor_extended_version, tvb, 3, 2, ENC_LITTLE_ENDIAN);
9630
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_outstanding_command_messages, tvb, 5, 1, ENC_NA);
9631
0
        proto_tree_add_item(tree, hf_mbim_descriptor_mtu, tvb, 6, 2, ENC_LITTLE_ENDIAN);
9632
0
    }
9633
9634
0
    return length;
9635
0
}
9636
9637
static int
9638
dissect_mbim_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
9639
3
{
9640
3
    proto_item *ti, *sig_ti, *pi;
9641
3
    proto_tree *mbim_tree, *subtree, *sig_tree;
9642
3
    bool is_32bits;
9643
3
    uint32_t nth_sig, length, next_index, base_offset, offset, datagram_index, datagram_length,
9644
3
            nb, total = 0, ndp = 0, block_len, dss_session_id;
9645
3
    const char *signature;
9646
3
    dissector_handle_t dissector;
9647
3
    tvbuff_t *datagram_tvb;
9648
3
    const uint32_t NTH16 = 0x484D434E;
9649
3
    const uint32_t NTH32 = 0x686D636E;
9650
3
    unsigned reported_length, parsed_length, padding_length;
9651
9652
3
    if (tvb_captured_length(tvb) < 12) {
9653
2
        return 0;
9654
2
    }
9655
9656
1
    nth_sig = tvb_get_letohl(tvb, 0);
9657
1
    if (nth_sig == NTH16) {
9658
0
        is_32bits = false;
9659
1
    } else if (nth_sig == NTH32) {
9660
0
        is_32bits = true;
9661
1
    } else {
9662
1
        return 0;
9663
1
    }
9664
9665
0
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM");
9666
0
    col_clear(pinfo->cinfo, COL_INFO);
9667
9668
0
    ti = proto_tree_add_item(tree, proto_mbim, tvb, 0, -1, ENC_NA);
9669
0
    mbim_tree = proto_item_add_subtree(ti, ett_mbim);
9670
0
    ti =proto_tree_add_item(mbim_tree, hf_mbim_bulk, tvb, 0, 0, ENC_NA);
9671
0
    proto_item_set_hidden(ti);
9672
9673
0
    subtree = proto_tree_add_subtree(mbim_tree, tvb, 0, 0, ett_mbim_msg_header, NULL, "NCM Transfer Header");
9674
0
    proto_tree_add_item(subtree, hf_mbim_bulk_nth_signature, tvb, 0, 4, ENC_ASCII);
9675
0
    proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_header_length, tvb, 4, 2, ENC_LITTLE_ENDIAN, &length);
9676
0
    proto_item_set_len(ti, length);
9677
0
    proto_tree_add_item(subtree, hf_mbim_bulk_nth_sequence_number, tvb, 6, 2, ENC_LITTLE_ENDIAN);
9678
0
    if (!is_32bits) {
9679
0
        ti = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_block_length, tvb, 8, 2, ENC_LITTLE_ENDIAN, &block_len);
9680
0
        pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_ndp_index, tvb, 10, 2, ENC_LITTLE_ENDIAN, &next_index);
9681
0
    } else {
9682
0
        ti = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_block_length_32, tvb, 8, 4, ENC_LITTLE_ENDIAN, &block_len);
9683
0
        pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_ndp_index_32, tvb, 12, 4, ENC_LITTLE_ENDIAN, &next_index);
9684
0
    }
9685
0
    reported_length = tvb_reported_length(tvb);
9686
0
    if (block_len != reported_length) {
9687
0
        expert_add_info(pinfo, ti, &ei_mbim_invalid_block_len);
9688
0
    }
9689
0
    if (next_index % 4) {
9690
0
        expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error,
9691
0
                               "NDP Index is not a multiple of 4 bytes");
9692
0
        return tvb_captured_length(tvb);
9693
0
    }
9694
0
    if (next_index > reported_length) {
9695
0
        expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9696
0
        return tvb_captured_length(tvb);
9697
0
    }
9698
9699
0
    while (next_index) {
9700
0
        base_offset = offset = next_index;
9701
0
        nb = 0;
9702
0
        subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 0, ett_mbim_msg_header, NULL, "NCM Datagram Pointer");
9703
0
        signature = (const char*)tvb_get_string_enc(pinfo->pool, tvb, offset, 4, ENC_ASCII);
9704
0
        if ((!is_32bits && !strncmp(signature, "IPS", 3)) ||
9705
0
            (is_32bits && !strncmp(signature, "ips", 3))) {
9706
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9707
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9708
0
                                                      signature[1], signature[2], signature[3]);
9709
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9710
0
            proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_ips_session_id, tvb, offset+3, 1, ENC_NA);
9711
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9712
0
                                signature[2], signature[3]);
9713
0
            dissector = ip_handle;
9714
0
        } else if ((!is_32bits && !strncmp(signature, "IPC", 3)) ||
9715
0
                   (is_32bits && !strncmp(signature, "ipc", 3))) {
9716
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9717
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9718
0
                                                      signature[1], signature[2], signature[3]);
9719
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9720
0
            proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_ipc_session_id, tvb, offset+3, 1, ENC_NA);
9721
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9722
0
                                signature[2], signature[3]);
9723
0
            dissector = bulk_ndp_ctrl_handle;
9724
0
        } else if ((!is_32bits && !strncmp(signature, "DSS", 3)) ||
9725
0
                   (is_32bits && !strncmp(signature, "dss", 3))) {
9726
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9727
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9728
0
                                                      signature[1], signature[2], signature[3]);
9729
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9730
0
            proto_tree_add_item_ret_uint(sig_tree, hf_mbim_bulk_ndp_signature_dss_session_id,
9731
0
                                         tvb, offset+3, 1, ENC_LITTLE_ENDIAN, &dss_session_id);
9732
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9733
0
                                signature[2], signature[3]);
9734
0
            dissector = dissector_get_uint_handle(dss_dissector_table, dss_session_id);
9735
0
            if (dissector == NULL) {
9736
0
                dissector = data_handle;
9737
0
            }
9738
0
        } else if ((!is_32bits && !strncmp(signature, "DSC", 3)) ||
9739
0
                   (is_32bits && !strncmp(signature, "dsc", 3))) {
9740
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9741
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9742
0
                                                      signature[1], signature[2], signature[3]);
9743
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9744
0
            proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_dsc_session_id, tvb, offset+3, 1, ENC_LITTLE_ENDIAN);
9745
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9746
0
                                signature[2], signature[3]);
9747
0
            dissector = bulk_ndp_ctrl_handle;
9748
0
        } else if ((!is_32bits && !strcmp(signature, "NCM0")) ||
9749
0
                   (is_32bits && !strcmp(signature, "ncm0"))) {
9750
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4,
9751
0
                                             tvb_get_letohl(tvb, offset), "%s", signature);
9752
0
            col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, signature);
9753
0
            dissector = eth_handle;
9754
0
        } else if ((!is_32bits && !strcmp(signature, "NCM1")) ||
9755
0
                   (is_32bits && !strcmp(signature, "ncm1"))) {
9756
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4,
9757
0
                                             tvb_get_letohl(tvb, offset), "%s", signature);
9758
0
            col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, signature);
9759
0
            dissector = eth_fcs_handle;
9760
0
        } else {
9761
0
            proto_tree_add_item(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4, ENC_BIG_ENDIAN);
9762
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "0x%08X", tvb_get_ntohl(tvb, offset));
9763
0
            dissector = data_handle;
9764
0
        }
9765
0
        offset += 4;
9766
0
        pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &length);
9767
0
        if (length % (is_32bits ? 8 : 4)) {
9768
0
            expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error, "Length is not a multiple of %u bytes",
9769
0
                                   is_32bits ? 8 : 4);
9770
0
            return tvb_captured_length(tvb);
9771
0
        }
9772
0
        proto_item_set_len(ti, length);
9773
0
        offset += 2;
9774
0
        if (!is_32bits) {
9775
0
            pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_next_ndp_index, tvb,
9776
0
                                              offset, 2, ENC_LITTLE_ENDIAN, &next_index);
9777
0
            offset += 2;
9778
0
        } else {
9779
0
            proto_tree_add_item(subtree, hf_mbim_bulk_ndp_reserved, tvb,
9780
0
                                offset, 2, ENC_LITTLE_ENDIAN);
9781
0
            offset += 2;
9782
0
            pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_next_ndp_index_32,
9783
0
                                              tvb, offset, 4, ENC_LITTLE_ENDIAN, &next_index);
9784
0
            offset += 4;
9785
0
            proto_tree_add_item(subtree, hf_mbim_bulk_ndp_reserved2, tvb,
9786
0
                                offset, 4, ENC_LITTLE_ENDIAN);
9787
0
            offset += 4;
9788
0
        }
9789
0
        if (next_index % 4) {
9790
0
            expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error,
9791
0
                                   "NDP Index is not a multiple of 4 bytes");
9792
0
            return tvb_captured_length(tvb);
9793
0
        }
9794
0
        if (next_index > reported_length) {
9795
0
            expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9796
0
            return tvb_captured_length(tvb);
9797
0
        }
9798
0
        while ((offset - base_offset) < length) {
9799
0
            if (!is_32bits) {
9800
0
                pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_index, tvb,
9801
0
                                                  offset, 2, ENC_LITTLE_ENDIAN, &datagram_index);
9802
0
                offset += 2;
9803
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_length, tvb,
9804
0
                                             offset, 2, ENC_LITTLE_ENDIAN, &datagram_length);
9805
0
                offset += 2;
9806
0
            } else {
9807
0
                pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_index_32, tvb,
9808
0
                                                  offset, 4, ENC_LITTLE_ENDIAN, &datagram_index);
9809
0
                offset += 4;
9810
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_length_32, tvb,
9811
0
                                             offset, 4, ENC_LITTLE_ENDIAN, &datagram_length);
9812
0
                offset += 4;
9813
0
            }
9814
0
            if (next_index > reported_length) {
9815
0
                expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9816
0
                return tvb_captured_length(tvb);
9817
0
            }
9818
0
            if (datagram_index && datagram_length) {
9819
0
                proto_tree_add_item(subtree, hf_mbim_bulk_ndp_datagram, tvb,
9820
0
                                    datagram_index, datagram_length, ENC_NA);
9821
0
                datagram_tvb = tvb_new_subset_length(tvb, datagram_index, datagram_length);
9822
0
                if (dissector) {
9823
0
                    if (total) {
9824
0
                        col_set_str(pinfo->cinfo, COL_PROTOCOL, "/");
9825
0
                        col_set_fence(pinfo->cinfo, COL_PROTOCOL);
9826
0
                        col_set_str(pinfo->cinfo, COL_INFO, " | ");
9827
0
                        col_set_fence(pinfo->cinfo, COL_INFO);
9828
0
                    }
9829
0
                    call_dissector(dissector, datagram_tvb, pinfo, tree);
9830
0
                }
9831
0
                col_set_fence(pinfo->cinfo, COL_PROTOCOL);
9832
0
                col_set_fence(pinfo->cinfo, COL_INFO);
9833
0
                nb++;
9834
0
                if (++total > MBIM_MAX_ITEMS) {
9835
0
                    expert_add_info_format(pinfo, NULL, &ei_mbim_too_many_items,
9836
0
                                           "More than %u datagrams, dissection seems suspicious",
9837
0
                                           MBIM_MAX_ITEMS);
9838
0
                    return tvb_captured_length(tvb);
9839
0
                }
9840
0
            } else {
9841
0
                parsed_length = offset - base_offset;
9842
0
                padding_length = (parsed_length < length) ? length - parsed_length : 0;
9843
0
                if (padding_length) {
9844
0
                    proto_tree_add_item(subtree, hf_mbim_bulk_ndp_padding, tvb, offset, padding_length, ENC_NA);
9845
0
                }
9846
0
                break;
9847
0
            }
9848
0
        }
9849
0
        ti = proto_tree_add_uint(subtree, hf_mbim_bulk_ndp_nb_datagrams, tvb, 0, 0, nb);
9850
0
        proto_item_set_generated(ti);
9851
0
        if (++ndp > MBIM_MAX_ITEMS) {
9852
0
            expert_add_info_format(pinfo, NULL, &ei_mbim_too_many_items,
9853
0
                                   "More than %u NCM Datagram Pointers, dissection seems suspicious",
9854
0
                                   MBIM_MAX_ITEMS);
9855
0
            return tvb_captured_length(tvb);
9856
0
        }
9857
0
    }
9858
0
    ti = proto_tree_add_uint(mbim_tree, hf_mbim_bulk_total_nb_datagrams, tvb, 0, 0, total);
9859
0
    proto_item_set_generated(ti);
9860
9861
0
    return tvb_captured_length(tvb);
9862
0
}
9863
9864
static bool
9865
dissect_mbim_bulk_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
9866
3
{
9867
3
    urb_info_t *urb = (urb_info_t *)data;
9868
9869
3
    if ((urb == NULL) || (urb->conv == NULL) ||
9870
3
        ((urb->conv->interfaceClass != IF_CLASS_CDC_DATA) &&
9871
3
        (urb->conv->interfaceClass != IF_CLASS_UNKNOWN))) {
9872
0
        return false;
9873
0
    }
9874
9875
3
    if (dissect_mbim_bulk(tvb, pinfo, tree, urb)) {
9876
0
        return true;
9877
0
    }
9878
3
    return false;
9879
3
}
9880
9881
static int
9882
dissect_mbim_decode_as(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
9883
0
{
9884
0
    urb_info_t *urb;
9885
0
    usb_trans_info_t *usb_trans_info;
9886
9887
0
    if (!data || (tvb_reported_length(tvb) == 0)) {
9888
0
        return 0;
9889
0
    }
9890
9891
0
    urb = (urb_info_t *)data;
9892
0
    usb_trans_info = urb->usb_trans_info;
9893
9894
0
    switch (urb->transfer_type) {
9895
0
        case URB_CONTROL:
9896
0
            if (!usb_trans_info) {
9897
0
                return dissect_mbim_control(tvb, pinfo, tree, urb);
9898
0
            } else if ((usb_trans_info->setup.request == 0x00) && (pinfo->srcport == NO_ENDPOINT)) {
9899
                /* Skip Send Encapsulated Command header */
9900
0
                tvbuff_t *mbim_tvb = tvb_new_subset_remaining(tvb, 7);
9901
0
                return dissect_mbim_control(mbim_tvb, pinfo, tree, urb);
9902
0
            } else if ((usb_trans_info->setup.request == 0x01) && (pinfo->srcport != NO_ENDPOINT)) {
9903
0
                return dissect_mbim_control(tvb, pinfo, tree, urb);
9904
0
            }
9905
0
            break;
9906
0
        case URB_BULK:
9907
0
            return dissect_mbim_bulk(tvb, pinfo, tree, urb);
9908
0
        default:
9909
0
            break;
9910
0
    }
9911
0
    return 0;
9912
0
}
9913
9914
static int
9915
dissect_mbim_bulk_ndp_ctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
9916
0
{
9917
0
    proto_tree *ndp_ctrl_tree;
9918
0
    proto_item *ti;
9919
0
    int offset = 0;
9920
0
    uint32_t msg_type, msg_len;
9921
9922
0
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM NDP Control");
9923
0
    col_clear(pinfo->cinfo, COL_INFO);
9924
9925
0
    ti = proto_tree_add_protocol_format(tree, proto_mbim, tvb, 0, -1, "MBIM NDP Control");
9926
0
    ndp_ctrl_tree = proto_item_add_subtree(ti, ett_mbim_bulk_ndp_ctrl);
9927
0
    ti = proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl, tvb, offset, 0, ENC_NA);
9928
0
    proto_item_set_hidden(ti);
9929
9930
0
    proto_tree_add_item_ret_uint(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_type, tvb, offset, 2, ENC_LITTLE_ENDIAN, &msg_type);
9931
0
    offset += 2;
9932
0
    col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(msg_type, mbim_ndp_ctrl_msg_type_vals, "Unknown"));
9933
0
    proto_tree_add_item_ret_uint(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &msg_len);
9934
0
    offset += 2;
9935
9936
0
    switch (msg_type) {
9937
0
        case MBIM_NDP_CTRL_MULTIFLOW_STATUS:
9938
0
            {
9939
0
                uint32_t watermark;
9940
9941
0
                proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_status, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9942
0
                offset += 2;
9943
0
                watermark = tvb_get_letohl(tvb, offset);
9944
0
                if (watermark == 0xffffffff) {
9945
0
                    proto_tree_add_uint_format_value(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_watermark, tvb, offset, 4,
9946
0
                                                     watermark, "Not reported (0xffffffff)");
9947
0
                } else {
9948
0
                    proto_tree_add_uint_format_value(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_watermark, tvb, offset, 4,
9949
0
                                                     watermark, "%u payload bytes", watermark);
9950
0
                }
9951
0
            }
9952
0
            break;
9953
0
        default:
9954
0
            proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_payload, tvb, offset, msg_len-4, ENC_NA);
9955
0
            break;
9956
0
    }
9957
0
    return tvb_captured_length(tvb);
9958
0
}
9959
9960
static unsigned
9961
mbim_uuid_hash(const void *key)
9962
0
{
9963
0
    return wmem_strong_hash((const uint8_t *)key, 4*sizeof(uint32_t));
9964
0
}
9965
9966
static gboolean
9967
mbim_uuid_equal(const void *v1, const void *v2)
9968
0
{
9969
0
    const uint32_t *uuid1 = (const uint32_t*)v1;
9970
0
    const uint32_t *uuid2 = (const uint32_t*)v2;
9971
9972
0
    return ((uuid1[0] == uuid2[0]) &&
9973
0
            (uuid1[1] == uuid2[1]) &&
9974
0
            (uuid1[2] == uuid2[2]) &&
9975
0
            (uuid1[3] == uuid2[3]));
9976
0
}
9977
9978
void mbim_register_uuid_ext(struct mbim_uuid_ext *uuid_ext)
9979
0
{
9980
0
    uint32_t *uuid_key;
9981
9982
0
    if (!mbim_uuid_ext_hash) {
9983
0
        mbim_uuid_ext_hash = wmem_map_new(wmem_epan_scope(), mbim_uuid_hash, mbim_uuid_equal);
9984
0
    }
9985
9986
0
    uuid_key = (uint32_t *)wmem_alloc(wmem_epan_scope(), 4*sizeof(uint32_t));
9987
0
    memcpy(uuid_key, uuid_ext->uuid, 4*sizeof(uint32_t));
9988
0
    wmem_map_insert(mbim_uuid_ext_hash, uuid_key, uuid_ext);
9989
0
}
9990
9991
void
9992
proto_register_mbim(void)
9993
14
{
9994
14
    module_t *mbim_module;
9995
14
    expert_module_t* expert_mbim;
9996
9997
14
    static hf_register_info hf[] = {
9998
14
        { &hf_mbim_control,
9999
14
            { "Control", "mbim.control",
10000
14
               FT_NONE, BASE_NONE, NULL, 0,
10001
14
              NULL, HFILL }
10002
14
        },
10003
14
        { &hf_mbim_header_message_type,
10004
14
            { "Message Type", "mbim.control.header.message_type",
10005
14
               FT_UINT32, BASE_HEX, VALS(mbim_msg_type_vals), 0,
10006
14
              NULL, HFILL }
10007
14
        },
10008
14
        { &hf_mbim_header_message_length,
10009
14
            { "Message Length", "mbim.control.header.message_length",
10010
14
               FT_UINT32, BASE_DEC, NULL, 0,
10011
14
              NULL, HFILL }
10012
14
        },
10013
14
        { &hf_mbim_header_transaction_id,
10014
14
            { "Transaction Id", "mbim.control.header.transaction_id",
10015
14
               FT_UINT32, BASE_DEC, NULL, 0,
10016
14
              NULL, HFILL }
10017
14
        },
10018
14
        { &hf_mbim_fragment_total,
10019
14
            { "Total Fragments", "mbim.control.fragment.total",
10020
14
               FT_UINT32, BASE_DEC, NULL, 0,
10021
14
              NULL, HFILL }
10022
14
        },
10023
14
        { &hf_mbim_fragment_current,
10024
14
            { "Current Fragment", "mbim.control.fragment.current",
10025
14
               FT_UINT32, BASE_DEC, NULL, 0,
10026
14
              NULL, HFILL }
10027
14
        },
10028
14
        { &hf_mbim_max_ctrl_transfer,
10029
14
            { "Max Control Transfer", "mbim.control.max_control_transfer",
10030
14
               FT_UINT32, BASE_DEC, NULL, 0,
10031
14
              NULL, HFILL }
10032
14
        },
10033
14
        { &hf_mbim_device_service_id,
10034
14
            { "Device Service Id", "mbim.control.device_service_id",
10035
14
               FT_GUID, BASE_NONE, NULL, 0,
10036
14
              NULL, HFILL }
10037
14
        },
10038
14
        { &hf_mbim_uuid_basic_connect_cid,
10039
14
            { "CID", "mbim.control.cid",
10040
14
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mbim_uuid_basic_connect_cid_vals_ext, 0,
10041
14
              NULL, HFILL }
10042
14
        },
10043
14
        { &hf_mbim_uuid_sms_cid,
10044
14
            { "CID", "mbim.control.cid",
10045
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_sms_cid_vals), 0,
10046
14
              NULL, HFILL }
10047
14
        },
10048
14
        { &hf_mbim_uuid_ussd_cid,
10049
14
            { "CID", "mbim.control.cid",
10050
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ussd_cid_vals), 0,
10051
14
              NULL, HFILL }
10052
14
        },
10053
14
        { &hf_mbim_uuid_phonebook_cid,
10054
14
            { "CID", "mbim.control.cid",
10055
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_phonebook_cid_vals), 0,
10056
14
              NULL, HFILL }
10057
14
        },
10058
14
        { &hf_mbim_uuid_stk_cid,
10059
14
            { "CID", "mbim.control.cid",
10060
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_stk_cid_vals), 0,
10061
14
              NULL, HFILL }
10062
14
        },
10063
14
        { &hf_mbim_uuid_auth_cid,
10064
14
            { "CID", "mbim.control.cid",
10065
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_auth_cid_vals), 0,
10066
14
              NULL, HFILL }
10067
14
        },
10068
14
        { &hf_mbim_uuid_dss_cid,
10069
14
            { "CID", "mbim.control.cid",
10070
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_dss_cid_vals), 0,
10071
14
              NULL, HFILL }
10072
14
        },
10073
14
        { &hf_mbim_uuid_multicarrier_cid,
10074
14
            { "CID", "mbim.control.cid",
10075
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_multicarrier_cid_vals), 0,
10076
14
              NULL, HFILL }
10077
14
        },
10078
14
        { &hf_mbim_uuid_ms_hostshutdown_cid,
10079
14
            { "CID", "mbim.control.cid",
10080
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_hostshutdown_cid_vals), 0,
10081
14
              NULL, HFILL }
10082
14
        },
10083
14
        { &hf_mbim_uuid_msfwid_cid,
10084
14
            { "CID", "mbim.control.cid",
10085
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_msfwid_cid_vals), 0,
10086
14
              NULL, HFILL }
10087
14
        },
10088
14
        { &hf_mbim_uuid_qmi_cid,
10089
14
            { "CID", "mbim.control.cid",
10090
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_qmi_cid_vals), 0,
10091
14
              NULL, HFILL }
10092
14
        },
10093
14
        { &hf_mbim_uuid_intel_fwusvc_cid,
10094
14
            { "CID", "mbim.control.cid",
10095
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_fwusvc_cid_vals), 0,
10096
14
              NULL, HFILL }
10097
14
        },
10098
14
        { &hf_mbim_uuid_intel_dptf_cid,
10099
14
            { "CID", "mbim.control.cid",
10100
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_dptf_cid_vals), 0,
10101
14
              NULL, HFILL }
10102
14
        },
10103
14
        { &hf_mbim_uuid_intel_sar_cid,
10104
14
            { "CID", "mbim.control.cid",
10105
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_sar_cid_vals), 0,
10106
14
              NULL, HFILL }
10107
14
        },
10108
14
        { &hf_mbim_uuid_intel_act_cid,
10109
14
            { "CID", "mbim.control.cid",
10110
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_act_cid_vals), 0,
10111
14
              NULL, HFILL }
10112
14
        },
10113
14
        { &hf_mbim_uuid_intel_trcsvc_cid,
10114
14
            { "CID", "mbim.control.cid",
10115
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_trcsvc_cid_vals), 0,
10116
14
              NULL, HFILL }
10117
14
        },
10118
14
        { &hf_mbim_uuid_intel_nrtc_cid,
10119
14
            { "CID", "mbim.control.cid",
10120
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_nrtc_cid_vals), 0,
10121
14
              NULL, HFILL }
10122
14
        },
10123
14
        { &hf_mbim_uuid_intel_usb_profile_cid,
10124
14
            { "CID", "mbim.control.cid",
10125
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_usb_profile_cid_vals), 0,
10126
14
              NULL, HFILL }
10127
14
        },
10128
14
        { &hf_mbim_uuid_intel_ciq_cid,
10129
14
            { "CID", "mbim.control.cid",
10130
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_ciq_cid_vals), 0,
10131
14
              NULL, HFILL }
10132
14
        },
10133
14
        { &hf_mbim_uuid_atds_cid,
10134
14
            { "CID", "mbim.control.cid",
10135
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_atds_cid_vals), 0,
10136
14
              NULL, HFILL }
10137
14
        },
10138
14
        { &hf_mbim_uuid_multiflow_cid,
10139
14
            { "CID", "mbim.control.cid",
10140
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_multiflow_cid_vals), 0,
10141
14
              NULL, HFILL }
10142
14
        },
10143
14
        { &hf_mbim_uuid_basic_connect_extensions_cid,
10144
14
            { "CID", "mbim.control.cid",
10145
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_basic_connect_extensions_cid_vals), 0,
10146
14
              NULL, HFILL }
10147
14
        },
10148
14
        { &hf_mbim_uuid_ms_sarcontrol_cid,
10149
14
            { "CID", "mbim.control.cid",
10150
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_sarcontrol_cid_vals), 0,
10151
14
              NULL, HFILL }
10152
14
        },
10153
14
        { &hf_mbim_uuid_ms_uicc_low_level_cid,
10154
14
            { "CID", "mbim.control.cid",
10155
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_uicc_low_level_cid_vals), 0,
10156
14
              NULL, HFILL }
10157
14
        },
10158
14
        { &hf_mbim_uuid_ms_voice_extensions_cid,
10159
14
            { "CID", "mbim.control.cid",
10160
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_voice_extensions_cid_vals), 0,
10161
14
              NULL, HFILL }
10162
14
        },
10163
14
        { &hf_mbim_cid,
10164
14
            { "CID", "mbim.control.cid",
10165
14
               FT_UINT32, BASE_DEC, NULL, 0,
10166
14
              NULL, HFILL }
10167
14
        },
10168
14
        { &hf_mbim_command_type,
10169
14
            { "Command Type", "mbim.control.command_type",
10170
14
               FT_UINT32, BASE_DEC, VALS(mbim_command_type_vals), 0,
10171
14
              NULL, HFILL }
10172
14
        },
10173
14
        { &hf_mbim_info_buffer_len,
10174
14
            { "Information Buffer Length", "mbim.control.info_buffer_len",
10175
14
               FT_UINT32, BASE_DEC, NULL, 0,
10176
14
              NULL, HFILL }
10177
14
        },
10178
14
        { &hf_mbim_info_buffer,
10179
14
            { "Information Buffer", "mbim.control.info_buffer",
10180
14
               FT_BYTES, BASE_NONE, NULL, 0,
10181
14
              NULL, HFILL }
10182
14
        },
10183
14
        { &hf_mbim_error_status_code,
10184
14
            { "Error Status Code", "mbim.control.error_status_code",
10185
14
               FT_UINT32, BASE_DEC, VALS(mbim_error_status_code_vals), 0,
10186
14
              NULL, HFILL }
10187
14
        },
10188
14
        { &hf_mbim_status,
10189
14
            { "Status", "mbim.control.status",
10190
14
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mbim_status_code_vals_ext, 0,
10191
14
              NULL, HFILL }
10192
14
        },
10193
14
        { &hf_mbim_tlv_ie_type,
10194
14
            { "Type", "mbim.control.tlv_ie.type",
10195
14
               FT_UINT16, BASE_DEC, VALS(mbim_tlv_type_vals), 0,
10196
14
              NULL, HFILL }
10197
14
        },
10198
14
        { &hf_mbim_tlv_ie_reserved,
10199
14
            { "Reserved", "mbim.control.tlv_ie.reserved",
10200
14
               FT_UINT8, BASE_DEC, NULL, 0,
10201
14
              NULL, HFILL }
10202
14
        },
10203
14
        { &hf_mbim_tlv_ie_padding_length,
10204
14
            { "Padding Length", "mbim.control.tlv_ie.padding_length",
10205
14
               FT_UINT8, BASE_DEC, NULL, 0,
10206
14
              NULL, HFILL }
10207
14
        },
10208
14
        { &hf_mbim_tlv_ie_data_length,
10209
14
            { "Data Length", "mbim.control.tlv_ie.data_length",
10210
14
               FT_UINT32, BASE_DEC, NULL, 0,
10211
14
              NULL, HFILL }
10212
14
        },
10213
14
        { &hf_mbim_tlv_ie_unnamed_data,
10214
14
            { "Data", "mbim.control.tlv_ie.unnamed_data",
10215
14
               FT_BYTES, BASE_NONE, NULL, 0,
10216
14
              NULL, HFILL }
10217
14
        },
10218
14
        { &hf_mbim_tlv_ie_data_wchar_str,
10219
14
            { "Data", "mbim.control.tlv_ie.wchar_str_data",
10220
14
               FT_STRING, BASE_NONE, NULL, 0,
10221
14
              NULL, HFILL }
10222
14
        },
10223
14
        { &hf_mbim_tlv_ie_data_int32,
10224
14
            { "Data", "mbim.control.tlv_ie.int32_data",
10225
14
               FT_UINT32, BASE_DEC, NULL, 0,
10226
14
              NULL, HFILL }
10227
14
        },
10228
14
        { &hf_mbim_tlv_ie_data_guid,
10229
14
            { "Data", "mbim.control.tlv_ie.guid_data",
10230
14
               FT_GUID, BASE_NONE, NULL, 0,
10231
14
              NULL, HFILL }
10232
14
        },
10233
14
        { &hf_mbim_tlv_ie_padding,
10234
14
            { "Padding", "mbim.control.tlv_ie.padding",
10235
14
               FT_BYTES, BASE_NONE, NULL, 0,
10236
14
              NULL, HFILL }
10237
14
        },
10238
14
        { &hf_mbim_ms_ursp_tc_length,
10239
14
            { "Length", "mbim.control.ursp.tc_length",
10240
14
               FT_UINT16, BASE_DEC, NULL, 0,
10241
14
              NULL, HFILL }
10242
14
        },
10243
14
        { &hf_mbim_ms_ursp_precedence,
10244
14
            { "Precedence", "mbim.control.ursp.precedence",
10245
14
               FT_UINT8, BASE_DEC, NULL, 0,
10246
14
              NULL, HFILL }
10247
14
        },
10248
14
        { &hf_mbim_ms_ursp_tc_type,
10249
14
            { "Type", "mbim.control.ursp.tc_type",
10250
14
               FT_UINT8, BASE_DEC, VALS(ursp_tc_type_vals), 0,
10251
14
              NULL, HFILL }
10252
14
        },
10253
14
        { &hf_mbim_ms_ursp_tc_os_id,
10254
14
            { "Os Id", "mbim.control.ursp.tc_os_id",
10255
14
               FT_GUID, BASE_NONE, NULL, 0,
10256
14
              NULL, HFILL }
10257
14
        },
10258
14
        { &hf_mbim_ms_ursp_tc_dnn,
10259
14
            { "DNN", "mbim.control.ursp.tc_dnn",
10260
14
               FT_STRING, BASE_NONE, NULL, 0,
10261
14
              NULL, HFILL }
10262
14
        },
10263
14
        { &hf_mbim_ms_ursp_tc_fqdn,
10264
14
            { "FQDN", "mbim.control.ursp.tc_fqdn",
10265
14
               FT_STRING, BASE_NONE, NULL, 0,
10266
14
              NULL, HFILL }
10267
14
        },
10268
14
        { &hf_mbim_ms_ursp_tc_ipv4,
10269
14
            { "IPv4 Address", "mbim.control.ursp.tc_ipv4",
10270
14
               FT_IPv4, BASE_NONE, NULL, 0,
10271
14
              NULL, HFILL }
10272
14
        },
10273
14
        { &hf_mbim_ms_ursp_tc_ipv4_mask,
10274
14
            { "IPv4 Mask", "mbim.control.ursp.tc_ipv4_mask",
10275
14
               FT_IPv4, BASE_NONE, NULL, 0,
10276
14
              NULL, HFILL }
10277
14
        },
10278
14
        { &hf_mbim_ms_ursp_tc_ipv6,
10279
14
            { "IPv6 Address", "mbim.control.ursp.tc_ipv6",
10280
14
               FT_IPv6, BASE_NONE, NULL, 0,
10281
14
              NULL, HFILL }
10282
14
        },
10283
14
        { &hf_mbim_ms_ursp_tc_ipv6_prefix_length,
10284
14
            { "IPv6 Prefix Length", "mbim.control.ursp.tc_ipv6_prefix_length",
10285
14
               FT_UINT8, BASE_DEC, NULL, 0,
10286
14
              NULL, HFILL }
10287
14
        },
10288
14
        { &hf_mbim_ms_ursp_tc_proto_id,
10289
14
            { "Protocol Identifier", "mbim.control.ursp.tc_proto_id",
10290
14
               FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0,
10291
14
              NULL, HFILL }
10292
14
        },
10293
14
        { &hf_mbim_ms_ursp_tc_port,
10294
14
            { "Port", "mbim.control.ursp.tc_port",
10295
14
               FT_UINT16, BASE_DEC, NULL, 0,
10296
14
              NULL, HFILL }
10297
14
        },
10298
14
        { &hf_mbim_ms_ursp_tc_port_range_low,
10299
14
            { "Port Range Low", "mbim.control.ursp.tc_port_range_low",
10300
14
               FT_UINT16, BASE_DEC, NULL, 0,
10301
14
              NULL, HFILL }
10302
14
        },
10303
14
        { &hf_mbim_ms_ursp_tc_port_range_high,
10304
14
            { "Port Range high", "mbim.control.ursp.tc_port_range_high",
10305
14
               FT_UINT16, BASE_DEC, NULL, 0,
10306
14
              NULL, HFILL }
10307
14
        },
10308
14
        { &hf_mbim_ms_ursp_tc_app_id,
10309
14
            { "App Id", "mbim.control.ursp.tc_app_id",
10310
14
               FT_STRING, BASE_NONE, NULL, 0,
10311
14
              NULL, HFILL }
10312
14
        },
10313
14
        { &hf_mbim_ms_ursp_tc_byte_value,
10314
14
            { "Value", "mbim.control.ursp.tc_byte_value",
10315
14
               FT_BYTES, BASE_NONE, NULL, 0,
10316
14
              NULL, HFILL }
10317
14
        },
10318
14
        { &hf_mbim_ms_ursp_tc_capability,
10319
14
            { "Capability", "mbim.control.ursp.tc_capability",
10320
14
               FT_UINT8, BASE_HEX, NULL, 0,
10321
14
              NULL, HFILL }
10322
14
        },
10323
14
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_ims,
10324
14
            { "IMS", "mbim.control.ursp.tc_capability_ims",
10325
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10326
14
              NULL, HFILL }
10327
14
        },
10328
14
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_mms,
10329
14
            { "MMS", "mbim.control.ursp.tc_capability_mms",
10330
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10331
14
              NULL, HFILL }
10332
14
        },
10333
14
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_supl,
10334
14
            { "SUPL", "mbim.control.ursp.tc_capability_supl",
10335
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10336
14
              NULL, HFILL }
10337
14
        },
10338
14
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_internet,
10339
14
            { "Internet", "mbim.control.ursp.tc_capability_internet",
10340
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10341
14
              NULL, HFILL }
10342
14
        },
10343
14
        { &hf_mbim_ms_snssai_length,
10344
14
            { "Length", "mbim.control.snssai.length",
10345
14
               FT_UINT8, BASE_DEC, NULL, 0,
10346
14
              NULL, HFILL }
10347
14
        },
10348
14
        { &hf_mbim_ms_snssai_slice_service_type,
10349
14
            { "SST", "mbim.control.snssai.sst",
10350
14
               FT_UINT8, BASE_DEC, NULL, 0,
10351
14
              NULL, HFILL }
10352
14
        },
10353
14
        { &hf_mbim_ms_snssai_slice_differentiator,
10354
14
            { "SD", "mbim.control.snssai.sd",
10355
14
               FT_UINT24, BASE_DEC, NULL, 0,
10356
14
              NULL, HFILL }
10357
14
        },
10358
14
        { &hf_mbim_ms_snssai_mapped_slice_service_type,
10359
14
            { "Mapped SST", "mbim.control.snssai.mapped_sst",
10360
14
               FT_UINT8, BASE_DEC, NULL, 0,
10361
14
              NULL, HFILL }
10362
14
        },
10363
14
        { &hf_mbim_ms_snssai_mapped_slice_differentiator,
10364
14
            { "Mapped SD", "mbim.control.snssai.mapped_sd",
10365
14
               FT_UINT24, BASE_DEC, NULL, 0,
10366
14
              NULL, HFILL }
10367
14
        },
10368
14
        { &hf_mbim_ms_rej_snssai_cause,
10369
14
            { "Rejected Cause", "mbim.control.rej_snssai.cause",
10370
14
               FT_UINT8, BASE_DEC, NULL, 0,
10371
14
              NULL, HFILL }
10372
14
        },
10373
14
        { &hf_mbim_ms_pre_dflt_nssai_info_access_type,
10374
14
            { "Access Type", "mbim.control.pre_dflt_nssai_info.access_type",
10375
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_pre_dflt_nssai_info_access_type_vals), 0,
10376
14
              NULL, HFILL }
10377
14
        },
10378
14
        { &hf_mbim_device_caps_info_device_type,
10379
14
            { "Device Type", "mbim.control.device_caps_info.device_type",
10380
14
               FT_UINT32, BASE_DEC, VALS(mbim_device_caps_info_device_type_vals), 0,
10381
14
              NULL, HFILL }
10382
14
        },
10383
14
        { &hf_mbim_device_caps_info_cellular_class,
10384
14
            { "Cellular Class", "mbim.control.device_caps_info.cellular_class",
10385
14
               FT_UINT32, BASE_HEX, NULL, 0,
10386
14
              NULL, HFILL }
10387
14
        },
10388
14
        { &hf_mbim_cellular_class_gsm,
10389
14
            { "GSM", "mbim.control.cellular_class.gsm",
10390
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10391
14
              NULL, HFILL }
10392
14
        },
10393
14
        { &hf_mbim_cellular_class_cdma,
10394
14
            { "CDMA", "mbim.control.cellular_class.cdma",
10395
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10396
14
              NULL, HFILL }
10397
14
        },
10398
14
        { &hf_mbim_device_caps_info_voice_class,
10399
14
            { "Voice Class", "mbim.control.device_caps_info.voice_class",
10400
14
               FT_UINT32, BASE_DEC, VALS(mbim_device_caps_info_voice_class_vals), 0,
10401
14
              NULL, HFILL }
10402
14
        },
10403
14
        { &hf_mbim_device_caps_info_sim_class,
10404
14
            { "SIM Class", "mbim.control.device_caps_info.sim_class",
10405
14
               FT_UINT32, BASE_HEX, NULL, 0,
10406
14
              NULL, HFILL }
10407
14
        },
10408
14
        { &hf_mbim_device_caps_info_sim_class_logical,
10409
14
            { "Logical", "mbim.control.device_caps_info.sim_class.logical",
10410
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10411
14
              NULL, HFILL }
10412
14
        },
10413
14
        { &hf_mbim_device_caps_info_sim_class_removable,
10414
14
            { "Removable", "mbim.control.device_caps_info.sim_class.removable",
10415
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10416
14
              NULL, HFILL }
10417
14
        },
10418
14
        { &hf_mbim_device_caps_info_data_class,
10419
14
            { "Data Class", "mbim.control.device_caps_info.data_class",
10420
14
               FT_UINT32, BASE_HEX, NULL, 0,
10421
14
              NULL, HFILL }
10422
14
        },
10423
14
        { &hf_mbim_data_class_gprs,
10424
14
            { "GPRS", "mbim.control.data_class.gprs",
10425
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10426
14
              NULL, HFILL }
10427
14
        },
10428
14
        { &hf_mbim_data_class_edge,
10429
14
            { "EDGE", "mbim.control.data_class.edge",
10430
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10431
14
              NULL, HFILL }
10432
14
        },
10433
14
        { &hf_mbim_data_class_umts,
10434
14
            { "UMTS", "mbim.control.data_class.umts",
10435
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10436
14
              NULL, HFILL }
10437
14
        },
10438
14
        { &hf_mbim_data_class_hsdpa,
10439
14
            { "HSDPA", "mbim.control.data_class.hsdpa",
10440
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10441
14
              NULL, HFILL }
10442
14
        },
10443
14
        { &hf_mbim_data_class_hsupa,
10444
14
            { "HSUPA", "mbim.control.data_class.hsupa",
10445
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10446
14
              NULL, HFILL }
10447
14
        },
10448
14
        { &hf_mbim_data_class_lte,
10449
14
            { "LTE", "mbim.control.data_class.lte",
10450
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020,
10451
14
              NULL, HFILL }
10452
14
        },
10453
14
        { &hf_mbim_data_class_5g,
10454
14
            { "5G", "mbim.control.data_class.5g",
10455
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040,
10456
14
              NULL, HFILL }
10457
14
        },
10458
14
        { &hf_mbim_data_class_reserved_gsm,
10459
14
            { "Reserved for future GSM classes", "mbim.control.data_class.reserved_gsm",
10460
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x0000ff80,
10461
14
              NULL, HFILL }
10462
14
        },
10463
14
        { &hf_mbim_data_class_1xrtt,
10464
14
            { "1xRTT", "mbim.control.data_class.1xrtt",
10465
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00010000,
10466
14
              NULL, HFILL }
10467
14
        },
10468
14
        { &hf_mbim_data_class_1xevdo,
10469
14
            { "1xEV-DO", "mbim.control.data_class.1xevdo",
10470
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00020000,
10471
14
              NULL, HFILL }
10472
14
        },
10473
14
        { &hf_mbim_data_class_1xevdoreva,
10474
14
            { "1xEV-DO RevA", "mbim.control.data_class.1xevdoreva",
10475
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00040000,
10476
14
              NULL, HFILL }
10477
14
        },
10478
14
        { &hf_mbim_data_class_1xevdv,
10479
14
            { "1xEVDV", "mbim.control.data_class.1xevdv",
10480
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00080000,
10481
14
              NULL, HFILL }
10482
14
        },
10483
14
        { &hf_mbim_data_class_3xrtt,
10484
14
            { "3xRTT", "mbim.control.data_class.3xrtt",
10485
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00100000,
10486
14
              NULL, HFILL }
10487
14
        },
10488
14
        { &hf_mbim_data_class_1xevdorevb,
10489
14
            { "1xEV-DO RevB", "mbim.control.data_class.1xevdorevb",
10490
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00200000,
10491
14
              NULL, HFILL }
10492
14
        },
10493
14
        { &hf_mbim_data_class_umb,
10494
14
            { "UMB", "mbim.control.data_class.umb",
10495
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00400000,
10496
14
              NULL, HFILL }
10497
14
        },
10498
14
        { &hf_mbim_data_class_reserved_cdma,
10499
14
            { "Reserved for future CDMA classes", "mbim.control.data_class.reserved_cdma",
10500
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x7f800000,
10501
14
              NULL, HFILL }
10502
14
        },
10503
14
        { &hf_mbim_data_class_custom,
10504
14
            { "Custom", "mbim.control.data_class.custom",
10505
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x80000000,
10506
14
              NULL, HFILL }
10507
14
        },
10508
14
        { &hf_mbim_device_caps_info_sms_caps,
10509
14
            { "SMS Caps", "mbim.control.device_caps_info.sms_caps",
10510
14
               FT_UINT32, BASE_HEX, NULL, 0,
10511
14
              NULL, HFILL }
10512
14
        },
10513
14
        { &hf_mbim_device_caps_info_sms_caps_pdu_receive,
10514
14
            { "PDU Receive", "mbim.control.device_caps_info.sms_caps.pdu_receive",
10515
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10516
14
              NULL, HFILL }
10517
14
        },
10518
14
        { &hf_mbim_device_caps_info_sms_caps_pdu_send,
10519
14
            { "PDU Send", "mbim.control.device_caps_info.sms_caps.pdu_send",
10520
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10521
14
              NULL, HFILL }
10522
14
        },
10523
14
        { &hf_mbim_device_caps_info_sms_caps_text_receive,
10524
14
            { "Text Receive", "mbim.control.device_caps_info.sms_caps.text_receive",
10525
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10526
14
              NULL, HFILL }
10527
14
        },
10528
14
        { &hf_mbim_device_caps_info_sms_caps_text_send,
10529
14
            { "Text Send", "mbim.control.device_caps_info.sms_caps.text_send",
10530
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10531
14
              NULL, HFILL }
10532
14
        },
10533
14
        { &hf_mbim_device_caps_info_control_caps,
10534
14
            { "Control Caps", "mbim.control.device_caps_info.control_caps",
10535
14
               FT_UINT32, BASE_HEX, NULL, 0,
10536
14
              NULL, HFILL }
10537
14
        },
10538
14
        { &hf_mbim_device_caps_info_control_caps_reg_manual,
10539
14
            { "Reg Manual", "mbim.control.device_caps_info.control_caps.reg_manual",
10540
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10541
14
              NULL, HFILL }
10542
14
        },
10543
14
        { &hf_mbim_device_caps_info_control_caps_hw_radio_switch,
10544
14
            { "HW Radio Switch", "mbim.control.device_caps_info.control_caps.hw_radio_switch",
10545
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10546
14
              NULL, HFILL }
10547
14
        },
10548
14
        { &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip,
10549
14
            { "CDMA Mobile IP", "mbim.control.device_caps_info.control_caps.cdma_mobile_ip",
10550
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10551
14
              NULL, HFILL }
10552
14
        },
10553
14
        { &hf_mbim_device_caps_info_control_caps_cdma_simple_ip,
10554
14
            { "CDMA Simple IP", "mbim.control.device_caps_info.control_caps.cdma_simple_ip",
10555
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10556
14
              NULL, HFILL }
10557
14
        },
10558
14
        { &hf_mbim_device_caps_info_control_caps_multi_carrier,
10559
14
            { "Multi Carrier", "mbim.control.device_caps_info.control_caps.multi_carrier",
10560
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10561
14
              NULL, HFILL }
10562
14
        },
10563
14
        { &hf_mbim_device_caps_info_control_caps_esim,
10564
14
            { "ESIM", "mbim.control.device_caps_info.control_caps.esim",
10565
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020,
10566
14
              NULL, HFILL }
10567
14
        },
10568
14
        { &hf_mbim_device_caps_info_control_caps_ue_policy_route_selection,
10569
14
            { "UE Policy Route Selection", "mbim.control.device_caps_info.control_caps.ue_policy_route_selection",
10570
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040,
10571
14
              NULL, HFILL }
10572
14
        },
10573
14
        { &hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable,
10574
14
            { "Hot Swap Capable", "mbim.control.device_caps_info.control_caps.hot_swap_capable",
10575
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000080,
10576
14
              NULL, HFILL }
10577
14
        },
10578
14
        { &hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable,
10579
14
            { "Use URSP Rule On EPC Capable", "mbim.control.device_caps_info.control_caps.use_ursp_rule_on_epc_capable",
10580
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000100,
10581
14
              NULL, HFILL }
10582
14
        },
10583
14
        { &hf_mbim_device_caps_info_max_sessions,
10584
14
            { "Max Sessions", "mbim.control.device_caps_info.max_sessions",
10585
14
               FT_UINT32, BASE_DEC, NULL, 0,
10586
14
              NULL, HFILL }
10587
14
        },
10588
14
        { &hf_mbim_device_caps_info_data_subclass,
10589
14
            { "Data Subclass", "mbim.control.device_caps_info.data_subclass",
10590
14
               FT_UINT64, BASE_HEX, NULL, 0,
10591
14
              NULL, HFILL }
10592
14
        },
10593
14
        { &hf_mbim_data_subclass_5gendc,
10594
14
            { "5G EN-DC", "mbim.control.data_subclass.5gendc",
10595
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10596
14
              NULL, HFILL }
10597
14
        },
10598
14
        { &hf_mbim_data_subclass_5gnr,
10599
14
            { "5G NR", "mbim.control.data_subclass.5gnr",
10600
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10601
14
              NULL, HFILL }
10602
14
        },
10603
14
        { &hf_mbim_data_subclass_5gnedc,
10604
14
            { "5G NE-DC", "mbim.control.data_subclass.5gnedc",
10605
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10606
14
              NULL, HFILL }
10607
14
        },
10608
14
        { &hf_mbim_data_subclass_5gelte,
10609
14
            { "5G eLTE", "mbim.control.data_subclass.5gelte",
10610
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10611
14
              NULL, HFILL }
10612
14
        },
10613
14
        { &hf_mbim_data_subclass_5gngendc,
10614
14
            { "5G NG-EN-DC", "mbim.control.data_subclass.5gngendc",
10615
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10616
14
              NULL, HFILL }
10617
14
        },
10618
14
        { &hf_mbim_device_caps_info_wcdma_band_class,
10619
14
            { "WCDMA Band Class", "mbim.control.device_caps_info.wcdma_band_class",
10620
14
               FT_UINT32, BASE_DEC, NULL, 0,
10621
14
              NULL, HFILL }
10622
14
        },
10623
14
        { &hf_mbim_device_caps_info_custom_data_class_offset,
10624
14
            { "Custom Data Class Offset", "mbim.control.device_caps_info.custom_data_class.offset",
10625
14
               FT_UINT32, BASE_DEC, NULL, 0,
10626
14
              NULL, HFILL }
10627
14
        },
10628
14
        { &hf_mbim_device_caps_info_custom_data_class_size,
10629
14
            { "Custom Data Class Size", "mbim.control.device_caps_info.custom_data_class.size",
10630
14
               FT_UINT32, BASE_DEC, NULL, 0,
10631
14
              NULL, HFILL }
10632
14
        },
10633
14
        { &hf_mbim_device_caps_info_device_id_offset,
10634
14
            { "Device Id Offset", "mbim.control.device_caps_info.device_id.offset",
10635
14
               FT_UINT32, BASE_DEC, NULL, 0,
10636
14
              NULL, HFILL }
10637
14
        },
10638
14
        { &hf_mbim_device_caps_info_device_id_size,
10639
14
            { "Device Id Size", "mbim.control.device_caps_info.device_id.size",
10640
14
               FT_UINT32, BASE_DEC, NULL, 0,
10641
14
              NULL, HFILL }
10642
14
        },
10643
14
        { &hf_mbim_device_caps_info_fw_info_offset,
10644
14
            { "FW Info Offset", "mbim.control.device_caps_info.fw_info.offset",
10645
14
               FT_UINT32, BASE_DEC, NULL, 0,
10646
14
              NULL, HFILL }
10647
14
        },
10648
14
        { &hf_mbim_device_caps_info_fw_info_size,
10649
14
            { "FW Info Size", "mbim.control.device_caps_info.fw_info.size",
10650
14
               FT_UINT32, BASE_DEC, NULL, 0,
10651
14
              NULL, HFILL }
10652
14
        },
10653
14
        { &hf_mbim_device_caps_info_hw_info_offset,
10654
14
            { "HW Info Offset", "mbim.control.device_caps_info.hw_info.offset",
10655
14
               FT_UINT32, BASE_DEC, NULL, 0,
10656
14
              NULL, HFILL }
10657
14
        },
10658
14
        { &hf_mbim_device_caps_info_hw_info_size,
10659
14
            { "HW Info Size", "mbim.control.device_caps_info.hw_info.size",
10660
14
               FT_UINT32, BASE_DEC, NULL, 0,
10661
14
              NULL, HFILL }
10662
14
        },
10663
14
        { &hf_mbim_device_caps_info_custom_data_class,
10664
14
            { "Custom Data Class", "mbim.control.device_caps_info.custom_data_class",
10665
14
               FT_STRING, BASE_NONE, NULL, 0,
10666
14
              NULL, HFILL }
10667
14
        },
10668
14
        { &hf_mbim_device_caps_info_device_id,
10669
14
            { "Device Id", "mbim.control.device_caps_info.device_id",
10670
14
               FT_STRING, BASE_NONE, NULL, 0,
10671
14
              NULL, HFILL }
10672
14
        },
10673
14
        { &hf_mbim_device_caps_info_fw_info,
10674
14
            { "FW Info", "mbim.control.device_caps_info.fw_info",
10675
14
               FT_STRING, BASE_NONE, NULL, 0,
10676
14
              NULL, HFILL }
10677
14
        },
10678
14
        { &hf_mbim_device_caps_info_hw_info,
10679
14
            { "HW Info", "mbim.control.device_caps_info.hw_info",
10680
14
               FT_STRING, BASE_NONE, NULL, 0,
10681
14
              NULL, HFILL }
10682
14
        },
10683
14
        { &hf_mbim_device_caps_info_v2_executor_index,
10684
14
            { "Executor Index", "mbim.control.device_caps_info.executor_index",
10685
14
               FT_UINT32, BASE_DEC, NULL, 0,
10686
14
              NULL, HFILL }
10687
14
        },
10688
14
        { &hf_mbim_subscr_ready_status_ready_state,
10689
14
            { "Ready State", "mbim.control.subscriber_ready_status.ready_state",
10690
14
               FT_UINT32, BASE_DEC, VALS(mbim_subscr_ready_status_ready_state_vals), 0,
10691
14
              NULL, HFILL }
10692
14
        },
10693
14
        { &hf_mbim_subscr_ready_status_flags,
10694
14
            { "Flags", "mbim.control.subscriber_ready_status.flags",
10695
14
               FT_UINT32, BASE_HEX, NULL, 0,
10696
14
              NULL, HFILL }
10697
14
        },
10698
14
        { &hf_mbim_subscr_ready_status_flag_esim,
10699
14
            { "ESIM", "mbim.control.subscriber_ready_status.flags.esim",
10700
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10701
14
              NULL, HFILL }
10702
14
        },
10703
14
        { &hf_mbim_subscr_ready_status_flag_sim_removability_known,
10704
14
            { "SIM Removability Known", "mbim.control.subscriber_ready_status.flags.sim_removability_known",
10705
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10706
14
              NULL, HFILL }
10707
14
        },
10708
14
        { &hf_mbim_subscr_ready_status_flag_sim_removable,
10709
14
            { "SIM Removable", "mbim.control.subscriber_ready_status.flags.sim_removable",
10710
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10711
14
              NULL, HFILL }
10712
14
        },
10713
14
        { &hf_mbim_subscr_ready_status_flag_sim_slot_active,
10714
14
            { "SIM Slot Active", "mbim.control.subscriber_ready_status.flags.sim_slot_active",
10715
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10716
14
              NULL, HFILL }
10717
14
        },
10718
14
        { &hf_mbim_subscr_ready_status_susbcr_id_offset,
10719
14
            { "Subscriber Id Offset", "mbim.control.subscriber_ready_status.subscriber_id.offset",
10720
14
               FT_UINT32, BASE_DEC, NULL, 0,
10721
14
              NULL, HFILL }
10722
14
        },
10723
14
        { &hf_mbim_subscr_ready_status_susbcr_id_size,
10724
14
            { "Subscriber Id Size", "mbim.control.subscriber_ready_status.subscriber_id.size",
10725
14
               FT_UINT32, BASE_DEC, NULL, 0,
10726
14
              NULL, HFILL }
10727
14
        },
10728
14
        { &hf_mbim_subscr_ready_status_sim_icc_id_offset,
10729
14
            { "SIM ICC Id Offset", "mbim.control.subscriber_ready_status.sim_icc_id.offset",
10730
14
               FT_UINT32, BASE_DEC, NULL, 0,
10731
14
              NULL, HFILL }
10732
14
        },
10733
14
        { &hf_mbim_subscr_ready_status_sim_icc_id_size,
10734
14
            { "SIM ICC Id Size", "mbim.control.subscriber_ready_status.sim_icc_id.size",
10735
14
               FT_UINT32, BASE_DEC, NULL, 0,
10736
14
              NULL, HFILL }
10737
14
        },
10738
14
        { &hf_mbim_subscr_ready_status_ready_info,
10739
14
            { "Ready Info", "mbim.control.subscriber_ready_status.ready_info",
10740
14
               FT_UINT32, BASE_DEC, VALS(mbim_subscr_ready_status_ready_info_vals), 0,
10741
14
              NULL, HFILL }
10742
14
        },
10743
14
        { &hf_mbim_subscr_ready_status_elem_count,
10744
14
            { "Element Count", "mbim.control.subscriber_ready_status.element_count",
10745
14
               FT_UINT32, BASE_DEC, NULL, 0,
10746
14
              NULL, HFILL }
10747
14
        },
10748
14
        { &hf_mbim_subscr_ready_status_tel_nb_offset,
10749
14
            { "Telephone Number Offset", "mbim.control.subscriber_ready_status.tel_nb.offset",
10750
14
               FT_UINT32, BASE_DEC, NULL, 0,
10751
14
              NULL, HFILL }
10752
14
        },
10753
14
        { &hf_mbim_subscr_ready_status_tel_nb_size,
10754
14
            { "Telephone Number Size", "mbim.control.subscriber_ready_status.tel_nb.size",
10755
14
               FT_UINT32, BASE_DEC, NULL, 0,
10756
14
              NULL, HFILL }
10757
14
        },
10758
14
        { &hf_mbim_subscr_ready_status_susbcr_id,
10759
14
            { "Subscriber Id", "mbim.control.device_caps_info.subscriber_ready_status.subscriber_id",
10760
14
               FT_STRING, BASE_NONE, NULL, 0,
10761
14
              NULL, HFILL }
10762
14
        },
10763
14
        { &hf_mbim_subscr_ready_status_sim_icc_id,
10764
14
            { "SIM ICC Id", "mbim.control.device_caps_info.subscriber_ready_status.sim_icc_id",
10765
14
               FT_STRING, BASE_NONE, NULL, 0,
10766
14
              NULL, HFILL }
10767
14
        },
10768
14
        { &hf_mbim_subscr_ready_status_tel_nb,
10769
14
            { "Telephone Number", "mbim.control.device_caps_info.subscriber_ready_status.tel_nb",
10770
14
               FT_STRING, BASE_NONE, NULL, 0,
10771
14
              NULL, HFILL }
10772
14
        },
10773
14
        { &hf_mbim_radio_state_set,
10774
14
            { "Radio Set", "mbim.control.radio_state.set",
10775
14
               FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10776
14
              NULL, HFILL }
10777
14
        },
10778
14
        { &hf_mbim_radio_state_hw_radio_state,
10779
14
            { "HW Radio State", "mbim.control.radio_state.hw_radio_state",
10780
14
               FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10781
14
              NULL, HFILL }
10782
14
        },
10783
14
        { &hf_mbim_radio_state_sw_radio_state,
10784
14
            { "SW Radio State", "mbim.control.radio_state.sw_radio_stat",
10785
14
               FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10786
14
              NULL, HFILL }
10787
14
        },
10788
14
        { &hf_mbim_set_pin_pin_type,
10789
14
            { "PIN Type", "mbim.control.set_pin.pin_type",
10790
14
               FT_UINT32, BASE_DEC, VALS(mbim_pin_type_vals), 0,
10791
14
              NULL, HFILL }
10792
14
        },
10793
14
        { &hf_mbim_set_pin_pin_pin_operation,
10794
14
            { "PIN Operation", "mbim.control.set_pin.pin_operation",
10795
14
               FT_UINT32, BASE_DEC, VALS(mbim_pin_operation_vals), 0,
10796
14
              NULL, HFILL }
10797
14
        },
10798
14
        { &hf_mbim_set_pin_pin_pin_offset,
10799
14
            { "PIN Offset", "mbim.control.set_pin.pin.offset",
10800
14
               FT_UINT32, BASE_DEC, NULL, 0,
10801
14
              NULL, HFILL }
10802
14
        },
10803
14
        { &hf_mbim_set_pin_pin_pin_size,
10804
14
            { "PIN Size", "mbim.control.set_pin.pin.size",
10805
14
               FT_UINT32, BASE_DEC, NULL, 0,
10806
14
              NULL, HFILL }
10807
14
        },
10808
14
        { &hf_mbim_set_pin_new_pin_offset,
10809
14
            { "New PIN Offset", "mbim.control.set_pin.new_pin.offset",
10810
14
               FT_UINT32, BASE_DEC, NULL, 0,
10811
14
              NULL, HFILL }
10812
14
        },
10813
14
        { &hf_mbim_set_pin_new_pin_size,
10814
14
            { "New PIN Size", "mbim.control.set_pin.new_pin.size",
10815
14
               FT_UINT32, BASE_DEC, NULL, 0,
10816
14
              NULL, HFILL }
10817
14
        },
10818
14
        { &hf_mbim_set_pin_pin,
10819
14
            { "PIN", "mbim.control.set_pin.pin",
10820
14
               FT_STRING, BASE_NONE, NULL, 0,
10821
14
              NULL, HFILL }
10822
14
        },
10823
14
        { &hf_mbim_set_pin_new_pin,
10824
14
            { "New PIN", "mbim.control.set_pin.new_pin",
10825
14
               FT_STRING, BASE_NONE, NULL, 0,
10826
14
              NULL, HFILL }
10827
14
        },
10828
14
        { &hf_mbim_pin_info_pin_type,
10829
14
            { "PIN Type", "mbim.control.pin_info.pin_type",
10830
14
               FT_UINT32, BASE_DEC, VALS(mbim_pin_type_vals), 0,
10831
14
              NULL, HFILL }
10832
14
        },
10833
14
        { &hf_mbim_pin_info_pin_state,
10834
14
            { "PIN State", "mbim.control.pin_info.pin_state",
10835
14
               FT_UINT32, BASE_DEC, VALS(mbim_pin_state_vals), 0,
10836
14
              NULL, HFILL }
10837
14
        },
10838
14
        { &hf_mbim_pin_info_remaining_attempts,
10839
14
            { "Remaining Attempts", "mbim.control.pin_info.remaining_attempts",
10840
14
               FT_UINT32, BASE_DEC, NULL, 0,
10841
14
              NULL, HFILL }
10842
14
        },
10843
14
        { &hf_mbim_pin_list_pin_mode,
10844
14
            { "PIN Mode", "mbim.control.pin_list.pin_mode",
10845
14
               FT_UINT32, BASE_DEC, VALS(mbim_pin_mode_vals), 0,
10846
14
              NULL, HFILL }
10847
14
        },
10848
14
        { &hf_mbim_pin_list_pin_format,
10849
14
            { "PIN Format", "mbim.control.pin_list.pin_format",
10850
14
               FT_UINT32, BASE_DEC, VALS(mbim_pin_format_vals), 0,
10851
14
              NULL, HFILL }
10852
14
        },
10853
14
        { &hf_mbim_pin_list_pin_length_min,
10854
14
            { "PIN Length Min", "mbim.control.pin_list.pin_length_min",
10855
14
               FT_UINT32, BASE_DEC, NULL, 0,
10856
14
              NULL, HFILL }
10857
14
        },
10858
14
        { &hf_mbim_pin_list_pin_length_max,
10859
14
            { "PIN Length Max", "mbim.control.pin_list.pin_length_max",
10860
14
               FT_UINT32, BASE_DEC, NULL, 0,
10861
14
              NULL, HFILL }
10862
14
        },
10863
14
        { &hf_mbim_provider_state,
10864
14
            { "Provider State", "mbim.control.provider_state",
10865
14
               FT_UINT32, BASE_HEX, NULL, 0,
10866
14
              NULL, HFILL }
10867
14
        },
10868
14
        { &hf_mbim_provider_state_home,
10869
14
            { "Home", "mbim.control.provider_state.home",
10870
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10871
14
              NULL, HFILL }
10872
14
        },
10873
14
        { &hf_mbim_provider_state_forbidden,
10874
14
            { "Forbidden", "mbim.control.provider_state.forbidden",
10875
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10876
14
              NULL, HFILL }
10877
14
        },
10878
14
        { &hf_mbim_provider_state_preferred,
10879
14
            { "Preferred", "mbim.control.provider_state.preferred",
10880
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10881
14
              NULL, HFILL }
10882
14
        },
10883
14
        { &hf_mbim_provider_state_visible,
10884
14
            { "Visible", "mbim.control.provider_state.visible",
10885
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10886
14
              NULL, HFILL }
10887
14
        },
10888
14
        { &hf_mbim_provider_state_registered,
10889
14
            { "Registered", "mbim.control.provider_state.registered",
10890
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000010,
10891
14
              NULL, HFILL }
10892
14
        },
10893
14
        { &hf_mbim_provider_state_preferred_multicarrier,
10894
14
            { "Preferred Multicarrier", "mbim.control.provider_state.preferred_multicarrier",
10895
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000020,
10896
14
              NULL, HFILL }
10897
14
        },
10898
14
        { &hf_mbim_provider_provider_id_offset,
10899
14
            { "Provider Id Offset", "mbim.control.provider.provider_id_offset",
10900
14
               FT_UINT32, BASE_DEC, NULL, 0,
10901
14
              NULL, HFILL }
10902
14
        },
10903
14
        { &hf_mbim_provider_provider_id_size,
10904
14
            { "Provider Id Size", "mbim.control.provider.provider_id_size",
10905
14
               FT_UINT32, BASE_DEC, NULL, 0,
10906
14
              NULL, HFILL }
10907
14
        },
10908
14
        { &hf_mbim_provider_provider_name_offset,
10909
14
            { "Provider Name Offset", "mbim.control.provider.provider_name_offset",
10910
14
               FT_UINT32, BASE_DEC, NULL, 0,
10911
14
              NULL, HFILL }
10912
14
        },
10913
14
        { &hf_mbim_provider_provider_name_size,
10914
14
            { "Provider Name Size", "mbim.control.provider.provider_name_size",
10915
14
               FT_UINT32, BASE_DEC, NULL, 0,
10916
14
              NULL, HFILL }
10917
14
        },
10918
14
        { &hf_mbim_provider_cellular_class,
10919
14
            { "Cellular Class", "mbim.control.provider.cellular_class",
10920
14
               FT_UINT32, BASE_DEC, VALS(mbim_cellular_class_vals), 0,
10921
14
              NULL, HFILL }
10922
14
        },
10923
14
        { &hf_mbim_provider_rssi,
10924
14
            { "RSSI", "mbim.control.provider.rssi",
10925
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
10926
14
              NULL, HFILL }
10927
14
        },
10928
14
        { &hf_mbim_provider_error_rate,
10929
14
            { "Error Rate", "mbim.control.provider.error_rate",
10930
14
               FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
10931
14
              NULL, HFILL }
10932
14
        },
10933
14
        { &hf_mbim_provider_provider_id,
10934
14
            { "Provider Id", "mbim.control.provider.provider_id",
10935
14
               FT_STRING, BASE_NONE, NULL, 0,
10936
14
              NULL, HFILL }
10937
14
        },
10938
14
        { &hf_mbim_provider_provider_name,
10939
14
            { "Provider Name", "mbim.control.provider.provider_name",
10940
14
               FT_STRING, BASE_NONE, NULL, 0,
10941
14
              NULL, HFILL }
10942
14
        },
10943
14
        { &hf_mbim_providers_elem_count,
10944
14
            { "Element Count", "mbim.control.providers.elem_count",
10945
14
               FT_UINT32, BASE_DEC, NULL, 0,
10946
14
              NULL, HFILL }
10947
14
        },
10948
14
        { &hf_mbim_providers_provider_offset,
10949
14
            { "Provider Offset", "mbim.control.providers.provider_offset",
10950
14
               FT_UINT32, BASE_DEC, NULL, 0,
10951
14
              NULL, HFILL }
10952
14
        },
10953
14
        { &hf_mbim_providers_provider_size,
10954
14
            { "Provider Size", "mbim.control.providers.provider_size",
10955
14
               FT_UINT32, BASE_DEC, NULL, 0,
10956
14
              NULL, HFILL }
10957
14
        },
10958
14
        { &hf_mbim_visible_providers_req_action,
10959
14
            { "Action", "mbim.control.visible_providers_req.action",
10960
14
               FT_UINT32, BASE_DEC, VALS(mbim_visible_providers_action_vals), 0,
10961
14
              NULL, HFILL }
10962
14
        },
10963
14
        { &hf_mbim_set_register_state_provider_id_offset,
10964
14
            { "Provider Id Offset", "mbim.control.set_register_state.provider_id.offset",
10965
14
               FT_UINT32, BASE_DEC, NULL, 0,
10966
14
              NULL, HFILL }
10967
14
        },
10968
14
        { &hf_mbim_set_register_state_provider_id_size,
10969
14
            { "Provider Id Size", "mbim.control.set_register_state.provider_id.size",
10970
14
               FT_UINT32, BASE_DEC, NULL, 0,
10971
14
              NULL, HFILL }
10972
14
        },
10973
14
        { &hf_mbim_set_register_state_register_action,
10974
14
            { "Register Action", "mbim.control.set_register_state.register_action",
10975
14
               FT_UINT32, BASE_DEC, VALS(mbim_register_action_vals), 0,
10976
14
              NULL, HFILL }
10977
14
        },
10978
14
        { &hf_mbim_register_state_data_class,
10979
14
            { "Data Class", "mbim.control.set_register_state.data_class",
10980
14
               FT_UINT32, BASE_HEX, NULL, 0,
10981
14
              NULL, HFILL }
10982
14
        },
10983
14
        { &hf_mbim_set_register_state_provider_id,
10984
14
            { "Provider Id", "mbim.control.set_register_state.provider_id",
10985
14
               FT_STRING, BASE_NONE, NULL, 0,
10986
14
              NULL, HFILL }
10987
14
        },
10988
14
        { &hf_mbim_registration_state_info_nw_error,
10989
14
            { "Network Error", "mbim.control.registration_state_info.nw_error",
10990
14
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
10991
14
              NULL, HFILL }
10992
14
        },
10993
14
        { &hf_mbim_registration_state_info_register_state,
10994
14
            { "Register State", "mbim.control.registration_state_info.register_state",
10995
14
               FT_UINT32, BASE_DEC, VALS(mbim_register_state_vals), 0,
10996
14
              NULL, HFILL }
10997
14
        },
10998
14
        { &hf_mbim_registration_state_info_register_mode,
10999
14
            { "Register Mode", "mbim.control.registration_state_info.register_mode",
11000
14
               FT_UINT32, BASE_DEC, VALS(mbim_register_mode_vals), 0,
11001
14
              NULL, HFILL }
11002
14
        },
11003
14
        { &hf_mbim_registration_state_info_available_data_classes,
11004
14
            { "Available Data Classes", "mbim.control.registration_state_info.available_data_classes",
11005
14
               FT_UINT32, BASE_HEX, NULL, 0,
11006
14
              NULL, HFILL }
11007
14
        },
11008
14
        { &hf_mbim_registration_state_info_current_cellular_class,
11009
14
            { "Current Cellular Class", "mbim.control.registration_state_info.current_cellular_class",
11010
14
               FT_UINT32, BASE_DEC, VALS(mbim_cellular_class_vals), 0,
11011
14
              NULL, HFILL }
11012
14
        },
11013
14
        { &hf_mbim_registration_state_info_provider_id_offset,
11014
14
            { "Provider Id Offset", "mbim.control.registration_state_info.provider_id.offset",
11015
14
               FT_UINT32, BASE_DEC, NULL, 0,
11016
14
              NULL, HFILL }
11017
14
        },
11018
14
        { &hf_mbim_registration_state_info_provider_id_size,
11019
14
            { "Provider Id Size", "mbim.control.registration_state_info.provider_id.size",
11020
14
               FT_UINT32, BASE_DEC, NULL, 0,
11021
14
              NULL, HFILL }
11022
14
        },
11023
14
        { &hf_mbim_registration_state_info_provider_name_offset,
11024
14
            { "Provider Name Offset", "mbim.control.registration_state_info.provider_name.offset",
11025
14
               FT_UINT32, BASE_DEC, NULL, 0,
11026
14
              NULL, HFILL }
11027
14
        },
11028
14
        { &hf_mbim_registration_state_info_provider_name_size,
11029
14
            { "Provider Name Size", "mbim.control.registration_state_info.provider_name.size",
11030
14
               FT_UINT32, BASE_DEC, NULL, 0,
11031
14
              NULL, HFILL }
11032
14
        },
11033
14
        { &hf_mbim_registration_state_info_roaming_text_offset,
11034
14
            { "Roaming Text Offset", "mbim.control.registration_state_info.roaming_text.offset",
11035
14
               FT_UINT32, BASE_DEC, NULL, 0,
11036
14
              NULL, HFILL }
11037
14
        },
11038
14
        { &hf_mbim_registration_state_info_roaming_text_size,
11039
14
            { "Roaming Text Size", "mbim.control.registration_state_info.roaming_text.size",
11040
14
               FT_UINT32, BASE_DEC, NULL, 0,
11041
14
              NULL, HFILL }
11042
14
        },
11043
14
        { &hf_mbim_registration_state_info_registration_flags,
11044
14
            { "Registration Flags", "mbim.control.registration_state_info.registration_flags",
11045
14
               FT_UINT32, BASE_HEX, NULL, 0,
11046
14
              NULL, HFILL }
11047
14
        },
11048
14
        { &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available,
11049
14
            { "Manual Selection Not Available", "mbim.control.registration_state_info.registration_flags.manual_selection_not_available",
11050
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
11051
14
              NULL, HFILL }
11052
14
        },
11053
14
        { &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach,
11054
14
            { "Packet Service Auto Attach", "mbim.control.registration_state_info.registration_flags.packet_service_auto_attach",
11055
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
11056
14
              NULL, HFILL }
11057
14
        },
11058
14
        { &hf_mbim_registration_state_info_preferred_data_class,
11059
14
            { "Preferred Data Class", "mbim.control.registration_state_info.preferred_data_class",
11060
14
               FT_UINT32, BASE_DEC, NULL, 0,
11061
14
              NULL, HFILL }
11062
14
        },
11063
14
        { &hf_mbim_registration_state_info_provider_id,
11064
14
            { "Provider Id", "mbim.control.registration_state_info.provider_id",
11065
14
               FT_STRING, BASE_NONE, NULL, 0,
11066
14
              NULL, HFILL }
11067
14
        },
11068
14
        { &hf_mbim_registration_state_info_provider_name,
11069
14
            { "Provider Name", "mbim.control.registration_state_info.provider_name",
11070
14
               FT_STRING, BASE_NONE, NULL, 0,
11071
14
              NULL, HFILL }
11072
14
        },
11073
14
        { &hf_mbim_registration_state_info_roaming_text,
11074
14
            { "Roaming Text", "mbim.control.registration_state_info.roaming_text",
11075
14
               FT_STRING, BASE_NONE, NULL, 0,
11076
14
              NULL, HFILL }
11077
14
        },
11078
14
        { &hf_mbim_set_packet_service_action,
11079
14
            { "Action", "mbim.control.set_packet_service.action",
11080
14
               FT_UINT32, BASE_DEC, VALS(mbim_packet_service_action_vals), 0,
11081
14
              NULL, HFILL }
11082
14
        },
11083
14
        { &hf_mbim_ms_plmn_mcc,
11084
14
            { "Mobile Country Code", "mbim.control.ms_plmn.mcc",
11085
14
               FT_UINT16, BASE_DEC, NULL, 0,
11086
14
              NULL, HFILL }
11087
14
        },
11088
14
        { &hf_mbim_ms_plmn_mnc,
11089
14
            { "Mobile Network Code", "mbim.control.ms_plmn.mnc",
11090
14
               FT_UINT16, BASE_DEC, NULL, 0,
11091
14
              NULL, HFILL }
11092
14
        },
11093
14
        { &hf_mbim_ms_tai_tac,
11094
14
            { "Tracking Area Code", "mbim.control.ms_tai.tac",
11095
14
               FT_UINT32, BASE_DEC, NULL, 0,
11096
14
              NULL, HFILL }
11097
14
        },
11098
14
        { &hf_mbim_ms_tai_list_type,
11099
14
            { "TAI List Type", "mbim.control.ms_tai.list_type",
11100
14
               FT_UINT8, BASE_DEC, VALS(mbim_tai_list_type_vals), 0,
11101
14
              NULL, HFILL }
11102
14
        },
11103
14
        { &hf_mbim_ms_tai_list_single_plmn_tac_element,
11104
14
            { "TAC Element", "mbim.control.ms_tai.tac_element",
11105
14
               FT_UINT8, BASE_DEC, NULL, 0,
11106
14
              NULL, HFILL }
11107
14
        },
11108
14
        { &hf_mbim_ms_tai_list_multi_plmn_tai_element,
11109
14
            { "TAI Element", "mbim.control.ms_tai.tai_element",
11110
14
               FT_UINT8, BASE_DEC, NULL, 0,
11111
14
              NULL, HFILL }
11112
14
        },
11113
14
        { &hf_mbim_packet_service_info_nw_error,
11114
14
            { "Network Error", "mbim.control.packet_service_info.nw_error",
11115
14
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11116
14
              NULL, HFILL }
11117
14
        },
11118
14
        { &hf_mbim_packet_service_info_packet_service_state,
11119
14
            { "Packet Service State", "mbim.control.packet_service_info.packet_service_state",
11120
14
               FT_UINT32, BASE_DEC, VALS(mbim_packet_service_state_vals), 0,
11121
14
              NULL, HFILL }
11122
14
        },
11123
14
        { &hf_mbim_packet_service_info_highest_available_data_class,
11124
14
            { "Highest Available Data Class", "mbim.control.packet_service_info.highest_available_data_class",
11125
14
               FT_UINT32, BASE_HEX, NULL, 0,
11126
14
              NULL, HFILL }
11127
14
        },
11128
14
        { &hf_mbim_packet_service_info_current_data_class,
11129
14
            { "Current Data Class", "mbim.control.packet_service_info.current_data_class",
11130
14
               FT_UINT32, BASE_HEX, NULL, 0,
11131
14
              NULL, HFILL }
11132
14
        },
11133
14
        { &hf_mbim_packet_service_info_uplink_speed,
11134
14
            { "Uplink Speed", "mbim.control.packet_service_info.uplink_speed",
11135
14
               FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_bit_sec), 0,
11136
14
              NULL, HFILL }
11137
14
        },
11138
14
        { &hf_mbim_packet_service_info_downlink_speed,
11139
14
            { "Downlink Speed", "mbim.control.packet_service_info.downlink_speed",
11140
14
               FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_bit_sec), 0,
11141
14
              NULL, HFILL }
11142
14
        },
11143
14
        { &hf_mbim_packet_service_info_frequency_range,
11144
14
            { "Frequency Range", "mbim.control.packet_service_info.frequency_range",
11145
14
               FT_UINT32, BASE_DEC, VALS(mbim_packet_service_info_frequency_range_vals), 0,
11146
14
              NULL, HFILL }
11147
14
        },
11148
14
        { &hf_mbim_packet_service_info_data_subclass,
11149
14
            { "Data Subclass", "mbim.control.packet_service_info.data_subclass",
11150
14
               FT_UINT32, BASE_HEX, NULL, 0,
11151
14
              NULL, HFILL }
11152
14
        },
11153
14
        { &hf_mbim_set_signal_state_signal_strength_interval,
11154
14
            { "Signal Strength Interval", "mbim.control.set_signal_state.signal_strength_interval",
11155
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
11156
14
              NULL, HFILL }
11157
14
        },
11158
14
        { &hf_mbim_set_signal_state_rssi_threshold,
11159
14
            { "RSSI Threshold", "mbim.control.set_signal_state.rssi_threshold",
11160
14
               FT_UINT32, BASE_DEC, NULL, 0,
11161
14
              NULL, HFILL }
11162
14
        },
11163
14
        { &hf_mbim_set_signal_state_error_rate_threshold,
11164
14
            { "Error Rate Threshold", "mbim.control.set_signal_state.error_rate_threshold",
11165
14
               FT_UINT32, BASE_DEC, NULL, 0,
11166
14
              NULL, HFILL }
11167
14
        },
11168
14
        { &hf_mbim_signal_state_element_rsrp,
11169
14
            { "RSRP", "mbim.control.signal_state_element.rsrp",
11170
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrp_signal_state_fmt), 0,
11171
14
              NULL, HFILL }
11172
14
        },
11173
14
        { &hf_mbim_signal_state_element_snr,
11174
14
            { "SNR", "mbim.control.signal_state_element.snr",
11175
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_snr_signal_state_fmt), 0,
11176
14
              NULL, HFILL }
11177
14
        },
11178
14
        { &hf_mbim_signal_state_element_rsrp_threshold,
11179
14
            { "RSRP Threshold", "mbim.control.signal_state_element.rsrp_threshold",
11180
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
11181
14
              NULL, HFILL }
11182
14
        },
11183
14
        { &hf_mbim_signal_state_element_snr_threshold,
11184
14
            { "SNR Threshold", "mbim.control.signal_state_element.snr_threshold",
11185
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0,
11186
14
              NULL, HFILL }
11187
14
        },
11188
14
        { &hf_mbim_signal_state_element_system_type,
11189
14
            { "System Type", "mbim.control.signal_state_element.system_type",
11190
14
               FT_UINT32, BASE_HEX, NULL, 0,
11191
14
              NULL, HFILL }
11192
14
        },
11193
14
        { &hf_mbim_signal_state_info_rssi,
11194
14
            { "RSSI", "mbim.control.signal_state_info.rssi",
11195
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
11196
14
              NULL, HFILL }
11197
14
        },
11198
14
        { &hf_mbim_signal_state_info_error_rate,
11199
14
            { "Error Rate", "mbim.control.signal_state_info.error_rate",
11200
14
               FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
11201
14
              NULL, HFILL }
11202
14
        },
11203
14
        { &hf_mbim_signal_state_info_signal_strength_interval,
11204
14
            { "Signal Strength Interval", "mbim.control.signal_state_info.signal_strength_interval",
11205
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
11206
14
              NULL, HFILL }
11207
14
        },
11208
14
        { &hf_mbim_signal_state_info_rssi_threshold,
11209
14
            { "RSSI Threshold", "mbim.control.signal_state_info.rssi_threshold",
11210
14
               FT_UINT32, BASE_DEC, NULL, 0,
11211
14
              NULL, HFILL }
11212
14
        },
11213
14
        { &hf_mbim_signal_state_info_error_rate_threshold,
11214
14
            { "Error Rate Threshold", "mbim.control.signal_state_info.error_rate_threshold",
11215
14
               FT_UINT32, BASE_DEC, NULL, 0,
11216
14
              NULL, HFILL }
11217
14
        },
11218
14
        { &hf_mbim_signal_state_info_rsrp_snr_offset,
11219
14
            { "Rsrp Snr Offset", "mbim.control.signal_state_info.rsrp_snr_offset",
11220
14
               FT_UINT32, BASE_DEC, NULL, 0,
11221
14
              NULL, HFILL }
11222
14
        },
11223
14
        { &hf_mbim_signal_state_info_rsrp_snr_size,
11224
14
            { "Rsrp Snr Size", "mbim.control.signal_state_info.rsrp_snr_size",
11225
14
               FT_UINT32, BASE_DEC, NULL, 0,
11226
14
              NULL, HFILL }
11227
14
        },
11228
14
        { &hf_mbim_signal_state_info_elem_count,
11229
14
            { "Element Count", "mbim.control.signal_state_info.elem_count",
11230
14
               FT_UINT32, BASE_DEC, NULL, 0,
11231
14
              NULL, HFILL }
11232
14
        },
11233
14
        { &hf_mbim_context_type,
11234
14
            { "Context Type", "mbim.control.context_type",
11235
14
               FT_GUID, BASE_NONE, NULL, 0,
11236
14
              NULL, HFILL }
11237
14
        },
11238
14
        { &hf_mbim_set_connect_session_id,
11239
14
            { "Session Id", "mbim.control.set_connect.session_id",
11240
14
               FT_UINT32, BASE_DEC, NULL, 0,
11241
14
              NULL, HFILL }
11242
14
        },
11243
14
        { &hf_mbim_set_connect_activation_command,
11244
14
            { "Activation Command", "mbim.control.set_connect.activation_command",
11245
14
               FT_UINT32, BASE_DEC, VALS(mbim_activation_command_vals), 0,
11246
14
              NULL, HFILL }
11247
14
        },
11248
14
        { &hf_mbim_set_connect_activation_option,
11249
14
            { "Activation Option", "mbim.control.set_connect.activation_option",
11250
14
               FT_UINT32, BASE_DEC, VALS(mbim_activation_option_vals), 0,
11251
14
              NULL, HFILL }
11252
14
        },
11253
14
        { &hf_mbim_set_connect_access_string_offset,
11254
14
            { "Access String Offset", "mbim.control.set_connect.access_string_offset",
11255
14
               FT_UINT32, BASE_DEC, NULL, 0,
11256
14
              NULL, HFILL }
11257
14
        },
11258
14
        { &hf_mbim_set_connect_access_string_size,
11259
14
            { "Access String Size", "mbim.control.set_connect.access_string_size",
11260
14
               FT_UINT32, BASE_DEC, NULL, 0,
11261
14
              NULL, HFILL }
11262
14
        },
11263
14
        { &hf_mbim_set_connect_user_name_offset,
11264
14
            { "User Name Offset", "mbim.control.set_connect.user_name_offset",
11265
14
               FT_UINT32, BASE_DEC, NULL, 0,
11266
14
              NULL, HFILL }
11267
14
        },
11268
14
        { &hf_mbim_set_connect_user_name_size,
11269
14
            { "User Name Size", "mbim.control.set_connect.user_name_size",
11270
14
               FT_UINT32, BASE_DEC, NULL, 0,
11271
14
              NULL, HFILL }
11272
14
        },
11273
14
        { &hf_mbim_set_connect_password_offset,
11274
14
            { "Password Offset", "mbim.control.set_connect.password_offset",
11275
14
               FT_UINT32, BASE_DEC, NULL, 0,
11276
14
              NULL, HFILL }
11277
14
        },
11278
14
        { &hf_mbim_set_connect_password_size,
11279
14
            { "Password Size", "mbim.control.set_connect.password_size",
11280
14
               FT_UINT32, BASE_DEC, NULL, 0,
11281
14
              NULL, HFILL }
11282
14
        },
11283
14
        { &hf_mbim_set_connect_compression,
11284
14
            { "Compression", "mbim.control.set_connect.compression",
11285
14
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
11286
14
              NULL, HFILL }
11287
14
        },
11288
14
        { &hf_mbim_set_connect_auth_protocol,
11289
14
            { "Authentication Protocol", "mbim.control.set_connect.auth_protocol",
11290
14
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
11291
14
              NULL, HFILL }
11292
14
        },
11293
14
        { &hf_mbim_set_connect_ip_type,
11294
14
            { "IP Type", "mbim.control.set_connect.ip_type",
11295
14
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
11296
14
              NULL, HFILL }
11297
14
        },
11298
14
        { &hf_mbim_set_connect_access_string,
11299
14
            { "Access String", "mbim.control.set_connect.access_string",
11300
14
               FT_STRING, BASE_NONE, NULL, 0,
11301
14
              NULL, HFILL }
11302
14
        },
11303
14
        { &hf_mbim_set_connect_user_name,
11304
14
            { "User Name", "mbim.control.set_connect.user_name",
11305
14
               FT_STRING, BASE_NONE, NULL, 0,
11306
14
              NULL, HFILL }
11307
14
        },
11308
14
        { &hf_mbim_set_connect_password,
11309
14
            { "Password", "mbim.control.set_connect.password",
11310
14
               FT_STRING, BASE_NONE, NULL, 0,
11311
14
              NULL, HFILL }
11312
14
        },
11313
14
        { &hf_mbim_set_connect_media_preference,
11314
14
            { "Media Preference", "mbim.control.set_connect.media_preference",
11315
14
               FT_UINT32, BASE_DEC, NULL, 0,
11316
14
              NULL, HFILL }
11317
14
        },
11318
14
        { &hf_mbim_connect_info_session_id,
11319
14
            { "Session Id", "mbim.control.connect_info.session_id",
11320
14
               FT_UINT32, BASE_DEC, NULL, 0,
11321
14
              NULL, HFILL }
11322
14
        },
11323
14
        { &hf_mbim_connect_info_activation_state,
11324
14
            { "Activation State", "mbim.control.connect_info.activation_state",
11325
14
               FT_UINT32, BASE_DEC, VALS(mbim_activation_state_vals), 0,
11326
14
              NULL, HFILL }
11327
14
        },
11328
14
        { &hf_mbim_connect_info_voice_call_state,
11329
14
            { "Voice Call State", "mbim.control.connect_info.voice_call_state",
11330
14
               FT_UINT32, BASE_DEC, VALS(mbim_voice_call_state_vals), 0,
11331
14
              NULL, HFILL }
11332
14
        },
11333
14
        { &hf_mbim_connect_info_ip_type,
11334
14
            { "IP Type", "mbim.control.connect_info.ip_type",
11335
14
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
11336
14
              NULL, HFILL }
11337
14
        },
11338
14
        { &hf_mbim_connect_info_nw_error,
11339
14
            { "Network Error", "mbim.control.connect_info.nw_error",
11340
14
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11341
14
              NULL, HFILL }
11342
14
        },
11343
14
        { &hf_mbim_connect_info_access_media,
11344
14
            { "Access Media", "mbim.control.connect_info.access_media",
11345
14
               FT_UINT32, BASE_DEC, NULL, 0,
11346
14
              NULL, HFILL }
11347
14
        },
11348
14
        { &hf_mbim_context_context_id,
11349
14
            { "Context Id", "mbim.control.context.context_id",
11350
14
               FT_UINT32, BASE_DEC, NULL, 0,
11351
14
              NULL, HFILL }
11352
14
        },
11353
14
        { &hf_mbim_context_access_string_offset,
11354
14
            { "Access String Offset", "mbim.control.context.access_string_offset",
11355
14
               FT_UINT32, BASE_DEC, NULL, 0,
11356
14
              NULL, HFILL }
11357
14
        },
11358
14
        { &hf_mbim_context_access_string_size,
11359
14
            { "Access String Size", "mbim.control.context.access_string_size",
11360
14
               FT_UINT32, BASE_DEC, NULL, 0,
11361
14
              NULL, HFILL }
11362
14
        },
11363
14
        { &hf_mbim_context_user_name_offset,
11364
14
            { "User Name Offset", "mbim.control.context.user_name_offset",
11365
14
               FT_UINT32, BASE_DEC, NULL, 0,
11366
14
              NULL, HFILL }
11367
14
        },
11368
14
        { &hf_mbim_context_user_name_size,
11369
14
            { "User Name Size", "mbim.control.context.user_name_size",
11370
14
               FT_UINT32, BASE_DEC, NULL, 0,
11371
14
              NULL, HFILL }
11372
14
        },
11373
14
        { &hf_mbim_context_password_offset,
11374
14
            { "Password Offset", "mbim.control.context.password_offset",
11375
14
               FT_UINT32, BASE_DEC, NULL, 0,
11376
14
              NULL, HFILL }
11377
14
        },
11378
14
        { &hf_mbim_context_password_size,
11379
14
            { "Password Size", "mbim.control.context.password_size",
11380
14
               FT_UINT32, BASE_DEC, NULL, 0,
11381
14
              NULL, HFILL }
11382
14
        },
11383
14
        { &hf_mbim_context_compression,
11384
14
            { "Compression", "mbim.control.context.compression",
11385
14
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
11386
14
              NULL, HFILL }
11387
14
        },
11388
14
        { &hf_mbim_context_auth_protocol,
11389
14
            { "Authentication Protocol", "mbim.control.context.auth_protocol",
11390
14
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
11391
14
              NULL, HFILL }
11392
14
        },
11393
14
        { &hf_mbim_context_provider_id_offset,
11394
14
            { "Provider Id Offset", "mbim.control.context.provider_id_offset",
11395
14
               FT_UINT32, BASE_DEC, NULL, 0,
11396
14
              NULL, HFILL }
11397
14
        },
11398
14
        { &hf_mbim_context_provider_id_size,
11399
14
            { "Provider Id Size", "mbim.control.context.provider_id_size",
11400
14
               FT_UINT32, BASE_DEC, NULL, 0,
11401
14
              NULL, HFILL }
11402
14
        },
11403
14
        { &hf_mbim_context_access_string,
11404
14
            { "Access String", "mbim.control.context.access_string",
11405
14
               FT_STRING, BASE_NONE, NULL, 0,
11406
14
              NULL, HFILL }
11407
14
        },
11408
14
        { &hf_mbim_context_user_name,
11409
14
            { "User Name", "mbim.control.context.user_name",
11410
14
               FT_STRING, BASE_NONE, NULL, 0,
11411
14
              NULL, HFILL }
11412
14
        },
11413
14
        { &hf_mbim_context_password,
11414
14
            { "Password", "mbim.control.context.password",
11415
14
               FT_STRING, BASE_NONE, NULL, 0,
11416
14
              NULL, HFILL }
11417
14
        },
11418
14
        { &hf_mbim_context_provider_id,
11419
14
            { "Provider Id", "mbim.control.context.provider_id",
11420
14
               FT_STRING, BASE_NONE, NULL, 0,
11421
14
              NULL, HFILL }
11422
14
        },
11423
14
        { &hf_mbim_provisioned_contexts_info_elem_count,
11424
14
            { "Element Count", "mbim.control.context.provisioned_contexts_info.elem_count",
11425
14
               FT_UINT32, BASE_DEC, NULL, 0,
11426
14
              NULL, HFILL }
11427
14
        },
11428
14
        { &hf_mbim_provisioned_contexts_info_provisioned_context_offset,
11429
14
            { "Provisioned Context Offset", "mbim.control.context.provisioned_contexts_info.provisioned_context_offset",
11430
14
               FT_UINT32, BASE_DEC, NULL, 0,
11431
14
              NULL, HFILL }
11432
14
        },
11433
14
        { &hf_mbim_provisioned_contexts_info_provisioned_context_size,
11434
14
            { "Provisioned Context Size", "mbim.control.context.provisioned_contexts_info.provisioned_context_size",
11435
14
               FT_UINT32, BASE_DEC, NULL, 0,
11436
14
              NULL, HFILL }
11437
14
        },
11438
14
        { &hf_mbim_set_service_activation_data_buffer,
11439
14
            { "Data Buffer", "mbim.control.set_service_activation.data_buffer",
11440
14
               FT_BYTES, BASE_NONE, NULL, 0,
11441
14
              NULL, HFILL }
11442
14
        },
11443
14
        { &hf_mbim_service_activation_info_nw_error,
11444
14
            { "Network Error", "mbim.control.service_activation_info.nw_error",
11445
14
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11446
14
              NULL, HFILL }
11447
14
        },
11448
14
        { &hf_mbim_service_activation_info_data_buffer,
11449
14
            { "Data Buffer", "mbim.control.service_activation_info.data_buffer",
11450
14
               FT_BYTES, BASE_NONE, NULL, 0,
11451
14
              NULL, HFILL }
11452
14
        },
11453
14
        { &hf_mbim_ipv4_element_on_link_prefix_length,
11454
14
            { "On Link Prefix Length", "mbim.control.ipv4_element.on_link_prefix_length",
11455
14
               FT_UINT32, BASE_DEC, NULL, 0,
11456
14
              NULL, HFILL }
11457
14
        },
11458
14
        { &hf_mbim_ipv4_element_ipv4_address,
11459
14
            { "IPv4 Address", "mbim.control.ipv4_element.ipv4_address",
11460
14
               FT_IPv4, BASE_NONE, NULL, 0,
11461
14
              NULL, HFILL }
11462
14
        },
11463
14
        { &hf_mbim_ipv6_element_on_link_prefix_length,
11464
14
            { "On Link Prefix Length", "mbim.control.ipv6_element.on_link_prefix_length",
11465
14
               FT_UINT32, BASE_DEC, NULL, 0,
11466
14
              NULL, HFILL }
11467
14
        },
11468
14
        { &hf_mbim_ipv6_element_ipv6_address,
11469
14
            { "IPv6 Address", "mbim.control.ipv6_element.ipv6_address",
11470
14
               FT_IPv6, BASE_NONE, NULL, 0,
11471
14
              NULL, HFILL }
11472
14
        },
11473
14
        { &hf_mbim_ip_configuration_info_session_id,
11474
14
            { "Session Id", "mbim.control.ip_configuration_info.session_id",
11475
14
               FT_UINT32, BASE_DEC, NULL, 0,
11476
14
              NULL, HFILL }
11477
14
        },
11478
14
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available,
11479
14
            { "IPv4 Configuration Available", "mbim.control.ip_configuration_info.ipv4_configuration_available",
11480
14
               FT_UINT32, BASE_HEX, NULL, 0,
11481
14
              NULL, HFILL }
11482
14
        },
11483
14
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_address,
11484
14
            { "Address", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.address",
11485
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000001,
11486
14
              NULL, HFILL }
11487
14
        },
11488
14
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway,
11489
14
            { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.gateway",
11490
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000002,
11491
14
              NULL, HFILL }
11492
14
        },
11493
14
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns,
11494
14
            { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.dns",
11495
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000004,
11496
14
              NULL, HFILL }
11497
14
        },
11498
14
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu,
11499
14
            { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.mtu",
11500
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000008,
11501
14
              NULL, HFILL }
11502
14
        },
11503
14
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available,
11504
14
            { "IPv6 Configuration Available", "mbim.control.ip_configuration_info.ipv6_configuration_available",
11505
14
               FT_UINT32, BASE_HEX, NULL, 0,
11506
14
              NULL, HFILL }
11507
14
        },
11508
14
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_address,
11509
14
            { "Address", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.address",
11510
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000001,
11511
14
              NULL, HFILL }
11512
14
        },
11513
14
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway,
11514
14
            { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.gateway",
11515
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000002,
11516
14
              NULL, HFILL }
11517
14
        },
11518
14
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns,
11519
14
            { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.dns",
11520
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000004,
11521
14
              NULL, HFILL }
11522
14
        },
11523
14
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu,
11524
14
            { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.mtu",
11525
14
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000008,
11526
14
              NULL, HFILL }
11527
14
        },
11528
14
        { &hf_mbim_ip_configuration_info_ipv4_address_count,
11529
14
            { "IPv4 Address Count", "mbim.control.ip_configuration_info.ipv4_address.count",
11530
14
               FT_UINT32, BASE_DEC, NULL, 0,
11531
14
              NULL, HFILL }
11532
14
        },
11533
14
        { &hf_mbim_ip_configuration_info_ipv4_address_offset,
11534
14
            { "IPv4 Address Offset", "mbim.control.ip_configuration_info.ipv4_address.offset",
11535
14
               FT_UINT32, BASE_DEC, NULL, 0,
11536
14
              NULL, HFILL }
11537
14
        },
11538
14
        { &hf_mbim_ip_configuration_info_ipv6_address_count,
11539
14
            { "IPv6 Address Count", "mbim.control.ip_configuration_info.ipv6_address.count",
11540
14
               FT_UINT32, BASE_DEC, NULL, 0,
11541
14
              NULL, HFILL }
11542
14
        },
11543
14
        { &hf_mbim_ip_configuration_info_ipv6_address_offset,
11544
14
            { "IPv6 Address Offset", "mbim.control.ip_configuration_info.ipv6_address.offset",
11545
14
               FT_UINT32, BASE_DEC, NULL, 0,
11546
14
              NULL, HFILL }
11547
14
        },
11548
14
        { &hf_mbim_ip_configuration_info_ipv4_gateway_offset,
11549
14
            { "IPv4 Gateway Offset", "mbim.control.ip_configuration_info.ipv4_gateway.offset",
11550
14
               FT_UINT32, BASE_DEC, NULL, 0,
11551
14
              NULL, HFILL }
11552
14
        },
11553
14
        { &hf_mbim_ip_configuration_info_ipv6_gateway_offset,
11554
14
            { "IPv6 Gateway Offset", "mbim.control.ip_configuration_info.ipv6_gateway.offset",
11555
14
               FT_UINT32, BASE_DEC, NULL, 0,
11556
14
              NULL, HFILL }
11557
14
        },
11558
14
        { &hf_mbim_ip_configuration_info_ipv4_dns_count,
11559
14
            { "IPv4 DNS Server Count", "mbim.control.ip_configuration_info.ipv4_dns.count",
11560
14
               FT_UINT32, BASE_DEC, NULL, 0,
11561
14
              NULL, HFILL }
11562
14
        },
11563
14
        { &hf_mbim_ip_configuration_info_ipv4_dns_offset,
11564
14
            { "IPv4 DNS Server Offset", "mbim.control.ip_configuration_info.ipv4_dns.offset",
11565
14
               FT_UINT32, BASE_DEC, NULL, 0,
11566
14
              NULL, HFILL }
11567
14
        },
11568
14
        { &hf_mbim_ip_configuration_info_ipv6_dns_count,
11569
14
            { "IPv6 DNS Server Count", "mbim.control.ip_configuration_info.ipv6_dns.count",
11570
14
               FT_UINT32, BASE_DEC, NULL, 0,
11571
14
              NULL, HFILL }
11572
14
        },
11573
14
        { &hf_mbim_ip_configuration_info_ipv6_dns_offset,
11574
14
            { "IPv6 DNS Server Offset", "mbim.control.ip_configuration_info.ipv6_dns.offset",
11575
14
               FT_UINT32, BASE_DEC, NULL, 0,
11576
14
              NULL, HFILL }
11577
14
        },
11578
14
        { &hf_mbim_ip_configuration_info_ipv4_mtu,
11579
14
            { "IPv4 MTU", "mbim.control.ip_configuration_info.ipv4_mtu",
11580
14
               FT_UINT32, BASE_DEC, NULL, 0,
11581
14
              NULL, HFILL }
11582
14
        },
11583
14
        { &hf_mbim_ip_configuration_info_ipv6_mtu,
11584
14
            { "IPv6 MTU", "mbim.control.ip_configuration_info.ipv6_mtu",
11585
14
               FT_UINT32, BASE_DEC, NULL, 0,
11586
14
              NULL, HFILL }
11587
14
        },
11588
14
        { &hf_mbim_ip_configuration_info_ipv4_gateway,
11589
14
            { "IPv4 Gateway", "mbim.control.ip_configuration_info.ipv4_gateway",
11590
14
               FT_IPv4, BASE_NONE, NULL, 0,
11591
14
              NULL, HFILL }
11592
14
        },
11593
14
        { &hf_mbim_ip_configuration_info_ipv6_gateway,
11594
14
            { "IPv6 Gateway", "mbim.control.ip_configuration_info.ipv6_gateway",
11595
14
               FT_IPv6, BASE_NONE, NULL, 0,
11596
14
              NULL, HFILL }
11597
14
        },
11598
14
        { &hf_mbim_ip_configuration_info_ipv4_dns,
11599
14
            { "IPv4 DNS Server", "mbim.control.ip_configuration_info.ipv4_dns",
11600
14
               FT_IPv4, BASE_NONE, NULL, 0,
11601
14
              NULL, HFILL }
11602
14
        },
11603
14
        { &hf_mbim_ip_configuration_info_ipv6_dns,
11604
14
            { "IPv6 DNS Server", "mbim.control.ip_configuration_info.ipv6_dns",
11605
14
               FT_IPv6, BASE_NONE, NULL, 0,
11606
14
              NULL, HFILL }
11607
14
        },
11608
14
        { &hf_mbim_device_service_element_device_service_id,
11609
14
            { "Device Service Id", "mbim.control.device_service_element.device_service_id",
11610
14
               FT_GUID, BASE_NONE, NULL, 0,
11611
14
              NULL, HFILL }
11612
14
        },
11613
14
        { &hf_mbim_device_service_element_dss_payload,
11614
14
            { "DSS Payload", "mbim.control.device_service_element.dss_payload",
11615
14
               FT_UINT32, BASE_HEX, NULL, 0,
11616
14
              NULL, HFILL }
11617
14
        },
11618
14
        { &hf_mbim_device_service_element_dss_payload_host_device,
11619
14
            { "Host To Device", "mbim.control.device_service_element.dss_payload.host_device",
11620
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
11621
14
              NULL, HFILL }
11622
14
        },
11623
14
        { &hf_mbim_device_service_element_dss_payload_device_host,
11624
14
            { "Device To Host", "mbim.control.device_service_element.dss_payload.device_host",
11625
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
11626
14
              NULL, HFILL }
11627
14
        },
11628
14
        { &hf_mbim_device_service_element_max_dss_instances,
11629
14
            { "Max DSS Instances", "mbim.control.device_service_element.max_dss_instances",
11630
14
               FT_UINT32, BASE_DEC, NULL, 0,
11631
14
              NULL, HFILL }
11632
14
        },
11633
14
        { &hf_mbim_device_service_element_cid_count,
11634
14
            { "CID Count", "mbim.control.device_service_element.cid.count",
11635
14
               FT_UINT32, BASE_DEC, NULL, 0,
11636
14
              NULL, HFILL }
11637
14
        },
11638
14
        { &hf_mbim_device_service_element_cid,
11639
14
            { "CID", "mbim.control.device_service_element.cid",
11640
14
               FT_UINT32, BASE_DEC, NULL, 0,
11641
14
              NULL, HFILL }
11642
14
        },
11643
14
        { &hf_mbim_device_services_info_device_services_count,
11644
14
            { "Device Services Count", "mbim.control.device_services_info.device_services_count",
11645
14
               FT_UINT32, BASE_DEC, NULL, 0,
11646
14
              NULL, HFILL }
11647
14
        },
11648
14
        { &hf_mbim_device_services_info_max_dss_sessions,
11649
14
            { "Max DSS Sessions", "mbim.control.device_services_info.max_dss_sessions",
11650
14
               FT_UINT32, BASE_DEC, NULL, 0,
11651
14
              NULL, HFILL }
11652
14
        },
11653
14
        { &hf_mbim_device_services_info_device_services_offset,
11654
14
            { "Device Services Offset", "mbim.control.device_services_info.device_services.offset",
11655
14
               FT_UINT32, BASE_DEC, NULL, 0,
11656
14
              NULL, HFILL }
11657
14
        },
11658
14
        { &hf_mbim_device_services_info_device_services_size,
11659
14
            { "Device Services Size", "mbim.control.device_services_info.device_services.size",
11660
14
               FT_UINT32, BASE_DEC, NULL, 0,
11661
14
              NULL, HFILL }
11662
14
        },
11663
14
        { &hf_mbim_event_entry_device_service_id,
11664
14
            { "Device Service Id", "mbim.control.event_entry.device_service_id",
11665
14
               FT_GUID, BASE_NONE, NULL, 0,
11666
14
              NULL, HFILL }
11667
14
        },
11668
14
        { &hf_mbim_event_entry_cid_count,
11669
14
            { "CID Count", "mbim.control.event_entry.cid.count",
11670
14
               FT_UINT32, BASE_DEC, NULL, 0,
11671
14
              NULL, HFILL }
11672
14
        },
11673
14
        { &hf_mbim_event_entry_cid,
11674
14
            { "CID", "mbim.control.event_entry.cid",
11675
14
               FT_UINT32, BASE_DEC, NULL, 0,
11676
14
              NULL, HFILL }
11677
14
        },
11678
14
        { &hf_mbim_device_service_subscribe_element_count,
11679
14
            { "Element Count", "mbim.control.device_service_subscribe.element_count",
11680
14
               FT_UINT32, BASE_DEC, NULL, 0,
11681
14
              NULL, HFILL }
11682
14
        },
11683
14
        { &hf_mbim_device_service_subscribe_device_service_offset,
11684
14
            { "Device Service Offset", "mbim.control.device_service_subscribe.device_service.offset",
11685
14
               FT_UINT32, BASE_DEC, NULL, 0,
11686
14
              NULL, HFILL }
11687
14
        },
11688
14
        { &hf_mbim_device_service_subscribe_device_service_size,
11689
14
            { "Device Service Size", "mbim.control.device_service_subscribe.device_service.size",
11690
14
               FT_UINT32, BASE_DEC, NULL, 0,
11691
14
              NULL, HFILL }
11692
14
        },
11693
14
        { &hf_mbim_packet_statistics_info_in_discards,
11694
14
            { "In Discards", "mbim.control.packet_statistics_info.in_discards",
11695
14
               FT_UINT32, BASE_DEC, NULL, 0,
11696
14
              NULL, HFILL }
11697
14
        },
11698
14
        { &hf_mbim_packet_statistics_info_in_errors,
11699
14
            { "In Errors", "mbim.control.packet_statistics_info.in_errors",
11700
14
               FT_UINT32, BASE_DEC, NULL, 0,
11701
14
              NULL, HFILL }
11702
14
        },
11703
14
        { &hf_mbim_packet_statistics_info_in_octets,
11704
14
            { "In Octets", "mbim.control.packet_statistics_info.in_octets",
11705
14
               FT_UINT64, BASE_DEC, NULL, 0,
11706
14
              NULL, HFILL }
11707
14
        },
11708
14
        { &hf_mbim_packet_statistics_info_in_packets,
11709
14
            { "In Packets", "mbim.control.packet_statistics_info.in_packets",
11710
14
               FT_UINT64, BASE_DEC, NULL, 0,
11711
14
              NULL, HFILL }
11712
14
        },
11713
14
        { &hf_mbim_packet_statistics_info_out_octets,
11714
14
            { "Out Octets", "mbim.control.packet_statistics_info.out_octets",
11715
14
               FT_UINT64, BASE_DEC, NULL, 0,
11716
14
              NULL, HFILL }
11717
14
        },
11718
14
        { &hf_mbim_packet_statistics_info_out_packets,
11719
14
            { "Out Packets", "mbim.control.packet_statistics_info.out_packets",
11720
14
               FT_UINT64, BASE_DEC, NULL, 0,
11721
14
              NULL, HFILL }
11722
14
        },
11723
14
        { &hf_mbim_packet_statistics_info_out_errors,
11724
14
            { "Out Errors", "mbim.control.packet_statistics_info.out_errors",
11725
14
               FT_UINT32, BASE_DEC, NULL, 0,
11726
14
              NULL, HFILL }
11727
14
        },
11728
14
        { &hf_mbim_packet_statistics_info_out_discards,
11729
14
            { "Out Discards", "mbim.control.packet_statistics_info.out_discards",
11730
14
               FT_UINT32, BASE_DEC, NULL, 0,
11731
14
              NULL, HFILL }
11732
14
        },
11733
14
        { &hf_mbim_network_idle_hint_state,
11734
14
            { "Network Idle Hint State", "mbim.control.network_idle_hint.state",
11735
14
               FT_UINT32, BASE_DEC, VALS(mbim_network_idle_hint_states_vals), 0,
11736
14
              NULL, HFILL }
11737
14
        },
11738
14
        { &hf_mbim_emergency_mode_info_emergency_mode,
11739
14
            { "Emergency Mode", "mbim.control.emergency_mode_info.mode",
11740
14
               FT_UINT32, BASE_DEC, VALS(mbim_emergency_mode_states_vals), 0,
11741
14
              NULL, HFILL }
11742
14
        },
11743
14
        { &hf_mbim_single_packet_filter_filter_size,
11744
14
            { "Filter Size", "mbim.control.single_packet_filter.filter_size",
11745
14
               FT_UINT32, BASE_DEC, NULL, 0,
11746
14
              NULL, HFILL }
11747
14
        },
11748
14
        { &hf_mbim_single_packet_filter_packet_filter_offset,
11749
14
            { "Packet Filter Offset", "mbim.control.single_packet_filter.packet_filter.offset",
11750
14
               FT_UINT32, BASE_DEC, NULL, 0,
11751
14
              NULL, HFILL }
11752
14
        },
11753
14
        { &hf_mbim_single_packet_filter_packet_mask_offset,
11754
14
            { "Packet Mask Offset", "mbim.control.single_packet_filter.packet_mask.offset",
11755
14
               FT_UINT32, BASE_DEC, NULL, 0,
11756
14
              NULL, HFILL }
11757
14
        },
11758
14
        { &hf_mbim_single_packet_filter_filter_id,
11759
14
            { "Filter ID", "mbim.control.single_packet_filter.filter_id",
11760
14
               FT_UINT32, BASE_DEC, NULL, 0,
11761
14
              NULL, HFILL }
11762
14
        },
11763
14
        { &hf_mbim_single_packet_filter_packet_filter,
11764
14
            { "Packet Filter", "mbim.control.single_packet_filter.packet_filter",
11765
14
               FT_BYTES, BASE_NONE, NULL, 0,
11766
14
              NULL, HFILL }
11767
14
        },
11768
14
        { &hf_mbim_single_packet_filter_packet_mask,
11769
14
            { "Packet Mask", "mbim.control.single_packet_filter.packet_mask",
11770
14
               FT_BYTES, BASE_NONE, NULL, 0,
11771
14
              NULL, HFILL }
11772
14
        },
11773
14
        { &hf_mbim_packet_filters_session_id,
11774
14
            { "Session Id", "mbim.control.packet_filters.session_id",
11775
14
               FT_UINT32, BASE_DEC, NULL, 0,
11776
14
              NULL, HFILL }
11777
14
        },
11778
14
        { &hf_mbim_packet_filters_packet_filters_count,
11779
14
            { "Packet Filters Count", "mbim.control.packet_filters.packet_filters_count",
11780
14
               FT_UINT32, BASE_DEC, NULL, 0,
11781
14
              NULL, HFILL }
11782
14
        },
11783
14
        { &hf_mbim_packet_filters_packet_filters_packet_filter_offset,
11784
14
            { "Packet Filter Offset", "mbim.control.packet_filters.packet_filter.offset",
11785
14
               FT_UINT32, BASE_DEC, NULL, 0,
11786
14
              NULL, HFILL }
11787
14
        },
11788
14
        { &hf_mbim_packet_filters_packet_filters_packet_filter_size,
11789
14
            { "Packet Filters Size", "mbim.control.packet_filters.packet_filter.size",
11790
14
               FT_UINT32, BASE_DEC, NULL, 0,
11791
14
              NULL, HFILL }
11792
14
        },
11793
14
        { &hf_mbim_set_sms_configuration_format,
11794
14
            { "Format", "mbim.control.set_sms_configuration.format",
11795
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11796
14
              NULL, HFILL }
11797
14
        },
11798
14
        { &hf_mbim_set_sms_configuration_sc_address_offset,
11799
14
            { "Service Center Address Offset", "mbim.control.set_sms_configuration.sc_address.offset",
11800
14
               FT_UINT32, BASE_DEC, NULL, 0,
11801
14
              NULL, HFILL }
11802
14
        },
11803
14
        { &hf_mbim_set_sms_configuration_sc_address_size,
11804
14
            { "Service Center Address Size", "mbim.control.set_sms_configuration.sc_address.size",
11805
14
               FT_UINT32, BASE_DEC, NULL, 0,
11806
14
              NULL, HFILL }
11807
14
        },
11808
14
        { &hf_mbim_set_sms_configuration_sc_address,
11809
14
            { "Service Center Address", "mbim.control.set_sms_configuration.sc_address",
11810
14
               FT_STRING, BASE_NONE, NULL, 0,
11811
14
              NULL, HFILL }
11812
14
        },
11813
14
        { &hf_mbim_sms_configuration_info_sms_storage_state,
11814
14
            { "SMS Storage State", "mbim.control.sms_configuration_info.sms_storage_state",
11815
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_storage_state_vals), 0,
11816
14
              NULL, HFILL }
11817
14
        },
11818
14
        { &hf_mbim_sms_configuration_info_format,
11819
14
            { "Format", "mbim.control.sms_configuration_info.format",
11820
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11821
14
              NULL, HFILL }
11822
14
        },
11823
14
        { &hf_mbim_sms_configuration_info_max_messages,
11824
14
            { "Max Messages", "mbim.control.sms_configuration_info.max_messages",
11825
14
               FT_UINT32, BASE_DEC, NULL, 0,
11826
14
              NULL, HFILL }
11827
14
        },
11828
14
        { &hf_mbim_sms_configuration_info_cdma_short_message_size,
11829
14
            { "CDMA Short Message Size", "mbim.control.sms_configuration_info.cdma_short_message_size",
11830
14
               FT_UINT32, BASE_DEC, NULL, 0,
11831
14
              NULL, HFILL }
11832
14
        },
11833
14
        { &hf_mbim_sms_configuration_info_sc_address_offset,
11834
14
            { "Service Center Address Offset", "mbim.control.sms_configuration_info.sc_address.offset",
11835
14
               FT_UINT32, BASE_DEC, NULL, 0,
11836
14
              NULL, HFILL }
11837
14
        },
11838
14
        { &hf_mbim_sms_configuration_info_sc_address_size,
11839
14
            { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address.size",
11840
14
               FT_UINT32, BASE_DEC, NULL, 0,
11841
14
              NULL, HFILL }
11842
14
        },
11843
14
        { &hf_mbim_sms_configuration_info_sc_address,
11844
14
            { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address",
11845
14
               FT_STRING, BASE_NONE, NULL, 0,
11846
14
              NULL, HFILL }
11847
14
        },
11848
14
        { &hf_mbim_sms_pdu_record_message_index,
11849
14
            { "Message Index", "mbim.control.sms_pdu_record.message_index",
11850
14
               FT_UINT32, BASE_DEC, NULL, 0,
11851
14
              NULL, HFILL }
11852
14
        },
11853
14
        { &hf_mbim_sms_pdu_record_message_status,
11854
14
            { "Message Status", "mbim.control.sms_pdu_record.message_status",
11855
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_message_status_vals), 0,
11856
14
              NULL, HFILL }
11857
14
        },
11858
14
        { &hf_mbim_sms_pdu_record_pdu_data_offset,
11859
14
            { "PDU Data Offset", "mbim.control.sms_pdu_record.pdu_data.offset",
11860
14
               FT_UINT32, BASE_DEC, NULL, 0,
11861
14
              NULL, HFILL }
11862
14
        },
11863
14
        { &hf_mbim_sms_pdu_record_pdu_data_size,
11864
14
            { "PDU Data Size", "mbim.control.sms_pdu_record.pdu_data.size",
11865
14
               FT_UINT32, BASE_DEC, NULL, 0,
11866
14
              NULL, HFILL }
11867
14
        },
11868
14
        { &hf_mbim_sms_pdu_record_pdu_data,
11869
14
            { "PDU Data", "mbim.control.sms_pdu_record.pdu_data",
11870
14
               FT_BYTES, BASE_NONE, NULL, 0,
11871
14
              NULL, HFILL }
11872
14
        },
11873
14
        { &hf_mbim_sms_pdu_record_pdu_data_sc_address_size,
11874
14
            { "Size", "mbim.control.sms_pdu_record.pdu_data.sc_address_size",
11875
14
               FT_UINT8, BASE_DEC, NULL, 0,
11876
14
              NULL, HFILL }
11877
14
        },
11878
14
        { &hf_mbim_sms_cdma_record_message_index,
11879
14
            { "Message Index", "mbim.control.sms_cdma_record.message_index",
11880
14
               FT_UINT32, BASE_DEC, NULL, 0,
11881
14
              NULL, HFILL }
11882
14
        },
11883
14
        { &hf_mbim_sms_cdma_record_message_status,
11884
14
            { "Message Status", "mbim.control.sms_cdma_record.message_status",
11885
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_message_status_vals), 0,
11886
14
              NULL, HFILL }
11887
14
        },
11888
14
        { &hf_mbim_sms_cdma_record_address_offset,
11889
14
            { "Address Offset", "mbim.control.sms_cdma_record.address.offset",
11890
14
               FT_UINT32, BASE_DEC, NULL, 0,
11891
14
              NULL, HFILL }
11892
14
        },
11893
14
        { &hf_mbim_sms_cdma_record_address_size,
11894
14
            { "Address Size", "mbim.control.sms_cdma_record.address.size",
11895
14
               FT_UINT32, BASE_DEC, NULL, 0,
11896
14
              NULL, HFILL }
11897
14
        },
11898
14
        { &hf_mbim_sms_cdma_record_timestamp_offset,
11899
14
            { "Timestamp Offset", "mbim.control.sms_cdma_record.timestamp.offset",
11900
14
               FT_UINT32, BASE_DEC, NULL, 0,
11901
14
              NULL, HFILL }
11902
14
        },
11903
14
        { &hf_mbim_sms_cdma_record_timestamp_size,
11904
14
            { "Timestamp Size", "mbim.control.sms_cdma_record.timestamp.size",
11905
14
               FT_UINT32, BASE_DEC, NULL, 0,
11906
14
              NULL, HFILL }
11907
14
        },
11908
14
        { &hf_mbim_sms_cdma_record_encoding_id,
11909
14
            { "Encoding Id", "mbim.control.sms_cdma_record.encoding_id",
11910
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_encoding_vals), 0,
11911
14
              NULL, HFILL }
11912
14
        },
11913
14
        { &hf_mbim_sms_cdma_record_language_id,
11914
14
            { "Language Id", "mbim.control.sms_cdma_record.language_id",
11915
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_lang_vals), 0,
11916
14
              NULL, HFILL }
11917
14
        },
11918
14
        { &hf_mbim_sms_cdma_record_encoded_message_offset,
11919
14
            { "Encoded Message Offset", "mbim.control.sms_cdma_record.encoded_message.offset",
11920
14
               FT_UINT32, BASE_DEC, NULL, 0,
11921
14
              NULL, HFILL }
11922
14
        },
11923
14
        { &hf_mbim_sms_cdma_record_size_in_bytes,
11924
14
            { "Size In Bytes", "mbim.control.sms_cdma_record.size_in_bytes",
11925
14
               FT_UINT32, BASE_DEC, NULL, 0,
11926
14
              NULL, HFILL }
11927
14
        },
11928
14
        { &hf_mbim_sms_cdma_record_size_in_characters,
11929
14
            { "Size In Characters", "mbim.control.sms_cdma_record.size_in_characters",
11930
14
               FT_UINT32, BASE_DEC, NULL, 0,
11931
14
              NULL, HFILL }
11932
14
        },
11933
14
        { &hf_mbim_sms_cdma_record_address,
11934
14
            { "Address", "mbim.control.sms_cdma_record.address",
11935
14
               FT_STRING, BASE_NONE, NULL, 0,
11936
14
              NULL, HFILL }
11937
14
        },
11938
14
        { &hf_mbim_sms_cdma_record_timestamp,
11939
14
            { "Timestamp", "mbim.control.sms_cdma_record.timestamp",
11940
14
               FT_STRING, BASE_NONE, NULL, 0,
11941
14
              NULL, HFILL }
11942
14
        },
11943
14
        { &hf_mbim_sms_cdma_record_encoded_message,
11944
14
            { "Encoded Message", "mbim.control.sms_cdma_record.encoded_message",
11945
14
               FT_BYTES, BASE_NONE, NULL, 0,
11946
14
              NULL, HFILL }
11947
14
        },
11948
14
        { &hf_mbim_sms_cdma_record_encoded_message_text,
11949
14
            { "Text", "mbim.control.sms_cdma_record.encoded_message.text",
11950
14
            FT_STRING, BASE_NONE, NULL, 0,
11951
14
            NULL, HFILL }
11952
14
        },
11953
14
        { &hf_mbim_sms_read_req_format,
11954
14
            { "Format", "mbim.control.sms_read_req.format",
11955
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11956
14
              NULL, HFILL }
11957
14
        },
11958
14
        { &hf_mbim_sms_read_req_flag,
11959
14
            { "Flag", "mbim.control.sms_read_req.flag",
11960
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_flag_vals), 0,
11961
14
              NULL, HFILL }
11962
14
        },
11963
14
        { &hf_mbim_sms_read_req_message_index,
11964
14
            { "Message Index", "mbim.control.sms_read_req.message_index",
11965
14
               FT_UINT32, BASE_DEC, NULL, 0,
11966
14
              NULL, HFILL }
11967
14
        },
11968
14
        { &hf_mbim_sms_read_info_format,
11969
14
            { "Format", "mbim.control.sms_read_info.format",
11970
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11971
14
              NULL, HFILL }
11972
14
        },
11973
14
        { &hf_mbim_sms_read_info_element_count,
11974
14
            { "Element Count", "mbim.control.sms_read_info.element_count",
11975
14
               FT_UINT32, BASE_DEC, NULL, 0,
11976
14
              NULL, HFILL }
11977
14
        },
11978
14
        { &hf_mbim_sms_read_info_sms_offset,
11979
14
            { "SMS Offset", "mbim.control.sms_read_info.sms.offset",
11980
14
               FT_UINT32, BASE_DEC, NULL, 0,
11981
14
              NULL, HFILL }
11982
14
        },
11983
14
        { &hf_mbim_sms_read_info_sms_size,
11984
14
            { "SMS Size", "mbim.control.sms_read_info.sms.size",
11985
14
               FT_UINT32, BASE_DEC, NULL, 0,
11986
14
              NULL, HFILL }
11987
14
        },
11988
14
        { &hf_mbim_sms_send_pdu_pdu_data_offset,
11989
14
            { "PDU Data Offset", "mbim.control.sms_send_pdu.pdu_data.offset",
11990
14
               FT_UINT32, BASE_DEC, NULL, 0,
11991
14
              NULL, HFILL }
11992
14
        },
11993
14
        { &hf_mbim_sms_send_pdu_pdu_data_size,
11994
14
            { "PDU Data Size", "mbim.control.sms_send_pdu.pdu_data.size",
11995
14
               FT_UINT32, BASE_DEC, NULL, 0,
11996
14
              NULL, HFILL }
11997
14
        },
11998
14
        { &hf_mbim_sms_send_pdu_pdu_data,
11999
14
            { "PDU Data", "mbim.control.sms_send_pdu.pdu_data",
12000
14
               FT_BYTES, BASE_NONE, NULL, 0,
12001
14
              NULL, HFILL }
12002
14
        },
12003
14
        { &hf_mbim_sms_send_pdu_pdu_data_sc_address_size,
12004
14
            { "Size", "mbim.control.sms_send_pdu.pdu_data.sc_address_size",
12005
14
               FT_UINT8, BASE_DEC, NULL, 0,
12006
14
              NULL, HFILL }
12007
14
        },
12008
14
        { &hf_mbim_sms_send_cdma_encoding_id,
12009
14
            { "Encoding Id", "mbim.control.sms_send_cdma.encoding_id",
12010
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_encoding_vals), 0,
12011
14
              NULL, HFILL }
12012
14
        },
12013
14
        { &hf_mbim_sms_send_cdma_language_id,
12014
14
            { "Language Id", "mbim.control.sms_send_cdma.language_id",
12015
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_lang_vals), 0,
12016
14
              NULL, HFILL }
12017
14
        },
12018
14
        { &hf_mbim_sms_send_cdma_address_offset,
12019
14
            { "Address Offset", "mbim.control.sms_send_cdma.address.offset",
12020
14
               FT_UINT32, BASE_DEC, NULL, 0,
12021
14
              NULL, HFILL }
12022
14
        },
12023
14
        { &hf_mbim_sms_send_cdma_address_size,
12024
14
            { "Address Size", "mbim.control.sms_send_cdma.address.size",
12025
14
               FT_UINT32, BASE_DEC, NULL, 0,
12026
14
              NULL, HFILL }
12027
14
        },
12028
14
        { &hf_mbim_sms_send_cdma_encoded_message_offset,
12029
14
            { "Encoded Message Offset", "mbim.control.sms_send_cdma.encoded_message.offset",
12030
14
               FT_UINT32, BASE_DEC, NULL, 0,
12031
14
              NULL, HFILL }
12032
14
        },
12033
14
        { &hf_mbim_sms_send_cdma_size_in_bytes,
12034
14
            { "Size In Bytes", "mbim.control.sms_send_cdma.size_in_bytes",
12035
14
               FT_UINT32, BASE_DEC, NULL, 0,
12036
14
              NULL, HFILL }
12037
14
        },
12038
14
        { &hf_mbim_sms_send_cdma_size_in_characters,
12039
14
            { "Size In Characters", "mbim.control.sms_send_cdma.size_in_characters",
12040
14
               FT_UINT32, BASE_DEC, NULL, 0,
12041
14
              NULL, HFILL }
12042
14
        },
12043
14
        { &hf_mbim_sms_send_cdma_address,
12044
14
            { "Address", "mbim.control.sms_send_cdma.address",
12045
14
               FT_STRING, BASE_NONE, NULL, 0,
12046
14
              NULL, HFILL }
12047
14
        },
12048
14
        { &hf_mbim_sms_send_cdma_encoded_message,
12049
14
            { "Encoded Message", "mbim.control.sms_send_cdma.encoded_message",
12050
14
               FT_BYTES, BASE_NONE, NULL, 0,
12051
14
              NULL, HFILL }
12052
14
        },
12053
14
        { &hf_mbim_sms_send_cdma_encoded_message_text,
12054
14
            { "Text", "mbim.control.sms_send_cdma.encoded_message.text",
12055
14
            FT_STRING, BASE_NONE, NULL, 0,
12056
14
            NULL, HFILL }
12057
14
        },
12058
14
        { &hf_mbim_set_sms_send_format,
12059
14
            { "Format", "mbim.control.set_sms_send.format",
12060
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
12061
14
              NULL, HFILL }
12062
14
        },
12063
14
        { &hf_mbim_sms_send_info_message_reference,
12064
14
            { "Message Reference", "mbim.control.sms_send_info.message_reference",
12065
14
               FT_UINT32, BASE_DEC, NULL, 0,
12066
14
              NULL, HFILL }
12067
14
        },
12068
14
        { &hf_mbim_set_sms_delete_flag,
12069
14
            { "Flag", "mbim.control.set_sms_delete.flag",
12070
14
               FT_UINT32, BASE_DEC, VALS(mbim_sms_flag_vals), 0,
12071
14
              NULL, HFILL }
12072
14
        },
12073
14
        { &hf_mbim_set_sms_delete_message_index,
12074
14
            { "Message Index", "mbim.control.set_sms_delete.message_index",
12075
14
               FT_UINT32, BASE_DEC, NULL, 0,
12076
14
              NULL, HFILL }
12077
14
        },
12078
14
        { &hf_mbim_sms_status_info_flags,
12079
14
            { "Flags", "mbim.control.sms_status_info.flags",
12080
14
               FT_UINT32, BASE_HEX, NULL, 0,
12081
14
              NULL, HFILL }
12082
14
        },
12083
14
        { &hf_mbim_sms_status_info_flags_message_store_full,
12084
14
            { "Message Store Full", "mbim.control.sms_status_info.flags.message_store_full",
12085
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
12086
14
              NULL, HFILL }
12087
14
        },
12088
14
        { &hf_mbim_sms_status_info_flags_new_message,
12089
14
            { "New Message", "mbim.control.sms_status_info.flags.new_message",
12090
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
12091
14
              NULL, HFILL }
12092
14
        },
12093
14
        { &hf_mbim_sms_status_info_message_index,
12094
14
            { "Message Index", "mbim.control.sms_status_info.message_index",
12095
14
               FT_UINT32, BASE_DEC, NULL, 0,
12096
14
              NULL, HFILL }
12097
14
        },
12098
14
        { &hf_mbim_set_ussd_ussd_action,
12099
14
            { "USSD Action", "mbim.control.set_ussd.ussd_action",
12100
14
               FT_UINT32, BASE_DEC, VALS(mbim_ussd_action_vals), 0,
12101
14
              NULL, HFILL }
12102
14
        },
12103
14
        { &hf_mbim_set_ussd_ussd_data_coding_scheme,
12104
14
            { "USSD Data Coding Scheme", "mbim.control.set_ussd.ussd_data_coding_scheme",
12105
14
               FT_UINT32, BASE_HEX, NULL, 0,
12106
14
              NULL, HFILL }
12107
14
        },
12108
14
        { &hf_mbim_set_ussd_ussd_payload_offset,
12109
14
            { "USSD Payload Offset", "mbim.control.set_ussd.ussd_payload.offset",
12110
14
               FT_UINT32, BASE_DEC, NULL, 0,
12111
14
              NULL, HFILL }
12112
14
        },
12113
14
        { &hf_mbim_set_ussd_ussd_payload_length,
12114
14
            { "USSD Payload Length", "mbim.control.set_ussd.ussd_payload.length",
12115
14
               FT_UINT32, BASE_DEC, NULL, 0,
12116
14
              NULL, HFILL }
12117
14
        },
12118
14
        { &hf_mbim_set_ussd_ussd_payload,
12119
14
            { "USSD Payload", "mbim.control.set_ussd.ussd_payload",
12120
14
               FT_BYTES, BASE_NONE, NULL, 0,
12121
14
              NULL, HFILL }
12122
14
        },
12123
14
        { &hf_mbim_set_ussd_ussd_payload_text,
12124
14
            { "USSD Payload Text", "mbim.control.set_ussd.ussd_payload.text",
12125
14
               FT_STRING, BASE_NONE, NULL, 0,
12126
14
              NULL, HFILL }
12127
14
        },
12128
14
        { &hf_mbim_ussd_info_ussd_response,
12129
14
            { "USSD Response", "mbim.control.info_ussd.ussd_response",
12130
14
               FT_UINT32, BASE_DEC, VALS(mbim_ussd_response_vals), 0,
12131
14
              NULL, HFILL }
12132
14
        },
12133
14
        { &hf_mbim_ussd_info_ussd_session_state,
12134
14
            { "USSD Session State", "mbim.control.info_ussd.ussd_session_state",
12135
14
               FT_UINT32, BASE_DEC, VALS(mbim_ussd_session_state_vals), 0,
12136
14
              NULL, HFILL }
12137
14
        },
12138
14
        { &hf_mbim_ussd_info_ussd_data_coding_scheme,
12139
14
            { "USSD Data Coding Scheme", "mbim.control.ussd_info.ussd_data_coding_scheme",
12140
14
               FT_UINT32, BASE_HEX, NULL, 0,
12141
14
              NULL, HFILL }
12142
14
        },
12143
14
        { &hf_mbim_ussd_info_ussd_payload_offset,
12144
14
            { "USSD Payload Offset", "mbim.control.ussd_info.ussd_payload.offset",
12145
14
               FT_UINT32, BASE_DEC, NULL, 0,
12146
14
              NULL, HFILL }
12147
14
        },
12148
14
        { &hf_mbim_ussd_info_ussd_payload_length,
12149
14
            { "USSD Payload Length", "mbim.control.ussd_info.ussd_payload.length",
12150
14
               FT_UINT32, BASE_DEC, NULL, 0,
12151
14
              NULL, HFILL }
12152
14
        },
12153
14
        { &hf_mbim_ussd_info_ussd_payload,
12154
14
            { "USSD Payload", "mbim.control.ussd_info.ussd_payload",
12155
14
               FT_BYTES, BASE_NONE, NULL, 0,
12156
14
              NULL, HFILL }
12157
14
        },
12158
14
        { &hf_mbim_ussd_info_ussd_payload_text,
12159
14
            { "USSD Payload Text", "mbim.control.ussd_info.ussd_payload.text",
12160
14
               FT_STRING, BASE_NONE, NULL, 0,
12161
14
              NULL, HFILL }
12162
14
        },
12163
14
        { &hf_mbim_phonebook_configuration_info_phonebook_state,
12164
14
            { "Phonebook State", "mbim.control.phonebook_configuration_info.phonebook_state",
12165
14
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_state_vals), 0,
12166
14
              NULL, HFILL }
12167
14
        },
12168
14
        { &hf_mbim_phonebook_configuration_info_total_nb_of_entries,
12169
14
            { "Total Number Of Entries", "mbim.control.phonebook_configuration_info.total_nb_of_entries",
12170
14
               FT_UINT32, BASE_DEC, NULL, 0,
12171
14
              NULL, HFILL }
12172
14
        },
12173
14
        { &hf_mbim_phonebook_configuration_info_used_entries,
12174
14
            { "Used Entries", "mbim.control.phonebook_configuration_info.used_entries",
12175
14
               FT_UINT32, BASE_DEC, NULL, 0,
12176
14
              NULL, HFILL }
12177
14
        },
12178
14
        { &hf_mbim_phonebook_configuration_info_max_number_length,
12179
14
            { "Max Number Length", "mbim.control.phonebook_configuration_info.max_number_length",
12180
14
               FT_UINT32, BASE_DEC, NULL, 0,
12181
14
              NULL, HFILL }
12182
14
        },
12183
14
        { &hf_mbim_phonebook_configuration_info_max_name_length,
12184
14
            { "Max Name Length", "mbim.control.phonebook_configuration_info.max_name_length",
12185
14
               FT_UINT32, BASE_DEC, NULL, 0,
12186
14
              NULL, HFILL }
12187
14
        },
12188
14
        { &hf_mbim_phonebook_entry_entry_index,
12189
14
            { "Entry Index", "mbim.control.phonebook_entry.entry_index",
12190
14
               FT_UINT32, BASE_DEC, NULL, 0,
12191
14
              NULL, HFILL }
12192
14
        },
12193
14
        { &hf_mbim_phonebook_entry_number_offset,
12194
14
            { "Number Offset", "mbim.control.phonebook_entry.number.offset",
12195
14
               FT_UINT32, BASE_DEC, NULL, 0,
12196
14
              NULL, HFILL }
12197
14
        },
12198
14
        { &hf_mbim_phonebook_entry_number_length,
12199
14
            { "Number Length", "mbim.control.phonebook_entry.number.length",
12200
14
               FT_UINT32, BASE_DEC, NULL, 0,
12201
14
              NULL, HFILL }
12202
14
        },
12203
14
        { &hf_mbim_phonebook_entry_name_offset,
12204
14
            { "Name Offset", "mbim.control.phonebook_entry.name.offset",
12205
14
               FT_UINT32, BASE_DEC, NULL, 0,
12206
14
              NULL, HFILL }
12207
14
        },
12208
14
        { &hf_mbim_phonebook_entry_name_length,
12209
14
            { "Name Length", "mbim.control.phonebook_entry.name.length",
12210
14
               FT_UINT32, BASE_DEC, NULL, 0,
12211
14
              NULL, HFILL }
12212
14
        },
12213
14
        { &hf_mbim_phonebook_entry_number,
12214
14
            { "Number", "mbim.control.phonebook_entry.number",
12215
14
               FT_STRING, BASE_NONE, NULL, 0,
12216
14
              NULL, HFILL }
12217
14
        },
12218
14
        { &hf_mbim_phonebook_entry_name,
12219
14
            { "Name", "mbim.control.phonebook_entry.name",
12220
14
               FT_STRING, BASE_NONE, NULL, 0,
12221
14
              NULL, HFILL }
12222
14
        },
12223
14
        { &hf_mbim_phonebook_read_req_filter_flag,
12224
14
            { "Filter Flag", "mbim.control.phonebook_read_req.filter_flag",
12225
14
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_flag_vals), 0,
12226
14
              NULL, HFILL }
12227
14
        },
12228
14
        { &hf_mbim_phonebook_read_req_filter_message_index,
12229
14
            { "Filter Message Index", "mbim.control.phonebook_read_req.filter_message_index",
12230
14
               FT_UINT32, BASE_DEC, NULL, 0,
12231
14
              NULL, HFILL }
12232
14
        },
12233
14
        { &hf_mbim_phonebook_read_info_element_count,
12234
14
            { "Element Count", "mbim.control.phonebook_read_info.element_count",
12235
14
               FT_UINT32, BASE_DEC, NULL, 0,
12236
14
              NULL, HFILL }
12237
14
        },
12238
14
        { &hf_mbim_phonebook_read_info_phonebook_offset,
12239
14
            { "Phonebook Offset", "mbim.control.phonebook_read_info.phonebook.offset",
12240
14
               FT_UINT32, BASE_DEC, NULL, 0,
12241
14
              NULL, HFILL }
12242
14
        },
12243
14
        { &hf_mbim_phonebook_read_info_phonebook_size,
12244
14
            { "Phonebook Size", "mbim.control.phonebook_read_info.phonebook.size",
12245
14
               FT_UINT32, BASE_DEC, NULL, 0,
12246
14
              NULL, HFILL }
12247
14
        },
12248
14
        { &hf_mbim_set_phonebook_delete_filter_flag,
12249
14
            { "Filter Flag", "mbim.control.set_phonebook_delete.filter_flag",
12250
14
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_flag_vals), 0,
12251
14
              NULL, HFILL }
12252
14
        },
12253
14
        { &hf_mbim_set_phonebook_delete_filter_message_index,
12254
14
            { "Filter Message Index", "mbim.control.set_phonebook_delete.filter_message_index",
12255
14
               FT_UINT32, BASE_DEC, NULL, 0,
12256
14
              NULL, HFILL }
12257
14
        },
12258
14
        { &hf_mbim_set_phonebook_write_save_flag,
12259
14
            { "Save Flag", "mbim.control.set_phonebook_write.save_flag",
12260
14
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_write_flag_vals), 0,
12261
14
              NULL, HFILL }
12262
14
        },
12263
14
        { &hf_mbim_set_phonebook_write_save_index,
12264
14
            { "Save Index", "mbim.control.set_phonebook_write.save_index",
12265
14
               FT_UINT32, BASE_DEC, NULL, 0,
12266
14
              NULL, HFILL }
12267
14
        },
12268
14
        { &hf_mbim_set_phonebook_write_number_offset,
12269
14
            { "Number Offset", "mbim.control.set_phonebook_write.number.offset",
12270
14
               FT_UINT32, BASE_DEC, NULL, 0,
12271
14
              NULL, HFILL }
12272
14
        },
12273
14
        { &hf_mbim_set_phonebook_write_number_length,
12274
14
            { "Number Length", "mbim.control.set_phonebook_write.number.length",
12275
14
               FT_UINT32, BASE_DEC, NULL, 0,
12276
14
              NULL, HFILL }
12277
14
        },
12278
14
        { &hf_mbim_set_phonebook_write_name_offset,
12279
14
            { "Name Offset", "mbim.control.set_phonebook_write.name.offset",
12280
14
               FT_UINT32, BASE_DEC, NULL, 0,
12281
14
              NULL, HFILL }
12282
14
        },
12283
14
        { &hf_mbim_set_phonebook_write_name_length,
12284
14
            { "Name Length", "mbim.control.set_phonebook_write.name.length",
12285
14
               FT_UINT32, BASE_DEC, NULL, 0,
12286
14
              NULL, HFILL }
12287
14
        },
12288
14
        { &hf_mbim_set_phonebook_write_number,
12289
14
            { "Number", "mbim.control.set_phonebook_write.number",
12290
14
               FT_STRING, BASE_NONE, NULL, 0,
12291
14
              NULL, HFILL }
12292
14
        },
12293
14
        { &hf_mbim_set_phonebook_write_name,
12294
14
            { "Name", "mbim.control.set_phonebook_write.name",
12295
14
               FT_STRING, BASE_NONE, NULL, 0,
12296
14
              NULL, HFILL }
12297
14
        },
12298
14
        { &hf_mbim_set_stk_pac_pac_host_control,
12299
14
            { "PAC Host Control", "mbim.control.set_stk_pac.pac_host_control",
12300
14
               FT_BYTES, BASE_NONE, NULL, 0,
12301
14
              NULL, HFILL }
12302
14
        },
12303
14
        { &hf_mbim_set_stk_pac_pac_host_control_refresh,
12304
14
            { "Refresh", "mbim.control.set_stk_pac.pac_host_control.refresh",
12305
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12306
14
              NULL, HFILL }
12307
14
        },
12308
14
        { &hf_mbim_set_stk_pac_pac_host_control_more_time,
12309
14
            { "More Time", "mbim.control.set_stk_pac.pac_host_control.more_time",
12310
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12311
14
              NULL, HFILL }
12312
14
        },
12313
14
        { &hf_mbim_set_stk_pac_pac_host_control_poll_interval,
12314
14
            { "Poll Interval", "mbim.control.set_stk_pac.pac_host_control.poll_interval",
12315
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12316
14
              NULL, HFILL }
12317
14
        },
12318
14
        { &hf_mbim_set_stk_pac_pac_host_control_polling_off,
12319
14
            { "Polling Off", "mbim.control.set_stk_pac.pac_host_control.polling_off",
12320
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12321
14
              NULL, HFILL }
12322
14
        },
12323
14
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list,
12324
14
            { "Set Up Event List", "mbim.control.set_stk_pac.pac_host_control.set_up_evt_list",
12325
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12326
14
              NULL, HFILL }
12327
14
        },
12328
14
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_call,
12329
14
            { "Set Up Call", "mbim.control.set_stk_pac.pac_host_control.set_up_call",
12330
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12331
14
              NULL, HFILL }
12332
14
        },
12333
14
        { &hf_mbim_set_stk_pac_pac_host_control_send_ss,
12334
14
            { "Send SS", "mbim.control.set_stk_pac.pac_host_control.send_ss",
12335
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12336
14
              NULL, HFILL }
12337
14
        },
12338
14
        { &hf_mbim_set_stk_pac_pac_host_control_send_ussd,
12339
14
            { "Send USSD", "mbim.control.set_stk_pac.pac_host_control.send_ussd",
12340
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12341
14
              NULL, HFILL }
12342
14
        },
12343
14
        { &hf_mbim_set_stk_pac_pac_host_control_send_short_msg,
12344
14
            { "Send Short Message", "mbim.control.set_stk_pac.pac_host_control.send_short_msg",
12345
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12346
14
              NULL, HFILL }
12347
14
        },
12348
14
        { &hf_mbim_set_stk_pac_pac_host_control_send_dtmf,
12349
14
            { "Send DTMF", "mbim.control.set_stk_pac.pac_host_control.send_dtmf",
12350
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12351
14
              NULL, HFILL }
12352
14
        },
12353
14
        { &hf_mbim_set_stk_pac_pac_host_control_launch_browser,
12354
14
            { "Launch Browser", "mbim.control.set_stk_pac.pac_host_control.launch_browser",
12355
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12356
14
              NULL, HFILL }
12357
14
        },
12358
14
        { &hf_mbim_set_stk_pac_pac_host_control_geo_loc_req,
12359
14
            { "Geographical Location Request", "mbim.control.set_stk_pac.pac_host_control.geo_loc_req",
12360
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12361
14
              NULL, HFILL }
12362
14
        },
12363
14
        { &hf_mbim_set_stk_pac_pac_host_control_play_tone,
12364
14
            { "Play Tone", "mbim.control.set_stk_pac.pac_host_control.play_tone",
12365
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12366
14
              NULL, HFILL }
12367
14
        },
12368
14
        { &hf_mbim_set_stk_pac_pac_host_control_display_text,
12369
14
            { "Display Text", "mbim.control.set_stk_pac.pac_host_control.display_text",
12370
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12371
14
              NULL, HFILL }
12372
14
        },
12373
14
        { &hf_mbim_set_stk_pac_pac_host_control_get_inkey,
12374
14
            { "Get Inkey", "mbim.control.set_stk_pac.pac_host_control.get_inkey",
12375
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12376
14
              NULL, HFILL }
12377
14
        },
12378
14
        { &hf_mbim_set_stk_pac_pac_host_control_get_input,
12379
14
            { "Get Input", "mbim.control.set_stk_pac.pac_host_control.get_input",
12380
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12381
14
              NULL, HFILL }
12382
14
        },
12383
14
        { &hf_mbim_set_stk_pac_pac_host_control_select_item,
12384
14
            { "Select Item", "mbim.control.set_stk_pac.pac_host_control.select_item",
12385
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12386
14
              NULL, HFILL }
12387
14
        },
12388
14
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_menu,
12389
14
            { "Set Up Menu", "mbim.control.set_stk_pac.pac_host_control.set_up_menu",
12390
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12391
14
              NULL, HFILL }
12392
14
        },
12393
14
        { &hf_mbim_set_stk_pac_pac_host_control_prov_local_info,
12394
14
            { "Provide Local Information", "mbim.control.set_stk_pac.pac_host_control.prov_local_info",
12395
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12396
14
              NULL, HFILL }
12397
14
        },
12398
14
        { &hf_mbim_set_stk_pac_pac_host_control_timer_management,
12399
14
            { "Timer Management", "mbim.control.set_stk_pac.pac_host_control.timer_management",
12400
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12401
14
              NULL, HFILL }
12402
14
        },
12403
14
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text,
12404
14
            { "Set Up Idle Mode Text", "mbim.control.set_stk_pac.pac_host_control.set_up_idle_mode_text",
12405
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12406
14
              NULL, HFILL }
12407
14
        },
12408
14
        { &hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu,
12409
14
            { "Perform Card APDU", "mbim.control.set_stk_pac.pac_host_control.perform_card_apdu",
12410
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12411
14
              NULL, HFILL }
12412
14
        },
12413
14
        { &hf_mbim_set_stk_pac_pac_host_control_power_on_card,
12414
14
            { "Power On Card", "mbim.control.set_stk_pac.pac_host_control.power_on_card",
12415
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12416
14
              NULL, HFILL }
12417
14
        },
12418
14
        { &hf_mbim_set_stk_pac_pac_host_control_power_off_card,
12419
14
            { "Power Off Card", "mbim.control.set_stk_pac.pac_host_control.power_off_card",
12420
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12421
14
              NULL, HFILL }
12422
14
        },
12423
14
        { &hf_mbim_set_stk_pac_pac_host_control_get_reader_status,
12424
14
            { "Get Reader Status", "mbim.control.set_stk_pac.pac_host_control.get_reader_status",
12425
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12426
14
              NULL, HFILL }
12427
14
        },
12428
14
        { &hf_mbim_set_stk_pac_pac_host_control_run_at_cmd,
12429
14
            { "Run AT Command", "mbim.control.set_stk_pac.pac_host_control.run_at_cmd",
12430
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12431
14
              NULL, HFILL }
12432
14
        },
12433
14
        { &hf_mbim_set_stk_pac_pac_host_control_lang_notif,
12434
14
            { "Language Notification", "mbim.control.set_stk_pac.pac_host_control.lang_notif",
12435
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12436
14
              NULL, HFILL }
12437
14
        },
12438
14
        { &hf_mbim_set_stk_pac_pac_host_control_open_channel,
12439
14
            { "Open Channel", "mbim.control.set_stk_pac.pac_host_control.open_channel",
12440
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12441
14
              NULL, HFILL }
12442
14
        },
12443
14
        { &hf_mbim_set_stk_pac_pac_host_control_close_channel,
12444
14
            { "Close Channel", "mbim.control.set_stk_pac.pac_host_control.close_channel",
12445
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12446
14
              NULL, HFILL }
12447
14
        },
12448
14
        { &hf_mbim_set_stk_pac_pac_host_control_receive_data,
12449
14
            { "Receive Data", "mbim.control.set_stk_pac.pac_host_control.receive_data",
12450
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12451
14
              NULL, HFILL }
12452
14
        },
12453
14
        { &hf_mbim_set_stk_pac_pac_host_control_send_data,
12454
14
            { "Send Data", "mbim.control.set_stk_pac.pac_host_control.send_data",
12455
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12456
14
              NULL, HFILL }
12457
14
        },
12458
14
        { &hf_mbim_set_stk_pac_pac_host_control_get_channel_status,
12459
14
            { "Get Channel Status", "mbim.control.set_stk_pac.pac_host_control.get_channel_status",
12460
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12461
14
              NULL, HFILL }
12462
14
        },
12463
14
        { &hf_mbim_set_stk_pac_pac_host_control_service_search,
12464
14
            { "Service Search", "mbim.control.set_stk_pac.pac_host_control.service_search",
12465
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12466
14
              NULL, HFILL }
12467
14
        },
12468
14
        { &hf_mbim_set_stk_pac_pac_host_control_get_service_info,
12469
14
            { "Get Service Information", "mbim.control.set_stk_pac.pac_host_control.get_service_info",
12470
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12471
14
              NULL, HFILL }
12472
14
        },
12473
14
        { &hf_mbim_set_stk_pac_pac_host_control_declare_service,
12474
14
            { "Declare Service", "mbim.control.set_stk_pac.pac_host_control.declare_service",
12475
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12476
14
              NULL, HFILL }
12477
14
        },
12478
14
        { &hf_mbim_set_stk_pac_pac_host_control_set_frames,
12479
14
            { "Set Frames", "mbim.control.set_stk_pac.pac_host_control.set_frames",
12480
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12481
14
              NULL, HFILL }
12482
14
        },
12483
14
        { &hf_mbim_set_stk_pac_pac_host_control_get_frames_status,
12484
14
            { "Get Frames Status", "mbim.control.set_stk_pac.pac_host_control.get_frames_status",
12485
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12486
14
              NULL, HFILL }
12487
14
        },
12488
14
        { &hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg,
12489
14
            { "Retrieve Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.retrieve_multimedia_msg",
12490
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12491
14
              NULL, HFILL }
12492
14
        },
12493
14
        { &hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg,
12494
14
            { "Submit Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.submit_multimedia_msg",
12495
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12496
14
              NULL, HFILL }
12497
14
        },
12498
14
        { &hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg,
12499
14
            { "Display Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.display_multimedia_msg",
12500
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12501
14
              NULL, HFILL }
12502
14
        },
12503
14
        { &hf_mbim_set_stk_pac_pac_host_control_activate,
12504
14
            { "Activate", "mbim.control.set_stk_pac.pac_host_control.activate",
12505
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12506
14
              NULL, HFILL }
12507
14
        },
12508
14
        { &hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed,
12509
14
            { "Contactless State Changed", "mbim.control.set_stk_pac.pac_host_control.contactless_state_changed",
12510
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12511
14
              NULL, HFILL }
12512
14
        },
12513
14
        { &hf_mbim_set_stk_pac_pac_host_control_cmd_container,
12514
14
            { "Command Container", "mbim.control.set_stk_pac.pac_host_control.cmd_container",
12515
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12516
14
              NULL, HFILL }
12517
14
        },
12518
14
        { &hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl,
12519
14
            { "Encapsulated Session Control", "mbim.control.set_stk_pac.pac_host_control.encapsulated_session_ctrl",
12520
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12521
14
              NULL, HFILL }
12522
14
        },
12523
14
        { &hf_mbim_set_stk_pac_pac_host_control_end_proact_session,
12524
14
            { "End Proactive Session", "mbim.control.set_stk_pac.pac_host_control.end_proact_session",
12525
14
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12526
14
              NULL, HFILL }
12527
14
        },
12528
14
        { &hf_mbim_stk_pac_info_pac_support,
12529
14
            { "PAC Host Control", "mbim.control.stk_pac_info.pac_support",
12530
14
               FT_BYTES, BASE_NONE, NULL, 0,
12531
14
              NULL, HFILL }
12532
14
        },
12533
14
        { &hf_mbim_stk_pac_info_pac_support_refresh,
12534
14
            { "Refresh", "mbim.control.stk_pac_info.pac_support.refresh",
12535
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12536
14
              NULL, HFILL }
12537
14
        },
12538
14
        { &hf_mbim_stk_pac_info_pac_support_more_time,
12539
14
            { "More Time", "mbim.control.stk_pac_info.pac_support.more_time",
12540
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12541
14
              NULL, HFILL }
12542
14
        },
12543
14
        { &hf_mbim_stk_pac_info_pac_support_poll_interval,
12544
14
            { "Poll Interval", "mbim.control.stk_pac_info.pac_support.poll_interval",
12545
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12546
14
              NULL, HFILL }
12547
14
        },
12548
14
        { &hf_mbim_stk_pac_info_pac_support_polling_off,
12549
14
            { "Polling Off", "mbim.control.stk_pac_info.pac_support.polling_off",
12550
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12551
14
              NULL, HFILL }
12552
14
        },
12553
14
        { &hf_mbim_stk_pac_info_pac_support_set_up_evt_list,
12554
14
            { "Set Up Event List", "mbim.control.stk_pac_info.pac_support.set_up_evt_list",
12555
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12556
14
              NULL, HFILL }
12557
14
        },
12558
14
        { &hf_mbim_stk_pac_info_pac_support_set_up_call,
12559
14
            { "Set Up Call", "mbim.control.stk_pac_info.pac_support.set_up_call",
12560
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12561
14
              NULL, HFILL }
12562
14
        },
12563
14
        { &hf_mbim_stk_pac_info_pac_support_send_ss,
12564
14
            { "Send SS", "mbim.control.stk_pac_info.pac_support.send_ss",
12565
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12566
14
              NULL, HFILL }
12567
14
        },
12568
14
        { &hf_mbim_stk_pac_info_pac_support_send_ussd,
12569
14
            { "Send USSD", "mbim.control.stk_pac_info.pac_support.send_ussd",
12570
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12571
14
              NULL, HFILL }
12572
14
        },
12573
14
        { &hf_mbim_stk_pac_info_pac_support_send_short_msg,
12574
14
            { "Send Short Message", "mbim.control.stk_pac_info.pac_support.send_short_msg",
12575
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12576
14
              NULL, HFILL }
12577
14
        },
12578
14
        { &hf_mbim_stk_pac_info_pac_support_send_dtmf,
12579
14
            { "Send DTMF", "mbim.control.stk_pac_info.pac_support.send_dtmf",
12580
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12581
14
              NULL, HFILL }
12582
14
        },
12583
14
        { &hf_mbim_stk_pac_info_pac_support_launch_browser,
12584
14
            { "Launch Browser", "mbim.control.stk_pac_info.pac_support.launch_browser",
12585
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12586
14
              NULL, HFILL }
12587
14
        },
12588
14
        { &hf_mbim_stk_pac_info_pac_support_geo_loc_req,
12589
14
            { "Geographical Location Request", "mbim.control.stk_pac_info.pac_support.geo_loc_req",
12590
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12591
14
              NULL, HFILL }
12592
14
        },
12593
14
        { &hf_mbim_stk_pac_info_pac_support_play_tone,
12594
14
            { "Play Tone", "mbim.control.stk_pac_info.pac_support.play_tone",
12595
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12596
14
              NULL, HFILL }
12597
14
        },
12598
14
        { &hf_mbim_stk_pac_info_pac_support_display_text,
12599
14
            { "Display Text", "mbim.control.stk_pac_info.pac_support.display_text",
12600
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12601
14
              NULL, HFILL }
12602
14
        },
12603
14
        { &hf_mbim_stk_pac_info_pac_support_get_inkey,
12604
14
            { "Get Inkey", "mbim.control.stk_pac_info.pac_support.get_inkey",
12605
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12606
14
              NULL, HFILL }
12607
14
        },
12608
14
        { &hf_mbim_stk_pac_info_pac_support_get_input,
12609
14
            { "Get Input", "mbim.control.stk_pac_info.pac_support.get_input",
12610
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12611
14
              NULL, HFILL }
12612
14
        },
12613
14
        { &hf_mbim_stk_pac_info_pac_support_select_item,
12614
14
            { "Select Item", "mbim.control.stk_pac_info.pac_support.select_item",
12615
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12616
14
              NULL, HFILL }
12617
14
        },
12618
14
        { &hf_mbim_stk_pac_info_pac_support_set_up_menu,
12619
14
            { "Set Up Menu", "mbim.control.stk_pac_info.pac_support.set_up_menu",
12620
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12621
14
              NULL, HFILL }
12622
14
        },
12623
14
        { &hf_mbim_stk_pac_info_pac_support_prov_local_info,
12624
14
            { "Provide Local Information", "mbim.control.stk_pac_info.pac_support.prov_local_info",
12625
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12626
14
              NULL, HFILL }
12627
14
        },
12628
14
        { &hf_mbim_stk_pac_info_pac_support_timer_management,
12629
14
            { "Timer Management", "mbim.control.stk_pac_info.pac_support.timer_management",
12630
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12631
14
              NULL, HFILL }
12632
14
        },
12633
14
        { &hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text,
12634
14
            { "Set Up Idle Mode Text", "mbim.control.stk_pac_info.pac_support.set_up_idle_mode_text",
12635
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12636
14
              NULL, HFILL }
12637
14
        },
12638
14
        { &hf_mbim_stk_pac_info_pac_support_perform_card_apdu,
12639
14
            { "Perform Card APDU", "mbim.control.stk_pac_info.pac_support.perform_card_apdu",
12640
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12641
14
              NULL, HFILL }
12642
14
        },
12643
14
        { &hf_mbim_stk_pac_info_pac_support_power_on_card,
12644
14
            { "Power On Card", "mbim.control.stk_pac_info.pac_support.power_on_card",
12645
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12646
14
              NULL, HFILL }
12647
14
        },
12648
14
        { &hf_mbim_stk_pac_info_pac_support_power_off_card,
12649
14
            { "Power Off Card", "mbim.control.stk_pac_info.pac_support.power_off_card",
12650
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12651
14
              NULL, HFILL }
12652
14
        },
12653
14
        { &hf_mbim_stk_pac_info_pac_support_get_reader_status,
12654
14
            { "Get Reader Status", "mbim.control.stk_pac_info.pac_support.get_reader_status",
12655
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12656
14
              NULL, HFILL }
12657
14
        },
12658
14
        { &hf_mbim_stk_pac_info_pac_support_run_at_cmd,
12659
14
            { "Run AT Command", "mbim.control.stk_pac_info.pac_support.run_at_cmd",
12660
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12661
14
              NULL, HFILL }
12662
14
        },
12663
14
        { &hf_mbim_stk_pac_info_pac_support_lang_notif,
12664
14
            { "Language Notification", "mbim.control.stk_pac_info.pac_support.lang_notif",
12665
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12666
14
              NULL, HFILL }
12667
14
        },
12668
14
        { &hf_mbim_stk_pac_info_pac_support_open_channel,
12669
14
            { "Open Channel", "mbim.control.stk_pac_info.pac_support.open_channel",
12670
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12671
14
              NULL, HFILL }
12672
14
        },
12673
14
        { &hf_mbim_stk_pac_info_pac_support_close_channel,
12674
14
            { "Close Channel", "mbim.control.stk_pac_info.pac_support.close_channel",
12675
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12676
14
              NULL, HFILL }
12677
14
        },
12678
14
        { &hf_mbim_stk_pac_info_pac_support_receive_data,
12679
14
            { "Receive Data", "mbim.control.stk_pac_info.pac_support.receive_data",
12680
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12681
14
              NULL, HFILL }
12682
14
        },
12683
14
        { &hf_mbim_stk_pac_info_pac_support_send_data,
12684
14
            { "Send Data", "mbim.control.stk_pac_info.pac_support.send_data",
12685
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12686
14
              NULL, HFILL }
12687
14
        },
12688
14
        { &hf_mbim_stk_pac_info_pac_support_get_channel_status,
12689
14
            { "Get Channel Status", "mbim.control.stk_pac_info.pac_support.get_channel_status",
12690
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12691
14
              NULL, HFILL }
12692
14
        },
12693
14
        { &hf_mbim_stk_pac_info_pac_support_service_search,
12694
14
            { "Service Search", "mbim.control.stk_pac_info.pac_support.service_search",
12695
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12696
14
              NULL, HFILL }
12697
14
        },
12698
14
        { &hf_mbim_stk_pac_info_pac_support_get_service_info,
12699
14
            { "Get Service Information", "mbim.control.stk_pac_info.pac_support.get_service_info",
12700
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12701
14
              NULL, HFILL }
12702
14
        },
12703
14
        { &hf_mbim_stk_pac_info_pac_support_declare_service,
12704
14
            { "Declare Service", "mbim.control.stk_pac_info.pac_support.declare_service",
12705
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12706
14
              NULL, HFILL }
12707
14
        },
12708
14
        { &hf_mbim_stk_pac_info_pac_support_set_frames,
12709
14
            { "Set Frames", "mbim.control.stk_pac_info.pac_support.set_frames",
12710
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12711
14
              NULL, HFILL }
12712
14
        },
12713
14
        { &hf_mbim_stk_pac_info_pac_support_get_frames_status,
12714
14
            { "Get Frames Status", "mbim.control.stk_pac_info.pac_support.get_frames_status",
12715
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12716
14
              NULL, HFILL }
12717
14
        },
12718
14
        { &hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg,
12719
14
            { "Retrieve Multimedia Message", "mbim.control.stk_pac_info.pac_support.retrieve_multimedia_msg",
12720
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12721
14
              NULL, HFILL }
12722
14
        },
12723
14
        { &hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg,
12724
14
            { "Submit Multimedia Message", "mbim.control.stk_pac_info.pac_support.submit_multimedia_msg",
12725
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12726
14
              NULL, HFILL }
12727
14
        },
12728
14
        { &hf_mbim_stk_pac_info_pac_support_display_multimedia_msg,
12729
14
            { "Display Multimedia Message", "mbim.control.stk_pac_info.pac_support.display_multimedia_msg",
12730
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12731
14
              NULL, HFILL }
12732
14
        },
12733
14
        { &hf_mbim_stk_pac_info_pac_support_activate,
12734
14
            { "Activate", "mbim.control.stk_pac_info.pac_support.activate",
12735
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12736
14
              NULL, HFILL }
12737
14
        },
12738
14
        { &hf_mbim_stk_pac_info_pac_support_contactless_state_changed,
12739
14
            { "Contactless State Changed", "mbim.control.stk_pac_info.pac_support.contactless_state_changed",
12740
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12741
14
              NULL, HFILL }
12742
14
        },
12743
14
        { &hf_mbim_stk_pac_info_pac_support_cmd_container,
12744
14
            { "Command Container", "mbim.control.stk_pac_info.pac_support.cmd_container",
12745
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12746
14
              NULL, HFILL }
12747
14
        },
12748
14
        { &hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl,
12749
14
            { "Encapsulated Session Control", "mbim.control.stk_pac_info.pac_support.encapsulated_session_ctrl",
12750
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12751
14
              NULL, HFILL }
12752
14
        },
12753
14
        { &hf_mbim_stk_pac_info_pac_support_end_proact_session,
12754
14
            { "End Proactive Session", "mbim.control.stk_pac_info.pac_support.end_proact_session",
12755
14
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12756
14
              NULL, HFILL }
12757
14
        },
12758
14
        { &hf_mbim_stk_pac_pac_type,
12759
14
            { "PAC Type", "mbim.control.stk_pac.pac_type",
12760
14
               FT_UINT32, BASE_DEC, VALS(mbim_stk_pac_type_vals), 0,
12761
14
              NULL, HFILL }
12762
14
        },
12763
14
        { &hf_mbim_stk_pac_pac,
12764
14
            { "PAC", "mbim.control.stk_pac.pac",
12765
14
               FT_BYTES, BASE_NONE, NULL, 0,
12766
14
              NULL, HFILL }
12767
14
        },
12768
14
        { &hf_mbim_set_stk_terminal_response_response_length,
12769
14
            { "Response Length", "mbim.control.set_stk_terminal_response.response_length",
12770
14
               FT_UINT32, BASE_DEC, NULL, 0,
12771
14
              NULL, HFILL }
12772
14
        },
12773
14
        { &hf_mbim_set_stk_terminal_response_data_buffer,
12774
14
            { "Data Buffer", "mbim.control.set_stk_terminal_response.data_buffer",
12775
14
               FT_BYTES, BASE_NONE, NULL, 0,
12776
14
              NULL, HFILL }
12777
14
        },
12778
14
        { &hf_mbim_stk_terminal_response_info_result_data_string_offset,
12779
14
            { "Result Data String Offset", "mbim.control.stk_terminal_response_info.result_data_string.offset",
12780
14
               FT_UINT32, BASE_DEC, NULL, 0,
12781
14
              NULL, HFILL }
12782
14
        },
12783
14
        { &hf_mbim_stk_terminal_response_info_result_data_string_length,
12784
14
            { "Result Data String Length", "mbim.control.stk_terminal_response_info.result_data_string.length",
12785
14
               FT_UINT32, BASE_DEC, NULL, 0,
12786
14
              NULL, HFILL }
12787
14
        },
12788
14
        { &hf_mbim_stk_terminal_response_info_status_word,
12789
14
            { "Status Word", "mbim.control.stk_terminal_response_info.status_word",
12790
14
               FT_UINT32, BASE_HEX, NULL, 0,
12791
14
              NULL, HFILL }
12792
14
        },
12793
14
        { &hf_mbim_stk_terminal_response_info_result_data_string,
12794
14
            { "Result Data String", "mbim.control.stk_terminal_response_info.result_data_string",
12795
14
               FT_BYTES, BASE_NONE, NULL, 0,
12796
14
              NULL, HFILL }
12797
14
        },
12798
14
        { &hf_mbim_set_stk_envelope_data_buffer,
12799
14
            { "Data Buffer", "mbim.control.set_stk_envelope.data_buffer",
12800
14
               FT_BYTES, BASE_NONE, NULL, 0,
12801
14
              NULL, HFILL }
12802
14
        },
12803
14
        { &hf_mbim_stk_envelope_info_envelope_support,
12804
14
            { "Envelope Support", "mbim.control.stk_envelope_info.envelope_support",
12805
14
               FT_BYTES, BASE_NONE, NULL, 0,
12806
14
              NULL, HFILL }
12807
14
        },
12808
14
        { &hf_mbim_aka_auth_req_rand,
12809
14
            { "RAND", "mbim.control.aka_auth_req.rand",
12810
14
               FT_BYTES, BASE_NONE, NULL, 0,
12811
14
              NULL, HFILL }
12812
14
        },
12813
14
        { &hf_mbim_aka_auth_req_autn,
12814
14
            { "AUTN", "mbim.control.aka_auth_req.autn",
12815
14
               FT_BYTES, BASE_NONE, NULL, 0,
12816
14
              NULL, HFILL }
12817
14
        },
12818
14
        { &hf_mbim_aka_auth_info_res,
12819
14
            { "RES", "mbim.control.aka_auth_info.res",
12820
14
               FT_BYTES, BASE_NONE, NULL, 0,
12821
14
              NULL, HFILL }
12822
14
        },
12823
14
        { &hf_mbim_aka_auth_info_res_length,
12824
14
            { "RES Length", "mbim.control.aka_auth_info.res_length",
12825
14
               FT_UINT32, BASE_DEC, NULL, 0,
12826
14
              NULL, HFILL }
12827
14
        },
12828
14
        { &hf_mbim_aka_auth_info_ik,
12829
14
            { "IK", "mbim.control.aka_auth_info.ik",
12830
14
               FT_BYTES, BASE_NONE, NULL, 0,
12831
14
              NULL, HFILL }
12832
14
        },
12833
14
        { &hf_mbim_aka_auth_info_ck,
12834
14
            { "CK", "mbim.control.aka_auth_info.ck",
12835
14
               FT_BYTES, BASE_NONE, NULL, 0,
12836
14
              NULL, HFILL }
12837
14
        },
12838
14
        { &hf_mbim_aka_auth_info_auts,
12839
14
            { "AUTS", "mbim.control.aka_auth_info.auts",
12840
14
               FT_BYTES, BASE_NONE, NULL, 0,
12841
14
              NULL, HFILL }
12842
14
        },
12843
14
        { &hf_mbim_akap_auth_req_rand,
12844
14
            { "RAND", "mbim.control.akap_auth_req.rand",
12845
14
               FT_BYTES, BASE_NONE, NULL, 0,
12846
14
              NULL, HFILL }
12847
14
        },
12848
14
        { &hf_mbim_akap_auth_req_autn,
12849
14
            { "AUTN", "mbim.control.akap_auth_req.autn",
12850
14
               FT_BYTES, BASE_NONE, NULL, 0,
12851
14
              NULL, HFILL }
12852
14
        },
12853
14
        { &hf_mbim_akap_auth_req_network_name_offset,
12854
14
            { "Network Name Offset", "mbim.control.akap_auth_req.network_name.offset",
12855
14
               FT_UINT32, BASE_DEC, NULL, 0,
12856
14
              NULL, HFILL }
12857
14
        },
12858
14
        { &hf_mbim_akap_auth_req_network_name_length,
12859
14
            { "Network Name Length", "mbim.control.akap_auth_req.network_name.length",
12860
14
               FT_UINT32, BASE_DEC, NULL, 0,
12861
14
              NULL, HFILL }
12862
14
        },
12863
14
        { &hf_mbim_akap_auth_req_network_name,
12864
14
            { "Network Name", "mbim.control.akap_auth_req.network_name",
12865
14
               FT_STRING, BASE_NONE, NULL, 0,
12866
14
              NULL, HFILL }
12867
14
        },
12868
14
        { &hf_mbim_akap_auth_info_res,
12869
14
            { "RES", "mbim.control.akap_auth_info.res",
12870
14
               FT_BYTES, BASE_NONE, NULL, 0,
12871
14
              NULL, HFILL }
12872
14
        },
12873
14
        { &hf_mbim_akap_auth_info_res_length,
12874
14
            { "RES Length", "mbim.control.akap_auth_info.res_length",
12875
14
               FT_UINT32, BASE_DEC, NULL, 0,
12876
14
              NULL, HFILL }
12877
14
        },
12878
14
        { &hf_mbim_akap_auth_info_ik,
12879
14
            { "IK", "mbim.control.akap_auth_info.ik",
12880
14
               FT_BYTES, BASE_NONE, NULL, 0,
12881
14
              NULL, HFILL }
12882
14
        },
12883
14
        { &hf_mbim_akap_auth_info_ck,
12884
14
            { "CK", "mbim.control.akap_auth_info.ck",
12885
14
               FT_BYTES, BASE_NONE, NULL, 0,
12886
14
              NULL, HFILL }
12887
14
        },
12888
14
        { &hf_mbim_akap_auth_info_auts,
12889
14
            { "AUTS", "mbim.control.akap_auth_info.auts",
12890
14
               FT_BYTES, BASE_NONE, NULL, 0,
12891
14
              NULL, HFILL }
12892
14
        },
12893
14
        { &hf_mbim_sim_auth_req_rand1,
12894
14
            { "RAND1", "mbim.control.sim_auth_req.rand1",
12895
14
               FT_BYTES, BASE_NONE, NULL, 0,
12896
14
              NULL, HFILL }
12897
14
        },
12898
14
        { &hf_mbim_sim_auth_req_rand2,
12899
14
            { "RAND2", "mbim.control.sim_auth_req.rand2",
12900
14
               FT_BYTES, BASE_NONE, NULL, 0,
12901
14
              NULL, HFILL }
12902
14
        },
12903
14
        { &hf_mbim_sim_auth_req_rand3,
12904
14
            { "RAND3", "mbim.control.sim_auth_req.rand3",
12905
14
               FT_BYTES, BASE_NONE, NULL, 0,
12906
14
              NULL, HFILL }
12907
14
        },
12908
14
        { &hf_mbim_sim_auth_req_n,
12909
14
            { "n", "mbim.control.sim_auth_req.n",
12910
14
               FT_UINT32, BASE_DEC, NULL, 0,
12911
14
              NULL, HFILL }
12912
14
        },
12913
14
        { &hf_mbim_sim_auth_info_sres1,
12914
14
            { "SRES1", "mbim.control.sim_auth_info.sres1",
12915
14
               FT_UINT32, BASE_HEX, NULL, 0,
12916
14
              NULL, HFILL }
12917
14
        },
12918
14
        { &hf_mbim_sim_auth_info_kc1,
12919
14
            { "KC1", "mbim.control.sim_auth_info.kc1",
12920
14
               FT_UINT64, BASE_HEX, NULL, 0,
12921
14
              NULL, HFILL }
12922
14
        },
12923
14
        { &hf_mbim_sim_auth_info_sres2,
12924
14
            { "SRES2", "mbim.control.sim_auth_info.sres2",
12925
14
               FT_UINT32, BASE_HEX, NULL, 0,
12926
14
              NULL, HFILL }
12927
14
        },
12928
14
        { &hf_mbim_sim_auth_info_kc2,
12929
14
            { "KC2", "mbim.control.sim_auth_info.kc2",
12930
14
               FT_UINT64, BASE_HEX, NULL, 0,
12931
14
              NULL, HFILL }
12932
14
        },
12933
14
        { &hf_mbim_sim_auth_info_sres3,
12934
14
            { "SRES3", "mbim.control.sim_auth_info.sres3",
12935
14
               FT_UINT32, BASE_HEX, NULL, 0,
12936
14
              NULL, HFILL }
12937
14
        },
12938
14
        { &hf_mbim_sim_auth_info_kc3,
12939
14
            { "KC3", "mbim.control.sim_auth_info.kc3",
12940
14
               FT_UINT64, BASE_HEX, NULL, 0,
12941
14
              NULL, HFILL }
12942
14
        },
12943
14
        { &hf_mbim_sim_auth_info_n,
12944
14
            { "n", "mbim.control.sim_auth_info.n",
12945
14
               FT_UINT32, BASE_DEC, NULL, 0,
12946
14
              NULL, HFILL }
12947
14
        },
12948
14
        { &hf_mbim_set_dss_connect_device_service_id,
12949
14
            { "Device Service Id", "mbim.control.set_dss_connect.device_service_id",
12950
14
               FT_GUID, BASE_NONE, NULL, 0,
12951
14
              NULL, HFILL }
12952
14
        },
12953
14
        { &hf_mbim_set_dss_connect_dss_session_id,
12954
14
            { "DSS Session Id", "mbim.control.set_dss_connect.dss_session_id",
12955
14
               FT_UINT32, BASE_DEC, NULL, 0,
12956
14
              NULL, HFILL }
12957
14
        },
12958
14
        { &hf_mbim_set_dss_connect_dss_link_state,
12959
14
            { "DSS Link State", "mbim.control.set_dss_connect.dss_link_state",
12960
14
               FT_UINT32, BASE_DEC, VALS(mbim_dss_link_state_vals), 0,
12961
14
              NULL, HFILL }
12962
14
        },
12963
14
        { &hf_mbim_multicarrier_capabilities_info_capabilities,
12964
14
            { "Capabilities", "mbim.control.multicarrier_capabilities_info.capabilities",
12965
14
               FT_UINT32, BASE_HEX, NULL, 0,
12966
14
              NULL, HFILL }
12967
14
        },
12968
14
        { &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan,
12969
14
            { "Static Scan", "mbim.control.multicarrier_capabilities_info.capabilities.static_scan",
12970
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
12971
14
              NULL, HFILL }
12972
14
        },
12973
14
        { &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot,
12974
14
            { "FW Requires Reboot", "mbim.control.multicarrier_capabilities_info.capabilities.fw_requires_reboot",
12975
14
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
12976
14
              NULL, HFILL }
12977
14
        },
12978
14
        { &hf_mbim_location_info_country,
12979
14
            { "Country", "mbim.control.location_info.country",
12980
14
               FT_UINT32, BASE_HEX|BASE_EXT_STRING, &mbim_geoid_vals_ext, 0,
12981
14
              NULL, HFILL }
12982
14
        },
12983
14
        { &hf_mbim_multicarrier_current_cid_list_req_uuid,
12984
14
            { "UUID", "mbim.control.multicarrier_current_cid_list_req.uuid",
12985
14
               FT_GUID, BASE_NONE, NULL, 0,
12986
14
              NULL, HFILL }
12987
14
        },
12988
14
        { &hf_mbim_multicarrier_current_cid_list_info_cid_count,
12989
14
            { "CID Count", "mbim.control.multicarrier_current_cid_list_info.cid_count",
12990
14
               FT_UINT32, BASE_DEC, NULL, 0,
12991
14
              NULL, HFILL }
12992
14
        },
12993
14
        { &hf_mbim_multicarrier_current_cid_list_info_cid,
12994
14
            { "CID", "mbim.control.multicarrier_current_cid_list_info.cid",
12995
14
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_multicarrier_cid_vals), 0,
12996
14
              NULL, HFILL }
12997
14
        },
12998
14
        { &hf_mbim_msfwid_firmwareid_info_firmware_id,
12999
14
            { "Firmware Id", "mbim.control.msfwid_firmwareid_info.firmware_id",
13000
14
               FT_GUID, BASE_NONE, NULL, 0,
13001
14
              NULL, HFILL }
13002
14
        },
13003
14
        { &hf_mbim_qmi_buffer,
13004
14
            { "Buffer", "mbim.control.qmi.buffer",
13005
14
               FT_BYTES, BASE_NONE, NULL, 0,
13006
14
              NULL, HFILL }
13007
14
        },
13008
14
        { &hf_mbim_thermal_config_enable,
13009
14
            { "Enable", "mbim.control.thermal_config.enable",
13010
14
               FT_UINT32, BASE_DEC, VALS(mbim_thermal_config_enable_vals), 0,
13011
14
              NULL, HFILL }
13012
14
        },
13013
14
        { &hf_mbim_thermal_config_temp_sensor_id,
13014
14
            { "Temperature Sensor ID", "mbim.control.thermal_config.temp_sensor_id",
13015
14
               FT_UINT32, BASE_DEC, NULL, 0,
13016
14
              NULL, HFILL }
13017
14
        },
13018
14
        { &hf_mbim_thermal_config_alarm_id,
13019
14
            { "Alarm ID", "mbim.control.thermal_config.alarm_id",
13020
14
               FT_UINT32, BASE_DEC, NULL, 0,
13021
14
              NULL, HFILL }
13022
14
        },
13023
14
        { &hf_mbim_thermal_config_threshold_value,
13024
14
            { "Threshold Value", "mbim.control.thermal_config.threshold_value",
13025
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13026
14
              NULL, HFILL }
13027
14
        },
13028
14
        { &hf_mbim_thermal_config_hyst_value,
13029
14
            { "Hysteresis Value", "mbim.control.thermal_config.hyst_value",
13030
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13031
14
              NULL, HFILL }
13032
14
        },
13033
14
        { &hf_mbim_thermal_config_sampling_period,
13034
14
            { "Sampling Period", "mbim.control.thermal_config.sampling_period",
13035
14
               FT_UINT32, BASE_DEC, NULL, 0,
13036
14
              NULL, HFILL }
13037
14
        },
13038
14
        { &hf_mbim_query_thermal_state_temp_sensor_id,
13039
14
            { "Temperature Sensor ID", "mbim.control.query_thermal_state.temp_sensor_id",
13040
14
               FT_UINT32, BASE_DEC, NULL, 0,
13041
14
              NULL, HFILL }
13042
14
        },
13043
14
        { &hf_mbim_thermal_state_info_current_temp_value,
13044
14
            { "Current Temperature Value", "mbim.control.thermal_state_info.current_temp_value",
13045
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13046
14
              NULL, HFILL }
13047
14
        },
13048
14
        { &hf_mbim_thermal_state_info_enable,
13049
14
            { "Enable", "mbim.control.thermal_state_info.enable",
13050
14
               FT_UINT32, BASE_DEC, VALS(mbim_thermal_config_enable_vals), 0,
13051
14
              NULL, HFILL }
13052
14
        },
13053
14
        { &hf_mbim_thermal_state_info_temp_sensor_id,
13054
14
            { "Temperature Sensor ID", "mbim.control.thermal_state_info.temp_sensor_id",
13055
14
               FT_UINT32, BASE_DEC, NULL, 0,
13056
14
              NULL, HFILL }
13057
14
        },
13058
14
        { &hf_mbim_thermal_state_info_alarm_id,
13059
14
            { "Alarm ID", "mbim.control.thermal_state_info.alarm_id",
13060
14
               FT_UINT32, BASE_DEC, NULL, 0,
13061
14
              NULL, HFILL }
13062
14
        },
13063
14
        { &hf_mbim_thermal_state_info_threshold_value,
13064
14
            { "Threshold Value", "mbim.control.thermal_state_info.threshold_value",
13065
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13066
14
              NULL, HFILL }
13067
14
        },
13068
14
        { &hf_mbim_thermal_state_info_hyst_value,
13069
14
            { "Hysteresis Value", "mbim.control.thermal_state_info.hyst_value",
13070
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13071
14
              NULL, HFILL }
13072
14
        },
13073
14
        { &hf_mbim_thermal_state_info_sampling_period,
13074
14
            { "Sampling Period", "mbim.control.thermal_state_info.sampling_period",
13075
14
               FT_UINT32, BASE_DEC, NULL, 0,
13076
14
              NULL, HFILL }
13077
14
        },
13078
14
        { &hf_mbim_sar_config_sar_status,
13079
14
            { "SAR Status", "mbim.control.sar_config.sar_status",
13080
14
               FT_UINT32, BASE_DEC, VALS(mbim_sar_status_vals), 0,
13081
14
              NULL, HFILL }
13082
14
        },
13083
14
        { &hf_mbim_sar_config_level,
13084
14
            { "Level", "mbim.control.sar_config.level",
13085
14
               FT_UINT32, BASE_DEC, NULL, 0,
13086
14
              NULL, HFILL }
13087
14
        },
13088
14
        { &hf_mbim_ms_sar_config_sar_mode,
13089
14
            { "SAR Mode", "mbim.control.ms_sar_config.sar_mode",
13090
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_sar_config_sar_mode_vals), 0,
13091
14
              NULL, HFILL }
13092
14
        },
13093
14
        { &hf_mbim_ms_sar_config_sar_backoff_status,
13094
14
            { "SAR Backoff Status", "mbim.control.ms_sar_config.sar_backoff_status",
13095
14
               FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0,
13096
14
              NULL, HFILL }
13097
14
        },
13098
14
        { &hf_mbim_ms_sar_config_sar_wifi_Integration,
13099
14
            { "SAR Wifi Integration", "mbim.control.ms_sar_config.sar_wifi_integration",
13100
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_sar_config_sar_wifi_integration_vals), 0,
13101
14
              NULL, HFILL }
13102
14
        },
13103
14
        { &hf_mbim_ms_sar_config_element_count,
13104
14
            { "Element Count", "mbim.control.ms_sar_config.element_count",
13105
14
               FT_UINT32, BASE_DEC, NULL, 0,
13106
14
              NULL, HFILL }
13107
14
        },
13108
14
        { &hf_mbim_ms_sar_config_element_offset,
13109
14
            { "Element Offset", "mbim.control.ms_sar_config.element_offset",
13110
14
               FT_UINT32, BASE_DEC, NULL, 0,
13111
14
              NULL, HFILL }
13112
14
        },
13113
14
        { &hf_mbim_ms_sar_config_element_size,
13114
14
            { "Element Size", "mbim.control.ms_sar_config.element_size",
13115
14
               FT_UINT32, BASE_DEC, NULL, 0,
13116
14
              NULL, HFILL }
13117
14
        },
13118
14
        { &hf_mbim_ms_sar_config_state_sar_antenna_index,
13119
14
            { "SAR Antenna Index", "mbim.control.ms_sar_config.sar_antenna_index",
13120
14
               FT_UINT32, BASE_DEC, NULL, 0,
13121
14
              NULL, HFILL }
13122
14
        },
13123
14
        { &hf_mbim_ms_sar_config_state_sar_backoff_index,
13124
14
            { "SAR Backoff Index", "mbim.control.ms_sar_config.sar_backoff_index",
13125
14
               FT_UINT32, BASE_DEC, NULL, 0,
13126
14
              NULL, HFILL }
13127
14
        },
13128
14
        { &hf_mbim_ms_transmission_status_channel_notification,
13129
14
            { "Transmission Channel Notification", "mbim.control.ms_transmission_status.channel_notification",
13130
14
               FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0,
13131
14
              NULL, HFILL }
13132
14
        },
13133
14
        { &hf_mbim_ms_transmission_status_transmission_status,
13134
14
            { "Transmission Status", "mbim.control.ms_transmission_status.transmission_status",
13135
14
               FT_BOOLEAN, BASE_NONE, TFS(&tfs_active_inactive), 0,
13136
14
              NULL, HFILL }
13137
14
        },
13138
14
        { &hf_mbim_ms_transmission_status_hysteresis_timer,
13139
14
            { "Hysteresis Timer", "mbim.control.ms_transmission_status.hysteresis_timer",
13140
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
13141
14
              NULL, HFILL }
13142
14
        },
13143
14
        { &hf_mbim_adpclk_activate_state,
13144
14
            { "State", "mbim.control.adpclk_activate.state",
13145
14
               FT_UINT32, BASE_DEC, VALS(mbim_adpclk_activate_state_vals), 0,
13146
14
              NULL, HFILL }
13147
14
        },
13148
14
        { &hf_mbim_adpclk_freq_info_elem_count,
13149
14
            { "Element Count", "mbim.control.adpclk_freq_info.elem_count",
13150
14
               FT_UINT32, BASE_DEC, NULL, 0,
13151
14
              NULL, HFILL }
13152
14
        },
13153
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_offset,
13154
14
            { "ADPCLK Freq Value Offset", "mbim.control.adpclk_freq_info.adpclk_freq_value.offset",
13155
14
               FT_UINT32, BASE_DEC, NULL, 0,
13156
14
              NULL, HFILL }
13157
14
        },
13158
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_size,
13159
14
            { "ADPCLK Freq Value Size", "mbim.control.adpclk_freq_info.adpclk_freq_value.size",
13160
14
               FT_UINT32, BASE_DEC, NULL, 0,
13161
14
              NULL, HFILL }
13162
14
        },
13163
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq,
13164
14
            { "Center Frequency", "mbim.control.adpclk_freq_info.adpclk_freq_value.center_freq",
13165
14
               FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_hz), 0,
13166
14
              NULL, HFILL }
13167
14
        },
13168
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread,
13169
14
            { "Frequency Spread", "mbim.control.adpclk_freq_info.adpclk_freq_value.freq_spread",
13170
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_hz), 0,
13171
14
              NULL, HFILL }
13172
14
        },
13173
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power,
13174
14
            { "Noise Power", "mbim.control.adpclk_freq_info.adpclk_freq_value.noise_power",
13175
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13176
14
              NULL, HFILL }
13177
14
        },
13178
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi,
13179
14
            { "Relative Signal Strength Indication", "mbim.control.adpclk_freq_info.adpclk_freq_value.rssi",
13180
14
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13181
14
              NULL, HFILL }
13182
14
        },
13183
14
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status,
13184
14
            { "Connect Status", "mbim.control.adpclk_freq_info.adpclk_freq_value.connect_status",
13185
14
               FT_UINT32, BASE_DEC, VALS(mbim_connect_status_vals), 0,
13186
14
              NULL, HFILL }
13187
14
        },
13188
14
        { &hf_mbim_trace_config_config,
13189
14
            { "Configuration", "mbim.control.trace_config.config",
13190
14
               FT_UINT32, BASE_DEC, VALS(mbim_trace_config_vals), 0,
13191
14
              NULL, HFILL }
13192
14
        },
13193
14
        { &hf_mbim_nrtc_app_info_period,
13194
14
            { "Period", "mbim.control.nrtc_app_info.period",
13195
14
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0,
13196
14
              NULL, HFILL }
13197
14
        },
13198
14
        { &hf_mbim_nrtc_app_info_duration,
13199
14
            { "Duration", "mbim.control.nrtc_app_info.duration",
13200
14
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0,
13201
14
              NULL, HFILL }
13202
14
        },
13203
14
        { &hf_mbim_nrtcws_config_mode,
13204
14
            { "Mode", "mbim.control.nrtcws_config.mode",
13205
14
               FT_UINT16, BASE_DEC, NULL, 0,
13206
14
              NULL, HFILL }
13207
14
        },
13208
14
        { &hf_mbim_nrtcws_config_wlan_active,
13209
14
            { "WLAN Active", "mbim.control.nrtcws_config.wlan_active",
13210
14
               FT_UINT16, BASE_DEC, NULL, 0,
13211
14
              NULL, HFILL }
13212
14
        },
13213
14
        { &hf_mbim_nrtcws_config_wlan_safe_rx,
13214
14
            { "WLAN Safe Rx", "mbim.control.nrtcws_config.wlan_safe_rx",
13215
14
               FT_UINT16, BASE_DEC, NULL, 0,
13216
14
              NULL, HFILL }
13217
14
        },
13218
14
        { &hf_mbim_nrtcws_config_wlan_bandwidth,
13219
14
            { "WLAN Bandwidth", "mbim.control.nrtcws_config.wlan_bandwidth",
13220
14
               FT_UINT16, BASE_DEC, NULL, 0,
13221
14
              NULL, HFILL }
13222
14
        },
13223
14
        { &hf_mbim_nrtcws_config_bt_active,
13224
14
            { "BT Active", "mbim.control.nrtcws_config.bt_active",
13225
14
               FT_UINT16, BASE_DEC, NULL, 0,
13226
14
              NULL, HFILL }
13227
14
        },
13228
14
        { &hf_mbim_nrtcws_config_bt_safe_rx,
13229
14
            { "BT Safe Rx", "mbim.control.nrtcws_config.bt_safe_rx",
13230
14
               FT_UINT16, BASE_DEC, NULL, 0,
13231
14
              NULL, HFILL }
13232
14
        },
13233
14
        { &hf_mbim_nrtcws_info_lte_active,
13234
14
            { "LTE Active", "mbim.control.nrtcws_info.lte_active",
13235
14
               FT_UINT16, BASE_DEC, NULL, 0,
13236
14
              NULL, HFILL }
13237
14
        },
13238
14
        { &hf_mbim_nrtcws_info_wlan_safe_rx_min,
13239
14
            { "WLAN Safe Rx Min", "mbim.control.nrtcws_info.wlan_safe_rx_min",
13240
14
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13241
14
              NULL, HFILL }
13242
14
        },
13243
14
        { &hf_mbim_nrtcws_info_wlan_safe_rx_max,
13244
14
            { "WLAN Safe Rx Max", "mbim.control.nrtcws_info.wlan_safe_rx_max",
13245
14
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13246
14
              NULL, HFILL }
13247
14
        },
13248
14
        { &hf_mbim_nrtcws_info_bt_safe_rx_min,
13249
14
            { "BT Safe Rx Min", "mbim.control.nrtcws_info.bt_safe_rx_min",
13250
14
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13251
14
              NULL, HFILL }
13252
14
        },
13253
14
        { &hf_mbim_nrtcws_info_bt_safe_rx_max,
13254
14
            { "BT Safe Rx Max", "mbim.control.nrtcws_info.bt_safe_rx_max",
13255
14
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13256
14
              NULL, HFILL }
13257
14
        },
13258
14
        { &hf_mbim_nrtcws_info_lte_sps_period,
13259
14
            { "LTE SPS Periodicity", "mbim.control.nrtcws_info.lte_sps_period",
13260
14
               FT_UINT16, BASE_DEC, NULL, 0,
13261
14
              NULL, HFILL }
13262
14
        },
13263
14
        { &hf_mbim_nrtcws_info_lte_sps_duration,
13264
14
            { "LTE SPS Duration", "mbim.control.nrtcws_info.lte_sps_duration",
13265
14
               FT_UINT16, BASE_DEC, NULL, 0,
13266
14
              NULL, HFILL }
13267
14
        },
13268
14
        { &hf_mbim_nrtcws_info_lte_sps_initial_offset,
13269
14
            { "LTE SPS Initial Offset", "mbim.control.nrtcws_info.lte_sps_initial_offset",
13270
14
               FT_UINT16, BASE_DEC, NULL, 0,
13271
14
              NULL, HFILL }
13272
14
        },
13273
14
        { &hf_mbim_usbprofile_cmd_length,
13274
14
            { "Length", "mbim.control.usbprofile_cmd.length",
13275
14
               FT_UINT32, BASE_DEC, NULL, 0,
13276
14
              NULL, HFILL }
13277
14
        },
13278
14
        { &hf_mbim_usbprofile_cmd_buffer,
13279
14
            { "Buffer", "mbim.control.usbprofile_cmd.buffer",
13280
14
               FT_STRING, BASE_NONE, NULL, 0,
13281
14
              NULL, HFILL }
13282
14
        },
13283
14
        { &hf_mbim_usbprofile_rsp_length,
13284
14
            { "Length", "mbim.control.usbprofile_rsp.length",
13285
14
               FT_UINT32, BASE_DEC, NULL, 0,
13286
14
              NULL, HFILL }
13287
14
        },
13288
14
        { &hf_mbim_usbprofile_rsp_buffer,
13289
14
            { "Buffer", "mbim.control.usbprofile_rsp.buffer",
13290
14
               FT_STRING, BASE_NONE, NULL, 0,
13291
14
              NULL, HFILL }
13292
14
        },
13293
14
        { &hf_mbim_ciq_set_mode,
13294
14
            { "Mode", "mbim.control.ciq_set.mode",
13295
14
               FT_UINT32, BASE_DEC, NULL, 0,
13296
14
              NULL, HFILL }
13297
14
        },
13298
14
        { &hf_mbim_ciq_set_debug_info_size,
13299
14
            { "Debug Info Size", "mbim.control.ciq_set.debug_info.size",
13300
14
               FT_UINT32, BASE_DEC, NULL, 0,
13301
14
              NULL, HFILL }
13302
14
        },
13303
14
        { &hf_mbim_ciq_set_debug_info,
13304
14
            { "Debug Info", "mbim.control.ciq_set.debug_info",
13305
14
               FT_STRING, BASE_NONE, NULL, 0,
13306
14
              NULL, HFILL }
13307
14
        },
13308
14
        { &hf_mbim_ciq_info_mode,
13309
14
            { "Mode", "mbim.control.ciq_info.mode",
13310
14
               FT_UINT32, BASE_DEC, NULL, 0,
13311
14
              NULL, HFILL }
13312
14
        },
13313
14
        { &hf_mbim_atds_signal_info_rssi,
13314
14
            { "RSSI", "mbim.control.atds_signal_info.rssi",
13315
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
13316
14
              NULL, HFILL }
13317
14
        },
13318
14
        { &hf_mbim_atds_signal_info_ber,
13319
14
            { "BER", "mbim.control.atds_signal_info.ber",
13320
14
               FT_UINT32, BASE_DEC, VALS(mbim_ber_vals), 0,
13321
14
              NULL, HFILL }
13322
14
        },
13323
14
        { &hf_mbim_atds_signal_info_rscp,
13324
14
            { "RSCP", "mbim.control.atds_signal_info.rscp",
13325
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rscp_fmt), 0,
13326
14
              NULL, HFILL }
13327
14
        },
13328
14
        { &hf_mbim_atds_signal_info_ecno,
13329
14
            { "Ec/No", "mbim.control.atds_signal_info.ecno",
13330
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_ecno_fmt), 0,
13331
14
              NULL, HFILL }
13332
14
        },
13333
14
        { &hf_mbim_atds_signal_info_rsrq,
13334
14
            { "RSRQ", "mbim.control.atds_signal_info.rsrq",
13335
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrq_fmt), 0,
13336
14
              NULL, HFILL }
13337
14
        },
13338
14
        { &hf_mbim_atds_signal_info_rsrp,
13339
14
            { "RSRP", "mbim.control.atds_signal_info.rsrp",
13340
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrp_fmt), 0,
13341
14
              NULL, HFILL }
13342
14
        },
13343
14
        { &hf_mbim_atds_signal_info_rssnr,
13344
14
            { "RS SNR", "mbim.control.atds_signal_info.rssnr",
13345
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssnr_fmt), 0,
13346
14
              NULL, HFILL }
13347
14
        },
13348
14
        { &hf_mbim_atds_location_info_lac,
13349
14
            { "Location Area Code", "mbim.control.atds_location_info.lac",
13350
14
               FT_UINT32, BASE_HEX_DEC, NULL, 0,
13351
14
              NULL, HFILL }
13352
14
        },
13353
14
        { &hf_mbim_atds_location_info_tac,
13354
14
            { "Tracking Area Code", "mbim.control.atds_location_info.tac",
13355
14
               FT_UINT32, BASE_HEX_DEC, NULL, 0,
13356
14
              NULL, HFILL }
13357
14
        },
13358
14
        { &hf_mbim_atds_location_info_cellid,
13359
14
            { "Cell Identity", "mbim.control.atds_location_info.cellid",
13360
14
               FT_UINT32, BASE_HEX_DEC, NULL, 0,
13361
14
              NULL, HFILL }
13362
14
        },
13363
14
        { &hf_mbim_atds_operator_provider_id_offset,
13364
14
            { "Provider Id Offset", "mbim.control.atds_operator.provider_id_offset",
13365
14
               FT_UINT32, BASE_DEC, NULL, 0,
13366
14
              NULL, HFILL }
13367
14
        },
13368
14
        { &hf_mbim_atds_operator_provider_id_size,
13369
14
            { "Provider Id Size", "mbim.control.atds_operator.provider_id_size",
13370
14
               FT_UINT32, BASE_DEC, NULL, 0,
13371
14
              NULL, HFILL }
13372
14
        },
13373
14
        { &hf_mbim_atds_operator_provider_state,
13374
14
            { "Provider State", "mbim.control.atds_operator.provider_state",
13375
14
               FT_UINT32, BASE_HEX, NULL, 0,
13376
14
              NULL, HFILL }
13377
14
        },
13378
14
        { &hf_mbim_atds_operator_provider_name_offset,
13379
14
            { "Provider Name Offset", "mbim.control.atds_operator.provider_name_offset",
13380
14
               FT_UINT32, BASE_DEC, NULL, 0,
13381
14
              NULL, HFILL }
13382
14
        },
13383
14
        { &hf_mbim_atds_operator_provider_name_size,
13384
14
            { "Provider Name Size", "mbim.control.atds_operator.provider_name_size",
13385
14
               FT_UINT32, BASE_DEC, NULL, 0,
13386
14
              NULL, HFILL }
13387
14
        },
13388
14
        { &hf_mbim_atds_operator_plmn_mode,
13389
14
            { "PLMN Mode", "mbim.control.atds_operator.plmn_mode",
13390
14
               FT_UINT32, BASE_DEC, VALS(mbim_atds_operator_plmn_mode_vals), 0,
13391
14
              NULL, HFILL }
13392
14
        },
13393
14
        { &hf_mbim_atds_operator_rssi,
13394
14
            { "RSSI", "mbim.control.atds_operator.rssi",
13395
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
13396
14
              NULL, HFILL }
13397
14
        },
13398
14
        { &hf_mbim_atds_operator_error_rate,
13399
14
            { "Error Rate", "mbim.control.atds_operator.error_rate",
13400
14
               FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
13401
14
              NULL, HFILL }
13402
14
        },
13403
14
        { &hf_mbim_atds_operator_provider_id,
13404
14
            { "Provider Id", "mbim.control.atds_operator.provider_id",
13405
14
               FT_STRING, BASE_NONE, NULL, 0,
13406
14
              NULL, HFILL }
13407
14
        },
13408
14
        { &hf_mbim_atds_operator_provider_name,
13409
14
            { "Provider Name", "mbim.control.atds_operator.provider_name",
13410
14
               FT_STRING, BASE_NONE, NULL, 0,
13411
14
              NULL, HFILL }
13412
14
        },
13413
14
        { &hf_mbim_atds_operators_elem_count,
13414
14
            { "Element Count", "mbim.control.atds_operators.elem_count",
13415
14
               FT_UINT32, BASE_DEC, NULL, 0,
13416
14
              NULL, HFILL }
13417
14
        },
13418
14
        { &hf_mbim_atds_operators_operator_offset,
13419
14
            { "Provider Offset", "mbim.control.atds_operators.provider_offset",
13420
14
               FT_UINT32, BASE_DEC, NULL, 0,
13421
14
              NULL, HFILL }
13422
14
        },
13423
14
        { &hf_mbim_atds_operators_operator_size,
13424
14
            { "Provider Size", "mbim.control.atds_operators.provider_size",
13425
14
               FT_UINT32, BASE_DEC, NULL, 0,
13426
14
              NULL, HFILL }
13427
14
        },
13428
14
        { &hf_mbim_atds_rat_info_mode,
13429
14
            { "Mode", "mbim.control.atds_rat_info.mode",
13430
14
               FT_UINT32, BASE_DEC, VALS(mbim_adts_rat_info_mode_vals), 0,
13431
14
              NULL, HFILL }
13432
14
        },
13433
14
        { &hf_mbim_atds_projection_table_type,
13434
14
            { "Type", "mbim.control.atds_projection_table.type",
13435
14
               FT_UINT32, BASE_DEC, VALS(mbim_adts_projection_table_type_vals), 0,
13436
14
              NULL, HFILL }
13437
14
        },
13438
14
        { &hf_mbim_atds_projection_table_bar5min,
13439
14
            { "Bar5 Min", "mbim.control.atds_projection_table.bar5min",
13440
14
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13441
14
              NULL, HFILL }
13442
14
        },
13443
14
        { &hf_mbim_atds_projection_table_a5,
13444
14
            { "A5", "mbim.control.atds_projection_table.a5",
13445
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13446
14
              NULL, HFILL }
13447
14
        },
13448
14
        { &hf_mbim_atds_projection_table_b5,
13449
14
            { "B5", "mbim.control.atds_projection_table.b5",
13450
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13451
14
              NULL, HFILL }
13452
14
        },
13453
14
        { &hf_mbim_atds_projection_table_bar4min,
13454
14
            { "Bar4 Min", "mbim.control.atds_projection_table.bar4min",
13455
14
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13456
14
              NULL, HFILL }
13457
14
        },
13458
14
        { &hf_mbim_atds_projection_table_a4,
13459
14
            { "A4", "mbim.control.atds_projection_table.a4",
13460
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13461
14
              NULL, HFILL }
13462
14
        },
13463
14
        { &hf_mbim_atds_projection_table_b4,
13464
14
            { "B4", "mbim.control.atds_projection_table.b4",
13465
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13466
14
              NULL, HFILL }
13467
14
        },
13468
14
        { &hf_mbim_atds_projection_table_bar3min,
13469
14
            { "Bar3 Min", "mbim.control.atds_projection_table.bar3min",
13470
14
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13471
14
              NULL, HFILL }
13472
14
        },
13473
14
        { &hf_mbim_atds_projection_table_a3,
13474
14
            { "A3", "mbim.control.atds_projection_table.a3",
13475
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13476
14
              NULL, HFILL }
13477
14
        },
13478
14
        { &hf_mbim_atds_projection_table_b3,
13479
14
            { "B3", "mbim.control.atds_projection_table.b3",
13480
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13481
14
              NULL, HFILL }
13482
14
        },
13483
14
        { &hf_mbim_atds_projection_table_bar2min,
13484
14
            { "Bar2 Min", "mbim.control.atds_projection_table.bar2min",
13485
14
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13486
14
              NULL, HFILL }
13487
14
        },
13488
14
        { &hf_mbim_atds_projection_table_a2,
13489
14
            { "A2", "mbim.control.atds_projection_table.a2",
13490
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13491
14
              NULL, HFILL }
13492
14
        },
13493
14
        { &hf_mbim_atds_projection_table_b2,
13494
14
            { "B2", "mbim.control.atds_projection_table.b2",
13495
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13496
14
              NULL, HFILL }
13497
14
        },
13498
14
        { &hf_mbim_atds_projection_table_bar1min,
13499
14
            { "Bar1 Min", "mbim.control.atds_projection_table.bar1min",
13500
14
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13501
14
              NULL, HFILL }
13502
14
        },
13503
14
        { &hf_mbim_atds_projection_table_a1,
13504
14
            { "A1", "mbim.control.atds_projection_table.a1",
13505
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13506
14
              NULL, HFILL }
13507
14
        },
13508
14
        { &hf_mbim_atds_projection_table_b1,
13509
14
            { "B1", "mbim.control.atds_projection_table.b1",
13510
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13511
14
              NULL, HFILL }
13512
14
        },
13513
14
        { &hf_mbim_atds_projection_table_bar0min,
13514
14
            { "Bar0 Min", "mbim.control.atds_projection_table.bar0min",
13515
14
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13516
14
              NULL, HFILL }
13517
14
        },
13518
14
        { &hf_mbim_atds_projection_table_a0,
13519
14
            { "A0", "mbim.control.atds_projection_table.a0",
13520
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13521
14
              NULL, HFILL }
13522
14
        },
13523
14
        { &hf_mbim_atds_projection_table_b0,
13524
14
            { "B0", "mbim.control.atds_projection_table.b0",
13525
14
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13526
14
              NULL, HFILL }
13527
14
        },
13528
14
        { &hf_mbim_atds_projection_tables_elem_count,
13529
14
            { "Element Count", "mbim.control.atds_projection_tables.elem_count",
13530
14
               FT_UINT32, BASE_DEC, NULL, 0,
13531
14
              NULL, HFILL }
13532
14
        },
13533
14
        { &hf_mbim_atds_projection_tables_projection_table_offset,
13534
14
            { "Projection Table Offset", "mbim.control.atds_projection_tables.projection_table_offset",
13535
14
               FT_UINT32, BASE_DEC, NULL, 0,
13536
14
              NULL, HFILL }
13537
14
        },
13538
14
        { &hf_mbim_atds_projection_tables_projection_table_size,
13539
14
            { "Projection Table Size", "mbim.control.atds_projection_tables.projection_table_size",
13540
14
               FT_UINT32, BASE_DEC, NULL, 0,
13541
14
              NULL, HFILL }
13542
14
        },
13543
14
        { &hf_mbim_multiflow_caps_info_control_caps,
13544
14
            { "Control Caps", "mbim.control.multiflow_caps_info.control_caps",
13545
14
               FT_UINT32, BASE_HEX, NULL, 0,
13546
14
              NULL, HFILL }
13547
14
        },
13548
14
        { &hf_mbim_multiflow_caps_info_control_caps_uplink,
13549
14
            { "Uplink", "mbim.control.multiflow_caps_info.control_caps.uplink",
13550
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
13551
14
              NULL, HFILL }
13552
14
        },
13553
14
        { &hf_mbim_multiflow_caps_info_control_caps_downlink,
13554
14
            { "Downlink", "mbim.control.multiflow_caps_info.control_caps.downlink",
13555
14
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
13556
14
              NULL, HFILL }
13557
14
        },
13558
14
        { &hf_mbim_set_multiflow_state_state,
13559
14
            { "State", "mbim.control.set_multiflow_state.state",
13560
14
               FT_UINT32, BASE_DEC, VALS(mbim_multiflow_state_vals), 0,
13561
14
              NULL, HFILL }
13562
14
        },
13563
14
        { &hf_mbim_multiflow_state_info_state,
13564
14
            { "State", "mbim.control.multiflow_state_info.state",
13565
14
               FT_UINT32, BASE_DEC, VALS(mbim_multiflow_state_vals), 0,
13566
14
              NULL, HFILL }
13567
14
        },
13568
14
        { &hf_mbim_multiflow_tft_info_session_id,
13569
14
            { "Session Id", "mbim.control.multiflow_tft_info.session_id",
13570
14
               FT_UINT32, BASE_DEC, NULL, 0,
13571
14
              NULL, HFILL }
13572
14
        },
13573
14
        { &hf_mbim_multiflow_tft_info_elem_count,
13574
14
            { "Element Count", "mbim.control.multiflow_tft_info.elem_count",
13575
14
               FT_UINT32, BASE_DEC, NULL, 0,
13576
14
              NULL, HFILL }
13577
14
        },
13578
14
        { &hf_mbim_multiflow_tft_info_tft_list_offset,
13579
14
            { "TFT List Offset", "mbim.control.multiflow_tft_info.tft_list_offset",
13580
14
               FT_UINT32, BASE_DEC, NULL, 0,
13581
14
              NULL, HFILL }
13582
14
        },
13583
14
        { &hf_mbim_multiflow_tft_info_tft_list_size,
13584
14
            { "TFT List Size", "mbim.control.multiflow_tft_info.tft_list_size",
13585
14
               FT_UINT32, BASE_DEC, NULL, 0,
13586
14
              NULL, HFILL }
13587
14
        },
13588
14
        { &hf_mbim_set_ms_provisioned_context_v2_operation,
13589
14
            { "Operation", "mbim.control.set_ms_provisioned_context_v2.operation",
13590
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_operations_vals), 0,
13591
14
              NULL, HFILL }
13592
14
        },
13593
14
        { &hf_mbim_set_ms_provisioned_context_v2_ip_type,
13594
14
            { "IP Type", "mbim.control.set_ms_provisioned_context_v2.ip_type",
13595
14
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
13596
14
              NULL, HFILL }
13597
14
        },
13598
14
        { &hf_mbim_set_ms_provisioned_context_v2_enable,
13599
14
            { "Enable", "mbim.control.set_ms_provisioned_context_v2.enable",
13600
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_enable_vals), 0,
13601
14
              NULL, HFILL }
13602
14
        },
13603
14
        { &hf_mbim_set_ms_provisioned_context_v2_roaming,
13604
14
            { "Roaming", "mbim.control.set_ms_provisioned_context_v2.roaming",
13605
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_roaming_control_vals), 0,
13606
14
              NULL, HFILL }
13607
14
        },
13608
14
        { &hf_mbim_set_ms_provisioned_context_v2_media_type,
13609
14
            { "Media Type", "mbim.control.set_ms_provisioned_context_v2.media_type",
13610
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_media_type_vals), 0,
13611
14
              NULL, HFILL }
13612
14
        },
13613
14
        { &hf_mbim_set_ms_provisioned_context_v2_source,
13614
14
            { "Source", "mbim.control.set_ms_provisioned_context_v2.source",
13615
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_source_vals), 0,
13616
14
              NULL, HFILL }
13617
14
        },
13618
14
        { &hf_mbim_set_ms_provisioned_context_v2_access_string,
13619
14
            { "Access String", "mbim.control.set_ms_provisioned_context_v2.access_string",
13620
14
               FT_STRING, BASE_NONE, NULL, 0,
13621
14
              NULL, HFILL }
13622
14
        },
13623
14
        { &hf_mbim_set_ms_provisioned_context_v2_access_string_offset,
13624
14
            { "Access String Offset", "mbim.control.set_ms_provisioned_context_v2.access_string_offset",
13625
14
               FT_UINT32, BASE_DEC, NULL, 0,
13626
14
              NULL, HFILL }
13627
14
        },
13628
14
        { &hf_mbim_set_ms_provisioned_context_v2_access_string_size,
13629
14
            { "Access String Size", "mbim.control.set_ms_provisioned_context_v2.access_string_size",
13630
14
               FT_UINT32, BASE_DEC, NULL, 0,
13631
14
              NULL, HFILL }
13632
14
        },
13633
14
        { &hf_mbim_set_ms_provisioned_context_v2_user_name,
13634
14
            { "User Name", "mbim.control.set_ms_provisioned_context_v2.user_name",
13635
14
               FT_STRING, BASE_NONE, NULL, 0,
13636
14
              NULL, HFILL }
13637
14
        },
13638
14
        { &hf_mbim_set_ms_provisioned_context_v2_user_name_offset,
13639
14
            { "User Name Offset", "mbim.control.set_ms_provisioned_context_v2.user_name_offset",
13640
14
               FT_UINT32, BASE_DEC, NULL, 0,
13641
14
              NULL, HFILL }
13642
14
        },
13643
14
        { &hf_mbim_set_ms_provisioned_context_v2_user_name_size,
13644
14
            { "User Name Size", "mbim.control.set_ms_provisioned_context_v2.user_name_size",
13645
14
               FT_UINT32, BASE_DEC, NULL, 0,
13646
14
              NULL, HFILL }
13647
14
        },
13648
14
        { &hf_mbim_set_ms_provisioned_context_v2_password,
13649
14
            { "Password", "mbim.control.set_ms_provisioned_context_v2.password",
13650
14
               FT_STRING, BASE_NONE, NULL, 0,
13651
14
              NULL, HFILL }
13652
14
        },
13653
14
        { &hf_mbim_set_ms_provisioned_context_v2_password_offset,
13654
14
            { "Password Offset", "mbim.control.set_ms_provisioned_context_v2.password_offset",
13655
14
               FT_UINT32, BASE_DEC, NULL, 0,
13656
14
              NULL, HFILL }
13657
14
        },
13658
14
        { &hf_mbim_set_ms_provisioned_context_v2_password_size,
13659
14
            { "Password Size", "mbim.control.set_ms_provisioned_context_v2.password_size",
13660
14
               FT_UINT32, BASE_DEC, NULL, 0,
13661
14
              NULL, HFILL }
13662
14
        },
13663
14
        { &hf_mbim_set_ms_provisioned_context_v2_compression,
13664
14
            { "Compression", "mbim.control.set_ms_provisioned_context_v2.compression",
13665
14
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
13666
14
              NULL, HFILL }
13667
14
        },
13668
14
        { &hf_mbim_set_ms_provisioned_context_v2_auth_protocol,
13669
14
            { "Auth Protocol", "mbim.control.set_ms_provisioned_context_v2.auth_protocol",
13670
14
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
13671
14
              NULL, HFILL }
13672
14
        },
13673
14
        { &hf_mbim_ms_provisioned_context_info_v2_elem_count,
13674
14
            { "Element Count", "mbim.control.ms_provisioned_context_info_v2.auth_protocol",
13675
14
               FT_UINT32, BASE_DEC, NULL, 0,
13676
14
              NULL, HFILL }
13677
14
        },
13678
14
        { &hf_mbim_ms_provisioned_context_info_v2_list_offset,
13679
14
            { "Item Offset", "mbim.control.ms_provisioned_context_info_v2.list_offset",
13680
14
               FT_UINT32, BASE_DEC, NULL, 0,
13681
14
              NULL, HFILL }
13682
14
        },
13683
14
        { &hf_mbim_ms_provisioned_context_info_v2_list_size,
13684
14
            { "Item Size", "mbim.control.ms_provisioned_context_info_v2.list_size",
13685
14
               FT_UINT32, BASE_DEC, NULL, 0,
13686
14
              NULL, HFILL }
13687
14
        },
13688
14
        { &hf_mbim_ms_provisioned_context_info_v2_context_id,
13689
14
            { "Context ID", "mbim.control.ms_provisioned_context_info_v2.context_id",
13690
14
               FT_UINT32, BASE_DEC, NULL, 0,
13691
14
              NULL, HFILL }
13692
14
        },
13693
14
        { &hf_mbim_ms_network_blacklist_state_sim_provider_actuated,
13694
14
            { "SIM Provide Actuated", "mbim.control.ms_provisioned_context_info_v2.sim_provider_actuated",
13695
14
               FT_BOOLEAN, 32, TFS(&tfs_activated_deactivated), 0x00000001,
13696
14
              NULL, HFILL }
13697
14
        },
13698
14
        { &hf_mbim_ms_network_blacklist_state_network_provider_actuated,
13699
14
            { "Network Provider Actuated", "mbim.control.ms_provisioned_context_info_v2.network_provider_actuated",
13700
14
               FT_BOOLEAN, 32, TFS(&tfs_activated_deactivated), 0x00000002,
13701
14
              NULL, HFILL }
13702
14
        },
13703
14
        { &hf_mbim_ms_network_blacklist_info_blacklist_state,
13704
14
            { "Blacklist State", "mbim.control.mbim_ms_network_blacklist_info.blacklist_state",
13705
14
               FT_UINT32, BASE_DEC, NULL, 0,
13706
14
              NULL, HFILL }
13707
14
        },
13708
14
        { &hf_mbim_ms_network_blacklist_info_elem_count,
13709
14
            { "Element Count", "mbim.control.mbim_ms_network_blacklist_info.elem_count",
13710
14
               FT_UINT32, BASE_DEC, NULL, 0,
13711
14
              NULL, HFILL }
13712
14
        },
13713
14
        { &hf_mbim_ms_network_blacklist_info_list_offset,
13714
14
            { "Provider Blacklist Offset", "mbim.control.mbim_ms_network_blacklist_info.item_offset",
13715
14
               FT_UINT32, BASE_DEC, NULL, 0,
13716
14
              NULL, HFILL }
13717
14
        },
13718
14
        { &hf_mbim_ms_network_blacklist_info_list_size,
13719
14
            { "Provider Blacklist Size", "mbim.control.mbim_ms_network_blacklist_info.item_size",
13720
14
               FT_UINT32, BASE_DEC, NULL, 0,
13721
14
              NULL, HFILL }
13722
14
        },
13723
14
        { &hf_mbim_ms_network_blacklist_provider_mcc,
13724
14
            { "MCC", "mbim.control.ms_network_blacklist_provider.mcc",
13725
14
               FT_UINT32, BASE_DEC, NULL, 0,
13726
14
              NULL, HFILL }
13727
14
        },
13728
14
        { &hf_mbim_ms_network_blacklist_provider_mnc,
13729
14
            { "MNC", "mbim.control.ms_network_blacklist_provider.mnc",
13730
14
               FT_UINT32, BASE_DEC, NULL, 0,
13731
14
              NULL, HFILL }
13732
14
        },
13733
14
        { &hf_mbim_ms_network_blacklist_provider_type,
13734
14
            { "Blacklist Type", "mbim.control.ms_network_blacklist_provider.blacklist_type",
13735
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_network_blacklist_type_vals), 0,
13736
14
              NULL, HFILL }
13737
14
        },
13738
14
        { &hf_mbim_sys_caps_info_number_of_executors,
13739
14
            { "Number of Executors", "mbim.control.sys_caps_info.number_of_executors",
13740
14
               FT_UINT32, BASE_DEC, NULL, 0,
13741
14
              NULL, HFILL }
13742
14
        },
13743
14
        { &hf_mbim_sys_caps_info_number_of_slots,
13744
14
            { "Number of Slots", "mbim.control.sys_caps_info.number_of_slots",
13745
14
               FT_UINT32, BASE_DEC, NULL, 0,
13746
14
              NULL, HFILL }
13747
14
        },
13748
14
        { &hf_mbim_sys_caps_info_concurrency,
13749
14
            { "Concurrency", "mbim.control.sys_caps_info.concurrency",
13750
14
               FT_UINT32, BASE_DEC, NULL, 0,
13751
14
              NULL, HFILL }
13752
14
        },
13753
14
        { &hf_mbim_sys_caps_info_modem_id,
13754
14
            { "Modem Id", "mbim.control.sys_caps_info.modem_id",
13755
14
               FT_UINT64, BASE_HEX, NULL, 0,
13756
14
              NULL, HFILL }
13757
14
        },
13758
14
        { &hf_mbim_ms_set_lte_attach_operation,
13759
14
            { "Operation", "mbim.control.set_lte_attach.operation",
13760
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_set_lte_attach_operations_vals), 0,
13761
14
              NULL, HFILL }
13762
14
        },
13763
14
        { &hf_mbim_ms_lte_attach_context_count,
13764
14
            { "Context Count", "mbim.control.ms_lte_attach_context.count",
13765
14
               FT_UINT32, BASE_DEC, NULL, 0,
13766
14
              NULL, HFILL }
13767
14
        },
13768
14
        { &hf_mbim_ms_lte_attach_context_offset,
13769
14
            { "Context Offset", "mbim.control.ms_lte_attach_context.offset",
13770
14
               FT_UINT32, BASE_DEC, NULL, 0,
13771
14
              NULL, HFILL }
13772
14
        },
13773
14
        { &hf_mbim_ms_lte_attach_context_size,
13774
14
            { "Context Size", "mbim.control.ms_lte_attach_context.size",
13775
14
               FT_UINT32, BASE_DEC, NULL, 0,
13776
14
              NULL, HFILL }
13777
14
        },
13778
14
        { &hf_mbim_ms_lte_attach_context_ip_type,
13779
14
            { "IP Type", "mbim.control.ms_lte_attach_context.ip_type",
13780
14
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
13781
14
              NULL, HFILL }
13782
14
        },
13783
14
        { &hf_mbim_ms_lte_attach_context_roaming,
13784
14
            { "Roaming", "mbim.control.ms_lte_attach_context.roaming",
13785
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_roaming_control_vals), 0,
13786
14
              NULL, HFILL }
13787
14
        },
13788
14
        { &hf_mbim_ms_lte_attach_context_source,
13789
14
            { "Source", "mbim.control.ms_lte_attach_context.source",
13790
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_source_vals), 0,
13791
14
              NULL, HFILL }
13792
14
        },
13793
14
        { &hf_mbim_ms_lte_attach_context_access_string,
13794
14
            { "Access String", "mbim.control.ms_lte_attach_context.access_string",
13795
14
               FT_STRING, BASE_NONE, NULL, 0,
13796
14
              NULL, HFILL }
13797
14
        },
13798
14
        { &hf_mbim_ms_lte_attach_context_access_string_offset,
13799
14
            { "Access String Offset", "mbim.control.ms_lte_attach_context.access_string_offset",
13800
14
               FT_UINT32, BASE_DEC, NULL, 0,
13801
14
              NULL, HFILL }
13802
14
        },
13803
14
        { &hf_mbim_ms_lte_attach_context_access_string_size,
13804
14
            { "Access String Size", "mbim.control.ms_lte_attach_context.access_string_size",
13805
14
               FT_UINT32, BASE_DEC, NULL, 0,
13806
14
              NULL, HFILL }
13807
14
        },
13808
14
        { &hf_mbim_ms_lte_attach_context_user_name,
13809
14
            { "User Name", "mbim.control.ms_lte_attach_context.user_name",
13810
14
               FT_STRING, BASE_NONE, NULL, 0,
13811
14
              NULL, HFILL }
13812
14
        },
13813
14
        { &hf_mbim_ms_lte_attach_context_user_name_offset,
13814
14
            { "User Name Offset", "mbim.control.ms_lte_attach_context.user_name_offset",
13815
14
               FT_UINT32, BASE_DEC, NULL, 0,
13816
14
              NULL, HFILL }
13817
14
        },
13818
14
        { &hf_mbim_ms_lte_attach_context_user_name_size,
13819
14
            { "User Name Size", "mbim.control.ms_lte_attach_context.user_name_size",
13820
14
               FT_UINT32, BASE_DEC, NULL, 0,
13821
14
              NULL, HFILL }
13822
14
        },
13823
14
        { &hf_mbim_ms_lte_attach_context_password,
13824
14
            { "Password", "mbim.control.ms_lte_attach_context.password",
13825
14
               FT_STRING, BASE_NONE, NULL, 0,
13826
14
              NULL, HFILL }
13827
14
        },
13828
14
        { &hf_mbim_ms_lte_attach_context_password_offset,
13829
14
            { "Password Offset", "mbim.control.ms_lte_attach_context.password_offset",
13830
14
               FT_UINT32, BASE_DEC, NULL, 0,
13831
14
              NULL, HFILL }
13832
14
        },
13833
14
        { &hf_mbim_ms_lte_attach_context_password_size,
13834
14
            { "Password Size", "mbim.control.ms_lte_attach_context.password_size",
13835
14
               FT_UINT32, BASE_DEC, NULL, 0,
13836
14
              NULL, HFILL }
13837
14
        },
13838
14
        { &hf_mbim_ms_lte_attach_context_compression,
13839
14
            { "Compression", "mbim.control.ms_lte_attach_context.compression",
13840
14
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
13841
14
              NULL, HFILL }
13842
14
        },
13843
14
        { &hf_mbim_ms_lte_attach_context_auth_protocol,
13844
14
            { "Auth Protocol", "mbim.control.ms_lte_attach_context.auth_protocol",
13845
14
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
13846
14
              NULL, HFILL }
13847
14
        },
13848
14
        { &hf_mbim_ms_lte_attach_state,
13849
14
            { "Auth Protocol", "mbim.control.ms_lte_attach.state",
13850
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_lte_attach_state_vals), 0,
13851
14
              NULL, HFILL }
13852
14
        },
13853
14
        { &hf_mbim_ms_device_slot_mapping_info_map_count,
13854
14
            { "Map Count", "mbim.control.ms_device_slot_mapping_info.map_count",
13855
14
               FT_UINT32, BASE_DEC, NULL, 0,
13856
14
              NULL, HFILL }
13857
14
        },
13858
14
        { &hf_mbim_ms_device_slot_mapping_info_map_offset,
13859
14
            { "Slot Map Offset", "mbim.control.ms_device_slot_mapping_info.map_offset",
13860
14
               FT_UINT32, BASE_DEC, NULL, 0,
13861
14
              NULL, HFILL }
13862
14
        },
13863
14
        { &hf_mbim_ms_device_slot_mapping_info_map_size,
13864
14
            { "Slot Map Size", "mbim.control.ms_device_slot_mapping_info.map_size",
13865
14
               FT_UINT32, BASE_DEC, NULL, 0,
13866
14
              NULL, HFILL }
13867
14
        },
13868
14
        { &hf_mbim_ms_device_slot_mapping_info_executor_slot_index,
13869
14
            { "Slot Index", "mbim.control.ms_device_slot_mapping_info.slot_index",
13870
14
               FT_UINT32, BASE_DEC, NULL, 0,
13871
14
              NULL, HFILL }
13872
14
        },
13873
14
        { &hf_mbim_ms_slot_info_req_slot_index,
13874
14
            { "Slot Index", "mbim.control.ms_slot_info_req.slot_index",
13875
14
               FT_UINT32, BASE_DEC, NULL, 0,
13876
14
              NULL, HFILL }
13877
14
        },
13878
14
        { &hf_mbim_ms_slot_info_slot_index,
13879
14
            { "Slot Index", "mbim.control.ms_slot_info.slot_index",
13880
14
               FT_UINT32, BASE_DEC, NULL, 0,
13881
14
              NULL, HFILL }
13882
14
        },
13883
14
        { &hf_mbim_ms_slot_info_state,
13884
14
            { "State", "mbim.control.ms_slot_info.state",
13885
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_uiccslot_state_vals), 0,
13886
14
              NULL, HFILL }
13887
14
        },
13888
14
        { &hf_mbim_base_station_max_gsm_count,
13889
14
            { "Max GSM Count", "mbim.control.base_station.max_gsm_count",
13890
14
               FT_UINT32, BASE_DEC, NULL, 0,
13891
14
              NULL, HFILL }
13892
14
        },
13893
14
        { &hf_mbim_base_station_max_umts_count,
13894
14
            { "Max UMTS Count", "mbim.control.base_station.max_umts_count",
13895
14
               FT_UINT32, BASE_DEC, NULL, 0,
13896
14
              NULL, HFILL }
13897
14
        },
13898
14
        { &hf_mbim_base_station_max_td_scdma_count,
13899
14
            { "Max TD-SCDMA Count", "mbim.control.base_station.max_td_scdma_count",
13900
14
               FT_UINT32, BASE_DEC, NULL, 0,
13901
14
              NULL, HFILL }
13902
14
        },
13903
14
        { &hf_mbim_base_station_max_lte_count,
13904
14
            { "Max LTE Count", "mbim.control.base_station.max_lte_count",
13905
14
               FT_UINT32, BASE_DEC, NULL, 0,
13906
14
              NULL, HFILL }
13907
14
        },
13908
14
        { &hf_mbim_base_station_max_cdma_count,
13909
14
            { "Max CDMA Count", "mbim.control.base_station.max_cdma_count",
13910
14
               FT_UINT32, BASE_DEC, NULL, 0,
13911
14
              NULL, HFILL }
13912
14
        },
13913
14
        { &hf_mbim_base_station_max_nr_count,
13914
14
            { "Max NR Count", "mbim.control.base_station.max_nr_count",
13915
14
               FT_UINT32, BASE_DEC, NULL, 0,
13916
14
              NULL, HFILL }
13917
14
        },
13918
14
        { &hf_mbim_base_station_provider_id_offset,
13919
14
            { "Provider Id Offset", "mbim.control.base_station.provider_id_offset",
13920
14
               FT_UINT32, BASE_DEC, NULL, 0,
13921
14
              NULL, HFILL }
13922
14
        },
13923
14
        { &hf_mbim_base_station_provider_id_size,
13924
14
            { "Provider Id Size", "mbim.control.base_station.provider_id_size",
13925
14
               FT_UINT32, BASE_DEC, NULL, 0,
13926
14
              NULL, HFILL }
13927
14
        },
13928
14
        { &hf_mbim_base_station_location_area_code,
13929
14
            { "Location Area Code", "mbim.control.base_station.location_area_code",
13930
14
               FT_UINT32, BASE_DEC, NULL, 0,
13931
14
              NULL, HFILL }
13932
14
        },
13933
14
        { &hf_mbim_base_station_cell_id,
13934
14
            { "Cell Id", "mbim.control.base_station.cell_id",
13935
14
               FT_UINT32, BASE_DEC, NULL, 0,
13936
14
              NULL, HFILL }
13937
14
        },
13938
14
        { &hf_mbim_base_station_timing_advance,
13939
14
            { "Timing Advance", "mbim.control.base_station.provider_timing_advance",
13940
14
               FT_UINT64, BASE_DEC, NULL, 0,
13941
14
              NULL, HFILL }
13942
14
        },
13943
14
        { &hf_mbim_base_station_arfcn,
13944
14
            { "ARFCN", "mbim.control.base_station.arfcn",
13945
14
               FT_UINT32, BASE_DEC, NULL, 0,
13946
14
              NULL, HFILL }
13947
14
        },
13948
14
        { &hf_mbim_base_station_base_station_id,
13949
14
            { "Base Station Id", "mbim.control.base_station.base_station_id",
13950
14
               FT_UINT32, BASE_DEC, NULL, 0,
13951
14
              NULL, HFILL }
13952
14
        },
13953
14
        { &hf_mbim_base_station_rx_level,
13954
14
            { "Rx Level", "mbim.control.base_station.rx_level",
13955
14
               FT_UINT32, BASE_DEC, NULL, 0,
13956
14
              NULL, HFILL }
13957
14
        },
13958
14
        { &hf_mbim_base_station_provider_id,
13959
14
            { "Provider Id", "mbim.control.base_station.provider_id",
13960
14
               FT_STRING, BASE_NONE, NULL, 0,
13961
14
              NULL, HFILL }
13962
14
        },
13963
14
        { &hf_mbim_base_station_frequency_info_ul,
13964
14
            { "Frequency Info Ul", "mbim.control.base_station.frequency_info_ul",
13965
14
               FT_UINT32, BASE_DEC, NULL, 0,
13966
14
              NULL, HFILL }
13967
14
        },
13968
14
        { &hf_mbim_base_station_frequency_info_dl,
13969
14
            { "Frequency Info Dl", "mbim.control.base_station.frequency_info_dl",
13970
14
               FT_UINT32, BASE_DEC, NULL, 0,
13971
14
              NULL, HFILL }
13972
14
        },
13973
14
        { &hf_mbim_base_station_frequency_info_nt,
13974
14
            { "Frequency Info Nt", "mbim.control.base_station.frequency_info_nt",
13975
14
               FT_UINT32, BASE_DEC, NULL, 0,
13976
14
              NULL, HFILL }
13977
14
        },
13978
14
        { &hf_mbim_base_station_uarfcn,
13979
14
            { "UARFCN", "mbim.control.base_station.uarfcn",
13980
14
               FT_UINT32, BASE_DEC, NULL, 0,
13981
14
              NULL, HFILL }
13982
14
        },
13983
14
        { &hf_mbim_base_station_primary_scrambling_code,
13984
14
            { "Primary Scrambling Code", "mbim.control.base_station.primary_scrambling_code",
13985
14
               FT_UINT32, BASE_DEC, NULL, 0,
13986
14
              NULL, HFILL }
13987
14
        },
13988
14
        { &hf_mbim_base_station_ecno,
13989
14
            { "EcNo", "mbim.control.base_station.ecno",
13990
14
               FT_UINT32, BASE_DEC, NULL, 0,
13991
14
              NULL, HFILL }
13992
14
        },
13993
14
        { &hf_mbim_base_station_rscp,
13994
14
            { "RSCP", "mbim.control.base_station.rscp",
13995
14
               FT_UINT32, BASE_DEC, NULL, 0,
13996
14
              NULL, HFILL }
13997
14
        },
13998
14
        { &hf_mbim_base_station_path_loss,
13999
14
            { "Path Loss", "mbim.control.base_station.path_loss",
14000
14
               FT_UINT32, BASE_DEC, NULL, 0,
14001
14
              NULL, HFILL }
14002
14
        },
14003
14
        { &hf_mbim_base_station_call_parameter,
14004
14
            { "Call Parameter", "mbim.control.base_station.call_parameter",
14005
14
               FT_UINT32, BASE_DEC, NULL, 0,
14006
14
              NULL, HFILL }
14007
14
        },
14008
14
        { &hf_mbim_base_station_earfcn,
14009
14
            { "EARFCN", "mbim.control.base_station.earfcn",
14010
14
               FT_UINT32, BASE_DEC, NULL, 0,
14011
14
              NULL, HFILL }
14012
14
        },
14013
14
        { &hf_mbim_base_station_physical_cell_id,
14014
14
            { "Physical Cell Id", "mbim.control.base_station.physical_cell_id",
14015
14
               FT_UINT32, BASE_DEC, NULL, 0,
14016
14
              NULL, HFILL }
14017
14
        },
14018
14
        { &hf_mbim_base_station_tac,
14019
14
            { "TAC", "mbim.control.base_station.tac",
14020
14
               FT_UINT32, BASE_DEC, NULL, 0,
14021
14
              NULL, HFILL }
14022
14
        },
14023
14
        { &hf_mbim_base_station_rsrp,
14024
14
            { "RSRP", "mbim.control.base_station.rsrp",
14025
14
               FT_UINT32, BASE_DEC, NULL, 0,
14026
14
              NULL, HFILL }
14027
14
        },
14028
14
        { &hf_mbim_base_station_rsrq,
14029
14
            { "RSRQ", "mbim.control.base_station.rsrq",
14030
14
               FT_UINT32, BASE_DEC, NULL, 0,
14031
14
              NULL, HFILL }
14032
14
        },
14033
14
        { &hf_mbim_base_station_serving_cell_flag,
14034
14
            { "Serving Cell Flag", "mbim.control.ms_slot_info.serving_cell_flag",
14035
14
               FT_UINT32, BASE_DEC, VALS(mbim_base_station_serving_cell_flag_vals), 0,
14036
14
              NULL, HFILL }
14037
14
        },
14038
14
        { &hf_mbim_base_station_nid,
14039
14
            { "NID", "mbim.control.base_station.nid",
14040
14
               FT_UINT32, BASE_DEC, NULL, 0,
14041
14
              NULL, HFILL }
14042
14
        },
14043
14
        { &hf_mbim_base_station_sid,
14044
14
            { "SID", "mbim.control.base_station.sid",
14045
14
               FT_UINT32, BASE_DEC, NULL, 0,
14046
14
              NULL, HFILL }
14047
14
        },
14048
14
        { &hf_mbim_base_station_base_latitude,
14049
14
            { "Base Latitude", "mbim.control.base_station.base_latitude",
14050
14
               FT_UINT32, BASE_DEC, NULL, 0,
14051
14
              NULL, HFILL }
14052
14
        },
14053
14
        { &hf_mbim_base_station_base_longitude,
14054
14
            { "Base Longitude", "mbim.control.base_station.base_longitude",
14055
14
               FT_UINT32, BASE_DEC, NULL, 0,
14056
14
              NULL, HFILL }
14057
14
        },
14058
14
        { &hf_mbim_base_station_ref_pn,
14059
14
            { "Ref PN", "mbim.control.base_station.ref_pn",
14060
14
               FT_UINT32, BASE_DEC, NULL, 0,
14061
14
              NULL, HFILL }
14062
14
        },
14063
14
        { &hf_mbim_base_station_gps_seconds,
14064
14
            { "GPS Seconds", "mbim.control.base_station.gps_seconds",
14065
14
               FT_UINT32, BASE_DEC, NULL, 0,
14066
14
              NULL, HFILL }
14067
14
        },
14068
14
        { &hf_mbim_base_station_pilot_strength,
14069
14
            { "Pilot Strength", "mbim.control.base_station.pilot_strength",
14070
14
               FT_UINT32, BASE_DEC, NULL, 0,
14071
14
              NULL, HFILL }
14072
14
        },
14073
14
        { &hf_mbim_base_station_nci,
14074
14
            { "NCI", "mbim.control.base_station.nci",
14075
14
               FT_UINT64, BASE_DEC, NULL, 0,
14076
14
              NULL, HFILL }
14077
14
        },
14078
14
        { &hf_mbim_base_station_sinr,
14079
14
            { "SINR", "mbim.control.base_station.sinr",
14080
14
               FT_UINT32, BASE_DEC, NULL, 0,
14081
14
              NULL, HFILL }
14082
14
        },
14083
14
        { &hf_mbim_base_station_cell_id_offset,
14084
14
            { "Cell Id Offset", "mbim.control.base_station.cell_id_offset",
14085
14
               FT_UINT32, BASE_DEC, NULL, 0,
14086
14
              NULL, HFILL }
14087
14
        },
14088
14
        { &hf_mbim_base_station_cell_id_size,
14089
14
            { "Cell Id Size", "mbim.control.base_station.cell_id_size",
14090
14
               FT_UINT32, BASE_DEC, NULL, 0,
14091
14
              NULL, HFILL }
14092
14
        },
14093
14
        { &hf_mbim_base_station_cell_id_string,
14094
14
            { "Cell Id", "mbim.control.ms_app_info.cell_id",
14095
14
               FT_STRING, BASE_NONE, NULL, 0,
14096
14
              NULL, HFILL }
14097
14
        },
14098
14
        { &hf_mbim_base_station_system_type,
14099
14
            { "System Type", "mbim.control.base_station.system_type",
14100
14
               FT_UINT32, BASE_DEC, NULL, 0,
14101
14
              NULL, HFILL }
14102
14
        },
14103
14
        { &hf_mbim_base_station_system_sub_type,
14104
14
            { "System Sub Type", "mbim.control.base_station.system_sub_type",
14105
14
               FT_UINT32, BASE_DEC, NULL, 0,
14106
14
              NULL, HFILL }
14107
14
        },
14108
14
        { &hf_mbim_base_station_gsm_serving_cell_offset,
14109
14
            { "GSM Serving Cell Offset", "mbim.control.base_station.gsm_serving_cell_offset",
14110
14
               FT_UINT32, BASE_DEC, NULL, 0,
14111
14
              NULL, HFILL }
14112
14
        },
14113
14
        { &hf_mbim_base_station_gsm_serving_cell_size,
14114
14
            { "GSM Serving Cell size", "mbim.control.base_station.gsm_serving_cell_size",
14115
14
               FT_UINT32, BASE_DEC, NULL, 0,
14116
14
              NULL, HFILL }
14117
14
        },
14118
14
        { &hf_mbim_base_station_umts_serving_cell_offset,
14119
14
            { "UMTS Serving Cell Offset", "mbim.control.base_station.umts_serving_cell_offset",
14120
14
               FT_UINT32, BASE_DEC, NULL, 0,
14121
14
              NULL, HFILL }
14122
14
        },
14123
14
        { &hf_mbim_base_station_umts_serving_cell_size,
14124
14
            { "UMTS Serving Cell Size", "mbim.control.base_station.umts_serving_cell_size",
14125
14
               FT_UINT32, BASE_DEC, NULL, 0,
14126
14
              NULL, HFILL }
14127
14
        },
14128
14
        { &hf_mbim_base_station_td_scdma_serving_cell_offset,
14129
14
            { "TD-SCDMA Serving Cell Offset", "mbim.control.base_station.td_scdma_serving_cell_offset",
14130
14
               FT_UINT32, BASE_DEC, NULL, 0,
14131
14
              NULL, HFILL }
14132
14
        },
14133
14
        { &hf_mbim_base_station_td_scdma_serving_cell_size,
14134
14
            { "TD-SCDMA Serving Cell Size", "mbim.control.base_station.td_scdma_serving_cell_size",
14135
14
               FT_UINT32, BASE_DEC, NULL, 0,
14136
14
              NULL, HFILL }
14137
14
        },
14138
14
        { &hf_mbim_base_station_lte_serving_cell_offset,
14139
14
            { "LTE Serving Cell Offset", "mbim.control.base_station.lte_serving_cell_offset",
14140
14
               FT_UINT32, BASE_DEC, NULL, 0,
14141
14
              NULL, HFILL }
14142
14
        },
14143
14
        { &hf_mbim_base_station_lte_serving_cell_size,
14144
14
            { "LTE Serving Cell Size", "mbim.control.base_station.lte_serving_cell_size",
14145
14
               FT_UINT32, BASE_DEC, NULL, 0,
14146
14
              NULL, HFILL }
14147
14
        },
14148
14
        { &hf_mbim_base_station_gsm_nmr_offset,
14149
14
            { "GSM NMR Offset", "mbim.control.base_station.gsm_nmr_offset",
14150
14
               FT_UINT32, BASE_DEC, NULL, 0,
14151
14
              NULL, HFILL }
14152
14
        },
14153
14
        { &hf_mbim_base_station_gsm_nmr_size,
14154
14
            { "GSM NMR Size", "mbim.control.base_station.gsm_nmr_size",
14155
14
               FT_UINT32, BASE_DEC, NULL, 0,
14156
14
              NULL, HFILL }
14157
14
        },
14158
14
        { &hf_mbim_base_station_umts_mrl_offset,
14159
14
            { "UMTS MRL Offset", "mbim.control.base_station.umts_mrl_offset",
14160
14
               FT_UINT32, BASE_DEC, NULL, 0,
14161
14
              NULL, HFILL }
14162
14
        },
14163
14
        { &hf_mbim_base_station_umts_mrl_size,
14164
14
            { "UMTS MRL Size", "mbim.control.base_station.umts_mrl_size",
14165
14
               FT_UINT32, BASE_DEC, NULL, 0,
14166
14
              NULL, HFILL }
14167
14
        },
14168
14
        { &hf_mbim_base_station_td_scdma_mrl_offset,
14169
14
            { "TD-SCDMA MRL Offset", "mbim.control.base_station.td_scdma_mrl_offset",
14170
14
               FT_UINT32, BASE_DEC, NULL, 0,
14171
14
              NULL, HFILL }
14172
14
        },
14173
14
        { &hf_mbim_base_station_td_scdma_mrl_size,
14174
14
            { "TD-SCDMA MRL Offset", "mbim.control.base_station.td_scdma_mrl_size",
14175
14
               FT_UINT32, BASE_DEC, NULL, 0,
14176
14
              NULL, HFILL }
14177
14
        },
14178
14
        { &hf_mbim_base_station_lte_mrl_offset,
14179
14
            { "LTE MRL Offset", "mbim.control.base_station.lte_mrl_offset",
14180
14
               FT_UINT32, BASE_DEC, NULL, 0,
14181
14
              NULL, HFILL }
14182
14
        },
14183
14
        { &hf_mbim_base_station_lte_mrl_size,
14184
14
            { "LTE MRL Size", "mbim.control.base_station.lte_mrl_size",
14185
14
               FT_UINT32, BASE_DEC, NULL, 0,
14186
14
              NULL, HFILL }
14187
14
        },
14188
14
        { &hf_mbim_base_station_cdma_mrl_offset,
14189
14
            { "CDMA MRL Offset", "mbim.control.base_station.cdma_mrl_offset",
14190
14
               FT_UINT32, BASE_DEC, NULL, 0,
14191
14
              NULL, HFILL }
14192
14
        },
14193
14
        { &hf_mbim_base_station_cdma_mrl_size,
14194
14
            { "CDMA MRL Size", "mbim.control.base_station.cdma_mrl_size",
14195
14
               FT_UINT32, BASE_DEC, NULL, 0,
14196
14
              NULL, HFILL }
14197
14
        },
14198
14
        { &hf_mbim_base_station_nr_serving_cell_offset,
14199
14
            { "NR Serving Cell Offset", "mbim.control.base_station.nr_serving_cell_offset",
14200
14
               FT_UINT32, BASE_DEC, NULL, 0,
14201
14
              NULL, HFILL }
14202
14
        },
14203
14
        { &hf_mbim_base_station_nr_serving_cell_size,
14204
14
            { "NR Serving Cell Size", "mbim.control.base_station.nr_serving_cell_size",
14205
14
               FT_UINT32, BASE_DEC, NULL, 0,
14206
14
              NULL, HFILL }
14207
14
        },
14208
14
        { &hf_mbim_base_station_nr_neighbor_cells_offset,
14209
14
            { "NR Neighbor Cells Offset", "mbim.control.base_station.nr_neighbor_cells_offset",
14210
14
               FT_UINT32, BASE_DEC, NULL, 0,
14211
14
              NULL, HFILL }
14212
14
        },
14213
14
        { &hf_mbim_base_station_nr_neighbor_cells_size,
14214
14
            { "NR Neighbor Cells Size", "mbim.control.base_station.nr_neighbor_cells_size",
14215
14
               FT_UINT32, BASE_DEC, NULL, 0,
14216
14
              NULL, HFILL }
14217
14
        },
14218
14
        { &hf_mbim_base_station_count,
14219
14
            { "Count", "mbim.control.base_station.count",
14220
14
               FT_UINT32, BASE_DEC, NULL, 0,
14221
14
              NULL, HFILL }
14222
14
        },
14223
14
        { &hf_mbim_version,
14224
14
            { "MBIM Version", "mbim.control.bcd_mbim_version",
14225
14
               FT_UINT16, BASE_CUSTOM, CF_FUNC(mbim_version_fmt), 0,
14226
14
              NULL, HFILL }
14227
14
        },
14228
14
        { &hf_mbim_extended_version,
14229
14
            { "MBIM Extended Version", "mbim.control.bcd_mbim_extended_version",
14230
14
               FT_UINT16, BASE_CUSTOM, CF_FUNC(mbim_version_fmt), 0,
14231
14
              NULL, HFILL }
14232
14
        },
14233
14
        { &hf_mbim_ms_modem_config_config_status,
14234
14
            { "Config Status", "mbim.control.ms_modem_config.config_status",
14235
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_modem_config_status_vals), 0,
14236
14
              NULL, HFILL }
14237
14
        },
14238
14
        { &hf_mbim_ms_registration_params_info_mico_mode,
14239
14
            { "Mico Mode", "mbim.control.ms_registration_params_info.mico_mode",
14240
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_mico_mode_vals), 0,
14241
14
              NULL, HFILL }
14242
14
        },
14243
14
        { &hf_mbim_ms_registration_params_info_drx_params,
14244
14
            { "DRX Params", "mbim.control.ms_registration_params_info.drx_params",
14245
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_drx_params_vals), 0,
14246
14
              NULL, HFILL }
14247
14
        },
14248
14
        { &hf_mbim_ms_registration_params_info_ladn_info,
14249
14
            { "LADN Info", "mbim.control.ms_registration_params_info.ladn_info",
14250
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_ladn_ind_vals), 0,
14251
14
              NULL, HFILL }
14252
14
        },
14253
14
        { &hf_mbim_ms_registration_params_info_default_pdu_hint,
14254
14
            { "Default PDU Hint", "mbim.control.ms_registration_params_info.default_pdu_hint",
14255
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_default_pdu_hint_vals), 0,
14256
14
              NULL, HFILL }
14257
14
        },
14258
14
        { &hf_mbim_ms_registration_params_info_re_register_if_needed,
14259
14
            { "Reregister If Needed", "mbim.control.ms_registration_params_info.re_register_if_needed",
14260
14
               FT_UINT32, BASE_DEC, NULL, 0,
14261
14
              NULL, HFILL }
14262
14
        },
14263
14
        { &hf_mbim_ms_network_params_info_mico_indication,
14264
14
            { "MICO indication", "mbim.control.ms_network_params_info.mico_indication",
14265
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_mico_indication_vals), 0,
14266
14
              NULL, HFILL }
14267
14
        },
14268
14
        { &hf_mbim_ms_network_params_info_drx_params,
14269
14
            { "DRX Params", "mbim.control.ms_network_params_info.drx_params",
14270
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_drx_params_vals), 0,
14271
14
              NULL, HFILL }
14272
14
        },
14273
14
        { &hf_mbim_ms_wake_reason_wake_type,
14274
14
            { "Wake Type", "mbim.control.ms_wake_reason.wake_type",
14275
14
               FT_UINT32, BASE_DEC, VALS(hf_mbim_ms_wake_reason_wake_type_vals), 0,
14276
14
              NULL, HFILL }
14277
14
        },
14278
14
        { &hf_mbim_ms_wake_reason_session_id,
14279
14
            { "Session ID", "mbim.control.ms_wake_reason.session_id",
14280
14
               FT_UINT32, BASE_DEC, NULL, 0,
14281
14
              NULL, HFILL }
14282
14
        },
14283
14
        { &hf_mbim_ms_wake_reason_command_payload_offset,
14284
14
            { "Payload Offset", "mbim.control.ms_wake_reason.command_payload_offset",
14285
14
               FT_UINT32, BASE_DEC, NULL, 0,
14286
14
              NULL, HFILL }
14287
14
        },
14288
14
        { &hf_mbim_ms_wake_reason_command_payload_size,
14289
14
            { "Payload Size", "mbim.control.ms_wake_reason.command_payload_size",
14290
14
               FT_UINT32, BASE_DEC, NULL, 0,
14291
14
              NULL, HFILL }
14292
14
        },
14293
14
        { &hf_mbim_ms_wake_reason_command_payload,
14294
14
            { "Payload", "mbim.control.ms_wake_reason.command_payload",
14295
14
               FT_BYTES, BASE_NONE, NULL, 0,
14296
14
              NULL, HFILL }
14297
14
        },
14298
14
        { &hf_mbim_ms_wake_reason_packet_original_size,
14299
14
            { "Original Size", "mbim.control.ms_wake_reason.packet_original_size",
14300
14
                FT_UINT32, BASE_DEC, NULL, 0,
14301
14
                NULL, HFILL }
14302
14
        },
14303
14
        { &hf_mbim_ms_wake_reason_packet_saved_offset,
14304
14
            { "Saved Offset", "mbim.control.ms_wake_reason.packet_saved_offset",
14305
14
               FT_UINT32, BASE_DEC, NULL, 0,
14306
14
              NULL, HFILL }
14307
14
        },
14308
14
        { &hf_mbim_ms_wake_reason_packet_saved_size,
14309
14
            { "Saved Size", "mbim.control.ms_wake_reason.packet_saved_size",
14310
14
               FT_UINT32, BASE_DEC, NULL, 0,
14311
14
              NULL, HFILL }
14312
14
        },
14313
14
        { &hf_mbim_ms_wake_reason_packet_saved_data,
14314
14
            { "Saved Data", "mbim.control.ms_wake_reason.packet_saved_data",
14315
14
               FT_BYTES, BASE_NONE, NULL, 0,
14316
14
              NULL, HFILL }
14317
14
        },
14318
14
        { &hf_mbim_ms_slot_id,
14319
14
            { "Slot Id", "mbim.control.ms_dual_sim.slot_id",
14320
14
               FT_UINT32, BASE_DEC, NULL, 0,
14321
14
              NULL, HFILL }
14322
14
        },
14323
14
        { &hf_mbim_ms_open_channel_app_id_size,
14324
14
            { "App Id Size", "mbim.control.ms_open_channel.app_id_size",
14325
14
               FT_UINT32, BASE_DEC, NULL, 0,
14326
14
              NULL, HFILL }
14327
14
        },
14328
14
        { &hf_mbim_ms_open_channel_app_id_offset,
14329
14
            { "App Id Offset", "mbim.control.ms_open_channel.app_id_offset",
14330
14
               FT_UINT32, BASE_DEC, NULL, 0,
14331
14
              NULL, HFILL }
14332
14
        },
14333
14
        { &hf_mbim_ms_open_channel_select_p2_arg,
14334
14
            { "Select P2 Arg", "mbim.control.ms_open_channel.select_p2_arg",
14335
14
               FT_UINT32, BASE_DEC, NULL, 0,
14336
14
              NULL, HFILL }
14337
14
        },
14338
14
        { &hf_mbim_ms_uicc_channel_group,
14339
14
            { "Channel Group", "mbim.control.ms_uicc.channel_group",
14340
14
               FT_UINT32, BASE_DEC, NULL, 0,
14341
14
              NULL, HFILL }
14342
14
        },
14343
14
        { &hf_mbim_ms_open_channel_app_id,
14344
14
            { "App Id", "mbim.control.ms_open_channel.app_id",
14345
14
               FT_BYTES, BASE_NONE, NULL, 0,
14346
14
              NULL, HFILL }
14347
14
        },
14348
14
        { &hf_mbim_ms_uicc_status,
14349
14
            { "Status", "mbim.control.ms_uicc.status",
14350
14
               FT_UINT32, BASE_DEC, NULL, 0,
14351
14
              NULL, HFILL }
14352
14
        },
14353
14
        { &hf_mbim_ms_uicc_channel,
14354
14
            { "Channel", "mbim.control.ms_uicc.channel",
14355
14
               FT_UINT32, BASE_DEC, NULL, 0,
14356
14
              NULL, HFILL }
14357
14
        },
14358
14
        { &hf_mbim_ms_uicc_response_length,
14359
14
            { "Response Length", "mbim.control.ms_uicc.response_length",
14360
14
               FT_UINT32, BASE_DEC, NULL, 0,
14361
14
              NULL, HFILL }
14362
14
        },
14363
14
        { &hf_mbim_ms_uicc_response_offset,
14364
14
            { "Response Offset", "mbim.control.ms_uicc.response_offset",
14365
14
               FT_UINT32, BASE_DEC, NULL, 0,
14366
14
              NULL, HFILL }
14367
14
        },
14368
14
        { &hf_mbim_ms_uicc_response,
14369
14
            { "Response", "mbim.control.ms_uicc.response",
14370
14
               FT_BYTES, BASE_NONE, NULL, 0,
14371
14
              NULL, HFILL }
14372
14
        },
14373
14
        { &hf_mbim_ms_apdu_secure_messaging,
14374
14
            { "Secure messaging", "mbim.control.ms_apdu.secure_messaging",
14375
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_apdu_secure_messaging_vals), 0,
14376
14
              NULL, HFILL }
14377
14
        },
14378
14
        { &hf_mbim_ms_apdu_type,
14379
14
            { "Type", "mbim.control.ms_apdu.type",
14380
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_apdu_type_vals), 0,
14381
14
              NULL, HFILL }
14382
14
        },
14383
14
        { &hf_mbim_ms_apdu_command_size,
14384
14
            { "Command Size", "mbim.control.ms_apdu.command_size",
14385
14
               FT_UINT32, BASE_DEC, NULL, 0,
14386
14
              NULL, HFILL }
14387
14
        },
14388
14
        { &hf_mbim_ms_apdu_command_offset,
14389
14
            { "Command Offset", "mbim.control.ms_apdu.command_offset",
14390
14
               FT_UINT32, BASE_DEC, NULL, 0,
14391
14
              NULL, HFILL }
14392
14
        },
14393
14
        { &hf_mbim_ms_apdu_command,
14394
14
            { "Command", "mbim.control.ms_apdu.command",
14395
14
               FT_BYTES, BASE_NONE, NULL, 0,
14396
14
              NULL, HFILL }
14397
14
        },
14398
14
        { &hf_mbim_ms_terminal_capability_count,
14399
14
            { "Capability Count", "mbim.control.ms_terminal_capability.count",
14400
14
               FT_UINT32, BASE_DEC, NULL, 0,
14401
14
              NULL, HFILL }
14402
14
        },
14403
14
        { &hf_mbim_ms_terminal_capability_offset,
14404
14
            { "Capability offset", "mbim.control.ms_terminal_capability.offset",
14405
14
               FT_UINT32, BASE_DEC, NULL, 0,
14406
14
              NULL, HFILL }
14407
14
        },
14408
14
        { &hf_mbim_ms_terminal_capability_size,
14409
14
            { "Capability size", "mbim.control.ms_terminal_capability.size",
14410
14
               FT_UINT32, BASE_DEC, NULL, 0,
14411
14
              NULL, HFILL }
14412
14
        },
14413
14
        { &hf_mbim_ms_terminal_capability,
14414
14
            { "Capability", "mbim.control.ms_terminal_capability.capability",
14415
14
               FT_BYTES, BASE_NONE, NULL, 0,
14416
14
              NULL, HFILL }
14417
14
        },
14418
14
        { &hf_mbim_ms_reset_pass_through_action,
14419
14
            { "Type", "mbim.control.ms_reset.pass_through_action",
14420
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_reset_pass_through_action_vals), 0,
14421
14
              NULL, HFILL }
14422
14
        },
14423
14
        { &hf_mbim_ms_atr_info_atr_offset,
14424
14
            { "ATR Offset", "mbim.control.ms_atr_info.atr_offset",
14425
14
               FT_UINT32, BASE_DEC, NULL, 0,
14426
14
              NULL, HFILL }
14427
14
        },
14428
14
        { &hf_mbim_ms_atr_info_atr_size,
14429
14
            { "ATR Size", "mbim.control.ms_atr_info.atr_size",
14430
14
               FT_UINT32, BASE_DEC, NULL, 0,
14431
14
              NULL, HFILL }
14432
14
        },
14433
14
        { &hf_mbim_ms_app_info_app_type,
14434
14
            { "App Type", "mbim.control.ms_app_info.app_type",
14435
14
               FT_UINT32, BASE_DEC, VALS(mbim_ms_uicc_app_type_vals), 0,
14436
14
              NULL, HFILL }
14437
14
        },
14438
14
        { &hf_mbim_ms_app_info_app_id_offset,
14439
14
            { "App ID Offset", "mbim.control.ms_app_info.app_id_offset",
14440
14
               FT_UINT32, BASE_DEC, NULL, 0,
14441
14
              NULL, HFILL }
14442
14
        },
14443
14
        { &hf_mbim_ms_app_info_app_id_size,
14444
14
            { "App ID Size", "mbim.control.ms_app_info.app_id_size",
14445
14
               FT_UINT32, BASE_DEC, NULL, 0,
14446
14
              NULL, HFILL }
14447
14
        },
14448
14
        { &hf_mbim_ms_app_info_app_id,
14449
14
            { "App ID", "mbim.control.ms_app_info.app_id",
14450
14
               FT_BYTES, BASE_NONE, NULL, 0,
14451
14
              NULL, HFILL }
14452
14
        },
14453
14
        { &hf_mbim_ms_app_info_app_name_offset,
14454
14
            { "App Name Offset", "mbim.control.ms_app_info.app_name_offset",
14455
14
               FT_UINT32, BASE_DEC, NULL, 0,
14456
14
              NULL, HFILL }
14457
14
        },
14458
14
        { &hf_mbim_ms_app_info_app_name_size,
14459
14
            { "App Name Size", "mbim.control.ms_app_info.app_name_size",
14460
14
               FT_UINT32, BASE_DEC, NULL, 0,
14461
14
              NULL, HFILL }
14462
14
        },
14463
14
        { &hf_mbim_ms_app_info_app_name,
14464
14
            { "App Name", "mbim.control.ms_app_info.app_name",
14465
14
               FT_STRING, BASE_NONE, NULL, 0,
14466
14
              NULL, HFILL }
14467
14
        },
14468
14
        { &hf_mbim_ms_app_info_num_pins,
14469
14
            { "Num Pins", "mbim.control.ms_app_info.num_pins",
14470
14
               FT_UINT32, BASE_DEC, NULL, 0,
14471
14
              NULL, HFILL }
14472
14
        },
14473
14
        { &hf_mbim_ms_app_info_pin_ref_offset,
14474
14
            { "Pin Ref Offset", "mbim.control.ms_app_info.pin_ref_offset",
14475
14
               FT_UINT32, BASE_DEC, NULL, 0,
14476
14
              NULL, HFILL }
14477
14
        },
14478
14
        { &hf_mbim_ms_app_info_pin_ref_size,
14479
14
            { "Pin Ref Size", "mbim.control.ms_app_info.pin_ref_size",
14480
14
               FT_UINT32, BASE_DEC, NULL, 0,
14481
14
              NULL, HFILL }
14482
14
        },
14483
14
        { &hf_mbim_ms_app_info_pin_ref,
14484
14
            { "Pin Ref", "mbim.control.ms_app_info.pin_ref",
14485
14
               FT_BYTES, BASE_NONE, NULL, 0,
14486
14
              NULL, HFILL }
14487
14
        },
14488
14
        { &hf_mbim_ms_app_list_version,
14489
14
            { "Version", "mbim.control.ms_app_list.version",
14490
14
               FT_UINT32, BASE_DEC, NULL, 0,
14491
14
              NULL, HFILL }
14492
14
        },
14493
14
        { &hf_mbim_ms_app_list_app_count,
14494
14
            { "App Count", "mbim.control.ms_app_list.app_count",
14495
14
               FT_UINT32, BASE_DEC, NULL, 0,
14496
14
              NULL, HFILL }
14497
14
        },
14498
14
        { &hf_mbim_ms_app_list_active_app_index,
14499
14
            { "Active App Index", "mbim.control.ms_app_list.active_app_index",
14500
14
               FT_UINT32, BASE_DEC, NULL, 0,
14501
14
              NULL, HFILL }
14502
14
        },
14503
14
        { &hf_mbim_ms_app_list_size,
14504
14
            { "App List Size", "mbim.control.ms_app_list.app_list_size",
14505
14
               FT_UINT32, BASE_DEC, NULL, 0,
14506
14
              NULL, HFILL }
14507
14
        },
14508
14
        { &hf_mbim_ms_app_list_app_info_offset,
14509
14
            { "App Info Offset", "mbim.control.ms_app_list.app_info_offset",
14510
14
               FT_UINT32, BASE_DEC, NULL, 0,
14511
14
              NULL, HFILL }
14512
14
        },
14513
14
        { &hf_mbim_ms_app_list_app_info_size,
14514
14
            { "App Info Size", "mbim.control.ms_app_list.app_info_size",
14515
14
               FT_UINT32, BASE_DEC, NULL, 0,
14516
14
              NULL, HFILL }
14517
14
        },
14518
14
        { &hf_mbim_ms_file_path_version,
14519
14
            { "Version", "mbim.control.ms_file_path.version",
14520
14
               FT_UINT32, BASE_DEC, NULL, 0,
14521
14
              NULL, HFILL }
14522
14
        },
14523
14
        { &hf_mbim_ms_file_path_app_id_offset,
14524
14
            { "App ID Offset", "mbim.control.ms_file_path.app_id_offset",
14525
14
               FT_UINT32, BASE_DEC, NULL, 0,
14526
14
              NULL, HFILL }
14527
14
        },
14528
14
        { &hf_mbim_ms_file_path_app_id_size,
14529
14
            { "App ID Size", "mbim.control.ms_file_path.app_id_size",
14530
14
               FT_UINT32, BASE_DEC, NULL, 0,
14531
14
              NULL, HFILL }
14532
14
        },
14533
14
        { &hf_mbim_ms_file_path_file_path_offset,
14534
14
            { "File Path Offset", "mbim.control.ms_file_path.file_path_offset",
14535
14
               FT_UINT32, BASE_DEC, NULL, 0,
14536
14
              NULL, HFILL }
14537
14
        },
14538
14
        { &hf_mbim_ms_file_path_file_path_size,
14539
14
            { "File Path Size", "mbim.control.ms_file_path.file_path_size",
14540
14
               FT_UINT32, BASE_DEC, NULL, 0,
14541
14
              NULL, HFILL }
14542
14
        },
14543
14
        { &hf_mbim_ms_file_path_app_id,
14544
14
            { "App ID", "mbim.control.ms_file_path.app_id",
14545
14
               FT_BYTES, BASE_NONE, NULL, 0,
14546
14
              NULL, HFILL }
14547
14
        },
14548
14
        { &hf_mbim_ms_file_path_file_path,
14549
14
            { "File Path", "mbim.control.ms_file_path.file_path",
14550
14
               FT_BYTES, BASE_NONE, NULL, 0,
14551
14
              NULL, HFILL }
14552
14
        },
14553
14
        { &hf_mbim_ms_file_status_version,
14554
14
            { "Version", "mbim.control.ms_file_status.version",
14555
14
               FT_UINT32, BASE_DEC, NULL, 0,
14556
14
              NULL, HFILL }
14557
14
        },
14558
14
        { &hf_mbim_ms_file_status_status_word_1,
14559
14
            { "Status Word 1", "mbim.control.ms_file_status.status_word_1",
14560
14
               FT_UINT32, BASE_DEC, NULL, 0,
14561
14
              NULL, HFILL }
14562
14
        },
14563
14
        { &hf_mbim_ms_file_status_status_word_2,
14564
14
            { "Status Word 2", "mbim.control.ms_file_status.status_word_2",
14565
14
               FT_UINT32, BASE_DEC, NULL, 0,
14566
14
              NULL, HFILL }
14567
14
        },
14568
14
        { &hf_mbim_ms_file_status_file_accessibility,
14569
14
            { "File Accessibility", "mbim.control.ms_file_status.file_accessibility",
14570
14
               FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_accessibility_vals), 0,
14571
14
              NULL, HFILL }
14572
14
        },
14573
14
        { &hf_mbim_ms_file_status_file_type,
14574
14
            { "File Type", "mbim.control.ms_file_status.file_type",
14575
14
               FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_type_vals), 0,
14576
14
              NULL, HFILL }
14577
14
        },
14578
14
        { &hf_mbim_ms_file_status_file_structure,
14579
14
            { "File Structure", "mbim.control.ms_file_status.file_structure",
14580
14
               FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_structure_vals), 0,
14581
14
              NULL, HFILL }
14582
14
        },
14583
14
        { &hf_mbim_ms_file_status_item_count,
14584
14
            { "Item Count", "mbim.control.ms_file_status.item_count",
14585
14
               FT_UINT32, BASE_DEC, NULL, 0,
14586
14
              NULL, HFILL }
14587
14
        },
14588
14
        { &hf_mbim_ms_file_status_size,
14589
14
            { "Size", "mbim.control.ms_file_status.size",
14590
14
               FT_UINT32, BASE_DEC, NULL, 0,
14591
14
              NULL, HFILL }
14592
14
        },
14593
14
        { &hf_mbim_ms_file_status_file_lock_status,
14594
14
            { "File Lock Status", "mbim.control.ms_file_status.file_lock_status",
14595
14
               FT_UINT32, BASE_DEC, NULL, 0,
14596
14
              NULL, HFILL }
14597
14
        },
14598
14
        { &hf_mbim_ms_response_version,
14599
14
            { "Version", "mbim.control.ms_response.version",
14600
14
               FT_UINT32, BASE_DEC, NULL, 0,
14601
14
              NULL, HFILL }
14602
14
        },
14603
14
        { &hf_mbim_ms_response_status_word_1,
14604
14
            { "Status Word 1", "mbim.control.ms_response.status_word_1",
14605
14
               FT_UINT32, BASE_DEC, NULL, 0,
14606
14
              NULL, HFILL }
14607
14
        },
14608
14
        { &hf_mbim_ms_response_status_word_2,
14609
14
            { "Status Word 2", "mbim.control.ms_response.status_word_2",
14610
14
               FT_UINT32, BASE_DEC, NULL, 0,
14611
14
              NULL, HFILL }
14612
14
        },
14613
14
        { &hf_mbim_ms_response_response_data_offset,
14614
14
            { "Data Offset", "mbim.control.ms_response.response_data_offset",
14615
14
               FT_UINT32, BASE_DEC, NULL, 0,
14616
14
              NULL, HFILL }
14617
14
        },
14618
14
        { &hf_mbim_ms_response_response_data_size,
14619
14
            { "Data Size", "mbim.control.ms_response.response_data_size",
14620
14
               FT_UINT32, BASE_DEC, NULL, 0,
14621
14
              NULL, HFILL }
14622
14
        },
14623
14
        { &hf_mbim_ms_response_response_data,
14624
14
            { "Response Data", "mbim.control.ms_response.response_data",
14625
14
               FT_BYTES, BASE_NONE, NULL, 0,
14626
14
              NULL, HFILL }
14627
14
        },
14628
14
        { &hf_mbim_ms_access_binary_version,
14629
14
            { "Version", "mbim.control.ms_access_binary.version",
14630
14
               FT_UINT32, BASE_DEC, NULL, 0,
14631
14
              NULL, HFILL }
14632
14
        },
14633
14
        { &hf_mbim_ms_access_binary_app_id_offset,
14634
14
            { "App ID Offset", "mbim.control.ms_access_binary.app_id_offset",
14635
14
               FT_UINT32, BASE_DEC, NULL, 0,
14636
14
              NULL, HFILL }
14637
14
        },
14638
14
        { &hf_mbim_ms_access_binary_app_id_size,
14639
14
            { "App ID Size", "mbim.control.ms_access_binary.app_id_size",
14640
14
               FT_UINT32, BASE_DEC, NULL, 0,
14641
14
              NULL, HFILL }
14642
14
        },
14643
14
        { &hf_mbim_ms_access_binary_file_path_offset,
14644
14
            { "File Path Offset", "mbim.control.ms_access_binary.file_path_offset",
14645
14
               FT_UINT32, BASE_DEC, NULL, 0,
14646
14
              NULL, HFILL }
14647
14
        },
14648
14
        { &hf_mbim_ms_access_binary_file_path_size,
14649
14
            { "File Path Size", "mbim.control.ms_access_binary.file_path_size",
14650
14
               FT_UINT32, BASE_DEC, NULL, 0,
14651
14
              NULL, HFILL }
14652
14
        },
14653
14
        { &hf_mbim_ms_access_binary_file_offset,
14654
14
            { "File Offset", "mbim.control.ms_access_binary.file_offset",
14655
14
               FT_UINT32, BASE_DEC, NULL, 0,
14656
14
              NULL, HFILL }
14657
14
        },
14658
14
        { &hf_mbim_ms_access_binary_number_of_bytes,
14659
14
            { "Number of Bytes", "mbim.control.ms_access_binary.number_of_bytes",
14660
14
               FT_UINT32, BASE_DEC, NULL, 0,
14661
14
              NULL, HFILL }
14662
14
        },
14663
14
        { &hf_mbim_ms_access_binary_local_pin_offset,
14664
14
            { "Local Pin Offset", "mbim.control.ms_access_binary.local_pin_offset",
14665
14
               FT_UINT32, BASE_DEC, NULL, 0,
14666
14
              NULL, HFILL }
14667
14
        },
14668
14
        { &hf_mbim_ms_access_binary_local_pin_size,
14669
14
            { "Local Pin Size", "mbim.control.ms_access_binary.local_pin_size",
14670
14
               FT_UINT32, BASE_DEC, NULL, 0,
14671
14
              NULL, HFILL }
14672
14
        },
14673
14
        { &hf_mbim_ms_access_binary_binary_data_offset,
14674
14
            { "Binary Data Offset", "mbim.control.ms_access_binary.binary_data_offset",
14675
14
               FT_UINT32, BASE_DEC, NULL, 0,
14676
14
              NULL, HFILL }
14677
14
        },
14678
14
        { &hf_mbim_ms_access_binary_binary_data_size,
14679
14
            { "Binary Data Size", "mbim.control.ms_access_binary.binary_data_size",
14680
14
               FT_UINT32, BASE_DEC, NULL, 0,
14681
14
              NULL, HFILL }
14682
14
        },
14683
14
        { &hf_mbim_ms_access_binary_app_id,
14684
14
            { "App ID", "mbim.control.ms_access_binary.app_id",
14685
14
               FT_BYTES, BASE_NONE, NULL, 0,
14686
14
              NULL, HFILL }
14687
14
        },
14688
14
        { &hf_mbim_ms_access_binary_file_path,
14689
14
            { "File Path", "mbim.control.ms_access_binary.file_path",
14690
14
               FT_BYTES, BASE_NONE, NULL, 0,
14691
14
              NULL, HFILL }
14692
14
        },
14693
14
        { &hf_mbim_ms_access_binary_local_pin,
14694
14
            { "Local Pin", "mbim.control.ms_access_binary.local_pin",
14695
14
               FT_STRING, BASE_NONE, NULL, 0,
14696
14
              NULL, HFILL }
14697
14
        },
14698
14
        { &hf_mbim_ms_access_binary_binary_data,
14699
14
            { "Binary Data", "mbim.control.ms_access_binary.binary_data",
14700
14
               FT_BYTES, BASE_NONE, NULL, 0,
14701
14
              NULL, HFILL }
14702
14
        },
14703
14
        { &hf_mbim_ms_access_record_version,
14704
14
            { "Version", "mbim.control.ms_access_record.version",
14705
14
               FT_UINT32, BASE_DEC, NULL, 0,
14706
14
              NULL, HFILL }
14707
14
        },
14708
14
        { &hf_mbim_ms_access_record_app_id_offset,
14709
14
            { "App ID Offset", "mbim.control.ms_access_record.app_id_offset",
14710
14
               FT_UINT32, BASE_DEC, NULL, 0,
14711
14
              NULL, HFILL }
14712
14
        },
14713
14
        { &hf_mbim_ms_access_record_app_id_size,
14714
14
            { "App ID Size", "mbim.control.ms_access_record.app_id_size",
14715
14
               FT_UINT32, BASE_DEC, NULL, 0,
14716
14
              NULL, HFILL }
14717
14
        },
14718
14
        { &hf_mbim_ms_access_record_file_path_offset,
14719
14
            { "File Path Offset", "mbim.control.ms_access_record.file_path_offset",
14720
14
               FT_UINT32, BASE_DEC, NULL, 0,
14721
14
              NULL, HFILL }
14722
14
        },
14723
14
        { &hf_mbim_ms_access_record_file_path_size,
14724
14
            { "File Path Size", "mbim.control.ms_access_record.file_path_size",
14725
14
               FT_UINT32, BASE_DEC, NULL, 0,
14726
14
              NULL, HFILL }
14727
14
        },
14728
14
        { &hf_mbim_ms_access_record_record_number,
14729
14
            { "Record Number", "mbim.control.ms_access_record.record_number",
14730
14
               FT_UINT32, BASE_DEC, NULL, 0,
14731
14
              NULL, HFILL }
14732
14
        },
14733
14
        { &hf_mbim_ms_access_record_local_pin_offset,
14734
14
            { "Local Pin Offset", "mbim.control.ms_access_record.local_pin_offset",
14735
14
               FT_UINT32, BASE_DEC, NULL, 0,
14736
14
              NULL, HFILL }
14737
14
        },
14738
14
        { &hf_mbim_ms_access_record_local_pin_size,
14739
14
            { "Local Pin Size", "mbim.control.ms_access_record.local_pin_size",
14740
14
               FT_UINT32, BASE_DEC, NULL, 0,
14741
14
              NULL, HFILL }
14742
14
        },
14743
14
        { &hf_mbim_ms_access_record_record_data_offset,
14744
14
            { "Record Data Offset", "mbim.control.ms_access_record.record_data_offset",
14745
14
               FT_UINT32, BASE_DEC, NULL, 0,
14746
14
              NULL, HFILL }
14747
14
        },
14748
14
        { &hf_mbim_ms_access_record_record_data_size,
14749
14
            { "Record Data Size", "mbim.control.ms_access_record.record_data_size",
14750
14
               FT_UINT32, BASE_DEC, NULL, 0,
14751
14
              NULL, HFILL }
14752
14
        },
14753
14
        { &hf_mbim_ms_access_record_app_id,
14754
14
            { "App ID", "mbim.control.ms_access_record.app_id",
14755
14
               FT_BYTES, BASE_NONE, NULL, 0,
14756
14
              NULL, HFILL }
14757
14
        },
14758
14
        { &hf_mbim_ms_access_record_file_path,
14759
14
            { "File Path", "mbim.control.ms_access_record.file_path",
14760
14
               FT_BYTES, BASE_NONE, NULL, 0,
14761
14
              NULL, HFILL }
14762
14
        },
14763
14
        { &hf_mbim_ms_access_record_local_pin,
14764
14
            { "Local Pin", "mbim.control.ms_access_record.local_pin",
14765
14
               FT_STRING, BASE_NONE, NULL, 0,
14766
14
              NULL, HFILL }
14767
14
        },
14768
14
        { &hf_mbim_ms_access_record_record_data,
14769
14
            { "Record_Data", "mbim.control.ms_access_record.record_data",
14770
14
               FT_BYTES, BASE_NONE, NULL, 0,
14771
14
              NULL, HFILL }
14772
14
        },
14773
14
        { &hf_mbim_nitz_year,
14774
14
            { "Year", "mbim.control.nitz.year",
14775
14
               FT_UINT32, BASE_DEC, NULL, 0,
14776
14
              NULL, HFILL }
14777
14
        },
14778
14
        { &hf_mbim_nitz_month,
14779
14
            { "Month", "mbim.control.nitz.month",
14780
14
               FT_UINT32, BASE_DEC, NULL, 0,
14781
14
              NULL, HFILL }
14782
14
        },
14783
14
        { &hf_mbim_nitz_day,
14784
14
            { "Day", "mbim.control.nitz.day",
14785
14
               FT_UINT32, BASE_DEC, NULL, 0,
14786
14
              NULL, HFILL }
14787
14
        },
14788
14
        { &hf_mbim_nitz_hour,
14789
14
            { "Hour", "mbim.control.nitz.hour",
14790
14
               FT_UINT32, BASE_DEC, NULL, 0,
14791
14
              NULL, HFILL }
14792
14
        },
14793
14
        { &hf_mbim_nitz_minute,
14794
14
            { "Minute", "mbim.control.nitz.minute",
14795
14
               FT_UINT32, BASE_DEC, NULL, 0,
14796
14
              NULL, HFILL }
14797
14
        },
14798
14
        { &hf_mbim_nitz_second,
14799
14
            { "Second", "mbim.control.nitz.second",
14800
14
               FT_UINT32, BASE_DEC, NULL, 0,
14801
14
              NULL, HFILL }
14802
14
        },
14803
14
        { &hf_mbim_nitz_timezone_offset_minutes,
14804
14
            { "Timezone Offset Minutes", "mbim.control.nitz.timezone_offset_minutes",
14805
14
               FT_UINT32, BASE_DEC, NULL, 0,
14806
14
              NULL, HFILL }
14807
14
        },
14808
14
        { &hf_mbim_nitz_daylight_saving_time_offset_minutes,
14809
14
            { "Daylight Saving Time Offset Minutes", "mbim.control.nitz.daylight_saving_time_offset_minutes",
14810
14
               FT_UINT32, BASE_DEC, NULL, 0,
14811
14
              NULL, HFILL }
14812
14
        },
14813
14
        { &hf_mbim_nitz_data_class,
14814
14
            { "Data Class", "mbim.control.nitz.data_class",
14815
14
               FT_UINT32, BASE_HEX, NULL, 0,
14816
14
              NULL, HFILL }
14817
14
        },
14818
14
        { &hf_mbim_fragmented_payload,
14819
14
            { "Fragmented Payload", "mbim.control.fragmented_payload",
14820
14
               FT_BYTES, BASE_NONE, NULL, 0,
14821
14
              NULL, HFILL }
14822
14
        },
14823
14
        { &hf_mbim_request_in,
14824
14
            { "Request In", "mbim.control.request_in",
14825
14
               FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0,
14826
14
              NULL, HFILL }
14827
14
        },
14828
14
        { &hf_mbim_response_in,
14829
14
            { "Response In", "mbim.control.response_in",
14830
14
               FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0,
14831
14
              NULL, HFILL }
14832
14
        },
14833
14
        { &hf_mbim_descriptor,
14834
14
            { "Descriptor", "mbim.descriptor",
14835
14
               FT_NONE, BASE_NONE, NULL, 0,
14836
14
              NULL, HFILL }
14837
14
        },
14838
14
        { &hf_mbim_descriptor_version,
14839
14
            { "bcdMBIMVersion", "mbim.descriptor.version",
14840
14
               FT_UINT16, BASE_HEX, NULL, 0,
14841
14
              "MBIM Version", HFILL }
14842
14
        },
14843
14
        { &hf_mbim_descriptor_max_control_message,
14844
14
            { "wMaxControlMessage", "mbim.descriptor.max_control_message",
14845
14
               FT_UINT16, BASE_DEC, NULL, 0,
14846
14
              "Max Control Message", HFILL }
14847
14
        },
14848
14
        { &hf_mbim_descriptor_number_filters,
14849
14
            { "bNumberFilters", "mbim.descriptor.number_filters",
14850
14
               FT_UINT8, BASE_DEC, NULL, 0,
14851
14
              "Number Of Packet Filters", HFILL }
14852
14
        },
14853
14
        { &hf_mbim_descriptor_max_filter_size,
14854
14
            { "bMaxFilterSize", "mbim.descriptor.max_filter_size",
14855
14
               FT_UINT8, BASE_DEC, NULL, 0,
14856
14
              "Max Packet Filter Size", HFILL }
14857
14
        },
14858
14
        { &hf_mbim_descriptor_max_segment_size,
14859
14
            { "wMaxSegmentSize", "mbim.descriptor.max_segment_size",
14860
14
               FT_UINT16, BASE_DEC, NULL, 0,
14861
14
              "Max Segment Size", HFILL }
14862
14
        },
14863
14
        { &hf_mbim_descriptor_network_capabilities,
14864
14
            { "bmNetworkCapabilities", "mbim.descriptor.network_capabilities",
14865
14
               FT_UINT8, BASE_HEX, NULL, 0,
14866
14
              "Network Capabilities", HFILL }
14867
14
        },
14868
14
        { &hf_mbim_descriptor_network_capabilities_max_datagram_size,
14869
14
            { "SetMaxDatagramSize/GetMaxDatagramSize", "mbim.descriptor.network_capabilities.max_datagram_size",
14870
14
               FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
14871
14
              NULL, HFILL }
14872
14
        },
14873
14
        { &hf_mbim_descriptor_network_capabilities_ntb_input_size,
14874
14
            { "8-byte GetNtbInputSize/SetNtbInputSize", "mbim.descriptor.network_capabilities.ntb_input_size",
14875
14
               FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
14876
14
              NULL, HFILL }
14877
14
        },
14878
14
        { &hf_mbim_descriptor_extended_version,
14879
14
            { "bcdMBIMExtendedVersion", "mbim.descriptor.extended_version",
14880
14
               FT_UINT16, BASE_HEX, NULL, 0,
14881
14
              "MBIM Extended Version", HFILL }
14882
14
        },
14883
14
        { &hf_mbim_descriptor_max_outstanding_command_messages,
14884
14
            { "bMaxOutstandingCommandMessages", "mbim.descriptor.max_outstanding_command_messages",
14885
14
               FT_UINT8, BASE_DEC, NULL, 0,
14886
14
              "Max Outstanding Messages", HFILL }
14887
14
        },
14888
14
        { &hf_mbim_descriptor_mtu,
14889
14
            { "wMTU", "mbim.descriptor.mtu",
14890
14
               FT_UINT16, BASE_DEC, NULL, 0,
14891
14
              "MTU", HFILL }
14892
14
        },
14893
14
        { &hf_mbim_bulk,
14894
14
            { "Bulk", "mbim.bulk",
14895
14
               FT_NONE, BASE_NONE, NULL, 0,
14896
14
              NULL, HFILL }
14897
14
        },
14898
14
        { &hf_mbim_bulk_nth_signature,
14899
14
            { "Signature", "mbim.bulk.nth.signature",
14900
14
               FT_STRING, BASE_NONE, NULL, 0,
14901
14
              NULL, HFILL }
14902
14
        },
14903
14
        { &hf_mbim_bulk_nth_header_length,
14904
14
            { "Header Length", "mbim.bulk.nth.header_length",
14905
14
               FT_UINT16, BASE_DEC, NULL, 0,
14906
14
              NULL, HFILL }
14907
14
        },
14908
14
        { &hf_mbim_bulk_nth_sequence_number,
14909
14
            { "Sequence Number", "mbim.bulk.nth.sequence_number",
14910
14
               FT_UINT16, BASE_DEC, NULL, 0,
14911
14
              NULL, HFILL }
14912
14
        },
14913
14
        { &hf_mbim_bulk_nth_block_length,
14914
14
            { "Block Length", "mbim.bulk.nth.block_length",
14915
14
               FT_UINT16, BASE_DEC, NULL, 0,
14916
14
              NULL, HFILL }
14917
14
        },
14918
14
        { &hf_mbim_bulk_nth_block_length_32,
14919
14
            { "Block Length", "mbim.bulk.nth.block_length",
14920
14
               FT_UINT32, BASE_DEC, NULL, 0,
14921
14
              NULL, HFILL }
14922
14
        },
14923
14
        { &hf_mbim_bulk_nth_ndp_index,
14924
14
            { "NDP Index", "mbim.bulk.nth.ndp_index",
14925
14
               FT_UINT16, BASE_DEC, NULL, 0,
14926
14
              NULL, HFILL }
14927
14
        },
14928
14
        { &hf_mbim_bulk_nth_ndp_index_32,
14929
14
            { "NDP Index", "mbim.bulk.nth.ndp_index",
14930
14
               FT_UINT32, BASE_DEC, NULL, 0,
14931
14
              NULL, HFILL }
14932
14
        },
14933
14
        { &hf_mbim_bulk_ndp_signature,
14934
14
            { "Signature", "mbim.bulk.ndp.signature",
14935
14
               FT_UINT32, BASE_HEX, NULL, 0,
14936
14
              NULL, HFILL }
14937
14
        },
14938
14
        { &hf_mbim_bulk_ndp_signature_ips_session_id,
14939
14
            { "IPS Session Id", "mbim.bulk.ndp.signature.ips_session_id",
14940
14
               FT_UINT8, BASE_DEC, NULL, 0,
14941
14
              NULL, HFILL }
14942
14
        },
14943
14
        { &hf_mbim_bulk_ndp_signature_ipc_session_id,
14944
14
            { "IPC Session Id", "mbim.bulk.ndp.signature.ipc_session_id",
14945
14
               FT_UINT8, BASE_DEC, NULL, 0,
14946
14
              NULL, HFILL }
14947
14
        },
14948
14
        { &hf_mbim_bulk_ndp_signature_dss_session_id,
14949
14
            { "DSS Session Id", "mbim.bulk.ndp.signature.dss_session_id",
14950
14
               FT_UINT8, BASE_DEC, NULL, 0,
14951
14
              NULL, HFILL }
14952
14
        },
14953
14
        { &hf_mbim_bulk_ndp_signature_dsc_session_id,
14954
14
            { "DSC Session Id", "mbim.bulk.ndp.signature.dsc_session_id",
14955
14
               FT_UINT8, BASE_DEC, NULL, 0,
14956
14
              NULL, HFILL }
14957
14
        },
14958
14
        { &hf_mbim_bulk_ndp_length,
14959
14
            { "Length", "mbim.bulk.ndp.length",
14960
14
               FT_UINT16, BASE_DEC, NULL, 0,
14961
14
              NULL, HFILL }
14962
14
        },
14963
14
        { &hf_mbim_bulk_ndp_next_ndp_index,
14964
14
            { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
14965
14
               FT_UINT16, BASE_DEC, NULL, 0,
14966
14
              NULL, HFILL }
14967
14
        },
14968
14
        { &hf_mbim_bulk_ndp_next_ndp_index_32,
14969
14
            { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
14970
14
               FT_UINT32, BASE_DEC, NULL, 0,
14971
14
              NULL, HFILL }
14972
14
        },
14973
14
        { &hf_mbim_bulk_ndp_reserved,
14974
14
            { "Reserved", "mbim.bulk.ndp.reserved",
14975
14
               FT_UINT16, BASE_HEX, NULL, 0,
14976
14
              NULL, HFILL }
14977
14
        },
14978
14
        { &hf_mbim_bulk_ndp_reserved2,
14979
14
            { "Reserved", "mbim.bulk.ndp.reserved",
14980
14
               FT_UINT32, BASE_HEX, NULL, 0,
14981
14
              NULL, HFILL }
14982
14
        },
14983
14
        { &hf_mbim_bulk_ndp_datagram_index,
14984
14
            { "Datagram Index", "mbim.bulk.ndp.datagram.index",
14985
14
               FT_UINT16, BASE_DEC, NULL, 0,
14986
14
              NULL, HFILL }
14987
14
        },
14988
14
        { &hf_mbim_bulk_ndp_datagram_index_32,
14989
14
            { "Datagram Index", "mbim.bulk.ndp.datagram.index",
14990
14
               FT_UINT32, BASE_DEC, NULL, 0,
14991
14
              NULL, HFILL }
14992
14
        },
14993
14
        { &hf_mbim_bulk_ndp_datagram_length,
14994
14
            { "Datagram Length", "mbim.bulk.ndp.datagram.length",
14995
14
               FT_UINT16, BASE_DEC, NULL, 0,
14996
14
              NULL, HFILL }
14997
14
        },
14998
14
        { &hf_mbim_bulk_ndp_datagram_length_32,
14999
14
            { "Datagram Length", "mbim.bulk.ndp.datagram.length",
15000
14
               FT_UINT32, BASE_DEC, NULL, 0,
15001
14
              NULL, HFILL }
15002
14
        },
15003
14
        { &hf_mbim_bulk_ndp_datagram,
15004
14
            { "Datagram", "mbim.bulk.ndp.datagram",
15005
14
               FT_BYTES, BASE_NONE, NULL, 0,
15006
14
              NULL, HFILL }
15007
14
        },
15008
14
        { &hf_mbim_bulk_ndp_padding,
15009
14
            { "Padding", "mbim.bulk.ndp.padding",
15010
14
               FT_BYTES, BASE_NONE, NULL, 0,
15011
14
              NULL, HFILL }
15012
14
        },
15013
14
        { &hf_mbim_bulk_ndp_nb_datagrams,
15014
14
            { "Number Of Datagrams", "mbim.bulk.ndp.nb_datagrams",
15015
14
               FT_UINT32, BASE_DEC, NULL, 0,
15016
14
              NULL, HFILL }
15017
14
        },
15018
14
        { &hf_mbim_bulk_total_nb_datagrams,
15019
14
            { "Total Number Of Datagrams", "mbim.bulk.total_nb_datagrams",
15020
14
               FT_UINT32, BASE_DEC, NULL, 0,
15021
14
              NULL, HFILL }
15022
14
        },
15023
14
        { &hf_mbim_bulk_ndp_ctrl,
15024
14
            { "NDP Control", "mbim.bulk.ndp_control",
15025
14
               FT_NONE, BASE_NONE, NULL, 0,
15026
14
              NULL, HFILL }
15027
14
        },
15028
14
        { &hf_mbim_bulk_ndp_ctrl_message_type,
15029
14
            { "Message Type", "mbim.bulk.ndp_control.message_type",
15030
14
               FT_UINT16, BASE_HEX, VALS(mbim_ndp_ctrl_msg_type_vals), 0,
15031
14
              NULL, HFILL }
15032
14
        },
15033
14
        { &hf_mbim_bulk_ndp_ctrl_message_length,
15034
14
            { "Message Length", "mbim.bulk.ndp_control.message_length",
15035
14
               FT_UINT16, BASE_DEC, NULL, 0,
15036
14
              NULL, HFILL }
15037
14
        },
15038
14
        { &hf_mbim_bulk_ndp_ctrl_multiflow_status,
15039
14
            { "Multiflow Status", "mbim.bulk.ndp_control.multiflow.status",
15040
14
               FT_UINT16, BASE_DEC, VALS(mbim_ndp_ctrl_multiflow_status_vals), 0,
15041
14
              NULL, HFILL }
15042
14
        },
15043
14
        { &hf_mbim_bulk_ndp_ctrl_multiflow_watermark,
15044
14
            { "Multiflow Watermark", "mbim.bulk.ndp_control.multiflow.watermark",
15045
14
               FT_UINT32, BASE_DEC, NULL, 0,
15046
14
              NULL, HFILL }
15047
14
        },
15048
14
        { &hf_mbim_bulk_ndp_ctrl_message_payload,
15049
14
            { "Message Payload", "mbim.bulk.ndp_control.message_payload",
15050
14
               FT_BYTES, BASE_NONE, NULL, 0,
15051
14
              NULL, HFILL }
15052
14
        },
15053
14
        { &hf_mbim_fragments,
15054
14
            { "Fragments", "mbim.control.fragments",
15055
14
               FT_NONE, BASE_NONE, NULL, 0,
15056
14
              NULL, HFILL }
15057
14
        },
15058
14
        { &hf_mbim_fragment,
15059
14
            { "Fragment", "mbim.control.fragment",
15060
14
               FT_FRAMENUM, BASE_NONE, NULL, 0,
15061
14
              NULL, HFILL }
15062
14
        },
15063
14
        { &hf_mbim_fragment_overlap,
15064
14
            { "Fragment Overlap", "mbim.control.fragment_overlap",
15065
14
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15066
14
              NULL, HFILL }
15067
14
        },
15068
14
        { &hf_mbim_fragment_overlap_conflict,
15069
14
            { "Fragment Overlap Conflict", "mbim.control.fragment_overlap_conflict",
15070
14
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15071
14
              NULL, HFILL }
15072
14
        },
15073
14
        { &hf_mbim_fragment_multiple_tails,
15074
14
            { "Fragment Multiple Tails", "mbim.control.fragment_multiple_tails",
15075
14
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15076
14
              NULL, HFILL }
15077
14
        },
15078
14
        { &hf_mbim_fragment_too_long_fragment,
15079
14
            { "Too Long Fragment", "mbim.control.fragment_too_long_fragment",
15080
14
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15081
14
              NULL, HFILL }
15082
14
        },
15083
14
        { &hf_mbim_fragment_error,
15084
14
            { "Fragment Error", "mbim.control.fragment_error",
15085
14
               FT_FRAMENUM, BASE_NONE, NULL, 0,
15086
14
              NULL, HFILL }
15087
14
        },
15088
14
        { &hf_mbim_fragment_count,
15089
14
            { "Fragment Count", "mbim.control.fragment_count",
15090
14
               FT_UINT32, BASE_DEC, NULL, 0,
15091
14
              NULL, HFILL }
15092
14
        },
15093
14
        { &hf_mbim_reassembled_in,
15094
14
            { "Reassembled In", "mbim.control.reassembled_in",
15095
14
               FT_FRAMENUM, BASE_NONE, NULL, 0,
15096
14
              NULL, HFILL }
15097
14
        },
15098
14
        { &hf_mbim_reassembled_length,
15099
14
            { "Reassembled Length", "mbim.control.reassembled_length",
15100
14
               FT_UINT32, BASE_DEC, NULL, 0,
15101
14
              NULL, HFILL }
15102
14
        },
15103
14
        { &hf_mbim_reassembled_data,
15104
14
            { "Reassembled Data", "mbim.control.reassembled_data",
15105
14
               FT_BYTES, BASE_NONE, NULL, 0,
15106
14
              NULL, HFILL }
15107
14
        }
15108
14
    };
15109
15110
14
    static int *ett[] = {
15111
14
        &ett_mbim,
15112
14
        &ett_mbim_msg_header,
15113
14
        &ett_mbim_frag_header,
15114
14
        &ett_mbim_info_buffer,
15115
14
        &ett_mbim_bitmap,
15116
14
        &ett_mbim_pair_list,
15117
14
        &ett_mbim_pin,
15118
14
        &ett_mbim_buffer,
15119
14
        &ett_mbim_sc_address,
15120
14
        &ett_mbim_pac,
15121
14
        &ett_mbim_thermal_threshold_setting,
15122
14
        &ett_mbim_fragment,
15123
14
        &ett_mbim_fragments,
15124
14
        &ett_mbim_bulk_ndp_ctrl
15125
14
    };
15126
15127
14
    static ei_register_info ei[] = {
15128
14
        { &ei_mbim_max_ctrl_transfer,
15129
14
            { "mbim.max_control_transfer_too_small", PI_MALFORMED, PI_ERROR,
15130
14
                "Max Control Transfer is less than 64 bytes", EXPFILL }},
15131
14
        { &ei_mbim_unexpected_msg,
15132
14
            { "mbim.unexpected_msg", PI_MALFORMED, PI_ERROR,
15133
14
                "Unexpected message", EXPFILL }},
15134
14
        { &ei_mbim_unexpected_info_buffer,
15135
14
            { "mbim.unexpected_info_buffer", PI_MALFORMED, PI_WARN,
15136
14
                "Unexpected Information Buffer", EXPFILL }},
15137
14
        { &ei_mbim_illegal_on_link_prefix_length,
15138
14
            { "mbim.illegal_on_link_prefix_length", PI_MALFORMED, PI_WARN,
15139
14
                "Illegal On Link Prefix Length", EXPFILL }},
15140
14
        { &ei_mbim_unknown_sms_format,
15141
14
            { "mbim.unknown_sms_format", PI_PROTOCOL, PI_WARN,
15142
14
                "Unknown SMS format", EXPFILL }},
15143
14
        { &ei_mbim_unexpected_uuid_value,
15144
14
            { "mbim.unexpected_uuid_value", PI_PROTOCOL, PI_WARN,
15145
14
                "Unexpected UUID value", EXPFILL }},
15146
14
        { &ei_mbim_too_many_items,
15147
14
            { "mbim.too_many_items", PI_PROTOCOL, PI_WARN,
15148
14
                "Too many items", EXPFILL }},
15149
14
        { &ei_mbim_alignment_error,
15150
14
            { "mbim.alignment_error", PI_MALFORMED, PI_ERROR,
15151
14
                "Alignment error", EXPFILL }},
15152
14
        { &ei_mbim_invalid_block_len,
15153
14
            { "mbim.invalid_block_len", PI_PROTOCOL, PI_WARN,
15154
14
                "NTH Block Length does not match packet length", EXPFILL }},
15155
14
        { &ei_mbim_out_of_bounds_index,
15156
14
            { "mbim.out_of_bounds_index", PI_MALFORMED, PI_ERROR,
15157
14
                "Index is out of bounds", EXPFILL }},
15158
14
        { &ei_mbim_oversized_string,
15159
14
            { "mbim.oversized_string", PI_PROTOCOL, PI_WARN,
15160
14
                "String exceeds maximum size allowed", EXPFILL }},
15161
14
        { &ei_mbim_oversized_pdu,
15162
14
            { "mbim.oversized_pdu", PI_PROTOCOL, PI_WARN,
15163
14
                "PDU exceeds maximum size allowed", EXPFILL }}
15164
14
    };
15165
15166
14
    proto_mbim = proto_register_protocol("Mobile Broadband Interface Model",
15167
14
            "MBIM", "mbim");
15168
15169
14
    proto_register_field_array(proto_mbim, hf, array_length(hf));
15170
14
    proto_register_subtree_array(ett, array_length(ett));
15171
14
    expert_mbim = expert_register_protocol(proto_mbim);
15172
14
    expert_register_field_array(expert_mbim, ei, array_length(ei));
15173
15174
14
    reassembly_table_register(&mbim_reassembly_table,
15175
14
                          &addresses_reassembly_table_functions);
15176
15177
14
    mbim_control_handle = register_dissector("mbim.control", dissect_mbim_control, proto_mbim);
15178
14
    register_dissector("mbim.descriptor", dissect_mbim_descriptor, proto_mbim);
15179
14
    register_dissector("mbim.bulk", dissect_mbim_bulk, proto_mbim);
15180
14
    dss_dissector_table = register_dissector_table("mbim.dss_session_id",
15181
14
        "MBIM DSS Session Id", proto_mbim, FT_UINT8, BASE_DEC);
15182
15183
14
    mbim_module = prefs_register_protocol(proto_mbim, proto_reg_handoff_mbim);
15184
14
    prefs_register_obsolete_preference(mbim_module, "bulk_heuristic");
15185
14
    prefs_register_bool_preference(mbim_module, "control_decode_unknown_itf",
15186
14
        "Force decoding of unknown USB control data as MBIM",
15187
14
        "Decode control data received on \"usb.control\" with an "
15188
14
        "unknown interface class as MBIM",
15189
14
        &mbim_control_decode_unknown_itf);
15190
14
    prefs_register_enum_preference(mbim_module, "sms_pdu_format",
15191
14
        "SMS PDU format",
15192
14
        "Format used for SMS PDU decoding",
15193
14
        &mbim_sms_pdu_format, mbim_sms_pdu_format_vals, false);
15194
14
    prefs_register_enum_preference(mbim_module, "extended_version",
15195
14
        "Preferred MBIM Extended Version for decoding when MBIM_CID_VERSION not captured",
15196
14
        NULL,
15197
14
        &preferred_mbim_extended_version, preferred_mbim_extended_version_vals, false);
15198
14
    prefs_register_enum_preference(mbim_module, "uicc_apdu_dissector",
15199
14
        "Dissector used for UICC APDU decoding",
15200
14
        NULL,
15201
14
        &mbim_uicc_apdu_dissector, mbim_uicc_apdu_dissector_vals, false);
15202
14
}
15203
15204
void
15205
proto_reg_handoff_mbim(void)
15206
14
{
15207
14
    static bool initialized = false, mbim_control_decode_unknown_itf_prev = false;
15208
15209
14
    if (!initialized) {
15210
14
        dissector_handle_t mbim_decode_as_handle = create_dissector_handle(dissect_mbim_decode_as, proto_mbim);
15211
14
        bertlv_handle = find_dissector_add_dependency("gsm_sim.bertlv", proto_mbim);
15212
14
        gsm_sim_cmd_handle = find_dissector_add_dependency("gsm_sim.command", proto_mbim);
15213
14
        gsm_sim_rsp_handle = find_dissector_add_dependency("gsm_sim.response", proto_mbim);
15214
14
        etsi_cat_handle = find_dissector_add_dependency("etsi_cat", proto_mbim);
15215
14
        gsm_sms_handle = find_dissector_add_dependency("gsm_sms", proto_mbim);
15216
14
        cdma_sms_handle = find_dissector_add_dependency("ansi_637_trans", proto_mbim);
15217
14
        eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_mbim);
15218
14
        eth_fcs_handle = find_dissector_add_dependency("eth_withfcs", proto_mbim);
15219
14
        ip_handle = find_dissector_add_dependency("ip", proto_mbim);
15220
14
        iso7816_atr_handle = find_dissector_add_dependency("iso7816.atr", proto_mbim);
15221
14
        iso7816_handle = find_dissector_add_dependency("iso7816", proto_mbim);
15222
14
        data_handle = find_dissector("data");
15223
14
        bulk_ndp_ctrl_handle = create_dissector_handle(dissect_mbim_bulk_ndp_ctrl, proto_mbim);
15224
14
        heur_dissector_add("usb.bulk", dissect_mbim_bulk_heur, "MBIM USB bulk endpoint", "mbim_usb_bulk", proto_mbim, HEURISTIC_ENABLE);
15225
14
        dissector_add_for_decode_as("usb.device", mbim_decode_as_handle);
15226
14
        dissector_add_for_decode_as("usb.product", mbim_decode_as_handle);
15227
14
        dissector_add_for_decode_as("usb.protocol", mbim_decode_as_handle);
15228
14
        initialized = true;
15229
14
    }
15230
14
    if (mbim_control_decode_unknown_itf != mbim_control_decode_unknown_itf_prev) {
15231
0
        if (mbim_control_decode_unknown_itf) {
15232
0
            dissector_add_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
15233
0
        } else {
15234
0
            dissector_delete_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
15235
0
        }
15236
0
        mbim_control_decode_unknown_itf_prev = mbim_control_decode_unknown_itf;
15237
0
    }
15238
14
}
15239
15240
/*
15241
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
15242
 *
15243
 * Local variables:
15244
 * c-basic-offset: 4
15245
 * tab-width: 8
15246
 * indent-tabs-mode: nil
15247
 * End:
15248
 *
15249
 * vi: set shiftwidth=4 tabstop=8 expandtab:
15250
 * :indentSize=4:tabSize=8:noTabs=true:
15251
 */