Coverage Report

Created: 2026-07-12 07:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-mbim.c
Line
Count
Source
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
 * https://www.usb.org/sites/default/files/MBIM10Errata1_073013.zip
14
 * http://compliance.usb.org/mbim/
15
 * https://www.usb.org/sites/default/files/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/conversation.h>
47
#include <epan/tfs.h>
48
#include <epan/unit_strings.h>
49
#include <epan/iana-info.h>
50
#include <epan/exceptions.h>
51
#include <wiretap/wtap.h>
52
#include <wsutil/ws_padding_to.h>
53
54
#include "packet-gsm_a_common.h"
55
#include "packet-gsm_map.h"
56
#include "packet-usb.h"
57
#include "packet-mbim.h"
58
59
60
void proto_register_mbim(void);
61
void proto_reg_handoff_mbim(void);
62
63
/* Initialize the protocol and registered fields */
64
static int proto_mbim;
65
static int hf_mbim_control;
66
static int hf_mbim_header_message_type;
67
static int hf_mbim_header_message_length;
68
static int hf_mbim_header_transaction_id;
69
static int hf_mbim_fragment_total;
70
static int hf_mbim_fragment_current;
71
static int hf_mbim_max_ctrl_transfer;
72
static int hf_mbim_device_service_id;
73
static int hf_mbim_uuid_basic_connect_cid;
74
static int hf_mbim_uuid_sms_cid;
75
static int hf_mbim_uuid_ussd_cid;
76
static int hf_mbim_uuid_phonebook_cid;
77
static int hf_mbim_uuid_stk_cid;
78
static int hf_mbim_uuid_auth_cid;
79
static int hf_mbim_uuid_dss_cid;
80
static int hf_mbim_uuid_multicarrier_cid;
81
static int hf_mbim_uuid_ms_hostshutdown_cid;
82
static int hf_mbim_uuid_msfwid_cid;
83
static int hf_mbim_uuid_qmi_cid;
84
static int hf_mbim_uuid_intel_fwusvc_cid;
85
static int hf_mbim_uuid_intel_dptf_cid;
86
static int hf_mbim_uuid_intel_sar_cid;
87
static int hf_mbim_uuid_intel_act_cid;
88
static int hf_mbim_uuid_intel_trcsvc_cid;
89
static int hf_mbim_uuid_intel_nrtc_cid;
90
static int hf_mbim_uuid_intel_usb_profile_cid;
91
static int hf_mbim_uuid_intel_ciq_cid;
92
static int hf_mbim_uuid_atds_cid;
93
static int hf_mbim_uuid_multiflow_cid;
94
static int hf_mbim_uuid_basic_connect_extensions_cid;
95
static int hf_mbim_uuid_ms_sarcontrol_cid;
96
static int hf_mbim_uuid_ms_uicc_low_level_cid;
97
static int hf_mbim_uuid_ms_voice_extensions_cid;
98
static int hf_mbim_cid;
99
static int hf_mbim_command_type;
100
static int hf_mbim_info_buffer_len;
101
static int hf_mbim_info_buffer;
102
static int hf_mbim_error_status_code;
103
static int hf_mbim_status;
104
static int hf_mbim_tlv_ie_type;
105
static int hf_mbim_tlv_ie_reserved;
106
static int hf_mbim_tlv_ie_padding_length;
107
static int hf_mbim_tlv_ie_data_length;
108
static int hf_mbim_tlv_ie_unnamed_data;
109
static int hf_mbim_tlv_ie_data_wchar_str;
110
static int hf_mbim_tlv_ie_data_int32;
111
static int hf_mbim_tlv_ie_data_guid;
112
static int hf_mbim_tlv_ie_padding;
113
static int hf_mbim_ms_ursp_tc_length;
114
static int hf_mbim_ms_ursp_precedence;
115
static int hf_mbim_ms_ursp_tc_type;
116
static int hf_mbim_ms_ursp_tc_os_id;
117
static int hf_mbim_ms_ursp_tc_dnn;
118
static int hf_mbim_ms_ursp_tc_fqdn;
119
static int hf_mbim_ms_ursp_tc_ipv4;
120
static int hf_mbim_ms_ursp_tc_ipv4_mask;
121
static int hf_mbim_ms_ursp_tc_ipv6;
122
static int hf_mbim_ms_ursp_tc_ipv6_prefix_length;
123
static int hf_mbim_ms_ursp_tc_proto_id;
124
static int hf_mbim_ms_ursp_tc_port;
125
static int hf_mbim_ms_ursp_tc_port_range_low;
126
static int hf_mbim_ms_ursp_tc_port_range_high;
127
static int hf_mbim_ms_ursp_tc_app_id;
128
static int hf_mbim_ms_ursp_tc_byte_value;
129
static int hf_mbim_ms_ursp_tc_capability;
130
static int hf_mbim_ms_ursp_tc_connection_capability_flag_ims;
131
static int hf_mbim_ms_ursp_tc_connection_capability_flag_mms;
132
static int hf_mbim_ms_ursp_tc_connection_capability_flag_supl;
133
static int hf_mbim_ms_ursp_tc_connection_capability_flag_internet;
134
static int hf_mbim_ms_snssai_length;
135
static int hf_mbim_ms_snssai_slice_service_type;
136
static int hf_mbim_ms_snssai_slice_differentiator;
137
static int hf_mbim_ms_snssai_mapped_slice_service_type;
138
static int hf_mbim_ms_snssai_mapped_slice_differentiator;
139
static int hf_mbim_ms_rej_snssai_cause;
140
static int hf_mbim_ms_pre_dflt_nssai_info_access_type;
141
static int hf_mbim_device_caps_info_device_type;
142
static int hf_mbim_device_caps_info_cellular_class;
143
static int hf_mbim_cellular_class_gsm;
144
static int hf_mbim_cellular_class_cdma;
145
static int hf_mbim_device_caps_info_voice_class;
146
static int hf_mbim_device_caps_info_sim_class;
147
static int hf_mbim_device_caps_info_sim_class_logical;
148
static int hf_mbim_device_caps_info_sim_class_removable;
149
static int hf_mbim_device_caps_info_data_class;
150
static int hf_mbim_data_class_gprs;
151
static int hf_mbim_data_class_edge;
152
static int hf_mbim_data_class_umts;
153
static int hf_mbim_data_class_hsdpa;
154
static int hf_mbim_data_class_hsupa;
155
static int hf_mbim_data_class_lte;
156
static int hf_mbim_data_class_5g;
157
static int hf_mbim_data_class_reserved_gsm;
158
static int hf_mbim_data_class_1xrtt;
159
static int hf_mbim_data_class_1xevdo;
160
static int hf_mbim_data_class_1xevdoreva;
161
static int hf_mbim_data_class_1xevdv;
162
static int hf_mbim_data_class_3xrtt;
163
static int hf_mbim_data_class_1xevdorevb;
164
static int hf_mbim_data_class_umb;
165
static int hf_mbim_data_class_reserved_cdma;
166
static int hf_mbim_data_class_custom;
167
static int hf_mbim_device_caps_info_sms_caps;
168
static int hf_mbim_device_caps_info_sms_caps_pdu_receive;
169
static int hf_mbim_device_caps_info_sms_caps_pdu_send;
170
static int hf_mbim_device_caps_info_sms_caps_text_receive;
171
static int hf_mbim_device_caps_info_sms_caps_text_send;
172
static int hf_mbim_device_caps_info_control_caps;
173
static int hf_mbim_device_caps_info_control_caps_reg_manual;
174
static int hf_mbim_device_caps_info_control_caps_hw_radio_switch;
175
static int hf_mbim_device_caps_info_control_caps_cdma_mobile_ip;
176
static int hf_mbim_device_caps_info_control_caps_cdma_simple_ip;
177
static int hf_mbim_device_caps_info_control_caps_multi_carrier;
178
static int hf_mbim_device_caps_info_control_caps_esim;
179
static int hf_mbim_device_caps_info_control_caps_ue_policy_route_selection;
180
static int hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable;
181
static int hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable;
182
static int hf_mbim_device_caps_info_data_subclass;
183
static int hf_mbim_data_subclass_5gendc;
184
static int hf_mbim_data_subclass_5gnr;
185
static int hf_mbim_data_subclass_5gnedc;
186
static int hf_mbim_data_subclass_5gelte;
187
static int hf_mbim_data_subclass_5gngendc;
188
static int hf_mbim_device_caps_info_max_sessions;
189
static int hf_mbim_device_caps_info_wcdma_band_class;
190
static int hf_mbim_device_caps_info_custom_data_class_offset;
191
static int hf_mbim_device_caps_info_custom_data_class_size;
192
static int hf_mbim_device_caps_info_device_id_offset;
193
static int hf_mbim_device_caps_info_device_id_size;
194
static int hf_mbim_device_caps_info_fw_info_offset;
195
static int hf_mbim_device_caps_info_fw_info_size;
196
static int hf_mbim_device_caps_info_hw_info_offset;
197
static int hf_mbim_device_caps_info_hw_info_size;
198
static int hf_mbim_device_caps_info_custom_data_class;
199
static int hf_mbim_device_caps_info_device_id;
200
static int hf_mbim_device_caps_info_fw_info;
201
static int hf_mbim_device_caps_info_hw_info;
202
static int hf_mbim_device_caps_info_v2_executor_index;
203
static int hf_mbim_subscr_ready_status_ready_state;
204
static int hf_mbim_subscr_ready_status_flags;
205
static int hf_mbim_subscr_ready_status_flag_esim;
206
static int hf_mbim_subscr_ready_status_flag_sim_removability_known;
207
static int hf_mbim_subscr_ready_status_flag_sim_removable;
208
static int hf_mbim_subscr_ready_status_flag_sim_slot_active;
209
static int hf_mbim_subscr_ready_status_susbcr_id_offset;
210
static int hf_mbim_subscr_ready_status_susbcr_id_size;
211
static int hf_mbim_subscr_ready_status_sim_icc_id_offset;
212
static int hf_mbim_subscr_ready_status_sim_icc_id_size;
213
static int hf_mbim_subscr_ready_status_ready_info;
214
static int hf_mbim_subscr_ready_status_elem_count;
215
static int hf_mbim_subscr_ready_status_tel_nb_offset;
216
static int hf_mbim_subscr_ready_status_tel_nb_size;
217
static int hf_mbim_subscr_ready_status_susbcr_id;
218
static int hf_mbim_subscr_ready_status_sim_icc_id;
219
static int hf_mbim_subscr_ready_status_tel_nb;
220
static int hf_mbim_radio_state_set;
221
static int hf_mbim_radio_state_hw_radio_state;
222
static int hf_mbim_radio_state_sw_radio_state;
223
static int hf_mbim_set_pin_pin_type;
224
static int hf_mbim_set_pin_pin_pin_operation;
225
static int hf_mbim_set_pin_pin_pin_offset;
226
static int hf_mbim_set_pin_pin_pin_size;
227
static int hf_mbim_set_pin_new_pin_offset;
228
static int hf_mbim_set_pin_new_pin_size;
229
static int hf_mbim_set_pin_pin;
230
static int hf_mbim_set_pin_new_pin;
231
static int hf_mbim_pin_info_pin_type;
232
static int hf_mbim_pin_info_pin_state;
233
static int hf_mbim_pin_info_remaining_attempts;
234
static int hf_mbim_pin_list_pin_mode;
235
static int hf_mbim_pin_list_pin_format;
236
static int hf_mbim_pin_list_pin_length_min;
237
static int hf_mbim_pin_list_pin_length_max;
238
static int hf_mbim_provider_state;
239
static int hf_mbim_provider_state_home;
240
static int hf_mbim_provider_state_forbidden;
241
static int hf_mbim_provider_state_preferred;
242
static int hf_mbim_provider_state_visible;
243
static int hf_mbim_provider_state_registered;
244
static int hf_mbim_provider_state_preferred_multicarrier;
245
static int hf_mbim_provider_provider_id_offset;
246
static int hf_mbim_provider_provider_id_size;
247
static int hf_mbim_provider_provider_name_offset;
248
static int hf_mbim_provider_provider_name_size;
249
static int hf_mbim_provider_cellular_class;
250
static int hf_mbim_provider_rssi;
251
static int hf_mbim_provider_error_rate;
252
static int hf_mbim_provider_provider_id;
253
static int hf_mbim_provider_provider_name;
254
static int hf_mbim_providers_elem_count;
255
static int hf_mbim_providers_provider_offset;
256
static int hf_mbim_providers_provider_size;
257
static int hf_mbim_visible_providers_req_action;
258
static int hf_mbim_set_register_state_provider_id_offset;
259
static int hf_mbim_set_register_state_provider_id_size;
260
static int hf_mbim_set_register_state_register_action;
261
static int hf_mbim_register_state_data_class;
262
static int hf_mbim_set_register_state_provider_id;
263
static int hf_mbim_registration_state_info_nw_error;
264
static int hf_mbim_registration_state_info_register_state;
265
static int hf_mbim_registration_state_info_register_mode;
266
static int hf_mbim_registration_state_info_available_data_classes;
267
static int hf_mbim_registration_state_info_current_cellular_class;
268
static int hf_mbim_registration_state_info_provider_id_offset;
269
static int hf_mbim_registration_state_info_provider_id_size;
270
static int hf_mbim_registration_state_info_provider_name_offset;
271
static int hf_mbim_registration_state_info_provider_name_size;
272
static int hf_mbim_registration_state_info_roaming_text_offset;
273
static int hf_mbim_registration_state_info_roaming_text_size;
274
static int hf_mbim_registration_state_info_registration_flags;
275
static int hf_mbim_registration_state_info_registration_flags_manual_selection_not_available;
276
static int hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach;
277
static int hf_mbim_registration_state_info_preferred_data_class;
278
static int hf_mbim_registration_state_info_provider_id;
279
static int hf_mbim_registration_state_info_provider_name;
280
static int hf_mbim_registration_state_info_roaming_text;
281
static int hf_mbim_set_packet_service_action;
282
static int hf_mbim_ms_plmn_mcc;
283
static int hf_mbim_ms_plmn_mnc;
284
static int hf_mbim_ms_tai_tac;
285
static int hf_mbim_ms_tai_list_type;
286
static int hf_mbim_ms_tai_list_single_plmn_tac_element;
287
static int hf_mbim_ms_tai_list_multi_plmn_tai_element;
288
static int hf_mbim_packet_service_info_nw_error;
289
static int hf_mbim_packet_service_info_packet_service_state;
290
static int hf_mbim_packet_service_info_highest_available_data_class;
291
static int hf_mbim_packet_service_info_current_data_class;
292
static int hf_mbim_packet_service_info_uplink_speed;
293
static int hf_mbim_packet_service_info_downlink_speed;
294
static int hf_mbim_packet_service_info_frequency_range;
295
static int hf_mbim_packet_service_info_data_subclass;
296
static int hf_mbim_set_signal_state_signal_strength_interval;
297
static int hf_mbim_set_signal_state_rssi_threshold;
298
static int hf_mbim_set_signal_state_error_rate_threshold;
299
static int hf_mbim_signal_state_element_rsrp;
300
static int hf_mbim_signal_state_element_snr;
301
static int hf_mbim_signal_state_element_rsrp_threshold;
302
static int hf_mbim_signal_state_element_snr_threshold;
303
static int hf_mbim_signal_state_element_system_type;
304
static int hf_mbim_signal_state_info_rssi;
305
static int hf_mbim_signal_state_info_error_rate;
306
static int hf_mbim_signal_state_info_signal_strength_interval;
307
static int hf_mbim_signal_state_info_rssi_threshold;
308
static int hf_mbim_signal_state_info_error_rate_threshold;
309
static int hf_mbim_signal_state_info_rsrp_snr_offset;
310
static int hf_mbim_signal_state_info_rsrp_snr_size;
311
static int hf_mbim_signal_state_info_elem_count;
312
static int hf_mbim_context_type;
313
static int hf_mbim_set_connect_session_id;
314
static int hf_mbim_set_connect_activation_command;
315
static int hf_mbim_set_connect_activation_option;
316
static int hf_mbim_set_connect_access_string_offset;
317
static int hf_mbim_set_connect_access_string_size;
318
static int hf_mbim_set_connect_user_name_offset;
319
static int hf_mbim_set_connect_user_name_size;
320
static int hf_mbim_set_connect_password_offset;
321
static int hf_mbim_set_connect_password_size;
322
static int hf_mbim_set_connect_compression;
323
static int hf_mbim_set_connect_auth_protocol;
324
static int hf_mbim_set_connect_ip_type;
325
static int hf_mbim_set_connect_access_string;
326
static int hf_mbim_set_connect_user_name;
327
static int hf_mbim_set_connect_password;
328
static int hf_mbim_set_connect_media_preference;
329
static int hf_mbim_connect_info_session_id;
330
static int hf_mbim_connect_info_activation_state;
331
static int hf_mbim_connect_info_voice_call_state;
332
static int hf_mbim_connect_info_ip_type;
333
static int hf_mbim_connect_info_nw_error;
334
static int hf_mbim_connect_info_access_media;
335
static int hf_mbim_context_context_id;
336
static int hf_mbim_context_access_string_offset;
337
static int hf_mbim_context_access_string_size;
338
static int hf_mbim_context_user_name_offset;
339
static int hf_mbim_context_user_name_size;
340
static int hf_mbim_context_password_offset;
341
static int hf_mbim_context_password_size;
342
static int hf_mbim_context_compression;
343
static int hf_mbim_context_auth_protocol;
344
static int hf_mbim_context_provider_id_offset;
345
static int hf_mbim_context_provider_id_size;
346
static int hf_mbim_context_provider_id;
347
static int hf_mbim_context_access_string;
348
static int hf_mbim_context_user_name;
349
static int hf_mbim_context_password;
350
static int hf_mbim_provisioned_contexts_info_elem_count;
351
static int hf_mbim_provisioned_contexts_info_provisioned_context_offset;
352
static int hf_mbim_provisioned_contexts_info_provisioned_context_size;
353
static int hf_mbim_set_service_activation_data_buffer;
354
static int hf_mbim_service_activation_info_nw_error;
355
static int hf_mbim_service_activation_info_data_buffer;
356
static int hf_mbim_ipv4_element_on_link_prefix_length;
357
static int hf_mbim_ipv4_element_ipv4_address;
358
static int hf_mbim_ipv6_element_on_link_prefix_length;
359
static int hf_mbim_ipv6_element_ipv6_address;
360
static int hf_mbim_ip_configuration_info_session_id;
361
static int hf_mbim_ip_configuration_info_ipv4_configuration_available;
362
static int hf_mbim_ip_configuration_info_ipv4_configuration_available_address;
363
static int hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway;
364
static int hf_mbim_ip_configuration_info_ipv4_configuration_available_dns;
365
static int hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu;
366
static int hf_mbim_ip_configuration_info_ipv6_configuration_available;
367
static int hf_mbim_ip_configuration_info_ipv6_configuration_available_address;
368
static int hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway;
369
static int hf_mbim_ip_configuration_info_ipv6_configuration_available_dns;
370
static int hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu;
371
static int hf_mbim_ip_configuration_info_ipv4_address_count;
372
static int hf_mbim_ip_configuration_info_ipv4_address_offset;
373
static int hf_mbim_ip_configuration_info_ipv6_address_count;
374
static int hf_mbim_ip_configuration_info_ipv6_address_offset;
375
static int hf_mbim_ip_configuration_info_ipv4_gateway_offset;
376
static int hf_mbim_ip_configuration_info_ipv6_gateway_offset;
377
static int hf_mbim_ip_configuration_info_ipv4_dns_count;
378
static int hf_mbim_ip_configuration_info_ipv4_dns_offset;
379
static int hf_mbim_ip_configuration_info_ipv6_dns_count;
380
static int hf_mbim_ip_configuration_info_ipv6_dns_offset;
381
static int hf_mbim_ip_configuration_info_ipv4_mtu;
382
static int hf_mbim_ip_configuration_info_ipv6_mtu;
383
static int hf_mbim_ip_configuration_info_ipv4_gateway;
384
static int hf_mbim_ip_configuration_info_ipv6_gateway;
385
static int hf_mbim_ip_configuration_info_ipv4_dns;
386
static int hf_mbim_ip_configuration_info_ipv6_dns;
387
static int hf_mbim_device_service_element_device_service_id;
388
static int hf_mbim_device_service_element_dss_payload;
389
static int hf_mbim_device_service_element_dss_payload_host_device;
390
static int hf_mbim_device_service_element_dss_payload_device_host;
391
static int hf_mbim_device_service_element_max_dss_instances;
392
static int hf_mbim_device_service_element_cid_count;
393
static int hf_mbim_device_service_element_cid;
394
static int hf_mbim_device_services_info_device_services_count;
395
static int hf_mbim_device_services_info_max_dss_sessions;
396
static int hf_mbim_device_services_info_device_services_offset;
397
static int hf_mbim_device_services_info_device_services_size;
398
static int hf_mbim_event_entry_device_service_id;
399
static int hf_mbim_event_entry_cid_count;
400
static int hf_mbim_event_entry_cid;
401
static int hf_mbim_device_service_subscribe_element_count;
402
static int hf_mbim_device_service_subscribe_device_service_offset;
403
static int hf_mbim_device_service_subscribe_device_service_size;
404
static int hf_mbim_packet_statistics_info_in_discards;
405
static int hf_mbim_packet_statistics_info_in_errors;
406
static int hf_mbim_packet_statistics_info_in_octets;
407
static int hf_mbim_packet_statistics_info_in_packets;
408
static int hf_mbim_packet_statistics_info_out_octets;
409
static int hf_mbim_packet_statistics_info_out_packets;
410
static int hf_mbim_packet_statistics_info_out_errors;
411
static int hf_mbim_packet_statistics_info_out_discards;
412
static int hf_mbim_network_idle_hint_state;
413
static int hf_mbim_emergency_mode_info_emergency_mode;
414
static int hf_mbim_single_packet_filter_filter_size;
415
static int hf_mbim_single_packet_filter_packet_filter_offset;
416
static int hf_mbim_single_packet_filter_packet_mask_offset;
417
static int hf_mbim_single_packet_filter_filter_id;
418
static int hf_mbim_single_packet_filter_packet_filter;
419
static int hf_mbim_single_packet_filter_packet_mask;
420
static int hf_mbim_packet_filters_session_id;
421
static int hf_mbim_packet_filters_packet_filters_count;
422
static int hf_mbim_packet_filters_packet_filters_packet_filter_offset;
423
static int hf_mbim_packet_filters_packet_filters_packet_filter_size;
424
static int hf_mbim_set_sms_configuration_format;
425
static int hf_mbim_set_sms_configuration_sc_address_offset;
426
static int hf_mbim_set_sms_configuration_sc_address_size;
427
static int hf_mbim_set_sms_configuration_sc_address;
428
static int hf_mbim_sms_configuration_info_sms_storage_state;
429
static int hf_mbim_sms_configuration_info_format;
430
static int hf_mbim_sms_configuration_info_max_messages;
431
static int hf_mbim_sms_configuration_info_cdma_short_message_size;
432
static int hf_mbim_sms_configuration_info_sc_address_offset;
433
static int hf_mbim_sms_configuration_info_sc_address_size;
434
static int hf_mbim_sms_configuration_info_sc_address;
435
static int hf_mbim_sms_pdu_record_message_index;
436
static int hf_mbim_sms_pdu_record_message_status;
437
static int hf_mbim_sms_pdu_record_pdu_data_offset;
438
static int hf_mbim_sms_pdu_record_pdu_data_size;
439
static int hf_mbim_sms_pdu_record_pdu_data;
440
static int hf_mbim_sms_pdu_record_pdu_data_sc_address_size;
441
static int hf_mbim_sms_cdma_record_message_index;
442
static int hf_mbim_sms_cdma_record_message_status;
443
static int hf_mbim_sms_cdma_record_address_offset;
444
static int hf_mbim_sms_cdma_record_address_size;
445
static int hf_mbim_sms_cdma_record_timestamp_offset;
446
static int hf_mbim_sms_cdma_record_timestamp_size;
447
static int hf_mbim_sms_cdma_record_encoding_id;
448
static int hf_mbim_sms_cdma_record_language_id;
449
static int hf_mbim_sms_cdma_record_encoded_message_offset;
450
static int hf_mbim_sms_cdma_record_size_in_bytes;
451
static int hf_mbim_sms_cdma_record_size_in_characters;
452
static int hf_mbim_sms_cdma_record_address;
453
static int hf_mbim_sms_cdma_record_timestamp;
454
static int hf_mbim_sms_cdma_record_encoded_message;
455
static int hf_mbim_sms_cdma_record_encoded_message_text;
456
static int hf_mbim_sms_read_req_format;
457
static int hf_mbim_sms_read_req_flag;
458
static int hf_mbim_sms_read_req_message_index;
459
static int hf_mbim_sms_read_info_format;
460
static int hf_mbim_sms_read_info_element_count;
461
static int hf_mbim_sms_read_info_sms_offset;
462
static int hf_mbim_sms_read_info_sms_size;
463
static int hf_mbim_sms_send_pdu_pdu_data_offset;
464
static int hf_mbim_sms_send_pdu_pdu_data_size;
465
static int hf_mbim_sms_send_pdu_pdu_data;
466
static int hf_mbim_sms_send_pdu_pdu_data_sc_address_size;
467
static int hf_mbim_sms_send_cdma_encoding_id;
468
static int hf_mbim_sms_send_cdma_language_id;
469
static int hf_mbim_sms_send_cdma_address_offset;
470
static int hf_mbim_sms_send_cdma_address_size;
471
static int hf_mbim_sms_send_cdma_encoded_message_offset;
472
static int hf_mbim_sms_send_cdma_size_in_bytes;
473
static int hf_mbim_sms_send_cdma_size_in_characters;
474
static int hf_mbim_sms_send_cdma_address;
475
static int hf_mbim_sms_send_cdma_encoded_message;
476
static int hf_mbim_sms_send_cdma_encoded_message_text;
477
static int hf_mbim_set_sms_send_format;
478
static int hf_mbim_sms_send_info_message_reference;
479
static int hf_mbim_set_sms_delete_flag;
480
static int hf_mbim_set_sms_delete_message_index;
481
static int hf_mbim_sms_status_info_flags;
482
static int hf_mbim_sms_status_info_flags_message_store_full;
483
static int hf_mbim_sms_status_info_flags_new_message;
484
static int hf_mbim_sms_status_info_message_index;
485
static int hf_mbim_set_ussd_ussd_action;
486
static int hf_mbim_set_ussd_ussd_data_coding_scheme;
487
static int hf_mbim_set_ussd_ussd_payload_offset;
488
static int hf_mbim_set_ussd_ussd_payload_length;
489
static int hf_mbim_set_ussd_ussd_payload;
490
static int hf_mbim_set_ussd_ussd_payload_text;
491
static int hf_mbim_ussd_info_ussd_response;
492
static int hf_mbim_ussd_info_ussd_session_state;
493
static int hf_mbim_ussd_info_ussd_data_coding_scheme;
494
static int hf_mbim_ussd_info_ussd_payload_offset;
495
static int hf_mbim_ussd_info_ussd_payload_length;
496
static int hf_mbim_ussd_info_ussd_payload;
497
static int hf_mbim_ussd_info_ussd_payload_text;
498
static int hf_mbim_phonebook_configuration_info_phonebook_state;
499
static int hf_mbim_phonebook_configuration_info_total_nb_of_entries;
500
static int hf_mbim_phonebook_configuration_info_used_entries;
501
static int hf_mbim_phonebook_configuration_info_max_number_length;
502
static int hf_mbim_phonebook_configuration_info_max_name_length;
503
static int hf_mbim_phonebook_entry_entry_index;
504
static int hf_mbim_phonebook_entry_number_offset;
505
static int hf_mbim_phonebook_entry_number_length;
506
static int hf_mbim_phonebook_entry_name_offset;
507
static int hf_mbim_phonebook_entry_name_length;
508
static int hf_mbim_phonebook_entry_number;
509
static int hf_mbim_phonebook_entry_name;
510
static int hf_mbim_phonebook_read_req_filter_flag;
511
static int hf_mbim_phonebook_read_req_filter_message_index;
512
static int hf_mbim_phonebook_read_info_element_count;
513
static int hf_mbim_phonebook_read_info_phonebook_offset;
514
static int hf_mbim_phonebook_read_info_phonebook_size;
515
static int hf_mbim_set_phonebook_delete_filter_flag;
516
static int hf_mbim_set_phonebook_delete_filter_message_index;
517
static int hf_mbim_set_phonebook_write_save_flag;
518
static int hf_mbim_set_phonebook_write_save_index;
519
static int hf_mbim_set_phonebook_write_number_offset;
520
static int hf_mbim_set_phonebook_write_number_length;
521
static int hf_mbim_set_phonebook_write_name_offset;
522
static int hf_mbim_set_phonebook_write_name_length;
523
static int hf_mbim_set_phonebook_write_number;
524
static int hf_mbim_set_phonebook_write_name;
525
static int hf_mbim_set_stk_pac_pac_host_control;
526
static int hf_mbim_set_stk_pac_pac_host_control_refresh;
527
static int hf_mbim_set_stk_pac_pac_host_control_more_time;
528
static int hf_mbim_set_stk_pac_pac_host_control_poll_interval;
529
static int hf_mbim_set_stk_pac_pac_host_control_polling_off;
530
static int hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list;
531
static int hf_mbim_set_stk_pac_pac_host_control_set_up_call;
532
static int hf_mbim_set_stk_pac_pac_host_control_send_ss;
533
static int hf_mbim_set_stk_pac_pac_host_control_send_ussd;
534
static int hf_mbim_set_stk_pac_pac_host_control_send_short_msg;
535
static int hf_mbim_set_stk_pac_pac_host_control_send_dtmf;
536
static int hf_mbim_set_stk_pac_pac_host_control_launch_browser;
537
static int hf_mbim_set_stk_pac_pac_host_control_geo_loc_req;
538
static int hf_mbim_set_stk_pac_pac_host_control_play_tone;
539
static int hf_mbim_set_stk_pac_pac_host_control_display_text;
540
static int hf_mbim_set_stk_pac_pac_host_control_get_inkey;
541
static int hf_mbim_set_stk_pac_pac_host_control_get_input;
542
static int hf_mbim_set_stk_pac_pac_host_control_select_item;
543
static int hf_mbim_set_stk_pac_pac_host_control_set_up_menu;
544
static int hf_mbim_set_stk_pac_pac_host_control_prov_local_info;
545
static int hf_mbim_set_stk_pac_pac_host_control_timer_management;
546
static int hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text;
547
static int hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu;
548
static int hf_mbim_set_stk_pac_pac_host_control_power_on_card;
549
static int hf_mbim_set_stk_pac_pac_host_control_power_off_card;
550
static int hf_mbim_set_stk_pac_pac_host_control_get_reader_status;
551
static int hf_mbim_set_stk_pac_pac_host_control_run_at_cmd;
552
static int hf_mbim_set_stk_pac_pac_host_control_lang_notif;
553
static int hf_mbim_set_stk_pac_pac_host_control_open_channel;
554
static int hf_mbim_set_stk_pac_pac_host_control_close_channel;
555
static int hf_mbim_set_stk_pac_pac_host_control_receive_data;
556
static int hf_mbim_set_stk_pac_pac_host_control_send_data;
557
static int hf_mbim_set_stk_pac_pac_host_control_get_channel_status;
558
static int hf_mbim_set_stk_pac_pac_host_control_service_search;
559
static int hf_mbim_set_stk_pac_pac_host_control_get_service_info;
560
static int hf_mbim_set_stk_pac_pac_host_control_declare_service;
561
static int hf_mbim_set_stk_pac_pac_host_control_set_frames;
562
static int hf_mbim_set_stk_pac_pac_host_control_get_frames_status;
563
static int hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg;
564
static int hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg;
565
static int hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg;
566
static int hf_mbim_set_stk_pac_pac_host_control_activate;
567
static int hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed;
568
static int hf_mbim_set_stk_pac_pac_host_control_cmd_container;
569
static int hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl;
570
static int hf_mbim_set_stk_pac_pac_host_control_end_proact_session;
571
static int hf_mbim_stk_pac_info_pac_support;
572
static int hf_mbim_stk_pac_info_pac_support_refresh;
573
static int hf_mbim_stk_pac_info_pac_support_more_time;
574
static int hf_mbim_stk_pac_info_pac_support_poll_interval;
575
static int hf_mbim_stk_pac_info_pac_support_polling_off;
576
static int hf_mbim_stk_pac_info_pac_support_set_up_evt_list;
577
static int hf_mbim_stk_pac_info_pac_support_set_up_call;
578
static int hf_mbim_stk_pac_info_pac_support_send_ss;
579
static int hf_mbim_stk_pac_info_pac_support_send_ussd;
580
static int hf_mbim_stk_pac_info_pac_support_send_short_msg;
581
static int hf_mbim_stk_pac_info_pac_support_send_dtmf;
582
static int hf_mbim_stk_pac_info_pac_support_launch_browser;
583
static int hf_mbim_stk_pac_info_pac_support_geo_loc_req;
584
static int hf_mbim_stk_pac_info_pac_support_play_tone;
585
static int hf_mbim_stk_pac_info_pac_support_display_text;
586
static int hf_mbim_stk_pac_info_pac_support_get_inkey;
587
static int hf_mbim_stk_pac_info_pac_support_get_input;
588
static int hf_mbim_stk_pac_info_pac_support_select_item;
589
static int hf_mbim_stk_pac_info_pac_support_set_up_menu;
590
static int hf_mbim_stk_pac_info_pac_support_prov_local_info;
591
static int hf_mbim_stk_pac_info_pac_support_timer_management;
592
static int hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text;
593
static int hf_mbim_stk_pac_info_pac_support_perform_card_apdu;
594
static int hf_mbim_stk_pac_info_pac_support_power_on_card;
595
static int hf_mbim_stk_pac_info_pac_support_power_off_card;
596
static int hf_mbim_stk_pac_info_pac_support_get_reader_status;
597
static int hf_mbim_stk_pac_info_pac_support_run_at_cmd;
598
static int hf_mbim_stk_pac_info_pac_support_lang_notif;
599
static int hf_mbim_stk_pac_info_pac_support_open_channel;
600
static int hf_mbim_stk_pac_info_pac_support_close_channel;
601
static int hf_mbim_stk_pac_info_pac_support_receive_data;
602
static int hf_mbim_stk_pac_info_pac_support_send_data;
603
static int hf_mbim_stk_pac_info_pac_support_get_channel_status;
604
static int hf_mbim_stk_pac_info_pac_support_service_search;
605
static int hf_mbim_stk_pac_info_pac_support_get_service_info;
606
static int hf_mbim_stk_pac_info_pac_support_declare_service;
607
static int hf_mbim_stk_pac_info_pac_support_set_frames;
608
static int hf_mbim_stk_pac_info_pac_support_get_frames_status;
609
static int hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg;
610
static int hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg;
611
static int hf_mbim_stk_pac_info_pac_support_display_multimedia_msg;
612
static int hf_mbim_stk_pac_info_pac_support_activate;
613
static int hf_mbim_stk_pac_info_pac_support_contactless_state_changed;
614
static int hf_mbim_stk_pac_info_pac_support_cmd_container;
615
static int hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl;
616
static int hf_mbim_stk_pac_info_pac_support_end_proact_session;
617
static int hf_mbim_stk_pac_pac_type;
618
static int hf_mbim_stk_pac_pac;
619
static int hf_mbim_set_stk_terminal_response_response_length;
620
static int hf_mbim_set_stk_terminal_response_data_buffer;
621
static int hf_mbim_stk_terminal_response_info_result_data_string_offset;
622
static int hf_mbim_stk_terminal_response_info_result_data_string_length;
623
static int hf_mbim_stk_terminal_response_info_status_word;
624
static int hf_mbim_stk_terminal_response_info_result_data_string;
625
static int hf_mbim_set_stk_envelope_data_buffer;
626
static int hf_mbim_stk_envelope_info_envelope_support;
627
static int hf_mbim_aka_auth_req_rand;
628
static int hf_mbim_aka_auth_req_autn;
629
static int hf_mbim_aka_auth_info_res;
630
static int hf_mbim_aka_auth_info_res_length;
631
static int hf_mbim_aka_auth_info_ik;
632
static int hf_mbim_aka_auth_info_ck;
633
static int hf_mbim_aka_auth_info_auts;
634
static int hf_mbim_akap_auth_req_rand;
635
static int hf_mbim_akap_auth_req_autn;
636
static int hf_mbim_akap_auth_req_network_name_offset;
637
static int hf_mbim_akap_auth_req_network_name_length;
638
static int hf_mbim_akap_auth_req_network_name;
639
static int hf_mbim_akap_auth_info_res;
640
static int hf_mbim_akap_auth_info_res_length;
641
static int hf_mbim_akap_auth_info_ik;
642
static int hf_mbim_akap_auth_info_ck;
643
static int hf_mbim_akap_auth_info_auts;
644
static int hf_mbim_sim_auth_req_rand1;
645
static int hf_mbim_sim_auth_req_rand2;
646
static int hf_mbim_sim_auth_req_rand3;
647
static int hf_mbim_sim_auth_req_n;
648
static int hf_mbim_sim_auth_info_sres1;
649
static int hf_mbim_sim_auth_info_kc1;
650
static int hf_mbim_sim_auth_info_sres2;
651
static int hf_mbim_sim_auth_info_kc2;
652
static int hf_mbim_sim_auth_info_sres3;
653
static int hf_mbim_sim_auth_info_kc3;
654
static int hf_mbim_sim_auth_info_n;
655
static int hf_mbim_set_dss_connect_device_service_id;
656
static int hf_mbim_set_dss_connect_dss_session_id;
657
static int hf_mbim_set_dss_connect_dss_link_state;
658
static int hf_mbim_multicarrier_capabilities_info_capabilities;
659
static int hf_mbim_multicarrier_capabilities_info_capabilities_static_scan;
660
static int hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot;
661
static int hf_mbim_location_info_country;
662
static int hf_mbim_multicarrier_current_cid_list_req_uuid;
663
static int hf_mbim_multicarrier_current_cid_list_info_cid_count;
664
static int hf_mbim_multicarrier_current_cid_list_info_cid;
665
static int hf_mbim_msfwid_firmwareid_info_firmware_id;
666
static int hf_mbim_qmi_buffer;
667
static int hf_mbim_thermal_config_enable;
668
static int hf_mbim_thermal_config_temp_sensor_id;
669
static int hf_mbim_thermal_config_alarm_id;
670
static int hf_mbim_thermal_config_threshold_value;
671
static int hf_mbim_thermal_config_hyst_value;
672
static int hf_mbim_thermal_config_sampling_period;
673
static int hf_mbim_query_thermal_state_temp_sensor_id;
674
static int hf_mbim_thermal_state_info_current_temp_value;
675
static int hf_mbim_thermal_state_info_enable;
676
static int hf_mbim_thermal_state_info_temp_sensor_id;
677
static int hf_mbim_thermal_state_info_alarm_id;
678
static int hf_mbim_thermal_state_info_threshold_value;
679
static int hf_mbim_thermal_state_info_hyst_value;
680
static int hf_mbim_thermal_state_info_sampling_period;
681
static int hf_mbim_sar_config_sar_status;
682
static int hf_mbim_sar_config_level;
683
static int hf_mbim_ms_sar_config_sar_mode;
684
static int hf_mbim_ms_sar_config_sar_backoff_status;
685
static int hf_mbim_ms_sar_config_sar_wifi_Integration;
686
static int hf_mbim_ms_sar_config_element_count;
687
static int hf_mbim_ms_sar_config_element_offset;
688
static int hf_mbim_ms_sar_config_element_size;
689
static int hf_mbim_ms_sar_config_state_sar_antenna_index;
690
static int hf_mbim_ms_sar_config_state_sar_backoff_index;
691
static int hf_mbim_ms_transmission_status_channel_notification;
692
static int hf_mbim_ms_transmission_status_transmission_status;
693
static int hf_mbim_ms_transmission_status_hysteresis_timer;
694
static int hf_mbim_adpclk_activate_state;
695
static int hf_mbim_adpclk_freq_info_elem_count;
696
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_offset;
697
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_size;
698
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq;
699
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread;
700
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power;
701
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi;
702
static int hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status;
703
static int hf_mbim_trace_config_config;
704
static int hf_mbim_nrtc_app_info_period;
705
static int hf_mbim_nrtc_app_info_duration;
706
static int hf_mbim_nrtcws_config_mode;
707
static int hf_mbim_nrtcws_config_wlan_active;
708
static int hf_mbim_nrtcws_config_wlan_safe_rx;
709
static int hf_mbim_nrtcws_config_wlan_bandwidth;
710
static int hf_mbim_nrtcws_config_bt_active;
711
static int hf_mbim_nrtcws_config_bt_safe_rx;
712
static int hf_mbim_nrtcws_info_lte_active;
713
static int hf_mbim_nrtcws_info_wlan_safe_rx_min;
714
static int hf_mbim_nrtcws_info_wlan_safe_rx_max;
715
static int hf_mbim_nrtcws_info_bt_safe_rx_min;
716
static int hf_mbim_nrtcws_info_bt_safe_rx_max;
717
static int hf_mbim_nrtcws_info_lte_sps_period;
718
static int hf_mbim_nrtcws_info_lte_sps_duration;
719
static int hf_mbim_nrtcws_info_lte_sps_initial_offset;
720
static int hf_mbim_usbprofile_cmd_length;
721
static int hf_mbim_usbprofile_cmd_buffer;
722
static int hf_mbim_usbprofile_rsp_length;
723
static int hf_mbim_usbprofile_rsp_buffer;
724
static int hf_mbim_ciq_set_mode;
725
static int hf_mbim_ciq_set_debug_info_size;
726
static int hf_mbim_ciq_set_debug_info;
727
static int hf_mbim_ciq_info_mode;
728
static int hf_mbim_atds_signal_info_rssi;
729
static int hf_mbim_atds_signal_info_ber;
730
static int hf_mbim_atds_signal_info_rscp;
731
static int hf_mbim_atds_signal_info_ecno;
732
static int hf_mbim_atds_signal_info_rsrq;
733
static int hf_mbim_atds_signal_info_rsrp;
734
static int hf_mbim_atds_signal_info_rssnr;
735
static int hf_mbim_atds_location_info_lac;
736
static int hf_mbim_atds_location_info_tac;
737
static int hf_mbim_atds_location_info_cellid;
738
static int hf_mbim_atds_operator_provider_id_offset;
739
static int hf_mbim_atds_operator_provider_id_size;
740
static int hf_mbim_atds_operator_provider_state;
741
static int hf_mbim_atds_operator_provider_name_offset;
742
static int hf_mbim_atds_operator_provider_name_size;
743
static int hf_mbim_atds_operator_plmn_mode;
744
static int hf_mbim_atds_operator_rssi;
745
static int hf_mbim_atds_operator_error_rate;
746
static int hf_mbim_atds_operator_provider_id;
747
static int hf_mbim_atds_operator_provider_name;
748
static int hf_mbim_atds_operators_elem_count;
749
static int hf_mbim_atds_operators_operator_offset;
750
static int hf_mbim_atds_operators_operator_size;
751
static int hf_mbim_atds_rat_info_mode;
752
static int hf_mbim_atds_projection_table_type;
753
static int hf_mbim_atds_projection_table_bar5min;
754
static int hf_mbim_atds_projection_table_a5;
755
static int hf_mbim_atds_projection_table_b5;
756
static int hf_mbim_atds_projection_table_bar4min;
757
static int hf_mbim_atds_projection_table_a4;
758
static int hf_mbim_atds_projection_table_b4;
759
static int hf_mbim_atds_projection_table_bar3min;
760
static int hf_mbim_atds_projection_table_a3;
761
static int hf_mbim_atds_projection_table_b3;
762
static int hf_mbim_atds_projection_table_bar2min;
763
static int hf_mbim_atds_projection_table_a2;
764
static int hf_mbim_atds_projection_table_b2;
765
static int hf_mbim_atds_projection_table_bar1min;
766
static int hf_mbim_atds_projection_table_a1;
767
static int hf_mbim_atds_projection_table_b1;
768
static int hf_mbim_atds_projection_table_bar0min;
769
static int hf_mbim_atds_projection_table_a0;
770
static int hf_mbim_atds_projection_table_b0;
771
static int hf_mbim_atds_projection_tables_elem_count;
772
static int hf_mbim_atds_projection_tables_projection_table_offset;
773
static int hf_mbim_atds_projection_tables_projection_table_size;
774
static int hf_mbim_multiflow_caps_info_control_caps;
775
static int hf_mbim_multiflow_caps_info_control_caps_uplink;
776
static int hf_mbim_multiflow_caps_info_control_caps_downlink;
777
static int hf_mbim_set_multiflow_state_state;
778
static int hf_mbim_multiflow_state_info_state;
779
static int hf_mbim_multiflow_tft_info_session_id;
780
static int hf_mbim_multiflow_tft_info_elem_count;
781
static int hf_mbim_multiflow_tft_info_tft_list_offset;
782
static int hf_mbim_multiflow_tft_info_tft_list_size;
783
static int hf_mbim_version;
784
static int hf_mbim_extended_version;
785
static int hf_mbim_set_ms_provisioned_context_v2_operation;
786
static int hf_mbim_set_ms_provisioned_context_v2_ip_type;
787
static int hf_mbim_set_ms_provisioned_context_v2_enable;
788
static int hf_mbim_set_ms_provisioned_context_v2_roaming;
789
static int hf_mbim_set_ms_provisioned_context_v2_media_type;
790
static int hf_mbim_set_ms_provisioned_context_v2_source;
791
static int hf_mbim_set_ms_provisioned_context_v2_access_string;
792
static int hf_mbim_set_ms_provisioned_context_v2_access_string_offset;
793
static int hf_mbim_set_ms_provisioned_context_v2_access_string_size;
794
static int hf_mbim_set_ms_provisioned_context_v2_user_name;
795
static int hf_mbim_set_ms_provisioned_context_v2_user_name_offset;
796
static int hf_mbim_set_ms_provisioned_context_v2_user_name_size;
797
static int hf_mbim_set_ms_provisioned_context_v2_password;
798
static int hf_mbim_set_ms_provisioned_context_v2_password_offset;
799
static int hf_mbim_set_ms_provisioned_context_v2_password_size;
800
static int hf_mbim_set_ms_provisioned_context_v2_compression;
801
static int hf_mbim_set_ms_provisioned_context_v2_auth_protocol;
802
static int hf_mbim_ms_provisioned_context_info_v2_elem_count;
803
static int hf_mbim_ms_provisioned_context_info_v2_list_offset;
804
static int hf_mbim_ms_provisioned_context_info_v2_list_size;
805
static int hf_mbim_ms_provisioned_context_info_v2_context_id;
806
static int hf_mbim_ms_network_blacklist_info_blacklist_state;
807
static int hf_mbim_ms_network_blacklist_state_sim_provider_actuated;
808
static int hf_mbim_ms_network_blacklist_state_network_provider_actuated;
809
static int hf_mbim_ms_network_blacklist_info_elem_count;
810
static int hf_mbim_ms_network_blacklist_info_list_offset;
811
static int hf_mbim_ms_network_blacklist_info_list_size;
812
static int hf_mbim_ms_network_blacklist_provider_mcc;
813
static int hf_mbim_ms_network_blacklist_provider_mnc;
814
static int hf_mbim_ms_network_blacklist_provider_type;
815
static int hf_mbim_sys_caps_info_number_of_executors;
816
static int hf_mbim_sys_caps_info_number_of_slots;
817
static int hf_mbim_sys_caps_info_concurrency;
818
static int hf_mbim_sys_caps_info_modem_id;
819
static int hf_mbim_ms_set_lte_attach_operation;
820
static int hf_mbim_ms_lte_attach_context_count;
821
static int hf_mbim_ms_lte_attach_context_offset;
822
static int hf_mbim_ms_lte_attach_context_size;
823
static int hf_mbim_ms_lte_attach_context_ip_type;
824
static int hf_mbim_ms_lte_attach_context_roaming;
825
static int hf_mbim_ms_lte_attach_context_source;
826
static int hf_mbim_ms_lte_attach_context_access_string;
827
static int hf_mbim_ms_lte_attach_context_access_string_offset;
828
static int hf_mbim_ms_lte_attach_context_access_string_size;
829
static int hf_mbim_ms_lte_attach_context_user_name;
830
static int hf_mbim_ms_lte_attach_context_user_name_offset;
831
static int hf_mbim_ms_lte_attach_context_user_name_size;
832
static int hf_mbim_ms_lte_attach_context_password;
833
static int hf_mbim_ms_lte_attach_context_password_offset;
834
static int hf_mbim_ms_lte_attach_context_password_size;
835
static int hf_mbim_ms_lte_attach_context_compression;
836
static int hf_mbim_ms_lte_attach_context_auth_protocol;
837
static int hf_mbim_ms_lte_attach_state;
838
static int hf_mbim_ms_device_slot_mapping_info_map_count;
839
static int hf_mbim_ms_device_slot_mapping_info_map_offset;
840
static int hf_mbim_ms_device_slot_mapping_info_map_size;
841
static int hf_mbim_ms_device_slot_mapping_info_executor_slot_index;
842
static int hf_mbim_ms_slot_info_req_slot_index;
843
static int hf_mbim_ms_slot_info_slot_index;
844
static int hf_mbim_ms_slot_info_state;
845
static int hf_mbim_base_station_max_gsm_count;
846
static int hf_mbim_base_station_max_umts_count;
847
static int hf_mbim_base_station_max_td_scdma_count;
848
static int hf_mbim_base_station_max_lte_count;
849
static int hf_mbim_base_station_max_cdma_count;
850
static int hf_mbim_base_station_max_nr_count;
851
static int hf_mbim_base_station_provider_id_offset;
852
static int hf_mbim_base_station_provider_id_size;
853
static int hf_mbim_base_station_location_area_code;
854
static int hf_mbim_base_station_cell_id;
855
static int hf_mbim_base_station_timing_advance;
856
static int hf_mbim_base_station_arfcn;
857
static int hf_mbim_base_station_base_station_id;
858
static int hf_mbim_base_station_rx_level;
859
static int hf_mbim_base_station_provider_id;
860
static int hf_mbim_base_station_frequency_info_ul;
861
static int hf_mbim_base_station_frequency_info_dl;
862
static int hf_mbim_base_station_frequency_info_nt;
863
static int hf_mbim_base_station_uarfcn;
864
static int hf_mbim_base_station_primary_scrambling_code;
865
static int hf_mbim_base_station_rscp;
866
static int hf_mbim_base_station_ecno;
867
static int hf_mbim_base_station_path_loss;
868
static int hf_mbim_base_station_call_parameter;
869
static int hf_mbim_base_station_earfcn;
870
static int hf_mbim_base_station_physical_cell_id;
871
static int hf_mbim_base_station_tac;
872
static int hf_mbim_base_station_rsrp;
873
static int hf_mbim_base_station_rsrq;
874
static int hf_mbim_base_station_serving_cell_flag;
875
static int hf_mbim_base_station_nid;
876
static int hf_mbim_base_station_sid;
877
static int hf_mbim_base_station_base_latitude;
878
static int hf_mbim_base_station_base_longitude;
879
static int hf_mbim_base_station_ref_pn;
880
static int hf_mbim_base_station_gps_seconds;
881
static int hf_mbim_base_station_pilot_strength;
882
static int hf_mbim_base_station_nci;
883
static int hf_mbim_base_station_cell_id_offset;
884
static int hf_mbim_base_station_cell_id_size;
885
static int hf_mbim_base_station_sinr;
886
static int hf_mbim_base_station_cell_id_string;
887
static int hf_mbim_base_station_system_type;
888
static int hf_mbim_base_station_system_sub_type;
889
static int hf_mbim_base_station_gsm_serving_cell_offset;
890
static int hf_mbim_base_station_gsm_serving_cell_size;
891
static int hf_mbim_base_station_umts_serving_cell_offset;
892
static int hf_mbim_base_station_umts_serving_cell_size;
893
static int hf_mbim_base_station_td_scdma_serving_cell_offset;
894
static int hf_mbim_base_station_td_scdma_serving_cell_size;
895
static int hf_mbim_base_station_lte_serving_cell_offset;
896
static int hf_mbim_base_station_lte_serving_cell_size;
897
static int hf_mbim_base_station_gsm_nmr_offset;
898
static int hf_mbim_base_station_gsm_nmr_size;
899
static int hf_mbim_base_station_umts_mrl_offset;
900
static int hf_mbim_base_station_umts_mrl_size;
901
static int hf_mbim_base_station_td_scdma_mrl_offset;
902
static int hf_mbim_base_station_td_scdma_mrl_size;
903
static int hf_mbim_base_station_lte_mrl_offset;
904
static int hf_mbim_base_station_lte_mrl_size;
905
static int hf_mbim_base_station_cdma_mrl_offset;
906
static int hf_mbim_base_station_cdma_mrl_size;
907
static int hf_mbim_base_station_nr_serving_cell_offset;
908
static int hf_mbim_base_station_nr_serving_cell_size;
909
static int hf_mbim_base_station_nr_neighbor_cells_offset;
910
static int hf_mbim_base_station_nr_neighbor_cells_size;
911
static int hf_mbim_base_station_count;
912
static int hf_mbim_ms_modem_config_config_status;
913
static int hf_mbim_ms_registration_params_info_mico_mode;
914
static int hf_mbim_ms_registration_params_info_drx_params;
915
static int hf_mbim_ms_registration_params_info_ladn_info;
916
static int hf_mbim_ms_registration_params_info_default_pdu_hint;
917
static int hf_mbim_ms_registration_params_info_re_register_if_needed;
918
static int hf_mbim_ms_network_params_info_mico_indication;
919
static int hf_mbim_ms_network_params_info_drx_params;
920
static int hf_mbim_ms_wake_reason_wake_type;
921
static int hf_mbim_ms_wake_reason_session_id;
922
static int hf_mbim_ms_wake_reason_command_payload_offset;
923
static int hf_mbim_ms_wake_reason_command_payload_size;
924
static int hf_mbim_ms_wake_reason_command_payload;
925
static int hf_mbim_ms_wake_reason_packet_original_size;
926
static int hf_mbim_ms_wake_reason_packet_saved_offset;
927
static int hf_mbim_ms_wake_reason_packet_saved_size;
928
static int hf_mbim_ms_wake_reason_packet_saved_data;
929
static int hf_mbim_ms_slot_id;
930
static int hf_mbim_ms_open_channel_app_id_size;
931
static int hf_mbim_ms_open_channel_app_id_offset;
932
static int hf_mbim_ms_open_channel_select_p2_arg;
933
static int hf_mbim_ms_uicc_channel_group;
934
static int hf_mbim_ms_open_channel_app_id;
935
static int hf_mbim_ms_uicc_status;
936
static int hf_mbim_ms_uicc_channel;
937
static int hf_mbim_ms_uicc_response_length;
938
static int hf_mbim_ms_uicc_response_offset;
939
static int hf_mbim_ms_uicc_response;
940
static int hf_mbim_ms_uicc_padding;
941
static int hf_mbim_ms_apdu_secure_messaging;
942
static int hf_mbim_ms_apdu_type;
943
static int hf_mbim_ms_apdu_command_size;
944
static int hf_mbim_ms_apdu_command_offset;
945
static int hf_mbim_ms_apdu_command;
946
static int hf_mbim_ms_apdu_padding;
947
static int hf_mbim_ms_terminal_capability_count;
948
static int hf_mbim_ms_terminal_capability_offset;
949
static int hf_mbim_ms_terminal_capability_size;
950
static int hf_mbim_ms_terminal_capability;
951
static int hf_mbim_ms_reset_pass_through_action;
952
static int hf_mbim_ms_atr_info_atr_offset;
953
static int hf_mbim_ms_atr_info_atr_size;
954
static int hf_mbim_ms_app_info_app_type;
955
static int hf_mbim_ms_app_info_app_id_offset;
956
static int hf_mbim_ms_app_info_app_id_size;
957
static int hf_mbim_ms_app_info_app_id;
958
static int hf_mbim_ms_app_info_app_name_offset;
959
static int hf_mbim_ms_app_info_app_name_size;
960
static int hf_mbim_ms_app_info_app_name;
961
static int hf_mbim_ms_app_info_num_pins;
962
static int hf_mbim_ms_app_info_pin_ref_offset;
963
static int hf_mbim_ms_app_info_pin_ref_size;
964
static int hf_mbim_ms_app_info_pin_ref;
965
static int hf_mbim_ms_app_list_version;
966
static int hf_mbim_ms_app_list_app_count;
967
static int hf_mbim_ms_app_list_active_app_index;
968
static int hf_mbim_ms_app_list_size;
969
static int hf_mbim_ms_app_list_app_info_offset;
970
static int hf_mbim_ms_app_list_app_info_size;
971
static int hf_mbim_ms_file_path_version;
972
static int hf_mbim_ms_file_path_app_id_offset;
973
static int hf_mbim_ms_file_path_app_id_size;
974
static int hf_mbim_ms_file_path_file_path_offset;
975
static int hf_mbim_ms_file_path_file_path_size;
976
static int hf_mbim_ms_file_path_app_id;
977
static int hf_mbim_ms_file_path_file_path;
978
static int hf_mbim_ms_file_status_version;
979
static int hf_mbim_ms_file_status_status_word_1;
980
static int hf_mbim_ms_file_status_status_word_2;
981
static int hf_mbim_ms_file_status_file_accessibility;
982
static int hf_mbim_ms_file_status_file_type;
983
static int hf_mbim_ms_file_status_file_structure;
984
static int hf_mbim_ms_file_status_item_count;
985
static int hf_mbim_ms_file_status_size;
986
static int hf_mbim_ms_file_status_file_lock_status;
987
static int hf_mbim_ms_response_version;
988
static int hf_mbim_ms_response_status_word_1;
989
static int hf_mbim_ms_response_status_word_2;
990
static int hf_mbim_ms_response_response_data_offset;
991
static int hf_mbim_ms_response_response_data_size;
992
static int hf_mbim_ms_response_response_data;
993
static int hf_mbim_ms_access_binary_version;
994
static int hf_mbim_ms_access_binary_app_id_offset;
995
static int hf_mbim_ms_access_binary_app_id_size;
996
static int hf_mbim_ms_access_binary_file_path_offset;
997
static int hf_mbim_ms_access_binary_file_path_size;
998
static int hf_mbim_ms_access_binary_file_offset;
999
static int hf_mbim_ms_access_binary_number_of_bytes;
1000
static int hf_mbim_ms_access_binary_local_pin_offset;
1001
static int hf_mbim_ms_access_binary_local_pin_size;
1002
static int hf_mbim_ms_access_binary_binary_data_offset;
1003
static int hf_mbim_ms_access_binary_binary_data_size;
1004
static int hf_mbim_ms_access_binary_app_id;
1005
static int hf_mbim_ms_access_binary_file_path;
1006
static int hf_mbim_ms_access_binary_local_pin;
1007
static int hf_mbim_ms_access_binary_binary_data;
1008
static int hf_mbim_ms_access_record_version;
1009
static int hf_mbim_ms_access_record_app_id_offset;
1010
static int hf_mbim_ms_access_record_app_id_size;
1011
static int hf_mbim_ms_access_record_file_path_offset;
1012
static int hf_mbim_ms_access_record_file_path_size;
1013
static int hf_mbim_ms_access_record_record_number;
1014
static int hf_mbim_ms_access_record_local_pin_offset;
1015
static int hf_mbim_ms_access_record_local_pin_size;
1016
static int hf_mbim_ms_access_record_record_data_offset;
1017
static int hf_mbim_ms_access_record_record_data_size;
1018
static int hf_mbim_ms_access_record_app_id;
1019
static int hf_mbim_ms_access_record_file_path;
1020
static int hf_mbim_ms_access_record_local_pin;
1021
static int hf_mbim_ms_access_record_record_data;
1022
static int hf_mbim_nitz_year;
1023
static int hf_mbim_nitz_month;
1024
static int hf_mbim_nitz_day;
1025
static int hf_mbim_nitz_hour;
1026
static int hf_mbim_nitz_minute;
1027
static int hf_mbim_nitz_second;
1028
static int hf_mbim_nitz_timezone_offset_minutes;
1029
static int hf_mbim_nitz_daylight_saving_time_offset_minutes;
1030
static int hf_mbim_nitz_data_class;
1031
static int hf_mbim_fragmented_payload;
1032
static int hf_mbim_request_in;
1033
static int hf_mbim_response_in;
1034
static int hf_mbim_descriptor;
1035
static int hf_mbim_descriptor_version;
1036
static int hf_mbim_descriptor_max_control_message;
1037
static int hf_mbim_descriptor_number_filters;
1038
static int hf_mbim_descriptor_max_filter_size;
1039
static int hf_mbim_descriptor_max_segment_size;
1040
static int hf_mbim_descriptor_network_capabilities;
1041
static int hf_mbim_descriptor_network_capabilities_max_datagram_size;
1042
static int hf_mbim_descriptor_network_capabilities_ntb_input_size;
1043
static int hf_mbim_descriptor_extended_version;
1044
static int hf_mbim_descriptor_max_outstanding_command_messages;
1045
static int hf_mbim_descriptor_mtu;
1046
static int hf_mbim_bulk;
1047
static int hf_mbim_bulk_nth_signature;
1048
static int hf_mbim_bulk_nth_header_length;
1049
static int hf_mbim_bulk_nth_sequence_number;
1050
static int hf_mbim_bulk_nth_block_length;
1051
static int hf_mbim_bulk_nth_block_length_32;
1052
static int hf_mbim_bulk_nth_ndp_index;
1053
static int hf_mbim_bulk_nth_ndp_index_32;
1054
static int hf_mbim_bulk_ndp_signature;
1055
static int hf_mbim_bulk_ndp_signature_ips_session_id;
1056
static int hf_mbim_bulk_ndp_signature_ipc_session_id;
1057
static int hf_mbim_bulk_ndp_signature_dss_session_id;
1058
static int hf_mbim_bulk_ndp_signature_dsc_session_id;
1059
static int hf_mbim_bulk_ndp_length;
1060
static int hf_mbim_bulk_ndp_next_ndp_index;
1061
static int hf_mbim_bulk_ndp_next_ndp_index_32;
1062
static int hf_mbim_bulk_ndp_reserved;
1063
static int hf_mbim_bulk_ndp_reserved2;
1064
static int hf_mbim_bulk_ndp_datagram_index;
1065
static int hf_mbim_bulk_ndp_datagram_index_32;
1066
static int hf_mbim_bulk_ndp_datagram_length;
1067
static int hf_mbim_bulk_ndp_datagram_length_32;
1068
static int hf_mbim_bulk_ndp_datagram;
1069
static int hf_mbim_bulk_ndp_padding;
1070
static int hf_mbim_bulk_ndp_nb_datagrams;
1071
static int hf_mbim_bulk_total_nb_datagrams;
1072
static int hf_mbim_bulk_ndp_ctrl;
1073
static int hf_mbim_bulk_ndp_ctrl_message_type;
1074
static int hf_mbim_bulk_ndp_ctrl_message_length;
1075
static int hf_mbim_bulk_ndp_ctrl_multiflow_status;
1076
static int hf_mbim_bulk_ndp_ctrl_multiflow_watermark;
1077
static int hf_mbim_bulk_ndp_ctrl_message_payload;
1078
static int hf_mbim_fragments;
1079
static int hf_mbim_fragment;
1080
static int hf_mbim_fragment_overlap;
1081
static int hf_mbim_fragment_overlap_conflict;
1082
static int hf_mbim_fragment_multiple_tails;
1083
static int hf_mbim_fragment_too_long_fragment;
1084
static int hf_mbim_fragment_error;
1085
static int hf_mbim_fragment_count;
1086
static int hf_mbim_reassembled_in;
1087
static int hf_mbim_reassembled_length;
1088
static int hf_mbim_reassembled_data;
1089
1090
static expert_field ei_mbim_max_ctrl_transfer;
1091
static expert_field ei_mbim_unexpected_msg;
1092
static expert_field ei_mbim_unexpected_info_buffer;
1093
static expert_field ei_mbim_illegal_on_link_prefix_length;
1094
static expert_field ei_mbim_unknown_sms_format;
1095
static expert_field ei_mbim_unexpected_uuid_value;
1096
static expert_field ei_mbim_too_many_items;
1097
static expert_field ei_mbim_alignment_error;
1098
static expert_field ei_mbim_invalid_block_len;
1099
static expert_field ei_mbim_out_of_bounds_index;
1100
static expert_field ei_mbim_oversized_string;
1101
static expert_field ei_mbim_oversized_pdu;
1102
1103
/* Initialize the subtree pointers */
1104
static int ett_mbim;
1105
static int ett_mbim_msg_header;
1106
static int ett_mbim_frag_header;
1107
static int ett_mbim_info_buffer;
1108
static int ett_mbim_bitmap;
1109
static int ett_mbim_pair_list;
1110
static int ett_mbim_pin;
1111
static int ett_mbim_buffer;
1112
static int ett_mbim_sc_address;
1113
static int ett_mbim_pac;
1114
static int ett_mbim_thermal_threshold_setting;
1115
static int ett_mbim_fragment;
1116
static int ett_mbim_fragments;
1117
static int ett_mbim_bulk_ndp_ctrl;
1118
1119
static dissector_table_t dss_dissector_table;
1120
static dissector_handle_t bertlv_handle;
1121
static dissector_handle_t gsm_sim_cmd_handle;
1122
static dissector_handle_t gsm_sim_rsp_handle;
1123
static dissector_handle_t etsi_cat_handle;
1124
static dissector_handle_t gsm_sms_handle;
1125
static dissector_handle_t cdma_sms_handle;
1126
static dissector_handle_t eth_handle;
1127
static dissector_handle_t eth_fcs_handle;
1128
static dissector_handle_t ip_handle;
1129
static dissector_handle_t data_handle;
1130
static dissector_handle_t bulk_ndp_ctrl_handle;
1131
static dissector_handle_t mbim_control_handle;
1132
static dissector_handle_t iso7816_atr_handle;
1133
static dissector_handle_t iso7816_handle;
1134
1135
static bool mbim_control_decode_unknown_itf;
1136
1137
enum {
1138
    SMS_PDU_AUTOMATIC,
1139
    SMS_PDU_3GPP,
1140
    SMS_PDU_3GPP2
1141
};
1142
1143
static const enum_val_t mbim_sms_pdu_format_vals[] = {
1144
    {"automatic", "Automatic", SMS_PDU_AUTOMATIC},
1145
    {"3GPP", "3GPP", SMS_PDU_3GPP},
1146
    {"3GPP2","3GPP2", SMS_PDU_3GPP2},
1147
    {NULL, NULL, -1}
1148
};
1149
static int mbim_sms_pdu_format = SMS_PDU_AUTOMATIC;
1150
1151
enum mbim_extended_version_vals {
1152
    MBIM_Extended_Version_Unknown,
1153
    MBIM_Extended_Version_1,
1154
    MBIM_Extended_Version_2,
1155
    MBIM_Extended_Version_3,
1156
    MBIM_Extended_Version_4,
1157
};
1158
1159
static const enum_val_t preferred_mbim_extended_version_vals[] = {
1160
    {"1.0", "1.0", MBIM_Extended_Version_1},
1161
    {"2.0", "2.0", MBIM_Extended_Version_2},
1162
    {"3.0", "3.0", MBIM_Extended_Version_3},
1163
    {"4.0", "4.0", MBIM_Extended_Version_4},
1164
    {NULL, NULL, -1}
1165
};
1166
static int preferred_mbim_extended_version = MBIM_Extended_Version_1;
1167
1168
#define SHOULD_MBIM_EX2_BE_APPLIED(mbim_conv) \
1169
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_2 || \
1170
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version == MBIM_Extended_Version_2)) ? 1 : 0
1171
1172
#define SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv) \
1173
0
            (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_2 || \
1174
0
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_2)) ? 1 : 0
1175
1176
#define SHOULD_MBIM_EX3_BE_APPLIED(mbim_conv) \
1177
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_3 || \
1178
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version == MBIM_Extended_Version_3)) ? 1 : 0
1179
1180
#define SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv) \
1181
0
            (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_3 || \
1182
0
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_3)) ? 1 : 0
1183
1184
#define SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv) \
1185
0
            (mbim_conv->mbim_extended_version >= MBIM_Extended_Version_4 || \
1186
0
            (mbim_conv->mbim_extended_version == MBIM_Extended_Version_Unknown && preferred_mbim_extended_version >= MBIM_Extended_Version_4)) ? 1 : 0
1187
1188
enum {
1189
    UICC_APDU_GSM_SIM,
1190
    UICC_APDU_ISO_7816
1191
};
1192
1193
static const enum_val_t mbim_uicc_apdu_dissector_vals[] = {
1194
    {"gsm_sim", "GSM SIM", UICC_APDU_GSM_SIM},
1195
    {"iso7816", "ISO 7816", UICC_APDU_ISO_7816},
1196
    {NULL, NULL, -1}
1197
};
1198
1199
static int mbim_uicc_apdu_dissector = UICC_APDU_GSM_SIM;
1200
1201
#define ROUND_UP_COUNT(Count,Pow2) \
1202
0
        ( ((Count)+(Pow2)-1) & (~(((int)(Pow2))-1)) )
1203
1204
static reassembly_table mbim_reassembly_table;
1205
1206
static wmem_map_t *mbim_uuid_ext_hash;
1207
1208
static const fragment_items mbim_frag_items = {
1209
    &ett_mbim_fragment,
1210
    &ett_mbim_fragments,
1211
    &hf_mbim_fragments,
1212
    &hf_mbim_fragment,
1213
    &hf_mbim_fragment_overlap,
1214
    &hf_mbim_fragment_overlap_conflict,
1215
    &hf_mbim_fragment_multiple_tails,
1216
    &hf_mbim_fragment_too_long_fragment,
1217
    &hf_mbim_fragment_error,
1218
    &hf_mbim_fragment_count,
1219
    &hf_mbim_reassembled_in,
1220
    &hf_mbim_reassembled_length,
1221
    &hf_mbim_reassembled_data,
1222
    "MBIM fragments"
1223
};
1224
1225
struct mbim_conv_info {
1226
    wmem_map_t *trans;
1227
    wmem_tree_t *open;
1228
    uint32_t open_count;
1229
    uint32_t cellular_class;
1230
    enum mbim_extended_version_vals mbim_extended_version;
1231
};
1232
1233
struct mbim_pair_list {
1234
    uint32_t offset;
1235
    uint32_t size;
1236
};
1237
1238
0
#define MBIM_MAX_ITEMS 1000
1239
1240
0
#define MBIM_OPEN_MSG            0x00000001
1241
0
#define MBIM_CLOSE_MSG           0x00000002
1242
0
#define MBIM_COMMAND_MSG         0x00000003
1243
0
#define MBIM_HOST_ERROR_MSG      0x00000004
1244
0
#define MBIM_OPEN_DONE           0x80000001
1245
0
#define MBIM_CLOSE_DONE          0x80000002
1246
0
#define MBIM_COMMAND_DONE        0x80000003
1247
0
#define MBIM_FUNCTION_ERROR_MSG  0x80000004
1248
0
#define MBIM_INDICATE_STATUS_MSG 0x80000007
1249
1250
static const value_string mbim_msg_type_vals[] = {
1251
    { MBIM_OPEN_MSG, "OPEN_MSG"},
1252
    { MBIM_CLOSE_MSG, "CLOSE_MSG"},
1253
    { MBIM_COMMAND_MSG, "COMMAND_MSG"},
1254
    { MBIM_HOST_ERROR_MSG, "HOST_ERROR_MSG"},
1255
    { MBIM_OPEN_DONE, "OPEN_DONE"},
1256
    { MBIM_CLOSE_DONE, "CLOSE_DONE"},
1257
    { MBIM_COMMAND_DONE, "COMMAND_DONE"},
1258
    { MBIM_FUNCTION_ERROR_MSG, "FUNCTION_ERROR_MSG"},
1259
    { MBIM_INDICATE_STATUS_MSG, "INDICATE_STATUS_MSG"},
1260
    { 0, NULL}
1261
};
1262
1263
static const value_string mbim_command_type_vals[] = {
1264
    { MBIM_COMMAND_QUERY, "Query"},
1265
    { MBIM_COMMAND_SET, "Set"},
1266
    { 0, NULL}
1267
};
1268
1269
static const value_string mbim_error_status_code_vals[] = {
1270
    { 1, "TIMEOUT_FRAGMENT"},
1271
    { 2, "FRAGMENT_OUT_OF_SEQUENCE"},
1272
    { 3, "LENGTH_MISMATCH"},
1273
    { 4, "DUPLICATED_TID"},
1274
    { 5, "NOT_OPENED"},
1275
    { 6, "UNKNOWN"},
1276
    { 7, "CANCEL"},
1277
    { 8, "MAX_TRANSFER"},
1278
    { 0, NULL}
1279
};
1280
1281
static const value_string mbim_status_code_vals[] = {
1282
    {   0, "SUCCESS"},
1283
    {   1, "BUSY"},
1284
    {   2, "FAILURE"},
1285
    {   3, "SIM_NOT_INSERTED"},
1286
    {   4, "BAD_SIM"},
1287
    {   5, "PIN_REQUIRED"},
1288
    {   6, "PIN_DISABLED"},
1289
    {   7, "NOT_REGISTERED"},
1290
    {   8, "PROVIDERS_NOT_FOUND"},
1291
    {   9, "NO_DEVICE_SUPPORT"},
1292
    {  10, "PROVIDER_NOT_VISIBLE"},
1293
    {  11, "DATA_CLASS_NOT_AVAILABLE"},
1294
    {  12, "PACKET_SERVICE_DETACHED"},
1295
    {  13, "MAX_ACTIVATED_CONTEXTS"},
1296
    {  14, "NOT_INITIALIZED"},
1297
    {  15, "VOICE_CALL_IN_PROGRESS"},
1298
    {  16, "CONTEXT_NOT_ACTIVATED"},
1299
    {  17, "SERVICE_NOT_ACTIVATED"},
1300
    {  18, "INVALID_ACCESS_STRING"},
1301
    {  19, "INVALID_USER_NAME_PWD"},
1302
    {  20, "RADIO_POWER_OFF"},
1303
    {  21, "INVALID_PARAMETERS"},
1304
    {  22, "READ_FAILURE"},
1305
    {  23, "WRITE_FAILURE"},
1306
    {  24, "Reserved"},
1307
    {  25, "NO_PHONEBOOK"},
1308
    {  26, "PARAMETER_TOO_LONG"},
1309
    {  27, "STK_BUSY"},
1310
    {  28, "OPERATION_NOT_ALLOWED"},
1311
    {  29, "MEMORY_FAILURE"},
1312
    {  30, "INVALID_MEMORY_INDEX"},
1313
    {  31, "MEMORY_FULL"},
1314
    {  32, "FILTER_NOT_SUPPORTED"},
1315
    {  33, "DSS_INSTANCE_LIMIT"},
1316
    {  34, "INVALID_DEVICE_SERVICE_OPERATION"},
1317
    {  35, "AUTH_INCORRECT_AUTN"},
1318
    {  36, "AUTH_SYNC_FAILURE"},
1319
    {  37, "AUTH_AMF_NOT_SET"},
1320
    {  38, "CONTEXT_NOT_SUPPORTED"},
1321
    {  39, "SHAREABILITY_CONDITION_ERROR"},
1322
    {  40, "PIN_FAILURE"},
1323
    {  41, "NO_LTE_ATTACH_CONFIG"},
1324
    {  42, "SESSION_ALREADY_EXISTS"},
1325
    { 100, "SMS_UNKNOWN_SMSC_ADDRESS"},
1326
    { 101, "SMS_NETWORK_TIMEOUT"},
1327
    { 102, "SMS_LANG_NOT_SUPPORTED"},
1328
    { 103, "SMS_ENCODING_NOT_SUPPORTED"},
1329
    { 104, "SMS_FORMAT_NOT_SUPPORTED"},
1330
    { 105, "SMS_MORE_DATA"},
1331
    { 200, "MATCHING_PDU_SESSION_FOUND"},
1332
    { 201, "DISSOCIATION_NEEDED_FOR_APPLICATION"},
1333
    { 202, "ERROR_INVALID_SLOT"},
1334
    { 203, "NO_MATCHING_URSP_RULE"},
1335
    { 204, "DEFAULT_URSP_RULE"},
1336
    { 0x87430001, "UICC_NO_LOGICAL_CHANNELS"},
1337
    { 0x87430002, "UICC_SELECT_FAILED"},
1338
    { 0x87430003, "UICC_INVALID_LOGICAL_CHANNEL"},
1339
    { 0, NULL}
1340
};
1341
static value_string_ext mbim_status_code_vals_ext = VALUE_STRING_EXT_INIT(mbim_status_code_vals);
1342
1343
struct mbim_uuid {
1344
    uint8_t service_idx;
1345
    e_guid_t uuid;
1346
};
1347
1348
0
#define UUID_BASIC_CONNECT              0
1349
0
#define UUID_SMS                        1
1350
0
#define UUID_USSD                       2
1351
0
#define UUID_PHONEBOOK                  3
1352
0
#define UUID_STK                        4
1353
0
#define UUID_AUTH                       5
1354
0
#define UUID_DSS                        6
1355
0
#define UUID_MULTICARRIER               7
1356
0
#define UUID_MS_HOSTSHUTDOWN            8
1357
0
#define UUID_MSFWID                     9
1358
0
#define UUID_QMI                       10 /* Qualcomm proprietary UUID */
1359
0
#define UUID_INTEL_FWUSVC              11 /* Intel  firmware update service proprietary UUID */
1360
0
#define UUID_INTEL_DPTF                12 /* Intel proprietary UUID */
1361
0
#define UUID_INTEL_SAR                 13 /* Intel proprietary UUID */
1362
0
#define UUID_INTEL_ACT                 14 /* Intel adaptive clocking proprietary UUID */
1363
0
#define UUID_INTEL_TRCSVC              15 /* Intel trace service proprietary UUID */
1364
0
#define UUID_INTEL_NRTC                16 /* Intel proprietary UUID */
1365
0
#define UUID_INTEL_USB_PROFILE         17 /* Intel USB profile proprietary UUID */
1366
0
#define UUID_INTEL_CIQ                 18 /* Intel proprietary UUID */
1367
0
#define UUID_ATDS                      19 /* AT&T extensions proprietary UUID */
1368
0
#define UUID_MULTIFLOW                 20
1369
0
#define UUID_BASIC_CONNECT_EXTENSIONS  21 /* Microsoft */
1370
0
#define UUID_MS_SARCONTROL             22 /* Microsoft */
1371
0
#define UUID_MS_UICC_LOW_LEVEL         23
1372
0
#define UUID_MS_VOICE_EXTENSIONS       24
1373
0
#define UUID_MAX                       25
1374
0
#define UUID_EXT_IDX                  255
1375
1376
static const struct mbim_uuid mbim_uuid_service_id_vals[UUID_MAX] = {
1377
    { UUID_BASIC_CONNECT, {0xa289cc33, 0xbcbb, 0x8b4f, { 0xb6, 0xb0, 0x13, 0x3e, 0xc2, 0xaa, 0xe6, 0xdf}}},
1378
    { UUID_SMS, {0x533fbeeb, 0x14fe, 0x4467, {0x9f, 0x90, 0x33, 0xa2, 0x23, 0xe5, 0x6c, 0x3f}}},
1379
    { UUID_USSD, {0xe550a0c8, 0x5e82, 0x479e, {0x82, 0xf7, 0x10, 0xab, 0xf4, 0xc3, 0x35, 0x1f}}},
1380
    { UUID_PHONEBOOK, {0x4bf38476, 0x1e6a, 0x41db, {0xb1, 0xd8, 0xbe, 0xd2, 0x89, 0xc2, 0x5b, 0xdb}}},
1381
    { UUID_STK, {0xd8f20131, 0xfcb5, 0x4e17, {0x86, 0x02, 0xd6, 0xed, 0x38, 0x16, 0x16, 0x4c}}},
1382
    { UUID_AUTH, {0x1d2b5ff7, 0x0aa1, 0x48b2, {0xaa, 0x52, 0x50, 0xf1, 0x57, 0x67, 0x17, 0x4e}}},
1383
    { UUID_DSS, {0xc08a26dd, 0x7718, 0x4382, {0x84, 0x82, 0x6e, 0x0d, 0x58, 0x3c, 0x4d, 0x0e}}},
1384
    { UUID_MULTICARRIER, {0x8b569648, 0x628d, 0x4653, {0x9b, 0x9f, 0x10, 0x25, 0x40, 0x44, 0x24, 0xe1}}},
1385
    { UUID_MS_HOSTSHUTDOWN, {0x883b7c26, 0x985f, 0x43fa, {0x98, 0x04, 0x27, 0xd7, 0xfb, 0x80, 0x95, 0x9c}}},
1386
    { UUID_MSFWID, {0xe9f7dea2, 0xfeaf, 0x4009, {0x93, 0xce, 0x90, 0xa3, 0x69, 0x41, 0x03, 0xb6}}},
1387
    { UUID_QMI, {0xd1a30bc2, 0xf97a, 0x6e43, {0xbf, 0x65, 0xc7, 0xe2, 0x4f, 0xb0, 0xf0, 0xd3}}},
1388
    { UUID_INTEL_FWUSVC, {0x0ed374cb, 0xf835, 0x4474, {0xbc, 0x11, 0x3b, 0x3f, 0xd7, 0x6f, 0x56, 0x41}}},
1389
    { UUID_INTEL_DPTF, {0xfdc22af2, 0xf441, 0x4d46, {0xaf, 0x8d, 0x25, 0x9f, 0xcd, 0xde, 0x46, 0x35}}},
1390
    { UUID_INTEL_SAR, {0x10e40d69, 0x375a, 0x42ce, {0xa2, 0x97, 0x90, 0x61, 0x64, 0xf2, 0x75, 0x4c}}},
1391
    { UUID_INTEL_ACT, {0xed19555d, 0xa6ac, 0x4327, {0x8e, 0xb1, 0xfc, 0x02, 0x2e, 0x5e, 0x23, 0x88}}},
1392
    { UUID_INTEL_TRCSVC, {0x59a7f323, 0xfe5a, 0x4301, {0xb1, 0x85, 0xb8, 0xea, 0x9e, 0x61, 0x67, 0xb7}}},
1393
    { UUID_INTEL_NRTC, {0x2b6d8c5a, 0x0ca9, 0x418f, {0x8a, 0xac, 0x1a, 0x9d, 0xc8, 0xe3, 0x28, 0x66}}},
1394
    { UUID_INTEL_USB_PROFILE, {0xfa142322, 0x166b, 0x4fd9, {0x89, 0xf0, 0x99, 0xbe, 0x90, 0xae, 0x8e, 0x3d}}},
1395
    { UUID_INTEL_CIQ, {0x6A2A8150, 0xABCA, 0x4b11, {0xA4, 0xE2, 0xF2, 0xFC, 0x87, 0x9F, 0x54, 0x81}}},
1396
    { UUID_ATDS, {0x5967bdcc, 0x7fd2, 0x49a2, {0x9f, 0x5c, 0xb2, 0xe7, 0x0e, 0x52, 0x7d, 0xb3}}},
1397
    { UUID_MULTIFLOW, {0x8d8f32d9, 0xf7c2, 0x4419, {0xb2, 0x8b, 0xde, 0xdc, 0xde, 0x20, 0x5e, 0xd8}}},
1398
    { UUID_BASIC_CONNECT_EXTENSIONS, {0x3d01dcc5, 0xfef5, 0x4d05, {0x0d, 0x3a, 0xbe, 0xf7, 0x05, 0x8e, 0x9a, 0xaf}}},
1399
    { UUID_MS_SARCONTROL, {0x68223d04, 0x9f6c, 0x4e0f, {0x82, 0x2d, 0x28, 0x44, 0x1f, 0xb7, 0x23, 0x40}}},
1400
    { UUID_MS_UICC_LOW_LEVEL, {0xc2f6588e, 0xf037, 0x4bc9, {0x86, 0x65, 0xf4, 0xd4, 0x4b, 0xd0, 0x93, 0x67}}},
1401
    { UUID_MS_VOICE_EXTENSIONS, {0x8d8b9eba, 0x37be, 0x449b, {0x8f, 0x1e, 0x61, 0xcb, 0x03, 0x4a, 0x70, 0x2e}}}
1402
};
1403
1404
static const value_string mbim_service_id_vals[] = {
1405
    { UUID_BASIC_CONNECT, "UUID_BASIC_CONNECT"},
1406
    { UUID_SMS, "UUID_SMS"},
1407
    { UUID_USSD, "UUID_USSD"},
1408
    { UUID_PHONEBOOK, "UUID_PHONEBOOK"},
1409
    { UUID_STK, "UUID_STK"},
1410
    { UUID_AUTH, "UUID_AUTH"},
1411
    { UUID_DSS, "UUID_DSS"},
1412
    { UUID_MULTICARRIER, "UUID_MULTICARRIER"},
1413
    { UUID_MS_HOSTSHUTDOWN, "UUID_MS_HOSTSHUTDOWN"},
1414
    { UUID_MSFWID, "UUID_MSFWID"},
1415
    { UUID_QMI, "UUID_QMI"},
1416
    { UUID_INTEL_FWUSVC, "UUID_INTEL_FWUSVC"},
1417
    { UUID_INTEL_DPTF, "UUID_INTEL_DPTF"},
1418
    { UUID_INTEL_SAR, "UUID_INTEL_SAR"},
1419
    { UUID_INTEL_ACT, "UUID_INTEL_ACT"},
1420
    { UUID_INTEL_TRCSVC, "UUID_INTEL_TRCSVC"},
1421
    { UUID_INTEL_NRTC, "UUID_INTEL_NRTC"},
1422
    { UUID_INTEL_USB_PROFILE, "UUID_INTEL_USB_PROFILE"},
1423
    { UUID_INTEL_CIQ, "UUID_INTEL_CIQ"},
1424
    { UUID_ATDS, "UUID_ATDS"},
1425
    { UUID_MULTIFLOW, "UUID_MULTIFLOW"},
1426
    { UUID_BASIC_CONNECT_EXTENSIONS, "UUID_BASIC_CONNECT_EXTENSIONS"},
1427
    { UUID_MS_SARCONTROL, "UUID_MS_SARCONTROL"},
1428
    { UUID_MS_UICC_LOW_LEVEL, "UUID_MS_UICC_LOW_LEVEL"},
1429
    { UUID_MS_VOICE_EXTENSIONS, "UUID_MS_VOICE_EXTENSIONS"},
1430
    { 0, NULL}
1431
};
1432
static value_string_ext mbim_service_id_vals_ext = VALUE_STRING_EXT_INIT(mbim_service_id_vals);
1433
1434
0
#define MBIM_CID_DEVICE_CAPS                   1
1435
0
#define MBIM_CID_SUBSCRIBER_READY_STATUS       2
1436
0
#define MBIM_CID_RADIO_STATE                   3
1437
0
#define MBIM_CID_PIN                           4
1438
0
#define MBIM_CID_PIN_LIST                      5
1439
0
#define MBIM_CID_HOME_PROVIDER                 6
1440
0
#define MBIM_CID_PREFERRED_PROVIDERS           7
1441
0
#define MBIM_CID_VISIBLE_PROVIDERS             8
1442
0
#define MBIM_CID_REGISTER_STATE                9
1443
0
#define MBIM_CID_PACKET_SERVICE                10
1444
0
#define MBIM_CID_SIGNAL_STATE                  11
1445
0
#define MBIM_CID_CONNECT                       12
1446
0
#define MBIM_CID_PROVISIONED_CONTEXTS          13
1447
0
#define MBIM_CID_SERVICE_ACTIVATION            14
1448
0
#define MBIM_CID_IP_CONFIGURATION              15
1449
0
#define MBIM_CID_DEVICE_SERVICES               16
1450
0
#define MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST 19
1451
0
#define MBIM_CID_PACKET_STATISTICS             20
1452
0
#define MBIM_CID_NETWORK_IDLE_HINT             21
1453
0
#define MBIM_CID_EMERGENCY_MODE                22
1454
0
#define MBIM_CID_IP_PACKET_FILTERS             23
1455
0
#define MBIM_CID_MULTICARRIER_PROVIDERS        24
1456
1457
static const value_string mbim_uuid_basic_connect_cid_vals[] = {
1458
    { MBIM_CID_DEVICE_CAPS, "DEVICE_CAPS"},
1459
    { MBIM_CID_SUBSCRIBER_READY_STATUS, "SUBSCRIBER_READY_STATUS"},
1460
    { MBIM_CID_RADIO_STATE, "RADIO_STATE"},
1461
    { MBIM_CID_PIN, "PIN"},
1462
    { MBIM_CID_PIN_LIST, "PIN_LIST"},
1463
    { MBIM_CID_HOME_PROVIDER, "HOME_PROVIDER"},
1464
    { MBIM_CID_PREFERRED_PROVIDERS, "PREFERRED_PROVIDERS"},
1465
    { MBIM_CID_VISIBLE_PROVIDERS, "VISIBLE_PROVIDERS"},
1466
    { MBIM_CID_REGISTER_STATE, "REGISTER_STATE"},
1467
    { MBIM_CID_PACKET_SERVICE, "PACKET_SERVICE"},
1468
    { MBIM_CID_SIGNAL_STATE, "SIGNAL_STATE"},
1469
    { MBIM_CID_CONNECT, "CONNECT"},
1470
    { MBIM_CID_PROVISIONED_CONTEXTS, "PROVISIONED_CONTEXTS"},
1471
    { MBIM_CID_SERVICE_ACTIVATION, "SERVICE_ACTIVATION"},
1472
    { MBIM_CID_IP_CONFIGURATION, "IP_CONFIGURATION"},
1473
    { MBIM_CID_DEVICE_SERVICES, "DEVICE_SERVICES"},
1474
    { MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST, "DEVICE_SERVICE_SUBSCRIBE_LIST"},
1475
    { MBIM_CID_PACKET_STATISTICS, "PACKET_STATISTICS"},
1476
    { MBIM_CID_NETWORK_IDLE_HINT, "NETWORK_IDLE_HINT"},
1477
    { MBIM_CID_EMERGENCY_MODE, "EMERGENCY_MODE"},
1478
    { MBIM_CID_IP_PACKET_FILTERS, "IP_PACKET_FILTERS"},
1479
    { MBIM_CID_MULTICARRIER_PROVIDERS, "MULTICARRIER_PROVIDERS"},
1480
    { 0, NULL}
1481
};
1482
static value_string_ext mbim_uuid_basic_connect_cid_vals_ext = VALUE_STRING_EXT_INIT(mbim_uuid_basic_connect_cid_vals);
1483
1484
0
#define MBIM_CID_SMS_CONFIGURATION        1
1485
0
#define MBIM_CID_SMS_READ                 2
1486
0
#define MBIM_CID_SMS_SEND                 3
1487
0
#define MBIM_CID_SMS_DELETE               4
1488
0
#define MBIM_CID_SMS_MESSAGE_STORE_STATUS 5
1489
1490
static const value_string mbim_uuid_sms_cid_vals[] = {
1491
    { MBIM_CID_SMS_CONFIGURATION, "SMS_CONFIGURATION"},
1492
    { MBIM_CID_SMS_READ, "SMS_READ"},
1493
    { MBIM_CID_SMS_SEND, "SMS_SEND"},
1494
    { MBIM_CID_SMS_DELETE, "SMS_DELETE"},
1495
    { MBIM_CID_SMS_MESSAGE_STORE_STATUS, "SMS_MESSAGE_STORE_STATUS"},
1496
    { 0, NULL}
1497
};
1498
1499
0
#define MBIM_CID_USSD 1
1500
1501
static const value_string mbim_uuid_ussd_cid_vals[] = {
1502
    { MBIM_CID_USSD, "USSD"},
1503
    { 0, NULL}
1504
};
1505
1506
0
#define MBIM_CID_PHONEBOOK_CONFIGURATION 1
1507
0
#define MBIM_CID_PHONEBOOK_READ          2
1508
0
#define MBIM_CID_PHONEBOOK_DELETE        3
1509
0
#define MBIM_CID_PHONEBOOK_WRITE         4
1510
1511
static const value_string mbim_uuid_phonebook_cid_vals[] = {
1512
    { MBIM_CID_PHONEBOOK_CONFIGURATION, "PHONEBOOK_CONFIGURATION"},
1513
    { MBIM_CID_PHONEBOOK_READ, "PHONEBOOK_READ"},
1514
    { MBIM_CID_PHONEBOOK_DELETE, "PHONEBOOK_DELETE"},
1515
    { MBIM_CID_PHONEBOOK_WRITE, "PHONEBOOK_WRITE"},
1516
    { 0, NULL}
1517
};
1518
1519
0
#define MBIM_CID_STK_PAC               1
1520
0
#define MBIM_CID_STK_TERMINAL_RESPONSE 2
1521
0
#define MBIM_CID_STK_ENVELOPE          3
1522
1523
static const value_string mbim_uuid_stk_cid_vals[] = {
1524
    { MBIM_CID_STK_PAC, "STK_PAC"},
1525
    { MBIM_CID_STK_TERMINAL_RESPONSE, "STK_TERMINAL_RESPONSE"},
1526
    { MBIM_CID_STK_ENVELOPE, "STK_ENVELOPE"},
1527
    { 0, NULL}
1528
};
1529
1530
0
#define MBIM_CID_AKA_AUTH  1
1531
0
#define MBIM_CID_AKAP_AUTH 2
1532
0
#define MBIM_CID_SIM_AUTH  3
1533
1534
static const value_string mbim_uuid_auth_cid_vals[] = {
1535
    { MBIM_CID_AKA_AUTH, "AKA_AUTH"},
1536
    { MBIM_CID_AKAP_AUTH, "AKAP_AUTH"},
1537
    { MBIM_CID_SIM_AUTH, "SIM_AUTH"},
1538
    { 0, NULL}
1539
};
1540
1541
0
#define MBIM_CID_DSS_CONNECT 1
1542
1543
static const value_string mbim_uuid_dss_cid_vals[] = {
1544
    { MBIM_CID_DSS_CONNECT, "DSS_CONNECT"},
1545
    { 0, NULL}
1546
};
1547
1548
0
#define MBIM_CID_MULTICARRIER_CAPABILITIES     1
1549
0
#define MBIM_CID_LOCATION_INFO                 2
1550
0
#define MBIM_CID_MULTICARRIER_CURRENT_CID_LIST 3
1551
1552
static const value_string mbim_uuid_multicarrier_cid_vals[] = {
1553
    { MBIM_CID_MULTICARRIER_CAPABILITIES, "MULTICARRIER_CAPABILITIES"},
1554
    { MBIM_CID_LOCATION_INFO, "LOCATION_INFO"},
1555
    { MBIM_CID_MULTICARRIER_CURRENT_CID_LIST, "MULTICARRIER_CURRENT_CID_LIST"},
1556
    { 0, NULL}
1557
};
1558
1559
0
#define MBIM_CID_MS_HOSTSHUTDOWN    1
1560
0
#define MBIM_CID_MS_HOSTPRESHUTDOWN 2
1561
1562
static const value_string mbim_uuid_ms_hostshutdown_cid_vals[] = {
1563
    { MBIM_CID_MS_HOSTSHUTDOWN, "MS_HOSTSHUTDOWN"},
1564
    { MBIM_CID_MS_HOSTPRESHUTDOWN, "MS_HOSTPRESHUTDOWN"},
1565
    { 0, NULL}
1566
};
1567
1568
0
#define MBIM_CID_MSFWID_FIRMWAREID 1
1569
1570
static const value_string mbim_uuid_msfwid_cid_vals[] = {
1571
    { MBIM_CID_MSFWID_FIRMWAREID, "MSFWID_FIRMWAREID"},
1572
    { 0, NULL}
1573
};
1574
1575
0
#define MBIM_CID_QMI_QMI 1
1576
1577
static const value_string mbim_uuid_qmi_cid_vals[] = {
1578
    { MBIM_CID_QMI_QMI, "QMI"},
1579
    { 0, NULL}
1580
};
1581
1582
0
#define MBIM_CID_INTC_MODEM_REBOOT 1
1583
1584
static const value_string mbim_uuid_intel_fwusvc_cid_vals[] = {
1585
    { MBIM_CID_INTC_MODEM_REBOOT, "INTC_MODEM_REBOOT"},
1586
    { 0, NULL}
1587
};
1588
1589
0
#define MBIM_CID_INTC_THERMAL_STATE 0x02000100
1590
1591
static const value_string mbim_uuid_intel_dptf_cid_vals[] = {
1592
    { MBIM_CID_INTC_THERMAL_STATE, "INTC_THERMAL_STATE"},
1593
    { 0, NULL}
1594
};
1595
1596
0
#define MBIM_CID_INTC_SAR_CONFIG 1
1597
1598
static const value_string mbim_uuid_intel_sar_cid_vals[] = {
1599
    { MBIM_CID_INTC_SAR_CONFIG, "INTC_SAR_CONFIG"},
1600
    { 0, NULL}
1601
};
1602
1603
0
#define MBIM_CID_INTC_ADPCLK_MODE 0x02000010
1604
1605
static const value_string mbim_uuid_intel_act_cid_vals[] = {
1606
    { MBIM_CID_INTC_ADPCLK_MODE, "INTC_ADPCLK_MODE"},
1607
    { 0, NULL}
1608
};
1609
1610
0
#define MBIM_CID_INTC_TRACE      1
1611
0
#define MBIM_CID_INTC_TRACE_DATA 2
1612
1613
static const value_string mbim_uuid_intel_trcsvc_cid_vals[] = {
1614
    { MBIM_CID_INTC_TRACE, "INTC_TRACE"},
1615
    { MBIM_CID_INTC_TRACE_DATA, "INTC_TRACE_DATA"},
1616
    { 0, NULL}
1617
};
1618
1619
0
#define MBIM_CID_INTC_NRTAPP 1
1620
0
#define MBIM_CID_INTC_NRTCWS 2
1621
1622
static const value_string mbim_uuid_intel_nrtc_cid_vals[] = {
1623
    { MBIM_CID_INTC_NRTAPP, "INTC_NRTAPP"},
1624
    { MBIM_CID_INTC_NRTCWS, "INTC_NRTCWS"},
1625
    { 0, NULL}
1626
};
1627
1628
0
#define MBIM_CID_INTC_USBPROFILE 1
1629
1630
static const value_string mbim_uuid_intel_usb_profile_cid_vals[] = {
1631
    { MBIM_CID_INTC_USBPROFILE, "INTC_USBPROFILE"},
1632
    { 0, NULL}
1633
};
1634
1635
0
#define MBIM_CID_INTC_CIQ 1
1636
1637
static const value_string mbim_uuid_intel_ciq_cid_vals[] = {
1638
    { MBIM_CID_INTC_CIQ, "INTC_CIQ"},
1639
    { 0, NULL}
1640
};
1641
1642
0
#define MBIM_CID_ATDS_SIGNAL                 1
1643
0
#define MBIM_CID_ATDS_LOCATION               2
1644
0
#define MBIM_CID_ATDS_OPERATORS              3
1645
0
#define MBIM_CID_ATDS_RAT                    4
1646
0
#define MBIM_CID_ATDS_REGISTER_STATE         9
1647
0
#define MBIM_CID_ATDS_SET_PROJECTION_TABLES 10
1648
1649
static const value_string mbim_uuid_atds_cid_vals[] = {
1650
    { MBIM_CID_ATDS_SIGNAL, "ATDS_SIGNAL"},
1651
    { MBIM_CID_ATDS_LOCATION, "ATDS_LOCATION"},
1652
    { MBIM_CID_ATDS_OPERATORS, "ATDS_OPERATORS"},
1653
    { MBIM_CID_ATDS_RAT, "ATDS_RAT"},
1654
    { MBIM_CID_ATDS_REGISTER_STATE, "ATDS_REGISTER_STATE"},
1655
    { MBIM_CID_ATDS_SET_PROJECTION_TABLES, "ATDS_SET_PROJECTION_TABLES"},
1656
    { 0, NULL}
1657
};
1658
1659
0
#define MBIM_CID_MULTIFLOW_CAPS     1
1660
0
#define MBIM_CID_MULTIFLOW_UPLINK   2
1661
0
#define MBIM_CID_MULTIFLOW_DOWNLINK 3
1662
0
#define MBIM_CID_MULTIFLOW_TFT      4
1663
1664
static const value_string mbim_uuid_multiflow_cid_vals[] = {
1665
    { MBIM_CID_MULTIFLOW_CAPS, "MULTIFLOW_CAPS"},
1666
    { MBIM_CID_MULTIFLOW_UPLINK, "MULTIFLOW_UPLINK"},
1667
    { MBIM_CID_MULTIFLOW_DOWNLINK, "MULTIFLOW_DOWNLINK"},
1668
    { MBIM_CID_MULTIFLOW_TFT, "MULTIFLOW_TFT"},
1669
    { 0, NULL}
1670
};
1671
1672
0
#define MBIM_CID_MS_PROVISIONED_CONTEXT_V2  1
1673
0
#define MBIM_CID_MS_NETWORK_BLACKLIST       2
1674
0
#define MBIM_CID_MS_LTE_ATTACH_CONFIG       3
1675
0
#define MBIM_CID_MS_LTE_ATTACH_STATUS       4
1676
0
#define MBIM_CID_MS_SYS_CAPS                5
1677
0
#define MBIM_CID_MS_DEVICE_CAPS_V2          6
1678
0
#define MBIM_CID_MS_DEVICE_SLOT_MAPPINGS    7
1679
0
#define MBIM_CID_MS_SLOT_INFO_STATUS        8
1680
0
#define MBIM_CID_PCO                        9
1681
0
#define MBIM_CID_MS_DEVICE_RESET           10
1682
0
#define MBIM_CID_BASE_STATIONS_INFO        11
1683
0
#define MBIM_CID_LOCATION_INFO_STATUS      12
1684
#define MBIM_CID_MS_MODEM_LOGGING_CONFIG   13
1685
0
#define MBIM_CID_MS_PIN_INFO_EX2           14
1686
0
#define MBIM_CID_VERSION                   15
1687
0
#define MBIM_CID_MS_MODEM_CONFIG           16
1688
0
#define MBIM_CID_MS_REGISTRATION_PARAMS    17
1689
0
#define MBIM_CID_MS_NETWORK_PARAMS         18
1690
0
#define MBIM_CID_MS_WAKE_REASON            19
1691
0
#define MBIM_CID_MS_UE_POLICY              20
1692
1693
static const value_string mbim_uuid_basic_connect_extensions_cid_vals[] = {
1694
    { MBIM_CID_MS_PROVISIONED_CONTEXT_V2, "MS_PROVISIONED_CONTEXT_V2"},
1695
    { MBIM_CID_MS_NETWORK_BLACKLIST, "MS_NETWORK_BLACKLIST"},
1696
    { MBIM_CID_MS_LTE_ATTACH_CONFIG, "MS_LTE_ATTACH_CONFIG"},
1697
    { MBIM_CID_MS_LTE_ATTACH_STATUS, "MS_LTE_ATTACH_STATUS"},
1698
    { MBIM_CID_MS_SYS_CAPS, "MS_SYS_CAPS"},
1699
    { MBIM_CID_MS_DEVICE_CAPS_V2, "MS_DEVICE_CAPS_V2"},
1700
    { MBIM_CID_MS_DEVICE_SLOT_MAPPINGS, "MS_DEVICE_SLOT_MAPPINGS"},
1701
    { MBIM_CID_MS_SLOT_INFO_STATUS, "MS_SLOT_INFO_STATUS"},
1702
    { MBIM_CID_PCO, "PCO"},
1703
    { MBIM_CID_MS_DEVICE_RESET, "MS_DEVICE_RESET"},
1704
    { MBIM_CID_BASE_STATIONS_INFO, "BASE_STATIONS_INFO"},
1705
    { MBIM_CID_LOCATION_INFO_STATUS, "LOCATION_INFO_STATUS"},
1706
    { MBIM_CID_MS_MODEM_LOGGING_CONFIG, "MS_MODEM_LOGGING_CONFIG"},
1707
    { MBIM_CID_MS_PIN_INFO_EX2, "MS_PIN_INFO_EX2"},
1708
    { MBIM_CID_VERSION, "VERSION"},
1709
    { MBIM_CID_MS_MODEM_CONFIG, "MS_MODEM_CONFIG"},
1710
    { MBIM_CID_MS_REGISTRATION_PARAMS, "MS_REGISTRATION_PARAMS"},
1711
    { MBIM_CID_MS_NETWORK_PARAMS, "MS_NETWORK_PARAMS"},
1712
    { MBIM_CID_MS_WAKE_REASON, "MS_WAKE_REASON"},
1713
    { MBIM_CID_MS_UE_POLICY, "MS_UE_POLICY"},
1714
    { 0, NULL}
1715
};
1716
1717
0
#define MBIM_CID_MS_SAR_CONFIG          1
1718
0
#define MBIM_CID_MS_TRANSMISSION_STATUS 2
1719
1720
static const value_string mbim_uuid_ms_sarcontrol_cid_vals[] = {
1721
    { MBIM_CID_MS_SAR_CONFIG, "MS_SAR_CONFIG"},
1722
    { MBIM_CID_MS_TRANSMISSION_STATUS, "MS_TRANSMISSION_STATUS"},
1723
    { 0, NULL}
1724
};
1725
1726
0
#define MBIM_CID_MS_UICC_ATR                 1
1727
0
#define MBIM_CID_MS_UICC_OPEN_CHANNEL        2
1728
0
#define MBIM_CID_MS_UICC_CLOSE_CHANNEL       3
1729
0
#define MBIM_CID_MS_UICC_APDU                4
1730
0
#define MBIM_CID_MS_UICC_TERMINAL_CAPABILITY 5
1731
0
#define MBIM_CID_MS_UICC_RESET               6
1732
0
#define MBIM_CID_MS_UICC_APP_LIST            7
1733
0
#define MBIM_CID_MS_UICC_FILE_STATUS         8
1734
0
#define MBIM_CID_MS_UICC_ACCESS_BINARY       9
1735
0
#define MBIM_CID_MS_UICC_ACCESS_RECORD      10
1736
1737
static const value_string mbim_uuid_ms_uicc_low_level_cid_vals[] = {
1738
    { MBIM_CID_MS_UICC_ATR, "MS_UICC_ATR" },
1739
    { MBIM_CID_MS_UICC_OPEN_CHANNEL, "MS_UICC_OPEN_CHANNEL" },
1740
    { MBIM_CID_MS_UICC_CLOSE_CHANNEL, "MS_UICC_CLOSE_CHANNEL" },
1741
    { MBIM_CID_MS_UICC_APDU, "MS_UICC_APDU" },
1742
    { MBIM_CID_MS_UICC_TERMINAL_CAPABILITY, "MS_UICC_TERMINAL_CAPABILITY" },
1743
    { MBIM_CID_MS_UICC_RESET, "MS_UICC_RESET" },
1744
    { MBIM_CID_MS_UICC_APP_LIST, "MS_UICC_APP_LIST" },
1745
    { MBIM_CID_MS_UICC_FILE_STATUS, "MS_UICC_FILE_STATUS" },
1746
    { MBIM_CID_MS_UICC_ACCESS_BINARY, "MS_UICC_ACCESS_BINARY" },
1747
    { MBIM_CID_MS_UICC_ACCESS_RECORD, "MS_UICC_ACCESS_RECORD" },
1748
    { 0, NULL}
1749
};
1750
1751
0
#define MBIM_CID_MS_VOICE_EXTENSIONS_NITZ    10
1752
static const value_string mbim_uuid_ms_voice_extensions_cid_vals[] = {
1753
    { MBIM_CID_MS_VOICE_EXTENSIONS_NITZ, "MS_NITZ"},
1754
    { 0, NULL}
1755
};
1756
1757
struct mbim_uuid_info_ {
1758
    int *hf_entry;
1759
    const value_string *cid_list;
1760
    value_string_ext *cid_list_ext;
1761
};
1762
1763
static const struct mbim_uuid_info_ mbim_uuid_info[UUID_MAX] = {
1764
    { &hf_mbim_uuid_basic_connect_cid, NULL, &mbim_uuid_basic_connect_cid_vals_ext}, /* UUID_BASIC_CONNECT */
1765
    { &hf_mbim_uuid_sms_cid, mbim_uuid_sms_cid_vals, NULL}, /* UUID_SMS */
1766
    { &hf_mbim_uuid_ussd_cid, mbim_uuid_ussd_cid_vals, NULL}, /* UUID_USSD */
1767
    { &hf_mbim_uuid_phonebook_cid, mbim_uuid_phonebook_cid_vals, NULL}, /* UUID_PHONEBOOK */
1768
    { &hf_mbim_uuid_stk_cid, mbim_uuid_stk_cid_vals, NULL}, /* UUID_STK */
1769
    { &hf_mbim_uuid_auth_cid, mbim_uuid_auth_cid_vals, NULL}, /* UUID_AUTH */
1770
    { &hf_mbim_uuid_dss_cid, mbim_uuid_dss_cid_vals, NULL}, /* UUID_DSS */
1771
    { &hf_mbim_uuid_multicarrier_cid, mbim_uuid_multicarrier_cid_vals, NULL}, /* UUID_MULTICARRIER */
1772
    { &hf_mbim_uuid_ms_hostshutdown_cid, mbim_uuid_ms_hostshutdown_cid_vals, NULL}, /* UUID_MS_HOSTSHUTDOWN */
1773
    { &hf_mbim_uuid_msfwid_cid, mbim_uuid_msfwid_cid_vals, NULL}, /* UUID_MSFWID */
1774
    { &hf_mbim_uuid_qmi_cid, mbim_uuid_qmi_cid_vals, NULL}, /* UUID_QMI */
1775
    { &hf_mbim_uuid_intel_fwusvc_cid, mbim_uuid_intel_fwusvc_cid_vals, NULL}, /* UUID_INTEL_FWUSVC */
1776
    { &hf_mbim_uuid_intel_dptf_cid, mbim_uuid_intel_dptf_cid_vals, NULL}, /* UUID_INTEL_DPTF */
1777
    { &hf_mbim_uuid_intel_sar_cid, mbim_uuid_intel_sar_cid_vals, NULL}, /* UUID_INTEL_SAR */
1778
    { &hf_mbim_uuid_intel_act_cid, mbim_uuid_intel_act_cid_vals, NULL}, /* UUID_INTEL_ACT */
1779
    { &hf_mbim_uuid_intel_trcsvc_cid, mbim_uuid_intel_trcsvc_cid_vals, NULL}, /* UUID_INTEL_TRCSVC */
1780
    { &hf_mbim_uuid_intel_nrtc_cid, mbim_uuid_intel_nrtc_cid_vals, NULL}, /* UUID_INTEL_NRTC */
1781
    { &hf_mbim_uuid_intel_usb_profile_cid, mbim_uuid_intel_usb_profile_cid_vals, NULL}, /* UUID_INTEL_USB_PROFILE */
1782
    { &hf_mbim_uuid_intel_ciq_cid, mbim_uuid_intel_ciq_cid_vals, NULL}, /* UUID_INTEL_CIQ */
1783
    { &hf_mbim_uuid_atds_cid, mbim_uuid_atds_cid_vals, NULL}, /* UUID_ATDS */
1784
    { &hf_mbim_uuid_multiflow_cid, mbim_uuid_multiflow_cid_vals, NULL}, /* UUID_MULTIFLOW */
1785
    { &hf_mbim_uuid_basic_connect_extensions_cid, mbim_uuid_basic_connect_extensions_cid_vals, NULL}, /* UUID_BASIC_CONNECT_EXTENSIONS */
1786
    { &hf_mbim_uuid_ms_sarcontrol_cid, mbim_uuid_ms_sarcontrol_cid_vals, NULL}, /* UUID_MS_SARCONTROL */
1787
    { &hf_mbim_uuid_ms_uicc_low_level_cid, mbim_uuid_ms_uicc_low_level_cid_vals, NULL}, /* UUID_MS_UICC_LOW_LEVEL */
1788
    { &hf_mbim_uuid_ms_voice_extensions_cid, mbim_uuid_ms_voice_extensions_cid_vals, NULL} /* UUID_MS_VOICE_EXTENSIONS */
1789
};
1790
1791
static const value_string mbim_device_caps_info_device_type_vals[] = {
1792
    { 0, "Unknown"},
1793
    { 1, "Embedded"},
1794
    { 2, "Removable"},
1795
    { 3, "Remote"},
1796
    { 0, NULL}
1797
};
1798
1799
0
#define MBIM_CELLULAR_CLASS_GSM  1
1800
0
#define MBIM_CELLULAR_CLASS_CDMA 2
1801
1802
static const value_string mbim_cellular_class_vals[] = {
1803
    { MBIM_CELLULAR_CLASS_GSM, "GSM"},
1804
    { MBIM_CELLULAR_CLASS_CDMA, "CDMA"},
1805
    { 0, NULL}
1806
};
1807
1808
static int* const mbim_cellular_class_fields[] = {
1809
    &hf_mbim_cellular_class_gsm,
1810
    &hf_mbim_cellular_class_cdma,
1811
    NULL
1812
};
1813
1814
static const value_string mbim_device_caps_info_voice_class_vals[] = {
1815
    { 0, "Unknown"},
1816
    { 1, "No Voice"},
1817
    { 2, "Separate Voice Data"},
1818
    { 3, "Simultaneous Voice Data"},
1819
    { 0, NULL}
1820
};
1821
1822
static const value_string mbim_packet_service_info_frequency_range_vals[] = {
1823
    { 0, "Unknown"},
1824
    { 1, "Range1"},
1825
    { 2, "Range2"},
1826
    { 3, "Range1AndRange2"},
1827
    { 0, NULL}
1828
};
1829
1830
static int * const mbim_device_caps_info_sim_class_fields[] = {
1831
    &hf_mbim_device_caps_info_sim_class_logical,
1832
    &hf_mbim_device_caps_info_sim_class_removable,
1833
    NULL
1834
};
1835
1836
static int * const mbim_data_class_fields[] = {
1837
    &hf_mbim_data_class_gprs,
1838
    &hf_mbim_data_class_edge,
1839
    &hf_mbim_data_class_umts,
1840
    &hf_mbim_data_class_hsdpa,
1841
    &hf_mbim_data_class_hsupa,
1842
    &hf_mbim_data_class_lte,
1843
    &hf_mbim_data_class_5g,
1844
    &hf_mbim_data_class_reserved_gsm,
1845
    &hf_mbim_data_class_1xrtt,
1846
    &hf_mbim_data_class_1xevdo,
1847
    &hf_mbim_data_class_1xevdoreva,
1848
    &hf_mbim_data_class_1xevdv,
1849
    &hf_mbim_data_class_3xrtt,
1850
    &hf_mbim_data_class_1xevdorevb,
1851
    &hf_mbim_data_class_umb,
1852
    &hf_mbim_data_class_reserved_cdma,
1853
    &hf_mbim_data_class_custom,
1854
    NULL
1855
};
1856
1857
static int * const mbim_device_caps_info_sms_caps_fields[] = {
1858
    &hf_mbim_device_caps_info_sms_caps_pdu_receive,
1859
    &hf_mbim_device_caps_info_sms_caps_pdu_send,
1860
    &hf_mbim_device_caps_info_sms_caps_text_receive,
1861
    &hf_mbim_device_caps_info_sms_caps_text_send,
1862
    NULL
1863
};
1864
1865
static int * const mbim_device_caps_info_control_caps_fields[] = {
1866
    &hf_mbim_device_caps_info_control_caps_reg_manual,
1867
    &hf_mbim_device_caps_info_control_caps_hw_radio_switch,
1868
    &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip,
1869
    &hf_mbim_device_caps_info_control_caps_cdma_simple_ip,
1870
    &hf_mbim_device_caps_info_control_caps_multi_carrier,
1871
    &hf_mbim_device_caps_info_control_caps_esim,
1872
    &hf_mbim_device_caps_info_control_caps_ue_policy_route_selection,
1873
    &hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable,
1874
    &hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable,
1875
    NULL
1876
};
1877
1878
static int * const mbim_data_subclass_fields[] = {
1879
    &hf_mbim_data_subclass_5gendc,
1880
    &hf_mbim_data_subclass_5gnr,
1881
    &hf_mbim_data_subclass_5gnedc,
1882
    &hf_mbim_data_subclass_5gelte,
1883
    &hf_mbim_data_subclass_5gngendc,
1884
    NULL
1885
};
1886
1887
static const value_string mbim_subscr_ready_status_ready_state_vals[] = {
1888
    { 0, "Not Initialized"},
1889
    { 1, "Initialized"},
1890
    { 2, "SIM Not Inserted"},
1891
    { 3, "Bad SIM"},
1892
    { 4, "Failure"},
1893
    { 5, "Not Activated"},
1894
    { 6, "Device Locked"},
1895
    { 0, NULL}
1896
};
1897
1898
static int * const mbim_subscr_ready_status_flags_fields[] = {
1899
    &hf_mbim_subscr_ready_status_flag_esim,
1900
    &hf_mbim_subscr_ready_status_flag_sim_removability_known,
1901
    &hf_mbim_subscr_ready_status_flag_sim_removable,
1902
    &hf_mbim_subscr_ready_status_flag_sim_slot_active,
1903
    NULL
1904
};
1905
1906
static const value_string mbim_subscr_ready_status_ready_info_vals[] = {
1907
    { 0, "None"},
1908
    { 1, "Protect Unique ID"},
1909
    { 0, NULL}
1910
};
1911
1912
static const value_string mbim_radio_state_vals[] = {
1913
    { 0, "Radio Off"},
1914
    { 1, "Radio On"},
1915
    { 0, NULL}
1916
};
1917
1918
static const value_string mbim_pin_type_vals[] = {
1919
    {  0, "None"},
1920
    {  1, "Custom"},
1921
    {  2, "PIN 1"},
1922
    {  3, "PIN 2"},
1923
    {  4, "Device SIM PIN"},
1924
    {  5, "Device First SIM PIN"},
1925
    {  6, "Network PIN"},
1926
    {  7, "Network Subset PIN"},
1927
    {  8, "Service Provider PIN"},
1928
    {  9, "Corporate PIN"},
1929
    { 10, "Subsidy Lock"},
1930
    { 11, "PUK 1"},
1931
    { 12, "PUK 2"},
1932
    { 13, "Device First SIM PUK"},
1933
    { 14, "Network PUK"},
1934
    { 15, "Network Subset PUK"},
1935
    { 16, "Service Provider PUK"},
1936
    { 17, "Corporate PUK"},
1937
    { 18, "Corporate NEV"},
1938
    { 19, "Corporate ADM"},
1939
    { 0, NULL}
1940
};
1941
1942
static const value_string mbim_pin_operation_vals[] = {
1943
    { 0, "Enter"},
1944
    { 1, "Enable"},
1945
    { 2, "Disable"},
1946
    { 3, "Change"},
1947
    { 0, NULL}
1948
};
1949
1950
static const value_string mbim_pin_state_vals[] = {
1951
    { 0, "Unlocked"},
1952
    { 1, "Locked"},
1953
    { 0, NULL}
1954
};
1955
1956
static const value_string mbim_pin_mode_vals[] = {
1957
    { 0, "Not Supported"},
1958
    { 1, "Enabled"},
1959
    { 2, "Disabled"},
1960
    { 0, NULL}
1961
};
1962
1963
static const value_string mbim_pin_format_vals[] = {
1964
    { 0, "Unknown"},
1965
    { 1, "Numeric"},
1966
    { 2, "Alpha Numeric"},
1967
    { 0, NULL}
1968
};
1969
1970
static const value_string mbim_ms_modem_config_status_vals[] = {
1971
    { 0, "Unknown"},
1972
    { 1, "Started"},
1973
    { 2, "Completed"},
1974
    { 0, NULL}
1975
};
1976
1977
static const value_string mbim_ms_mico_mode_vals[] = {
1978
    { 0, "Disabled"},
1979
    { 1, "Enabled"},
1980
    { 2, "Unsupported"},
1981
    { 3, "Default"},
1982
    { 0, NULL}
1983
};
1984
1985
static const value_string mbim_ms_mico_indication_vals[] = {
1986
    { 0, "Not Allocated"},
1987
    { 1, "Allocated"},
1988
    { 0xffffffff, "Not Available"},
1989
    { 0, NULL}
1990
};
1991
static const value_string mbim_ms_pre_dflt_nssai_info_access_type_vals[] = {
1992
    { 0, "Unknown"},
1993
    { 1, "3GPP"},
1994
    { 2, "Non3GPP"},
1995
    { 0, NULL}
1996
};
1997
static const value_string mbim_ms_default_pdu_hint_vals[] = {
1998
    { 0, "Activation Unlikely"},
1999
    { 1, "Activation Likely"},
2000
    { 0, NULL}
2001
};
2002
2003
static const value_string mbim_ms_ladn_ind_vals[] = {
2004
    { 0, "Info Not Needed"},
2005
    { 1, "Info Requested"},
2006
    { 0, NULL}
2007
};
2008
2009
static const value_string mbim_ms_drx_params_vals[] = {
2010
    { 0, "Not Specified"},
2011
    { 1, "Not Supported"},
2012
    { 2, "Cycle32"},
2013
    { 3, "Cycle64"},
2014
    { 4, "Cycle128"},
2015
    { 5, "Cycle256"},
2016
    { 0, NULL}
2017
};
2018
2019
static const value_string hf_mbim_ms_wake_reason_wake_type_vals[] = {
2020
    { 0, "CID Response"},
2021
    { 1, "CID Indication"},
2022
    { 2, "Packet"},
2023
    { 0, NULL}
2024
};
2025
2026
0
#define TLV_TYPE_UNKNOWN                        0
2027
#define TLV_TYPE_UE_POLICIES                    1
2028
0
#define TLV_TYPE_SINGLE_NSSAI                   2
2029
0
#define TLV_TYPE_ALLOWED_NSSAI                  3
2030
0
#define TLV_TYPE_CFG_NSSAI                      4
2031
0
#define TLV_TYPE_DFLT_CFG_NSSAI                 5
2032
0
#define TLV_TYPE_PRECFG_DFLT_CFG_NSSAI          6
2033
0
#define TLV_TYPE_REJ_NSSAI                      7
2034
0
#define TLV_TYPE_LADN                           8
2035
0
#define TLV_TYPE_TAI                            9
2036
0
#define TLV_TYPE_WCHAR_STR                     10
2037
#define TLV_TYPE_UINT16_TBL                    11
2038
#define TLV_TYPE_EAP_PACKET                    12
2039
#define TLV_TYPE_PCO                           13
2040
#define TLV_TYPE_ROUTE_SELECTION_DESCRIPTORS   14
2041
0
#define TLV_TYPE_TRAFFIC_PARAMETERS            15
2042
0
#define TLV_TYPE_WAKE_COMMAND                  16
2043
0
#define TLV_TYPE_WAKE_PACKET                   17
2044
0
#define TLV_TYPE_TYPE_OSID                     18
2045
0
#define TLV_TYPE_TYPE_3GPP_REL_VERSION         19
2046
0
#define TLV_TYPE_TYPE_URSP_RULES_TD_ONLY       20
2047
0
#define TLV_TYPE_TYPE_SESSION_ID               21
2048
2049
static const value_string mbim_tlv_type_vals[] = {
2050
    { TLV_TYPE_UNKNOWN, "UNKNOWN"},
2051
    { TLV_TYPE_UE_POLICIES, "UE_POLICIES"},
2052
    { TLV_TYPE_SINGLE_NSSAI, "SINGLE_NSSAI"},
2053
    { TLV_TYPE_ALLOWED_NSSAI, "ALLOWED_NSSAI"},
2054
    { TLV_TYPE_CFG_NSSAI, "CFG_NSSAI"},
2055
    { TLV_TYPE_DFLT_CFG_NSSAI, "DFLT_CFG_NSSAI"},
2056
    { TLV_TYPE_PRECFG_DFLT_CFG_NSSAI, "PRECFG_DFLT_CFG_NSSAI"},
2057
    { TLV_TYPE_REJ_NSSAI, "REJ_NSSAI"},
2058
    { TLV_TYPE_LADN, "LADN"},
2059
    { TLV_TYPE_TAI, "TAI"},
2060
    { TLV_TYPE_WCHAR_STR, "WCHAR_STR"},
2061
    { TLV_TYPE_UINT16_TBL, "UINT16_TBL"},
2062
    { TLV_TYPE_EAP_PACKET, "EAP_PACKET"},
2063
    { TLV_TYPE_PCO, "PCO"},
2064
    { TLV_TYPE_ROUTE_SELECTION_DESCRIPTORS, "ROUTE_SELECTION_DESCRIPTORS"},
2065
    { TLV_TYPE_TRAFFIC_PARAMETERS, "TRAFFIC_PARAMETERS"},
2066
    { TLV_TYPE_WAKE_COMMAND, "WAKE_COMMAND"},
2067
    { TLV_TYPE_WAKE_PACKET, "WAKE_PACKET"},
2068
    { TLV_TYPE_TYPE_OSID, "OS_ID"},
2069
    { TLV_TYPE_TYPE_3GPP_REL_VERSION, "3GPP_REL_VERSION"},
2070
    { TLV_TYPE_TYPE_URSP_RULES_TD_ONLY, "URSP_RULES_TD_ONLY"},
2071
    { TLV_TYPE_TYPE_SESSION_ID, "SESSION_ID"},
2072
    { 0, NULL}
2073
};
2074
2075
static int * const mbim_provider_state_fields[] = {
2076
    &hf_mbim_provider_state_home,
2077
    &hf_mbim_provider_state_forbidden,
2078
    &hf_mbim_provider_state_preferred,
2079
    &hf_mbim_provider_state_visible,
2080
    &hf_mbim_provider_state_registered,
2081
    &hf_mbim_provider_state_preferred_multicarrier,
2082
    NULL
2083
};
2084
2085
0
#define URSP_TC_TYPE_MATCH_ALL                      0x1
2086
0
#define URSP_TC_TYPE_OSID_APPID                     0x8
2087
0
#define URSP_TC_TYPE_IPV4                           0x10
2088
0
#define URSP_TC_TYPE_IPV6                           0x21
2089
0
#define URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER     0x30
2090
0
#define URSP_TC_TYPE_PORT                           0x50
2091
0
#define URSP_TC_TYPE_PORT_RANGE                     0x51
2092
0
#define URSP_TC_TYPE_SECURITY_PARAM_INDEX           0x60
2093
0
#define URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS       0x70
2094
0
#define URSP_TC_TYPE_FLOW_LABEL                     0x80
2095
0
#define URSP_TC_TYPE_MAC_ADDRESS                    0x81
2096
0
#define URSP_TC_TYPE_C_TAG_VID                      0x83
2097
0
#define URSP_TC_TYPE_S_TAG_VID                      0x84
2098
0
#define URSP_TC_TYPE_C_TAG_PCP_AND_DEI              0x85
2099
0
#define URSP_TC_TYPE_S_TAG_PCP_AND_DEI              0x86
2100
0
#define URSP_TC_TYPE_ETHER                          0x87
2101
0
#define URSP_TC_TYPE_DNN                            0x88
2102
0
#define URSP_TC_TYPE_CONNECTION_CAPABILITY          0x90
2103
0
#define URSP_TC_TYPE_FQDN                           0x91
2104
0
#define URSP_TC_TYPE_APPID                          0xa0
2105
2106
static const value_string ursp_tc_type_vals[] = {
2107
    { URSP_TC_TYPE_MATCH_ALL, "Match all"},
2108
    { URSP_TC_TYPE_OSID_APPID, "OS Id + OS App Id"},
2109
    { URSP_TC_TYPE_IPV4, "IPv4 remote address"},
2110
    { URSP_TC_TYPE_IPV6, "IPv6 remote address/prefix length"},
2111
    { URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER, "Protocol identifier/next header"},
2112
    { URSP_TC_TYPE_PORT, "Single remote port"},
2113
    { URSP_TC_TYPE_PORT_RANGE, "Remote port range"},
2114
    { URSP_TC_TYPE_SECURITY_PARAM_INDEX, "Security parameter index"},
2115
    { URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS, "Type of service/traffic class"},
2116
    { URSP_TC_TYPE_FLOW_LABEL, "Flow label"},
2117
    { URSP_TC_TYPE_MAC_ADDRESS, "Destination MAC address"},
2118
    { URSP_TC_TYPE_C_TAG_VID, "802.1Q C-TAG VID"},
2119
    { URSP_TC_TYPE_S_TAG_VID, "802.1Q S-TAG VID"},
2120
    { URSP_TC_TYPE_C_TAG_PCP_AND_DEI, "802.1Q C-TAG PCP/DEI"},
2121
    { URSP_TC_TYPE_S_TAG_PCP_AND_DEI, "802.1Q S-TAG PCP/DEI"},
2122
    { URSP_TC_TYPE_ETHER, "Ethertype"},
2123
    { URSP_TC_TYPE_DNN, "DNN"},
2124
    { URSP_TC_TYPE_CONNECTION_CAPABILITY, "Connection capabilities"},
2125
    { URSP_TC_TYPE_FQDN, "Destination FQDN"},
2126
    { URSP_TC_TYPE_APPID, "OS App Id"},
2127
    { 0, NULL}
2128
};
2129
static int* const ursp_tc_connection_capability_flags_fields[] = {
2130
    &hf_mbim_ms_ursp_tc_connection_capability_flag_ims,
2131
    &hf_mbim_ms_ursp_tc_connection_capability_flag_mms,
2132
    &hf_mbim_ms_ursp_tc_connection_capability_flag_supl,
2133
    &hf_mbim_ms_ursp_tc_connection_capability_flag_internet,
2134
    NULL
2135
};
2136
2137
static void
2138
mbim_rssi_fmt(char *s, uint32_t val)
2139
0
{
2140
0
    if (val == 0) {
2141
0
        snprintf(s, ITEM_LABEL_LENGTH, "-113 or less dBm (0)");
2142
0
    } else if (val < 31) {
2143
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -113 + 2*val, val);
2144
0
    } else if (val == 31) {
2145
0
        snprintf(s, ITEM_LABEL_LENGTH, "-51 or greater dBm (31)");
2146
0
    } else if (val == 99) {
2147
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (99)");
2148
0
    } else {
2149
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2150
0
    }
2151
0
}
2152
2153
static const value_string mbim_error_rate_vals[] = {
2154
    {  0, "Frame error rate < 0.01%%"},
2155
    {  1, "Frame error rate 0.01-0.1%%"},
2156
    {  2, "Frame error rate 0.1-0.5%%"},
2157
    {  3, "Frame error rate 0.5-1.0%%"},
2158
    {  4, "Frame error rate 1.0-2.0%%"},
2159
    {  5, "Frame error rate 2.0-4.0%%"},
2160
    {  6, "Frame error rate 4.0-8.0%%"},
2161
    {  7, "Frame error rate > 8.0%%"},
2162
    { 99, "Unknown or undetectable"},
2163
    { 0, NULL}
2164
};
2165
2166
static const value_string mbim_visible_providers_action_vals[] = {
2167
    { 0, "Full Scan"},
2168
    { 1, "Restricted Scan"},
2169
    {0, NULL}
2170
};
2171
2172
static const value_string mbim_register_action_vals[] = {
2173
    { 0, "Automatic"},
2174
    { 1, "Manual"},
2175
    { 0, NULL}
2176
};
2177
2178
static const value_string mbim_register_state_vals[] = {
2179
    { 0, "Unknown"},
2180
    { 1, "Deregistered"},
2181
    { 2, "Searching"},
2182
    { 3, "Home"},
2183
    { 4, "Roaming"},
2184
    { 5, "Partner"},
2185
    { 6, "Denied"},
2186
    { 0, NULL}
2187
};
2188
2189
static const value_string mbim_register_mode_vals[] = {
2190
    { 0, "Unknown"},
2191
    { 1, "Automatic"},
2192
    { 2, "Manual"},
2193
    { 0, NULL}
2194
};
2195
2196
static int * const mbim_registration_state_info_registration_flags_fields[] = {
2197
    &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available,
2198
    &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach,
2199
    NULL
2200
};
2201
2202
static const value_string mbim_packet_service_action_vals[] = {
2203
    { 0, "Attach"},
2204
    { 1, "Detach"},
2205
    { 0, NULL}
2206
};
2207
2208
static const value_string mbim_tai_list_type_vals[] = {
2209
    { 0, "Non Consecutive TAC"},
2210
    { 1, "Consecutive TAC"},
2211
    { 2, "Multi PLMN TAC"},
2212
    { 0, NULL}
2213
};
2214
2215
static const value_string mbim_packet_service_state_vals[] = {
2216
    { 0, "Unknown"},
2217
    { 1, "Attaching"},
2218
    { 2, "Attached"},
2219
    { 3, "Detaching"},
2220
    { 4, "Detached"},
2221
    { 0, NULL},
2222
};
2223
2224
static const value_string mbim_activation_command_vals[] = {
2225
    { 0, "Deactivate"},
2226
    { 1, "Activate"},
2227
    { 0, NULL}
2228
};
2229
2230
static const value_string mbim_activation_option_vals[] = {
2231
    { 0, "Default"},
2232
    { 1, "Per Non Default URSP Rules"},
2233
    { 2, "Per Default URSP Rules"},
2234
    { 3, "Per URSP Rules"},
2235
    { 0, NULL}
2236
};
2237
2238
static const value_string mbim_compression_vals[] = {
2239
    { 0, "None"},
2240
    { 1, "Enable"},
2241
    { 0, NULL}
2242
};
2243
2244
static const value_string mbim_auth_protocol_vals[]= {
2245
    { 0, "None"},
2246
    { 1, "PAP"},
2247
    { 2, "CHAP"},
2248
    { 3, "MS CHAPv2"},
2249
    { 0, NULL}
2250
};
2251
2252
static const value_string mbim_context_ip_type_vals[] = {
2253
    { 0, "Default"},
2254
    { 1, "IPv4"},
2255
    { 2, "IPv6"},
2256
    { 3, "IPv4v6"},
2257
    { 4, "IPv4 and IPv6"},
2258
    { 0, NULL}
2259
};
2260
2261
static const value_string mbim_activation_state_vals[] = {
2262
    { 0, "Unknown"},
2263
    { 1, "Activated"},
2264
    { 2, "Activating"},
2265
    { 3, "Deactivated"},
2266
    { 4, "Deactivating"},
2267
    { 0, NULL}
2268
};
2269
2270
static const value_string mbim_voice_call_state_vals[] = {
2271
    { 0, "None"},
2272
    { 1, "In Progress"},
2273
    { 2, "Hang Up"},
2274
    { 0, NULL}
2275
};
2276
2277
#define UUID_CONTEXT_NONE                  0
2278
#define UUID_CONTEXT_INTERNET              1
2279
#define UUID_CONTEXT_VPN                   2
2280
#define UUID_CONTEXT_VOICE                 3
2281
#define UUID_CONTEXT_VIDEO_SHARE           4
2282
#define UUID_CONTEXT_PURCHASE              5
2283
#define UUID_CONTEXT_IMS                   6
2284
#define UUID_CONTEXT_MMS                   7
2285
#define UUID_CONTEXT_LOCAL                 8
2286
#define UUID_CONTEXT_MS_ADMIN              9
2287
#define UUID_CONTEXT_MS_APP               10
2288
#define UUID_CONTEXT_MS_XCAP              11
2289
#define UUID_CONTEXT_MS_TETHERING         12
2290
#define UUID_CONTEXT_MS_EMERGENCY_CALLING 13
2291
2292
static const struct mbim_uuid mbim_uuid_context_type_vals[] = {
2293
    { UUID_CONTEXT_NONE, {0xb43f758c, 0xa560, 0x4b46, {0xb3, 0x5e, 0xc5, 0x86, 0x96, 0x41, 0xfb, 0x54}}},
2294
    { UUID_CONTEXT_INTERNET, {0x7e5e2a7e, 0x4e6f, 0x7272, {0x73, 0x6b, 0x65, 0x6e, 0x7e, 0x5e, 0x2a, 0x7e}}},
2295
    { UUID_CONTEXT_VPN, {0x9b9f7bbe, 0x8952, 0x44b7, {0x83, 0xac, 0xca, 0x41, 0x31, 0x8d, 0xf7, 0xa0}}},
2296
    { UUID_CONTEXT_VOICE, {0x88918294, 0x0ef4, 0x4396, {0x8c, 0xca, 0xa8, 0x58, 0x8f, 0xbc, 0x02, 0xb2}}},
2297
    { UUID_CONTEXT_VIDEO_SHARE, {0x05a2a716, 0x7c34, 0x4b4d, {0x9a, 0x91, 0xc5, 0xef, 0x0c, 0x7a, 0xaa, 0xcc}}},
2298
    { UUID_CONTEXT_PURCHASE, {0xb3272496, 0xac6c, 0x422b, {0xa8, 0xc0, 0xac, 0xf6, 0x87, 0xa2, 0x72, 0x17}}},
2299
    { UUID_CONTEXT_IMS, {0x21610D01, 0x3074, 0x4BCE, {0x94, 0x25, 0xB5, 0x3A, 0x07, 0xD6, 0x97, 0xD6}}},
2300
    { UUID_CONTEXT_MMS, {0x46726664, 0x7269, 0x6bc6, {0x96, 0x24, 0xd1, 0xd3, 0x53, 0x89, 0xac, 0xa9}}},
2301
    { UUID_CONTEXT_LOCAL, {0xa57a9afc, 0xb09f, 0x45d7, {0xbb, 0x40, 0x03, 0x3c, 0x39, 0xf6, 0x0d, 0xb9}}},
2302
    { UUID_CONTEXT_MS_ADMIN, {0x5f7e4c2e, 0xe80b, 0x40a9, {0xa2, 0x39, 0xf0, 0xab, 0xcf, 0xd1, 0x1f, 0x4b}}},
2303
    { UUID_CONTEXT_MS_APP, {0x74d88a3d, 0xdfbd, 0x4799, {0x9a, 0x8c, 0x73, 0x10, 0xa3, 0x7b, 0xb2, 0xee}}},
2304
    { UUID_CONTEXT_MS_XCAP, {0x50d378a7, 0xbaa5, 0x4a50, {0xb8, 0x72, 0x3f, 0xe5, 0xbb, 0x46, 0x34, 0x11}}},
2305
    { UUID_CONTEXT_MS_TETHERING, {0x5e4e0601, 0x48dc, 0x4e2b, {0xac, 0xb8, 0x08, 0xb4, 0x01, 0x6b, 0xba, 0xac}}},
2306
    { UUID_CONTEXT_MS_EMERGENCY_CALLING, {0x5f41adb8, 0x204e, 0x4d31, {0x9d, 0xa8, 0xb3, 0xc9, 0x70, 0xe3, 0x60, 0xf2}}}
2307
};
2308
2309
static const value_string mbim_context_type_vals[] = {
2310
    { UUID_CONTEXT_NONE, "None"},
2311
    { UUID_CONTEXT_INTERNET, "Internet"},
2312
    { UUID_CONTEXT_VPN, "VPN"},
2313
    { UUID_CONTEXT_VOICE, "Voice"},
2314
    { UUID_CONTEXT_VIDEO_SHARE, "Video Share"},
2315
    { UUID_CONTEXT_PURCHASE, "Purchase"},
2316
    { UUID_CONTEXT_IMS, "IMS"},
2317
    { UUID_CONTEXT_MMS, "MMS"},
2318
    { UUID_CONTEXT_LOCAL, "Local"},
2319
    { UUID_CONTEXT_MS_ADMIN, "MS Administrative Purposes"},
2320
    { UUID_CONTEXT_MS_APP, "MS Operator App"},
2321
    { UUID_CONTEXT_MS_XCAP, "MS XCAP Provisioning for IMS"},
2322
    { UUID_CONTEXT_MS_TETHERING, "MS Mobile Hotspot Tethering"},
2323
    { UUID_CONTEXT_MS_EMERGENCY_CALLING, "MS IMS Emergency Calling"},
2324
    { 0, NULL}
2325
};
2326
2327
static int * const mbim_ip_configuration_info_ipv4_configuration_available_fields[] = {
2328
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_address,
2329
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway,
2330
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns,
2331
    &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu,
2332
    NULL
2333
};
2334
2335
static int * const mbim_ip_configuration_info_ipv6_configuration_available_fields[] = {
2336
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_address,
2337
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway,
2338
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns,
2339
    &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu,
2340
    NULL
2341
};
2342
2343
static int * const mbim_device_service_element_dss_payload_fields[] = {
2344
    &hf_mbim_device_service_element_dss_payload_host_device,
2345
    &hf_mbim_device_service_element_dss_payload_device_host,
2346
    NULL
2347
};
2348
2349
static const value_string mbim_network_idle_hint_states_vals[] = {
2350
    { 0, "Disabled"},
2351
    { 1, "Enabled"},
2352
    { 0, NULL}
2353
};
2354
2355
static const value_string mbim_emergency_mode_states_vals[] = {
2356
    { 0, "Off"},
2357
    { 1, "On"},
2358
    { 0, NULL}
2359
};
2360
2361
static const value_string mbim_sms_storage_state_vals[] = {
2362
    { 0, "Not Initialized"},
2363
    { 1, "Initialized"},
2364
    { 0, NULL}
2365
};
2366
2367
0
#define MBIM_SMS_FORMAT_PDU  0
2368
0
#define MBIM_SMS_FORMAT_CDMA 1
2369
2370
static const value_string mbim_sms_format_vals[] = {
2371
    { MBIM_SMS_FORMAT_PDU, "PDU"},
2372
    { MBIM_SMS_FORMAT_CDMA, "CDMA"},
2373
    { 0, NULL}
2374
};
2375
2376
static const value_string mbim_sms_flag_vals[] = {
2377
    { 0, "All"},
2378
    { 1, "Index"},
2379
    { 2, "New"},
2380
    { 3, "Old"},
2381
    { 4, "Sent"},
2382
    { 5, "Draft"},
2383
    { 0, NULL}
2384
};
2385
2386
static const value_string mbim_sms_cdma_lang_vals[] = {
2387
    { 0, "Unknown"},
2388
    { 1, "English"},
2389
    { 2, "French"},
2390
    { 3, "Spanish"},
2391
    { 4, "Japanese"},
2392
    { 5, "Korean"},
2393
    { 6, "Chinese"},
2394
    { 7, "Hebrew"},
2395
    { 0, NULL}
2396
};
2397
2398
#define MBIM_ENCODING_OCTET        0
2399
#define MBIM_ENCODING_EPM          1
2400
0
#define MBIM_ENCODING_7BIT_ASCII   2
2401
0
#define MBIM_ENCODING_IA5          3
2402
0
#define MBIM_ENCODING_UNICODE      4
2403
#define MBIM_ENCODING_SHIFT_JIS    5
2404
#define MBIM_ENCODING_KOREAN       6
2405
0
#define MBIM_ENCODING_LATIN_HEBREW 7
2406
0
#define MBIM_ENCODING_LATIN        8
2407
0
#define MBIM_ENCODING_GSM_7BIT     9
2408
2409
static const value_string mbim_sms_cdma_encoding_vals[] = {
2410
    { MBIM_ENCODING_OCTET, "Octet"},
2411
    { MBIM_ENCODING_EPM, "EPM"},
2412
    { MBIM_ENCODING_7BIT_ASCII, "7 Bit ASCII"},
2413
    { MBIM_ENCODING_IA5, "IA5"},
2414
    { MBIM_ENCODING_UNICODE, "Unicode"},
2415
    { MBIM_ENCODING_SHIFT_JIS, "Shift-JIS"},
2416
    { MBIM_ENCODING_KOREAN, "Korean"},
2417
    { MBIM_ENCODING_LATIN_HEBREW, "Latin Hebrew"},
2418
    { MBIM_ENCODING_LATIN, "Latin"},
2419
    { MBIM_ENCODING_GSM_7BIT, "GSM 7 Bit"},
2420
    { 0, NULL}
2421
};
2422
2423
static const value_string mbim_sms_message_status_vals[] = {
2424
    { 0, "New"},
2425
    { 1, "Old"},
2426
    { 2, "Draft"},
2427
    { 3, "Sent"},
2428
    { 0, NULL}
2429
};
2430
2431
static int * const mbim_sms_status_info_flags_fields[] = {
2432
    &hf_mbim_sms_status_info_flags_message_store_full,
2433
    &hf_mbim_sms_status_info_flags_new_message,
2434
    NULL
2435
};
2436
2437
static const value_string mbim_ussd_action_vals[] = {
2438
    { 0, "Initiate"},
2439
    { 1, "Continue"},
2440
    { 2, "Cancel"},
2441
    { 0, NULL}
2442
};
2443
2444
static const value_string mbim_ussd_response_vals[] = {
2445
    { 0, "No Action Required"},
2446
    { 1, "Action Required"},
2447
    { 2, "Terminated By NW"},
2448
    { 3, "Other Local Client"},
2449
    { 4, "Operation Not Supported"},
2450
    { 5, "Network Time Out"},
2451
    { 0, NULL}
2452
};
2453
2454
static const value_string mbim_ussd_session_state_vals[] = {
2455
    { 0, "New Session"},
2456
    { 1, "Existing Session"},
2457
    { 0, NULL}
2458
};
2459
2460
static const value_string mbim_phonebook_state_vals[] = {
2461
    { 0, "Not Initialized"},
2462
    { 1, "Initialized"},
2463
    { 0, NULL}
2464
};
2465
2466
static const value_string mbim_phonebook_flag_vals[] = {
2467
    { 0, "All"},
2468
    { 1, "Index"},
2469
    { 0, NULL}
2470
};
2471
2472
static const value_string mbim_phonebook_write_flag_vals[] = {
2473
    { 0, "Unused"},
2474
    { 1, "Index"},
2475
    { 0, NULL}
2476
};
2477
2478
static const true_false_string mbim_pac_host_control_val = {
2479
  "Host wants to handle command",
2480
  "Host does not want to handle command"
2481
};
2482
2483
static const value_string mbim_stk_pac_profile_vals[] = {
2484
    { 0, "Not Handled By Function Cannot Be Handled By Host"},
2485
    { 1, "Not Handled By Function May Be Handled By Host"},
2486
    { 2, "Handled By Function Only Transparent To Host"},
2487
    { 3, "Handled By Function Notification To Host Possible"},
2488
    { 4, "Handled By Function Notification To Host Enabled"},
2489
    { 5, "Handled By Function Can Be Overridden By Host"},
2490
    { 6, "Handled By Host Function Not Able To Handle"},
2491
    { 7, "Handled By Host Function Able To Handle"},
2492
    { 0, NULL}
2493
};
2494
2495
static const value_string mbim_stk_pac_type_vals[] = {
2496
    { 0, "Proactive Command"},
2497
    { 1, "Notification"},
2498
    { 0, NULL}
2499
};
2500
2501
static const value_string mbim_dss_link_state_vals[] = {
2502
    { 0, "Deactivate"},
2503
    { 1, "Activate"},
2504
    { 0, NULL}
2505
};
2506
2507
static int * const mbim_multicarrier_capabilities_fields[] = {
2508
    &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan,
2509
    &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot,
2510
    NULL
2511
};
2512
2513
static const value_string mbim_geoid_vals[] = {
2514
    {       0x2, "Antigua and Barbuda"},
2515
    {       0x3, "Afghanistan"},
2516
    {       0x4, "Algeria"},
2517
    {       0x5, "Azerbaijan"},
2518
    {       0x6, "Albania"},
2519
    {       0x7, "Armenia"},
2520
    {       0x8, "Andorra"},
2521
    {       0x9, "Angola"},
2522
    {       0xA, "American Samoa"},
2523
    {       0xB, "Argentina"},
2524
    {       0xC, "Australia"},
2525
    {       0xE, "Austria"},
2526
    {      0x11, "Bahrain"},
2527
    {      0x12, "Barbados"},
2528
    {      0x13, "Botswana"},
2529
    {      0x14, "Bermuda"},
2530
    {      0x15, "Belgium"},
2531
    {      0x16, "Bahamas, The"},
2532
    {      0x17, "Bangladesh"},
2533
    {      0x18, "Belize"},
2534
    {      0x19, "Bosnia and Herzegovina"},
2535
    {      0x1A, "Bolivia"},
2536
    {      0x1B, "Myanmar"},
2537
    {      0x1C, "Benin"},
2538
    {      0x1D, "Belarus"},
2539
    {      0x1E, "Solomon Islands"},
2540
    {      0x20, "Brazil"},
2541
    {      0x22, "Bhutan"},
2542
    {      0x23, "Bulgaria"},
2543
    {      0x25, "Brunei"},
2544
    {      0x26, "Burundi"},
2545
    {      0x27, "Canada"},
2546
    {      0x28, "Cambodia"},
2547
    {      0x29, "Chad"},
2548
    {      0x2A, "Sri Lanka"},
2549
    {      0x2B, "Congo"},
2550
    {      0x2C, "Congo (DRC)"},
2551
    {      0x2D, "China"},
2552
    {      0x2E, "Chile"},
2553
    {      0x31, "Cameroon"},
2554
    {      0x32, "Comoros"},
2555
    {      0x33, "Colombia"},
2556
    {      0x36, "Costa Rica"},
2557
    {      0x37, "Central African Republic"},
2558
    {      0x38, "Cuba"},
2559
    {      0x39, "Cape Verde"},
2560
    {      0x3B, "Cyprus"},
2561
    {      0x3D, "Denmark"},
2562
    {      0x3E, "Djibouti"},
2563
    {      0x3F, "Dominica"},
2564
    {      0x41, "Dominican Republic"},
2565
    {      0x42, "Ecuador"},
2566
    {      0x43, "Egypt"},
2567
    {      0x44, "Ireland"},
2568
    {      0x45, "Equatorial Guinea"},
2569
    {      0x46, "Estonia"},
2570
    {      0x47, "Eritrea"},
2571
    {      0x48, "El Salvador"},
2572
    {      0x49, "Ethiopia"},
2573
    {      0x4B, "Czech Republic"},
2574
    {      0x4D, "Finland"},
2575
    {      0x4E, "Fiji Islands"},
2576
    {      0x50, "Micronesia"},
2577
    {      0x51, "Faroe Islands"},
2578
    {      0x54, "France"},
2579
    {      0x56, "Gambia, The"},
2580
    {      0x57, "Gabon"},
2581
    {      0x58, "Georgia"},
2582
    {      0x59, "Ghana"},
2583
    {      0x5A, "Gibraltar"},
2584
    {      0x5B, "Grenada"},
2585
    {      0x5D, "Greenland"},
2586
    {      0x5E, "Germany"},
2587
    {      0x62, "Greece"},
2588
    {      0x63, "Guatemala"},
2589
    {      0x64, "Guinea"},
2590
    {      0x65, "Guyana"},
2591
    {      0x67, "Haiti"},
2592
    {      0x68, "Hong Kong S.A.R."},
2593
    {      0x6A, "Honduras"},
2594
    {      0x6C, "Croatia"},
2595
    {      0x6D, "Hungary"},
2596
    {      0x6E, "Iceland"},
2597
    {      0x6F, "Indonesia"},
2598
    {      0x71, "India"},
2599
    {      0x72, "British Indian Ocean Territory"},
2600
    {      0x74, "Iran"},
2601
    {      0x75, "Israel"},
2602
    {      0x76, "Italy"},
2603
    {      0x77, "Cote d'Ivoire"},
2604
    {      0x79, "Iraq"},
2605
    {      0x7A, "Japan"},
2606
    {      0x7C, "Jamaica"},
2607
    {      0x7D, "Jan Mayen"},
2608
    {      0x7E, "Jordan"},
2609
    {      0x7F, "Johnston Atoll"},
2610
    {      0x81, "Kenya"},
2611
    {      0x82, "Kyrgyzstan"},
2612
    {      0x83, "North Korea"},
2613
    {      0x85, "Kiribati"},
2614
    {      0x86, "Korea"},
2615
    {      0x88, "Kuwait"},
2616
    {      0x89, "Kazakhstan"},
2617
    {      0x8A, "Laos"},
2618
    {      0x8B, "Lebanon"},
2619
    {      0x8C, "Latvia"},
2620
    {      0x8D, "Lithuania"},
2621
    {      0x8E, "Liberia"},
2622
    {      0x8F, "Slovakia"},
2623
    {      0x91, "Liechtenstein"},
2624
    {      0x92, "Lesotho"},
2625
    {      0x93, "Luxembourg"},
2626
    {      0x94, "Libya"},
2627
    {      0x95, "Madagascar"},
2628
    {      0x97, "Macao S.A.R."},
2629
    {      0x98, "Moldova"},
2630
    {      0x9A, "Mongolia"},
2631
    {      0x9C, "Malawi"},
2632
    {      0x9D, "Mali"},
2633
    {      0x9E, "Monaco"},
2634
    {      0x9F, "Morocco"},
2635
    {      0xA0, "Mauritius"},
2636
    {      0xA2, "Mauritania"},
2637
    {      0xA3, "Malta"},
2638
    {      0xA4, "Oman"},
2639
    {      0xA5, "Maldives"},
2640
    {      0xA6, "Mexico"},
2641
    {      0xA7, "Malaysia"},
2642
    {      0xA8, "Mozambique"},
2643
    {      0xAD, "Niger"},
2644
    {      0xAE, "Vanuatu"},
2645
    {      0xAF, "Nigeria"},
2646
    {      0xB0, "Netherlands"},
2647
    {      0xB1, "Norway"},
2648
    {      0xB2, "Nepal"},
2649
    {      0xB4, "Nauru"},
2650
    {      0xB5, "Suriname"},
2651
    {      0xB6, "Nicaragua"},
2652
    {      0xB7, "New Zealand"},
2653
    {      0xB8, "Palestinian Authority"},
2654
    {      0xB9, "Paraguay"},
2655
    {      0xBB, "Peru"},
2656
    {      0xBE, "Pakistan"},
2657
    {      0xBF, "Poland"},
2658
    {      0xC0, "Panama"},
2659
    {      0xC1, "Portugal"},
2660
    {      0xC2, "Papua New Guinea"},
2661
    {      0xC3, "Palau"},
2662
    {      0xC4, "Guinea-Bissau"},
2663
    {      0xC5, "Qatar"},
2664
    {      0xC6, "Reunion"},
2665
    {      0xC7, "Marshall Islands"},
2666
    {      0xC8, "Romania"},
2667
    {      0xC9, "Philippines"},
2668
    {      0xCA, "Puerto Rico"},
2669
    {      0xCB, "Russia"},
2670
    {      0xCC, "Rwanda"},
2671
    {      0xCD, "Saudi Arabia"},
2672
    {      0xCE, "St. Pierre and Miquelon"},
2673
    {      0xCF, "St. Kitts and Nevis"},
2674
    {      0xD0, "Seychelles"},
2675
    {      0xD1, "South Africa"},
2676
    {      0xD2, "Senegal"},
2677
    {      0xD4, "Slovenia"},
2678
    {      0xD5, "Sierra Leone"},
2679
    {      0xD6, "San Marino"},
2680
    {      0xD7, "Singapore"},
2681
    {      0xD8, "Somalia"},
2682
    {      0xD9, "Spain"},
2683
    {      0xDA, "St. Lucia"},
2684
    {      0xDB, "Sudan"},
2685
    {      0xDC, "Svalbard"},
2686
    {      0xDD, "Sweden"},
2687
    {      0xDE, "Syria"},
2688
    {      0xDF, "Switzerland"},
2689
    {      0xE0, "United Arab Emirates"},
2690
    {      0xE1, "Trinidad and Tobago"},
2691
    {      0xE3, "Thailand"},
2692
    {      0xE4, "Tajikistan"},
2693
    {      0xE7, "Tonga"},
2694
    {      0xE8, "Togo"},
2695
    {      0xE9, "Sao Tome and Principe"},
2696
    {      0xEA, "Tunisia"},
2697
    {      0xEB, "Turkey"},
2698
    {      0xEC, "Tuvalu"},
2699
    {      0xED, "Taiwan"},
2700
    {      0xEE, "Turkmenistan"},
2701
    {      0xEF, "Tanzania"},
2702
    {      0xF0, "Uganda"},
2703
    {      0xF1, "Ukraine"},
2704
    {      0xF2, "United Kingdom"},
2705
    {      0xF4, "United States"},
2706
    {      0xF5, "Burkina Faso"},
2707
    {      0xF6, "Uruguay"},
2708
    {      0xF7, "Uzbekistan"},
2709
    {      0xF8, "St. Vincent and the Grenadines"},
2710
    {      0xF9, "Venezuela"},
2711
    {      0xFB, "Vietnam"},
2712
    {      0xFC, "Virgin Islands"},
2713
    {      0xFD, "Vatican City"},
2714
    {      0xFE, "Namibia"},
2715
    {     0x101, "Western Sahara (disputed)"},
2716
    {     0x102, "Wake Island"},
2717
    {     0x103, "Samoa"},
2718
    {     0x104, "Swaziland"},
2719
    {     0x105, "Yemen"},
2720
    {     0x107, "Zambia"},
2721
    {     0x108, "Zimbabwe"},
2722
    {     0x10D, "Serbia and Montenegro (Former)"},
2723
    {     0x10E, "Montenegro"},
2724
    {     0x10F, "Serbia"},
2725
    {     0x111, "Curacao"},
2726
    {     0x114, "South Sudan"},
2727
    {     0x12C, "Anguilla"},
2728
    {     0x12D, "Antarctica"},
2729
    {     0x12E, "Aruba"},
2730
    {     0x12F, "Ascension Island"},
2731
    {     0x130, "Ashmore and Cartier Islands"},
2732
    {     0x131, "Baker Island"},
2733
    {     0x132, "Bouvet Island"},
2734
    {     0x133, "Cayman Islands"},
2735
    {     0x135, "Christmas Island"},
2736
    {     0x136, "Clipperton Island"},
2737
    {     0x137, "Cocos (Keeling) Islands"},
2738
    {     0x138, "Cook Islands"},
2739
    {     0x139, "Coral Sea Islands"},
2740
    {     0x13A, "Diego Garcia"},
2741
    {     0x13B, "Falkland Islands (Islas Malvinas)"},
2742
    {     0x13D, "French Guiana"},
2743
    {     0x13E, "French Polynesia"},
2744
    {     0x13F, "French Southern and Antarctic Lands"},
2745
    {     0x141, "Guadeloupe"},
2746
    {     0x142, "Guam"},
2747
    {     0x143, "Guantanamo Bay"},
2748
    {     0x144, "Guernsey"},
2749
    {     0x145, "Heard Island and McDonald Islands"},
2750
    {     0x146, "Howland Island"},
2751
    {     0x147, "Jarvis Island"},
2752
    {     0x148, "Jersey"},
2753
    {     0x149, "Kingman Reef"},
2754
    {     0x14A, "Martinique"},
2755
    {     0x14B, "Mayotte"},
2756
    {     0x14C, "Montserrat"},
2757
    {     0x14E, "New Caledonia"},
2758
    {     0x14F, "Niue"},
2759
    {     0x150, "Norfolk Island"},
2760
    {     0x151, "Northern Mariana Islands"},
2761
    {     0x152, "Palmyra Atoll"},
2762
    {     0x153, "Pitcairn Islands"},
2763
    {     0x154, "Rota Island"},
2764
    {     0x155, "Saipan"},
2765
    {     0x156, "South Georgia and the South Sandwich Islands"},
2766
    {     0x157, "St. Helena"},
2767
    {     0x15A, "Tinian Island"},
2768
    {     0x15B, "Tokelau"},
2769
    {     0x15C, "Tristan da Cunha"},
2770
    {     0x15D, "Turks and Caicos Islands"},
2771
    {     0x15F, "Virgin Islands, British"},
2772
    {     0x160, "Wallis and Futuna"},
2773
    {    0x3B16, "Man, Isle of"},
2774
    {    0x4CA2, "Macedonia, Former Yugoslav Republic of"},
2775
    {    0x52FA, "Midway Islands"},
2776
    {    0x78F7, "Sint Maarten (Dutch part)"},
2777
    {    0x7BDA, "Saint Martin (French part)"},
2778
    {  0x6F60E7, "Democratic Republic of Timor-Leste"},
2779
    {  0x9906F5, "Aland Islands"},
2780
    { 0x9A55C4F, "Saint Barthelemy"},
2781
    { 0x9A55D40, "U.S. Minor Outlying Islands"},
2782
    { 0x9A55D42, "Bonaire, Saint Eustatius and Saba"},
2783
    { 0, NULL}
2784
};
2785
static value_string_ext mbim_geoid_vals_ext = VALUE_STRING_EXT_INIT(mbim_geoid_vals);
2786
2787
static int * const mbim_descriptor_network_capabilities_fields[] = {
2788
    &hf_mbim_descriptor_network_capabilities_max_datagram_size,
2789
    &hf_mbim_descriptor_network_capabilities_ntb_input_size,
2790
    NULL
2791
};
2792
2793
static const value_string mbim_thermal_config_enable_vals[] = {
2794
    { 0, "Disable"},
2795
    { 1, "Enable"},
2796
    { 0, NULL}
2797
};
2798
2799
static const value_string mbim_sar_status_vals[] = {
2800
    { 0, "Disabled"},
2801
    { 1, "Enabled"},
2802
    { 0, NULL}
2803
};
2804
2805
static const value_string mbim_ms_sar_config_sar_mode_vals[] = {
2806
    { 0, "Device"},
2807
    { 1, "OS"},
2808
    { 0, NULL}
2809
};
2810
2811
static const value_string mbim_ms_sar_config_sar_wifi_integration_vals[] = {
2812
    { 0, "Not Integrated"},
2813
    { 1, "Integrated"},
2814
    { 0, NULL}
2815
};
2816
2817
static void
2818
mbim_degrees_fmt(char *s, uint32_t v)
2819
0
{
2820
0
    snprintf(s, ITEM_LABEL_LENGTH, "%.1f Degrees Celsius (%u)", (float)v/10.0, v);
2821
0
}
2822
2823
static const value_string mbim_adpclk_activate_state_vals[] = {
2824
    { 0, "Deactivate"},
2825
    { 1, "Activate"},
2826
    { 0, NULL}
2827
};
2828
2829
static const value_string mbim_connect_status_vals[] = {
2830
    { 0, "Disconnected from the Base Station"},
2831
    { 1, "Connected to the Base Station"},
2832
    { 0, NULL}
2833
};
2834
2835
static const value_string mbim_trace_config_vals[] = {
2836
    { 0, "Tracing disabled"},
2837
    { 1, "Default configuration for tracing"},
2838
    { 0, NULL}
2839
};
2840
2841
static const value_string mbim_ber_vals[] = {
2842
    { 0, "BER < 0,2%%"},
2843
    { 1, "0,2%% < BER < 0,4%%"},
2844
    { 2, "0,4%% < BER < 0,8%%"},
2845
    { 3, "0,8%% < BER < 1,6%%"},
2846
    { 4, "1,6%% < BER < 3,2%%"},
2847
    { 5, "3,2%% < BER < 6,4%%"},
2848
    { 6, "6,4%% < BER < 12,8%%"},
2849
    { 7, "12,8%% < BER"},
2850
    { 99, "Unknown or undetectable"},
2851
    { 0, NULL}
2852
};
2853
2854
static void
2855
mbim_rscp_fmt(char *s, uint32_t val)
2856
0
{
2857
0
    if (val == 0) {
2858
0
        snprintf(s, ITEM_LABEL_LENGTH, "-120 or less dBm (0)");
2859
0
    } else if (val < 96) {
2860
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -120 + val, val);
2861
0
    } else if (val == 96) {
2862
0
        snprintf(s, ITEM_LABEL_LENGTH, "-24 or greater dBm (96)");
2863
0
    } else if (val == 255) {
2864
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2865
0
    } else {
2866
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2867
0
    }
2868
0
}
2869
2870
static void
2871
mbim_ecno_fmt(char *s, uint32_t val)
2872
0
{
2873
0
    if (val == 0) {
2874
0
        snprintf(s, ITEM_LABEL_LENGTH, "-24 or less dBm (0)");
2875
0
    } else if (val < 49) {
2876
0
        snprintf(s, ITEM_LABEL_LENGTH, "%.1f dBm (%u)", -24 + ((float)val/2), val);
2877
0
    } else if (val == 49) {
2878
0
        snprintf(s, ITEM_LABEL_LENGTH, "0.5 or greater dBm (49)");
2879
0
    } else if (val == 255) {
2880
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2881
0
    } else {
2882
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2883
0
    }
2884
0
}
2885
2886
static void
2887
mbim_rsrq_fmt(char *s, uint32_t val)
2888
0
{
2889
0
    if (val == 0) {
2890
0
        snprintf(s, ITEM_LABEL_LENGTH, "-19.5 or less dBm (0)");
2891
0
    } else if (val < 34) {
2892
0
        snprintf(s, ITEM_LABEL_LENGTH, "%.1f dBm (%u)", -19.5 + ((float)val/2), val);
2893
0
    } else if (val == 34) {
2894
0
        snprintf(s, ITEM_LABEL_LENGTH, "-2.5 or greater dBm (34)");
2895
0
    } else if (val == 255) {
2896
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2897
0
    } else {
2898
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2899
0
    }
2900
0
}
2901
2902
static void
2903
mbim_rsrp_fmt(char *s, uint32_t val)
2904
0
{
2905
0
    if (val == 0) {
2906
0
        snprintf(s, ITEM_LABEL_LENGTH, "-140 or less dBm (0)");
2907
0
    } else if (val < 97) {
2908
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dBm (%u)", -140 + val, val);
2909
0
    } else if (val == 97) {
2910
0
        snprintf(s, ITEM_LABEL_LENGTH, "-43 or greater dBm (97)");
2911
0
    } else if (val == 255) {
2912
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2913
0
    } else {
2914
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2915
0
    }
2916
0
}
2917
2918
static void
2919
mbim_rssnr_fmt(char *s, uint32_t val)
2920
0
{
2921
0
    if (val == 0) {
2922
0
        snprintf(s, ITEM_LABEL_LENGTH, "-5 or less dB (0)");
2923
0
    } else if (val < 35) {
2924
0
        snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%u)", -5 + val, val);
2925
0
    } else if (val == 35) {
2926
0
        snprintf(s, ITEM_LABEL_LENGTH, "30 or greater dB (35)");
2927
0
    } else if (val == 255) {
2928
0
        snprintf(s, ITEM_LABEL_LENGTH, "Unknown or undetectable (255)");
2929
0
    } else {
2930
0
        snprintf(s, ITEM_LABEL_LENGTH, "Invalid value (%u)", val);
2931
0
    }
2932
0
}
2933
2934
static void
2935
mbim_rsrp_signal_state_fmt(char *s, uint32_t val)
2936
0
{
2937
0
    if (val == 0) {
2938
0
        snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)");
2939
0
    } else if (val < 126) {
2940
0
        snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", val - 157, val - 156, val);
2941
0
    } else if (val == 126) {
2942
0
        snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)");
2943
0
    } else {
2944
0
        snprintf(s, ITEM_LABEL_LENGTH, "invalid (127)");
2945
0
    }
2946
0
}
2947
2948
static void
2949
mbim_snr_signal_state_fmt(char *s, uint32_t val)
2950
0
{
2951
0
    if (val == 0) {
2952
0
        snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)");
2953
0
    } else if (val < 127) {
2954
0
        snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)val - 1) / 2) - 23, ((float)val / 2) - 23, val);
2955
0
    } else if (val == 127){
2956
0
        snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)");
2957
0
    } else {
2958
0
        snprintf(s, ITEM_LABEL_LENGTH, "invalid (128)");
2959
0
    }
2960
0
}
2961
2962
static void
2963
mbim_version_fmt(char* s, uint32_t val)
2964
0
{
2965
0
    snprintf(s, ITEM_LABEL_LENGTH, "%u.%u", val / 256, val % 256);
2966
0
}
2967
2968
static const value_string mbim_atds_operator_plmn_mode_vals[] = {
2969
    { 0, "GSM"},
2970
    { 6, "UTRAN"},
2971
    { 7, "LTE"},
2972
    { 0, NULL}
2973
};
2974
2975
static const value_string mbim_adts_rat_info_mode_vals[]= {
2976
    { 0, "Automatic"},
2977
    { 1, "2G only"},
2978
    { 2, "3G only"},
2979
    { 3, "4G only"},
2980
    { 0, NULL}
2981
};
2982
2983
static const value_string mbim_adts_projection_table_type_vals[]= {
2984
    { 0, "RSSI"},
2985
    { 1, "RSCP"},
2986
    { 2, "Ec/No"},
2987
    { 3, "RSRP"},
2988
    { 7, "RS SNR"},
2989
    { 0, NULL}
2990
};
2991
2992
static void
2993
mbim_projection_table_coeff_fmt(char *s, uint32_t val)
2994
0
{
2995
0
    int32_t coeff = (int32_t)val;
2996
2997
0
    snprintf(s, ITEM_LABEL_LENGTH, "%.3f (%d)", ((float)coeff)/1000, coeff);
2998
0
}
2999
3000
0
#define MBIM_NDP_CTRL_MULTIFLOW_STATUS 0
3001
3002
static const value_string mbim_ndp_ctrl_msg_type_vals[] = {
3003
    { MBIM_NDP_CTRL_MULTIFLOW_STATUS, "MULTIFLOW_STATUS"},
3004
    { 0, NULL}
3005
};
3006
3007
static const value_string mbim_ndp_ctrl_multiflow_status_vals[] = {
3008
    { 0, "OK"},
3009
    { 1, "High Watermark"},
3010
    { 2, "Low Watermark"},
3011
    { 0, NULL}
3012
};
3013
3014
static int * const mbim_multiflow_caps_info_control_caps_fields[] = {
3015
    &hf_mbim_multiflow_caps_info_control_caps_uplink,
3016
    &hf_mbim_multiflow_caps_info_control_caps_downlink,
3017
    NULL
3018
};
3019
3020
static const value_string mbim_multiflow_state_vals[] = {
3021
    { 0, "Off"},
3022
    { 1, "On"},
3023
    { 0, NULL}
3024
};
3025
3026
static const value_string mbim_ms_context_roaming_control_vals[] = {
3027
    { 0, "HomeOnly"},
3028
    { 1, "PartnerOnly"},
3029
    { 2, "NonPartnerOnly"},
3030
    { 3, "HomeAndPartner"},
3031
    { 4, "HomeAndNonPartner"},
3032
    { 5, "PartnerAndNonPartner"},
3033
    { 6, "AllowAll"},
3034
    { 0, NULL}
3035
};
3036
3037
static const value_string mbim_ms_context_media_type_vals[] = {
3038
    { 0, "CellularOnly"},
3039
    { 1, "WifiOnly"},
3040
    { 2, "All"},
3041
    { 0, NULL}
3042
};
3043
3044
static const value_string mbim_ms_context_enable_vals[] = {
3045
    { 0, "Disabled"},
3046
    { 1, "Enabled"},
3047
    { 0, NULL}
3048
};
3049
3050
static const value_string mbim_ms_context_source_vals[] = {
3051
    { 0, "Admin"},
3052
    { 1, "User"},
3053
    { 2, "Operator"},
3054
    { 3, "Modem"},
3055
    { 4, "Device"},
3056
    { 0, NULL}
3057
};
3058
3059
static const value_string mbim_ms_context_operations_vals[] = {
3060
    { 0, "Default"},
3061
    { 1, "Delete"},
3062
    { 2, "RestoreFactory"},
3063
    { 0, NULL}
3064
};
3065
3066
static const value_string mbim_ms_set_lte_attach_operations_vals[] = {
3067
    { 0, "Default"},
3068
    { 2, "RestoreFactory"},
3069
    { 0, NULL}
3070
};
3071
3072
static const value_string mbim_ms_lte_attach_state_vals[] = {
3073
    { 0, "Detached"},
3074
    { 1, "Attached"},
3075
    { 0, NULL}
3076
};
3077
3078
static int * const mbim_ms_network_blacklist_state_fields[] = {
3079
    &hf_mbim_ms_network_blacklist_state_sim_provider_actuated,
3080
    &hf_mbim_ms_network_blacklist_state_network_provider_actuated,
3081
    NULL
3082
};
3083
3084
static const value_string mbim_ms_network_blacklist_type_vals[] = {
3085
    { 0, "SIM"},
3086
    { 1, "Network"},
3087
    { 0, NULL}
3088
};
3089
3090
static const value_string mbim_ms_uiccslot_state_vals[] = {
3091
    { 0, "Unknown"},
3092
    { 1, "OffEmpty"},
3093
    { 2, "Off"},
3094
    { 3, "Empty"},
3095
    { 4, "NotReady"},
3096
    { 5, "Active"},
3097
    { 6, "Error"},
3098
    { 7, "ActiveEsim"},
3099
    { 8, "ActiveEsimNoProfiles"},
3100
    { 0, NULL}
3101
};
3102
3103
static const value_string mbim_base_station_serving_cell_flag_vals[] = {
3104
    { 0, "Neighbor Cell"},
3105
    { 1, "Serving cell"},
3106
    { 0, NULL}
3107
};
3108
3109
static const value_string mbim_ms_uicc_app_type_vals[] = {
3110
    { 0, "Unknown"},
3111
    { 1, "Mf"},
3112
    { 2, "SIM"},
3113
    { 3, "RUIM"},
3114
    { 4, "USIM"},
3115
    { 5, "CSIM"},
3116
    { 6, "ISIM"},
3117
    { 0, NULL}
3118
};
3119
static const value_string mbim_ms_apdu_secure_messaging_vals[] = {
3120
    { 0, "None"},
3121
    { 1, "No Hdr Auth"},
3122
    { 0, NULL}
3123
};
3124
static const value_string mbim_ms_apdu_type_vals[] = {
3125
    { 0, "Interindustry"},
3126
    { 1, "Extended"},
3127
    { 0, NULL}
3128
};
3129
static const value_string mbim_ms_reset_pass_through_action_vals[] = {
3130
    { 0, "Disabled"},
3131
    { 1, "Enabled"},
3132
    { 0, NULL}
3133
};
3134
3135
static const value_string mbim_uicc_file_accessibility_vals[] = {
3136
    { 0, "Unknown"},
3137
    { 1, "NotShareable"},
3138
    { 2, "Shareable"},
3139
    { 0, NULL}
3140
};
3141
3142
static const value_string mbim_uicc_file_type_vals[] = {
3143
    { 0, "Unknown"},
3144
    { 1, "WorkingEf"},
3145
    { 2, "InternalEf"},
3146
    { 3, "DfOrAdf"},
3147
    { 0, NULL}
3148
};
3149
3150
static const value_string mbim_uicc_file_structure_vals[] = {
3151
    { 0, "Unknown"},
3152
    { 1, "Transparent"},
3153
    { 2, "Cyclic"},
3154
    { 3, "Linear"},
3155
    { 4, "BerTLV"},
3156
    { 0, NULL}
3157
};
3158
3159
static void mbim_dissect_tlv_ie(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned *offset);
3160
3161
static uint8_t
3162
mbim_dissect_service_id_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int hf,
3163
                             unsigned *offset, struct mbim_uuid_ext **uuid_ext_info, bool is_net_guid)
3164
0
{
3165
0
    e_guid_t uuid;
3166
0
    unsigned i;
3167
0
    uint32_t uuid_ext[4];
3168
3169
0
    if (is_net_guid)
3170
0
    {
3171
0
        tvb_get_ntohguid(tvb, *offset, &uuid);
3172
0
    }
3173
0
    else
3174
0
    {
3175
0
        tvb_get_letohguid(tvb, *offset, &uuid);
3176
0
    }
3177
0
    for (i = 0; i < UUID_MAX; i++) {
3178
0
        if (memcmp(&uuid, &(mbim_uuid_service_id_vals[i].uuid), sizeof(e_guid_t)) == 0) {
3179
0
            break;
3180
0
        }
3181
0
    }
3182
3183
0
    if ((i == UUID_MAX) && mbim_uuid_ext_hash && uuid_ext_info) {
3184
        /* Let's check if UUID is known in extension table */
3185
0
        uuid_ext[0] = tvb_get_ntohl(tvb, *offset);
3186
0
        uuid_ext[1] = tvb_get_ntohl(tvb, *offset + 4);
3187
0
        uuid_ext[2] = tvb_get_ntohl(tvb, *offset + 8);
3188
0
        uuid_ext[3] = tvb_get_ntohl(tvb, *offset + 12);
3189
3190
0
        *uuid_ext_info = (struct mbim_uuid_ext *)wmem_map_lookup(mbim_uuid_ext_hash, uuid_ext);
3191
0
        if (*uuid_ext_info) {
3192
0
            proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)",
3193
0
                                             (*uuid_ext_info)->uuid_name, guid_to_str(pinfo->pool, &uuid));
3194
0
            *offset += 16;
3195
0
            return UUID_EXT_IDX;
3196
0
        }
3197
0
    }
3198
3199
0
    proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)",
3200
0
                                     val_to_str_ext_const(i, &mbim_service_id_vals_ext, "Unknown"),
3201
0
                                     guid_to_str(pinfo->pool, &uuid));
3202
0
    *offset += 16;
3203
3204
0
    return i;
3205
0
}
3206
3207
static uint32_t
3208
mbim_dissect_cid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset, uint8_t uuid_idx,
3209
                 struct mbim_uuid_ext *uuid_ext_info)
3210
0
{
3211
0
    uint32_t cid;
3212
3213
0
    cid = tvb_get_letohl(tvb, *offset);
3214
0
    if (uuid_idx < UUID_MAX) {
3215
0
        proto_tree_add_uint(tree, *mbim_uuid_info[uuid_idx].hf_entry, tvb, *offset, 4, cid);
3216
0
        if (mbim_uuid_info[uuid_idx].cid_list_ext) {
3217
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
3218
0
                            val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"));
3219
0
        } else {
3220
0
            col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"));
3221
0
        }
3222
0
    } else if (uuid_idx == UUID_EXT_IDX) {
3223
0
        const char* cid_string = val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown");
3224
3225
0
        proto_tree_add_uint_format_value(tree, hf_mbim_cid, tvb, *offset, 4, cid, "%s (%u)", cid_string , cid);
3226
0
        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", cid_string);
3227
0
    } else {
3228
0
        proto_tree_add_uint(tree, hf_mbim_cid, tvb, *offset, 4, cid);
3229
0
        col_append_str(pinfo->cinfo, COL_INFO, ": Unknown");
3230
0
    }
3231
0
    *offset += 4;
3232
0
    return cid;
3233
0
}
3234
3235
static void
3236
mbim_dissect_ms_plmn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
3237
0
{
3238
0
    int16_t mnc;
3239
0
    proto_tree_add_item(tree, hf_mbim_ms_plmn_mcc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3240
0
    offset += 2;
3241
0
    mnc = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
3242
0
    if (mnc & 0x8000) {
3243
0
        proto_tree_add_uint_format_value(tree, hf_mbim_ms_plmn_mnc, tvb, offset, 2, mnc, "%02u", mnc & 0x7fff);
3244
0
    }
3245
0
    else {
3246
0
        proto_tree_add_uint_format_value(tree, hf_mbim_ms_plmn_mnc, tvb, offset, 2, mnc, "%03u", mnc & 0x7fff);
3247
0
    }
3248
    /* offset += 2; */
3249
0
}
3250
3251
static void
3252
mbim_dissect_ms_tai_list_single_plmn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned *offset)
3253
0
{
3254
0
    uint32_t tac_element, i;
3255
0
    mbim_dissect_ms_plmn(tvb, pinfo, tree, *offset);
3256
0
    *offset += 4;
3257
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);
3258
0
    *offset += 1;
3259
0
    for (i = 0; i < tac_element; i++) {
3260
0
        proto_tree_add_item(tree, hf_mbim_ms_tai_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
3261
0
        *offset += 4;
3262
0
    }
3263
0
}
3264
3265
static void
3266
mbim_dissect_ms_tai_list_multi_plmn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned *offset)
3267
0
{
3268
0
    proto_tree* subtree;
3269
0
    uint32_t tai_element, i;
3270
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);
3271
0
    *offset += 1;
3272
0
    for (i = 0; i < tai_element; i++) {
3273
0
        subtree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "TAI #%u", i + 1);
3274
0
        mbim_dissect_ms_plmn(tvb, pinfo, subtree, *offset);
3275
0
        *offset += 4;
3276
0
        proto_tree_add_item(subtree, hf_mbim_ms_tai_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
3277
0
        *offset += 4;
3278
0
    }
3279
0
}
3280
3281
static bool
3282
mbim_dissect_ms_single_tai(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned *offset)
3283
0
{
3284
0
    uint32_t tai_list_type;
3285
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_tai_list_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tai_list_type);
3286
0
    *offset += 1;
3287
0
    switch (tai_list_type) {
3288
0
        case 0:
3289
0
        case 1:
3290
0
            mbim_dissect_ms_tai_list_single_plmn(tvb, pinfo, tree, offset);
3291
0
            break;
3292
0
        case 2:
3293
0
            mbim_dissect_ms_tai_list_multi_plmn(tvb, pinfo, tree, offset);
3294
0
            break;
3295
0
        default:
3296
0
            proto_tree_add_expert(tree, pinfo, &ei_mbim_unexpected_msg, tvb, *offset, 1);
3297
0
            return false;
3298
0
    }
3299
0
    return true;
3300
0
}
3301
static void
3302
mbim_dissect_ms_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, uint32_t data_len)
3303
0
{
3304
0
    proto_tree* subtree;
3305
0
    int32_t base_offset = offset;
3306
0
    int32_t tai_list_info_element_pos = 1;
3307
0
    while ((uint32_t)offset - base_offset < data_len) {
3308
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);
3309
0
        if (!mbim_dissect_ms_single_tai(tvb, pinfo, subtree, &offset)) {
3310
0
            break;
3311
0
        }
3312
0
        tai_list_info_element_pos++;
3313
0
    }
3314
0
}
3315
3316
static void
3317
mbim_dissect_ms_wake_command(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
3318
0
{
3319
0
    uint8_t uuid_idx;
3320
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
3321
0
    unsigned payload_offset;
3322
0
    uint32_t payload_size;
3323
0
    proto_tree *wake_command_tree;
3324
3325
0
    unsigned begin_offset = offset;
3326
3327
0
    wake_command_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Command");
3328
3329
0
    uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, wake_command_tree, hf_mbim_device_service_id, &offset, &uuid_ext_info, true);
3330
0
    mbim_dissect_cid(tvb, pinfo, wake_command_tree, &offset, uuid_idx, uuid_ext_info);
3331
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);
3332
0
    offset += 4;
3333
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);
3334
0
    offset += 4;
3335
0
    if (payload_offset && payload_size)
3336
0
    {
3337
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");
3338
0
    }
3339
0
}
3340
3341
static void
3342
mbim_dissect_ms_wake_packet(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
3343
0
{
3344
0
    unsigned packet_offset;
3345
0
    unsigned packet_size;
3346
0
    proto_tree *wake_packet_tree;
3347
0
    unsigned begin_offset = offset;
3348
3349
0
    wake_packet_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Packet");
3350
3351
0
    proto_tree_add_item(wake_packet_tree, hf_mbim_single_packet_filter_filter_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3352
0
    offset += 4;
3353
0
    proto_tree_add_item(wake_packet_tree, hf_mbim_ms_wake_reason_packet_original_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3354
0
    offset += 4;
3355
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);
3356
0
    offset += 4;
3357
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);
3358
    /* offset += 4; */
3359
0
    if (packet_offset && packet_size)
3360
0
    {
3361
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");
3362
0
    }
3363
0
}
3364
3365
static void
3366
mbim_dissect_snssai(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
3367
0
{
3368
0
    unsigned snssai_length;
3369
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_snssai_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &snssai_length);
3370
0
    *offset += 1;
3371
0
    proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3372
0
    *offset += 1;
3373
0
    if(snssai_length >= 4) {
3374
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3375
0
        *offset += 3;
3376
0
    }
3377
0
    if (snssai_length == 2 || snssai_length>=5) {
3378
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_mapped_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3379
0
        *offset += 1;
3380
0
    }
3381
0
    if (snssai_length == 8) {
3382
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_mapped_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3383
0
        *offset += 3;
3384
0
    }
3385
0
}
3386
3387
static void
3388
mbim_dissect_nssai(tvbuff_t* tvb, proto_tree* tree, unsigned offset, unsigned nssai_buffer_length)
3389
0
{
3390
0
    proto_tree* subtree;
3391
0
    unsigned base_offset = offset;
3392
0
    unsigned snssai_pos = 1;
3393
0
    while (offset - base_offset < nssai_buffer_length) {
3394
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI #%u", snssai_pos);
3395
0
        mbim_dissect_snssai(tvb,subtree, &offset);
3396
0
        snssai_pos++;
3397
0
    }
3398
0
}
3399
3400
static void
3401
// NOLINTNEXTLINE(misc-no-recursion)
3402
mbim_dissect_precfg_dflt_cfg_nssai(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, unsigned nssai_buffer_length)
3403
0
{
3404
0
    proto_tree* subtree;
3405
0
    unsigned base_offset = offset;
3406
0
    unsigned precfg_dflt_cfg_nssai_pos = 1;
3407
0
    while ((offset - base_offset < nssai_buffer_length) && precfg_dflt_cfg_nssai_pos < 2) {
3408
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);
3409
0
        proto_tree_add_item(subtree, hf_mbim_ms_pre_dflt_nssai_info_access_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3410
0
        offset += 4;
3411
0
        subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Default configured NSSAI");
3412
0
        mbim_dissect_tlv_ie(tvb, pinfo, subtree, &offset);
3413
0
        precfg_dflt_cfg_nssai_pos++;
3414
0
    }
3415
0
}
3416
3417
static void
3418
mbim_dissect_rej_snssai(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
3419
0
{
3420
0
    unsigned snssai_length;
3421
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_snssai_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &snssai_length);
3422
0
    *offset += 1;
3423
0
    proto_tree_add_item(tree, hf_mbim_ms_rej_snssai_cause, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3424
0
    *offset += 1;
3425
0
    proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_service_type, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3426
0
    *offset += 1;
3427
0
    if (snssai_length == 4) {
3428
0
        proto_tree_add_item(tree, hf_mbim_ms_snssai_slice_differentiator, tvb, *offset, 3, ENC_LITTLE_ENDIAN);
3429
0
        *offset += 3;
3430
0
    }
3431
0
}
3432
3433
static void
3434
mbim_dissect_rej_nssai(tvbuff_t* tvb, proto_tree* tree, unsigned offset, unsigned rej_nssai_buffer_length)
3435
0
{
3436
0
    proto_tree* subtree;
3437
0
    unsigned base_offset = offset;
3438
0
    unsigned snssai_pos = 1;
3439
0
    while (offset - base_offset < rej_nssai_buffer_length) {
3440
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Rejected S-NSSAI #%u", snssai_pos);
3441
0
        mbim_dissect_rej_snssai(tvb, subtree, &offset);
3442
0
        snssai_pos++;
3443
0
    }
3444
0
}
3445
3446
static void
3447
// NOLINTNEXTLINE(misc-no-recursion)
3448
mbim_dissect_ladn(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, unsigned rej_nssai_buffer_length)
3449
0
{
3450
0
    proto_tree* subtree, * ladn_tree;
3451
0
    unsigned base_offset = offset;
3452
0
    unsigned ladn_pos = 1;
3453
0
    while (offset - base_offset < rej_nssai_buffer_length) {
3454
0
        ladn_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "LADN #%u", ladn_pos);
3455
0
        subtree = proto_tree_add_subtree_format(ladn_tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "DNN");
3456
0
        mbim_dissect_tlv_ie(tvb, pinfo, subtree, &offset);
3457
0
        subtree = proto_tree_add_subtree_format(ladn_tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "TAI");
3458
0
        if (!mbim_dissect_ms_single_tai(tvb, pinfo, subtree, &offset)) {
3459
0
            break;
3460
0
        }
3461
0
        ladn_pos++;
3462
0
    }
3463
0
}
3464
3465
static void
3466
mbim_dissect_tcs(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned *offset, unsigned tcs_buffer_length)
3467
0
{
3468
0
    proto_tree* subtree;
3469
0
    unsigned base_offset = *offset;
3470
0
    unsigned tc_pos = 1;
3471
0
    uint32_t tc_type;
3472
0
    uint32_t tc_value_length;
3473
0
    while (*offset - base_offset < tcs_buffer_length) {
3474
0
        subtree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "Traffic component #%u", tc_pos);
3475
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_type, tvb, *offset, 1, ENC_NA, &tc_type);
3476
0
        *offset += 1;
3477
0
        switch (tc_type) {
3478
0
            case URSP_TC_TYPE_MATCH_ALL:
3479
0
                break;
3480
0
            case URSP_TC_TYPE_OSID_APPID:
3481
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_os_id, tvb, *offset, 16, ENC_BIG_ENDIAN);
3482
0
                *offset += 16;
3483
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_NA, &tc_value_length);
3484
0
                *offset += 1;
3485
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_app_id, tvb, *offset, tc_value_length, ENC_ASCII);
3486
0
                *offset += tc_value_length;
3487
0
                break;
3488
0
            case URSP_TC_TYPE_IPV4:
3489
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv4, tvb, *offset, 4, ENC_BIG_ENDIAN);
3490
0
                *offset += 4;
3491
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv4_mask, tvb, *offset, 4, ENC_BIG_ENDIAN);
3492
0
                *offset += 4;
3493
0
                break;
3494
0
            case URSP_TC_TYPE_IPV6:
3495
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv6, tvb, *offset, 16, ENC_NA);
3496
0
                *offset += 16;
3497
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_ipv6_prefix_length, tvb, *offset, 1, ENC_NA);
3498
0
                *offset += 1;
3499
0
                break;
3500
0
            case URSP_TC_TYPE_PROTOCOL_ID_OR_NEXT_HEADER:
3501
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_proto_id, tvb, *offset, 1, ENC_NA);
3502
0
                *offset += 1;
3503
0
                break;
3504
0
            case URSP_TC_TYPE_PORT:
3505
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port, tvb, *offset, 2, ENC_BIG_ENDIAN);
3506
0
                *offset += 2;
3507
0
                break;
3508
0
            case URSP_TC_TYPE_PORT_RANGE:
3509
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port_range_low, tvb, *offset, 2, ENC_BIG_ENDIAN);
3510
0
                *offset += 2;
3511
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_port_range_high, tvb, *offset, 2, ENC_BIG_ENDIAN);
3512
0
                *offset += 2;
3513
0
                break;
3514
0
            case URSP_TC_TYPE_SECURITY_PARAM_INDEX:
3515
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 4, ENC_NA);
3516
0
                *offset += 4;
3517
0
                break;
3518
0
            case URSP_TC_TYPE_SERVICE_OR_TRAFFIC_CLASS:
3519
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3520
0
                *offset += 2;
3521
0
                break;
3522
0
            case URSP_TC_TYPE_FLOW_LABEL:
3523
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 3, ENC_NA);
3524
0
                *offset += 3;
3525
0
                break;
3526
0
            case URSP_TC_TYPE_MAC_ADDRESS:
3527
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 6, ENC_NA);
3528
0
                *offset += 6;
3529
0
                break;
3530
0
            case URSP_TC_TYPE_C_TAG_VID:
3531
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3532
0
                *offset += 2;
3533
0
                break;
3534
0
            case URSP_TC_TYPE_S_TAG_VID:
3535
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3536
0
                *offset += 2;
3537
0
                break;
3538
0
            case URSP_TC_TYPE_C_TAG_PCP_AND_DEI:
3539
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 1, ENC_NA);
3540
0
                *offset += 1;
3541
0
                break;
3542
0
            case URSP_TC_TYPE_S_TAG_PCP_AND_DEI:
3543
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 1, ENC_NA);
3544
0
                *offset += 1;
3545
0
                break;
3546
0
            case URSP_TC_TYPE_ETHER:
3547
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_byte_value, tvb, *offset, 2, ENC_NA);
3548
0
                *offset += 2;
3549
0
                break;
3550
0
            case URSP_TC_TYPE_DNN:
3551
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3552
0
                *offset += 1;
3553
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_dnn, tvb, *offset, tc_value_length, ENC_APN_STR);
3554
0
                *offset += tc_value_length;
3555
0
                break;
3556
0
            case URSP_TC_TYPE_CONNECTION_CAPABILITY:
3557
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3558
0
                *offset += 1;
3559
0
                for (unsigned i = 0; i < tc_value_length; i++) {
3560
0
                    proto_tree_add_bitmask(subtree, tvb, *offset, hf_mbim_ms_ursp_tc_capability, ett_mbim_bitmap,
3561
0
                        ursp_tc_connection_capability_flags_fields, ENC_LITTLE_ENDIAN);
3562
0
                    *offset += 1;
3563
0
                }
3564
0
                break;
3565
0
            case URSP_TC_TYPE_FQDN:
3566
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3567
0
                *offset += 1;
3568
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_fqdn, tvb, *offset, tc_value_length, ENC_APN_STR);
3569
0
                *offset += tc_value_length;
3570
0
                break;
3571
0
            case URSP_TC_TYPE_APPID:
3572
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &tc_value_length);
3573
0
                *offset += 1;
3574
0
                proto_tree_add_item(subtree, hf_mbim_ms_ursp_tc_app_id, tvb, *offset, tc_value_length, ENC_LITTLE_ENDIAN | ENC_ASCII);
3575
0
                *offset += tc_value_length;
3576
0
                break;
3577
0
            default:
3578
0
                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, tvb, *offset, tcs_buffer_length - (*offset - base_offset));
3579
0
                return;
3580
0
        }
3581
0
        tc_pos++;
3582
0
    }
3583
0
}
3584
3585
static void
3586
mbim_dissect_td(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned *offset)
3587
0
{
3588
0
    proto_tree* subtree;
3589
0
    unsigned tcs_length;
3590
0
    subtree = proto_tree_add_subtree(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "Traffic descriptor");
3591
0
    proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, *offset, 2, ENC_BIG_ENDIAN, &tcs_length);
3592
0
    *offset += 2;
3593
0
    mbim_dissect_tcs(tvb, pinfo, subtree, offset, tcs_length);
3594
0
}
3595
3596
static void
3597
mbim_dissect_tps(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, unsigned tp_buffer_length)
3598
0
{
3599
0
    proto_tree* subtree;
3600
0
    unsigned base_offset = offset;
3601
0
    unsigned tp_pos = 1;
3602
0
    uint32_t tp_length;
3603
0
    while (offset - base_offset < tp_buffer_length) {
3604
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Traffic parameter #%u", tp_pos);
3605
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_ursp_tc_length, tvb, offset, 2, ENC_BIG_ENDIAN, &tp_length);
3606
0
        offset += 2;
3607
0
        mbim_dissect_tcs(tvb, pinfo, subtree, &offset, tp_length);
3608
0
        tp_pos++;
3609
0
    }
3610
0
}
3611
3612
static void
3613
mbim_dissect_ursp_rules(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, unsigned ursp_rules_buffer_length)
3614
0
{
3615
0
    proto_tree* subtree;
3616
0
    unsigned base_offset = offset;
3617
0
    unsigned ursp_rule_pos = 1;
3618
0
    while (offset - base_offset < ursp_rules_buffer_length) {
3619
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "URSP rule #%u", ursp_rule_pos);
3620
0
        proto_tree_add_item(subtree, hf_mbim_ms_ursp_precedence, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3621
0
        offset += 1;
3622
0
        mbim_dissect_td(tvb, pinfo, subtree, &offset);
3623
0
        ursp_rule_pos++;
3624
0
    }
3625
0
}
3626
3627
static void
3628
// NOLINTNEXTLINE(misc-no-recursion)
3629
mbim_dissect_tlv_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset)
3630
0
{
3631
0
    unsigned tlv_data_offset;
3632
0
    unsigned padding_length;
3633
0
    unsigned data_length;
3634
0
    unsigned tlv_type = TLV_TYPE_UNKNOWN;
3635
3636
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN, &tlv_type);
3637
0
    *offset += 2;
3638
0
    proto_tree_add_item(tree, hf_mbim_tlv_ie_reserved, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
3639
0
    *offset += 1;
3640
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_padding_length, tvb, *offset, 1, ENC_LITTLE_ENDIAN, &padding_length);
3641
0
    *offset += 1;
3642
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_tlv_ie_data_length, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &data_length);
3643
0
    *offset += 4;
3644
0
    tlv_data_offset = *offset;
3645
0
    if (data_length) {
3646
0
        increment_dissection_depth(pinfo);
3647
        // New TLV types will be added here
3648
0
        switch (tlv_type) {
3649
0
            case TLV_TYPE_SINGLE_NSSAI:
3650
0
                mbim_dissect_snssai(tvb, tree, offset);
3651
0
                break;
3652
0
            case TLV_TYPE_ALLOWED_NSSAI:
3653
0
            case TLV_TYPE_CFG_NSSAI:
3654
0
            case TLV_TYPE_DFLT_CFG_NSSAI:
3655
0
                mbim_dissect_nssai(tvb, tree, *offset, data_length);
3656
0
                break;
3657
0
            case TLV_TYPE_PRECFG_DFLT_CFG_NSSAI:
3658
0
                mbim_dissect_precfg_dflt_cfg_nssai(tvb, pinfo, tree, *offset, data_length);
3659
0
                break;
3660
0
            case TLV_TYPE_REJ_NSSAI:
3661
0
                mbim_dissect_rej_nssai(tvb, tree, *offset, data_length);
3662
0
                break;
3663
0
            case TLV_TYPE_LADN:
3664
0
                mbim_dissect_ladn(tvb, pinfo, tree, *offset, data_length);
3665
0
                break;
3666
0
            case TLV_TYPE_TAI:
3667
0
                mbim_dissect_ms_tai(tvb, pinfo, tree, *offset, data_length);
3668
0
                break;
3669
0
            case TLV_TYPE_WCHAR_STR:
3670
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_wchar_str, tvb, *offset, data_length, ENC_LITTLE_ENDIAN | ENC_UTF_16);
3671
0
                break;
3672
0
            case TLV_TYPE_TRAFFIC_PARAMETERS:
3673
0
                mbim_dissect_tps(tvb, pinfo, tree, *offset, data_length);
3674
0
                break;
3675
0
            case TLV_TYPE_WAKE_COMMAND:
3676
0
                mbim_dissect_ms_wake_command(tvb, pinfo, tree, *offset);
3677
0
                break;
3678
0
            case TLV_TYPE_WAKE_PACKET:
3679
0
                mbim_dissect_ms_wake_packet(tvb, pinfo, tree, *offset);
3680
0
                break;
3681
0
            case TLV_TYPE_TYPE_OSID:
3682
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_guid, tvb, *offset, 16, ENC_BIG_ENDIAN);
3683
0
                break;
3684
0
            case TLV_TYPE_TYPE_3GPP_REL_VERSION:
3685
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_int32, tvb, *offset, data_length, ENC_LITTLE_ENDIAN);
3686
0
                break;
3687
0
            case TLV_TYPE_TYPE_URSP_RULES_TD_ONLY:
3688
0
                mbim_dissect_ursp_rules(tvb,pinfo, tree, *offset, data_length);
3689
0
                break;
3690
0
            case TLV_TYPE_TYPE_SESSION_ID:
3691
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_data_int32, tvb, *offset, data_length, ENC_LITTLE_ENDIAN);
3692
0
                break;
3693
0
            default:
3694
0
                proto_tree_add_item(tree, hf_mbim_tlv_ie_unnamed_data, tvb, *offset, data_length, ENC_NA);
3695
0
                break;
3696
0
        }
3697
0
        decrement_dissection_depth(pinfo);
3698
0
        if (ckd_add(offset, tlv_data_offset, data_length)) {
3699
0
            THROW(ReportedBoundsError);
3700
0
        }
3701
0
    }
3702
0
    if (padding_length) {
3703
0
        proto_tree_add_item(tree, hf_mbim_tlv_ie_padding, tvb, *offset, padding_length, ENC_NA);
3704
0
        *offset += padding_length;
3705
0
    }
3706
0
}
3707
3708
static void
3709
mbim_dissect_tlv_ie_list(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned tlv_offset, unsigned buffer_base_offset, unsigned buffer_length)
3710
0
{
3711
0
    proto_tree* unnamed_ies;
3712
0
    while (tlv_offset - buffer_base_offset < buffer_length) {
3713
0
        unnamed_ies = proto_tree_add_subtree_format(tree, tvb, tlv_offset, 0, ett_mbim_pair_list, NULL, "Unnamed IE's");
3714
0
        mbim_dissect_tlv_ie(tvb, pinfo, unnamed_ies, &tlv_offset);
3715
0
    }
3716
0
}
3717
3718
static void
3719
mbim_dissect_device_caps_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset,
3720
                              struct mbim_conv_info *mbim_conv)
3721
0
{
3722
0
    unsigned base_offset;
3723
0
    uint32_t custom_class_offset, custom_class_size, device_id_offset, device_id_size,
3724
0
            fw_info_offset, fw_info_size, hw_info_offset, hw_info_size;
3725
0
    proto_item *it;
3726
3727
0
    base_offset = offset;
3728
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3729
0
    offset += 4;
3730
0
    mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
3731
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
3732
0
        mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
3733
0
    offset += 4;
3734
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3735
0
    offset += 4;
3736
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
3737
0
                           mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
3738
0
    offset += 4;
3739
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
3740
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
3741
0
    offset += 4;
3742
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
3743
0
                           mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
3744
0
    offset += 4;
3745
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
3746
0
                           mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
3747
0
    offset += 4;
3748
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3749
0
    offset += 4;
3750
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);
3751
0
    offset += 4;
3752
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);
3753
0
    offset += 4;
3754
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);
3755
0
    offset += 4;
3756
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);
3757
0
    offset += 4;
3758
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);
3759
0
    offset += 4;
3760
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);
3761
0
    offset += 4;
3762
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);
3763
0
    offset += 4;
3764
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);
3765
    /*offset += 4;*/
3766
0
    if (custom_class_offset && custom_class_size) {
3767
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_custom_data_class, tvb, base_offset + custom_class_offset,
3768
0
                                custom_class_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3769
0
        if (custom_class_size > 22) {
3770
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3771
0
        }
3772
0
    }
3773
0
    if (device_id_offset && device_id_size) {
3774
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_device_id, tvb, base_offset + device_id_offset,
3775
0
                                 device_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3776
0
        if ((mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM) && (device_id_size > 30)) {
3777
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3778
0
        } else if (device_id_size > 36) {
3779
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3780
0
        }
3781
0
    }
3782
0
    if (fw_info_offset && fw_info_size) {
3783
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_fw_info, tvb, base_offset + fw_info_offset,
3784
0
                                 fw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3785
0
        if (fw_info_size > 60) {
3786
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3787
0
        }
3788
0
    }
3789
0
    if (hw_info_offset && hw_info_size) {
3790
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_hw_info, tvb, base_offset + hw_info_offset,
3791
0
                                 hw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3792
0
        if (hw_info_size > 60) {
3793
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3794
0
        }
3795
0
    }
3796
0
}
3797
3798
static void
3799
mbim_dissect_subscriber_ready_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
3800
                                     struct mbim_conv_info *mbim_conv)
3801
0
{
3802
0
    proto_tree *subtree;
3803
0
    unsigned base_offset;
3804
0
    uint32_t i, subscriber_id_offset, subscriber_id_size, sim_icc_id_offset, sim_icc_id_size, elem_count;
3805
0
    proto_item *it;
3806
0
    wmem_array_t *pair_list = NULL;
3807
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
3808
3809
0
    base_offset = offset;
3810
0
    proto_tree_add_item(tree, hf_mbim_subscr_ready_status_ready_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3811
0
    offset += 4;
3812
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
3813
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_subscr_ready_status_flags, ett_mbim_bitmap,
3814
0
            mbim_subscr_ready_status_flags_fields, ENC_LITTLE_ENDIAN);
3815
0
        offset += 4;
3816
0
    }
3817
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);
3818
0
    offset += 4;
3819
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);
3820
0
    offset += 4;
3821
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);
3822
0
    offset += 4;
3823
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);
3824
0
    offset += 4;
3825
0
    proto_tree_add_item(tree, hf_mbim_subscr_ready_status_ready_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3826
0
    offset += 4;
3827
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_subscr_ready_status_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
3828
0
    offset += 4;
3829
3830
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
3831
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3832
0
        offset += 4;
3833
0
    }
3834
0
    if (elem_count) {
3835
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
3836
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Telephone Numbers Ref List");
3837
0
        for (i = 0; i < elem_count; i++) {
3838
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);
3839
0
            offset += 4;
3840
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);
3841
0
            offset += 4;
3842
0
            wmem_array_append_one(pair_list, pair_list_item);
3843
0
        }
3844
0
    }
3845
0
    if (subscriber_id_offset && subscriber_id_size) {
3846
0
        it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_susbcr_id, tvb, base_offset + subscriber_id_offset,
3847
0
                                 subscriber_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3848
0
        if ((mbim_conv->cellular_class == MBIM_CELLULAR_CLASS_CDMA) && (subscriber_id_size > 20)) {
3849
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3850
0
        } else if (subscriber_id_size > 30) {
3851
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3852
0
        }
3853
0
    }
3854
0
    if (sim_icc_id_offset && sim_icc_id_size) {
3855
0
        it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_sim_icc_id, tvb, base_offset + sim_icc_id_offset,
3856
0
                                 sim_icc_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3857
0
        if (sim_icc_id_size > 40) {
3858
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3859
0
        }
3860
0
    }
3861
0
    for (i = 0; i < elem_count; i++) {
3862
0
        p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
3863
0
        if (p_pair_list_item->offset && p_pair_list_item->size) {
3864
0
            it = proto_tree_add_item(tree, hf_mbim_subscr_ready_status_tel_nb, tvb, base_offset + p_pair_list_item->offset,
3865
0
                                     p_pair_list_item->size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3866
0
            if (p_pair_list_item->size > 44) {
3867
0
                expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3868
0
            }
3869
0
        }
3870
0
    }
3871
0
}
3872
3873
static void
3874
mbim_dissect_set_pin(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
3875
0
{
3876
0
    unsigned base_offset;
3877
0
    uint32_t pin_offset, pin_size, new_pin_offset, new_pin_size;
3878
0
    proto_item *it;
3879
3880
0
    base_offset = offset;
3881
0
    proto_tree_add_item(tree, hf_mbim_set_pin_pin_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3882
0
    offset += 4;
3883
0
    proto_tree_add_item(tree, hf_mbim_set_pin_pin_pin_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3884
0
    offset += 4;
3885
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_pin_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_offset);
3886
0
    offset += 4;
3887
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_pin_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pin_size);
3888
0
    offset += 4;
3889
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_new_pin_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &new_pin_offset);
3890
0
    offset += 4;
3891
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_pin_new_pin_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &new_pin_size);
3892
    /*offset += 4;*/
3893
0
    if (pin_offset && pin_size) {
3894
0
        it = proto_tree_add_item(tree, hf_mbim_set_pin_pin, tvb, base_offset + pin_offset,
3895
0
                                 pin_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3896
0
        if (pin_size > 32) {
3897
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3898
0
        }
3899
0
    }
3900
0
    if (new_pin_offset && new_pin_size) {
3901
0
        it = proto_tree_add_item(tree, hf_mbim_set_pin_new_pin, tvb, base_offset + new_pin_offset,
3902
0
                                 new_pin_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3903
0
        if (new_pin_size > 32) {
3904
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3905
0
        }
3906
0
    }
3907
0
}
3908
3909
static void
3910
mbim_dissect_pin_list_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
3911
0
{
3912
0
    static const char *pin_list[10] = { "PIN 1", "PIN 2", "Device SIM PIN", "Device First SIM PIN", "Network PIN",
3913
0
                                        "Network Subset PIN", "Service Provider PIN", "Corporate PIN", "Subsidy Lock",
3914
0
                                        "Custom"};
3915
0
    unsigned i;
3916
0
    uint32_t length;
3917
0
    proto_tree *subtree;
3918
3919
0
    for (i = 0; i < 10; i++) {
3920
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 16, ett_mbim_pin, NULL, pin_list[i]);
3921
0
        proto_tree_add_item(subtree, hf_mbim_pin_list_pin_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3922
0
        offset += 4;
3923
0
        proto_tree_add_item(subtree, hf_mbim_pin_list_pin_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3924
0
        offset += 4;
3925
0
        length = tvb_get_letohl(tvb, offset);
3926
0
        if (length == 0xffffffff) {
3927
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_pin_list_pin_length_min, tvb, offset, 4,
3928
0
                                             length, "Not available (0xffffffff)");
3929
0
        } else {
3930
0
            proto_tree_add_uint(subtree, hf_mbim_pin_list_pin_length_min, tvb, offset, 4, length);
3931
0
        }
3932
0
        offset += 4;
3933
0
        length = tvb_get_letohl(tvb, offset);
3934
0
        if (length == 0xffffffff) {
3935
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_pin_list_pin_length_max, tvb, offset, 4,
3936
0
                                             length, "Not available (0xffffffff)");
3937
0
        } else {
3938
0
            proto_tree_add_uint(subtree, hf_mbim_pin_list_pin_length_max, tvb, offset, 4, length);
3939
0
        }
3940
0
        offset += 4;
3941
0
    }
3942
0
}
3943
3944
static void
3945
mbim_dissect_provider(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
3946
0
{
3947
0
    unsigned base_offset;
3948
0
    uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size;
3949
0
    proto_item *it;
3950
3951
0
    base_offset = offset;
3952
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
3953
0
    offset += 4;
3954
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
3955
0
    offset += 4;
3956
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_provider_state, ett_mbim_bitmap,
3957
0
                           mbim_provider_state_fields, ENC_LITTLE_ENDIAN);
3958
0
    offset += 4;
3959
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
3960
0
    offset += 4;
3961
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provider_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
3962
0
    offset += 4;
3963
0
    proto_tree_add_item (tree, hf_mbim_provider_cellular_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3964
0
    offset += 4;
3965
0
    proto_tree_add_item (tree, hf_mbim_provider_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3966
0
    offset += 4;
3967
0
    proto_tree_add_item (tree, hf_mbim_provider_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3968
    /*offset += 4;*/
3969
0
    if (provider_id_offset && provider_id_size) {
3970
0
        it = proto_tree_add_item(tree, hf_mbim_provider_provider_id, tvb, base_offset + provider_id_offset,
3971
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3972
0
        if (provider_id_size > 12) {
3973
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3974
0
        }
3975
0
    }
3976
0
    if (provider_name_offset && provider_name_size) {
3977
0
        it = proto_tree_add_item(tree, hf_mbim_provider_provider_name, tvb, base_offset + provider_name_offset,
3978
0
                                 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
3979
0
        if (provider_name_size > 40) {
3980
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
3981
0
        }
3982
0
    }
3983
0
}
3984
3985
static void
3986
mbim_dissect_providers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
3987
0
{
3988
0
    proto_tree *subtree;
3989
0
    unsigned base_offset;
3990
0
    uint32_t i, elem_count;
3991
0
    wmem_array_t *pair_list;
3992
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
3993
3994
0
    base_offset = offset;
3995
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_providers_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
3996
0
    offset += 4;
3997
0
    if (elem_count) {
3998
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
3999
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Providers Ref List");
4000
0
        for (i = 0; i < elem_count; i++) {
4001
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_providers_provider_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4002
0
            offset += 4;
4003
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_providers_provider_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4004
0
            offset += 4;
4005
0
            wmem_array_append_one(pair_list, pair_list_item);
4006
0
        }
4007
0
        for (i = 0; i < elem_count; i++) {
4008
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4009
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4010
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
4011
0
                            ett_mbim_pair_list, NULL, "Provider #%u", i+1);
4012
0
                mbim_dissect_provider(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4013
0
            }
4014
0
        }
4015
0
    }
4016
0
}
4017
4018
static void
4019
mbim_dissect_set_register_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4020
0
{
4021
0
    unsigned base_offset;
4022
0
    uint32_t provider_id_offset, provider_id_size;
4023
0
    proto_item *it;
4024
4025
0
    base_offset = offset;
4026
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);
4027
0
    offset += 4;
4028
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);
4029
0
    offset += 4;
4030
0
    proto_tree_add_item(tree, hf_mbim_set_register_state_register_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4031
0
    offset += 4;
4032
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_register_state_data_class, ett_mbim_bitmap,
4033
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4034
    /*offset += 4;*/
4035
0
    if (provider_id_offset && provider_id_size) {
4036
0
        it = proto_tree_add_item(tree, hf_mbim_set_register_state_provider_id, tvb, base_offset + provider_id_offset,
4037
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4038
0
        if (provider_id_size > 12) {
4039
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4040
0
        }
4041
0
    }
4042
0
}
4043
4044
static void
4045
mbim_dissect_registration_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv)
4046
0
{
4047
0
    unsigned base_offset;
4048
0
    uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size,
4049
0
            roaming_text_offset, roaming_text_size, nw_error;
4050
0
    proto_item *it;
4051
4052
0
    base_offset = offset;
4053
0
    nw_error = tvb_get_letohl(tvb, offset);
4054
0
    if (nw_error == 0) {
4055
0
        proto_tree_add_uint_format_value(tree, hf_mbim_registration_state_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4056
0
    } else {
4057
0
        proto_tree_add_uint(tree, hf_mbim_registration_state_info_nw_error, tvb, offset, 4, nw_error);
4058
0
    }
4059
0
    offset += 4;
4060
0
    proto_tree_add_item(tree, hf_mbim_registration_state_info_register_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4061
0
    offset += 4;
4062
0
    proto_tree_add_item(tree, hf_mbim_registration_state_info_register_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4063
0
    offset += 4;
4064
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_available_data_classes, ett_mbim_bitmap,
4065
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4066
0
    offset += 4;
4067
0
    proto_tree_add_item(tree, hf_mbim_registration_state_info_current_cellular_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4068
0
    offset += 4;
4069
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);
4070
0
    offset += 4;
4071
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);
4072
0
    offset += 4;
4073
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);
4074
0
    offset += 4;
4075
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);
4076
0
    offset += 4;
4077
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);
4078
0
    offset += 4;
4079
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);
4080
0
    offset += 4;
4081
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_registration_flags, ett_mbim_bitmap,
4082
0
                           mbim_registration_state_info_registration_flags_fields, ENC_LITTLE_ENDIAN);
4083
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4084
0
        offset += 4;
4085
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_registration_state_info_preferred_data_class, ett_mbim_bitmap,
4086
0
                    mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4087
0
    }
4088
    /*offset += 4;*/
4089
0
    if (provider_id_offset && provider_id_size) {
4090
0
        it = proto_tree_add_item(tree, hf_mbim_registration_state_info_provider_id, tvb, base_offset + provider_id_offset,
4091
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4092
0
        if (provider_id_size > 12) {
4093
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4094
0
        }
4095
0
    }
4096
0
    if (provider_name_offset && provider_name_size) {
4097
0
        it = proto_tree_add_item(tree, hf_mbim_registration_state_info_provider_name, tvb, base_offset + provider_name_offset,
4098
0
                                 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4099
0
        if (provider_name_size > 40) {
4100
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4101
0
        }
4102
0
    }
4103
0
    if (roaming_text_offset && roaming_text_size) {
4104
0
        it = proto_tree_add_item(tree, hf_mbim_registration_state_info_roaming_text, tvb, base_offset + roaming_text_offset,
4105
0
                                 roaming_text_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4106
0
        if (roaming_text_size > 126) {
4107
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4108
0
        }
4109
0
    }
4110
0
}
4111
4112
static void
4113
mbim_dissect_packet_service_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv, uint32_t buffer_len)
4114
0
{
4115
0
    proto_tree *tai_ie;
4116
0
    uint32_t nw_error;
4117
0
    uint32_t base_offset = offset;
4118
4119
0
    nw_error = tvb_get_letohl(tvb, offset);
4120
0
    if (nw_error == 0) {
4121
0
        proto_tree_add_uint_format_value(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4122
0
    } else {
4123
0
        proto_tree_add_uint(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error);
4124
0
    }
4125
0
    offset += 4;
4126
0
    proto_tree_add_item(tree, hf_mbim_packet_service_info_packet_service_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4127
0
    offset += 4;
4128
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4129
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_current_data_class, ett_mbim_bitmap,
4130
0
                    mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4131
0
    } else {
4132
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_highest_available_data_class, ett_mbim_bitmap,
4133
0
                    mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4134
0
    }
4135
0
    offset += 4;
4136
0
    proto_tree_add_item(tree, hf_mbim_packet_service_info_uplink_speed, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4137
0
    offset += 8;
4138
0
    proto_tree_add_item(tree, hf_mbim_packet_service_info_downlink_speed, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4139
0
    offset += 8;
4140
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4141
0
        proto_tree_add_item(tree, hf_mbim_packet_service_info_frequency_range, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4142
0
        offset += 4;
4143
0
    }
4144
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4145
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_packet_service_info_data_subclass, ett_mbim_bitmap,
4146
0
            mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
4147
0
        offset += 4;
4148
0
        tai_ie = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Tracking Area Identity");
4149
0
        mbim_dissect_ms_plmn(tvb, pinfo, tai_ie, offset);
4150
0
        offset += 4;
4151
0
        proto_tree_add_item(tai_ie, hf_mbim_ms_tai_tac, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4152
0
        offset += 4;
4153
0
        mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4154
0
    }
4155
0
}
4156
4157
static void
4158
mbim_dissect_set_signal_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4159
0
{
4160
0
    uint32_t error_rate_threshold;
4161
4162
0
    proto_tree_add_item(tree, hf_mbim_set_signal_state_signal_strength_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4163
0
    offset += 4;
4164
0
    proto_tree_add_item(tree, hf_mbim_set_signal_state_rssi_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4165
0
    offset += 4;
4166
0
    error_rate_threshold = tvb_get_letohl(tvb, offset);
4167
0
    if (error_rate_threshold == 0xffffffff) {
4168
0
        proto_tree_add_uint_format_value(tree, hf_mbim_set_signal_state_error_rate_threshold, tvb, offset, 4,
4169
0
                                         error_rate_threshold, "No report (0xffffffff)");
4170
0
    } else {
4171
0
        proto_tree_add_item(tree, hf_mbim_set_signal_state_error_rate_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4172
0
    }
4173
0
}
4174
4175
static void
4176
mbim_dissect_signal_state_element(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4177
0
{
4178
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4179
0
    offset += 4;
4180
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_snr, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4181
0
    offset += 4;
4182
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_rsrp_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4183
0
    offset += 4;
4184
0
    proto_tree_add_item(tree, hf_mbim_signal_state_element_snr_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4185
0
    offset += 4;
4186
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_signal_state_element_system_type, ett_mbim_bitmap,
4187
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
4188
0
}
4189
4190
static void
4191
mbim_dissect_signal_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv)
4192
0
{
4193
0
    proto_tree *subtree;
4194
0
    unsigned base_offset;
4195
0
    uint32_t error_rate_threshold, rsrp_snr_offset, rsrp_snr_size, elem_count, i;
4196
0
    const unsigned signal_state_elem_size = 20;
4197
0
    base_offset = offset;
4198
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4199
0
    offset += 4;
4200
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4201
0
    offset += 4;
4202
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_signal_strength_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4203
0
    offset += 4;
4204
0
    proto_tree_add_item(tree, hf_mbim_signal_state_info_rssi_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4205
0
    offset += 4;
4206
0
    error_rate_threshold = tvb_get_letohl(tvb, offset);
4207
0
    if (error_rate_threshold == 0xffffffff) {
4208
0
        proto_tree_add_uint_format_value(tree, hf_mbim_signal_state_info_error_rate_threshold, tvb, offset, 4,
4209
0
            error_rate_threshold, "No report (0xffffffff)");
4210
0
    } else {
4211
0
        proto_tree_add_item(tree, hf_mbim_signal_state_info_error_rate_threshold, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4212
0
    }
4213
0
    offset += 4;
4214
0
    if (SHOULD_MBIM_EX2_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4215
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);
4216
0
        offset += 4;
4217
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);
4218
0
        if (rsrp_snr_offset && rsrp_snr_size) {
4219
0
            offset = base_offset + rsrp_snr_offset;
4220
0
            proto_tree_add_item_ret_uint(tree, hf_mbim_signal_state_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
4221
0
            offset += 4;
4222
0
            for (i = 0; i < elem_count; i++) {
4223
0
                offset += signal_state_elem_size * i;
4224
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);
4225
0
                mbim_dissect_signal_state_element(tvb, pinfo, subtree, offset);
4226
0
            }
4227
0
        }
4228
0
    }
4229
0
}
4230
4231
static uint8_t
4232
mbim_dissect_context_type_uuid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset)
4233
0
{
4234
0
    e_guid_t uuid;
4235
0
    unsigned i;
4236
4237
0
    tvb_get_ntohguid(tvb, *offset, &uuid);
4238
4239
0
    for (i = 0; i < array_length(mbim_uuid_context_type_vals); i++) {
4240
0
        if (memcmp(&uuid, &(mbim_uuid_context_type_vals[i].uuid), sizeof(e_guid_t)) == 0) {
4241
0
            break;
4242
0
        }
4243
0
    }
4244
0
    proto_tree_add_guid_format_value(tree, hf_mbim_context_type, tvb, *offset, 16, &uuid, "%s (%s)",
4245
0
                                     val_to_str_const(i, mbim_context_type_vals, "Unknown"), guid_to_str(pinfo->pool, &uuid));
4246
0
    *offset += 16;
4247
4248
0
    return i;
4249
0
}
4250
4251
static void
4252
mbim_dissect_set_connect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4253
0
{
4254
0
    unsigned base_offset;
4255
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size,
4256
0
            password_offset, password_size;
4257
0
    proto_item *it;
4258
4259
0
    base_offset = offset;
4260
0
    proto_tree_add_item(tree, hf_mbim_set_connect_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4261
0
    offset += 4;
4262
0
    proto_tree_add_item(tree, hf_mbim_set_connect_activation_command, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4263
0
    offset += 4;
4264
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
4265
0
    offset += 4;
4266
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
4267
0
    offset += 4;
4268
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
4269
0
    offset += 4;
4270
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
4271
0
    offset += 4;
4272
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
4273
0
    offset += 4;
4274
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_connect_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
4275
0
    offset += 4;
4276
0
    proto_tree_add_item(tree, hf_mbim_set_connect_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4277
0
    offset += 4;
4278
0
    proto_tree_add_item(tree, hf_mbim_set_connect_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4279
0
    offset += 4;
4280
0
    proto_tree_add_item(tree, hf_mbim_set_connect_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4281
0
    offset += 4;
4282
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4283
0
    if (access_string_offset && access_string_size) {
4284
0
        it = proto_tree_add_item(tree, hf_mbim_set_connect_access_string, tvb, base_offset + access_string_offset,
4285
0
                                 access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4286
0
        if (access_string_size > 200) {
4287
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4288
0
        }
4289
0
    }
4290
0
    if (user_name_offset && user_name_size) {
4291
0
        it = proto_tree_add_item(tree, hf_mbim_set_connect_user_name, tvb, base_offset + user_name_offset,
4292
0
                                 user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4293
0
        if (user_name_size > 510) {
4294
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4295
0
        }
4296
0
    }
4297
0
    if (password_offset && password_size) {
4298
0
        it = proto_tree_add_item(tree, hf_mbim_set_connect_password, tvb, base_offset + password_offset,
4299
0
                                 password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4300
0
        if (password_size > 510) {
4301
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4302
0
        }
4303
0
    }
4304
0
}
4305
4306
static void
4307
mbim_dissect_set_connect_v3_and_higher(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, uint32_t buffer_len, struct mbim_conv_info* mbim_conv)
4308
0
{
4309
0
    int32_t base_offset = offset;
4310
0
    proto_tree *access_string, *user_name, *password, *snssai;
4311
4312
0
    proto_tree_add_item(tree, hf_mbim_set_connect_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4313
0
    offset += 4;
4314
0
    proto_tree_add_item(tree, hf_mbim_set_connect_activation_command, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4315
0
    offset += 4;
4316
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4317
0
        proto_tree_add_item(tree, hf_mbim_set_connect_activation_option, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4318
0
        offset += 4;
4319
0
    }
4320
0
    proto_tree_add_item(tree, hf_mbim_set_connect_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4321
0
    offset += 4;
4322
0
    proto_tree_add_item(tree, hf_mbim_set_connect_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4323
0
    offset += 4;
4324
0
    proto_tree_add_item(tree, hf_mbim_set_connect_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4325
0
    offset += 4;
4326
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4327
0
    proto_tree_add_item(tree, hf_mbim_set_connect_media_preference, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4328
0
    offset += 4;
4329
0
    access_string = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Access String");
4330
0
    mbim_dissect_tlv_ie(tvb, pinfo, access_string, &offset);
4331
0
    user_name = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "User Name");
4332
0
    mbim_dissect_tlv_ie(tvb, pinfo, user_name, &offset);
4333
0
    password = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Password");
4334
0
    mbim_dissect_tlv_ie(tvb, pinfo, password, &offset);
4335
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4336
0
        snssai = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
4337
0
        mbim_dissect_tlv_ie(tvb, pinfo, snssai, &offset);
4338
0
    }
4339
0
    mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4340
0
}
4341
4342
static void
4343
mbim_dissect_connect_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv, uint32_t buffer_len)
4344
0
{
4345
0
    int32_t base_offset = offset;
4346
0
    proto_tree *access_string, *snssai;
4347
0
    uint32_t nw_error;
4348
4349
0
    proto_tree_add_item(tree, hf_mbim_connect_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4350
0
    offset += 4;
4351
0
    proto_tree_add_item(tree, hf_mbim_connect_info_activation_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4352
0
    offset += 4;
4353
0
    proto_tree_add_item(tree, hf_mbim_connect_info_voice_call_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4354
0
    offset += 4;
4355
0
    proto_tree_add_item(tree, hf_mbim_connect_info_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4356
0
    offset += 4;
4357
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4358
0
    nw_error = tvb_get_letohl(tvb, offset);
4359
0
    if (nw_error == 0) {
4360
0
        proto_tree_add_uint_format_value(tree, hf_mbim_connect_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
4361
0
    } else {
4362
0
        proto_tree_add_uint(tree, hf_mbim_connect_info_nw_error, tvb, offset, 4, nw_error);
4363
0
    }
4364
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4365
0
        offset += 4;
4366
0
        proto_tree_add_item(tree, hf_mbim_connect_info_access_media, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4367
0
        offset += 4;
4368
0
        access_string = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Access String");
4369
0
        mbim_dissect_tlv_ie(tvb, pinfo, access_string, &offset);
4370
0
        if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4371
0
            snssai = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
4372
0
            mbim_dissect_tlv_ie(tvb, pinfo, snssai, &offset);
4373
0
        }
4374
0
        mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
4375
0
    }
4376
0
}
4377
4378
static void
4379
mbim_dissect_context(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, bool is_set)
4380
0
{
4381
0
    unsigned base_offset;
4382
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size,
4383
0
            password_offset, password_size, provider_id_offset = 0, provider_id_size = 0;
4384
0
    proto_item *it;
4385
4386
0
    base_offset = offset;
4387
0
    proto_tree_add_item(tree, hf_mbim_context_context_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4388
0
    offset += 4;
4389
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, &offset);
4390
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_access_string_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_offset);
4391
0
    offset += 4;
4392
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_access_string_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &access_string_size);
4393
0
    offset += 4;
4394
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_user_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_offset);
4395
0
    offset += 4;
4396
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_user_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &user_name_size);
4397
0
    offset += 4;
4398
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
4399
0
    offset += 4;
4400
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_context_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
4401
0
    offset += 4;
4402
0
    proto_tree_add_item(tree, hf_mbim_context_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4403
0
    offset += 4;
4404
0
    proto_tree_add_item(tree, hf_mbim_context_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4405
0
    offset += 4;
4406
0
    if (is_set) {
4407
0
        proto_tree_add_item_ret_uint(tree, hf_mbim_context_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
4408
0
        offset += 4;
4409
0
        proto_tree_add_item_ret_uint(tree, hf_mbim_context_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
4410
0
        offset += 4;
4411
0
    }
4412
0
    if (access_string_offset && access_string_size) {
4413
0
        it = proto_tree_add_item(tree, hf_mbim_context_access_string, tvb, base_offset + access_string_offset,
4414
0
                                 access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4415
0
        if (access_string_size > 200) {
4416
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4417
0
        }
4418
0
    }
4419
0
    if (user_name_offset && user_name_size) {
4420
0
        it = proto_tree_add_item(tree, hf_mbim_context_user_name, tvb, base_offset + user_name_offset,
4421
0
                                 user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4422
0
        if (user_name_size > 510) {
4423
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4424
0
        }
4425
0
    }
4426
0
    if (password_offset && password_size) {
4427
0
        it = proto_tree_add_item(tree, hf_mbim_context_password, tvb, base_offset + password_offset,
4428
0
                                 password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4429
0
        if (password_size > 510) {
4430
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4431
0
        }
4432
0
    }
4433
0
    if (provider_id_offset && provider_id_size) {
4434
0
        it = proto_tree_add_item(tree, hf_mbim_context_provider_id, tvb, base_offset + provider_id_offset,
4435
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4436
0
        if (provider_id_size > 12) {
4437
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4438
0
        }
4439
0
    }
4440
0
}
4441
4442
static void
4443
mbim_dissect_provisioned_contexts_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4444
0
{
4445
0
    proto_tree *subtree;
4446
0
    unsigned base_offset;
4447
0
    uint32_t i, elem_count;
4448
0
    wmem_array_t *pair_list;
4449
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4450
4451
0
    base_offset = offset;
4452
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_provisioned_contexts_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
4453
0
    offset += 4;
4454
0
    if (elem_count) {
4455
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4456
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provisioned Context Ref List");
4457
0
        for (i = 0; i < elem_count; i++) {
4458
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_provisioned_contexts_info_provisioned_context_offset,
4459
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4460
0
            offset += 4;
4461
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_provisioned_contexts_info_provisioned_context_size,
4462
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4463
0
            offset += 4;
4464
0
            wmem_array_append_one(pair_list, pair_list_item);
4465
0
        }
4466
0
        for (i = 0; i < elem_count; i++) {
4467
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4468
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4469
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4470
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Provisioned Context #%u", i+1);
4471
0
                mbim_dissect_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, false);
4472
0
            }
4473
0
        }
4474
0
    }
4475
0
}
4476
4477
static void
4478
mbim_dissect_ipv4_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset)
4479
0
{
4480
0
    uint32_t on_link_prefix_length;
4481
0
    proto_item *ti;
4482
4483
0
    ti = proto_tree_add_item_ret_uint(tree, hf_mbim_ipv4_element_on_link_prefix_length,
4484
0
                                      tvb, *offset, 4, ENC_LITTLE_ENDIAN, &on_link_prefix_length);
4485
0
    *offset += 4;
4486
0
    if (on_link_prefix_length > 32) {
4487
0
        expert_add_info_format(pinfo, ti, &ei_mbim_illegal_on_link_prefix_length,
4488
0
                               "Illegal On Link Prefix Length %u (max is 32)", on_link_prefix_length);
4489
0
    }
4490
0
    proto_tree_add_item(tree, hf_mbim_ipv4_element_ipv4_address, tvb, *offset, 4, ENC_BIG_ENDIAN);
4491
0
    *offset += 4;
4492
0
}
4493
4494
static void
4495
mbim_dissect_ipv6_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset)
4496
0
{
4497
0
    uint32_t on_link_prefix_length;
4498
0
    proto_item *ti;
4499
4500
0
    ti = proto_tree_add_item_ret_uint(tree, hf_mbim_ipv6_element_on_link_prefix_length, tvb,
4501
0
                                      *offset, 4, ENC_LITTLE_ENDIAN, &on_link_prefix_length);
4502
0
    *offset += 4;
4503
0
    if (on_link_prefix_length > 128) {
4504
0
        expert_add_info_format(pinfo, ti, &ei_mbim_illegal_on_link_prefix_length,
4505
0
                               "Illegal On Link Prefix Length %u (max is 128)", on_link_prefix_length);
4506
0
    }
4507
0
    proto_tree_add_item(tree, hf_mbim_ipv6_element_ipv6_address, tvb, *offset, 16, ENC_NA);
4508
0
    *offset += 16;
4509
0
}
4510
4511
static void
4512
mbim_dissect_ip_configuration_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4513
0
{
4514
0
    unsigned base_offset;
4515
0
    uint32_t i, ipv4_address_count, ipv4_address_offset, ipv6_address_count, ipv6_address_offset,
4516
0
            ipv4_gateway_offset, ipv6_gateway_offset, ipv4_dns_count, ipv4_dns_offset,
4517
0
            ipv6_dns_count, ipv6_dns_offset;
4518
4519
0
    base_offset = offset;
4520
0
    proto_tree_add_item(tree, hf_mbim_ip_configuration_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4521
0
    offset += 4;
4522
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ip_configuration_info_ipv4_configuration_available,
4523
0
                           ett_mbim_bitmap, mbim_ip_configuration_info_ipv4_configuration_available_fields, ENC_LITTLE_ENDIAN);
4524
0
    offset += 4;
4525
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ip_configuration_info_ipv6_configuration_available,
4526
0
                           ett_mbim_bitmap, mbim_ip_configuration_info_ipv6_configuration_available_fields, ENC_LITTLE_ENDIAN);
4527
0
    offset += 4;
4528
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);
4529
0
    offset += 4;
4530
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);
4531
0
    offset += 4;
4532
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);
4533
0
    offset += 4;
4534
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);
4535
0
    offset += 4;
4536
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);
4537
0
    offset += 4;
4538
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);
4539
0
    offset += 4;
4540
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);
4541
0
    offset += 4;
4542
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);
4543
0
    offset += 4;
4544
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);
4545
0
    offset += 4;
4546
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);
4547
0
    offset += 4;
4548
0
    proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_mtu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4549
0
    offset += 4;
4550
0
    proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_mtu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4551
0
    offset += 4;
4552
0
    if (ipv4_address_count && ipv4_address_offset) {
4553
0
        offset = base_offset + ipv4_address_offset;
4554
0
        for (i = 0; i < ipv4_address_count; i++) {
4555
0
            mbim_dissect_ipv4_element(tvb, pinfo, tree, &offset);
4556
0
        }
4557
0
    }
4558
0
    if (ipv6_address_count && ipv6_address_offset) {
4559
0
        offset = base_offset + ipv6_address_offset;
4560
0
        for (i = 0; i < ipv6_address_count; i++) {
4561
0
            mbim_dissect_ipv6_element(tvb, pinfo, tree, &offset);
4562
0
        }
4563
0
    }
4564
0
    if (ipv4_gateway_offset) {
4565
0
        proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_gateway,
4566
0
                            tvb, base_offset + ipv4_gateway_offset, 4, ENC_BIG_ENDIAN);
4567
0
    }
4568
0
    if (ipv6_gateway_offset) {
4569
0
        proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_gateway,
4570
0
                            tvb, base_offset + ipv6_gateway_offset, 16, ENC_NA);
4571
0
    }
4572
0
    if (ipv4_dns_count && ipv4_dns_offset) {
4573
0
        offset = base_offset + ipv4_dns_offset;
4574
0
        for (i = 0; i < ipv4_dns_count; i++) {
4575
0
            proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv4_dns,
4576
0
                                tvb, offset, 4, ENC_BIG_ENDIAN);
4577
0
            offset += 4;
4578
0
        }
4579
0
    }
4580
0
    if (ipv6_dns_count && ipv6_dns_offset) {
4581
0
        offset = base_offset + ipv6_dns_offset;
4582
0
        for (i = 0; i < ipv6_dns_count; i++) {
4583
0
            proto_tree_add_item(tree, hf_mbim_ip_configuration_info_ipv6_dns,
4584
0
                                tvb, offset, 16, ENC_NA);
4585
0
            offset += 16;
4586
0
        }
4587
0
    }
4588
0
}
4589
4590
static void
4591
mbim_dissect_device_service_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4592
0
{
4593
0
    uint8_t uuid_idx;
4594
0
    uint32_t i, cid_count, cid;
4595
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
4596
4597
0
    uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_device_service_element_device_service_id, &offset, &uuid_ext_info, true);
4598
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_service_element_dss_payload,
4599
0
                           ett_mbim_bitmap, mbim_device_service_element_dss_payload_fields, ENC_LITTLE_ENDIAN);
4600
0
    offset += 4;
4601
0
    proto_tree_add_item(tree, hf_mbim_device_service_element_max_dss_instances, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4602
0
    offset += 4;
4603
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_service_element_cid_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
4604
0
    offset += 4;
4605
0
    for (i = 0; i < cid_count; i++) {
4606
0
        cid = tvb_get_letohl(tvb, offset);
4607
0
        if (uuid_idx < UUID_MAX) {
4608
0
            if (mbim_uuid_info[uuid_idx].cid_list_ext) {
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_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"), cid);
4611
0
            } else {
4612
0
                proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4613
0
                                                 val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"), cid);
4614
0
            }
4615
0
        } else if (uuid_idx == UUID_EXT_IDX) {
4616
0
            proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4617
0
                                             val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown"), cid);
4618
0
        } else {
4619
0
            proto_tree_add_uint(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid);
4620
0
        }
4621
0
        offset += 4;
4622
0
    }
4623
0
 }
4624
4625
static void
4626
mbim_dissect_device_services_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4627
0
{
4628
0
    proto_tree *subtree;
4629
0
    unsigned base_offset;
4630
0
    uint32_t i, device_services_count;
4631
0
    wmem_array_t *pair_list;
4632
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4633
4634
0
    base_offset = offset;
4635
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);
4636
0
    offset += 4;
4637
0
    proto_tree_add_item(tree, hf_mbim_device_services_info_max_dss_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4638
0
    offset += 4;
4639
0
    if (device_services_count) {
4640
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4641
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*device_services_count, ett_mbim_pair_list, NULL, "Device Services Ref List");
4642
0
        for (i = 0; i < device_services_count; i++) {
4643
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_services_info_device_services_offset,
4644
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4645
0
            offset += 4;
4646
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_services_info_device_services_size,
4647
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4648
0
            offset += 4;
4649
0
            wmem_array_append_one(pair_list, pair_list_item);
4650
0
        }
4651
0
        for (i = 0; i < device_services_count; i++) {
4652
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4653
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4654
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4655
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Device Service Element #%u", i+1);
4656
0
                mbim_dissect_device_service_element(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4657
0
            }
4658
0
        }
4659
0
    }
4660
0
}
4661
4662
static void
4663
mbim_dissect_event_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4664
0
{
4665
0
    uint8_t uuid_idx;
4666
0
    uint32_t i, cid_count, cid;
4667
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
4668
4669
0
    uuid_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_event_entry_device_service_id, &offset, &uuid_ext_info, true);
4670
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_event_entry_cid_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
4671
0
    offset += 4;
4672
0
    for (i = 0; i < cid_count; i++) {
4673
0
        cid = tvb_get_letohl(tvb, offset);
4674
0
        if (uuid_idx < UUID_MAX) {
4675
0
            if (mbim_uuid_info[uuid_idx].cid_list_ext) {
4676
0
                proto_tree_add_uint_format_value(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid, "%s (%u)",
4677
0
                                                 val_to_str_ext_const(cid, mbim_uuid_info[uuid_idx].cid_list_ext, "Unknown"), cid);
4678
0
            } else {
4679
0
                proto_tree_add_uint_format_value(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid, "%s (%u)",
4680
0
                                                 val_to_str_const(cid, mbim_uuid_info[uuid_idx].cid_list, "Unknown"), cid);
4681
0
            }
4682
0
        } else if (uuid_idx == UUID_EXT_IDX) {
4683
0
            proto_tree_add_uint_format_value(tree, hf_mbim_device_service_element_cid, tvb, offset, 4, cid, "%s (%u)",
4684
0
                                             val_to_str_const(cid, uuid_ext_info->uuid_cid_list, "Unknown"), cid);
4685
0
        } else {
4686
0
            proto_tree_add_uint(tree, hf_mbim_event_entry_cid, tvb, offset, 4, cid);
4687
0
        }
4688
0
        offset += 4;
4689
0
    }
4690
0
 }
4691
4692
static void
4693
mbim_dissect_device_service_subscribe_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
4694
0
{
4695
0
    proto_tree *subtree;
4696
0
    unsigned base_offset;
4697
0
    uint32_t i, element_count;
4698
0
    wmem_array_t *pair_list;
4699
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4700
4701
0
    base_offset = offset;
4702
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_device_service_subscribe_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
4703
0
    offset += 4;
4704
0
    if (element_count) {
4705
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4706
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "Device Service Subscribe Ref List");
4707
0
        for (i = 0; i < element_count; i++) {
4708
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_service_subscribe_device_service_offset,
4709
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4710
0
            offset += 4;
4711
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_device_service_subscribe_device_service_size,
4712
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4713
0
            offset += 4;
4714
0
            wmem_array_append_one(pair_list, pair_list_item);
4715
0
        }
4716
0
        for (i = 0; i < element_count; i++) {
4717
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4718
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4719
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4720
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Device Service Element #%u", i+1);
4721
0
                mbim_dissect_event_entry(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
4722
0
            }
4723
0
        }
4724
0
    }
4725
0
}
4726
4727
static void
4728
mbim_dissect_packet_statistics_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4729
0
{
4730
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_discards, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4731
0
    offset += 4;
4732
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_errors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4733
0
    offset += 4;
4734
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_octets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4735
0
    offset += 8;
4736
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_in_packets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4737
0
    offset += 8;
4738
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_octets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4739
0
    offset += 8;
4740
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_packets, tvb, offset, 8, ENC_LITTLE_ENDIAN);
4741
0
    offset += 8;
4742
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_errors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4743
0
    offset += 4;
4744
0
    proto_tree_add_item(tree, hf_mbim_packet_statistics_info_out_discards, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4745
0
}
4746
4747
static void
4748
mbim_dissect_single_packet_filter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv)
4749
0
{
4750
0
    unsigned base_offset;
4751
0
    uint32_t filter_size, packet_filter_offset, packet_mask_offset;
4752
4753
0
    base_offset = offset;
4754
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_single_packet_filter_filter_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &filter_size);
4755
0
    offset += 4;
4756
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);
4757
0
    offset += 4;
4758
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);
4759
0
    offset += 4;
4760
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
4761
0
        proto_tree_add_item(tree, hf_mbim_single_packet_filter_filter_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4762
        /* offset += 4; */
4763
0
    }
4764
0
    if (filter_size) {
4765
0
        if (packet_filter_offset) {
4766
0
            proto_tree_add_item(tree, hf_mbim_single_packet_filter_packet_filter, tvb, base_offset + packet_filter_offset,
4767
0
                                filter_size, ENC_NA);
4768
0
        }
4769
0
        if (packet_mask_offset) {
4770
0
            proto_tree_add_item(tree, hf_mbim_single_packet_filter_packet_mask, tvb, base_offset + packet_mask_offset,
4771
0
                                filter_size, ENC_NA);
4772
0
        }
4773
0
    }
4774
0
}
4775
4776
static void
4777
mbim_dissect_packet_filters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv)
4778
0
{
4779
0
    proto_tree *subtree;
4780
0
    unsigned base_offset;
4781
0
    uint32_t i, packet_filters_count;
4782
0
    wmem_array_t *pair_list;
4783
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
4784
4785
0
    base_offset = offset;
4786
0
    proto_tree_add_item(tree, hf_mbim_packet_filters_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4787
0
    offset += 4;
4788
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_packet_filters_packet_filters_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &packet_filters_count);
4789
0
    offset += 4;
4790
0
    if (packet_filters_count) {
4791
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
4792
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*packet_filters_count, ett_mbim_pair_list, NULL, "Packet Filter Ref List");
4793
0
        for (i = 0; i < packet_filters_count; i++) {
4794
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_packet_filters_packet_filters_packet_filter_offset,
4795
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
4796
0
            offset += 4;
4797
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_packet_filters_packet_filters_packet_filter_size,
4798
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
4799
0
            offset += 4;
4800
0
            wmem_array_append_one(pair_list, pair_list_item);
4801
0
        }
4802
0
        for (i = 0; i < packet_filters_count; i++) {
4803
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
4804
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
4805
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
4806
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Packet Filter Element #%u", i+1);
4807
0
                mbim_dissect_single_packet_filter(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, mbim_conv);
4808
0
            }
4809
0
        }
4810
0
    }
4811
0
}
4812
4813
static void
4814
mbim_dissect_set_sms_configuration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4815
0
{
4816
0
    unsigned base_offset;
4817
0
    uint32_t sc_address_offset, sc_address_size;
4818
0
    proto_item *it;
4819
4820
0
    base_offset = offset;
4821
0
    proto_tree_add_item(tree, hf_mbim_set_sms_configuration_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4822
0
    offset += 4;
4823
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);
4824
0
    offset += 4;
4825
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);
4826
    /*offset += 4;*/
4827
0
    if (sc_address_offset && sc_address_size) {
4828
0
        it = proto_tree_add_item(tree, hf_mbim_set_sms_configuration_sc_address, tvb, base_offset + sc_address_offset,
4829
0
                                 sc_address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4830
0
        if (sc_address_size > 40) {
4831
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4832
0
        }
4833
0
    }
4834
0
}
4835
4836
static void
4837
mbim_dissect_sms_configuration_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4838
0
{
4839
0
    unsigned base_offset;
4840
0
    uint32_t sc_address_offset, sc_address_size;
4841
0
    proto_item *it;
4842
4843
0
    base_offset = offset;
4844
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_sms_storage_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4845
0
    offset += 4;
4846
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4847
0
    offset += 4;
4848
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_max_messages, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4849
0
    offset += 4;
4850
0
    proto_tree_add_item(tree, hf_mbim_sms_configuration_info_cdma_short_message_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4851
0
    offset += 4;
4852
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);
4853
0
    offset += 4;
4854
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);
4855
    /*offset += 4;*/
4856
0
    if (sc_address_offset && sc_address_size) {
4857
0
        it = proto_tree_add_item(tree, hf_mbim_sms_configuration_info_sc_address, tvb, base_offset + sc_address_offset,
4858
0
                                 sc_address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4859
0
        if (sc_address_size > 40) {
4860
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4861
0
        }
4862
0
    }
4863
0
}
4864
4865
static void
4866
mbim_dissect_sms_pdu_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
4867
                            struct mbim_conv_info *mbim_conv)
4868
0
{
4869
0
    unsigned base_offset;
4870
0
    uint32_t message_status, pdu_data_offset, pdu_data_size;
4871
0
    tvbuff_t *sms_tvb;
4872
0
    proto_item *ti;
4873
0
    proto_tree *subtree, *sc_tree;
4874
0
    uint8_t sc_address_size;
4875
4876
0
    base_offset = offset;
4877
0
    proto_tree_add_item(tree, hf_mbim_sms_pdu_record_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4878
0
    offset += 4;
4879
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_pdu_record_message_status, tvb, offset, 4, ENC_LITTLE_ENDIAN, &message_status);
4880
0
    offset += 4;
4881
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);
4882
0
    offset += 4;
4883
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);
4884
    /*offset += 4;*/
4885
0
    if (pdu_data_offset && pdu_data_size) {
4886
0
        if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM)) ||
4887
0
             (mbim_sms_pdu_format == SMS_PDU_3GPP)) && gsm_sms_handle) {
4888
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_pdu_record_pdu_data, tvb, base_offset + pdu_data_offset,
4889
0
                                     pdu_data_size, ENC_NA);
4890
0
            if (pdu_data_size > 183) {
4891
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
4892
0
            }
4893
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
4894
0
            sc_address_size = tvb_get_uint8(tvb, base_offset + pdu_data_offset);
4895
0
            sc_tree = proto_tree_add_subtree(subtree, tvb, base_offset + pdu_data_offset, 1 + sc_address_size,
4896
0
                                     ett_mbim_sc_address, NULL, "Service Center Address");
4897
0
            proto_tree_add_uint(sc_tree, hf_mbim_sms_pdu_record_pdu_data_sc_address_size, tvb,
4898
0
                                base_offset + pdu_data_offset, 1, sc_address_size);
4899
0
            if (sc_address_size) {
4900
0
                de_cld_party_bcd_num(tvb, sc_tree, pinfo, base_offset + pdu_data_offset + 1,
4901
0
                                     sc_address_size, NULL, 0);
4902
0
            }
4903
0
            if (pdu_data_size > (uint32_t)(sc_address_size + 1)) {
4904
0
                pdu_data_size -= sc_address_size + 1;
4905
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset + 1 + sc_address_size,
4906
0
                                         pdu_data_size);
4907
0
                pinfo->p2p_dir = (message_status < 2) ? P2P_DIR_SENT : P2P_DIR_RECV;
4908
0
                call_dissector(gsm_sms_handle, sms_tvb, pinfo, subtree);
4909
0
            }
4910
0
        } else {
4911
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_pdu_record_pdu_data, tvb, base_offset + pdu_data_offset,
4912
0
                                     pdu_data_size, ENC_NA);
4913
0
            if (pdu_data_size > 255) {
4914
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
4915
0
            }
4916
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
4917
0
            if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_CDMA)) ||
4918
0
                 (mbim_sms_pdu_format == SMS_PDU_3GPP2)) && cdma_sms_handle) {
4919
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset, pdu_data_size);
4920
0
                call_dissector(cdma_sms_handle, sms_tvb, pinfo, subtree);
4921
0
            }
4922
0
        }
4923
0
    }
4924
0
}
4925
4926
static void mbim_decode_sms_cdma_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const int hfindex, unsigned offset,
4927
                                      uint32_t encoding_id, uint32_t size_in_bytes, uint32_t size_in_chars)
4928
0
{
4929
0
    unsigned char *src, *dest;
4930
4931
0
    switch (encoding_id) {
4932
0
        case MBIM_ENCODING_7BIT_ASCII:
4933
0
            proto_tree_add_ascii_7bits_item(tree, hfindex, tvb, (offset << 3), size_in_chars);
4934
0
            break;
4935
0
        case MBIM_ENCODING_IA5:
4936
0
            src = (unsigned char*)tvb_get_ascii_7bits_string(pinfo->pool, tvb, (offset << 3), size_in_chars);
4937
0
            dest = (unsigned char*)wmem_alloc(pinfo->pool, (const size_t)size_in_chars + 1);
4938
0
            IA5_7BIT_decode(dest, src, size_in_chars);
4939
0
            proto_tree_add_string(tree, hfindex, tvb, offset, size_in_bytes, (const char*)dest);
4940
0
            break;
4941
0
        case MBIM_ENCODING_UNICODE:
4942
0
            proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_UCS_2|ENC_BIG_ENDIAN);
4943
0
            break;
4944
0
        case MBIM_ENCODING_LATIN_HEBREW:
4945
0
            proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_ISO_8859_8|ENC_NA);
4946
0
            break;
4947
0
        case MBIM_ENCODING_LATIN:
4948
0
            proto_tree_add_item(tree, hfindex, tvb, offset, size_in_bytes, ENC_ISO_8859_1|ENC_NA);
4949
0
            break;
4950
0
        case MBIM_ENCODING_GSM_7BIT:
4951
0
            proto_tree_add_ts_23_038_7bits_packed_item(tree, hfindex, tvb, (offset << 3), size_in_chars);
4952
0
            break;
4953
0
        default:
4954
0
            break;
4955
0
    }
4956
0
}
4957
4958
static void
4959
mbim_dissect_sms_cdma_record(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
4960
0
{
4961
0
    unsigned base_offset;
4962
0
    uint32_t address_offset, address_size, timestamp_offset, timestamp_size, encoding_id,
4963
0
            encoded_message_offset, size_in_bytes, size_in_chars;
4964
0
    proto_item *ti;
4965
0
    proto_tree *subtree;
4966
0
    proto_item *it;
4967
4968
0
    base_offset = offset;
4969
0
    proto_tree_add_item(tree, hf_mbim_sms_cdma_record_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4970
0
    offset += 4;
4971
0
    proto_tree_add_item(tree, hf_mbim_sms_cdma_record_message_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4972
0
    offset += 4;
4973
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_offset);
4974
0
    offset += 4;
4975
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_size);
4976
0
    offset += 4;
4977
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_timestamp_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &timestamp_offset);
4978
0
    offset += 4;
4979
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_timestamp_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &timestamp_size);
4980
0
    offset += 4;
4981
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_encoding_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &encoding_id);
4982
0
    offset += 4;
4983
0
    proto_tree_add_item(tree, hf_mbim_sms_cdma_record_language_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4984
0
    offset += 4;
4985
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_cdma_record_encoded_message_offset, tvb, offset, 4,
4986
0
                                 ENC_LITTLE_ENDIAN, &encoded_message_offset);
4987
0
    offset += 4;
4988
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);
4989
0
    offset += 4;
4990
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);
4991
    /*offset += 4;*/
4992
0
    if (address_offset && address_size) {
4993
0
        it = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_address, tvb, base_offset + address_offset,
4994
0
                                 address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
4995
0
        if (address_size > 40) {
4996
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
4997
0
        }
4998
0
    }
4999
0
    if (timestamp_offset && timestamp_size) {
5000
0
        it = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_timestamp, tvb, base_offset + timestamp_offset,
5001
0
                                 timestamp_size, ENC_ASCII);
5002
0
        if (timestamp_size > 21) {
5003
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5004
0
        }
5005
0
    }
5006
0
    if (encoded_message_offset && size_in_bytes) {
5007
0
        ti = proto_tree_add_item(tree, hf_mbim_sms_cdma_record_encoded_message, tvb, base_offset + encoded_message_offset,
5008
0
                                 size_in_bytes, ENC_NA);
5009
0
        if (size_in_bytes > 160) {
5010
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5011
0
        }
5012
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5013
0
        mbim_decode_sms_cdma_text(tvb, pinfo, subtree, hf_mbim_sms_cdma_record_encoded_message_text,
5014
0
                                  (base_offset + encoded_message_offset), encoding_id, size_in_bytes, size_in_chars);
5015
0
    }
5016
0
}
5017
5018
static void
5019
mbim_dissect_sms_read_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5020
0
{
5021
0
    proto_tree_add_item(tree, hf_mbim_sms_read_req_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5022
0
    offset += 4;
5023
0
    proto_tree_add_item(tree, hf_mbim_sms_read_req_flag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5024
0
    offset += 4;
5025
0
    proto_tree_add_item(tree, hf_mbim_sms_read_req_message_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5026
0
}
5027
5028
static void
5029
mbim_dissect_sms_read_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
5030
                           struct mbim_conv_info *mbim_conv)
5031
0
{
5032
0
    proto_tree *subtree;
5033
0
    unsigned base_offset;
5034
0
    uint32_t i, format, element_count;
5035
0
    wmem_array_t *pair_list;
5036
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5037
5038
0
    base_offset = offset;
5039
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_read_info_format, tvb, offset, 4, ENC_LITTLE_ENDIAN, &format);
5040
0
    offset += 4;
5041
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_read_info_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
5042
0
    offset += 4;
5043
0
    if (element_count) {
5044
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5045
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "SMS Ref List");
5046
0
        for (i = 0; i < element_count; i++) {
5047
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_sms_read_info_sms_offset,
5048
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5049
0
            offset += 4;
5050
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_sms_read_info_sms_size,
5051
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5052
0
            offset += 4;
5053
0
            wmem_array_append_one(pair_list, pair_list_item);
5054
0
        }
5055
0
        for (i = 0; i < element_count; i++) {
5056
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5057
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5058
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
5059
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "SMS Element #%u", i+1);
5060
0
                if (format == MBIM_SMS_FORMAT_PDU) {
5061
0
                    mbim_dissect_sms_pdu_record(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, mbim_conv);
5062
0
                } else if (format == MBIM_SMS_FORMAT_CDMA) {
5063
0
                    mbim_dissect_sms_cdma_record(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5064
0
                } else {
5065
0
                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unknown_sms_format, tvb,
5066
0
                                          base_offset + p_pair_list_item->offset, p_pair_list_item->size);
5067
0
                }
5068
0
            }
5069
0
        }
5070
0
    }
5071
0
}
5072
5073
static void
5074
mbim_dissect_sms_send_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
5075
                          struct mbim_conv_info *mbim_conv)
5076
0
{
5077
0
    unsigned base_offset;
5078
0
    uint32_t pdu_data_offset, pdu_data_size;
5079
0
    tvbuff_t *sms_tvb;
5080
0
    proto_item *ti;
5081
0
    proto_tree *subtree, *sc_tree;
5082
0
    uint8_t sc_address_size;
5083
5084
0
    base_offset = offset;
5085
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);
5086
0
    offset += 4;
5087
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);
5088
    /*offset += 4;*/
5089
0
    if (pdu_data_offset && pdu_data_size) {
5090
0
        if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM)) ||
5091
0
             (mbim_sms_pdu_format == SMS_PDU_3GPP)) && gsm_sms_handle) {
5092
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_send_pdu_pdu_data, tvb, base_offset + pdu_data_offset,
5093
0
                                     pdu_data_size, ENC_NA);
5094
0
            if (pdu_data_size > 183) {
5095
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5096
0
            }
5097
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5098
0
            sc_address_size = tvb_get_uint8(tvb, base_offset + pdu_data_offset);
5099
0
            sc_tree = proto_tree_add_subtree(subtree, tvb, base_offset + pdu_data_offset, 1 + sc_address_size,
5100
0
                                     ett_mbim_sc_address, NULL, "Service Center Address");
5101
0
            proto_tree_add_uint(sc_tree, hf_mbim_sms_send_pdu_pdu_data_sc_address_size, tvb,
5102
0
                                base_offset + pdu_data_offset, 1, sc_address_size);
5103
0
            if (sc_address_size) {
5104
0
                de_cld_party_bcd_num(tvb, sc_tree, pinfo, base_offset + pdu_data_offset + 1,
5105
0
                                     sc_address_size, NULL, 0);
5106
0
            }
5107
0
            if (pdu_data_size > (uint32_t)(sc_address_size + 1)) {
5108
0
                pdu_data_size -= sc_address_size + 1;
5109
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset + 1 + sc_address_size,
5110
0
                                         pdu_data_size);
5111
0
                pinfo->p2p_dir = P2P_DIR_RECV;
5112
0
                call_dissector(gsm_sms_handle, sms_tvb, pinfo, subtree);
5113
0
            }
5114
0
        } else {
5115
0
            ti = proto_tree_add_item(tree, hf_mbim_sms_send_pdu_pdu_data, tvb, base_offset + pdu_data_offset,
5116
0
                                     pdu_data_size, ENC_NA);
5117
0
            if (pdu_data_size > 255) {
5118
0
                expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5119
0
            }
5120
0
            subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5121
0
            if ((((mbim_sms_pdu_format == SMS_PDU_AUTOMATIC) && (mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_CDMA)) ||
5122
0
                 (mbim_sms_pdu_format == SMS_PDU_3GPP2)) && cdma_sms_handle) {
5123
0
                sms_tvb = tvb_new_subset_length(tvb, base_offset + pdu_data_offset, pdu_data_size);
5124
0
                call_dissector(cdma_sms_handle, sms_tvb, pinfo, subtree);
5125
0
            }
5126
0
        }
5127
0
    }
5128
0
}
5129
5130
static void
5131
mbim_dissect_sms_send_cdma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5132
0
{
5133
0
    unsigned base_offset;
5134
0
    uint32_t encoding_id, address_offset, address_size, encoded_message_offset,
5135
0
            size_in_bytes, size_in_chars;
5136
0
    proto_item *ti;
5137
0
    proto_tree *subtree;
5138
5139
0
    base_offset = offset;
5140
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_encoding_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &encoding_id);
5141
0
    offset += 4;
5142
0
    proto_tree_add_item(tree, hf_mbim_sms_send_cdma_language_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5143
0
    offset += 4;
5144
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_address_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_offset);
5145
0
    offset += 4;
5146
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_address_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &address_size);
5147
0
    offset += 4;
5148
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_sms_send_cdma_encoded_message_offset, tvb, offset, 4,
5149
0
                                 ENC_LITTLE_ENDIAN, &encoded_message_offset);
5150
0
    offset += 4;
5151
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);
5152
0
    offset += 4;
5153
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);
5154
    /*offset += 4;*/
5155
0
    if (address_offset && address_size) {
5156
0
        ti = proto_tree_add_item(tree, hf_mbim_sms_send_cdma_address, tvb, base_offset + address_offset,
5157
0
                                 address_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5158
0
        if (address_size > 40) {
5159
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_string);
5160
0
        }
5161
0
    }
5162
0
    if (encoded_message_offset && size_in_bytes) {
5163
0
        ti = proto_tree_add_item(tree, hf_mbim_sms_send_cdma_encoded_message, tvb, base_offset + encoded_message_offset,
5164
0
                                 size_in_bytes, ENC_NA);
5165
0
        if (size_in_bytes > 160) {
5166
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5167
0
        }
5168
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5169
0
        mbim_decode_sms_cdma_text(tvb, pinfo, subtree, hf_mbim_sms_send_cdma_encoded_message_text,
5170
0
                                  (base_offset + encoded_message_offset), encoding_id, size_in_bytes, size_in_chars);
5171
0
    }
5172
0
}
5173
5174
static void
5175
mbim_dissect_set_sms_send(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset,
5176
                          struct mbim_conv_info *mbim_conv)
5177
0
{
5178
0
    uint32_t format;
5179
5180
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_sms_send_format, tvb, offset, 4, ENC_LITTLE_ENDIAN, &format);
5181
0
    offset += 4;
5182
0
    if (format == MBIM_SMS_FORMAT_PDU) {
5183
0
        mbim_dissect_sms_send_pdu(tvb, pinfo, tree, offset, mbim_conv);
5184
0
    } else if (format == MBIM_SMS_FORMAT_CDMA) {
5185
0
        mbim_dissect_sms_send_cdma(tvb, pinfo, tree, offset);
5186
0
    } else {
5187
0
        proto_tree_add_expert_remaining(tree, pinfo, &ei_mbim_unknown_sms_format, tvb, offset);
5188
0
    }
5189
0
}
5190
5191
static void
5192
mbim_dissect_set_ussd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5193
0
{
5194
0
    proto_item *ti;
5195
0
    proto_tree *subtree;
5196
0
    unsigned base_offset;
5197
0
    uint32_t ussd_payload_offset, ussd_payload_length;
5198
0
    uint8_t encoding;
5199
0
    tvbuff_t *ussd_tvb;
5200
5201
0
    base_offset = offset;
5202
0
    proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5203
0
    offset += 4;
5204
0
    ti = proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_data_coding_scheme, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5205
0
    subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5206
0
    encoding = dissect_cbs_data_coding_scheme(tvb, pinfo, subtree, offset);
5207
0
    offset += 4;
5208
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_ussd_ussd_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_offset);
5209
0
    offset += 4;
5210
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_ussd_ussd_payload_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_length);
5211
    /*offset += 4;*/
5212
0
    if (ussd_payload_offset && ussd_payload_length) {
5213
0
        ti = proto_tree_add_item(tree, hf_mbim_set_ussd_ussd_payload, tvb, base_offset + ussd_payload_offset,
5214
0
                                 ussd_payload_length, ENC_NA);
5215
0
        if (ussd_payload_length > 160) {
5216
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5217
0
        }
5218
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5219
0
        ussd_tvb = tvb_new_subset_length(tvb, base_offset + ussd_payload_offset, ussd_payload_length);
5220
0
        switch (encoding) {
5221
0
            case SMS_ENCODING_7BIT:
5222
0
            case SMS_ENCODING_7BIT_LANG:
5223
0
                proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5224
0
                                    ussd_tvb, 0, ussd_payload_length, ENC_3GPP_TS_23_038_7BITS);
5225
0
                break;
5226
0
            case SMS_ENCODING_8BIT:
5227
                /* XXX - ASCII, or some extended ASCII? */
5228
0
                proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5229
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_ASCII);
5230
0
                break;
5231
0
            case SMS_ENCODING_UCS2:
5232
0
            case SMS_ENCODING_UCS2_LANG:
5233
0
                proto_tree_add_item(subtree, hf_mbim_set_ussd_ussd_payload_text,
5234
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_UCS_2|ENC_BIG_ENDIAN);
5235
0
                break;
5236
0
            default:
5237
0
                break;
5238
0
        }
5239
0
    }
5240
0
}
5241
5242
static void
5243
mbim_dissect_ussd_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5244
0
{
5245
0
    proto_item *ti;
5246
0
    proto_tree *subtree;
5247
0
    unsigned base_offset;
5248
0
    uint32_t ussd_payload_offset, ussd_payload_length;
5249
0
    uint8_t encoding;
5250
0
    tvbuff_t *ussd_tvb;
5251
5252
0
    base_offset = offset;
5253
0
    proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_response, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5254
0
    offset += 4;
5255
0
    proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_session_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5256
0
    offset += 4;
5257
0
    ti = proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_data_coding_scheme, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5258
0
    subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5259
0
    encoding = dissect_cbs_data_coding_scheme(tvb, pinfo, subtree, offset);
5260
0
    offset += 4;
5261
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ussd_info_ussd_payload_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_offset);
5262
0
    offset += 4;
5263
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ussd_info_ussd_payload_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &ussd_payload_length);
5264
    /*offset += 4;*/
5265
0
    if (ussd_payload_offset && ussd_payload_length) {
5266
0
        ti = proto_tree_add_item(tree, hf_mbim_ussd_info_ussd_payload, tvb, base_offset + ussd_payload_offset,
5267
0
                                 ussd_payload_length, ENC_NA);
5268
0
        if (ussd_payload_length > 160) {
5269
0
            expert_add_info(pinfo, ti, &ei_mbim_oversized_pdu);
5270
0
        }
5271
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5272
0
        ussd_tvb = tvb_new_subset_length(tvb, base_offset + ussd_payload_offset, ussd_payload_length);
5273
0
        switch (encoding) {
5274
0
            case SMS_ENCODING_7BIT:
5275
0
            case SMS_ENCODING_7BIT_LANG:
5276
0
                proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5277
0
                                    ussd_tvb, 0, ussd_payload_length, ENC_3GPP_TS_23_038_7BITS);
5278
0
                break;
5279
0
            case SMS_ENCODING_8BIT:
5280
                /* XXX - ASCII, or some extended ASCII? */
5281
0
                proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5282
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_ASCII);
5283
0
                break;
5284
0
            case SMS_ENCODING_UCS2:
5285
0
            case SMS_ENCODING_UCS2_LANG:
5286
0
                proto_tree_add_item(subtree, hf_mbim_ussd_info_ussd_payload_text,
5287
0
                                    ussd_tvb , 0, ussd_payload_length, ENC_UCS_2|ENC_BIG_ENDIAN);
5288
0
                break;
5289
0
            default:
5290
0
                break;
5291
0
        }
5292
0
    }
5293
0
}
5294
5295
static void
5296
mbim_dissect_phonebook_configuration_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5297
0
{
5298
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_phonebook_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5299
0
    offset += 4;
5300
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_total_nb_of_entries, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5301
0
    offset += 4;
5302
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_used_entries, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5303
0
    offset += 4;
5304
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_max_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5305
0
    offset += 4;
5306
0
    proto_tree_add_item(tree, hf_mbim_phonebook_configuration_info_max_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5307
0
}
5308
5309
static void
5310
mbim_dissect_phonebook_entry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5311
0
{
5312
0
    unsigned base_offset;
5313
0
    uint32_t number_offset, number_length, name_offset, name_length;
5314
5315
0
    base_offset = offset;
5316
0
    proto_tree_add_item(tree, hf_mbim_phonebook_entry_entry_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5317
0
    offset += 4;
5318
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_number_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_offset);
5319
0
    offset += 4;
5320
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_length);
5321
0
    offset += 4;
5322
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_offset);
5323
0
    offset += 4;
5324
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_entry_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_length);
5325
    /*offset += 4;*/
5326
0
    if (number_offset && number_length) {
5327
0
        proto_tree_add_item(tree, hf_mbim_phonebook_entry_number, tvb, base_offset + number_offset,
5328
0
                            number_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5329
0
    }
5330
0
    if (name_offset && name_length) {
5331
0
        proto_tree_add_item(tree, hf_mbim_phonebook_entry_name, tvb, base_offset + name_offset,
5332
0
                            name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5333
0
    }
5334
0
}
5335
5336
static void
5337
mbim_dissect_phonebook_read_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5338
0
{
5339
0
    proto_tree *subtree;
5340
0
    unsigned base_offset;
5341
0
    uint32_t i, element_count;
5342
0
    wmem_array_t *pair_list;
5343
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5344
5345
0
    base_offset = offset;
5346
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_phonebook_read_info_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &element_count);
5347
0
    offset += 4;
5348
0
    if (element_count) {
5349
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5350
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*element_count, ett_mbim_pair_list, NULL, "Phonebook Ref List");
5351
0
        for (i = 0; i < element_count; i++) {
5352
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_phonebook_read_info_phonebook_offset,
5353
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5354
0
            offset += 4;
5355
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_phonebook_read_info_phonebook_size,
5356
0
                                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5357
0
            offset += 4;
5358
0
            wmem_array_append_one(pair_list, pair_list_item);
5359
0
        }
5360
0
        for (i = 0; i < element_count; i++) {
5361
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5362
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5363
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset,
5364
0
                                         p_pair_list_item->size, ett_mbim_pair_list, NULL, "Phonebook Element #%u", i+1);
5365
0
                mbim_dissect_phonebook_entry(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5366
0
            }
5367
0
        }
5368
0
    }
5369
0
}
5370
5371
static void
5372
mbim_dissect_set_phonebook_write(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5373
0
{
5374
0
    unsigned base_offset;
5375
0
    uint32_t number_offset, number_length, name_offset, name_length;
5376
5377
0
    base_offset = offset;
5378
0
    proto_tree_add_item(tree, hf_mbim_set_phonebook_write_save_flag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5379
0
    offset += 4;
5380
0
    proto_tree_add_item(tree, hf_mbim_set_phonebook_write_save_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5381
0
    offset += 4;
5382
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_number_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_offset);
5383
0
    offset += 4;
5384
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_number_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &number_length);
5385
0
    offset += 4;
5386
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_offset);
5387
0
    offset += 4;
5388
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_phonebook_write_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &name_length);
5389
    /*offset += 4;*/
5390
0
    if (number_offset && number_length) {
5391
0
        proto_tree_add_item(tree, hf_mbim_set_phonebook_write_number, tvb, base_offset + number_offset,
5392
0
                            number_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5393
0
    }
5394
0
    if (name_offset && name_length) {
5395
0
        proto_tree_add_item(tree, hf_mbim_set_phonebook_write_name, tvb, base_offset + name_offset,
5396
0
                            name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5397
0
    }
5398
0
}
5399
5400
static void
5401
mbim_dissect_set_stk_pac(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5402
0
{
5403
0
    proto_item *ti;
5404
0
    proto_tree *subtree;
5405
5406
0
    ti = proto_tree_add_item(tree, hf_mbim_set_stk_pac_pac_host_control, tvb, offset, 32, ENC_NA);
5407
0
    subtree = proto_item_add_subtree(ti, ett_mbim_pac);
5408
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_refresh, tvb, offset, 1, ENC_NA);
5409
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_more_time, tvb, offset, 1, ENC_NA);
5410
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_poll_interval, tvb, offset, 1, ENC_NA);
5411
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_polling_off, tvb, offset, 1, ENC_NA);
5412
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list, tvb, offset, 1, ENC_NA);
5413
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_call, tvb, offset+1, 1, ENC_NA);
5414
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_ss, tvb, offset+1, 1, ENC_NA);
5415
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_ussd, tvb, offset+1, 1, ENC_NA);
5416
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_short_msg, tvb, offset+1, 1, ENC_NA);
5417
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_dtmf, tvb, offset+1, 1, ENC_NA);
5418
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_launch_browser, tvb, offset+1, 1, ENC_NA);
5419
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_geo_loc_req, tvb, offset+2, 1, ENC_NA);
5420
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_play_tone, tvb, offset+2, 1, ENC_NA);
5421
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_display_text, tvb, offset+2, 1, ENC_NA);
5422
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_inkey, tvb, offset+2, 1, ENC_NA);
5423
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_input, tvb, offset+2, 1, ENC_NA);
5424
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_select_item, tvb, offset+3, 1, ENC_NA);
5425
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_up_menu, tvb, offset+3, 1, ENC_NA);
5426
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_prov_local_info, tvb, offset+3, 1, ENC_NA);
5427
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_timer_management, tvb, offset+3, 1, ENC_NA);
5428
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);
5429
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu, tvb, offset+3, 1, ENC_NA);
5430
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_power_on_card, tvb, offset+3, 1, ENC_NA);
5431
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_power_off_card, tvb, offset+4, 1, ENC_NA);
5432
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_reader_status, tvb, offset+4, 1, ENC_NA);
5433
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_run_at_cmd, tvb, offset+4, 1, ENC_NA);
5434
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_lang_notif, tvb, offset+4, 1, ENC_NA);
5435
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_open_channel, tvb, offset+5, 1, ENC_NA);
5436
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_close_channel, tvb, offset+5, 1, ENC_NA);
5437
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_receive_data, tvb, offset+5, 1, ENC_NA);
5438
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_send_data, tvb, offset+5, 1, ENC_NA);
5439
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_channel_status, tvb, offset+5, 1, ENC_NA);
5440
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_service_search, tvb, offset+5, 1, ENC_NA);
5441
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_service_info, tvb, offset+5, 1, ENC_NA);
5442
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_declare_service, tvb, offset+5, 1, ENC_NA);
5443
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_set_frames, tvb, offset+6, 1, ENC_NA);
5444
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_get_frames_status, tvb, offset+6, 1, ENC_NA);
5445
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5446
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5447
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg, tvb, offset+7, 1, ENC_NA);
5448
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_activate, tvb, offset+8, 1, ENC_NA);
5449
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed, tvb, offset+8, 1, ENC_NA);
5450
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_cmd_container, tvb, offset+9, 1, ENC_NA);
5451
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl, tvb, offset+9, 1, ENC_NA);
5452
0
    proto_tree_add_item(subtree, hf_mbim_set_stk_pac_pac_host_control_end_proact_session, tvb, offset+10, 1, ENC_NA);
5453
0
}
5454
5455
static void
5456
mbim_dissect_stk_pac_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5457
0
{
5458
0
    proto_item *ti;
5459
0
    proto_tree *subtree;
5460
5461
0
    ti = proto_tree_add_item(tree, hf_mbim_stk_pac_info_pac_support, tvb, offset, 256, ENC_NA);
5462
0
    subtree = proto_item_add_subtree(ti, ett_mbim_pac);
5463
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_refresh, tvb, offset+1, 1, ENC_NA);
5464
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_more_time, tvb, offset+2, 1, ENC_NA);
5465
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_poll_interval, tvb, offset+3, 1, ENC_NA);
5466
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_polling_off, tvb, offset+4, 1, ENC_NA);
5467
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_evt_list, tvb, offset+5, 1, ENC_NA);
5468
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_call, tvb, offset+10, 1, ENC_NA);
5469
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_ss, tvb, offset+11, 1, ENC_NA);
5470
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_ussd, tvb, offset+12, 1, ENC_NA);
5471
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_short_msg, tvb, offset+13, 1, ENC_NA);
5472
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_dtmf, tvb, offset+14, 1, ENC_NA);
5473
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_launch_browser, tvb, offset+15, 1, ENC_NA);
5474
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_geo_loc_req, tvb, offset+16, 1, ENC_NA);
5475
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_play_tone, tvb, offset+20, 1, ENC_NA);
5476
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_display_text, tvb, offset+21, 1, ENC_NA);
5477
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_inkey, tvb, offset+22, 1, ENC_NA);
5478
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_input, tvb, offset+23, 1, ENC_NA);
5479
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_select_item, tvb, offset+24, 1, ENC_NA);
5480
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_menu, tvb, offset+25, 1, ENC_NA);
5481
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_prov_local_info, tvb, offset+26, 1, ENC_NA);
5482
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_timer_management, tvb, offset+27, 1, ENC_NA);
5483
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text, tvb, offset+28, 1, ENC_NA);
5484
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_perform_card_apdu, tvb, offset+30, 1, ENC_NA);
5485
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_power_on_card, tvb, offset+31, 1, ENC_NA);
5486
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_power_off_card, tvb, offset+32, 1, ENC_NA);
5487
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_reader_status, tvb, offset+33, 1, ENC_NA);
5488
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_run_at_cmd, tvb, offset+34, 1, ENC_NA);
5489
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_lang_notif, tvb, offset+35, 1, ENC_NA);
5490
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_open_channel, tvb, offset+40, 1, ENC_NA);
5491
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_close_channel, tvb, offset+41, 1, ENC_NA);
5492
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_receive_data, tvb, offset+42, 1, ENC_NA);
5493
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_send_data, tvb, offset+43, 1, ENC_NA);
5494
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_channel_status, tvb, offset+44, 1, ENC_NA);
5495
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_service_search, tvb, offset+45, 1, ENC_NA);
5496
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_service_info, tvb, offset+46, 1, ENC_NA);
5497
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_declare_service, tvb, offset+47, 1, ENC_NA);
5498
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_set_frames, tvb, offset+50, 1, ENC_NA);
5499
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_get_frames_status, tvb, offset+51, 1, ENC_NA);
5500
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg, tvb, offset+60, 1, ENC_NA);
5501
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg, tvb, offset+61, 1, ENC_NA);
5502
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_display_multimedia_msg, tvb, offset+62, 1, ENC_NA);
5503
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_activate, tvb, offset+70, 1, ENC_NA);
5504
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_contactless_state_changed, tvb, offset+71, 1, ENC_NA);
5505
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_cmd_container, tvb, offset+72, 1, ENC_NA);
5506
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl, tvb, offset+73, 1, ENC_NA);
5507
0
    proto_tree_add_item(subtree, hf_mbim_stk_pac_info_pac_support_end_proact_session, tvb, offset+81, 1, ENC_NA);
5508
0
}
5509
5510
static void
5511
mbim_dissect_set_stk_terminal_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5512
0
{
5513
0
    tvbuff_t *pac_tvb;
5514
0
    uint32_t response_length;
5515
0
    proto_item *ti;
5516
0
    proto_tree *subtree;
5517
5518
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_set_stk_terminal_response_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
5519
0
    offset += 4;
5520
0
    ti = proto_tree_add_item(tree, hf_mbim_set_stk_terminal_response_data_buffer, tvb, offset, response_length, ENC_NA);
5521
0
    if (etsi_cat_handle) {
5522
0
        subtree = proto_item_add_subtree(ti, ett_mbim_buffer);
5523
0
        pac_tvb = tvb_new_subset_length(tvb, offset, response_length);
5524
0
        call_dissector(etsi_cat_handle, pac_tvb, pinfo, subtree);
5525
0
    }
5526
0
}
5527
5528
static void
5529
mbim_dissect_stk_terminal_response_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5530
0
{
5531
0
    unsigned base_offset;
5532
0
    uint32_t result_data_string_offset, result_data_string_length;
5533
5534
0
    base_offset = offset;
5535
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_stk_terminal_response_info_result_data_string_offset,
5536
0
                                 tvb, offset, 4, ENC_LITTLE_ENDIAN, &result_data_string_offset);
5537
0
    offset += 4;
5538
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_stk_terminal_response_info_result_data_string_length,
5539
0
                                 tvb, offset, 4, ENC_LITTLE_ENDIAN, &result_data_string_length);
5540
0
    offset += 4;
5541
0
    proto_tree_add_item(tree, hf_mbim_stk_terminal_response_info_status_word, tvb, offset,
5542
0
                        4, ENC_LITTLE_ENDIAN);
5543
0
    if (result_data_string_offset && result_data_string_length) {
5544
0
        proto_tree_add_item(tree, hf_mbim_stk_terminal_response_info_result_data_string, tvb,
5545
0
                            base_offset + result_data_string_offset, result_data_string_length, ENC_NA);
5546
0
    }
5547
0
}
5548
5549
static void
5550
mbim_dissect_aka_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5551
0
{
5552
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_req_rand, tvb, offset, 16, ENC_NA);
5553
0
    offset += 16;
5554
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_req_autn, tvb, offset, 16, ENC_NA);
5555
0
}
5556
5557
static void
5558
mbim_dissect_aka_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5559
0
{
5560
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_res, tvb, offset, 16, ENC_NA);
5561
0
    offset += 16;
5562
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_res_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5563
0
    offset += 4;
5564
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_ik, tvb, offset, 16, ENC_NA);
5565
0
    offset += 16;
5566
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_ck, tvb, offset, 16, ENC_NA);
5567
0
    offset += 16;
5568
0
    proto_tree_add_item(tree, hf_mbim_aka_auth_info_auts, tvb, offset, 14, ENC_NA);
5569
0
}
5570
5571
static void
5572
mbim_dissect_akap_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5573
0
{
5574
0
    unsigned base_offset;
5575
0
    uint32_t network_name_offset, network_name_length;
5576
5577
0
    base_offset = offset;
5578
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_req_rand, tvb, offset, 16, ENC_NA);
5579
0
    offset += 16;
5580
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_req_autn, tvb, offset, 16, ENC_NA);
5581
0
    offset += 16;
5582
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);
5583
0
    offset += 4;
5584
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);
5585
    /*offset += 4;*/
5586
0
    if (network_name_offset && network_name_length) {
5587
0
        proto_tree_add_item(tree, hf_mbim_akap_auth_req_network_name, tvb, base_offset + network_name_offset,
5588
0
                            network_name_length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5589
0
    }
5590
0
}
5591
5592
static void
5593
mbim_dissect_akap_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5594
0
{
5595
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_res, tvb, offset, 16, ENC_NA);
5596
0
    offset += 16;
5597
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_res_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5598
0
    offset += 4;
5599
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_ik, tvb, offset, 16, ENC_NA);
5600
0
    offset += 16;
5601
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_ck, tvb, offset, 16, ENC_NA);
5602
0
    offset += 16;
5603
0
    proto_tree_add_item(tree, hf_mbim_akap_auth_info_auts, tvb, offset, 14, ENC_NA);
5604
0
}
5605
5606
static void
5607
mbim_dissect_sim_auth_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5608
0
{
5609
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand1, tvb, offset, 16, ENC_NA);
5610
0
    offset += 16;
5611
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand2, tvb, offset, 16, ENC_NA);
5612
0
    offset += 16;
5613
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_rand3, tvb, offset, 16, ENC_NA);
5614
0
    offset += 16;
5615
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_req_n, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5616
0
}
5617
5618
static void
5619
mbim_dissect_sim_auth_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5620
0
{
5621
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5622
0
    offset += 4;
5623
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc1, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5624
0
    offset += 8;
5625
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5626
0
    offset += 4;
5627
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc2, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5628
0
    offset += 8;
5629
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_sres3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5630
0
    offset += 4;
5631
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_kc3, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5632
0
    offset += 8;
5633
0
    proto_tree_add_item(tree, hf_mbim_sim_auth_info_n, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5634
0
}
5635
5636
static void
5637
mbim_dissect_set_dss_connect(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5638
0
{
5639
0
    uint32_t dss_session_id;
5640
0
    struct mbim_uuid_ext *uuid_ext_info = NULL;
5641
5642
0
    mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_set_dss_connect_device_service_id, &offset, &uuid_ext_info, true);
5643
0
    dss_session_id = tvb_get_letohl(tvb, offset);
5644
0
    dissector_delete_uint("mbim.dss_session_id", dss_session_id, NULL);
5645
0
    if ((dss_session_id <= 255) && uuid_ext_info && uuid_ext_info->dss_handle) {
5646
0
        dissector_add_uint("mbim.dss_session_id", dss_session_id, uuid_ext_info->dss_handle);
5647
0
    }
5648
0
    proto_tree_add_uint(tree, hf_mbim_set_dss_connect_dss_session_id, tvb, offset, 4, dss_session_id);
5649
0
    offset += 4;
5650
0
    proto_tree_add_item(tree, hf_mbim_set_dss_connect_dss_link_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5651
0
}
5652
5653
static void
5654
mbim_dissect_muticarrier_current_cid_list_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5655
0
{
5656
0
    uint8_t service_idx;
5657
5658
0
    service_idx = mbim_dissect_service_id_uuid(tvb, pinfo, tree, hf_mbim_multicarrier_current_cid_list_req_uuid, &offset, NULL, true);
5659
0
    if (service_idx != UUID_MULTICARRIER) {
5660
0
        expert_add_info_format(pinfo, NULL, &ei_mbim_unexpected_uuid_value,
5661
0
                               "Unexpected UUID value, should be UUID_MULTICARRIER");
5662
0
    }
5663
0
}
5664
5665
static void
5666
mbim_dissect_muticarrier_current_cid_list_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5667
0
{
5668
0
    uint32_t i, cid_count;
5669
5670
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_multicarrier_current_cid_list_info_cid_count,
5671
0
                                 tvb, offset, 4, ENC_LITTLE_ENDIAN, &cid_count);
5672
0
    offset += 4;
5673
0
    for (i = 0; i < cid_count; i++) {
5674
0
        proto_tree_add_item(tree, hf_mbim_multicarrier_current_cid_list_info_cid,
5675
0
                            tvb, offset, 4, ENC_LITTLE_ENDIAN);
5676
0
        offset += 4;
5677
0
    }
5678
0
}
5679
5680
static void
5681
mbim_dissect_thermal_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5682
0
{
5683
0
    int i;
5684
0
    proto_tree *subtree;
5685
5686
0
    for (i = 0; i < 4; i++) {
5687
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, 24, ett_mbim_thermal_threshold_setting, NULL, "Threshold %u", i);
5688
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_enable, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5689
0
        offset += 4;
5690
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_temp_sensor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5691
0
        offset += 4;
5692
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_alarm_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5693
0
        offset += 4;
5694
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_threshold_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5695
0
        offset += 4;
5696
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_hyst_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5697
0
        offset += 4;
5698
0
        proto_tree_add_item(subtree, hf_mbim_thermal_config_sampling_period, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5699
0
        offset += 4;
5700
0
    }
5701
0
}
5702
5703
static void
5704
mbim_dissect_thermal_state_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5705
0
{
5706
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_current_temp_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5707
0
    offset += 4;
5708
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_enable, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5709
0
    offset += 4;
5710
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_temp_sensor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5711
0
    offset += 4;
5712
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_alarm_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5713
0
    offset += 4;
5714
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_threshold_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5715
0
    offset += 4;
5716
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_hyst_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5717
0
    offset += 4;
5718
0
    proto_tree_add_item(tree, hf_mbim_thermal_state_info_sampling_period, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5719
0
}
5720
5721
static void
5722
mbim_dissect_sar_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, uint32_t buffer_len)
5723
0
{
5724
0
    proto_tree_add_item(tree, hf_mbim_sar_config_sar_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5725
0
    offset += 4;
5726
0
    if (buffer_len > 4) {
5727
0
        proto_tree_add_item(tree, hf_mbim_sar_config_level, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5728
0
    }
5729
0
}
5730
5731
static void
5732
mbim_dissect_ms_sar_config_state(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
5733
0
{
5734
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_state_sar_antenna_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5735
0
    offset += 4;
5736
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_state_sar_backoff_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5737
0
}
5738
5739
static void
5740
mbim_dissect_ms_sar_config(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, bool is_response)
5741
0
{
5742
0
    proto_tree* subtree;
5743
0
    uint32_t i, elem_count;
5744
0
    wmem_array_t* pair_list;
5745
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
5746
0
    unsigned base_offset = offset;
5747
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5748
0
    offset += 4;
5749
0
    proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_backoff_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5750
0
    offset += 4;
5751
0
    if (is_response) {
5752
0
        proto_tree_add_item(tree, hf_mbim_ms_sar_config_sar_wifi_Integration, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5753
0
        offset += 4;
5754
0
    }
5755
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_sar_config_element_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5756
0
    offset += 4;
5757
0
    if (elem_count) {
5758
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5759
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "SAR Config State List");
5760
0
        for (i = 0; i < elem_count; i++) {
5761
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);
5762
0
            offset += 4;
5763
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);
5764
0
            offset += 4;
5765
0
            wmem_array_append_one(pair_list, pair_list_item);
5766
0
        }
5767
0
        for (i = 0; i < elem_count; i++) {
5768
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5769
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5770
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5771
0
                    ett_mbim_pair_list, NULL, "SAR Config State #%u", i + 1);
5772
0
                mbim_dissect_ms_sar_config_state(tvb, subtree, base_offset + p_pair_list_item->offset);
5773
0
            }
5774
0
        }
5775
0
    }
5776
0
}
5777
5778
static void
5779
mbim_dissect_ms_transmission_status(tvbuff_t* tvb, proto_tree* tree, unsigned offset, bool is_response)
5780
0
{
5781
0
    proto_tree_add_item(tree, hf_mbim_ms_transmission_status_channel_notification, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5782
0
    offset += 4;
5783
0
    if (is_response) {
5784
0
        proto_tree_add_item(tree, hf_mbim_ms_transmission_status_transmission_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5785
0
        offset += 4;
5786
0
    }
5787
0
    proto_tree_add_item(tree, hf_mbim_ms_transmission_status_hysteresis_timer, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5788
0
}
5789
5790
5791
static void
5792
mbim_dissect_adpclk_freq_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, uint32_t buffer_len)
5793
0
{
5794
0
    proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq, tvb, offset, 8, ENC_LITTLE_ENDIAN);
5795
0
    offset += 4;
5796
0
    proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5797
0
    offset += 4;
5798
0
    if (buffer_len > 8) {
5799
0
        proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5800
0
        offset += 4;
5801
0
        if (buffer_len > 12) {
5802
0
            proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5803
0
            offset += 4;
5804
0
            if (buffer_len > 16) {
5805
0
                proto_tree_add_item(tree, hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5806
0
            }
5807
0
        }
5808
0
    }
5809
0
}
5810
5811
static void
5812
mbim_dissect_adpclk_freq_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5813
0
{
5814
0
    proto_tree *subtree;
5815
0
    unsigned base_offset;
5816
0
    uint32_t i, elem_count;
5817
0
    wmem_array_t *pair_list;
5818
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5819
5820
0
    base_offset = offset;
5821
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_adpclk_freq_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5822
0
    offset += 4;
5823
0
    if (elem_count) {
5824
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5825
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Element Offset Length Pair");
5826
0
        for (i = 0; i < elem_count; i++) {
5827
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);
5828
0
            offset += 4;
5829
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);
5830
0
            offset += 4;
5831
0
            wmem_array_append_one(pair_list, pair_list_item);
5832
0
        }
5833
0
        for (i = 0; i < elem_count; i++) {
5834
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5835
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5836
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5837
0
                            ett_mbim_pair_list, NULL, "ADPCLK Freq Value #%u", i+1);
5838
0
                mbim_dissect_adpclk_freq_value(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, p_pair_list_item->size);
5839
0
            }
5840
0
        }
5841
0
    }
5842
0
}
5843
5844
static void
5845
mbim_dissect_nrtcws_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, uint32_t buffer_len)
5846
0
{
5847
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_config_mode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5848
0
    offset += 2;
5849
0
    if (buffer_len > 2) {
5850
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5851
0
        offset += 2;
5852
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_safe_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5853
0
        offset += 2;
5854
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_wlan_bandwidth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5855
0
        offset += 2;
5856
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_bt_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5857
0
        offset += 2;
5858
0
        proto_tree_add_item(tree, hf_mbim_nrtcws_config_bt_safe_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5859
0
    }
5860
0
}
5861
5862
static void
5863
mbim_dissect_nrtcws_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5864
0
{
5865
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5866
0
    offset += 2;
5867
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_wlan_safe_rx_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5868
0
    offset += 2;
5869
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_wlan_safe_rx_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5870
0
    offset += 2;
5871
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_bt_safe_rx_min, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5872
0
    offset += 2;
5873
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_bt_safe_rx_max, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5874
0
    offset += 2;
5875
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5876
0
    offset += 2;
5877
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5878
0
    offset += 2;
5879
0
    proto_tree_add_item(tree, hf_mbim_nrtcws_info_lte_sps_initial_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5880
0
}
5881
5882
static void
5883
mbim_dissect_atds_signal_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5884
0
{
5885
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5886
0
    offset += 4;
5887
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_ber, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5888
0
    offset += 4;
5889
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rscp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5890
0
    offset += 4;
5891
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_ecno, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5892
0
    offset += 4;
5893
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rsrq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5894
0
    offset += 4;
5895
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5896
0
    offset += 4;
5897
0
    proto_tree_add_item(tree, hf_mbim_atds_signal_info_rssnr, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5898
0
}
5899
5900
static void
5901
mbim_dissect_atds_operator(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5902
0
{
5903
0
    unsigned base_offset;
5904
0
    uint32_t provider_id_offset, provider_id_size, provider_name_offset, provider_name_size;
5905
0
    proto_item *it;
5906
5907
0
    base_offset = offset;
5908
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
5909
0
    offset += 4;
5910
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
5911
0
    offset += 4;
5912
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_atds_operator_provider_state, ett_mbim_bitmap,
5913
0
                           mbim_provider_state_fields, ENC_LITTLE_ENDIAN);
5914
0
    offset += 4;
5915
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_name_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_offset);
5916
0
    offset += 4;
5917
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operator_provider_name_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_name_size);
5918
0
    offset += 4;
5919
0
    proto_tree_add_item (tree, hf_mbim_atds_operator_plmn_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5920
0
    offset += 4;
5921
0
    proto_tree_add_item (tree, hf_mbim_atds_operator_rssi, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5922
0
    offset += 4;
5923
0
    proto_tree_add_item (tree, hf_mbim_atds_operator_error_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5924
0
    if (provider_id_offset && provider_id_size) {
5925
0
        it = proto_tree_add_item(tree, hf_mbim_atds_operator_provider_id, tvb, base_offset + provider_id_offset,
5926
0
                                 provider_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5927
0
        if (provider_id_size > 12) {
5928
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5929
0
        }
5930
0
    }
5931
0
    if (provider_name_offset && provider_name_size) {
5932
0
        it = proto_tree_add_item(tree, hf_mbim_atds_operator_provider_name, tvb, base_offset + provider_name_offset,
5933
0
                                 provider_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
5934
0
        if (provider_name_size > 40) {
5935
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
5936
0
        }
5937
0
    }
5938
0
}
5939
5940
static void
5941
mbim_dissect_atds_operators(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
5942
0
{
5943
0
    proto_tree *subtree;
5944
0
    unsigned base_offset;
5945
0
    uint32_t i, elem_count;
5946
0
    wmem_array_t *pair_list;
5947
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
5948
5949
0
    base_offset = offset;
5950
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_operators_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
5951
0
    offset += 4;
5952
0
    if (elem_count) {
5953
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
5954
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Operators List");
5955
0
        for (i = 0; i < elem_count; i++) {
5956
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_operators_operator_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
5957
0
            offset += 4;
5958
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_operators_operator_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
5959
0
            offset += 4;
5960
0
            wmem_array_append_one(pair_list, pair_list_item);
5961
0
        }
5962
0
        for (i = 0; i < elem_count; i++) {
5963
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
5964
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
5965
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
5966
0
                            ett_mbim_pair_list, NULL, "Operator #%u", i+1);
5967
0
                mbim_dissect_atds_operator(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
5968
0
            }
5969
0
        }
5970
0
    }
5971
0
}
5972
5973
static void
5974
mbim_dissect_atds_projection_table(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
5975
0
{
5976
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5977
0
    offset += 4;
5978
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar5min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5979
0
    offset += 4;
5980
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a5, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5981
0
    offset += 4;
5982
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b5, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5983
0
    offset += 4;
5984
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar4min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5985
0
    offset += 4;
5986
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a4, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5987
0
    offset += 4;
5988
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b4, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5989
0
    offset += 4;
5990
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar3min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5991
0
    offset += 4;
5992
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5993
0
    offset += 4;
5994
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b3, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5995
0
    offset += 4;
5996
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar2min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5997
0
    offset += 4;
5998
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5999
0
    offset += 4;
6000
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6001
0
    offset += 4;
6002
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar1min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6003
0
    offset += 4;
6004
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6005
0
    offset += 4;
6006
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6007
0
    offset += 4;
6008
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_bar0min, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6009
0
    offset += 4;
6010
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_a0, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6011
0
    offset += 4;
6012
0
    proto_tree_add_item(tree, hf_mbim_atds_projection_table_b0, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6013
0
}
6014
6015
static void
6016
mbim_dissect_atds_projection_tables(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
6017
0
{
6018
0
    proto_tree *subtree;
6019
0
    unsigned base_offset;
6020
0
    uint32_t i, elem_count;
6021
0
    wmem_array_t *pair_list;
6022
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6023
6024
0
    base_offset = offset;
6025
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_atds_projection_tables_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6026
0
    offset += 4;
6027
0
    if (elem_count) {
6028
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6029
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Projection Tables List");
6030
0
        for (i = 0; i < elem_count; i++) {
6031
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_projection_tables_projection_table_offset,
6032
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6033
0
            offset += 4;
6034
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_atds_projection_tables_projection_table_size,
6035
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6036
0
            offset += 4;
6037
0
            wmem_array_append_one(pair_list, pair_list_item);
6038
0
        }
6039
0
        for (i = 0; i < elem_count; i++) {
6040
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6041
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6042
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6043
0
                            ett_mbim_pair_list, NULL, "Projection Table #%u", i+1);
6044
0
                mbim_dissect_atds_projection_table(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset);
6045
0
            }
6046
0
        }
6047
0
    }
6048
0
}
6049
6050
static void
6051
mbim_dissect_multiflow_tft_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
6052
0
{
6053
0
    proto_tree *subtree;
6054
0
    unsigned base_offset;
6055
0
    uint32_t i, elem_count;
6056
0
    wmem_array_t *pair_list;
6057
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6058
6059
0
    base_offset = offset;
6060
0
    proto_tree_add_item(tree, hf_mbim_multiflow_tft_info_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6061
0
    offset += 4;
6062
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_multiflow_tft_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6063
0
    offset += 4;
6064
0
    if (elem_count) {
6065
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6066
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "TFT List");
6067
0
        for (i = 0; i < elem_count; i++) {
6068
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_multiflow_tft_info_tft_list_offset,
6069
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6070
0
            offset += 4;
6071
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_multiflow_tft_info_tft_list_size,
6072
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6073
0
            offset += 4;
6074
0
            wmem_array_append_one(pair_list, pair_list_item);
6075
0
        }
6076
0
        for (i = 0; i < elem_count; i++) {
6077
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6078
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6079
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6080
0
                            ett_mbim_pair_list, NULL, "TFT #%u", i+1);
6081
0
                de_sm_tflow_temp(tvb, subtree, pinfo, base_offset + p_pair_list_item->offset, p_pair_list_item->size, NULL, 0);
6082
0
            }
6083
0
        }
6084
0
    }
6085
0
}
6086
6087
static void
6088
mbim_dissect_ms_context_v2_base(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset, unsigned base_offset, struct mbim_conv_info* mbim_conv)
6089
0
{
6090
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size, password_offset, password_size;
6091
0
    proto_item *it;
6092
0
    proto_tree* snssai;
6093
6094
0
    mbim_dissect_context_type_uuid(tvb, pinfo, tree, offset);
6095
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_ip_type, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6096
0
    *offset += 4;
6097
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_enable, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6098
0
    *offset += 4;
6099
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_roaming, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6100
0
    *offset += 4;
6101
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_media_type, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6102
0
    *offset += 4;
6103
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_source, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6104
0
    *offset += 4;
6105
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);
6106
0
    *offset += 4;
6107
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);
6108
0
    *offset += 4;
6109
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);
6110
0
    *offset += 4;
6111
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);
6112
0
    *offset += 4;
6113
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);
6114
0
    *offset += 4;
6115
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);
6116
0
    *offset += 4;
6117
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_compression, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6118
0
    *offset += 4;
6119
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_auth_protocol, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6120
0
    *offset += 4;
6121
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6122
0
        snssai = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_mbim_pair_list, NULL, "S-NSSAI");
6123
0
        mbim_dissect_tlv_ie(tvb, pinfo, snssai, offset);
6124
0
    }
6125
0
    if (access_string_offset && access_string_size) {
6126
0
        it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_access_string, tvb,
6127
0
                                 base_offset + access_string_offset, access_string_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6128
0
        if (access_string_size > 200) {
6129
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6130
0
        }
6131
0
    }
6132
0
    if (user_name_offset && user_name_size) {
6133
0
        it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_user_name, tvb,
6134
0
                                 base_offset + user_name_offset, user_name_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6135
0
        if (user_name_size > 510) {
6136
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6137
0
        }
6138
0
    }
6139
0
    if (password_offset && password_size) {
6140
0
        it = proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_password, tvb,
6141
0
                              base_offset + password_offset, password_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6142
0
        if (password_size > 510) {
6143
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6144
0
        }
6145
0
    }
6146
0
}
6147
6148
static void
6149
mbim_dissect_set_ms_provisioned_context_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv)
6150
0
{
6151
0
    unsigned base_offset;
6152
6153
0
    base_offset = offset;
6154
0
    proto_tree_add_item(tree, hf_mbim_set_ms_provisioned_context_v2_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6155
0
    offset += 4;
6156
0
    mbim_dissect_ms_context_v2_base(tvb, pinfo, tree, &offset, base_offset, mbim_conv);
6157
0
}
6158
6159
static void
6160
mbim_dissect_ms_provisioned_context_info_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, struct mbim_conv_info* mbim_conv)
6161
0
{
6162
0
    proto_tree *subtree;
6163
0
    unsigned base_offset, item_offset, base_item_offset;
6164
0
    uint32_t i, elem_count;
6165
0
    wmem_array_t *pair_list;
6166
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6167
6168
0
    base_offset = offset;
6169
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);
6170
0
    offset += 4;
6171
0
    if (elem_count) {
6172
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6173
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provisioned Contexts Ref List");
6174
0
        for (i = 0; i < elem_count; i++) {
6175
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_provisioned_context_info_v2_list_offset,
6176
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6177
0
            offset += 4;
6178
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_provisioned_context_info_v2_list_size,
6179
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6180
0
            offset += 4;
6181
0
            wmem_array_append_one(pair_list, pair_list_item);
6182
0
        }
6183
0
        for (i = 0; i < elem_count; i++) {
6184
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6185
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6186
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6187
0
                            ett_mbim_pair_list, NULL, "Context #%u", i+1);
6188
0
                item_offset = base_offset + p_pair_list_item->offset;
6189
0
                base_item_offset = item_offset;
6190
0
                proto_tree_add_item(subtree, hf_mbim_ms_provisioned_context_info_v2_context_id, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6191
0
                item_offset += 4;
6192
0
                mbim_dissect_ms_context_v2_base(tvb, pinfo, subtree, &item_offset, base_item_offset, mbim_conv);
6193
0
            }
6194
0
        }
6195
0
    }
6196
0
}
6197
6198
static void
6199
mbim_dissect_ms_network_blacklist_info(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, unsigned offset)
6200
0
{
6201
0
    proto_tree *subtree;
6202
0
    unsigned base_offset, item_offset;
6203
0
    uint32_t i, elem_count;
6204
0
    wmem_array_t *pair_list;
6205
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6206
6207
0
    base_offset = offset;
6208
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_ms_network_blacklist_info_blacklist_state,
6209
0
                           ett_mbim_bitmap, mbim_ms_network_blacklist_state_fields, ENC_LITTLE_ENDIAN);
6210
6211
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_network_blacklist_info_elem_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6212
0
    offset += 4;
6213
0
    if (elem_count) {
6214
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6215
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Provider Blacklist Ref List");
6216
0
        for (i = 0; i < elem_count; i++) {
6217
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_network_blacklist_info_list_offset,
6218
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6219
0
            offset += 4;
6220
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_network_blacklist_info_list_size,
6221
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6222
0
            offset += 4;
6223
0
            wmem_array_append_one(pair_list, pair_list_item);
6224
0
        }
6225
0
        for (i = 0; i < elem_count; i++) {
6226
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6227
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6228
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6229
0
                            ett_mbim_pair_list, NULL, "Blacklisted Provider #%u", i+1);
6230
0
                item_offset = base_offset + p_pair_list_item->offset;
6231
0
                proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_mcc, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6232
0
                item_offset += 4;
6233
0
                proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_mnc, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6234
0
                item_offset += 4;
6235
0
                proto_tree_add_item(subtree, hf_mbim_ms_network_blacklist_provider_type, tvb, item_offset, 4, ENC_LITTLE_ENDIAN);
6236
0
            }
6237
0
        }
6238
0
    }
6239
0
}
6240
6241
static void
6242
mbim_dissect_sys_caps_info(tvbuff_t *tvb, proto_tree *tree, unsigned offset)
6243
0
{
6244
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_number_of_executors, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6245
0
    offset += 4;
6246
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_number_of_slots, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6247
0
    offset += 4;
6248
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_concurrency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6249
0
    offset += 4;
6250
0
    proto_tree_add_item(tree, hf_mbim_sys_caps_info_modem_id, tvb, offset, 8, ENC_LITTLE_ENDIAN);
6251
0
}
6252
6253
static void
6254
mbim_dissect_device_caps_v2_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset,
6255
                              struct mbim_conv_info *mbim_conv)
6256
0
{
6257
0
    unsigned base_offset;
6258
0
    uint32_t custom_class_offset, custom_class_size, device_id_offset, device_id_size,
6259
0
            fw_info_offset, fw_info_size, hw_info_offset, hw_info_size;
6260
0
    proto_item *it;
6261
6262
0
    base_offset = offset;
6263
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6264
0
    offset += 4;
6265
0
    mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
6266
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
6267
0
        mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
6268
0
    offset += 4;
6269
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6270
0
    offset += 4;
6271
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
6272
0
                           mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
6273
0
    offset += 4;
6274
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
6275
0
                           mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6276
0
    offset += 4;
6277
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
6278
0
                           mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
6279
0
    offset += 4;
6280
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
6281
0
                           mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
6282
0
    offset += 4;
6283
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6284
0
    offset += 4;
6285
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);
6286
0
    offset += 4;
6287
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);
6288
0
    offset += 4;
6289
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);
6290
0
    offset += 4;
6291
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);
6292
0
    offset += 4;
6293
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);
6294
0
    offset += 4;
6295
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);
6296
0
    offset += 4;
6297
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);
6298
0
    offset += 4;
6299
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);
6300
0
    offset += 4;
6301
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_v2_executor_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6302
0
    if (custom_class_offset && custom_class_size) {
6303
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_custom_data_class, tvb, base_offset + custom_class_offset,
6304
0
                                custom_class_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6305
0
        if (custom_class_size > 22) {
6306
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6307
0
        }
6308
0
    }
6309
0
    if (device_id_offset && device_id_size) {
6310
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_device_id, tvb, base_offset + device_id_offset,
6311
0
                                 device_id_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6312
0
        if ((mbim_conv->cellular_class & MBIM_CELLULAR_CLASS_GSM) && (device_id_size > 30)) {
6313
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6314
0
        } else if (device_id_size > 36) {
6315
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6316
0
        }
6317
0
    }
6318
0
    if (fw_info_offset && fw_info_size) {
6319
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_fw_info, tvb, base_offset + fw_info_offset,
6320
0
                                 fw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6321
0
        if (fw_info_size > 60) {
6322
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6323
0
        }
6324
0
    }
6325
0
    if (hw_info_offset && hw_info_size) {
6326
0
        it = proto_tree_add_item(tree, hf_mbim_device_caps_info_hw_info, tvb, base_offset + hw_info_offset,
6327
0
                                 hw_info_size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
6328
0
        if (hw_info_size > 60) {
6329
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6330
0
        }
6331
0
    }
6332
0
}
6333
6334
static void
6335
mbim_dissect_device_caps_v3_and_higher_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset,
6336
    struct mbim_conv_info *mbim_conv)
6337
0
{
6338
0
    proto_tree *lte_band_class, *nr_band_class, *custom_data_class, *device_id, *firmware_info, *hardware_info;
6339
6340
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_device_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6341
0
    offset += 4;
6342
0
    mbim_conv->cellular_class = tvb_get_letohl(tvb, offset);
6343
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_cellular_class, ett_mbim_bitmap,
6344
0
        mbim_cellular_class_fields, ENC_LITTLE_ENDIAN);
6345
0
    offset += 4;
6346
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_voice_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6347
0
    offset += 4;
6348
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sim_class, ett_mbim_bitmap,
6349
0
        mbim_device_caps_info_sim_class_fields, ENC_LITTLE_ENDIAN);
6350
0
    offset += 4;
6351
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_class, ett_mbim_bitmap,
6352
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6353
0
    offset += 4;
6354
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_sms_caps, ett_mbim_bitmap,
6355
0
        mbim_device_caps_info_sms_caps_fields, ENC_LITTLE_ENDIAN);
6356
0
    offset += 4;
6357
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_control_caps, ett_mbim_bitmap,
6358
0
        mbim_device_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
6359
0
    offset += 4;
6360
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_device_caps_info_data_subclass, ett_mbim_bitmap,
6361
0
        mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6362
0
    offset += 8;
6363
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_max_sessions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6364
0
    offset += 4;
6365
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_v2_executor_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6366
0
    offset += 4;
6367
0
    proto_tree_add_item(tree, hf_mbim_device_caps_info_wcdma_band_class, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6368
0
    offset += 4;
6369
6370
0
    lte_band_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "LTE Band Class");
6371
0
    mbim_dissect_tlv_ie(tvb, pinfo, lte_band_class, &offset);
6372
6373
0
    nr_band_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "NR Band Class");
6374
0
    mbim_dissect_tlv_ie(tvb, pinfo, nr_band_class, &offset);
6375
6376
0
    custom_data_class = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Custom Data Class");
6377
0
    mbim_dissect_tlv_ie(tvb, pinfo, custom_data_class, &offset);
6378
6379
0
    device_id = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Device ID");
6380
0
    mbim_dissect_tlv_ie(tvb, pinfo, device_id, &offset);
6381
6382
0
    firmware_info = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Firmware Info");
6383
0
    mbim_dissect_tlv_ie(tvb, pinfo, firmware_info, &offset);
6384
6385
0
    hardware_info = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Hardware Info");
6386
0
    mbim_dissect_tlv_ie(tvb, pinfo, hardware_info, &offset);
6387
0
}
6388
6389
static void
6390
mbim_dissect_lte_attach_context(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, unsigned base_offset, bool include_roaming_source)
6391
0
{
6392
0
    uint32_t access_string_offset, access_string_size, user_name_offset, user_name_size, password_offset, password_size;
6393
0
    proto_item* it;
6394
6395
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_ip_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6396
0
    offset += 4;
6397
0
    if (include_roaming_source)
6398
0
    {
6399
0
        proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_roaming, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6400
0
        offset += 4;
6401
0
        proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_source, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6402
0
        offset += 4;
6403
0
    }
6404
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);
6405
0
    offset += 4;
6406
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);
6407
0
    offset += 4;
6408
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);
6409
0
    offset += 4;
6410
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);
6411
0
    offset += 4;
6412
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_password_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_offset);
6413
0
    offset += 4;
6414
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_password_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &password_size);
6415
0
    offset += 4;
6416
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_compression, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6417
0
    offset += 4;
6418
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_auth_protocol, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6419
0
    if (access_string_offset && access_string_size) {
6420
0
        it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_access_string, tvb,
6421
0
            base_offset + access_string_offset, access_string_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6422
0
        if (access_string_size > 200) {
6423
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6424
0
        }
6425
0
    }
6426
0
    if (user_name_offset && user_name_size) {
6427
0
        it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_user_name, tvb,
6428
0
            base_offset + user_name_offset, user_name_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6429
0
        if (user_name_size > 510) {
6430
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6431
0
        }
6432
0
    }
6433
0
    if (password_offset && password_size) {
6434
0
        it = proto_tree_add_item(tree, hf_mbim_ms_lte_attach_context_password, tvb,
6435
0
            base_offset + password_offset, password_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6436
0
        if (password_size > 510) {
6437
0
            expert_add_info(pinfo, it, &ei_mbim_oversized_string);
6438
0
        }
6439
0
    }
6440
0
}
6441
6442
static void
6443
mbim_dissect_lte_attach_config_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset)
6444
0
{
6445
0
    proto_tree* subtree;
6446
0
    unsigned base_offset;
6447
0
    uint32_t i, elem_count;
6448
0
    wmem_array_t* pair_list;
6449
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
6450
6451
0
    base_offset = offset;
6452
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6453
0
    offset += 4;
6454
0
    if (elem_count) {
6455
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6456
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "Context List");
6457
0
        for (i = 0; i < elem_count; i++) {
6458
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_offset,
6459
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6460
0
            offset += 4;
6461
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_size,
6462
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6463
0
            offset += 4;
6464
0
            wmem_array_append_one(pair_list, pair_list_item);
6465
0
        }
6466
0
        for (i = 0; i < elem_count; i++) {
6467
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6468
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6469
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6470
0
                    ett_mbim_pair_list, NULL, "Context #%u", i + 1);
6471
0
                mbim_dissect_lte_attach_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, base_offset + p_pair_list_item->offset, true);
6472
0
            }
6473
0
        }
6474
0
    }
6475
0
}
6476
6477
static void
6478
mbim_dissect_set_lte_attach_config(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset)
6479
0
{
6480
0
    proto_tree* subtree;
6481
0
    unsigned base_offset;
6482
0
    uint32_t i, elem_count;
6483
0
    wmem_array_t* pair_list;
6484
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
6485
6486
0
    base_offset = offset;
6487
0
    proto_tree_add_item(tree, hf_mbim_ms_set_lte_attach_operation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6488
0
    offset += 4;
6489
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_lte_attach_context_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &elem_count);
6490
0
    offset += 4;
6491
0
    if (elem_count) {
6492
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6493
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * elem_count, ett_mbim_pair_list, NULL, "Context List");
6494
0
        for (i = 0; i < elem_count; i++) {
6495
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_offset,
6496
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6497
0
            offset += 4;
6498
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_lte_attach_context_size,
6499
0
                tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6500
0
            offset += 4;
6501
0
            wmem_array_append_one(pair_list, pair_list_item);
6502
0
        }
6503
0
        for (i = 0; i < elem_count; i++) {
6504
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6505
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6506
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6507
0
                    ett_mbim_pair_list, NULL, "Context #%u", i + 1);
6508
0
                mbim_dissect_lte_attach_context(tvb, pinfo, subtree, base_offset + p_pair_list_item->offset, base_offset + p_pair_list_item->offset, true);
6509
0
            }
6510
0
        }
6511
0
    }
6512
0
}
6513
6514
static void
6515
mbim_dissect_lte_attach_status(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
6516
0
{
6517
0
    unsigned base_offset = offset;
6518
0
    proto_tree_add_item(tree, hf_mbim_ms_lte_attach_state, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6519
0
    offset += 4;
6520
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6521
0
        uint32_t nw_error = tvb_get_letohl(tvb, offset);
6522
0
        if (nw_error == 0) {
6523
0
            proto_tree_add_uint_format_value(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error, "Success (0)");
6524
0
        }
6525
0
        else {
6526
0
            proto_tree_add_uint(tree, hf_mbim_packet_service_info_nw_error, tvb, offset, 4, nw_error);
6527
0
        }
6528
0
        offset += 4;
6529
0
    }
6530
0
    mbim_dissect_lte_attach_context(tvb, pinfo, tree, offset, base_offset, false);
6531
0
}
6532
6533
static void
6534
mbim_dissect_ms_device_slot_mapping_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
6535
0
{
6536
0
    proto_tree *subtree;
6537
0
    unsigned base_offset;
6538
0
    uint32_t i, elem_count;
6539
0
    wmem_array_t *pair_list;
6540
0
    struct mbim_pair_list pair_list_item, *p_pair_list_item;
6541
6542
0
    base_offset = offset;
6543
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);
6544
0
    offset += 4;
6545
0
    if (elem_count) {
6546
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
6547
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8*elem_count, ett_mbim_pair_list, NULL, "Slot Map List");
6548
0
        for (i = 0; i < elem_count; i++) {
6549
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_device_slot_mapping_info_map_offset,
6550
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
6551
0
            offset += 4;
6552
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_device_slot_mapping_info_map_size,
6553
0
                                         tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
6554
0
            offset += 4;
6555
0
            wmem_array_append_one(pair_list, pair_list_item);
6556
0
        }
6557
0
        for (i = 0; i < elem_count; i++) {
6558
0
            p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
6559
0
            if (p_pair_list_item->offset && p_pair_list_item->size) {
6560
0
                subtree = proto_tree_add_subtree_format(tree, tvb, base_offset + p_pair_list_item->offset, p_pair_list_item->size,
6561
0
                            ett_mbim_pair_list, NULL, "Device #%u", i+1);
6562
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);
6563
0
            }
6564
0
        }
6565
0
    }
6566
0
}
6567
6568
static void
6569
mbim_dissect_base_station_info_req(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
6570
    struct mbim_conv_info* mbim_conv)
6571
0
{
6572
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_gsm_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6573
0
    offset += 4;
6574
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_umts_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6575
0
    offset += 4;
6576
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_td_scdma_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6577
0
    offset += 4;
6578
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_lte_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6579
0
    offset += 4;
6580
0
    proto_tree_add_item(tree, hf_mbim_base_station_max_cdma_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6581
0
    offset += 4;
6582
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6583
0
        proto_tree_add_item(tree, hf_mbim_base_station_max_nr_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6584
0
    }
6585
0
}
6586
6587
static void mbim_dissect_base_station_gsm_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
6588
0
{
6589
0
    unsigned base_offset = offset;
6590
0
    uint32_t provider_id_offset, provider_id_size;
6591
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6592
0
    offset += 4;
6593
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6594
0
    offset += 4;
6595
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6596
0
    offset += 4;
6597
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6598
0
    offset += 4;
6599
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6600
0
    offset += 4;
6601
0
    proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6602
0
    offset += 4;
6603
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6604
0
    offset += 4;
6605
0
    proto_tree_add_item(tree, hf_mbim_base_station_rx_level, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6606
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6607
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6608
0
}
6609
6610
static void mbim_dissect_base_station_gsm_nmr_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6611
0
{
6612
0
    unsigned base_offset = *offset;
6613
0
    uint32_t provider_id_offset, provider_id_size;
6614
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6615
0
    *offset += 4;
6616
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6617
0
    *offset += 4;
6618
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6619
0
    *offset += 4;
6620
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6621
0
    *offset += 4;
6622
0
    proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6623
0
    *offset += 4;
6624
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6625
0
    *offset += 4;
6626
0
    proto_tree_add_item(tree, hf_mbim_base_station_rx_level, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6627
0
    *offset += 4;
6628
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6629
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6630
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6631
0
}
6632
6633
static void mbim_dissect_base_station_umts_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
6634
0
{
6635
0
    unsigned base_offset = offset;
6636
0
    uint32_t provider_id_offset, provider_id_size;
6637
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6638
0
    offset += 4;
6639
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6640
0
    offset += 4;
6641
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6642
0
    offset += 4;
6643
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6644
0
    offset += 4;
6645
0
    proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_ul, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6646
0
    offset += 4;
6647
0
    proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_dl, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6648
0
    offset += 4;
6649
0
    proto_tree_add_item(tree, hf_mbim_base_station_frequency_info_nt, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6650
0
    offset += 4;
6651
0
    proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6652
0
    offset += 4;
6653
0
    proto_tree_add_item(tree, hf_mbim_base_station_primary_scrambling_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6654
0
    offset += 4;
6655
0
    proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6656
0
    offset += 4;
6657
0
    proto_tree_add_item(tree, hf_mbim_base_station_ecno, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6658
0
    offset += 4;
6659
0
    proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6660
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6661
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6662
0
}
6663
6664
static void mbim_dissect_base_station_umts_mrl_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6665
0
{
6666
0
    unsigned base_offset = *offset;
6667
0
    uint32_t provider_id_offset, provider_id_size;
6668
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6669
0
    *offset += 4;
6670
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6671
0
    *offset += 4;
6672
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6673
0
    *offset += 4;
6674
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6675
0
    *offset += 4;
6676
0
    proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6677
0
    *offset += 4;
6678
0
    proto_tree_add_item(tree, hf_mbim_base_station_primary_scrambling_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6679
0
    *offset += 4;
6680
0
    proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6681
0
    *offset += 4;
6682
0
    proto_tree_add_item(tree, hf_mbim_base_station_ecno, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6683
0
    *offset += 4;
6684
0
    proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6685
0
    *offset += 4;
6686
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6687
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6688
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6689
0
}
6690
6691
static void mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6692
0
{
6693
0
    unsigned base_offset = *offset;
6694
0
    uint32_t provider_id_offset, provider_id_size;
6695
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6696
0
    *offset += 4;
6697
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6698
0
    *offset += 4;
6699
0
    proto_tree_add_item(tree, hf_mbim_base_station_location_area_code, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6700
0
    *offset += 4;
6701
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6702
0
    *offset += 4;
6703
0
    proto_tree_add_item(tree, hf_mbim_base_station_uarfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6704
0
    *offset += 4;
6705
0
    proto_tree_add_item(tree, hf_mbim_base_station_call_parameter, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6706
0
    *offset += 4;
6707
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6708
0
    *offset += 4;
6709
0
    proto_tree_add_item(tree, hf_mbim_base_station_rscp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6710
0
    *offset += 4;
6711
0
    proto_tree_add_item(tree, hf_mbim_base_station_path_loss, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6712
0
    *offset += 4;
6713
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6714
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6715
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6716
0
}
6717
6718
static void mbim_dissect_base_station_lte_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
6719
0
{
6720
0
    unsigned base_offset = offset;
6721
0
    uint32_t provider_id_offset, provider_id_size;
6722
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6723
0
    offset += 4;
6724
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6725
0
    offset += 4;
6726
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6727
0
    offset += 4;
6728
0
    proto_tree_add_item(tree, hf_mbim_base_station_earfcn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6729
0
    offset += 4;
6730
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6731
0
    offset += 4;
6732
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6733
0
    offset += 4;
6734
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6735
0
    offset += 4;
6736
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6737
0
    offset += 4;
6738
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6739
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6740
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6741
0
}
6742
6743
static void mbim_dissect_base_station_lte_mrl_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6744
0
{
6745
0
    unsigned base_offset = *offset;
6746
0
    uint32_t provider_id_offset, provider_id_size;
6747
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6748
0
    *offset += 4;
6749
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6750
0
    *offset += 4;
6751
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6752
0
    *offset += 4;
6753
0
    proto_tree_add_item(tree, hf_mbim_base_station_earfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6754
0
    *offset += 4;
6755
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6756
0
    *offset += 4;
6757
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6758
0
    *offset += 4;
6759
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6760
0
    *offset += 4;
6761
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb,* offset, 4, ENC_LITTLE_ENDIAN);
6762
0
    *offset += 4;
6763
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6764
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6765
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6766
0
}
6767
6768
static void mbim_dissect_base_station_cdma_mrl_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6769
0
{
6770
0
    proto_tree_add_item(tree, hf_mbim_base_station_serving_cell_flag, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6771
0
    *offset += 4;
6772
0
    proto_tree_add_item(tree, hf_mbim_base_station_nid, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6773
0
    *offset += 4;
6774
0
    proto_tree_add_item(tree, hf_mbim_base_station_sid, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6775
0
    *offset += 4;
6776
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_station_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6777
0
    *offset += 4;
6778
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_latitude, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6779
0
    *offset += 4;
6780
0
    proto_tree_add_item(tree, hf_mbim_base_station_base_longitude, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6781
0
    *offset += 4;
6782
0
    proto_tree_add_item(tree, hf_mbim_base_station_ref_pn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6783
0
    *offset += 4;
6784
0
    proto_tree_add_item(tree, hf_mbim_base_station_gps_seconds, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6785
0
    *offset += 4;
6786
0
    proto_tree_add_item(tree, hf_mbim_base_station_pilot_strength, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6787
0
    *offset += 4;
6788
0
}
6789
6790
static void mbim_dissect_base_station_nr_serving_cell_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6791
0
{
6792
0
    unsigned base_offset = *offset;
6793
0
    uint32_t provider_id_offset, provider_id_size;
6794
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6795
0
    *offset += 4;
6796
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6797
0
    *offset += 4;
6798
0
    proto_tree_add_item(tree, hf_mbim_base_station_nci, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
6799
0
    *offset += 8;
6800
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6801
0
    *offset += 4;
6802
0
    proto_tree_add_item(tree, hf_mbim_base_station_arfcn, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6803
0
    *offset += 4;
6804
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6805
0
    *offset += 4;
6806
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6807
0
    *offset += 4;
6808
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6809
0
    *offset += 4;
6810
0
    proto_tree_add_item(tree, hf_mbim_base_station_sinr, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6811
0
    *offset += 4;
6812
0
    proto_tree_add_item(tree, hf_mbim_base_station_timing_advance, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
6813
0
    *offset += 8;
6814
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6815
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6816
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6817
0
}
6818
6819
static void mbim_dissect_base_station_nr_neighbor_cell_info(tvbuff_t* tvb, proto_tree* tree, unsigned *offset)
6820
0
{
6821
0
    unsigned base_offset = *offset;
6822
0
    uint32_t provider_id_offset, provider_id_size, cell_id_offset, cell_id_size;
6823
0
    proto_tree_add_bitmask(tree, tvb, *offset, hf_mbim_base_station_system_sub_type, ett_mbim_bitmap,
6824
0
        mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6825
0
    *offset += 4;
6826
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_offset);
6827
0
    *offset += 4;
6828
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_provider_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &provider_id_size);
6829
0
    *offset += 4;
6830
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cell_id_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &cell_id_offset);
6831
0
    *offset += 4;
6832
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cell_id_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN, &cell_id_size);
6833
0
    *offset += 4;
6834
0
    proto_tree_add_item(tree, hf_mbim_base_station_physical_cell_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6835
0
    *offset += 4;
6836
0
    proto_tree_add_item(tree, hf_mbim_base_station_tac, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6837
0
    *offset += 4;
6838
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrp, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6839
0
    *offset += 4;
6840
0
    proto_tree_add_item(tree, hf_mbim_base_station_rsrq, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6841
0
    *offset += 4;
6842
0
    proto_tree_add_item(tree, hf_mbim_base_station_sinr, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
6843
0
    *offset += 4;
6844
0
    proto_tree_add_item(tree, hf_mbim_base_station_provider_id, tvb, base_offset + provider_id_offset,
6845
0
        provider_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6846
0
    *offset += ROUND_UP_COUNT(provider_id_size, 4);
6847
0
    proto_tree_add_item(tree, hf_mbim_base_station_cell_id_string, tvb, base_offset + cell_id_offset,
6848
0
        cell_id_size, ENC_LITTLE_ENDIAN | ENC_UTF_16);
6849
0
    *offset += ROUND_UP_COUNT(cell_id_size, 4);
6850
0
}
6851
6852
static void
6853
mbim_dissect_base_station_info(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
6854
    struct mbim_conv_info* mbim_conv)
6855
0
{
6856
0
    proto_tree* subtree, *sub_subtree;
6857
0
    unsigned base_offset = offset;
6858
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,
6859
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,
6860
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;
6861
6862
0
    uint32_t count;
6863
6864
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_base_station_system_type, ett_mbim_bitmap,
6865
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
6866
0
    offset += 4;
6867
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6868
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_base_station_system_sub_type, ett_mbim_bitmap,
6869
0
            mbim_data_subclass_fields, ENC_LITTLE_ENDIAN);
6870
0
        offset += 4;
6871
0
    }
6872
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);
6873
0
    offset += 4;
6874
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);
6875
0
    offset += 4;
6876
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);
6877
0
    offset += 4;
6878
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);
6879
0
    offset += 4;
6880
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);
6881
0
    offset += 4;
6882
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);
6883
0
    offset += 4;
6884
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);
6885
0
    offset += 4;
6886
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);
6887
0
    offset += 4;
6888
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_nmr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_nmr_offset);
6889
0
    offset += 4;
6890
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_gsm_nmr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &gsm_nmr_size);
6891
0
    offset += 4;
6892
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_mrl_offset);
6893
0
    offset += 4;
6894
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_umts_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &umts_mrl_size);
6895
0
    offset += 4;
6896
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);
6897
0
    offset += 4;
6898
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);
6899
0
    offset += 4;
6900
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_mrl_offset);
6901
0
    offset += 4;
6902
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_lte_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &lte_mrl_size);
6903
0
    offset += 4;
6904
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cdma_mrl_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cdma_mrl_offset);
6905
0
    offset += 4;
6906
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_base_station_cdma_mrl_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &cdma_mrl_size);
6907
0
    offset += 4;
6908
0
    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
6909
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);
6910
0
        offset += 4;
6911
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);
6912
0
        offset += 4;
6913
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);
6914
0
        offset += 4;
6915
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);
6916
0
    }
6917
6918
0
    if (gsm_serving_cell_offset && gsm_serving_cell_size) {
6919
0
        offset = base_offset + gsm_serving_cell_offset;
6920
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, gsm_serving_cell_size, ett_mbim_pair_list, NULL, "Gsm Serving Cell");
6921
0
        mbim_dissect_base_station_gsm_serving_cell_info(tvb, subtree, offset);
6922
0
    }
6923
6924
0
    if (umts_serving_cell_offset && umts_serving_cell_size) {
6925
0
        offset = base_offset + umts_serving_cell_offset;
6926
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, umts_serving_cell_size, ett_mbim_pair_list, NULL, "Umts Serving Cell");
6927
0
        mbim_dissect_base_station_umts_serving_cell_info(tvb, subtree, offset);
6928
0
    }
6929
6930
0
    if (td_scdma_serving_cell_offset && td_scdma_serving_cell_size) {
6931
0
        offset = base_offset + td_scdma_serving_cell_offset;
6932
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, td_scdma_serving_cell_size, ett_mbim_pair_list, NULL, "Td Scdma Serving Cell");
6933
0
        mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvb, subtree, &offset);
6934
0
    }
6935
6936
0
    if (lte_serving_cell_offset && lte_serving_cell_size) {
6937
0
        offset = base_offset + lte_serving_cell_offset;
6938
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_serving_cell_size, ett_mbim_pair_list, NULL, "Lte Serving Cell");
6939
0
        mbim_dissect_base_station_lte_serving_cell_info(tvb, subtree, offset);
6940
0
    }
6941
6942
0
    if (gsm_nmr_offset && gsm_nmr_size) {
6943
0
        offset = base_offset + gsm_nmr_offset;
6944
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, gsm_nmr_size, ett_mbim_pair_list, NULL, "Gsm Nmr");
6945
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6946
0
        offset += 4;
6947
0
        for (uint32_t i = 0; i < count; i++) {
6948
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Nmr Info #%u", i);
6949
0
            mbim_dissect_base_station_gsm_nmr_info(tvb, sub_subtree, &offset);
6950
0
        }
6951
0
    }
6952
6953
0
    if (umts_mrl_offset && umts_mrl_size) {
6954
0
        offset = base_offset + umts_mrl_offset;
6955
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, umts_mrl_size, ett_mbim_pair_list, NULL, "Umts Mrl");
6956
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6957
0
        offset += 4;
6958
0
        for (uint32_t i = 0; i < count; i++) {
6959
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6960
0
            mbim_dissect_base_station_umts_mrl_info(tvb, sub_subtree, &offset);
6961
0
        }
6962
0
    }
6963
6964
0
    if (td_scdma_mrl_offset && td_scdma_mrl_size) {
6965
0
        offset = base_offset + td_scdma_mrl_offset;
6966
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, td_scdma_mrl_size, ett_mbim_pair_list, NULL, "Td Scdma Mrl");
6967
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6968
0
        offset += 4;
6969
0
        for (uint32_t i = 0; i < count; i++) {
6970
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6971
0
            mbim_dissect_base_station_td_scdma_serving_cell_and_mrl_info(tvb, sub_subtree, &offset);
6972
0
        }
6973
0
    }
6974
6975
0
    if (lte_mrl_offset && lte_mrl_size) {
6976
0
        offset = base_offset + lte_mrl_offset;
6977
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Lte Mrl");
6978
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6979
0
        offset += 4;
6980
0
        for (uint32_t i = 0; i < count; i++) {
6981
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6982
0
            mbim_dissect_base_station_lte_mrl_info(tvb, sub_subtree, &offset);
6983
0
        }
6984
0
    }
6985
6986
0
    if (cdma_mrl_offset && cdma_mrl_size) {
6987
0
        offset = base_offset + cdma_mrl_offset;
6988
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Cdma Mrl");
6989
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
6990
0
        offset += 4;
6991
0
        for (uint32_t i = 0; i < count; i++) {
6992
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Mrl Info #%u", i);
6993
0
            mbim_dissect_base_station_cdma_mrl_info(tvb, sub_subtree, &offset);
6994
0
        }
6995
0
    }
6996
6997
0
    if (nr_serving_cells_offset && nr_serving_cells_size)
6998
0
    {
6999
0
        offset = base_offset + nr_serving_cells_offset;
7000
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Nr Serving Cells");
7001
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
7002
0
        offset += 4;
7003
0
        for (uint32_t i = 0; i < count; i++) {
7004
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Cell Info #%u", i);
7005
0
            mbim_dissect_base_station_nr_serving_cell_info(tvb, sub_subtree, &offset);
7006
0
        }
7007
0
    }
7008
7009
0
    if (nr_neighbor_cells_offset && nr_neighbor_cells_size)
7010
0
    {
7011
0
        offset = base_offset + nr_neighbor_cells_offset;
7012
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lte_mrl_size, ett_mbim_pair_list, NULL, "Nr Neighbor Cells");
7013
0
        proto_tree_add_item_ret_uint(subtree, hf_mbim_base_station_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &count);
7014
0
        offset += 4;
7015
0
        for (uint32_t i = 0; i < count; i++) {
7016
0
            sub_subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Cell Info #%u", i);
7017
0
            mbim_dissect_base_station_nr_neighbor_cell_info(tvb, sub_subtree, &offset);
7018
0
        }
7019
0
    }
7020
0
}
7021
7022
static void
7023
mbim_dissect_version(tvbuff_t* tvb, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
7024
0
{
7025
0
    uint32_t extended_version;
7026
7027
0
    proto_tree_add_item(tree, hf_mbim_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7028
0
    offset += 2;
7029
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_extended_version, tvb, offset, 2, ENC_LITTLE_ENDIAN, &extended_version);
7030
0
    switch (extended_version) {
7031
0
        case 0x0100:
7032
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_1;
7033
0
            break;
7034
0
        case 0x0200:
7035
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_2;
7036
0
            break;
7037
0
        case 0x0300:
7038
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_3;
7039
0
            break;
7040
0
        case 0x0400:
7041
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_4;
7042
0
            break;
7043
0
        default:
7044
0
            mbim_conv->mbim_extended_version = MBIM_Extended_Version_Unknown;
7045
0
            break;
7046
0
    }
7047
0
}
7048
7049
static void
7050
mbim_dissect_ms_modem_config_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, uint32_t buffer_len)
7051
0
{
7052
0
    proto_tree *config_name, *unnamed_ies;
7053
0
    uint32_t base_offset;
7054
7055
0
    base_offset = offset;
7056
0
    proto_tree_add_item(tree, hf_mbim_ms_modem_config_config_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7057
0
    offset += 4;
7058
0
    config_name = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Config Name");
7059
0
    mbim_dissect_tlv_ie(tvb, pinfo, config_name, &offset);
7060
0
    while ((uint32_t)offset - base_offset < buffer_len) {
7061
0
        unnamed_ies = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Unnamed IE's");
7062
0
        mbim_dissect_tlv_ie(tvb, pinfo, unnamed_ies, &offset);
7063
0
    }
7064
0
}
7065
7066
static void
7067
mbim_dissect_ms_registration_params_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset, uint32_t buffer_len)
7068
0
{
7069
0
    uint32_t base_offset;
7070
7071
0
    base_offset = offset;
7072
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_mico_mode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7073
0
    offset += 4;
7074
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_drx_params, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7075
0
    offset += 4;
7076
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_ladn_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7077
0
    offset += 4;
7078
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_default_pdu_hint, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7079
0
    offset += 4;
7080
0
    proto_tree_add_item(tree, hf_mbim_ms_registration_params_info_re_register_if_needed, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7081
0
    offset += 4;
7082
7083
0
    mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
7084
0
}
7085
7086
static void
7087
mbim_dissect_ms_network_params_info(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset, uint32_t buffer_len)
7088
0
{
7089
0
    uint32_t base_offset =  offset;
7090
0
    proto_tree_add_item(tree, hf_mbim_ms_network_params_info_mico_indication, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7091
0
    offset += 4;
7092
0
    proto_tree_add_item(tree, hf_mbim_ms_network_params_info_drx_params, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7093
0
    offset += 4;
7094
7095
0
    mbim_dissect_tlv_ie_list(tvb, pinfo, tree, offset, base_offset, buffer_len);
7096
0
}
7097
7098
static void
7099
mbim_dissect_ms_wake_reason(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
7100
0
{
7101
0
    proto_tree *wake_reason_tree;
7102
0
    proto_tree_add_item(tree, hf_mbim_ms_wake_reason_wake_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7103
0
    offset += 4;
7104
0
    proto_tree_add_item(tree, hf_mbim_ms_wake_reason_session_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7105
0
    offset += 4;
7106
0
    wake_reason_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_mbim_pair_list, NULL, "Wake Reason");
7107
0
    mbim_dissect_tlv_ie(tvb, pinfo, wake_reason_tree, &offset);
7108
0
}
7109
7110
static void
7111
mbim_dissect_ms_atr_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, unsigned offset)
7112
0
{
7113
0
    unsigned base_offset;
7114
0
    uint32_t atr_offset, atr_size;
7115
0
    tvbuff_t *next_tvb;
7116
7117
0
    base_offset = offset;
7118
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_atr_info_atr_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &atr_size);
7119
0
    offset += 4;
7120
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_atr_info_atr_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &atr_offset);
7121
7122
0
    if (atr_offset && atr_size) {
7123
0
        if (iso7816_atr_handle) {
7124
0
            next_tvb = tvb_new_subset_length(tvb, base_offset + atr_offset, atr_size);
7125
0
            call_dissector(iso7816_atr_handle, next_tvb, pinfo, tree);
7126
0
        } else {
7127
0
            proto_tree_add_item(tree, hf_mbim_info_buffer, tvb, base_offset + atr_offset, atr_size, ENC_NA);
7128
0
        }
7129
7130
        // TODO: check atr_size <= 33
7131
0
    }
7132
0
}
7133
7134
static void
7135
mbim_dissect_ms_open_channel(tvbuff_t* tvb, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
7136
0
{
7137
0
    uint32_t base_offset = offset;
7138
0
    uint32_t app_id_offset, app_id_size;
7139
7140
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);
7141
0
    offset += 4;
7142
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);
7143
0
    offset += 4;
7144
0
    proto_tree_add_item(tree, hf_mbim_ms_open_channel_select_p2_arg, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7145
0
    offset += 4;
7146
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7147
0
    offset += 4;
7148
7149
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7150
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7151
0
    }
7152
0
    if (app_id_offset && app_id_size) {
7153
0
        proto_tree_add_item(tree, hf_mbim_ms_open_channel_app_id, tvb, base_offset + app_id_offset, app_id_size, ENC_NA);
7154
0
    }
7155
0
}
7156
7157
static void
7158
mbim_dissect_ms_open_channel_info(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
7159
0
{
7160
0
    uint32_t base_offset = offset;
7161
0
    uint32_t response_offset, response_length;
7162
7163
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7164
0
    offset += 4;
7165
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7166
0
    offset += 4;
7167
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
7168
0
    offset += 4;
7169
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_offset);
7170
7171
0
    if (response_offset && response_length) {
7172
0
        proto_tree_add_item(tree, hf_mbim_ms_uicc_response, tvb, base_offset + response_offset, response_length, ENC_NA);
7173
0
    }
7174
0
}
7175
7176
static void
7177
mbim_dissect_ms_close_channel(tvbuff_t* tvb, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
7178
0
{
7179
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7180
0
    offset += 4;
7181
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7182
0
    offset += 4;
7183
7184
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7185
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7186
0
    }
7187
0
}
7188
7189
static void
7190
mbim_dissect_ms_apdu(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
7191
0
{
7192
0
    uint32_t base_offset = offset;
7193
0
    uint32_t command_offset, command_size;
7194
0
    uint32_t padding_size;
7195
7196
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_channel, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7197
0
    offset += 4;
7198
0
    proto_tree_add_item(tree, hf_mbim_ms_apdu_secure_messaging, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7199
0
    offset += 4;
7200
0
    proto_tree_add_item(tree, hf_mbim_ms_apdu_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7201
0
    offset += 4;
7202
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_apdu_command_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &command_size);
7203
0
    offset += 4;
7204
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_apdu_command_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &command_offset);
7205
0
    offset += 4;
7206
7207
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7208
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7209
0
    }
7210
0
    if (command_offset && command_size) {
7211
0
        proto_item *item;
7212
0
        proto_tree *sub_tree;
7213
7214
0
        item = proto_tree_add_item(tree, hf_mbim_ms_apdu_command, tvb, base_offset + command_offset, command_size, ENC_NA);
7215
0
        if (mbim_uicc_apdu_dissector == UICC_APDU_GSM_SIM) {
7216
0
            if (gsm_sim_cmd_handle) {
7217
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7218
0
                call_dissector(gsm_sim_cmd_handle, tvb_new_subset_length(tvb, base_offset + command_offset, command_size), pinfo, sub_tree);
7219
0
            }
7220
0
        } else {
7221
0
            if (iso7816_handle) {
7222
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7223
0
                pinfo->p2p_dir = P2P_DIR_SENT;
7224
0
                call_dissector(iso7816_handle, tvb_new_subset_length(tvb, base_offset + command_offset, command_size), pinfo, sub_tree);
7225
0
            }
7226
0
        }
7227
0
    }
7228
7229
0
    padding_size = WS_PADDING_TO_4(command_size);
7230
0
    if (padding_size > 0) {
7231
0
        proto_tree_add_item(tree, hf_mbim_ms_apdu_padding, tvb, base_offset + command_offset + command_size, padding_size, ENC_NA);
7232
0
    }
7233
0
}
7234
7235
static void
7236
mbim_dissect_ms_apdu_info(tvbuff_t* tvb, packet_info *pinfo, proto_tree* tree, unsigned offset)
7237
0
{
7238
0
    uint32_t base_offset = offset;
7239
0
    uint32_t response_offset, response_length;
7240
0
    uint32_t padding_size;
7241
7242
0
    proto_tree_add_item(tree, hf_mbim_ms_uicc_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7243
0
    offset += 4;
7244
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_length, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_length);
7245
0
    offset += 4;
7246
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_uicc_response_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_offset);
7247
7248
0
    if (response_offset && response_length) {
7249
0
        proto_item *item;
7250
0
        proto_tree *sub_tree;
7251
0
        tvbuff_t *response_tvb;
7252
7253
        /* Combine the response APDU and status */
7254
0
        response_tvb = tvb_new_composite();
7255
0
        tvb_composite_append(response_tvb, tvb_new_subset_length(tvb, base_offset + response_offset, response_length));
7256
0
        tvb_composite_append(response_tvb, tvb_new_subset_length(tvb, base_offset, 2));
7257
0
        tvb_composite_finalize(response_tvb);
7258
0
        add_new_data_source(pinfo, response_tvb, "UICC response");
7259
7260
0
        item = proto_tree_add_item(tree, hf_mbim_ms_uicc_response, tvb, base_offset + response_offset, response_length, ENC_NA);
7261
0
        if (mbim_uicc_apdu_dissector == UICC_APDU_GSM_SIM) {
7262
0
            if (gsm_sim_rsp_handle) {
7263
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7264
0
                call_dissector(gsm_sim_rsp_handle, response_tvb, pinfo, sub_tree);
7265
0
            }
7266
0
        } else {
7267
0
            if (iso7816_handle) {
7268
0
                sub_tree = proto_item_add_subtree(item, ett_mbim_buffer);
7269
0
                pinfo->p2p_dir = P2P_DIR_RECV;
7270
0
                call_dissector(iso7816_handle, response_tvb, pinfo, sub_tree);
7271
0
            }
7272
0
        }
7273
0
    }
7274
7275
0
    padding_size = WS_PADDING_TO_4(response_length);
7276
0
    if (padding_size > 0) {
7277
0
        proto_tree_add_item(tree, hf_mbim_ms_uicc_padding, tvb, base_offset + response_offset + response_length, padding_size, ENC_NA);
7278
0
    }
7279
0
}
7280
7281
static void
7282
mbim_dissect_ms_terminal_capability_info(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned information_buffer_base_offset, unsigned offset)
7283
0
{
7284
0
    uint32_t capability_count;
7285
0
    wmem_array_t* pair_list = NULL;
7286
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
7287
0
    proto_tree* subtree;
7288
7289
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_terminal_capability_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &capability_count);
7290
0
    offset += 4;
7291
0
    if (capability_count) {
7292
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
7293
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * capability_count, ett_mbim_pair_list, NULL, "Capability List");
7294
0
        for (uint32_t i = 0; i < capability_count; i++) {
7295
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_terminal_capability_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.offset);
7296
0
            offset += 4;
7297
0
            proto_tree_add_item_ret_uint(subtree, hf_mbim_ms_terminal_capability_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &pair_list_item.size);
7298
0
            offset += 4;
7299
0
            wmem_array_append_one(pair_list, pair_list_item);
7300
0
        }
7301
0
    }
7302
0
    for (uint32_t i = 0; i < capability_count; i++) {
7303
0
        p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
7304
0
        offset = information_buffer_base_offset + p_pair_list_item->offset;
7305
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, p_pair_list_item->size,
7306
0
            ett_mbim_pair_list, NULL, "Capability #%u", i + 1);
7307
0
        if (p_pair_list_item->size && p_pair_list_item->offset) {
7308
0
            proto_tree_add_item(subtree, hf_mbim_ms_terminal_capability, tvb, offset, p_pair_list_item->size, ENC_NA);
7309
0
        }
7310
0
    }
7311
0
}
7312
7313
static void
7314
mbim_dissect_ms_set_terminal_capability(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
7315
0
{
7316
0
    unsigned base_offset = offset;
7317
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7318
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7319
0
        offset += 4;
7320
0
    }
7321
7322
0
    mbim_dissect_ms_terminal_capability_info(tvb,pinfo, tree, base_offset, offset);
7323
0
}
7324
7325
static void
7326
mbim_dissect_ms_set_reset(tvbuff_t* tvb, proto_tree* tree, unsigned offset, struct mbim_conv_info* mbim_conv)
7327
0
{
7328
0
    proto_tree_add_item(tree, hf_mbim_ms_reset_pass_through_action, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7329
0
    offset += 4;
7330
0
    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7331
0
        proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7332
0
    }
7333
0
}
7334
7335
static void
7336
mbim_dissect_ms_query_reset(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
7337
0
{
7338
0
    proto_tree_add_item(tree, hf_mbim_ms_slot_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7339
0
}
7340
7341
static void
7342
mbim_dissect_ms_app_info_elements(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7343
0
{
7344
0
    uint32_t base_offset = offset;
7345
0
    uint32_t app_id_offset, app_id_size, app_name_offset, app_name_size, pin_ref_offset, pin_ref_size, num_pins;
7346
7347
0
    proto_tree_add_item(tree, hf_mbim_ms_app_info_app_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7348
0
    offset += 4;
7349
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);
7350
0
    offset += 4;
7351
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);
7352
0
    offset += 4;
7353
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);
7354
0
    offset += 4;
7355
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);
7356
0
    offset += 4;
7357
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_info_num_pins, tvb, offset, 4, ENC_LITTLE_ENDIAN, &num_pins);
7358
0
    offset += 4;
7359
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);
7360
0
    offset += 4;
7361
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);
7362
7363
0
    if (app_id_offset && app_id_size) {
7364
0
        proto_tree_add_item(tree, hf_mbim_ms_app_info_app_id, tvb, base_offset + app_id_offset, app_id_size, ENC_NA);
7365
0
    }
7366
0
    if (app_name_offset && app_name_size) {
7367
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);
7368
0
    }
7369
0
    if (num_pins) {
7370
0
        proto_tree_add_item(tree, hf_mbim_ms_app_info_pin_ref, tvb, base_offset + pin_ref_offset, pin_ref_size, ENC_NA);
7371
0
    }
7372
0
}
7373
7374
static void
7375
mbim_dissect_ms_app_list(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, unsigned offset)
7376
0
{
7377
0
    unsigned base_offset;
7378
0
    uint32_t app_count;
7379
0
    wmem_array_t* pair_list = NULL;
7380
0
    struct mbim_pair_list pair_list_item, * p_pair_list_item;
7381
0
    proto_tree* subtree;
7382
7383
0
    base_offset = offset;
7384
0
    proto_tree_add_item(tree, hf_mbim_ms_app_list_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7385
0
    offset += 4;
7386
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_app_list_app_count, tvb, offset, 4, ENC_LITTLE_ENDIAN, &app_count);
7387
0
    offset += 4;
7388
0
    proto_tree_add_item(tree, hf_mbim_ms_app_list_active_app_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7389
0
    offset += 4;
7390
0
    proto_tree_add_item(tree, hf_mbim_ms_app_list_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7391
0
    offset += 4;
7392
0
    if (app_count) {
7393
0
        pair_list = wmem_array_new(pinfo->pool, sizeof(struct mbim_pair_list));
7394
0
        subtree = proto_tree_add_subtree(tree, tvb, offset, 8 * app_count, ett_mbim_pair_list, NULL, "App List");
7395
0
        for (uint32_t i = 0; i < app_count; i++) {
7396
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);
7397
0
            offset += 4;
7398
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);
7399
0
            offset += 4;
7400
0
            wmem_array_append_one(pair_list, pair_list_item);
7401
0
        }
7402
0
    }
7403
0
    for (uint32_t i = 0; i < app_count; i++) {
7404
0
        p_pair_list_item = (struct mbim_pair_list*)wmem_array_index(pair_list, i);
7405
0
        offset = base_offset + p_pair_list_item->offset;
7406
0
        subtree = proto_tree_add_subtree_format(tree, tvb, offset, p_pair_list_item->size,
7407
0
            ett_mbim_pair_list, NULL, "App Info #%u", i + 1);
7408
0
        if (p_pair_list_item->size && p_pair_list_item->offset) {
7409
0
            mbim_dissect_ms_app_info_elements(tvb, pinfo, subtree, offset);
7410
0
        }
7411
0
    }
7412
0
}
7413
7414
static void
7415
mbim_dissect_ms_file_path(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7416
0
{
7417
0
    unsigned base_offset;
7418
0
    uint32_t app_id_offset, app_id_size, file_path_offset, file_path_size;
7419
7420
0
    base_offset = offset;
7421
0
    proto_tree_add_item(tree, hf_mbim_ms_file_path_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7422
0
    offset += 4;
7423
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);
7424
0
    offset += 4;
7425
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);
7426
0
    offset += 4;
7427
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);
7428
0
    offset += 4;
7429
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);
7430
0
    if (app_id_offset && app_id_size) {
7431
0
        proto_tree_add_item(tree, hf_mbim_ms_file_path_app_id, tvb, base_offset + app_id_offset,
7432
0
            app_id_size, ENC_NA);
7433
0
    }
7434
0
    if (file_path_offset && file_path_size) {
7435
0
        proto_tree_add_item(tree, hf_mbim_ms_file_path_file_path, tvb, base_offset + file_path_offset,
7436
0
            file_path_size, ENC_NA);
7437
0
    }
7438
0
}
7439
7440
static void
7441
mbim_dissect_ms_file_status(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7442
0
{
7443
0
    uint32_t i;
7444
7445
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7446
0
    offset += 4;
7447
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_status_word_1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7448
0
    offset += 4;
7449
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_status_word_2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7450
0
    offset += 4;
7451
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_file_accessibility, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7452
0
    offset += 4;
7453
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_file_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7454
0
    offset += 4;
7455
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_file_structure, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7456
0
    offset += 4;
7457
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_item_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7458
0
    offset += 4;
7459
0
    proto_tree_add_item(tree, hf_mbim_ms_file_status_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7460
0
    for (i = 0; i < 4; i++) {
7461
0
        offset += 4;
7462
0
        proto_tree_add_item(tree, hf_mbim_ms_file_status_file_lock_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7463
0
    }
7464
0
}
7465
7466
static void
7467
mbim_dissect_ms_response(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7468
0
{
7469
0
    unsigned base_offset;
7470
0
    uint32_t response_data_offset, response_data_size;
7471
7472
0
    base_offset = offset;
7473
0
    proto_tree_add_item(tree, hf_mbim_ms_response_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7474
0
    offset += 4;
7475
0
    proto_tree_add_item(tree, hf_mbim_ms_response_status_word_1, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7476
0
    offset += 4;
7477
0
    proto_tree_add_item(tree, hf_mbim_ms_response_status_word_2, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7478
0
    offset += 4;
7479
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_response_response_data_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_data_offset);
7480
0
    offset += 4;
7481
0
    proto_tree_add_item_ret_uint(tree, hf_mbim_ms_response_response_data_size, tvb, offset, 4, ENC_LITTLE_ENDIAN, &response_data_size);
7482
0
    if (response_data_offset && response_data_size) {
7483
0
        proto_tree_add_item(tree, hf_mbim_ms_response_response_data, tvb, base_offset + response_data_offset,
7484
0
            response_data_size, ENC_NA);
7485
0
    }
7486
0
}
7487
7488
static void
7489
mbim_dissect_ms_access_binary(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7490
0
{
7491
0
    unsigned base_offset;
7492
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;
7493
7494
0
    base_offset = offset;
7495
0
    proto_tree_add_item(tree, hf_mbim_ms_access_binary_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7496
0
    offset += 4;
7497
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);
7498
0
    offset += 4;
7499
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);
7500
0
    offset += 4;
7501
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);
7502
0
    offset += 4;
7503
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);
7504
0
    offset += 4;
7505
0
    proto_tree_add_item(tree, hf_mbim_ms_access_binary_file_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7506
0
    offset += 4;
7507
0
    proto_tree_add_item(tree, hf_mbim_ms_access_binary_number_of_bytes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7508
0
    offset += 4;
7509
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);
7510
0
    offset += 4;
7511
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);
7512
0
    offset += 4;
7513
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);
7514
0
    offset += 4;
7515
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);
7516
0
    if (app_id_offset && app_id_size) {
7517
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_app_id, tvb, base_offset + app_id_offset,
7518
0
            app_id_size, ENC_NA);
7519
0
    }
7520
0
    if (file_path_offset && file_path_size) {
7521
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_file_path, tvb, base_offset + file_path_offset,
7522
0
            file_path_size, ENC_NA);
7523
0
    }
7524
0
    if (local_pin_offset && local_pin_size) {
7525
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_local_pin, tvb, base_offset + local_pin_offset,
7526
0
            local_pin_size, ENC_UTF_8);
7527
0
    }
7528
0
    if (binary_data_offset && binary_data_size) {
7529
0
        proto_tree_add_item(tree, hf_mbim_ms_access_binary_binary_data, tvb, base_offset + binary_data_offset,
7530
0
            binary_data_size, ENC_NA);
7531
0
    }
7532
0
}
7533
7534
static void
7535
mbim_dissect_ms_access_record(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7536
0
{
7537
0
    unsigned base_offset;
7538
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;
7539
7540
0
    base_offset = offset;
7541
0
    proto_tree_add_item(tree, hf_mbim_ms_access_record_version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7542
0
    offset += 4;
7543
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);
7544
0
    offset += 4;
7545
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);
7546
0
    offset += 4;
7547
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);
7548
0
    offset += 4;
7549
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);
7550
0
    offset += 4;
7551
0
    proto_tree_add_item(tree, hf_mbim_ms_access_record_record_number, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7552
0
    offset += 4;
7553
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);
7554
0
    offset += 4;
7555
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);
7556
0
    offset += 4;
7557
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);
7558
0
    offset += 4;
7559
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);
7560
0
    if (app_id_offset && app_id_size) {
7561
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_app_id, tvb, base_offset + app_id_offset,
7562
0
            app_id_size, ENC_NA);
7563
0
    }
7564
0
    if (file_path_offset && file_path_size) {
7565
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_file_path, tvb, base_offset + file_path_offset,
7566
0
            file_path_size, ENC_NA);
7567
0
    }
7568
0
    if (local_pin_offset && local_pin_size) {
7569
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_local_pin, tvb, base_offset + local_pin_offset,
7570
0
            local_pin_size, ENC_LITTLE_ENDIAN | ENC_UTF_8);
7571
0
    }
7572
0
    if (record_data_offset && record_data_size) {
7573
0
        proto_tree_add_item(tree, hf_mbim_ms_access_record_record_data, tvb, base_offset + record_data_offset,
7574
0
            record_data_size, ENC_NA);
7575
0
    }
7576
0
}
7577
7578
static void
7579
mbim_dissect_ms_nitz(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, unsigned offset)
7580
0
{
7581
0
    proto_tree_add_item(tree, hf_mbim_nitz_year, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7582
0
    offset += 4;
7583
0
    proto_tree_add_item(tree, hf_mbim_nitz_month, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7584
0
    offset += 4;
7585
0
    proto_tree_add_item(tree, hf_mbim_nitz_day, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7586
0
    offset += 4;
7587
0
    proto_tree_add_item(tree, hf_mbim_nitz_hour, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7588
0
    offset += 4;
7589
0
    proto_tree_add_item(tree, hf_mbim_nitz_minute, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7590
0
    offset += 4;
7591
0
    proto_tree_add_item(tree, hf_mbim_nitz_second, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7592
0
    offset += 4;
7593
0
    proto_tree_add_item(tree, hf_mbim_nitz_timezone_offset_minutes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7594
0
    offset += 4;
7595
0
    proto_tree_add_item(tree, hf_mbim_nitz_daylight_saving_time_offset_minutes, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7596
0
    offset += 4;
7597
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_mbim_nitz_data_class, ett_mbim_bitmap,
7598
0
        mbim_data_class_fields, ENC_LITTLE_ENDIAN);
7599
0
}
7600
7601
static int
7602
dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
7603
0
{
7604
0
    proto_item *ti;
7605
0
    proto_tree *mbim_tree, *header_tree, *subtree;
7606
0
    unsigned offset = 0;
7607
0
    uint32_t msg_type, trans_id, open_count;
7608
0
    uint64_t trans_id_key, *p_trans_id_key;
7609
0
    conversation_t *conversation;
7610
0
    struct mbim_conv_info *mbim_conv;
7611
0
    struct mbim_info *mbim_info = NULL;
7612
7613
0
    if (data) {
7614
0
        usb_trans_info_t *usb_trans_info = ((urb_info_t *)data)->usb_trans_info;
7615
0
        if (usb_trans_info && (usb_trans_info->setup.request == 0x00)) {
7616
0
            tree = proto_tree_get_parent_tree(tree);
7617
0
        }
7618
0
    }
7619
7620
0
    if (mbim_control_decode_unknown_itf && (tvb_reported_length_remaining(tvb, offset) < 12)) {
7621
0
        return 0;
7622
0
    }
7623
7624
0
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM");
7625
0
    col_clear(pinfo->cinfo, COL_INFO);
7626
7627
0
    conversation = find_or_create_conversation(pinfo);
7628
0
    mbim_conv = (struct mbim_conv_info *)conversation_get_proto_data(conversation, proto_mbim);
7629
0
    if (!mbim_conv) {
7630
0
        mbim_conv = wmem_new(wmem_file_scope(), struct mbim_conv_info);
7631
0
        mbim_conv->trans = wmem_map_new(wmem_file_scope(), wmem_int64_hash, g_int64_equal);
7632
0
        mbim_conv->open = wmem_tree_new(wmem_file_scope());
7633
0
        mbim_conv->cellular_class = 0;
7634
0
        mbim_conv->mbim_extended_version = MBIM_Extended_Version_Unknown;
7635
0
        mbim_conv->open_count = 0;
7636
0
        wmem_tree_insert32(mbim_conv->open, pinfo->num, GUINT_TO_POINTER(mbim_conv->open_count));
7637
0
        conversation_add_proto_data(conversation, proto_mbim, mbim_conv);
7638
0
    }
7639
7640
0
    ti = proto_tree_add_item(tree, proto_mbim, tvb, offset, -1, ENC_NA);
7641
0
    mbim_tree = proto_item_add_subtree(ti, ett_mbim);
7642
0
    ti = proto_tree_add_item(mbim_tree, hf_mbim_control, tvb, offset, 0, ENC_NA);
7643
0
    proto_item_set_hidden(ti);
7644
7645
0
    header_tree = proto_tree_add_subtree(mbim_tree, tvb, offset, 12, ett_mbim_msg_header, NULL, "Message Header");
7646
0
    proto_tree_add_item_ret_uint(header_tree, hf_mbim_header_message_type, tvb, offset, 4, ENC_LITTLE_ENDIAN, &msg_type);
7647
0
    col_add_fstr(pinfo->cinfo, COL_INFO, "%-19s", val_to_str_const(msg_type, mbim_msg_type_vals, "Unknown"));
7648
0
    offset += 4;
7649
0
    proto_tree_add_item(header_tree, hf_mbim_header_message_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7650
0
    offset += 4;
7651
0
    proto_tree_add_item_ret_uint(header_tree, hf_mbim_header_transaction_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &trans_id);
7652
0
    offset += 4;
7653
7654
0
    switch (msg_type) {
7655
0
        case MBIM_OPEN_MSG:
7656
0
            {
7657
0
                uint32_t max_ctrl_transfer;
7658
7659
0
                if (!PINFO_FD_VISITED(pinfo)) {
7660
0
                    mbim_conv->open_count++;
7661
0
                    wmem_tree_insert32(mbim_conv->open, pinfo->num, GUINT_TO_POINTER(mbim_conv->open_count));
7662
0
                }
7663
0
                max_ctrl_transfer = tvb_get_letohl(tvb, offset);
7664
0
                if (max_ctrl_transfer == 8) {
7665
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);
7666
0
                } else {
7667
0
                    ti = proto_tree_add_uint(mbim_tree, hf_mbim_max_ctrl_transfer, tvb, offset, 4, max_ctrl_transfer);
7668
0
                    if (max_ctrl_transfer < 64) {
7669
0
                        expert_add_info(pinfo, ti, &ei_mbim_max_ctrl_transfer);
7670
0
                    }
7671
0
                }
7672
0
            }
7673
0
            break;
7674
0
        case MBIM_CLOSE_MSG:
7675
0
            break;
7676
0
        case MBIM_COMMAND_MSG:
7677
0
            {
7678
0
                uint32_t info_buff_len, current_frag, total_frag, cid, cmd_type;
7679
0
                uint8_t uuid_idx;
7680
0
                fragment_head *frag_data;
7681
0
                tvbuff_t *frag_tvb;
7682
0
                struct mbim_uuid_ext *uuid_ext_info = NULL;
7683
7684
0
                subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 8, ett_mbim_frag_header, NULL, "Fragment Header");
7685
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_total, tvb, offset, 4, ENC_LITTLE_ENDIAN, &total_frag);
7686
0
                offset += 4;
7687
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_current, tvb, offset, 4, ENC_LITTLE_ENDIAN, &current_frag);
7688
0
                offset += 4;
7689
0
                if (total_frag > 1) {
7690
0
                    frag_data = fragment_add_seq_check(&mbim_reassembly_table, tvb, offset, pinfo,
7691
0
                                                       trans_id, mbim_conv, current_frag,
7692
0
                                                       tvb_reported_length_remaining(tvb, offset),
7693
0
                                                       (current_frag != (total_frag-1)));
7694
0
                    frag_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled MBIM control message",
7695
0
                                                        frag_data, &mbim_frag_items, NULL, subtree);
7696
0
                    if (!frag_tvb) {
7697
                        /* Fragmentation reassembly not performed yet */
7698
0
                        proto_tree_add_item(mbim_tree, hf_mbim_fragmented_payload, tvb, offset, -1, ENC_NA);
7699
0
                        col_append_fstr(pinfo->cinfo, COL_INFO, ": [Fragment #%u out of %u]", current_frag+1, total_frag);
7700
0
                        break;
7701
0
                    }
7702
0
                    offset = 0;
7703
0
                } else {
7704
0
                    frag_tvb = tvb;
7705
0
                }
7706
7707
0
                open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
7708
0
                trans_id_key = ((uint64_t)open_count << 32) | trans_id;
7709
0
                if (!PINFO_FD_VISITED(pinfo)) {
7710
0
                    p_trans_id_key = wmem_new(wmem_file_scope(), uint64_t);
7711
0
                    *p_trans_id_key = trans_id_key;
7712
0
                    mbim_info = wmem_new(wmem_file_scope(), struct mbim_info);
7713
0
                    mbim_info->req_frame = pinfo->num;
7714
0
                    mbim_info->resp_frame = 0;
7715
0
                    wmem_map_insert(mbim_conv->trans, p_trans_id_key, mbim_info);
7716
0
                } else {
7717
0
                    mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
7718
0
                    if (mbim_info && mbim_info->resp_frame) {
7719
0
                        proto_item *resp_it;
7720
7721
0
                        resp_it = proto_tree_add_uint(header_tree, hf_mbim_response_in, tvb, 0, 0, mbim_info->resp_frame);
7722
0
                        proto_item_set_generated(resp_it);
7723
0
                    }
7724
0
                }
7725
7726
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);
7727
0
                cid = mbim_dissect_cid(frag_tvb, pinfo, mbim_tree, &offset, uuid_idx, uuid_ext_info);
7728
0
                proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_command_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &cmd_type);
7729
0
                if (mbim_info) {
7730
0
                    mbim_info->cmd_type = cmd_type;
7731
0
                }
7732
0
                col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str_const(cmd_type, mbim_command_type_vals, "Unknown"));
7733
0
                offset += 4;
7734
0
                proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_info_buffer_len, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &info_buff_len);
7735
0
                offset += 4;
7736
0
                subtree = mbim_tree;
7737
0
                if (info_buff_len) {
7738
0
                    subtree = proto_tree_add_subtree(mbim_tree, frag_tvb, offset, info_buff_len, ett_mbim_info_buffer, NULL, "Information Buffer");
7739
0
                }
7740
0
                switch (uuid_idx) {
7741
0
                    case UUID_BASIC_CONNECT:
7742
0
                        switch (cid) {
7743
0
                            case MBIM_CID_DEVICE_CAPS:
7744
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7745
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7746
0
                                } else if (info_buff_len) {
7747
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7748
0
                                }
7749
0
                                break;
7750
0
                            case MBIM_CID_SUBSCRIBER_READY_STATUS:
7751
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7752
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7753
0
                                } else if (info_buff_len) {
7754
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7755
0
                                        proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7756
0
                                    } else {
7757
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7758
0
                                    }
7759
0
                                }
7760
0
                                break;
7761
0
                            case MBIM_CID_RADIO_STATE:
7762
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7763
0
                                    proto_tree_add_item(subtree, hf_mbim_radio_state_set, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
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_PIN:
7769
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7770
0
                                    mbim_dissect_set_pin(frag_tvb, pinfo, subtree, offset);
7771
0
                                } else if (info_buff_len) {
7772
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7773
0
                                }
7774
0
                                break;
7775
0
                            case MBIM_CID_PIN_LIST:
7776
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7777
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, 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_HOME_PROVIDER:
7783
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7784
0
                                    mbim_dissect_provider(frag_tvb, pinfo, subtree, offset);
7785
0
                                } else if (info_buff_len) {
7786
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7787
0
                                }
7788
0
                                break;
7789
0
                            case MBIM_CID_PREFERRED_PROVIDERS:
7790
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7791
0
                                    mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
7792
0
                                } else if (info_buff_len) {
7793
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7794
0
                                }
7795
0
                                break;
7796
0
                            case MBIM_CID_VISIBLE_PROVIDERS:
7797
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7798
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7799
0
                                } else {
7800
0
                                    proto_tree_add_item(subtree, hf_mbim_visible_providers_req_action, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7801
0
                                }
7802
0
                                break;
7803
0
                            case MBIM_CID_REGISTER_STATE:
7804
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7805
0
                                    mbim_dissect_set_register_state(frag_tvb, pinfo, subtree, offset);
7806
0
                                } else if (info_buff_len) {
7807
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7808
0
                                }
7809
0
                                break;
7810
0
                            case MBIM_CID_PACKET_SERVICE:
7811
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7812
0
                                    proto_tree_add_item(subtree, hf_mbim_set_packet_service_action,
7813
0
                                                        frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7814
0
                                } else if (info_buff_len) {
7815
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7816
0
                                }
7817
0
                                break;
7818
0
                            case MBIM_CID_SIGNAL_STATE:
7819
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7820
0
                                    mbim_dissect_set_signal_state(frag_tvb, pinfo, subtree, offset);
7821
0
                                } else if (info_buff_len) {
7822
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7823
0
                                }
7824
0
                                break;
7825
0
                            case MBIM_CID_CONNECT:
7826
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7827
0
                                    if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
7828
0
                                        mbim_dissect_set_connect_v3_and_higher(frag_tvb, pinfo, subtree, offset, info_buff_len, mbim_conv);
7829
0
                                    } else {
7830
0
                                        mbim_dissect_set_connect(frag_tvb, pinfo, subtree, offset);
7831
0
                                    }
7832
0
                                } else {
7833
0
                                    proto_tree_add_item(subtree, hf_mbim_connect_info_session_id, frag_tvb,
7834
0
                                                        offset, 4, ENC_LITTLE_ENDIAN);
7835
0
                                }
7836
0
                                break;
7837
0
                            case MBIM_CID_PROVISIONED_CONTEXTS:
7838
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7839
0
                                    mbim_dissect_context(frag_tvb, pinfo, subtree, offset, true);
7840
0
                                } else if (info_buff_len) {
7841
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7842
0
                                }
7843
0
                                break;
7844
0
                            case MBIM_CID_SERVICE_ACTIVATION:
7845
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7846
0
                                    proto_tree_add_item(subtree, hf_mbim_set_service_activation_data_buffer,
7847
0
                                                        frag_tvb, offset, info_buff_len, ENC_NA);
7848
0
                                } else {
7849
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7850
0
                                }
7851
0
                                break;
7852
0
                            case MBIM_CID_IP_CONFIGURATION:
7853
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7854
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7855
0
                                } else {
7856
0
                                    proto_tree_add_item(subtree, hf_mbim_ip_configuration_info_session_id, frag_tvb,
7857
0
                                                        offset, 4, ENC_LITTLE_ENDIAN);
7858
0
                                }
7859
0
                                break;
7860
0
                            case MBIM_CID_DEVICE_SERVICES:
7861
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7862
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
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_DEVICE_SERVICE_SUBSCRIBE_LIST:
7868
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7869
0
                                    mbim_dissect_device_service_subscribe_list(frag_tvb, pinfo, subtree, offset);
7870
0
                                } else {
7871
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7872
0
                                }
7873
0
                                break;
7874
0
                            case MBIM_CID_PACKET_STATISTICS:
7875
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7876
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7877
0
                                } else if (info_buff_len) {
7878
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7879
0
                                }
7880
0
                                break;
7881
0
                            case MBIM_CID_NETWORK_IDLE_HINT:
7882
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7883
0
                                    proto_tree_add_item(subtree, hf_mbim_network_idle_hint_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7884
0
                                } else if (info_buff_len) {
7885
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7886
0
                                }
7887
0
                                break;
7888
0
                            case MBIM_CID_EMERGENCY_MODE:
7889
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7890
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7891
0
                                } else if (info_buff_len) {
7892
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7893
0
                                }
7894
0
                                break;
7895
0
                            case MBIM_CID_IP_PACKET_FILTERS:
7896
0
                                mbim_dissect_packet_filters(frag_tvb, pinfo, subtree, offset, mbim_conv);
7897
0
                                break;
7898
0
                            case MBIM_CID_MULTICARRIER_PROVIDERS:
7899
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7900
0
                                    mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
7901
0
                                } else if (info_buff_len) {
7902
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7903
0
                                }
7904
0
                                break;
7905
0
                            default:
7906
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7907
0
                                break;
7908
0
                        }
7909
0
                        break;
7910
0
                    case UUID_SMS:
7911
0
                        switch (cid) {
7912
0
                            case MBIM_CID_SMS_CONFIGURATION:
7913
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7914
0
                                    mbim_dissect_set_sms_configuration(frag_tvb, pinfo, subtree, offset);
7915
0
                                } else if (info_buff_len) {
7916
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7917
0
                                }
7918
0
                                break;
7919
0
                            case MBIM_CID_SMS_READ:
7920
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7921
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7922
0
                                } else {
7923
0
                                    mbim_dissect_sms_read_req(frag_tvb, pinfo, subtree, offset);
7924
0
                                }
7925
0
                                break;
7926
0
                            case MBIM_CID_SMS_SEND:
7927
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7928
0
                                    mbim_dissect_set_sms_send(frag_tvb, pinfo, subtree, offset, mbim_conv);
7929
0
                                } else {
7930
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7931
0
                                }
7932
0
                                break;
7933
0
                            case MBIM_CID_SMS_DELETE:
7934
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7935
0
                                    proto_tree_add_item(subtree, hf_mbim_set_sms_delete_flag,
7936
0
                                                        frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7937
0
                                    offset += 4;
7938
0
                                    proto_tree_add_item(subtree, hf_mbim_set_sms_delete_message_index,
7939
0
                                                        frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7940
0
                                } else {
7941
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7942
0
                                }
7943
0
                                break;
7944
0
                            case MBIM_CID_SMS_MESSAGE_STORE_STATUS:
7945
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7946
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
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
                            default:
7952
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7953
0
                                break;
7954
0
                        }
7955
0
                        break;
7956
0
                    case UUID_USSD:
7957
0
                        switch (cid) {
7958
0
                            case MBIM_CID_USSD:
7959
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7960
0
                                    mbim_dissect_set_ussd(frag_tvb, pinfo, subtree, offset);
7961
0
                                } else {
7962
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7963
0
                                }
7964
0
                                break;
7965
0
                            default:
7966
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7967
0
                                break;
7968
0
                        }
7969
0
                        break;
7970
0
                    case UUID_PHONEBOOK:
7971
0
                        switch (cid) {
7972
0
                            case MBIM_CID_PHONEBOOK_CONFIGURATION:
7973
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7974
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7975
0
                                } else if (info_buff_len) {
7976
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
7977
0
                                }
7978
0
                                break;
7979
0
                            case MBIM_CID_PHONEBOOK_READ:
7980
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7981
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7982
0
                                } else {
7983
0
                                    proto_tree_add_item(subtree, hf_mbim_phonebook_read_req_filter_flag, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7984
0
                                    offset += 4;
7985
0
                                    proto_tree_add_item(subtree, hf_mbim_phonebook_read_req_filter_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7986
0
                                }
7987
0
                                break;
7988
0
                            case MBIM_CID_PHONEBOOK_DELETE:
7989
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7990
0
                                    proto_tree_add_item(subtree, hf_mbim_set_phonebook_delete_filter_flag, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7991
0
                                    offset += 4;
7992
0
                                    proto_tree_add_item(subtree, hf_mbim_set_phonebook_delete_filter_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
7993
0
                                } else {
7994
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
7995
0
                                }
7996
0
                                break;
7997
0
                            case MBIM_CID_PHONEBOOK_WRITE:
7998
0
                                if (cmd_type == MBIM_COMMAND_SET) {
7999
0
                                    mbim_dissect_set_phonebook_write(frag_tvb, pinfo, subtree, offset);
8000
0
                                } else {
8001
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8002
0
                                }
8003
0
                                break;
8004
0
                            default:
8005
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8006
0
                                break;
8007
0
                        }
8008
0
                        break;
8009
0
                    case UUID_STK:
8010
0
                        switch (cid) {
8011
0
                            case MBIM_CID_STK_PAC:
8012
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8013
0
                                    mbim_dissect_set_stk_pac(frag_tvb, pinfo, subtree, offset);
8014
0
                                } else {
8015
0
                                    if (info_buff_len) {
8016
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8017
0
                                    }
8018
0
                                }
8019
0
                                break;
8020
0
                            case MBIM_CID_STK_TERMINAL_RESPONSE:
8021
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8022
0
                                    mbim_dissect_set_stk_terminal_response(frag_tvb, pinfo, subtree, offset);
8023
0
                                } else {
8024
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8025
0
                                }
8026
0
                                break;
8027
0
                            case MBIM_CID_STK_ENVELOPE:
8028
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8029
0
                                    tvbuff_t *env_tvb;
8030
0
                                    proto_tree *env_tree;
8031
8032
0
                                    ti = proto_tree_add_item(subtree, hf_mbim_set_stk_envelope_data_buffer,
8033
0
                                                             frag_tvb, offset, info_buff_len, ENC_NA);
8034
0
                                    if (bertlv_handle) {
8035
0
                                        env_tree = proto_item_add_subtree(ti, ett_mbim_buffer);
8036
0
                                        env_tvb = tvb_new_subset_length(frag_tvb, offset, info_buff_len);
8037
0
                                        call_dissector(bertlv_handle, env_tvb, pinfo, env_tree);
8038
0
                                    }
8039
0
                                } else if (info_buff_len) {
8040
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8041
0
                                }
8042
0
                                break;
8043
0
                            default:
8044
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8045
0
                                break;
8046
0
                        }
8047
0
                        break;
8048
0
                    case UUID_AUTH:
8049
0
                        switch (cid) {
8050
0
                            case MBIM_CID_AKA_AUTH:
8051
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8052
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8053
0
                                } else {
8054
0
                                    mbim_dissect_aka_auth_req(frag_tvb, pinfo, subtree, offset);
8055
0
                                }
8056
0
                                break;
8057
0
                            case MBIM_CID_AKAP_AUTH:
8058
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8059
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8060
0
                                } else {
8061
0
                                    mbim_dissect_akap_auth_req(frag_tvb, pinfo, subtree, offset);
8062
0
                                }
8063
0
                                break;
8064
0
                            case MBIM_CID_SIM_AUTH:
8065
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8066
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8067
0
                                } else {
8068
0
                                    mbim_dissect_sim_auth_req(frag_tvb, pinfo, subtree, offset);
8069
0
                                }
8070
0
                                break;
8071
0
                            default:
8072
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8073
0
                                break;
8074
0
                        }
8075
0
                        break;
8076
0
                    case UUID_DSS:
8077
0
                        switch (cid) {
8078
0
                            case MBIM_CID_DSS_CONNECT:
8079
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8080
0
                                    mbim_dissect_set_dss_connect(frag_tvb, pinfo, subtree, offset);
8081
0
                                } else {
8082
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8083
0
                                }
8084
0
                                break;
8085
0
                            default:
8086
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8087
0
                                break;
8088
0
                        }
8089
0
                        break;
8090
0
                    case UUID_MULTICARRIER:
8091
0
                        switch (cid) {
8092
0
                            case MBIM_CID_MULTICARRIER_CAPABILITIES:
8093
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8094
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8095
0
                                } else 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
                                break;
8099
0
                            case MBIM_CID_LOCATION_INFO:
8100
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8101
0
                                    proto_tree_add_item(subtree, hf_mbim_location_info_country, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8102
0
                                } else if (info_buff_len) {
8103
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8104
0
                                }
8105
0
                                break;
8106
0
                            case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST:
8107
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8108
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
8109
0
                                } else {
8110
0
                                    mbim_dissect_muticarrier_current_cid_list_req(frag_tvb, pinfo, subtree, offset);
8111
0
                                }
8112
0
                                break;
8113
0
                            default:
8114
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8115
0
                                break;
8116
0
                        }
8117
0
                        break;
8118
0
                    case UUID_MS_HOSTSHUTDOWN:
8119
0
                        switch (cid) {
8120
0
                            case MBIM_CID_MS_HOSTSHUTDOWN:
8121
0
                            case MBIM_CID_MS_HOSTPRESHUTDOWN:
8122
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8123
0
                                    if (info_buff_len) {
8124
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8125
0
                                    }
8126
0
                                } else {
8127
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8128
0
                                }
8129
0
                                break;
8130
0
                            default:
8131
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8132
0
                                break;
8133
0
                        }
8134
0
                        break;
8135
0
                    case UUID_MSFWID:
8136
0
                        switch (cid) {
8137
0
                            case MBIM_CID_MSFWID_FIRMWAREID:
8138
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8139
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8140
0
                                } else if (info_buff_len) {
8141
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8142
0
                                }
8143
0
                                break;
8144
0
                            default:
8145
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8146
0
                                break;
8147
0
                        }
8148
0
                        break;
8149
0
                    case UUID_QMI:
8150
0
                        switch (cid) {
8151
0
                            case MBIM_CID_QMI_QMI:
8152
0
                                if (info_buff_len) {
8153
0
                                    proto_tree_add_item(subtree, hf_mbim_qmi_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8154
0
                                }
8155
0
                                break;
8156
0
                            default:
8157
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8158
0
                                break;
8159
0
                        }
8160
0
                        break;
8161
0
                    case UUID_INTEL_FWUSVC:
8162
0
                        switch (cid) {
8163
0
                            case MBIM_CID_INTC_MODEM_REBOOT:
8164
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8165
0
                                    if (info_buff_len) {
8166
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8167
0
                                    }
8168
0
                                } else {
8169
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8170
0
                                }
8171
0
                                break;
8172
0
                            default:
8173
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8174
0
                                break;
8175
0
                        }
8176
0
                        break;
8177
0
                    case UUID_INTEL_DPTF:
8178
0
                        switch (cid) {
8179
0
                            case MBIM_CID_INTC_THERMAL_STATE:
8180
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8181
0
                                    mbim_dissect_thermal_config(frag_tvb, pinfo, subtree, offset);
8182
0
                                } else {
8183
0
                                    proto_tree_add_item(subtree, hf_mbim_query_thermal_state_temp_sensor_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8184
0
                                }
8185
0
                                break;
8186
0
                            default:
8187
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8188
0
                                break;
8189
0
                        }
8190
0
                        break;
8191
0
                    case UUID_INTEL_SAR:
8192
0
                        switch (cid) {
8193
0
                            case MBIM_CID_INTC_SAR_CONFIG:
8194
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8195
0
                                    mbim_dissect_sar_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
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
                            default:
8201
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8202
0
                                break;
8203
0
                        }
8204
0
                        break;
8205
0
                    case UUID_INTEL_ACT:
8206
0
                        switch (cid) {
8207
0
                            case MBIM_CID_INTC_ADPCLK_MODE:
8208
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8209
0
                                    proto_tree_add_item(subtree, hf_mbim_adpclk_activate_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8210
0
                                } else if (info_buff_len) {
8211
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8212
0
                                }
8213
0
                                break;
8214
0
                            default:
8215
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8216
0
                                break;
8217
0
                        }
8218
0
                        break;
8219
0
                    case UUID_INTEL_TRCSVC:
8220
0
                        switch (cid) {
8221
0
                            case MBIM_CID_INTC_TRACE:
8222
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8223
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8224
0
                                } else if (info_buff_len) {
8225
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8226
0
                                }
8227
0
                                break;
8228
0
                            case MBIM_CID_INTC_TRACE_DATA:
8229
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8230
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8231
0
                                } else if (info_buff_len) {
8232
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8233
0
                                }
8234
0
                                break;
8235
0
                            default:
8236
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8237
0
                                break;
8238
0
                        }
8239
0
                        break;
8240
0
                    case UUID_INTEL_NRTC:
8241
0
                        switch (cid) {
8242
0
                            case MBIM_CID_INTC_NRTAPP:
8243
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8244
0
                                    proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_period, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
8245
0
                                    offset += 2;
8246
0
                                    proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_duration, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
8247
0
                                } else if (info_buff_len) {
8248
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8249
0
                                }
8250
0
                                break;
8251
0
                            case MBIM_CID_INTC_NRTCWS:
8252
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8253
0
                                    mbim_dissect_nrtcws_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
8254
0
                                } else if (info_buff_len) {
8255
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8256
0
                                }
8257
0
                                break;
8258
0
                            default:
8259
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8260
0
                                break;
8261
0
                        }
8262
0
                        break;
8263
0
                    case UUID_INTEL_USB_PROFILE:
8264
0
                        switch (cid) {
8265
0
                            case MBIM_CID_INTC_USBPROFILE:
8266
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8267
0
                                    uint32_t at_len;
8268
8269
0
                                    proto_tree_add_item_ret_uint(subtree, hf_mbim_usbprofile_cmd_length, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &at_len);
8270
0
                                    offset += 4;
8271
0
                                    proto_tree_add_item(subtree, hf_mbim_usbprofile_cmd_buffer, frag_tvb, offset, at_len, ENC_LITTLE_ENDIAN|ENC_UTF_16);
8272
0
                                } else {
8273
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8274
0
                                }
8275
0
                                break;
8276
0
                            default:
8277
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8278
0
                                break;
8279
0
                        }
8280
0
                        break;
8281
0
                    case UUID_INTEL_CIQ:
8282
0
                        switch (cid) {
8283
0
                            case MBIM_CID_INTC_CIQ:
8284
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8285
0
                                    uint32_t size;
8286
8287
0
                                    proto_tree_add_item(subtree, hf_mbim_ciq_set_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8288
0
                                    offset += 4;
8289
0
                                    proto_tree_add_item_ret_uint(subtree, hf_mbim_ciq_set_debug_info_size, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &size);
8290
0
                                    offset += 4;
8291
0
                                    proto_tree_add_item(subtree, hf_mbim_ciq_set_debug_info, frag_tvb, offset, size, ENC_LITTLE_ENDIAN|ENC_UTF_16);
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
                            default:
8297
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8298
0
                                break;
8299
0
                        }
8300
0
                        break;
8301
0
                    case UUID_ATDS:
8302
0
                        switch (cid) {
8303
0
                            case MBIM_CID_ATDS_SIGNAL:
8304
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8305
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
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_LOCATION:
8311
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8312
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, 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
                            case MBIM_CID_ATDS_OPERATORS:
8318
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8319
0
                                    mbim_dissect_atds_operators(frag_tvb, pinfo, subtree, offset);
8320
0
                                } else if (info_buff_len) {
8321
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8322
0
                                }
8323
0
                                break;
8324
0
                            case MBIM_CID_ATDS_RAT:
8325
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8326
0
                                    proto_tree_add_item(subtree, hf_mbim_atds_rat_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
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_ATDS_REGISTER_STATE:
8332
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8333
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8334
0
                                } else if (info_buff_len) {
8335
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8336
0
                                }
8337
0
                                break;
8338
0
                            case MBIM_CID_ATDS_SET_PROJECTION_TABLES:
8339
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8340
0
                                    mbim_dissect_atds_projection_tables(frag_tvb, pinfo, subtree, offset);
8341
0
                                } else if (info_buff_len) {
8342
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8343
0
                                }
8344
0
                                break;
8345
0
                            default:
8346
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8347
0
                                break;
8348
0
                        }
8349
0
                        break;
8350
0
                    case UUID_MULTIFLOW:
8351
0
                        switch (cid) {
8352
0
                            case MBIM_CID_MULTIFLOW_CAPS:
8353
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8354
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8355
0
                                } else if (info_buff_len) {
8356
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8357
0
                                }
8358
0
                                break;
8359
0
                            case MBIM_CID_MULTIFLOW_UPLINK:
8360
0
                            case MBIM_CID_MULTIFLOW_DOWNLINK:
8361
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8362
0
                                    proto_tree_add_item(subtree, hf_mbim_set_multiflow_state_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
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_MULTIFLOW_TFT:
8368
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8369
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8370
0
                                } else if (info_buff_len) {
8371
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8372
0
                                }
8373
0
                                break;
8374
0
                            default:
8375
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8376
0
                                break;
8377
0
                        }
8378
0
                        break;
8379
0
                    case UUID_BASIC_CONNECT_EXTENSIONS:
8380
0
                        switch (cid) {
8381
0
                            case MBIM_CID_MS_PROVISIONED_CONTEXT_V2:
8382
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8383
0
                                    mbim_dissect_set_ms_provisioned_context_v2(frag_tvb, pinfo, subtree, offset, mbim_conv);
8384
0
                                } else if (info_buff_len) {
8385
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8386
0
                                }
8387
0
                                break;
8388
0
                            case MBIM_CID_MS_NETWORK_BLACKLIST:
8389
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8390
0
                                    mbim_dissect_ms_network_blacklist_info(pinfo, frag_tvb, subtree, offset);
8391
0
                                } else if (info_buff_len) {
8392
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8393
0
                                }
8394
0
                                break;
8395
0
                            case MBIM_CID_MS_LTE_ATTACH_CONFIG:
8396
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8397
0
                                    mbim_dissect_set_lte_attach_config(frag_tvb, pinfo, subtree, offset);
8398
0
                                }
8399
0
                                else if (info_buff_len) {
8400
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8401
0
                                }
8402
0
                                break;
8403
0
                            case MBIM_CID_MS_LTE_ATTACH_STATUS:
8404
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8405
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8406
0
                                }
8407
0
                                else if (info_buff_len) {
8408
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8409
0
                                }
8410
0
                                break;
8411
0
                            case MBIM_CID_MS_SYS_CAPS:
8412
0
                            case MBIM_CID_MS_DEVICE_CAPS_V2:
8413
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8414
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8415
0
                                } else if (info_buff_len) {
8416
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8417
0
                                }
8418
0
                                break;
8419
0
                            case MBIM_CID_MS_DEVICE_SLOT_MAPPINGS:
8420
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8421
0
                                    mbim_dissect_ms_device_slot_mapping_info(frag_tvb, pinfo, subtree, offset);
8422
0
                                } else if (info_buff_len) {
8423
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8424
0
                                }
8425
0
                                break;
8426
0
                            case MBIM_CID_MS_SLOT_INFO_STATUS:
8427
0
                                if (cmd_type == MBIM_COMMAND_QUERY) {
8428
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_slot_info_req_slot_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8429
0
                                } else {
8430
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8431
0
                                }
8432
0
                                break;
8433
0
                            case MBIM_CID_PCO:
8434
0
                                if (info_buff_len) {
8435
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8436
0
                                }
8437
0
                                break;
8438
0
                            case MBIM_CID_MS_DEVICE_RESET:
8439
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8440
0
                                    if (info_buff_len) {
8441
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8442
0
                                    }
8443
0
                                } else {
8444
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8445
0
                                }
8446
0
                                break;
8447
0
                            case MBIM_CID_BASE_STATIONS_INFO:
8448
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8449
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8450
0
                                } else if (info_buff_len) {
8451
0
                                    mbim_dissect_base_station_info_req(frag_tvb, subtree, offset, mbim_conv);
8452
0
                                }
8453
0
                                break;
8454
0
                            case MBIM_CID_LOCATION_INFO_STATUS:
8455
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8456
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8457
0
                                } else if (info_buff_len) {
8458
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8459
0
                                }
8460
0
                                break;
8461
0
                            case MBIM_CID_MS_PIN_INFO_EX2:
8462
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8463
0
                                break;
8464
0
                            case MBIM_CID_VERSION:
8465
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8466
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8467
0
                                } else if (info_buff_len) {
8468
0
                                    mbim_dissect_version(frag_tvb, subtree, offset, mbim_conv);
8469
0
                                }
8470
0
                                break;
8471
0
                            case MBIM_CID_MS_MODEM_CONFIG:
8472
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8473
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8474
0
                                } else if (info_buff_len) {
8475
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8476
0
                                }
8477
0
                                break;
8478
0
                            case MBIM_CID_MS_REGISTRATION_PARAMS:
8479
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8480
0
                                    mbim_dissect_ms_registration_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
8481
0
                                }
8482
0
                                else if (info_buff_len) {
8483
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8484
0
                                }
8485
0
                                break;
8486
0
                            case MBIM_CID_MS_NETWORK_PARAMS:
8487
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8488
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8489
0
                                }
8490
0
                                else if (info_buff_len) {
8491
0
                                    mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
8492
0
                                }
8493
0
                                break;
8494
0
                            case MBIM_CID_MS_WAKE_REASON:
8495
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8496
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8497
0
                                } else if (info_buff_len) {
8498
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8499
0
                                }
8500
0
                                break;
8501
0
                            case MBIM_CID_MS_UE_POLICY:
8502
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8503
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8504
0
                                }
8505
0
                                else if (info_buff_len) {
8506
0
                                    mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
8507
0
                                }
8508
0
                                break;
8509
0
                            default:
8510
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8511
0
                                break;
8512
0
                        }
8513
0
                        break;
8514
0
                    case UUID_MS_SARCONTROL:
8515
0
                        switch (cid) {
8516
0
                            case MBIM_CID_MS_SAR_CONFIG:
8517
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8518
0
                                    mbim_dissect_ms_sar_config(frag_tvb, pinfo, subtree, offset, false);
8519
0
                                }
8520
0
                                else if (info_buff_len) {
8521
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8522
0
                                }
8523
0
                                break;
8524
0
                            case MBIM_CID_MS_TRANSMISSION_STATUS:
8525
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8526
0
                                    mbim_dissect_ms_transmission_status(frag_tvb, subtree, offset, false);
8527
0
                                }
8528
0
                                else if (info_buff_len) {
8529
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8530
0
                                }
8531
0
                                break;
8532
0
                            default:
8533
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8534
0
                                break;
8535
0
                        }
8536
0
                        break;
8537
0
                    case UUID_MS_UICC_LOW_LEVEL:
8538
0
                        switch (cid) {
8539
0
                            case MBIM_CID_MS_UICC_ATR:
8540
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8541
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8542
0
                                } else if (info_buff_len) {
8543
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8544
0
                                        proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8545
0
                                    } else {
8546
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8547
0
                                    }
8548
0
                                }
8549
0
                                break;
8550
0
                            case MBIM_CID_MS_UICC_OPEN_CHANNEL:
8551
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8552
0
                                    mbim_dissect_ms_open_channel(frag_tvb, subtree, offset, mbim_conv);
8553
0
                                } else {
8554
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8555
0
                                }
8556
0
                                break;
8557
0
                            case MBIM_CID_MS_UICC_CLOSE_CHANNEL:
8558
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8559
0
                                    mbim_dissect_ms_close_channel(frag_tvb, subtree, offset, mbim_conv);
8560
0
                                } else {
8561
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8562
0
                                }
8563
0
                                break;
8564
0
                            case MBIM_CID_MS_UICC_APDU:
8565
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8566
0
                                    mbim_dissect_ms_apdu(frag_tvb, pinfo, subtree, offset, mbim_conv);
8567
0
                                } else {
8568
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8569
0
                                }
8570
0
                                break;
8571
0
                            case MBIM_CID_MS_UICC_TERMINAL_CAPABILITY:
8572
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8573
0
                                    mbim_dissect_ms_set_terminal_capability(frag_tvb, pinfo, subtree, offset, mbim_conv);
8574
0
                                } else if (info_buff_len) {
8575
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8576
0
                                        proto_tree_add_item(subtree, hf_mbim_ms_slot_id, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8577
0
                                    } else {
8578
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8579
0
                                    }
8580
0
                                }
8581
0
                                break;
8582
0
                            case MBIM_CID_MS_UICC_RESET:
8583
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8584
0
                                    mbim_dissect_ms_set_reset(frag_tvb, subtree, offset, mbim_conv);
8585
0
                                } else if (info_buff_len) {
8586
0
                                    if (SHOULD_MBIM_EX4_AND_HIGHER_BE_APPLIED(mbim_conv)) {
8587
0
                                        mbim_dissect_ms_query_reset(frag_tvb, subtree, offset);
8588
0
                                    } else {
8589
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8590
0
                                    }
8591
0
                                }
8592
0
                                break;
8593
0
                            case MBIM_CID_MS_UICC_APP_LIST:
8594
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8595
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8596
0
                                } else if (info_buff_len) {
8597
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8598
0
                                }
8599
0
                                break;
8600
0
                            case MBIM_CID_MS_UICC_ACCESS_BINARY:
8601
0
                                mbim_dissect_ms_access_binary(frag_tvb, pinfo, subtree, offset);
8602
0
                                break;
8603
0
                            case MBIM_CID_MS_UICC_ACCESS_RECORD:
8604
0
                                mbim_dissect_ms_access_record(frag_tvb, pinfo, subtree, offset);
8605
0
                                break;
8606
0
                            case MBIM_CID_MS_UICC_FILE_STATUS:
8607
0
                                if (cmd_type == MBIM_COMMAND_SET) {
8608
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8609
0
                                } else if (info_buff_len) {
8610
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8611
0
                                } else {
8612
0
                                    mbim_dissect_ms_file_path(frag_tvb, pinfo, subtree, offset);
8613
0
                                }
8614
0
                                break;
8615
0
                            default:
8616
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8617
0
                                break;
8618
0
                        }
8619
0
                        break;
8620
0
                    case UUID_MS_VOICE_EXTENSIONS:
8621
0
                        switch (cid) {
8622
0
                        case MBIM_CID_MS_VOICE_EXTENSIONS_NITZ:
8623
0
                            if (cmd_type == MBIM_COMMAND_SET) {
8624
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8625
0
                            }
8626
0
                            else if (info_buff_len) {
8627
0
                                proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8628
0
                            }
8629
0
                            break;
8630
0
                        default:
8631
0
                            proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8632
0
                            break;
8633
0
                        }
8634
0
                        break;
8635
0
                    case UUID_EXT_IDX:
8636
0
                        {
8637
0
                            int cid_idx;
8638
0
                            mbim_dissect_fct dissect_cid;
8639
8640
0
                            try_val_to_str_idx(cid, uuid_ext_info->uuid_cid_list, &cid_idx);
8641
0
                            if (cid_idx != -1) {
8642
0
                                dissect_cid = (cmd_type == MBIM_COMMAND_SET) ? uuid_ext_info->uuid_fct_list[cid_idx].cmd_set :
8643
0
                                    uuid_ext_info->uuid_fct_list[cid_idx].cmd_query;
8644
0
                                if (dissect_cid) {
8645
0
                                    dissect_cid(frag_tvb, pinfo, subtree, offset, mbim_info);
8646
0
                                } else if (info_buff_len) {
8647
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8648
0
                                }
8649
0
                            } else {
8650
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8651
0
                            }
8652
0
                        }
8653
0
                        break;
8654
0
                    default:
8655
0
                        if (info_buff_len) {
8656
0
                            proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8657
0
                        }
8658
0
                        break;
8659
0
                }
8660
0
            }
8661
0
            break;
8662
0
        case MBIM_FUNCTION_ERROR_MSG:
8663
0
            open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
8664
0
            trans_id_key = ((uint64_t)open_count << 32) | trans_id;
8665
0
            mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
8666
0
            if (!PINFO_FD_VISITED(pinfo)) {
8667
0
                if (mbim_info) {
8668
0
                    mbim_info->resp_frame = pinfo->num;
8669
0
                }
8670
0
            } else {
8671
0
                if (mbim_info && mbim_info->req_frame) {
8672
0
                    proto_item *req_it;
8673
8674
0
                    req_it = proto_tree_add_uint(header_tree, hf_mbim_request_in, tvb, 0, 0, mbim_info->req_frame);
8675
0
                    proto_item_set_generated(req_it);
8676
0
                }
8677
0
            }
8678
            /* FALLTHROUGH */
8679
0
        case MBIM_HOST_ERROR_MSG:
8680
0
            proto_tree_add_item(mbim_tree, hf_mbim_error_status_code, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8681
0
            break;
8682
0
        case MBIM_OPEN_DONE:
8683
0
        case MBIM_CLOSE_DONE:
8684
0
            proto_tree_add_item(mbim_tree, hf_mbim_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8685
0
            break;
8686
0
        case MBIM_COMMAND_DONE:
8687
0
        case MBIM_INDICATE_STATUS_MSG:
8688
0
            {
8689
0
                uint32_t info_buff_len, current_frag, total_frag, cid;
8690
0
                uint8_t uuid_idx;
8691
0
                fragment_head *frag_data;
8692
0
                tvbuff_t *frag_tvb;
8693
0
                struct mbim_uuid_ext *uuid_ext_info = NULL;
8694
8695
0
                subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 8, ett_mbim_frag_header, NULL, "Fragment Header");
8696
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_total, tvb, offset, 4, ENC_LITTLE_ENDIAN, &total_frag);
8697
0
                offset += 4;
8698
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_fragment_current, tvb, offset, 4, ENC_LITTLE_ENDIAN, &current_frag);
8699
0
                offset += 4;
8700
0
                if (total_frag > 1) {
8701
0
                    frag_data = fragment_add_seq_check(&mbim_reassembly_table, tvb, offset, pinfo,
8702
0
                                                       trans_id, mbim_conv, current_frag,
8703
0
                                                       tvb_reported_length_remaining(tvb, offset),
8704
0
                                                       (current_frag != (total_frag-1)));
8705
0
                    frag_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled MBIM control message",
8706
0
                                                        frag_data, &mbim_frag_items, NULL, subtree);
8707
0
                    if (!frag_tvb) {
8708
                        /* Fragmentation reassembly not performed yet */
8709
0
                        proto_tree_add_item(mbim_tree, hf_mbim_fragmented_payload, tvb, offset, -1, ENC_NA);
8710
0
                        col_append_fstr(pinfo->cinfo, COL_INFO, ": [Fragment #%u out of %u]", current_frag+1, total_frag);
8711
0
                        break;
8712
0
                    }
8713
0
                    offset = 0;
8714
0
                } else {
8715
0
                    frag_tvb = tvb;
8716
0
                }
8717
8718
0
                if (msg_type == MBIM_COMMAND_DONE) {
8719
0
                    open_count = GPOINTER_TO_UINT(wmem_tree_lookup32_le(mbim_conv->open, pinfo->num));
8720
0
                    trans_id_key = ((uint64_t)open_count << 32) | trans_id;
8721
0
                    mbim_info = (struct mbim_info *)wmem_map_lookup(mbim_conv->trans, &trans_id_key);
8722
0
                    if (!PINFO_FD_VISITED(pinfo)) {
8723
0
                        if (mbim_info) {
8724
0
                            mbim_info->resp_frame = pinfo->num;
8725
0
                        }
8726
0
                    } else {
8727
0
                        if (mbim_info && mbim_info->req_frame) {
8728
0
                            proto_item *req_it;
8729
8730
0
                            req_it = proto_tree_add_uint(header_tree, hf_mbim_request_in, tvb, 0, 0, mbim_info->req_frame);
8731
0
                            proto_item_set_generated(req_it);
8732
0
                        }
8733
0
                    }
8734
0
                }
8735
8736
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);
8737
0
                cid = mbim_dissect_cid(frag_tvb, pinfo, mbim_tree, &offset, uuid_idx, uuid_ext_info);
8738
0
                if (msg_type == MBIM_COMMAND_DONE) {
8739
0
                    proto_tree_add_item(mbim_tree, hf_mbim_status, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8740
0
                    offset += 4;
8741
0
                }
8742
0
                proto_tree_add_item_ret_uint(mbim_tree, hf_mbim_info_buffer_len, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &info_buff_len);
8743
0
                offset += 4;
8744
0
                if (info_buff_len == 0) {
8745
0
                    break;
8746
0
                }
8747
0
                subtree = proto_tree_add_subtree(mbim_tree, frag_tvb, offset, info_buff_len, ett_mbim_info_buffer, NULL, "Information Buffer");
8748
0
                switch (uuid_idx) {
8749
0
                    case UUID_BASIC_CONNECT:
8750
0
                        switch (cid) {
8751
0
                            case MBIM_CID_DEVICE_CAPS:
8752
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8753
0
                                    mbim_dissect_device_caps_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8754
0
                                } else {
8755
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8756
0
                                }
8757
0
                                break;
8758
0
                            case MBIM_CID_SUBSCRIBER_READY_STATUS:
8759
0
                                mbim_dissect_subscriber_ready_status(frag_tvb, pinfo, subtree, offset, mbim_conv);
8760
0
                                break;
8761
0
                            case MBIM_CID_RADIO_STATE:
8762
0
                                proto_tree_add_item(subtree, hf_mbim_radio_state_hw_radio_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8763
0
                                offset += 4;
8764
0
                                proto_tree_add_item(subtree, hf_mbim_radio_state_sw_radio_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8765
0
                                break;
8766
0
                            case MBIM_CID_PIN:
8767
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8768
0
                                    uint32_t attempts;
8769
8770
0
                                    proto_tree_add_item(subtree, hf_mbim_pin_info_pin_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8771
0
                                    offset += 4;
8772
0
                                    proto_tree_add_item(subtree, hf_mbim_pin_info_pin_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8773
0
                                    offset += 4;
8774
0
                                    attempts = tvb_get_letohl(frag_tvb, offset);
8775
0
                                    if (attempts == 0xffffffff) {
8776
0
                                        proto_tree_add_uint_format(subtree, hf_mbim_pin_info_remaining_attempts, frag_tvb, offset, 4,
8777
0
                                                                   attempts, "Not supported (0xffffffff)");
8778
0
                                    } else {
8779
0
                                        proto_tree_add_uint(subtree, hf_mbim_pin_info_remaining_attempts, frag_tvb, offset, 4, attempts);
8780
0
                                    }
8781
0
                                } else {
8782
0
                                     proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8783
0
                                }
8784
0
                                break;
8785
0
                            case MBIM_CID_PIN_LIST:
8786
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8787
0
                                    mbim_dissect_pin_list_info(frag_tvb, pinfo, subtree, offset);
8788
0
                                } else {
8789
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8790
0
                                }
8791
0
                                break;
8792
0
                            case MBIM_CID_HOME_PROVIDER:
8793
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8794
0
                                    mbim_dissect_provider(frag_tvb, pinfo, subtree, offset);
8795
0
                                } else {
8796
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8797
0
                                }
8798
0
                                break;
8799
0
                            case MBIM_CID_PREFERRED_PROVIDERS:
8800
0
                                mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8801
0
                                break;
8802
0
                            case MBIM_CID_VISIBLE_PROVIDERS:
8803
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8804
0
                                    mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8805
0
                                } else {
8806
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8807
0
                                }
8808
0
                                break;
8809
0
                            case MBIM_CID_REGISTER_STATE:
8810
0
                                mbim_dissect_registration_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8811
0
                                break;
8812
0
                            case MBIM_CID_PACKET_SERVICE:
8813
0
                                mbim_dissect_packet_service_info(frag_tvb, pinfo, subtree, offset, mbim_conv, info_buff_len);
8814
0
                                break;
8815
0
                            case MBIM_CID_SIGNAL_STATE:
8816
0
                                mbim_dissect_signal_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8817
0
                                break;
8818
0
                            case MBIM_CID_CONNECT:
8819
0
                                mbim_dissect_connect_info(frag_tvb, pinfo, subtree, offset, mbim_conv, info_buff_len);
8820
0
                                break;
8821
0
                            case MBIM_CID_PROVISIONED_CONTEXTS:
8822
0
                                mbim_dissect_provisioned_contexts_info(frag_tvb, pinfo, subtree, offset);
8823
0
                                break;
8824
0
                            case MBIM_CID_SERVICE_ACTIVATION:
8825
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8826
0
                                    uint32_t nw_error;
8827
8828
0
                                    nw_error = tvb_get_letohl(frag_tvb, offset);
8829
0
                                    if (nw_error == 0) {
8830
0
                                        proto_tree_add_uint_format_value(subtree, hf_mbim_service_activation_info_nw_error,
8831
0
                                                                         frag_tvb, offset, 4, nw_error, "Success (0)");
8832
0
                                    } else {
8833
0
                                        proto_tree_add_uint(subtree, hf_mbim_service_activation_info_nw_error,
8834
0
                                                            frag_tvb, offset, 4, nw_error);
8835
0
                                    }
8836
0
                                    proto_tree_add_item(subtree, hf_mbim_service_activation_info_data_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
8837
0
                                } else {
8838
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8839
0
                                }
8840
0
                                break;
8841
0
                            case MBIM_CID_IP_CONFIGURATION:
8842
0
                                mbim_dissect_ip_configuration_info(frag_tvb, pinfo, subtree, offset);
8843
0
                                break;
8844
0
                            case MBIM_CID_DEVICE_SERVICES:
8845
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8846
0
                                    mbim_dissect_device_services_info(frag_tvb, pinfo, subtree, offset);
8847
0
                                } else {
8848
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8849
0
                                }
8850
0
                                break;
8851
0
                            case MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST:
8852
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8853
0
                                    mbim_dissect_device_service_subscribe_list(frag_tvb, pinfo, subtree, offset);
8854
0
                                } else {
8855
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8856
0
                                }
8857
0
                                break;
8858
0
                            case MBIM_CID_PACKET_STATISTICS:
8859
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8860
0
                                    mbim_dissect_packet_statistics_info(frag_tvb, pinfo, subtree, offset);
8861
0
                                } else {
8862
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8863
0
                                }
8864
0
                                break;
8865
0
                            case MBIM_CID_NETWORK_IDLE_HINT:
8866
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8867
0
                                    proto_tree_add_item(subtree, hf_mbim_network_idle_hint_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8868
0
                                } else {
8869
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8870
0
                                }
8871
0
                                break;
8872
0
                            case MBIM_CID_EMERGENCY_MODE:
8873
0
                                proto_tree_add_item(subtree, hf_mbim_emergency_mode_info_emergency_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8874
0
                                break;
8875
0
                            case MBIM_CID_IP_PACKET_FILTERS:
8876
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8877
0
                                    mbim_dissect_packet_filters(frag_tvb, pinfo, subtree, offset, mbim_conv);
8878
0
                                } else {
8879
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8880
0
                                }
8881
0
                                break;
8882
0
                            case MBIM_CID_MULTICARRIER_PROVIDERS:
8883
0
                                mbim_dissect_providers(frag_tvb, pinfo, subtree, offset);
8884
0
                                break;
8885
0
                            default:
8886
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8887
0
                                break;
8888
0
                        }
8889
0
                        break;
8890
0
                    case UUID_SMS:
8891
0
                        switch (cid) {
8892
0
                            case MBIM_CID_SMS_CONFIGURATION:
8893
0
                                mbim_dissect_sms_configuration_info(frag_tvb, pinfo, subtree, offset);
8894
0
                                break;
8895
0
                            case MBIM_CID_SMS_READ:
8896
0
                                mbim_dissect_sms_read_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
8897
0
                                break;
8898
0
                            case MBIM_CID_SMS_SEND:
8899
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8900
0
                                    proto_tree_add_item(subtree, hf_mbim_sms_send_info_message_reference, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8901
0
                                } else {
8902
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8903
0
                                }
8904
0
                                break;
8905
0
                            case MBIM_CID_SMS_DELETE:
8906
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8907
0
                                    if (info_buff_len) {
8908
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8909
0
                                    }
8910
0
                                } else {
8911
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8912
0
                                }
8913
0
                                break;
8914
0
                            case MBIM_CID_SMS_MESSAGE_STORE_STATUS:
8915
0
                                proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_sms_status_info_flags, ett_mbim_bitmap,
8916
0
                                                       mbim_sms_status_info_flags_fields, ENC_LITTLE_ENDIAN);
8917
0
                                offset += 4;
8918
0
                                proto_tree_add_item(subtree, hf_mbim_sms_status_info_message_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8919
0
                                break;
8920
0
                            default:
8921
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8922
0
                                break;
8923
0
                        }
8924
0
                        break;
8925
0
                    case UUID_USSD:
8926
0
                        switch (cid) {
8927
0
                            case MBIM_CID_USSD:
8928
0
                                mbim_dissect_ussd_info(frag_tvb, pinfo, subtree, offset);
8929
0
                                break;
8930
0
                            default:
8931
0
                               proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8932
0
                                break;
8933
0
                        }
8934
0
                        break;
8935
0
                    case UUID_PHONEBOOK:
8936
0
                        switch (cid) {
8937
0
                            case MBIM_CID_PHONEBOOK_CONFIGURATION:
8938
0
                                mbim_dissect_phonebook_configuration_info(frag_tvb, pinfo, subtree, offset);
8939
0
                                break;
8940
0
                            case MBIM_CID_PHONEBOOK_READ:
8941
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8942
0
                                    mbim_dissect_phonebook_read_info(frag_tvb, pinfo, subtree, offset);
8943
0
                                } else {
8944
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8945
0
                                }
8946
0
                                break;
8947
0
                            case MBIM_CID_PHONEBOOK_DELETE:
8948
0
                            case MBIM_CID_PHONEBOOK_WRITE:
8949
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8950
0
                                    if (info_buff_len) {
8951
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
8952
0
                                    }
8953
0
                                } else {
8954
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8955
0
                                }
8956
0
                                break;
8957
0
                            default:
8958
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8959
0
                                break;
8960
0
                        }
8961
0
                        break;
8962
0
                    case UUID_STK:
8963
0
                        switch (cid) {
8964
0
                            case MBIM_CID_STK_PAC:
8965
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8966
0
                                    mbim_dissect_stk_pac_info(frag_tvb, pinfo, subtree, offset);
8967
0
                                } else {
8968
0
                                    tvbuff_t *pac_tvb;
8969
0
                                    unsigned pac_length;
8970
0
                                    proto_tree *pac_tree;
8971
8972
0
                                    proto_tree_add_item(subtree, hf_mbim_stk_pac_pac_type, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
8973
0
                                    offset += 4;
8974
0
                                    pac_length = info_buff_len - 4;
8975
0
                                    ti = proto_tree_add_item(subtree, hf_mbim_stk_pac_pac, frag_tvb, offset, pac_length, ENC_NA);
8976
0
                                    if (bertlv_handle) {
8977
0
                                        pac_tree = proto_item_add_subtree(ti, ett_mbim_buffer);
8978
0
                                        pac_tvb = tvb_new_subset_length(frag_tvb, offset, pac_length);
8979
0
                                        call_dissector(bertlv_handle, pac_tvb, pinfo, pac_tree);
8980
0
                                    }
8981
0
                                }
8982
0
                                break;
8983
0
                            case MBIM_CID_STK_TERMINAL_RESPONSE:
8984
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8985
0
                                    mbim_dissect_stk_terminal_response_info(frag_tvb, pinfo, subtree, offset);
8986
0
                                } else {
8987
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8988
0
                                }
8989
0
                                break;
8990
0
                            case MBIM_CID_STK_ENVELOPE:
8991
0
                                if (msg_type == MBIM_COMMAND_DONE) {
8992
0
                                    proto_tree_add_item(subtree, hf_mbim_stk_envelope_info_envelope_support,
8993
0
                                                        frag_tvb, offset, 32, ENC_NA);
8994
0
                                } else {
8995
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
8996
0
                                }
8997
0
                                break;
8998
0
                            default:
8999
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9000
0
                                break;
9001
0
                        }
9002
0
                        break;
9003
0
                    case UUID_AUTH:
9004
0
                        switch (cid) {
9005
0
                            case MBIM_CID_AKA_AUTH:
9006
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9007
0
                                    mbim_dissect_aka_auth_info(frag_tvb, pinfo, subtree, offset);
9008
0
                                } else {
9009
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9010
0
                                }
9011
0
                                break;
9012
0
                            case MBIM_CID_AKAP_AUTH:
9013
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9014
0
                                    mbim_dissect_akap_auth_info(frag_tvb, pinfo, subtree, offset);
9015
0
                                } else {
9016
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9017
0
                                }
9018
0
                                break;
9019
0
                            case MBIM_CID_SIM_AUTH:
9020
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9021
0
                                    mbim_dissect_sim_auth_info(frag_tvb, pinfo, subtree, offset);
9022
0
                                } else {
9023
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9024
0
                                }
9025
0
                                break;
9026
0
                            default:
9027
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9028
0
                                break;
9029
0
                        }
9030
0
                        break;
9031
0
                    case UUID_DSS:
9032
0
                        switch (cid) {
9033
0
                            case MBIM_CID_DSS_CONNECT:
9034
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9035
0
                                    if (info_buff_len) {
9036
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9037
0
                                    }
9038
0
                                } else {
9039
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9040
0
                                }
9041
0
                                break;
9042
0
                            default:
9043
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9044
0
                                break;
9045
0
                        }
9046
0
                        break;
9047
0
                    case UUID_MULTICARRIER:
9048
0
                        switch (cid) {
9049
0
                            case MBIM_CID_MULTICARRIER_CAPABILITIES:
9050
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9051
0
                                    proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_multicarrier_capabilities_info_capabilities,
9052
0
                                                           ett_mbim_bitmap, mbim_multicarrier_capabilities_fields, ENC_LITTLE_ENDIAN);
9053
0
                                } else {
9054
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9055
0
                                }
9056
0
                                break;
9057
0
                            case MBIM_CID_LOCATION_INFO:
9058
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9059
0
                                    proto_tree_add_item(subtree, hf_mbim_location_info_country, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9060
0
                                } else if (info_buff_len) {
9061
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9062
0
                                }
9063
0
                                break;
9064
0
                            case MBIM_CID_MULTICARRIER_CURRENT_CID_LIST:
9065
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9066
0
                                    mbim_dissect_muticarrier_current_cid_list_info(frag_tvb, pinfo, subtree, offset);
9067
0
                                } else {
9068
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9069
0
                                }
9070
0
                                break;
9071
0
                            default:
9072
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9073
0
                                break;
9074
0
                        }
9075
0
                        break;
9076
0
                    case UUID_MS_HOSTSHUTDOWN:
9077
0
                        switch (cid) {
9078
0
                            case MBIM_CID_MS_HOSTSHUTDOWN:
9079
0
                            case MBIM_CID_MS_HOSTPRESHUTDOWN:
9080
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9081
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) {
9082
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9083
0
                                    } else if (info_buff_len) {
9084
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9085
0
                                    }
9086
0
                                } else {
9087
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9088
0
                                }
9089
0
                                break;
9090
0
                            default:
9091
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9092
0
                                break;
9093
0
                        }
9094
0
                        break;
9095
0
                    case UUID_MSFWID:
9096
0
                        switch (cid) {
9097
0
                            case MBIM_CID_MSFWID_FIRMWAREID:
9098
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9099
0
                                    proto_tree_add_item(subtree, hf_mbim_msfwid_firmwareid_info_firmware_id, frag_tvb, offset, 16, ENC_BIG_ENDIAN);
9100
0
                                } else if (info_buff_len) {
9101
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9102
0
                                }
9103
0
                                break;
9104
0
                            default:
9105
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9106
0
                                break;
9107
0
                        }
9108
0
                        break;
9109
0
                    case UUID_QMI:
9110
0
                        switch (cid) {
9111
0
                            case MBIM_CID_QMI_QMI:
9112
0
                                if (info_buff_len) {
9113
0
                                    proto_tree_add_item(subtree, hf_mbim_qmi_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9114
0
                                }
9115
0
                                break;
9116
0
                            default:
9117
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9118
0
                                break;
9119
0
                        }
9120
0
                        break;
9121
0
                    case UUID_INTEL_FWUSVC:
9122
0
                        switch (cid) {
9123
0
                            case MBIM_CID_INTC_MODEM_REBOOT:
9124
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9125
0
                                    if (info_buff_len) {
9126
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9127
0
                                    }
9128
0
                                } else {
9129
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9130
0
                                }
9131
0
                                break;
9132
0
                            default:
9133
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9134
0
                                break;
9135
0
                        }
9136
0
                        break;
9137
0
                    case UUID_INTEL_DPTF:
9138
0
                        switch (cid) {
9139
0
                            case MBIM_CID_INTC_THERMAL_STATE:
9140
0
                                if ((msg_type == MBIM_COMMAND_DONE) && mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9141
0
                                    mbim_dissect_thermal_config(frag_tvb, pinfo, subtree, offset);
9142
0
                                } else {
9143
0
                                    mbim_dissect_thermal_state_info(frag_tvb, pinfo, subtree, offset);
9144
0
                                }
9145
0
                                break;
9146
0
                            default:
9147
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9148
0
                                break;
9149
0
                        }
9150
0
                        break;
9151
0
                    case UUID_INTEL_SAR:
9152
0
                        switch (cid) {
9153
0
                            case MBIM_CID_INTC_SAR_CONFIG:
9154
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9155
0
                                    mbim_dissect_sar_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
9156
0
                                } else {
9157
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9158
0
                                }
9159
0
                                break;
9160
0
                            default:
9161
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9162
0
                                break;
9163
0
                        }
9164
0
                        break;
9165
0
                    case UUID_INTEL_ACT:
9166
0
                        switch (cid) {
9167
0
                            case MBIM_CID_INTC_ADPCLK_MODE:
9168
0
                                if ((msg_type == MBIM_COMMAND_DONE) && info_buff_len &&
9169
0
                                    mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9170
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9171
0
                                } else {
9172
0
                                    mbim_dissect_adpclk_freq_info(frag_tvb, pinfo, subtree, offset);
9173
0
                                }
9174
0
                                break;
9175
0
                            default:
9176
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9177
0
                                break;
9178
0
                        }
9179
0
                        break;
9180
0
                    case UUID_INTEL_TRCSVC:
9181
0
                        switch (cid) {
9182
0
                            case MBIM_CID_INTC_TRACE:
9183
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9184
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9185
0
                                } else {
9186
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9187
0
                                }
9188
0
                                break;
9189
0
                            case MBIM_CID_INTC_TRACE_DATA:
9190
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9191
0
                                    proto_tree_add_item(subtree, hf_mbim_trace_config_config, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9192
0
                                } else {
9193
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9194
0
                                }
9195
0
                                break;
9196
0
                            default:
9197
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9198
0
                                break;
9199
0
                        }
9200
0
                        break;
9201
0
                    case UUID_INTEL_NRTC:
9202
0
                        switch (cid) {
9203
0
                            case MBIM_CID_INTC_NRTAPP:
9204
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9205
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9206
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9207
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9208
0
                                        proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_period, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
9209
0
                                        offset += 2;
9210
0
                                        proto_tree_add_item(subtree, hf_mbim_nrtc_app_info_duration, frag_tvb, offset, 2, ENC_LITTLE_ENDIAN);
9211
0
                                    }
9212
0
                                } else {
9213
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9214
0
                                }
9215
0
                                break;
9216
0
                            case MBIM_CID_INTC_NRTCWS:
9217
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9218
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9219
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9220
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9221
0
                                        mbim_dissect_nrtcws_config(frag_tvb, pinfo, subtree, offset, info_buff_len);
9222
0
                                    }
9223
0
                                } else {
9224
0
                                    mbim_dissect_nrtcws_info(frag_tvb, pinfo, subtree, offset);
9225
0
                                }
9226
0
                                break;
9227
0
                            default:
9228
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9229
0
                                break;
9230
0
                        }
9231
0
                        break;
9232
0
                    case UUID_INTEL_USB_PROFILE:
9233
0
                        switch (cid) {
9234
0
                            case MBIM_CID_INTC_USBPROFILE:
9235
0
                                if ((msg_type == MBIM_COMMAND_DONE) && ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) || info_buff_len)) {
9236
0
                                    uint32_t at_len;
9237
9238
0
                                    proto_tree_add_item_ret_uint(subtree, hf_mbim_usbprofile_rsp_length, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN, &at_len);
9239
0
                                    offset += 4;
9240
0
                                    proto_tree_add_item(subtree, hf_mbim_usbprofile_rsp_buffer, frag_tvb, offset, at_len, ENC_LITTLE_ENDIAN|ENC_UTF_16);
9241
0
                                } else {
9242
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9243
0
                                }
9244
0
                                break;
9245
0
                            default:
9246
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9247
0
                                break;
9248
0
                        }
9249
0
                        break;
9250
0
                    case UUID_INTEL_CIQ:
9251
0
                        switch (cid) {
9252
0
                            case MBIM_CID_INTC_CIQ:
9253
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9254
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9255
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9256
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9257
0
                                        proto_tree_add_item(subtree, hf_mbim_ciq_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9258
0
                                    }
9259
0
                                } else {
9260
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9261
0
                                }
9262
0
                                break;
9263
0
                            default:
9264
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9265
0
                                break;
9266
0
                        }
9267
0
                        break;
9268
0
                    case UUID_ATDS:
9269
0
                        switch (cid) {
9270
0
                            case MBIM_CID_ATDS_SIGNAL:
9271
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9272
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9273
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9274
0
                                    } else {
9275
0
                                        mbim_dissect_atds_signal_info(frag_tvb, pinfo, subtree, offset);
9276
0
                                    }
9277
0
                                } else {
9278
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9279
0
                                }
9280
0
                                break;
9281
0
                            case MBIM_CID_ATDS_LOCATION:
9282
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9283
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9284
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9285
0
                                    } else {
9286
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_location_info_lac, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9287
0
                                        offset += 4;
9288
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_location_info_tac, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9289
0
                                        offset += 4;
9290
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_location_info_cellid, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9291
0
                                    }
9292
0
                                } else {
9293
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9294
0
                                }
9295
0
                                break;
9296
0
                            case MBIM_CID_ATDS_OPERATORS:
9297
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9298
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9299
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9300
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9301
0
                                        mbim_dissect_atds_operators(frag_tvb, pinfo, subtree, offset);
9302
0
                                    }
9303
0
                                } else {
9304
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9305
0
                                }
9306
0
                                break;
9307
0
                            case MBIM_CID_ATDS_RAT:
9308
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9309
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9310
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9311
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9312
0
                                        proto_tree_add_item(subtree, hf_mbim_atds_rat_info_mode, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9313
0
                                    }
9314
0
                                } else {
9315
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9316
0
                                }
9317
0
                                break;
9318
0
                            case MBIM_CID_ATDS_REGISTER_STATE:
9319
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9320
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9321
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9322
0
                                    } else {
9323
0
                                        mbim_dissect_registration_state_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9324
0
                                    }
9325
0
                                } else {
9326
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9327
0
                                }
9328
0
                                break;
9329
0
                            case MBIM_CID_ATDS_SET_PROJECTION_TABLES:
9330
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9331
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET) && info_buff_len) {
9332
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9333
0
                                    } else if ((mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) || info_buff_len) {
9334
0
                                        mbim_dissect_atds_projection_tables(frag_tvb, pinfo, subtree, offset);
9335
0
                                    }
9336
0
                                } else {
9337
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9338
0
                                }
9339
0
                                break;
9340
0
                            default:
9341
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9342
0
                                break;
9343
0
                        }
9344
0
                        break;
9345
0
                    case UUID_MULTIFLOW:
9346
0
                        switch (cid) {
9347
0
                            case MBIM_CID_MULTIFLOW_CAPS:
9348
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9349
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9350
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9351
0
                                    } else {
9352
0
                                        proto_tree_add_bitmask(subtree, frag_tvb, offset, hf_mbim_multiflow_caps_info_control_caps,
9353
0
                                                               ett_mbim_bitmap, mbim_multiflow_caps_info_control_caps_fields, ENC_LITTLE_ENDIAN);
9354
0
                                    }
9355
0
                                } else {
9356
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
9357
0
                                }
9358
0
                                break;
9359
0
                            case MBIM_CID_MULTIFLOW_UPLINK:
9360
0
                            case MBIM_CID_MULTIFLOW_DOWNLINK:
9361
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9362
0
                                    proto_tree_add_item(subtree, hf_mbim_multiflow_state_info_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9363
0
                                } else {
9364
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, info_buff_len);
9365
0
                                }
9366
0
                                break;
9367
0
                            case MBIM_CID_MULTIFLOW_TFT:
9368
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9369
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9370
0
                                } else {
9371
0
                                    mbim_dissect_multiflow_tft_info(frag_tvb, pinfo, subtree, offset);
9372
0
                                }
9373
0
                                break;
9374
0
                            default:
9375
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9376
0
                                break;
9377
0
                        }
9378
0
                        break;
9379
0
                    case UUID_BASIC_CONNECT_EXTENSIONS:
9380
0
                        switch (cid) {
9381
0
                            case MBIM_CID_MS_PROVISIONED_CONTEXT_V2:
9382
0
                                mbim_dissect_ms_provisioned_context_info_v2(frag_tvb, pinfo, subtree, offset, mbim_conv);
9383
0
                                break;
9384
0
                            case MBIM_CID_MS_NETWORK_BLACKLIST:
9385
0
                                mbim_dissect_ms_network_blacklist_info(pinfo, frag_tvb, subtree, offset);
9386
0
                                break;
9387
0
                            case MBIM_CID_MS_LTE_ATTACH_CONFIG:
9388
0
                                mbim_dissect_lte_attach_config_info(frag_tvb, pinfo, subtree, offset);
9389
0
                                break;
9390
0
                            case MBIM_CID_MS_LTE_ATTACH_STATUS:
9391
0
                                mbim_dissect_lte_attach_status(frag_tvb, pinfo, subtree, offset, mbim_conv);
9392
0
                                break;
9393
0
                            case MBIM_CID_MS_SYS_CAPS:
9394
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9395
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9396
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9397
0
                                    } else {
9398
0
                                        mbim_dissect_sys_caps_info(frag_tvb, subtree, offset);
9399
0
                                    }
9400
0
                                } else {
9401
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9402
0
                                }
9403
0
                                break;
9404
0
                            case MBIM_CID_MS_DEVICE_CAPS_V2:
9405
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9406
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9407
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9408
0
                                    } else {
9409
0
                                        if (SHOULD_MBIM_EX3_AND_HIGHER_BE_APPLIED(mbim_conv)) {
9410
0
                                            mbim_dissect_device_caps_v3_and_higher_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9411
0
                                        } else {
9412
0
                                            mbim_dissect_device_caps_v2_info(frag_tvb, pinfo, subtree, offset, mbim_conv);
9413
0
                                        }
9414
0
                                    }
9415
0
                                } else {
9416
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9417
0
                                }
9418
0
                                break;
9419
0
                            case MBIM_CID_MS_DEVICE_SLOT_MAPPINGS:
9420
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9421
0
                                    mbim_dissect_ms_device_slot_mapping_info(frag_tvb, pinfo, subtree, offset);
9422
0
                                } else {
9423
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9424
0
                                }
9425
0
                                break;
9426
0
                            case MBIM_CID_MS_SLOT_INFO_STATUS:
9427
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9428
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9429
0
                                } else {
9430
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_slot_info_slot_index, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9431
0
                                    offset += 4;
9432
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_slot_info_state, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9433
0
                                }
9434
0
                                break;
9435
0
                            case MBIM_CID_PCO:
9436
0
                                proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9437
0
                                break;
9438
0
                            case MBIM_CID_MS_DEVICE_RESET:
9439
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9440
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_QUERY)) {
9441
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9442
0
                                    } else if (info_buff_len) {
9443
0
                                        proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9444
0
                                    }
9445
0
                                } else {
9446
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9447
0
                                }
9448
0
                                break;
9449
0
                            case MBIM_CID_BASE_STATIONS_INFO:
9450
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9451
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9452
0
                                } else {
9453
0
                                    mbim_dissect_base_station_info(frag_tvb, subtree, offset, mbim_conv);
9454
0
                                }
9455
0
                                break;
9456
0
                            case MBIM_CID_LOCATION_INFO_STATUS:
9457
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9458
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9459
0
                                } else {
9460
0
                                    proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9461
0
                                }
9462
0
                                break;
9463
0
                            case MBIM_CID_MS_PIN_INFO_EX2:
9464
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9465
0
                                break;
9466
0
                            case MBIM_CID_VERSION:
9467
0
                                if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9468
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9469
0
                                }
9470
0
                                else if (info_buff_len) {
9471
0
                                    mbim_dissect_version(frag_tvb, subtree, offset, mbim_conv);
9472
0
                                }
9473
0
                                break;
9474
0
                            case MBIM_CID_MS_MODEM_CONFIG:
9475
0
                                mbim_dissect_ms_modem_config_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9476
0
                                break;
9477
0
                            case MBIM_CID_MS_REGISTRATION_PARAMS:
9478
0
                                mbim_dissect_ms_registration_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9479
0
                                break;
9480
0
                            case MBIM_CID_MS_NETWORK_PARAMS:
9481
0
                                mbim_dissect_ms_network_params_info(frag_tvb, pinfo, subtree, offset, info_buff_len);
9482
0
                                break;
9483
0
                            case MBIM_CID_MS_UE_POLICY:
9484
0
                                mbim_dissect_tlv_ie_list(frag_tvb, pinfo, subtree, offset, offset, info_buff_len);
9485
0
                                break;
9486
0
                            case MBIM_CID_MS_WAKE_REASON:
9487
0
                                mbim_dissect_ms_wake_reason(frag_tvb, pinfo, subtree, offset);
9488
0
                                break;
9489
0
                            default:
9490
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9491
0
                                break;
9492
0
                        }
9493
0
                        break;
9494
0
                    case UUID_MS_SARCONTROL:
9495
0
                        switch (cid) {
9496
0
                            case MBIM_CID_MS_SAR_CONFIG:
9497
0
                                mbim_dissect_ms_sar_config(frag_tvb, pinfo, subtree, offset, true);
9498
0
                                break;
9499
0
                            case MBIM_CID_MS_TRANSMISSION_STATUS:
9500
0
                                mbim_dissect_ms_transmission_status(frag_tvb, subtree, offset, true);
9501
0
                                break;
9502
0
                            default:
9503
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9504
0
                                break;
9505
0
                        }
9506
0
                        break;
9507
0
                    case UUID_MS_UICC_LOW_LEVEL:
9508
0
                        switch (cid) {
9509
0
                            case MBIM_CID_MS_UICC_ATR:
9510
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9511
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9512
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9513
0
                                    } else {
9514
0
                                        mbim_dissect_ms_atr_info(frag_tvb, pinfo, subtree, offset);
9515
0
                                    }
9516
0
                                } else {
9517
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9518
0
                                }
9519
0
                                break;
9520
0
                            case MBIM_CID_MS_UICC_OPEN_CHANNEL:
9521
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9522
0
                                    mbim_dissect_ms_open_channel_info(frag_tvb, subtree, offset);
9523
0
                                } else {
9524
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9525
0
                                }
9526
0
                                break;
9527
0
                            case MBIM_CID_MS_UICC_CLOSE_CHANNEL:
9528
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9529
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_uicc_status, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9530
0
                                } else {
9531
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9532
0
                                }
9533
0
                                break;
9534
0
                            case MBIM_CID_MS_UICC_APDU:
9535
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9536
0
                                    mbim_dissect_ms_apdu_info(frag_tvb, pinfo, subtree, offset);
9537
0
                                } else {
9538
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9539
0
                                }
9540
0
                                break;
9541
0
                            case MBIM_CID_MS_UICC_TERMINAL_CAPABILITY:
9542
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9543
0
                                    mbim_dissect_ms_terminal_capability_info(frag_tvb, pinfo, subtree, offset, offset);
9544
0
                                } else {
9545
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9546
0
                                }
9547
0
                                break;
9548
0
                            case MBIM_CID_MS_UICC_RESET:
9549
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9550
0
                                    proto_tree_add_item(subtree, hf_mbim_ms_reset_pass_through_action, frag_tvb, offset, 4, ENC_LITTLE_ENDIAN);
9551
0
                                } else {
9552
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9553
0
                                }
9554
0
                                break;
9555
0
                            case MBIM_CID_MS_UICC_APP_LIST:
9556
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9557
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9558
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9559
0
                                    } else {
9560
0
                                        mbim_dissect_ms_app_list(frag_tvb, pinfo, subtree, offset);
9561
0
                                    }
9562
0
                                } else {
9563
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9564
0
                                }
9565
0
                                break;
9566
0
                            case MBIM_CID_MS_UICC_ACCESS_BINARY:
9567
0
                                mbim_dissect_ms_response(frag_tvb, pinfo, subtree, offset);
9568
0
                                break;
9569
0
                            case MBIM_CID_MS_UICC_ACCESS_RECORD:
9570
0
                                mbim_dissect_ms_response(frag_tvb, pinfo, subtree, offset);
9571
0
                                break;
9572
0
                            case MBIM_CID_MS_UICC_FILE_STATUS:
9573
0
                                if (msg_type == MBIM_COMMAND_DONE) {
9574
0
                                    if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
9575
0
                                        proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9576
0
                                    } else {
9577
0
                                        mbim_dissect_ms_file_status(frag_tvb, pinfo, subtree, offset);
9578
0
                                    }
9579
0
                                } else {
9580
0
                                    proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9581
0
                                }
9582
0
                                break;
9583
0
                            default:
9584
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9585
0
                                break;
9586
0
                        }
9587
0
                        break;
9588
0
                    case UUID_MS_VOICE_EXTENSIONS:
9589
0
                        switch (cid) {
9590
0
                        case MBIM_CID_MS_VOICE_EXTENSIONS_NITZ:
9591
0
                                mbim_dissect_ms_nitz(frag_tvb, pinfo, subtree, offset);
9592
0
                                break;
9593
0
                            default:
9594
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9595
0
                                break;
9596
0
                        }
9597
0
                        break;
9598
0
                    case UUID_EXT_IDX:
9599
0
                        {
9600
0
                            int cid_idx;
9601
0
                            mbim_dissect_fct dissect_cid;
9602
9603
0
                            try_val_to_str_idx(cid, uuid_ext_info->uuid_cid_list, &cid_idx);
9604
0
                            if (cid_idx != -1) {
9605
0
                                dissect_cid = (msg_type == MBIM_COMMAND_DONE) ? uuid_ext_info->uuid_fct_list[cid_idx].cmd_done :
9606
0
                                    uuid_ext_info->uuid_fct_list[cid_idx].ind_status;
9607
0
                                if (dissect_cid) {
9608
0
                                    dissect_cid(frag_tvb, pinfo, subtree, offset, mbim_info);
9609
0
                                } else if (info_buff_len) {
9610
0
                                    proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
9611
0
                                }
9612
0
                            } else {
9613
0
                                proto_tree_add_expert_remaining(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset);
9614
0
                            }
9615
0
                        }
9616
0
                        break;
9617
0
                    default:
9618
0
                        proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
9619
0
                        break;
9620
0
                }
9621
0
            }
9622
0
            break;
9623
0
        default:
9624
0
            break;
9625
0
    }
9626
9627
0
    return tvb_captured_length(tvb);
9628
0
}
9629
9630
static int
9631
dissect_mbim_descriptor(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
9632
0
{
9633
0
    proto_item *ti;
9634
0
    uint8_t length, type, subtype;
9635
9636
0
    length = tvb_get_uint8(tvb, 0);
9637
0
    type = tvb_get_uint8(tvb, 1);
9638
0
    subtype = tvb_get_uint8(tvb, 2);
9639
9640
0
    if ((type != 0x24) ||
9641
0
        !(((subtype == 0x1b) && (length == 12)) || ((subtype == 0x1c) && (length == 8)))){
9642
0
        return 0;
9643
0
    }
9644
9645
0
    ti = proto_tree_add_item(tree, hf_mbim_descriptor, tvb, 0, 0, ENC_NA);
9646
0
    proto_item_set_hidden(ti);
9647
9648
0
    if (subtype == 0x1b) {
9649
0
        proto_tree_add_item(tree, hf_mbim_descriptor_version, tvb, 3, 2, ENC_LITTLE_ENDIAN);
9650
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_control_message, tvb, 5, 2, ENC_LITTLE_ENDIAN);
9651
0
        proto_tree_add_item(tree, hf_mbim_descriptor_number_filters, tvb, 7, 1, ENC_NA);
9652
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_filter_size, tvb, 8, 1, ENC_NA);
9653
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_segment_size, tvb, 9, 2, ENC_LITTLE_ENDIAN);
9654
0
        proto_tree_add_bitmask(tree, tvb, 11, hf_mbim_descriptor_network_capabilities, ett_mbim_bitmap,
9655
0
                               mbim_descriptor_network_capabilities_fields, ENC_NA);
9656
0
    } else {
9657
0
        proto_tree_add_item(tree, hf_mbim_descriptor_extended_version, tvb, 3, 2, ENC_LITTLE_ENDIAN);
9658
0
        proto_tree_add_item(tree, hf_mbim_descriptor_max_outstanding_command_messages, tvb, 5, 1, ENC_NA);
9659
0
        proto_tree_add_item(tree, hf_mbim_descriptor_mtu, tvb, 6, 2, ENC_LITTLE_ENDIAN);
9660
0
    }
9661
9662
0
    return length;
9663
0
}
9664
9665
static int
9666
dissect_mbim_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
9667
2
{
9668
2
    proto_item *ti, *sig_ti, *pi;
9669
2
    proto_tree *mbim_tree, *subtree, *sig_tree;
9670
2
    bool is_32bits;
9671
2
    uint32_t nth_sig, length, next_index, base_offset, offset, datagram_index, datagram_length,
9672
2
            nb, total = 0, ndp = 0, block_len, dss_session_id;
9673
2
    const char *signature;
9674
2
    dissector_handle_t dissector;
9675
2
    tvbuff_t *datagram_tvb;
9676
2
    const uint32_t NTH16 = 0x484D434E;
9677
2
    const uint32_t NTH32 = 0x686D636E;
9678
2
    unsigned reported_length, parsed_length, padding_length;
9679
9680
2
    if (tvb_captured_length(tvb) < 12) {
9681
2
        return 0;
9682
2
    }
9683
9684
0
    nth_sig = tvb_get_letohl(tvb, 0);
9685
0
    if (nth_sig == NTH16) {
9686
0
        is_32bits = false;
9687
0
    } else if (nth_sig == NTH32) {
9688
0
        is_32bits = true;
9689
0
    } else {
9690
0
        return 0;
9691
0
    }
9692
9693
0
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM");
9694
0
    col_clear(pinfo->cinfo, COL_INFO);
9695
9696
0
    ti = proto_tree_add_item(tree, proto_mbim, tvb, 0, -1, ENC_NA);
9697
0
    mbim_tree = proto_item_add_subtree(ti, ett_mbim);
9698
0
    ti =proto_tree_add_item(mbim_tree, hf_mbim_bulk, tvb, 0, 0, ENC_NA);
9699
0
    proto_item_set_hidden(ti);
9700
9701
0
    subtree = proto_tree_add_subtree(mbim_tree, tvb, 0, 0, ett_mbim_msg_header, NULL, "NCM Transfer Header");
9702
0
    proto_tree_add_item(subtree, hf_mbim_bulk_nth_signature, tvb, 0, 4, ENC_ASCII);
9703
0
    proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_header_length, tvb, 4, 2, ENC_LITTLE_ENDIAN, &length);
9704
0
    proto_item_set_len(ti, length);
9705
0
    proto_tree_add_item(subtree, hf_mbim_bulk_nth_sequence_number, tvb, 6, 2, ENC_LITTLE_ENDIAN);
9706
0
    if (!is_32bits) {
9707
0
        ti = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_block_length, tvb, 8, 2, ENC_LITTLE_ENDIAN, &block_len);
9708
0
        pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_ndp_index, tvb, 10, 2, ENC_LITTLE_ENDIAN, &next_index);
9709
0
    } else {
9710
0
        ti = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_block_length_32, tvb, 8, 4, ENC_LITTLE_ENDIAN, &block_len);
9711
0
        pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_nth_ndp_index_32, tvb, 12, 4, ENC_LITTLE_ENDIAN, &next_index);
9712
0
    }
9713
0
    reported_length = tvb_reported_length(tvb);
9714
0
    if (block_len != reported_length) {
9715
0
        expert_add_info(pinfo, ti, &ei_mbim_invalid_block_len);
9716
0
    }
9717
0
    if (next_index % 4) {
9718
0
        expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error,
9719
0
                               "NDP Index is not a multiple of 4 bytes");
9720
0
        return tvb_captured_length(tvb);
9721
0
    }
9722
0
    if (next_index > reported_length) {
9723
0
        expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9724
0
        return tvb_captured_length(tvb);
9725
0
    }
9726
9727
0
    while (next_index) {
9728
0
        base_offset = offset = next_index;
9729
0
        nb = 0;
9730
0
        subtree = proto_tree_add_subtree(mbim_tree, tvb, offset, 0, ett_mbim_msg_header, NULL, "NCM Datagram Pointer");
9731
0
        signature = (const char*)tvb_get_string_enc(pinfo->pool, tvb, offset, 4, ENC_ASCII);
9732
0
        if ((!is_32bits && !strncmp(signature, "IPS", 3)) ||
9733
0
            (is_32bits && !strncmp(signature, "ips", 3))) {
9734
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9735
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9736
0
                                                      signature[1], signature[2], signature[3]);
9737
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9738
0
            proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_ips_session_id, tvb, offset+3, 1, ENC_NA);
9739
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9740
0
                                signature[2], signature[3]);
9741
0
            dissector = ip_handle;
9742
0
        } else if ((!is_32bits && !strncmp(signature, "IPC", 3)) ||
9743
0
                   (is_32bits && !strncmp(signature, "ipc", 3))) {
9744
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9745
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9746
0
                                                      signature[1], signature[2], signature[3]);
9747
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9748
0
            proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_ipc_session_id, tvb, offset+3, 1, ENC_NA);
9749
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9750
0
                                signature[2], signature[3]);
9751
0
            dissector = bulk_ndp_ctrl_handle;
9752
0
        } else if ((!is_32bits && !strncmp(signature, "DSS", 3)) ||
9753
0
                   (is_32bits && !strncmp(signature, "dss", 3))) {
9754
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9755
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9756
0
                                                      signature[1], signature[2], signature[3]);
9757
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9758
0
            proto_tree_add_item_ret_uint(sig_tree, hf_mbim_bulk_ndp_signature_dss_session_id,
9759
0
                                         tvb, offset+3, 1, ENC_LITTLE_ENDIAN, &dss_session_id);
9760
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9761
0
                                signature[2], signature[3]);
9762
0
            dissector = dissector_get_uint_handle(dss_dissector_table, dss_session_id);
9763
0
            if (dissector == NULL) {
9764
0
                dissector = data_handle;
9765
0
            }
9766
0
        } else if ((!is_32bits && !strncmp(signature, "DSC", 3)) ||
9767
0
                   (is_32bits && !strncmp(signature, "dsc", 3))) {
9768
0
            sig_ti = proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset,
9769
0
                                                      4, tvb_get_letohl(tvb, offset), "%c%c%c%u", signature[0],
9770
0
                                                      signature[1], signature[2], signature[3]);
9771
0
            sig_tree = proto_item_add_subtree(sig_ti, ett_mbim_msg_header);
9772
0
            proto_tree_add_item(sig_tree, hf_mbim_bulk_ndp_signature_dsc_session_id, tvb, offset+3, 1, ENC_LITTLE_ENDIAN);
9773
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%c%c%c%u", signature[0], signature[1],
9774
0
                                signature[2], signature[3]);
9775
0
            dissector = bulk_ndp_ctrl_handle;
9776
0
        } else if ((!is_32bits && !strcmp(signature, "NCM0")) ||
9777
0
                   (is_32bits && !strcmp(signature, "ncm0"))) {
9778
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4,
9779
0
                                             tvb_get_letohl(tvb, offset), "%s", signature);
9780
0
            col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, signature);
9781
0
            dissector = eth_handle;
9782
0
        } else if ((!is_32bits && !strcmp(signature, "NCM1")) ||
9783
0
                   (is_32bits && !strcmp(signature, "ncm1"))) {
9784
0
            proto_tree_add_uint_format_value(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4,
9785
0
                                             tvb_get_letohl(tvb, offset), "%s", signature);
9786
0
            col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, signature);
9787
0
            dissector = eth_fcs_handle;
9788
0
        } else {
9789
0
            proto_tree_add_item(subtree, hf_mbim_bulk_ndp_signature, tvb, offset, 4, ENC_BIG_ENDIAN);
9790
0
            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "0x%08X", tvb_get_ntohl(tvb, offset));
9791
0
            dissector = data_handle;
9792
0
        }
9793
0
        offset += 4;
9794
0
        pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &length);
9795
0
        if (length % (is_32bits ? 8 : 4)) {
9796
0
            expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error, "Length is not a multiple of %u bytes",
9797
0
                                   is_32bits ? 8 : 4);
9798
0
            return tvb_captured_length(tvb);
9799
0
        }
9800
0
        proto_item_set_len(ti, length);
9801
0
        offset += 2;
9802
0
        if (!is_32bits) {
9803
0
            pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_next_ndp_index, tvb,
9804
0
                                              offset, 2, ENC_LITTLE_ENDIAN, &next_index);
9805
0
            offset += 2;
9806
0
        } else {
9807
0
            proto_tree_add_item(subtree, hf_mbim_bulk_ndp_reserved, tvb,
9808
0
                                offset, 2, ENC_LITTLE_ENDIAN);
9809
0
            offset += 2;
9810
0
            pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_next_ndp_index_32,
9811
0
                                              tvb, offset, 4, ENC_LITTLE_ENDIAN, &next_index);
9812
0
            offset += 4;
9813
0
            proto_tree_add_item(subtree, hf_mbim_bulk_ndp_reserved2, tvb,
9814
0
                                offset, 4, ENC_LITTLE_ENDIAN);
9815
0
            offset += 4;
9816
0
        }
9817
0
        if (next_index % 4) {
9818
0
            expert_add_info_format(pinfo, pi, &ei_mbim_alignment_error,
9819
0
                                   "NDP Index is not a multiple of 4 bytes");
9820
0
            return tvb_captured_length(tvb);
9821
0
        }
9822
0
        if (next_index > reported_length) {
9823
0
            expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9824
0
            return tvb_captured_length(tvb);
9825
0
        }
9826
0
        while ((offset - base_offset) < length) {
9827
0
            if (!is_32bits) {
9828
0
                pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_index, tvb,
9829
0
                                                  offset, 2, ENC_LITTLE_ENDIAN, &datagram_index);
9830
0
                offset += 2;
9831
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_length, tvb,
9832
0
                                             offset, 2, ENC_LITTLE_ENDIAN, &datagram_length);
9833
0
                offset += 2;
9834
0
            } else {
9835
0
                pi = proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_index_32, tvb,
9836
0
                                                  offset, 4, ENC_LITTLE_ENDIAN, &datagram_index);
9837
0
                offset += 4;
9838
0
                proto_tree_add_item_ret_uint(subtree, hf_mbim_bulk_ndp_datagram_length_32, tvb,
9839
0
                                             offset, 4, ENC_LITTLE_ENDIAN, &datagram_length);
9840
0
                offset += 4;
9841
0
            }
9842
0
            if (next_index > reported_length) {
9843
0
                expert_add_info(pinfo, pi, &ei_mbim_out_of_bounds_index);
9844
0
                return tvb_captured_length(tvb);
9845
0
            }
9846
0
            if (datagram_index && datagram_length) {
9847
0
                proto_tree_add_item(subtree, hf_mbim_bulk_ndp_datagram, tvb,
9848
0
                                    datagram_index, datagram_length, ENC_NA);
9849
0
                datagram_tvb = tvb_new_subset_length(tvb, datagram_index, datagram_length);
9850
0
                if (dissector) {
9851
0
                    if (total) {
9852
0
                        col_set_str(pinfo->cinfo, COL_PROTOCOL, "/");
9853
0
                        col_set_fence(pinfo->cinfo, COL_PROTOCOL);
9854
0
                        col_set_str(pinfo->cinfo, COL_INFO, " | ");
9855
0
                        col_set_fence(pinfo->cinfo, COL_INFO);
9856
0
                    }
9857
0
                    call_dissector(dissector, datagram_tvb, pinfo, tree);
9858
0
                }
9859
0
                col_set_fence(pinfo->cinfo, COL_PROTOCOL);
9860
0
                col_set_fence(pinfo->cinfo, COL_INFO);
9861
0
                nb++;
9862
0
                if (++total > MBIM_MAX_ITEMS) {
9863
0
                    expert_add_info_format(pinfo, NULL, &ei_mbim_too_many_items,
9864
0
                                           "More than %u datagrams, dissection seems suspicious",
9865
0
                                           MBIM_MAX_ITEMS);
9866
0
                    return tvb_captured_length(tvb);
9867
0
                }
9868
0
            } else {
9869
0
                parsed_length = offset - base_offset;
9870
0
                padding_length = (parsed_length < length) ? length - parsed_length : 0;
9871
0
                if (padding_length) {
9872
0
                    proto_tree_add_item(subtree, hf_mbim_bulk_ndp_padding, tvb, offset, padding_length, ENC_NA);
9873
0
                }
9874
0
                break;
9875
0
            }
9876
0
        }
9877
0
        ti = proto_tree_add_uint(subtree, hf_mbim_bulk_ndp_nb_datagrams, tvb, 0, 0, nb);
9878
0
        proto_item_set_generated(ti);
9879
0
        if (++ndp > MBIM_MAX_ITEMS) {
9880
0
            expert_add_info_format(pinfo, NULL, &ei_mbim_too_many_items,
9881
0
                                   "More than %u NCM Datagram Pointers, dissection seems suspicious",
9882
0
                                   MBIM_MAX_ITEMS);
9883
0
            return tvb_captured_length(tvb);
9884
0
        }
9885
0
    }
9886
0
    ti = proto_tree_add_uint(mbim_tree, hf_mbim_bulk_total_nb_datagrams, tvb, 0, 0, total);
9887
0
    proto_item_set_generated(ti);
9888
9889
0
    return tvb_captured_length(tvb);
9890
0
}
9891
9892
static bool
9893
dissect_mbim_bulk_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
9894
2
{
9895
2
    urb_info_t *urb = (urb_info_t *)data;
9896
9897
2
    if ((urb == NULL) || (urb->conv == NULL) ||
9898
2
        ((urb->conv->interfaceClass != IF_CLASS_CDC_DATA) &&
9899
2
        (urb->conv->interfaceClass != IF_CLASS_UNKNOWN))) {
9900
0
        return false;
9901
0
    }
9902
9903
2
    if (dissect_mbim_bulk(tvb, pinfo, tree, urb)) {
9904
0
        return true;
9905
0
    }
9906
2
    return false;
9907
2
}
9908
9909
static int
9910
dissect_mbim_decode_as(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
9911
0
{
9912
0
    urb_info_t *urb;
9913
0
    usb_trans_info_t *usb_trans_info;
9914
9915
0
    if (!data || (tvb_reported_length(tvb) == 0)) {
9916
0
        return 0;
9917
0
    }
9918
9919
0
    urb = (urb_info_t *)data;
9920
0
    usb_trans_info = urb->usb_trans_info;
9921
9922
0
    switch (urb->transfer_type) {
9923
0
        case URB_CONTROL:
9924
0
            if (!usb_trans_info) {
9925
0
                return dissect_mbim_control(tvb, pinfo, tree, urb);
9926
0
            } else if ((usb_trans_info->setup.request == 0x00) && (pinfo->srcport == NO_ENDPOINT)) {
9927
                /* Skip Send Encapsulated Command header */
9928
0
                tvbuff_t *mbim_tvb = tvb_new_subset_remaining(tvb, 7);
9929
0
                return dissect_mbim_control(mbim_tvb, pinfo, tree, urb);
9930
0
            } else if ((usb_trans_info->setup.request == 0x01) && (pinfo->srcport != NO_ENDPOINT)) {
9931
0
                return dissect_mbim_control(tvb, pinfo, tree, urb);
9932
0
            }
9933
0
            break;
9934
0
        case URB_BULK:
9935
0
            return dissect_mbim_bulk(tvb, pinfo, tree, urb);
9936
0
        default:
9937
0
            break;
9938
0
    }
9939
0
    return 0;
9940
0
}
9941
9942
static int
9943
dissect_mbim_bulk_ndp_ctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
9944
0
{
9945
0
    proto_tree *ndp_ctrl_tree;
9946
0
    proto_item *ti;
9947
0
    unsigned offset = 0;
9948
0
    uint32_t msg_type, msg_len;
9949
9950
0
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "MBIM NDP Control");
9951
0
    col_clear(pinfo->cinfo, COL_INFO);
9952
9953
0
    ti = proto_tree_add_protocol_format(tree, proto_mbim, tvb, 0, -1, "MBIM NDP Control");
9954
0
    ndp_ctrl_tree = proto_item_add_subtree(ti, ett_mbim_bulk_ndp_ctrl);
9955
0
    ti = proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl, tvb, offset, 0, ENC_NA);
9956
0
    proto_item_set_hidden(ti);
9957
9958
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);
9959
0
    offset += 2;
9960
0
    col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(msg_type, mbim_ndp_ctrl_msg_type_vals, "Unknown"));
9961
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);
9962
0
    offset += 2;
9963
9964
0
    switch (msg_type) {
9965
0
        case MBIM_NDP_CTRL_MULTIFLOW_STATUS:
9966
0
            {
9967
0
                uint32_t watermark;
9968
9969
0
                proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_status, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9970
0
                offset += 2;
9971
0
                watermark = tvb_get_letohl(tvb, offset);
9972
0
                if (watermark == 0xffffffff) {
9973
0
                    proto_tree_add_uint_format_value(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_watermark, tvb, offset, 4,
9974
0
                                                     watermark, "Not reported (0xffffffff)");
9975
0
                } else {
9976
0
                    proto_tree_add_uint_format_value(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_multiflow_watermark, tvb, offset, 4,
9977
0
                                                     watermark, "%u payload bytes", watermark);
9978
0
                }
9979
0
            }
9980
0
            break;
9981
0
        default:
9982
0
            proto_tree_add_item(ndp_ctrl_tree, hf_mbim_bulk_ndp_ctrl_message_payload, tvb, offset, msg_len-4, ENC_NA);
9983
0
            break;
9984
0
    }
9985
0
    return tvb_captured_length(tvb);
9986
0
}
9987
9988
static unsigned
9989
mbim_uuid_hash(const void *key)
9990
0
{
9991
0
    return wmem_strong_hash((const uint8_t *)key, 4*sizeof(uint32_t));
9992
0
}
9993
9994
static gboolean
9995
mbim_uuid_equal(const void *v1, const void *v2)
9996
0
{
9997
0
    const uint32_t *uuid1 = (const uint32_t*)v1;
9998
0
    const uint32_t *uuid2 = (const uint32_t*)v2;
9999
10000
0
    return ((uuid1[0] == uuid2[0]) &&
10001
0
            (uuid1[1] == uuid2[1]) &&
10002
0
            (uuid1[2] == uuid2[2]) &&
10003
0
            (uuid1[3] == uuid2[3]));
10004
0
}
10005
10006
void mbim_register_uuid_ext(struct mbim_uuid_ext *uuid_ext)
10007
0
{
10008
0
    uint32_t *uuid_key;
10009
10010
0
    if (!mbim_uuid_ext_hash) {
10011
0
        mbim_uuid_ext_hash = wmem_map_new(wmem_epan_scope(), mbim_uuid_hash, mbim_uuid_equal);
10012
0
    }
10013
10014
0
    uuid_key = (uint32_t *)wmem_alloc(wmem_epan_scope(), 4*sizeof(uint32_t));
10015
0
    memcpy(uuid_key, uuid_ext->uuid, 4*sizeof(uint32_t));
10016
0
    wmem_map_insert(mbim_uuid_ext_hash, uuid_key, uuid_ext);
10017
0
}
10018
10019
void
10020
proto_register_mbim(void)
10021
15
{
10022
15
    module_t *mbim_module;
10023
15
    expert_module_t* expert_mbim;
10024
10025
15
    static hf_register_info hf[] = {
10026
15
        { &hf_mbim_control,
10027
15
            { "Control", "mbim.control",
10028
15
               FT_NONE, BASE_NONE, NULL, 0,
10029
15
              NULL, HFILL }
10030
15
        },
10031
15
        { &hf_mbim_header_message_type,
10032
15
            { "Message Type", "mbim.control.header.message_type",
10033
15
               FT_UINT32, BASE_HEX, VALS(mbim_msg_type_vals), 0,
10034
15
              NULL, HFILL }
10035
15
        },
10036
15
        { &hf_mbim_header_message_length,
10037
15
            { "Message Length", "mbim.control.header.message_length",
10038
15
               FT_UINT32, BASE_DEC, NULL, 0,
10039
15
              NULL, HFILL }
10040
15
        },
10041
15
        { &hf_mbim_header_transaction_id,
10042
15
            { "Transaction Id", "mbim.control.header.transaction_id",
10043
15
               FT_UINT32, BASE_DEC, NULL, 0,
10044
15
              NULL, HFILL }
10045
15
        },
10046
15
        { &hf_mbim_fragment_total,
10047
15
            { "Total Fragments", "mbim.control.fragment.total",
10048
15
               FT_UINT32, BASE_DEC, NULL, 0,
10049
15
              NULL, HFILL }
10050
15
        },
10051
15
        { &hf_mbim_fragment_current,
10052
15
            { "Current Fragment", "mbim.control.fragment.current",
10053
15
               FT_UINT32, BASE_DEC, NULL, 0,
10054
15
              NULL, HFILL }
10055
15
        },
10056
15
        { &hf_mbim_max_ctrl_transfer,
10057
15
            { "Max Control Transfer", "mbim.control.max_control_transfer",
10058
15
               FT_UINT32, BASE_DEC, NULL, 0,
10059
15
              NULL, HFILL }
10060
15
        },
10061
15
        { &hf_mbim_device_service_id,
10062
15
            { "Device Service Id", "mbim.control.device_service_id",
10063
15
               FT_GUID, BASE_NONE, NULL, 0,
10064
15
              NULL, HFILL }
10065
15
        },
10066
15
        { &hf_mbim_uuid_basic_connect_cid,
10067
15
            { "CID", "mbim.control.cid",
10068
15
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mbim_uuid_basic_connect_cid_vals_ext, 0,
10069
15
              NULL, HFILL }
10070
15
        },
10071
15
        { &hf_mbim_uuid_sms_cid,
10072
15
            { "CID", "mbim.control.cid",
10073
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_sms_cid_vals), 0,
10074
15
              NULL, HFILL }
10075
15
        },
10076
15
        { &hf_mbim_uuid_ussd_cid,
10077
15
            { "CID", "mbim.control.cid",
10078
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ussd_cid_vals), 0,
10079
15
              NULL, HFILL }
10080
15
        },
10081
15
        { &hf_mbim_uuid_phonebook_cid,
10082
15
            { "CID", "mbim.control.cid",
10083
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_phonebook_cid_vals), 0,
10084
15
              NULL, HFILL }
10085
15
        },
10086
15
        { &hf_mbim_uuid_stk_cid,
10087
15
            { "CID", "mbim.control.cid",
10088
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_stk_cid_vals), 0,
10089
15
              NULL, HFILL }
10090
15
        },
10091
15
        { &hf_mbim_uuid_auth_cid,
10092
15
            { "CID", "mbim.control.cid",
10093
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_auth_cid_vals), 0,
10094
15
              NULL, HFILL }
10095
15
        },
10096
15
        { &hf_mbim_uuid_dss_cid,
10097
15
            { "CID", "mbim.control.cid",
10098
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_dss_cid_vals), 0,
10099
15
              NULL, HFILL }
10100
15
        },
10101
15
        { &hf_mbim_uuid_multicarrier_cid,
10102
15
            { "CID", "mbim.control.cid",
10103
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_multicarrier_cid_vals), 0,
10104
15
              NULL, HFILL }
10105
15
        },
10106
15
        { &hf_mbim_uuid_ms_hostshutdown_cid,
10107
15
            { "CID", "mbim.control.cid",
10108
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_hostshutdown_cid_vals), 0,
10109
15
              NULL, HFILL }
10110
15
        },
10111
15
        { &hf_mbim_uuid_msfwid_cid,
10112
15
            { "CID", "mbim.control.cid",
10113
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_msfwid_cid_vals), 0,
10114
15
              NULL, HFILL }
10115
15
        },
10116
15
        { &hf_mbim_uuid_qmi_cid,
10117
15
            { "CID", "mbim.control.cid",
10118
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_qmi_cid_vals), 0,
10119
15
              NULL, HFILL }
10120
15
        },
10121
15
        { &hf_mbim_uuid_intel_fwusvc_cid,
10122
15
            { "CID", "mbim.control.cid",
10123
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_fwusvc_cid_vals), 0,
10124
15
              NULL, HFILL }
10125
15
        },
10126
15
        { &hf_mbim_uuid_intel_dptf_cid,
10127
15
            { "CID", "mbim.control.cid",
10128
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_dptf_cid_vals), 0,
10129
15
              NULL, HFILL }
10130
15
        },
10131
15
        { &hf_mbim_uuid_intel_sar_cid,
10132
15
            { "CID", "mbim.control.cid",
10133
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_sar_cid_vals), 0,
10134
15
              NULL, HFILL }
10135
15
        },
10136
15
        { &hf_mbim_uuid_intel_act_cid,
10137
15
            { "CID", "mbim.control.cid",
10138
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_act_cid_vals), 0,
10139
15
              NULL, HFILL }
10140
15
        },
10141
15
        { &hf_mbim_uuid_intel_trcsvc_cid,
10142
15
            { "CID", "mbim.control.cid",
10143
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_trcsvc_cid_vals), 0,
10144
15
              NULL, HFILL }
10145
15
        },
10146
15
        { &hf_mbim_uuid_intel_nrtc_cid,
10147
15
            { "CID", "mbim.control.cid",
10148
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_nrtc_cid_vals), 0,
10149
15
              NULL, HFILL }
10150
15
        },
10151
15
        { &hf_mbim_uuid_intel_usb_profile_cid,
10152
15
            { "CID", "mbim.control.cid",
10153
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_usb_profile_cid_vals), 0,
10154
15
              NULL, HFILL }
10155
15
        },
10156
15
        { &hf_mbim_uuid_intel_ciq_cid,
10157
15
            { "CID", "mbim.control.cid",
10158
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_intel_ciq_cid_vals), 0,
10159
15
              NULL, HFILL }
10160
15
        },
10161
15
        { &hf_mbim_uuid_atds_cid,
10162
15
            { "CID", "mbim.control.cid",
10163
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_atds_cid_vals), 0,
10164
15
              NULL, HFILL }
10165
15
        },
10166
15
        { &hf_mbim_uuid_multiflow_cid,
10167
15
            { "CID", "mbim.control.cid",
10168
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_multiflow_cid_vals), 0,
10169
15
              NULL, HFILL }
10170
15
        },
10171
15
        { &hf_mbim_uuid_basic_connect_extensions_cid,
10172
15
            { "CID", "mbim.control.cid",
10173
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_basic_connect_extensions_cid_vals), 0,
10174
15
              NULL, HFILL }
10175
15
        },
10176
15
        { &hf_mbim_uuid_ms_sarcontrol_cid,
10177
15
            { "CID", "mbim.control.cid",
10178
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_sarcontrol_cid_vals), 0,
10179
15
              NULL, HFILL }
10180
15
        },
10181
15
        { &hf_mbim_uuid_ms_uicc_low_level_cid,
10182
15
            { "CID", "mbim.control.cid",
10183
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_uicc_low_level_cid_vals), 0,
10184
15
              NULL, HFILL }
10185
15
        },
10186
15
        { &hf_mbim_uuid_ms_voice_extensions_cid,
10187
15
            { "CID", "mbim.control.cid",
10188
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_ms_voice_extensions_cid_vals), 0,
10189
15
              NULL, HFILL }
10190
15
        },
10191
15
        { &hf_mbim_cid,
10192
15
            { "CID", "mbim.control.cid",
10193
15
               FT_UINT32, BASE_DEC, NULL, 0,
10194
15
              NULL, HFILL }
10195
15
        },
10196
15
        { &hf_mbim_command_type,
10197
15
            { "Command Type", "mbim.control.command_type",
10198
15
               FT_UINT32, BASE_DEC, VALS(mbim_command_type_vals), 0,
10199
15
              NULL, HFILL }
10200
15
        },
10201
15
        { &hf_mbim_info_buffer_len,
10202
15
            { "Information Buffer Length", "mbim.control.info_buffer_len",
10203
15
               FT_UINT32, BASE_DEC, NULL, 0,
10204
15
              NULL, HFILL }
10205
15
        },
10206
15
        { &hf_mbim_info_buffer,
10207
15
            { "Information Buffer", "mbim.control.info_buffer",
10208
15
               FT_BYTES, BASE_NONE, NULL, 0,
10209
15
              NULL, HFILL }
10210
15
        },
10211
15
        { &hf_mbim_error_status_code,
10212
15
            { "Error Status Code", "mbim.control.error_status_code",
10213
15
               FT_UINT32, BASE_DEC, VALS(mbim_error_status_code_vals), 0,
10214
15
              NULL, HFILL }
10215
15
        },
10216
15
        { &hf_mbim_status,
10217
15
            { "Status", "mbim.control.status",
10218
15
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mbim_status_code_vals_ext, 0,
10219
15
              NULL, HFILL }
10220
15
        },
10221
15
        { &hf_mbim_tlv_ie_type,
10222
15
            { "Type", "mbim.control.tlv_ie.type",
10223
15
               FT_UINT16, BASE_DEC, VALS(mbim_tlv_type_vals), 0,
10224
15
              NULL, HFILL }
10225
15
        },
10226
15
        { &hf_mbim_tlv_ie_reserved,
10227
15
            { "Reserved", "mbim.control.tlv_ie.reserved",
10228
15
               FT_UINT8, BASE_DEC, NULL, 0,
10229
15
              NULL, HFILL }
10230
15
        },
10231
15
        { &hf_mbim_tlv_ie_padding_length,
10232
15
            { "Padding Length", "mbim.control.tlv_ie.padding_length",
10233
15
               FT_UINT8, BASE_DEC, NULL, 0,
10234
15
              NULL, HFILL }
10235
15
        },
10236
15
        { &hf_mbim_tlv_ie_data_length,
10237
15
            { "Data Length", "mbim.control.tlv_ie.data_length",
10238
15
               FT_UINT32, BASE_DEC, NULL, 0,
10239
15
              NULL, HFILL }
10240
15
        },
10241
15
        { &hf_mbim_tlv_ie_unnamed_data,
10242
15
            { "Data", "mbim.control.tlv_ie.unnamed_data",
10243
15
               FT_BYTES, BASE_NONE, NULL, 0,
10244
15
              NULL, HFILL }
10245
15
        },
10246
15
        { &hf_mbim_tlv_ie_data_wchar_str,
10247
15
            { "Data", "mbim.control.tlv_ie.wchar_str_data",
10248
15
               FT_STRING, BASE_NONE, NULL, 0,
10249
15
              NULL, HFILL }
10250
15
        },
10251
15
        { &hf_mbim_tlv_ie_data_int32,
10252
15
            { "Data", "mbim.control.tlv_ie.int32_data",
10253
15
               FT_UINT32, BASE_DEC, NULL, 0,
10254
15
              NULL, HFILL }
10255
15
        },
10256
15
        { &hf_mbim_tlv_ie_data_guid,
10257
15
            { "Data", "mbim.control.tlv_ie.guid_data",
10258
15
               FT_GUID, BASE_NONE, NULL, 0,
10259
15
              NULL, HFILL }
10260
15
        },
10261
15
        { &hf_mbim_tlv_ie_padding,
10262
15
            { "Padding", "mbim.control.tlv_ie.padding",
10263
15
               FT_BYTES, BASE_NONE, NULL, 0,
10264
15
              NULL, HFILL }
10265
15
        },
10266
15
        { &hf_mbim_ms_ursp_tc_length,
10267
15
            { "Length", "mbim.control.ursp.tc_length",
10268
15
               FT_UINT16, BASE_DEC, NULL, 0,
10269
15
              NULL, HFILL }
10270
15
        },
10271
15
        { &hf_mbim_ms_ursp_precedence,
10272
15
            { "Precedence", "mbim.control.ursp.precedence",
10273
15
               FT_UINT8, BASE_DEC, NULL, 0,
10274
15
              NULL, HFILL }
10275
15
        },
10276
15
        { &hf_mbim_ms_ursp_tc_type,
10277
15
            { "Type", "mbim.control.ursp.tc_type",
10278
15
               FT_UINT8, BASE_DEC, VALS(ursp_tc_type_vals), 0,
10279
15
              NULL, HFILL }
10280
15
        },
10281
15
        { &hf_mbim_ms_ursp_tc_os_id,
10282
15
            { "Os Id", "mbim.control.ursp.tc_os_id",
10283
15
               FT_GUID, BASE_NONE, NULL, 0,
10284
15
              NULL, HFILL }
10285
15
        },
10286
15
        { &hf_mbim_ms_ursp_tc_dnn,
10287
15
            { "DNN", "mbim.control.ursp.tc_dnn",
10288
15
               FT_STRING, BASE_NONE, NULL, 0,
10289
15
              NULL, HFILL }
10290
15
        },
10291
15
        { &hf_mbim_ms_ursp_tc_fqdn,
10292
15
            { "FQDN", "mbim.control.ursp.tc_fqdn",
10293
15
               FT_STRING, BASE_NONE, NULL, 0,
10294
15
              NULL, HFILL }
10295
15
        },
10296
15
        { &hf_mbim_ms_ursp_tc_ipv4,
10297
15
            { "IPv4 Address", "mbim.control.ursp.tc_ipv4",
10298
15
               FT_IPv4, BASE_NONE, NULL, 0,
10299
15
              NULL, HFILL }
10300
15
        },
10301
15
        { &hf_mbim_ms_ursp_tc_ipv4_mask,
10302
15
            { "IPv4 Mask", "mbim.control.ursp.tc_ipv4_mask",
10303
15
               FT_IPv4, BASE_NONE, NULL, 0,
10304
15
              NULL, HFILL }
10305
15
        },
10306
15
        { &hf_mbim_ms_ursp_tc_ipv6,
10307
15
            { "IPv6 Address", "mbim.control.ursp.tc_ipv6",
10308
15
               FT_IPv6, BASE_NONE, NULL, 0,
10309
15
              NULL, HFILL }
10310
15
        },
10311
15
        { &hf_mbim_ms_ursp_tc_ipv6_prefix_length,
10312
15
            { "IPv6 Prefix Length", "mbim.control.ursp.tc_ipv6_prefix_length",
10313
15
               FT_UINT8, BASE_DEC, NULL, 0,
10314
15
              NULL, HFILL }
10315
15
        },
10316
15
        { &hf_mbim_ms_ursp_tc_proto_id,
10317
15
            { "Protocol Identifier", "mbim.control.ursp.tc_proto_id",
10318
15
               FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0,
10319
15
              NULL, HFILL }
10320
15
        },
10321
15
        { &hf_mbim_ms_ursp_tc_port,
10322
15
            { "Port", "mbim.control.ursp.tc_port",
10323
15
               FT_UINT16, BASE_DEC, NULL, 0,
10324
15
              NULL, HFILL }
10325
15
        },
10326
15
        { &hf_mbim_ms_ursp_tc_port_range_low,
10327
15
            { "Port Range Low", "mbim.control.ursp.tc_port_range_low",
10328
15
               FT_UINT16, BASE_DEC, NULL, 0,
10329
15
              NULL, HFILL }
10330
15
        },
10331
15
        { &hf_mbim_ms_ursp_tc_port_range_high,
10332
15
            { "Port Range high", "mbim.control.ursp.tc_port_range_high",
10333
15
               FT_UINT16, BASE_DEC, NULL, 0,
10334
15
              NULL, HFILL }
10335
15
        },
10336
15
        { &hf_mbim_ms_ursp_tc_app_id,
10337
15
            { "App Id", "mbim.control.ursp.tc_app_id",
10338
15
               FT_STRING, BASE_NONE, NULL, 0,
10339
15
              NULL, HFILL }
10340
15
        },
10341
15
        { &hf_mbim_ms_ursp_tc_byte_value,
10342
15
            { "Value", "mbim.control.ursp.tc_byte_value",
10343
15
               FT_BYTES, BASE_NONE, NULL, 0,
10344
15
              NULL, HFILL }
10345
15
        },
10346
15
        { &hf_mbim_ms_ursp_tc_capability,
10347
15
            { "Capability", "mbim.control.ursp.tc_capability",
10348
15
               FT_UINT8, BASE_HEX, NULL, 0,
10349
15
              NULL, HFILL }
10350
15
        },
10351
15
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_ims,
10352
15
            { "IMS", "mbim.control.ursp.tc_capability_ims",
10353
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10354
15
              NULL, HFILL }
10355
15
        },
10356
15
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_mms,
10357
15
            { "MMS", "mbim.control.ursp.tc_capability_mms",
10358
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10359
15
              NULL, HFILL }
10360
15
        },
10361
15
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_supl,
10362
15
            { "SUPL", "mbim.control.ursp.tc_capability_supl",
10363
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10364
15
              NULL, HFILL }
10365
15
        },
10366
15
        { &hf_mbim_ms_ursp_tc_connection_capability_flag_internet,
10367
15
            { "Internet", "mbim.control.ursp.tc_capability_internet",
10368
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10369
15
              NULL, HFILL }
10370
15
        },
10371
15
        { &hf_mbim_ms_snssai_length,
10372
15
            { "Length", "mbim.control.snssai.length",
10373
15
               FT_UINT8, BASE_DEC, NULL, 0,
10374
15
              NULL, HFILL }
10375
15
        },
10376
15
        { &hf_mbim_ms_snssai_slice_service_type,
10377
15
            { "SST", "mbim.control.snssai.sst",
10378
15
               FT_UINT8, BASE_DEC, NULL, 0,
10379
15
              NULL, HFILL }
10380
15
        },
10381
15
        { &hf_mbim_ms_snssai_slice_differentiator,
10382
15
            { "SD", "mbim.control.snssai.sd",
10383
15
               FT_UINT24, BASE_DEC, NULL, 0,
10384
15
              NULL, HFILL }
10385
15
        },
10386
15
        { &hf_mbim_ms_snssai_mapped_slice_service_type,
10387
15
            { "Mapped SST", "mbim.control.snssai.mapped_sst",
10388
15
               FT_UINT8, BASE_DEC, NULL, 0,
10389
15
              NULL, HFILL }
10390
15
        },
10391
15
        { &hf_mbim_ms_snssai_mapped_slice_differentiator,
10392
15
            { "Mapped SD", "mbim.control.snssai.mapped_sd",
10393
15
               FT_UINT24, BASE_DEC, NULL, 0,
10394
15
              NULL, HFILL }
10395
15
        },
10396
15
        { &hf_mbim_ms_rej_snssai_cause,
10397
15
            { "Rejected Cause", "mbim.control.rej_snssai.cause",
10398
15
               FT_UINT8, BASE_DEC, NULL, 0,
10399
15
              NULL, HFILL }
10400
15
        },
10401
15
        { &hf_mbim_ms_pre_dflt_nssai_info_access_type,
10402
15
            { "Access Type", "mbim.control.pre_dflt_nssai_info.access_type",
10403
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_pre_dflt_nssai_info_access_type_vals), 0,
10404
15
              NULL, HFILL }
10405
15
        },
10406
15
        { &hf_mbim_device_caps_info_device_type,
10407
15
            { "Device Type", "mbim.control.device_caps_info.device_type",
10408
15
               FT_UINT32, BASE_DEC, VALS(mbim_device_caps_info_device_type_vals), 0,
10409
15
              NULL, HFILL }
10410
15
        },
10411
15
        { &hf_mbim_device_caps_info_cellular_class,
10412
15
            { "Cellular Class", "mbim.control.device_caps_info.cellular_class",
10413
15
               FT_UINT32, BASE_HEX, NULL, 0,
10414
15
              NULL, HFILL }
10415
15
        },
10416
15
        { &hf_mbim_cellular_class_gsm,
10417
15
            { "GSM", "mbim.control.cellular_class.gsm",
10418
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10419
15
              NULL, HFILL }
10420
15
        },
10421
15
        { &hf_mbim_cellular_class_cdma,
10422
15
            { "CDMA", "mbim.control.cellular_class.cdma",
10423
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10424
15
              NULL, HFILL }
10425
15
        },
10426
15
        { &hf_mbim_device_caps_info_voice_class,
10427
15
            { "Voice Class", "mbim.control.device_caps_info.voice_class",
10428
15
               FT_UINT32, BASE_DEC, VALS(mbim_device_caps_info_voice_class_vals), 0,
10429
15
              NULL, HFILL }
10430
15
        },
10431
15
        { &hf_mbim_device_caps_info_sim_class,
10432
15
            { "SIM Class", "mbim.control.device_caps_info.sim_class",
10433
15
               FT_UINT32, BASE_HEX, NULL, 0,
10434
15
              NULL, HFILL }
10435
15
        },
10436
15
        { &hf_mbim_device_caps_info_sim_class_logical,
10437
15
            { "Logical", "mbim.control.device_caps_info.sim_class.logical",
10438
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10439
15
              NULL, HFILL }
10440
15
        },
10441
15
        { &hf_mbim_device_caps_info_sim_class_removable,
10442
15
            { "Removable", "mbim.control.device_caps_info.sim_class.removable",
10443
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10444
15
              NULL, HFILL }
10445
15
        },
10446
15
        { &hf_mbim_device_caps_info_data_class,
10447
15
            { "Data Class", "mbim.control.device_caps_info.data_class",
10448
15
               FT_UINT32, BASE_HEX, NULL, 0,
10449
15
              NULL, HFILL }
10450
15
        },
10451
15
        { &hf_mbim_data_class_gprs,
10452
15
            { "GPRS", "mbim.control.data_class.gprs",
10453
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10454
15
              NULL, HFILL }
10455
15
        },
10456
15
        { &hf_mbim_data_class_edge,
10457
15
            { "EDGE", "mbim.control.data_class.edge",
10458
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10459
15
              NULL, HFILL }
10460
15
        },
10461
15
        { &hf_mbim_data_class_umts,
10462
15
            { "UMTS", "mbim.control.data_class.umts",
10463
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10464
15
              NULL, HFILL }
10465
15
        },
10466
15
        { &hf_mbim_data_class_hsdpa,
10467
15
            { "HSDPA", "mbim.control.data_class.hsdpa",
10468
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10469
15
              NULL, HFILL }
10470
15
        },
10471
15
        { &hf_mbim_data_class_hsupa,
10472
15
            { "HSUPA", "mbim.control.data_class.hsupa",
10473
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10474
15
              NULL, HFILL }
10475
15
        },
10476
15
        { &hf_mbim_data_class_lte,
10477
15
            { "LTE", "mbim.control.data_class.lte",
10478
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020,
10479
15
              NULL, HFILL }
10480
15
        },
10481
15
        { &hf_mbim_data_class_5g,
10482
15
            { "5G", "mbim.control.data_class.5g",
10483
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040,
10484
15
              NULL, HFILL }
10485
15
        },
10486
15
        { &hf_mbim_data_class_reserved_gsm,
10487
15
            { "Reserved for future GSM classes", "mbim.control.data_class.reserved_gsm",
10488
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x0000ff80,
10489
15
              NULL, HFILL }
10490
15
        },
10491
15
        { &hf_mbim_data_class_1xrtt,
10492
15
            { "1xRTT", "mbim.control.data_class.1xrtt",
10493
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00010000,
10494
15
              NULL, HFILL }
10495
15
        },
10496
15
        { &hf_mbim_data_class_1xevdo,
10497
15
            { "1xEV-DO", "mbim.control.data_class.1xevdo",
10498
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00020000,
10499
15
              NULL, HFILL }
10500
15
        },
10501
15
        { &hf_mbim_data_class_1xevdoreva,
10502
15
            { "1xEV-DO RevA", "mbim.control.data_class.1xevdoreva",
10503
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00040000,
10504
15
              NULL, HFILL }
10505
15
        },
10506
15
        { &hf_mbim_data_class_1xevdv,
10507
15
            { "1xEVDV", "mbim.control.data_class.1xevdv",
10508
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00080000,
10509
15
              NULL, HFILL }
10510
15
        },
10511
15
        { &hf_mbim_data_class_3xrtt,
10512
15
            { "3xRTT", "mbim.control.data_class.3xrtt",
10513
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00100000,
10514
15
              NULL, HFILL }
10515
15
        },
10516
15
        { &hf_mbim_data_class_1xevdorevb,
10517
15
            { "1xEV-DO RevB", "mbim.control.data_class.1xevdorevb",
10518
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00200000,
10519
15
              NULL, HFILL }
10520
15
        },
10521
15
        { &hf_mbim_data_class_umb,
10522
15
            { "UMB", "mbim.control.data_class.umb",
10523
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00400000,
10524
15
              NULL, HFILL }
10525
15
        },
10526
15
        { &hf_mbim_data_class_reserved_cdma,
10527
15
            { "Reserved for future CDMA classes", "mbim.control.data_class.reserved_cdma",
10528
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x7f800000,
10529
15
              NULL, HFILL }
10530
15
        },
10531
15
        { &hf_mbim_data_class_custom,
10532
15
            { "Custom", "mbim.control.data_class.custom",
10533
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x80000000,
10534
15
              NULL, HFILL }
10535
15
        },
10536
15
        { &hf_mbim_device_caps_info_sms_caps,
10537
15
            { "SMS Caps", "mbim.control.device_caps_info.sms_caps",
10538
15
               FT_UINT32, BASE_HEX, NULL, 0,
10539
15
              NULL, HFILL }
10540
15
        },
10541
15
        { &hf_mbim_device_caps_info_sms_caps_pdu_receive,
10542
15
            { "PDU Receive", "mbim.control.device_caps_info.sms_caps.pdu_receive",
10543
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10544
15
              NULL, HFILL }
10545
15
        },
10546
15
        { &hf_mbim_device_caps_info_sms_caps_pdu_send,
10547
15
            { "PDU Send", "mbim.control.device_caps_info.sms_caps.pdu_send",
10548
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10549
15
              NULL, HFILL }
10550
15
        },
10551
15
        { &hf_mbim_device_caps_info_sms_caps_text_receive,
10552
15
            { "Text Receive", "mbim.control.device_caps_info.sms_caps.text_receive",
10553
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10554
15
              NULL, HFILL }
10555
15
        },
10556
15
        { &hf_mbim_device_caps_info_sms_caps_text_send,
10557
15
            { "Text Send", "mbim.control.device_caps_info.sms_caps.text_send",
10558
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10559
15
              NULL, HFILL }
10560
15
        },
10561
15
        { &hf_mbim_device_caps_info_control_caps,
10562
15
            { "Control Caps", "mbim.control.device_caps_info.control_caps",
10563
15
               FT_UINT32, BASE_HEX, NULL, 0,
10564
15
              NULL, HFILL }
10565
15
        },
10566
15
        { &hf_mbim_device_caps_info_control_caps_reg_manual,
10567
15
            { "Reg Manual", "mbim.control.device_caps_info.control_caps.reg_manual",
10568
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10569
15
              NULL, HFILL }
10570
15
        },
10571
15
        { &hf_mbim_device_caps_info_control_caps_hw_radio_switch,
10572
15
            { "HW Radio Switch", "mbim.control.device_caps_info.control_caps.hw_radio_switch",
10573
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10574
15
              NULL, HFILL }
10575
15
        },
10576
15
        { &hf_mbim_device_caps_info_control_caps_cdma_mobile_ip,
10577
15
            { "CDMA Mobile IP", "mbim.control.device_caps_info.control_caps.cdma_mobile_ip",
10578
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10579
15
              NULL, HFILL }
10580
15
        },
10581
15
        { &hf_mbim_device_caps_info_control_caps_cdma_simple_ip,
10582
15
            { "CDMA Simple IP", "mbim.control.device_caps_info.control_caps.cdma_simple_ip",
10583
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10584
15
              NULL, HFILL }
10585
15
        },
10586
15
        { &hf_mbim_device_caps_info_control_caps_multi_carrier,
10587
15
            { "Multi Carrier", "mbim.control.device_caps_info.control_caps.multi_carrier",
10588
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10589
15
              NULL, HFILL }
10590
15
        },
10591
15
        { &hf_mbim_device_caps_info_control_caps_esim,
10592
15
            { "ESIM", "mbim.control.device_caps_info.control_caps.esim",
10593
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000020,
10594
15
              NULL, HFILL }
10595
15
        },
10596
15
        { &hf_mbim_device_caps_info_control_caps_ue_policy_route_selection,
10597
15
            { "UE Policy Route Selection", "mbim.control.device_caps_info.control_caps.ue_policy_route_selection",
10598
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000040,
10599
15
              NULL, HFILL }
10600
15
        },
10601
15
        { &hf_mbim_device_caps_info_control_caps_sim_hot_swap_capable,
10602
15
            { "Hot Swap Capable", "mbim.control.device_caps_info.control_caps.hot_swap_capable",
10603
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000080,
10604
15
              NULL, HFILL }
10605
15
        },
10606
15
        { &hf_mbim_device_caps_info_control_caps_use_ursp_rule_on_epc_capable,
10607
15
            { "Use URSP Rule On EPC Capable", "mbim.control.device_caps_info.control_caps.use_ursp_rule_on_epc_capable",
10608
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000100,
10609
15
              NULL, HFILL }
10610
15
        },
10611
15
        { &hf_mbim_device_caps_info_max_sessions,
10612
15
            { "Max Sessions", "mbim.control.device_caps_info.max_sessions",
10613
15
               FT_UINT32, BASE_DEC, NULL, 0,
10614
15
              NULL, HFILL }
10615
15
        },
10616
15
        { &hf_mbim_device_caps_info_data_subclass,
10617
15
            { "Data Subclass", "mbim.control.device_caps_info.data_subclass",
10618
15
               FT_UINT64, BASE_HEX, NULL, 0,
10619
15
              NULL, HFILL }
10620
15
        },
10621
15
        { &hf_mbim_data_subclass_5gendc,
10622
15
            { "5G EN-DC", "mbim.control.data_subclass.5gendc",
10623
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
10624
15
              NULL, HFILL }
10625
15
        },
10626
15
        { &hf_mbim_data_subclass_5gnr,
10627
15
            { "5G NR", "mbim.control.data_subclass.5gnr",
10628
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
10629
15
              NULL, HFILL }
10630
15
        },
10631
15
        { &hf_mbim_data_subclass_5gnedc,
10632
15
            { "5G NE-DC", "mbim.control.data_subclass.5gnedc",
10633
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000004,
10634
15
              NULL, HFILL }
10635
15
        },
10636
15
        { &hf_mbim_data_subclass_5gelte,
10637
15
            { "5G eLTE", "mbim.control.data_subclass.5gelte",
10638
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000008,
10639
15
              NULL, HFILL }
10640
15
        },
10641
15
        { &hf_mbim_data_subclass_5gngendc,
10642
15
            { "5G NG-EN-DC", "mbim.control.data_subclass.5gngendc",
10643
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000010,
10644
15
              NULL, HFILL }
10645
15
        },
10646
15
        { &hf_mbim_device_caps_info_wcdma_band_class,
10647
15
            { "WCDMA Band Class", "mbim.control.device_caps_info.wcdma_band_class",
10648
15
               FT_UINT32, BASE_DEC, NULL, 0,
10649
15
              NULL, HFILL }
10650
15
        },
10651
15
        { &hf_mbim_device_caps_info_custom_data_class_offset,
10652
15
            { "Custom Data Class Offset", "mbim.control.device_caps_info.custom_data_class.offset",
10653
15
               FT_UINT32, BASE_DEC, NULL, 0,
10654
15
              NULL, HFILL }
10655
15
        },
10656
15
        { &hf_mbim_device_caps_info_custom_data_class_size,
10657
15
            { "Custom Data Class Size", "mbim.control.device_caps_info.custom_data_class.size",
10658
15
               FT_UINT32, BASE_DEC, NULL, 0,
10659
15
              NULL, HFILL }
10660
15
        },
10661
15
        { &hf_mbim_device_caps_info_device_id_offset,
10662
15
            { "Device Id Offset", "mbim.control.device_caps_info.device_id.offset",
10663
15
               FT_UINT32, BASE_DEC, NULL, 0,
10664
15
              NULL, HFILL }
10665
15
        },
10666
15
        { &hf_mbim_device_caps_info_device_id_size,
10667
15
            { "Device Id Size", "mbim.control.device_caps_info.device_id.size",
10668
15
               FT_UINT32, BASE_DEC, NULL, 0,
10669
15
              NULL, HFILL }
10670
15
        },
10671
15
        { &hf_mbim_device_caps_info_fw_info_offset,
10672
15
            { "FW Info Offset", "mbim.control.device_caps_info.fw_info.offset",
10673
15
               FT_UINT32, BASE_DEC, NULL, 0,
10674
15
              NULL, HFILL }
10675
15
        },
10676
15
        { &hf_mbim_device_caps_info_fw_info_size,
10677
15
            { "FW Info Size", "mbim.control.device_caps_info.fw_info.size",
10678
15
               FT_UINT32, BASE_DEC, NULL, 0,
10679
15
              NULL, HFILL }
10680
15
        },
10681
15
        { &hf_mbim_device_caps_info_hw_info_offset,
10682
15
            { "HW Info Offset", "mbim.control.device_caps_info.hw_info.offset",
10683
15
               FT_UINT32, BASE_DEC, NULL, 0,
10684
15
              NULL, HFILL }
10685
15
        },
10686
15
        { &hf_mbim_device_caps_info_hw_info_size,
10687
15
            { "HW Info Size", "mbim.control.device_caps_info.hw_info.size",
10688
15
               FT_UINT32, BASE_DEC, NULL, 0,
10689
15
              NULL, HFILL }
10690
15
        },
10691
15
        { &hf_mbim_device_caps_info_custom_data_class,
10692
15
            { "Custom Data Class", "mbim.control.device_caps_info.custom_data_class",
10693
15
               FT_STRING, BASE_NONE, NULL, 0,
10694
15
              NULL, HFILL }
10695
15
        },
10696
15
        { &hf_mbim_device_caps_info_device_id,
10697
15
            { "Device Id", "mbim.control.device_caps_info.device_id",
10698
15
               FT_STRING, BASE_NONE, NULL, 0,
10699
15
              NULL, HFILL }
10700
15
        },
10701
15
        { &hf_mbim_device_caps_info_fw_info,
10702
15
            { "FW Info", "mbim.control.device_caps_info.fw_info",
10703
15
               FT_STRING, BASE_NONE, NULL, 0,
10704
15
              NULL, HFILL }
10705
15
        },
10706
15
        { &hf_mbim_device_caps_info_hw_info,
10707
15
            { "HW Info", "mbim.control.device_caps_info.hw_info",
10708
15
               FT_STRING, BASE_NONE, NULL, 0,
10709
15
              NULL, HFILL }
10710
15
        },
10711
15
        { &hf_mbim_device_caps_info_v2_executor_index,
10712
15
            { "Executor Index", "mbim.control.device_caps_info.executor_index",
10713
15
               FT_UINT32, BASE_DEC, NULL, 0,
10714
15
              NULL, HFILL }
10715
15
        },
10716
15
        { &hf_mbim_subscr_ready_status_ready_state,
10717
15
            { "Ready State", "mbim.control.subscriber_ready_status.ready_state",
10718
15
               FT_UINT32, BASE_DEC, VALS(mbim_subscr_ready_status_ready_state_vals), 0,
10719
15
              NULL, HFILL }
10720
15
        },
10721
15
        { &hf_mbim_subscr_ready_status_flags,
10722
15
            { "Flags", "mbim.control.subscriber_ready_status.flags",
10723
15
               FT_UINT32, BASE_HEX, NULL, 0,
10724
15
              NULL, HFILL }
10725
15
        },
10726
15
        { &hf_mbim_subscr_ready_status_flag_esim,
10727
15
            { "ESIM", "mbim.control.subscriber_ready_status.flags.esim",
10728
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10729
15
              NULL, HFILL }
10730
15
        },
10731
15
        { &hf_mbim_subscr_ready_status_flag_sim_removability_known,
10732
15
            { "SIM Removability Known", "mbim.control.subscriber_ready_status.flags.sim_removability_known",
10733
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10734
15
              NULL, HFILL }
10735
15
        },
10736
15
        { &hf_mbim_subscr_ready_status_flag_sim_removable,
10737
15
            { "SIM Removable", "mbim.control.subscriber_ready_status.flags.sim_removable",
10738
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10739
15
              NULL, HFILL }
10740
15
        },
10741
15
        { &hf_mbim_subscr_ready_status_flag_sim_slot_active,
10742
15
            { "SIM Slot Active", "mbim.control.subscriber_ready_status.flags.sim_slot_active",
10743
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10744
15
              NULL, HFILL }
10745
15
        },
10746
15
        { &hf_mbim_subscr_ready_status_susbcr_id_offset,
10747
15
            { "Subscriber Id Offset", "mbim.control.subscriber_ready_status.subscriber_id.offset",
10748
15
               FT_UINT32, BASE_DEC, NULL, 0,
10749
15
              NULL, HFILL }
10750
15
        },
10751
15
        { &hf_mbim_subscr_ready_status_susbcr_id_size,
10752
15
            { "Subscriber Id Size", "mbim.control.subscriber_ready_status.subscriber_id.size",
10753
15
               FT_UINT32, BASE_DEC, NULL, 0,
10754
15
              NULL, HFILL }
10755
15
        },
10756
15
        { &hf_mbim_subscr_ready_status_sim_icc_id_offset,
10757
15
            { "SIM ICC Id Offset", "mbim.control.subscriber_ready_status.sim_icc_id.offset",
10758
15
               FT_UINT32, BASE_DEC, NULL, 0,
10759
15
              NULL, HFILL }
10760
15
        },
10761
15
        { &hf_mbim_subscr_ready_status_sim_icc_id_size,
10762
15
            { "SIM ICC Id Size", "mbim.control.subscriber_ready_status.sim_icc_id.size",
10763
15
               FT_UINT32, BASE_DEC, NULL, 0,
10764
15
              NULL, HFILL }
10765
15
        },
10766
15
        { &hf_mbim_subscr_ready_status_ready_info,
10767
15
            { "Ready Info", "mbim.control.subscriber_ready_status.ready_info",
10768
15
               FT_UINT32, BASE_DEC, VALS(mbim_subscr_ready_status_ready_info_vals), 0,
10769
15
              NULL, HFILL }
10770
15
        },
10771
15
        { &hf_mbim_subscr_ready_status_elem_count,
10772
15
            { "Element Count", "mbim.control.subscriber_ready_status.element_count",
10773
15
               FT_UINT32, BASE_DEC, NULL, 0,
10774
15
              NULL, HFILL }
10775
15
        },
10776
15
        { &hf_mbim_subscr_ready_status_tel_nb_offset,
10777
15
            { "Telephone Number Offset", "mbim.control.subscriber_ready_status.tel_nb.offset",
10778
15
               FT_UINT32, BASE_DEC, NULL, 0,
10779
15
              NULL, HFILL }
10780
15
        },
10781
15
        { &hf_mbim_subscr_ready_status_tel_nb_size,
10782
15
            { "Telephone Number Size", "mbim.control.subscriber_ready_status.tel_nb.size",
10783
15
               FT_UINT32, BASE_DEC, NULL, 0,
10784
15
              NULL, HFILL }
10785
15
        },
10786
15
        { &hf_mbim_subscr_ready_status_susbcr_id,
10787
15
            { "Subscriber Id", "mbim.control.device_caps_info.subscriber_ready_status.subscriber_id",
10788
15
               FT_STRING, BASE_NONE, NULL, 0,
10789
15
              NULL, HFILL }
10790
15
        },
10791
15
        { &hf_mbim_subscr_ready_status_sim_icc_id,
10792
15
            { "SIM ICC Id", "mbim.control.device_caps_info.subscriber_ready_status.sim_icc_id",
10793
15
               FT_STRING, BASE_NONE, NULL, 0,
10794
15
              NULL, HFILL }
10795
15
        },
10796
15
        { &hf_mbim_subscr_ready_status_tel_nb,
10797
15
            { "Telephone Number", "mbim.control.device_caps_info.subscriber_ready_status.tel_nb",
10798
15
               FT_STRING, BASE_NONE, NULL, 0,
10799
15
              NULL, HFILL }
10800
15
        },
10801
15
        { &hf_mbim_radio_state_set,
10802
15
            { "Radio Set", "mbim.control.radio_state.set",
10803
15
               FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10804
15
              NULL, HFILL }
10805
15
        },
10806
15
        { &hf_mbim_radio_state_hw_radio_state,
10807
15
            { "HW Radio State", "mbim.control.radio_state.hw_radio_state",
10808
15
               FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10809
15
              NULL, HFILL }
10810
15
        },
10811
15
        { &hf_mbim_radio_state_sw_radio_state,
10812
15
            { "SW Radio State", "mbim.control.radio_state.sw_radio_stat",
10813
15
               FT_UINT32, BASE_DEC, VALS(mbim_radio_state_vals), 0,
10814
15
              NULL, HFILL }
10815
15
        },
10816
15
        { &hf_mbim_set_pin_pin_type,
10817
15
            { "PIN Type", "mbim.control.set_pin.pin_type",
10818
15
               FT_UINT32, BASE_DEC, VALS(mbim_pin_type_vals), 0,
10819
15
              NULL, HFILL }
10820
15
        },
10821
15
        { &hf_mbim_set_pin_pin_pin_operation,
10822
15
            { "PIN Operation", "mbim.control.set_pin.pin_operation",
10823
15
               FT_UINT32, BASE_DEC, VALS(mbim_pin_operation_vals), 0,
10824
15
              NULL, HFILL }
10825
15
        },
10826
15
        { &hf_mbim_set_pin_pin_pin_offset,
10827
15
            { "PIN Offset", "mbim.control.set_pin.pin.offset",
10828
15
               FT_UINT32, BASE_DEC, NULL, 0,
10829
15
              NULL, HFILL }
10830
15
        },
10831
15
        { &hf_mbim_set_pin_pin_pin_size,
10832
15
            { "PIN Size", "mbim.control.set_pin.pin.size",
10833
15
               FT_UINT32, BASE_DEC, NULL, 0,
10834
15
              NULL, HFILL }
10835
15
        },
10836
15
        { &hf_mbim_set_pin_new_pin_offset,
10837
15
            { "New PIN Offset", "mbim.control.set_pin.new_pin.offset",
10838
15
               FT_UINT32, BASE_DEC, NULL, 0,
10839
15
              NULL, HFILL }
10840
15
        },
10841
15
        { &hf_mbim_set_pin_new_pin_size,
10842
15
            { "New PIN Size", "mbim.control.set_pin.new_pin.size",
10843
15
               FT_UINT32, BASE_DEC, NULL, 0,
10844
15
              NULL, HFILL }
10845
15
        },
10846
15
        { &hf_mbim_set_pin_pin,
10847
15
            { "PIN", "mbim.control.set_pin.pin",
10848
15
               FT_STRING, BASE_NONE, NULL, 0,
10849
15
              NULL, HFILL }
10850
15
        },
10851
15
        { &hf_mbim_set_pin_new_pin,
10852
15
            { "New PIN", "mbim.control.set_pin.new_pin",
10853
15
               FT_STRING, BASE_NONE, NULL, 0,
10854
15
              NULL, HFILL }
10855
15
        },
10856
15
        { &hf_mbim_pin_info_pin_type,
10857
15
            { "PIN Type", "mbim.control.pin_info.pin_type",
10858
15
               FT_UINT32, BASE_DEC, VALS(mbim_pin_type_vals), 0,
10859
15
              NULL, HFILL }
10860
15
        },
10861
15
        { &hf_mbim_pin_info_pin_state,
10862
15
            { "PIN State", "mbim.control.pin_info.pin_state",
10863
15
               FT_UINT32, BASE_DEC, VALS(mbim_pin_state_vals), 0,
10864
15
              NULL, HFILL }
10865
15
        },
10866
15
        { &hf_mbim_pin_info_remaining_attempts,
10867
15
            { "Remaining Attempts", "mbim.control.pin_info.remaining_attempts",
10868
15
               FT_UINT32, BASE_DEC, NULL, 0,
10869
15
              NULL, HFILL }
10870
15
        },
10871
15
        { &hf_mbim_pin_list_pin_mode,
10872
15
            { "PIN Mode", "mbim.control.pin_list.pin_mode",
10873
15
               FT_UINT32, BASE_DEC, VALS(mbim_pin_mode_vals), 0,
10874
15
              NULL, HFILL }
10875
15
        },
10876
15
        { &hf_mbim_pin_list_pin_format,
10877
15
            { "PIN Format", "mbim.control.pin_list.pin_format",
10878
15
               FT_UINT32, BASE_DEC, VALS(mbim_pin_format_vals), 0,
10879
15
              NULL, HFILL }
10880
15
        },
10881
15
        { &hf_mbim_pin_list_pin_length_min,
10882
15
            { "PIN Length Min", "mbim.control.pin_list.pin_length_min",
10883
15
               FT_UINT32, BASE_DEC, NULL, 0,
10884
15
              NULL, HFILL }
10885
15
        },
10886
15
        { &hf_mbim_pin_list_pin_length_max,
10887
15
            { "PIN Length Max", "mbim.control.pin_list.pin_length_max",
10888
15
               FT_UINT32, BASE_DEC, NULL, 0,
10889
15
              NULL, HFILL }
10890
15
        },
10891
15
        { &hf_mbim_provider_state,
10892
15
            { "Provider State", "mbim.control.provider_state",
10893
15
               FT_UINT32, BASE_HEX, NULL, 0,
10894
15
              NULL, HFILL }
10895
15
        },
10896
15
        { &hf_mbim_provider_state_home,
10897
15
            { "Home", "mbim.control.provider_state.home",
10898
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
10899
15
              NULL, HFILL }
10900
15
        },
10901
15
        { &hf_mbim_provider_state_forbidden,
10902
15
            { "Forbidden", "mbim.control.provider_state.forbidden",
10903
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
10904
15
              NULL, HFILL }
10905
15
        },
10906
15
        { &hf_mbim_provider_state_preferred,
10907
15
            { "Preferred", "mbim.control.provider_state.preferred",
10908
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
10909
15
              NULL, HFILL }
10910
15
        },
10911
15
        { &hf_mbim_provider_state_visible,
10912
15
            { "Visible", "mbim.control.provider_state.visible",
10913
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
10914
15
              NULL, HFILL }
10915
15
        },
10916
15
        { &hf_mbim_provider_state_registered,
10917
15
            { "Registered", "mbim.control.provider_state.registered",
10918
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000010,
10919
15
              NULL, HFILL }
10920
15
        },
10921
15
        { &hf_mbim_provider_state_preferred_multicarrier,
10922
15
            { "Preferred Multicarrier", "mbim.control.provider_state.preferred_multicarrier",
10923
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000020,
10924
15
              NULL, HFILL }
10925
15
        },
10926
15
        { &hf_mbim_provider_provider_id_offset,
10927
15
            { "Provider Id Offset", "mbim.control.provider.provider_id_offset",
10928
15
               FT_UINT32, BASE_DEC, NULL, 0,
10929
15
              NULL, HFILL }
10930
15
        },
10931
15
        { &hf_mbim_provider_provider_id_size,
10932
15
            { "Provider Id Size", "mbim.control.provider.provider_id_size",
10933
15
               FT_UINT32, BASE_DEC, NULL, 0,
10934
15
              NULL, HFILL }
10935
15
        },
10936
15
        { &hf_mbim_provider_provider_name_offset,
10937
15
            { "Provider Name Offset", "mbim.control.provider.provider_name_offset",
10938
15
               FT_UINT32, BASE_DEC, NULL, 0,
10939
15
              NULL, HFILL }
10940
15
        },
10941
15
        { &hf_mbim_provider_provider_name_size,
10942
15
            { "Provider Name Size", "mbim.control.provider.provider_name_size",
10943
15
               FT_UINT32, BASE_DEC, NULL, 0,
10944
15
              NULL, HFILL }
10945
15
        },
10946
15
        { &hf_mbim_provider_cellular_class,
10947
15
            { "Cellular Class", "mbim.control.provider.cellular_class",
10948
15
               FT_UINT32, BASE_DEC, VALS(mbim_cellular_class_vals), 0,
10949
15
              NULL, HFILL }
10950
15
        },
10951
15
        { &hf_mbim_provider_rssi,
10952
15
            { "RSSI", "mbim.control.provider.rssi",
10953
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
10954
15
              NULL, HFILL }
10955
15
        },
10956
15
        { &hf_mbim_provider_error_rate,
10957
15
            { "Error Rate", "mbim.control.provider.error_rate",
10958
15
               FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
10959
15
              NULL, HFILL }
10960
15
        },
10961
15
        { &hf_mbim_provider_provider_id,
10962
15
            { "Provider Id", "mbim.control.provider.provider_id",
10963
15
               FT_STRING, BASE_NONE, NULL, 0,
10964
15
              NULL, HFILL }
10965
15
        },
10966
15
        { &hf_mbim_provider_provider_name,
10967
15
            { "Provider Name", "mbim.control.provider.provider_name",
10968
15
               FT_STRING, BASE_NONE, NULL, 0,
10969
15
              NULL, HFILL }
10970
15
        },
10971
15
        { &hf_mbim_providers_elem_count,
10972
15
            { "Element Count", "mbim.control.providers.elem_count",
10973
15
               FT_UINT32, BASE_DEC, NULL, 0,
10974
15
              NULL, HFILL }
10975
15
        },
10976
15
        { &hf_mbim_providers_provider_offset,
10977
15
            { "Provider Offset", "mbim.control.providers.provider_offset",
10978
15
               FT_UINT32, BASE_DEC, NULL, 0,
10979
15
              NULL, HFILL }
10980
15
        },
10981
15
        { &hf_mbim_providers_provider_size,
10982
15
            { "Provider Size", "mbim.control.providers.provider_size",
10983
15
               FT_UINT32, BASE_DEC, NULL, 0,
10984
15
              NULL, HFILL }
10985
15
        },
10986
15
        { &hf_mbim_visible_providers_req_action,
10987
15
            { "Action", "mbim.control.visible_providers_req.action",
10988
15
               FT_UINT32, BASE_DEC, VALS(mbim_visible_providers_action_vals), 0,
10989
15
              NULL, HFILL }
10990
15
        },
10991
15
        { &hf_mbim_set_register_state_provider_id_offset,
10992
15
            { "Provider Id Offset", "mbim.control.set_register_state.provider_id.offset",
10993
15
               FT_UINT32, BASE_DEC, NULL, 0,
10994
15
              NULL, HFILL }
10995
15
        },
10996
15
        { &hf_mbim_set_register_state_provider_id_size,
10997
15
            { "Provider Id Size", "mbim.control.set_register_state.provider_id.size",
10998
15
               FT_UINT32, BASE_DEC, NULL, 0,
10999
15
              NULL, HFILL }
11000
15
        },
11001
15
        { &hf_mbim_set_register_state_register_action,
11002
15
            { "Register Action", "mbim.control.set_register_state.register_action",
11003
15
               FT_UINT32, BASE_DEC, VALS(mbim_register_action_vals), 0,
11004
15
              NULL, HFILL }
11005
15
        },
11006
15
        { &hf_mbim_register_state_data_class,
11007
15
            { "Data Class", "mbim.control.set_register_state.data_class",
11008
15
               FT_UINT32, BASE_HEX, NULL, 0,
11009
15
              NULL, HFILL }
11010
15
        },
11011
15
        { &hf_mbim_set_register_state_provider_id,
11012
15
            { "Provider Id", "mbim.control.set_register_state.provider_id",
11013
15
               FT_STRING, BASE_NONE, NULL, 0,
11014
15
              NULL, HFILL }
11015
15
        },
11016
15
        { &hf_mbim_registration_state_info_nw_error,
11017
15
            { "Network Error", "mbim.control.registration_state_info.nw_error",
11018
15
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11019
15
              NULL, HFILL }
11020
15
        },
11021
15
        { &hf_mbim_registration_state_info_register_state,
11022
15
            { "Register State", "mbim.control.registration_state_info.register_state",
11023
15
               FT_UINT32, BASE_DEC, VALS(mbim_register_state_vals), 0,
11024
15
              NULL, HFILL }
11025
15
        },
11026
15
        { &hf_mbim_registration_state_info_register_mode,
11027
15
            { "Register Mode", "mbim.control.registration_state_info.register_mode",
11028
15
               FT_UINT32, BASE_DEC, VALS(mbim_register_mode_vals), 0,
11029
15
              NULL, HFILL }
11030
15
        },
11031
15
        { &hf_mbim_registration_state_info_available_data_classes,
11032
15
            { "Available Data Classes", "mbim.control.registration_state_info.available_data_classes",
11033
15
               FT_UINT32, BASE_HEX, NULL, 0,
11034
15
              NULL, HFILL }
11035
15
        },
11036
15
        { &hf_mbim_registration_state_info_current_cellular_class,
11037
15
            { "Current Cellular Class", "mbim.control.registration_state_info.current_cellular_class",
11038
15
               FT_UINT32, BASE_DEC, VALS(mbim_cellular_class_vals), 0,
11039
15
              NULL, HFILL }
11040
15
        },
11041
15
        { &hf_mbim_registration_state_info_provider_id_offset,
11042
15
            { "Provider Id Offset", "mbim.control.registration_state_info.provider_id.offset",
11043
15
               FT_UINT32, BASE_DEC, NULL, 0,
11044
15
              NULL, HFILL }
11045
15
        },
11046
15
        { &hf_mbim_registration_state_info_provider_id_size,
11047
15
            { "Provider Id Size", "mbim.control.registration_state_info.provider_id.size",
11048
15
               FT_UINT32, BASE_DEC, NULL, 0,
11049
15
              NULL, HFILL }
11050
15
        },
11051
15
        { &hf_mbim_registration_state_info_provider_name_offset,
11052
15
            { "Provider Name Offset", "mbim.control.registration_state_info.provider_name.offset",
11053
15
               FT_UINT32, BASE_DEC, NULL, 0,
11054
15
              NULL, HFILL }
11055
15
        },
11056
15
        { &hf_mbim_registration_state_info_provider_name_size,
11057
15
            { "Provider Name Size", "mbim.control.registration_state_info.provider_name.size",
11058
15
               FT_UINT32, BASE_DEC, NULL, 0,
11059
15
              NULL, HFILL }
11060
15
        },
11061
15
        { &hf_mbim_registration_state_info_roaming_text_offset,
11062
15
            { "Roaming Text Offset", "mbim.control.registration_state_info.roaming_text.offset",
11063
15
               FT_UINT32, BASE_DEC, NULL, 0,
11064
15
              NULL, HFILL }
11065
15
        },
11066
15
        { &hf_mbim_registration_state_info_roaming_text_size,
11067
15
            { "Roaming Text Size", "mbim.control.registration_state_info.roaming_text.size",
11068
15
               FT_UINT32, BASE_DEC, NULL, 0,
11069
15
              NULL, HFILL }
11070
15
        },
11071
15
        { &hf_mbim_registration_state_info_registration_flags,
11072
15
            { "Registration Flags", "mbim.control.registration_state_info.registration_flags",
11073
15
               FT_UINT32, BASE_HEX, NULL, 0,
11074
15
              NULL, HFILL }
11075
15
        },
11076
15
        { &hf_mbim_registration_state_info_registration_flags_manual_selection_not_available,
11077
15
            { "Manual Selection Not Available", "mbim.control.registration_state_info.registration_flags.manual_selection_not_available",
11078
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
11079
15
              NULL, HFILL }
11080
15
        },
11081
15
        { &hf_mbim_registration_state_info_registration_flags_packet_service_auto_attach,
11082
15
            { "Packet Service Auto Attach", "mbim.control.registration_state_info.registration_flags.packet_service_auto_attach",
11083
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
11084
15
              NULL, HFILL }
11085
15
        },
11086
15
        { &hf_mbim_registration_state_info_preferred_data_class,
11087
15
            { "Preferred Data Class", "mbim.control.registration_state_info.preferred_data_class",
11088
15
               FT_UINT32, BASE_DEC, NULL, 0,
11089
15
              NULL, HFILL }
11090
15
        },
11091
15
        { &hf_mbim_registration_state_info_provider_id,
11092
15
            { "Provider Id", "mbim.control.registration_state_info.provider_id",
11093
15
               FT_STRING, BASE_NONE, NULL, 0,
11094
15
              NULL, HFILL }
11095
15
        },
11096
15
        { &hf_mbim_registration_state_info_provider_name,
11097
15
            { "Provider Name", "mbim.control.registration_state_info.provider_name",
11098
15
               FT_STRING, BASE_NONE, NULL, 0,
11099
15
              NULL, HFILL }
11100
15
        },
11101
15
        { &hf_mbim_registration_state_info_roaming_text,
11102
15
            { "Roaming Text", "mbim.control.registration_state_info.roaming_text",
11103
15
               FT_STRING, BASE_NONE, NULL, 0,
11104
15
              NULL, HFILL }
11105
15
        },
11106
15
        { &hf_mbim_set_packet_service_action,
11107
15
            { "Action", "mbim.control.set_packet_service.action",
11108
15
               FT_UINT32, BASE_DEC, VALS(mbim_packet_service_action_vals), 0,
11109
15
              NULL, HFILL }
11110
15
        },
11111
15
        { &hf_mbim_ms_plmn_mcc,
11112
15
            { "Mobile Country Code", "mbim.control.ms_plmn.mcc",
11113
15
               FT_UINT16, BASE_DEC, NULL, 0,
11114
15
              NULL, HFILL }
11115
15
        },
11116
15
        { &hf_mbim_ms_plmn_mnc,
11117
15
            { "Mobile Network Code", "mbim.control.ms_plmn.mnc",
11118
15
               FT_UINT16, BASE_DEC, NULL, 0,
11119
15
              NULL, HFILL }
11120
15
        },
11121
15
        { &hf_mbim_ms_tai_tac,
11122
15
            { "Tracking Area Code", "mbim.control.ms_tai.tac",
11123
15
               FT_UINT32, BASE_DEC, NULL, 0,
11124
15
              NULL, HFILL }
11125
15
        },
11126
15
        { &hf_mbim_ms_tai_list_type,
11127
15
            { "TAI List Type", "mbim.control.ms_tai.list_type",
11128
15
               FT_UINT8, BASE_DEC, VALS(mbim_tai_list_type_vals), 0,
11129
15
              NULL, HFILL }
11130
15
        },
11131
15
        { &hf_mbim_ms_tai_list_single_plmn_tac_element,
11132
15
            { "TAC Element", "mbim.control.ms_tai.tac_element",
11133
15
               FT_UINT8, BASE_DEC, NULL, 0,
11134
15
              NULL, HFILL }
11135
15
        },
11136
15
        { &hf_mbim_ms_tai_list_multi_plmn_tai_element,
11137
15
            { "TAI Element", "mbim.control.ms_tai.tai_element",
11138
15
               FT_UINT8, BASE_DEC, NULL, 0,
11139
15
              NULL, HFILL }
11140
15
        },
11141
15
        { &hf_mbim_packet_service_info_nw_error,
11142
15
            { "Network Error", "mbim.control.packet_service_info.nw_error",
11143
15
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11144
15
              NULL, HFILL }
11145
15
        },
11146
15
        { &hf_mbim_packet_service_info_packet_service_state,
11147
15
            { "Packet Service State", "mbim.control.packet_service_info.packet_service_state",
11148
15
               FT_UINT32, BASE_DEC, VALS(mbim_packet_service_state_vals), 0,
11149
15
              NULL, HFILL }
11150
15
        },
11151
15
        { &hf_mbim_packet_service_info_highest_available_data_class,
11152
15
            { "Highest Available Data Class", "mbim.control.packet_service_info.highest_available_data_class",
11153
15
               FT_UINT32, BASE_HEX, NULL, 0,
11154
15
              NULL, HFILL }
11155
15
        },
11156
15
        { &hf_mbim_packet_service_info_current_data_class,
11157
15
            { "Current Data Class", "mbim.control.packet_service_info.current_data_class",
11158
15
               FT_UINT32, BASE_HEX, NULL, 0,
11159
15
              NULL, HFILL }
11160
15
        },
11161
15
        { &hf_mbim_packet_service_info_uplink_speed,
11162
15
            { "Uplink Speed", "mbim.control.packet_service_info.uplink_speed",
11163
15
               FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_bit_sec), 0,
11164
15
              NULL, HFILL }
11165
15
        },
11166
15
        { &hf_mbim_packet_service_info_downlink_speed,
11167
15
            { "Downlink Speed", "mbim.control.packet_service_info.downlink_speed",
11168
15
               FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_bit_sec), 0,
11169
15
              NULL, HFILL }
11170
15
        },
11171
15
        { &hf_mbim_packet_service_info_frequency_range,
11172
15
            { "Frequency Range", "mbim.control.packet_service_info.frequency_range",
11173
15
               FT_UINT32, BASE_DEC, VALS(mbim_packet_service_info_frequency_range_vals), 0,
11174
15
              NULL, HFILL }
11175
15
        },
11176
15
        { &hf_mbim_packet_service_info_data_subclass,
11177
15
            { "Data Subclass", "mbim.control.packet_service_info.data_subclass",
11178
15
               FT_UINT32, BASE_HEX, NULL, 0,
11179
15
              NULL, HFILL }
11180
15
        },
11181
15
        { &hf_mbim_set_signal_state_signal_strength_interval,
11182
15
            { "Signal Strength Interval", "mbim.control.set_signal_state.signal_strength_interval",
11183
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
11184
15
              NULL, HFILL }
11185
15
        },
11186
15
        { &hf_mbim_set_signal_state_rssi_threshold,
11187
15
            { "RSSI Threshold", "mbim.control.set_signal_state.rssi_threshold",
11188
15
               FT_UINT32, BASE_DEC, NULL, 0,
11189
15
              NULL, HFILL }
11190
15
        },
11191
15
        { &hf_mbim_set_signal_state_error_rate_threshold,
11192
15
            { "Error Rate Threshold", "mbim.control.set_signal_state.error_rate_threshold",
11193
15
               FT_UINT32, BASE_DEC, NULL, 0,
11194
15
              NULL, HFILL }
11195
15
        },
11196
15
        { &hf_mbim_signal_state_element_rsrp,
11197
15
            { "RSRP", "mbim.control.signal_state_element.rsrp",
11198
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrp_signal_state_fmt), 0,
11199
15
              NULL, HFILL }
11200
15
        },
11201
15
        { &hf_mbim_signal_state_element_snr,
11202
15
            { "SNR", "mbim.control.signal_state_element.snr",
11203
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_snr_signal_state_fmt), 0,
11204
15
              NULL, HFILL }
11205
15
        },
11206
15
        { &hf_mbim_signal_state_element_rsrp_threshold,
11207
15
            { "RSRP Threshold", "mbim.control.signal_state_element.rsrp_threshold",
11208
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
11209
15
              NULL, HFILL }
11210
15
        },
11211
15
        { &hf_mbim_signal_state_element_snr_threshold,
11212
15
            { "SNR Threshold", "mbim.control.signal_state_element.snr_threshold",
11213
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0,
11214
15
              NULL, HFILL }
11215
15
        },
11216
15
        { &hf_mbim_signal_state_element_system_type,
11217
15
            { "System Type", "mbim.control.signal_state_element.system_type",
11218
15
               FT_UINT32, BASE_HEX, NULL, 0,
11219
15
              NULL, HFILL }
11220
15
        },
11221
15
        { &hf_mbim_signal_state_info_rssi,
11222
15
            { "RSSI", "mbim.control.signal_state_info.rssi",
11223
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
11224
15
              NULL, HFILL }
11225
15
        },
11226
15
        { &hf_mbim_signal_state_info_error_rate,
11227
15
            { "Error Rate", "mbim.control.signal_state_info.error_rate",
11228
15
               FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
11229
15
              NULL, HFILL }
11230
15
        },
11231
15
        { &hf_mbim_signal_state_info_signal_strength_interval,
11232
15
            { "Signal Strength Interval", "mbim.control.signal_state_info.signal_strength_interval",
11233
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
11234
15
              NULL, HFILL }
11235
15
        },
11236
15
        { &hf_mbim_signal_state_info_rssi_threshold,
11237
15
            { "RSSI Threshold", "mbim.control.signal_state_info.rssi_threshold",
11238
15
               FT_UINT32, BASE_DEC, NULL, 0,
11239
15
              NULL, HFILL }
11240
15
        },
11241
15
        { &hf_mbim_signal_state_info_error_rate_threshold,
11242
15
            { "Error Rate Threshold", "mbim.control.signal_state_info.error_rate_threshold",
11243
15
               FT_UINT32, BASE_DEC, NULL, 0,
11244
15
              NULL, HFILL }
11245
15
        },
11246
15
        { &hf_mbim_signal_state_info_rsrp_snr_offset,
11247
15
            { "Rsrp Snr Offset", "mbim.control.signal_state_info.rsrp_snr_offset",
11248
15
               FT_UINT32, BASE_DEC, NULL, 0,
11249
15
              NULL, HFILL }
11250
15
        },
11251
15
        { &hf_mbim_signal_state_info_rsrp_snr_size,
11252
15
            { "Rsrp Snr Size", "mbim.control.signal_state_info.rsrp_snr_size",
11253
15
               FT_UINT32, BASE_DEC, NULL, 0,
11254
15
              NULL, HFILL }
11255
15
        },
11256
15
        { &hf_mbim_signal_state_info_elem_count,
11257
15
            { "Element Count", "mbim.control.signal_state_info.elem_count",
11258
15
               FT_UINT32, BASE_DEC, NULL, 0,
11259
15
              NULL, HFILL }
11260
15
        },
11261
15
        { &hf_mbim_context_type,
11262
15
            { "Context Type", "mbim.control.context_type",
11263
15
               FT_GUID, BASE_NONE, NULL, 0,
11264
15
              NULL, HFILL }
11265
15
        },
11266
15
        { &hf_mbim_set_connect_session_id,
11267
15
            { "Session Id", "mbim.control.set_connect.session_id",
11268
15
               FT_UINT32, BASE_DEC, NULL, 0,
11269
15
              NULL, HFILL }
11270
15
        },
11271
15
        { &hf_mbim_set_connect_activation_command,
11272
15
            { "Activation Command", "mbim.control.set_connect.activation_command",
11273
15
               FT_UINT32, BASE_DEC, VALS(mbim_activation_command_vals), 0,
11274
15
              NULL, HFILL }
11275
15
        },
11276
15
        { &hf_mbim_set_connect_activation_option,
11277
15
            { "Activation Option", "mbim.control.set_connect.activation_option",
11278
15
               FT_UINT32, BASE_DEC, VALS(mbim_activation_option_vals), 0,
11279
15
              NULL, HFILL }
11280
15
        },
11281
15
        { &hf_mbim_set_connect_access_string_offset,
11282
15
            { "Access String Offset", "mbim.control.set_connect.access_string_offset",
11283
15
               FT_UINT32, BASE_DEC, NULL, 0,
11284
15
              NULL, HFILL }
11285
15
        },
11286
15
        { &hf_mbim_set_connect_access_string_size,
11287
15
            { "Access String Size", "mbim.control.set_connect.access_string_size",
11288
15
               FT_UINT32, BASE_DEC, NULL, 0,
11289
15
              NULL, HFILL }
11290
15
        },
11291
15
        { &hf_mbim_set_connect_user_name_offset,
11292
15
            { "User Name Offset", "mbim.control.set_connect.user_name_offset",
11293
15
               FT_UINT32, BASE_DEC, NULL, 0,
11294
15
              NULL, HFILL }
11295
15
        },
11296
15
        { &hf_mbim_set_connect_user_name_size,
11297
15
            { "User Name Size", "mbim.control.set_connect.user_name_size",
11298
15
               FT_UINT32, BASE_DEC, NULL, 0,
11299
15
              NULL, HFILL }
11300
15
        },
11301
15
        { &hf_mbim_set_connect_password_offset,
11302
15
            { "Password Offset", "mbim.control.set_connect.password_offset",
11303
15
               FT_UINT32, BASE_DEC, NULL, 0,
11304
15
              NULL, HFILL }
11305
15
        },
11306
15
        { &hf_mbim_set_connect_password_size,
11307
15
            { "Password Size", "mbim.control.set_connect.password_size",
11308
15
               FT_UINT32, BASE_DEC, NULL, 0,
11309
15
              NULL, HFILL }
11310
15
        },
11311
15
        { &hf_mbim_set_connect_compression,
11312
15
            { "Compression", "mbim.control.set_connect.compression",
11313
15
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
11314
15
              NULL, HFILL }
11315
15
        },
11316
15
        { &hf_mbim_set_connect_auth_protocol,
11317
15
            { "Authentication Protocol", "mbim.control.set_connect.auth_protocol",
11318
15
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
11319
15
              NULL, HFILL }
11320
15
        },
11321
15
        { &hf_mbim_set_connect_ip_type,
11322
15
            { "IP Type", "mbim.control.set_connect.ip_type",
11323
15
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
11324
15
              NULL, HFILL }
11325
15
        },
11326
15
        { &hf_mbim_set_connect_access_string,
11327
15
            { "Access String", "mbim.control.set_connect.access_string",
11328
15
               FT_STRING, BASE_NONE, NULL, 0,
11329
15
              NULL, HFILL }
11330
15
        },
11331
15
        { &hf_mbim_set_connect_user_name,
11332
15
            { "User Name", "mbim.control.set_connect.user_name",
11333
15
               FT_STRING, BASE_NONE, NULL, 0,
11334
15
              NULL, HFILL }
11335
15
        },
11336
15
        { &hf_mbim_set_connect_password,
11337
15
            { "Password", "mbim.control.set_connect.password",
11338
15
               FT_STRING, BASE_NONE, NULL, 0,
11339
15
              NULL, HFILL }
11340
15
        },
11341
15
        { &hf_mbim_set_connect_media_preference,
11342
15
            { "Media Preference", "mbim.control.set_connect.media_preference",
11343
15
               FT_UINT32, BASE_DEC, NULL, 0,
11344
15
              NULL, HFILL }
11345
15
        },
11346
15
        { &hf_mbim_connect_info_session_id,
11347
15
            { "Session Id", "mbim.control.connect_info.session_id",
11348
15
               FT_UINT32, BASE_DEC, NULL, 0,
11349
15
              NULL, HFILL }
11350
15
        },
11351
15
        { &hf_mbim_connect_info_activation_state,
11352
15
            { "Activation State", "mbim.control.connect_info.activation_state",
11353
15
               FT_UINT32, BASE_DEC, VALS(mbim_activation_state_vals), 0,
11354
15
              NULL, HFILL }
11355
15
        },
11356
15
        { &hf_mbim_connect_info_voice_call_state,
11357
15
            { "Voice Call State", "mbim.control.connect_info.voice_call_state",
11358
15
               FT_UINT32, BASE_DEC, VALS(mbim_voice_call_state_vals), 0,
11359
15
              NULL, HFILL }
11360
15
        },
11361
15
        { &hf_mbim_connect_info_ip_type,
11362
15
            { "IP Type", "mbim.control.connect_info.ip_type",
11363
15
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
11364
15
              NULL, HFILL }
11365
15
        },
11366
15
        { &hf_mbim_connect_info_nw_error,
11367
15
            { "Network Error", "mbim.control.connect_info.nw_error",
11368
15
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11369
15
              NULL, HFILL }
11370
15
        },
11371
15
        { &hf_mbim_connect_info_access_media,
11372
15
            { "Access Media", "mbim.control.connect_info.access_media",
11373
15
               FT_UINT32, BASE_DEC, NULL, 0,
11374
15
              NULL, HFILL }
11375
15
        },
11376
15
        { &hf_mbim_context_context_id,
11377
15
            { "Context Id", "mbim.control.context.context_id",
11378
15
               FT_UINT32, BASE_DEC, NULL, 0,
11379
15
              NULL, HFILL }
11380
15
        },
11381
15
        { &hf_mbim_context_access_string_offset,
11382
15
            { "Access String Offset", "mbim.control.context.access_string_offset",
11383
15
               FT_UINT32, BASE_DEC, NULL, 0,
11384
15
              NULL, HFILL }
11385
15
        },
11386
15
        { &hf_mbim_context_access_string_size,
11387
15
            { "Access String Size", "mbim.control.context.access_string_size",
11388
15
               FT_UINT32, BASE_DEC, NULL, 0,
11389
15
              NULL, HFILL }
11390
15
        },
11391
15
        { &hf_mbim_context_user_name_offset,
11392
15
            { "User Name Offset", "mbim.control.context.user_name_offset",
11393
15
               FT_UINT32, BASE_DEC, NULL, 0,
11394
15
              NULL, HFILL }
11395
15
        },
11396
15
        { &hf_mbim_context_user_name_size,
11397
15
            { "User Name Size", "mbim.control.context.user_name_size",
11398
15
               FT_UINT32, BASE_DEC, NULL, 0,
11399
15
              NULL, HFILL }
11400
15
        },
11401
15
        { &hf_mbim_context_password_offset,
11402
15
            { "Password Offset", "mbim.control.context.password_offset",
11403
15
               FT_UINT32, BASE_DEC, NULL, 0,
11404
15
              NULL, HFILL }
11405
15
        },
11406
15
        { &hf_mbim_context_password_size,
11407
15
            { "Password Size", "mbim.control.context.password_size",
11408
15
               FT_UINT32, BASE_DEC, NULL, 0,
11409
15
              NULL, HFILL }
11410
15
        },
11411
15
        { &hf_mbim_context_compression,
11412
15
            { "Compression", "mbim.control.context.compression",
11413
15
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
11414
15
              NULL, HFILL }
11415
15
        },
11416
15
        { &hf_mbim_context_auth_protocol,
11417
15
            { "Authentication Protocol", "mbim.control.context.auth_protocol",
11418
15
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
11419
15
              NULL, HFILL }
11420
15
        },
11421
15
        { &hf_mbim_context_provider_id_offset,
11422
15
            { "Provider Id Offset", "mbim.control.context.provider_id_offset",
11423
15
               FT_UINT32, BASE_DEC, NULL, 0,
11424
15
              NULL, HFILL }
11425
15
        },
11426
15
        { &hf_mbim_context_provider_id_size,
11427
15
            { "Provider Id Size", "mbim.control.context.provider_id_size",
11428
15
               FT_UINT32, BASE_DEC, NULL, 0,
11429
15
              NULL, HFILL }
11430
15
        },
11431
15
        { &hf_mbim_context_access_string,
11432
15
            { "Access String", "mbim.control.context.access_string",
11433
15
               FT_STRING, BASE_NONE, NULL, 0,
11434
15
              NULL, HFILL }
11435
15
        },
11436
15
        { &hf_mbim_context_user_name,
11437
15
            { "User Name", "mbim.control.context.user_name",
11438
15
               FT_STRING, BASE_NONE, NULL, 0,
11439
15
              NULL, HFILL }
11440
15
        },
11441
15
        { &hf_mbim_context_password,
11442
15
            { "Password", "mbim.control.context.password",
11443
15
               FT_STRING, BASE_NONE, NULL, 0,
11444
15
              NULL, HFILL }
11445
15
        },
11446
15
        { &hf_mbim_context_provider_id,
11447
15
            { "Provider Id", "mbim.control.context.provider_id",
11448
15
               FT_STRING, BASE_NONE, NULL, 0,
11449
15
              NULL, HFILL }
11450
15
        },
11451
15
        { &hf_mbim_provisioned_contexts_info_elem_count,
11452
15
            { "Element Count", "mbim.control.context.provisioned_contexts_info.elem_count",
11453
15
               FT_UINT32, BASE_DEC, NULL, 0,
11454
15
              NULL, HFILL }
11455
15
        },
11456
15
        { &hf_mbim_provisioned_contexts_info_provisioned_context_offset,
11457
15
            { "Provisioned Context Offset", "mbim.control.context.provisioned_contexts_info.provisioned_context_offset",
11458
15
               FT_UINT32, BASE_DEC, NULL, 0,
11459
15
              NULL, HFILL }
11460
15
        },
11461
15
        { &hf_mbim_provisioned_contexts_info_provisioned_context_size,
11462
15
            { "Provisioned Context Size", "mbim.control.context.provisioned_contexts_info.provisioned_context_size",
11463
15
               FT_UINT32, BASE_DEC, NULL, 0,
11464
15
              NULL, HFILL }
11465
15
        },
11466
15
        { &hf_mbim_set_service_activation_data_buffer,
11467
15
            { "Data Buffer", "mbim.control.set_service_activation.data_buffer",
11468
15
               FT_BYTES, BASE_NONE, NULL, 0,
11469
15
              NULL, HFILL }
11470
15
        },
11471
15
        { &hf_mbim_service_activation_info_nw_error,
11472
15
            { "Network Error", "mbim.control.service_activation_info.nw_error",
11473
15
               FT_UINT32, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0,
11474
15
              NULL, HFILL }
11475
15
        },
11476
15
        { &hf_mbim_service_activation_info_data_buffer,
11477
15
            { "Data Buffer", "mbim.control.service_activation_info.data_buffer",
11478
15
               FT_BYTES, BASE_NONE, NULL, 0,
11479
15
              NULL, HFILL }
11480
15
        },
11481
15
        { &hf_mbim_ipv4_element_on_link_prefix_length,
11482
15
            { "On Link Prefix Length", "mbim.control.ipv4_element.on_link_prefix_length",
11483
15
               FT_UINT32, BASE_DEC, NULL, 0,
11484
15
              NULL, HFILL }
11485
15
        },
11486
15
        { &hf_mbim_ipv4_element_ipv4_address,
11487
15
            { "IPv4 Address", "mbim.control.ipv4_element.ipv4_address",
11488
15
               FT_IPv4, BASE_NONE, NULL, 0,
11489
15
              NULL, HFILL }
11490
15
        },
11491
15
        { &hf_mbim_ipv6_element_on_link_prefix_length,
11492
15
            { "On Link Prefix Length", "mbim.control.ipv6_element.on_link_prefix_length",
11493
15
               FT_UINT32, BASE_DEC, NULL, 0,
11494
15
              NULL, HFILL }
11495
15
        },
11496
15
        { &hf_mbim_ipv6_element_ipv6_address,
11497
15
            { "IPv6 Address", "mbim.control.ipv6_element.ipv6_address",
11498
15
               FT_IPv6, BASE_NONE, NULL, 0,
11499
15
              NULL, HFILL }
11500
15
        },
11501
15
        { &hf_mbim_ip_configuration_info_session_id,
11502
15
            { "Session Id", "mbim.control.ip_configuration_info.session_id",
11503
15
               FT_UINT32, BASE_DEC, NULL, 0,
11504
15
              NULL, HFILL }
11505
15
        },
11506
15
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available,
11507
15
            { "IPv4 Configuration Available", "mbim.control.ip_configuration_info.ipv4_configuration_available",
11508
15
               FT_UINT32, BASE_HEX, NULL, 0,
11509
15
              NULL, HFILL }
11510
15
        },
11511
15
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_address,
11512
15
            { "Address", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.address",
11513
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000001,
11514
15
              NULL, HFILL }
11515
15
        },
11516
15
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_gateway,
11517
15
            { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.gateway",
11518
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000002,
11519
15
              NULL, HFILL }
11520
15
        },
11521
15
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_dns,
11522
15
            { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.dns",
11523
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000004,
11524
15
              NULL, HFILL }
11525
15
        },
11526
15
        { &hf_mbim_ip_configuration_info_ipv4_configuration_available_mtu,
11527
15
            { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv4_configuration_available.mtu",
11528
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000008,
11529
15
              NULL, HFILL }
11530
15
        },
11531
15
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available,
11532
15
            { "IPv6 Configuration Available", "mbim.control.ip_configuration_info.ipv6_configuration_available",
11533
15
               FT_UINT32, BASE_HEX, NULL, 0,
11534
15
              NULL, HFILL }
11535
15
        },
11536
15
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_address,
11537
15
            { "Address", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.address",
11538
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000001,
11539
15
              NULL, HFILL }
11540
15
        },
11541
15
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_gateway,
11542
15
            { "Gateway", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.gateway",
11543
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000002,
11544
15
              NULL, HFILL }
11545
15
        },
11546
15
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_dns,
11547
15
            { "DNS Server", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.dns",
11548
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000004,
11549
15
              NULL, HFILL }
11550
15
        },
11551
15
        { &hf_mbim_ip_configuration_info_ipv6_configuration_available_mtu,
11552
15
            { "MTU", "mbim.control.ip_configuration_info.control_caps.ipv6_configuration_available.mtu",
11553
15
               FT_BOOLEAN, 32, TFS(&tfs_available_not_available), 0x00000008,
11554
15
              NULL, HFILL }
11555
15
        },
11556
15
        { &hf_mbim_ip_configuration_info_ipv4_address_count,
11557
15
            { "IPv4 Address Count", "mbim.control.ip_configuration_info.ipv4_address.count",
11558
15
               FT_UINT32, BASE_DEC, NULL, 0,
11559
15
              NULL, HFILL }
11560
15
        },
11561
15
        { &hf_mbim_ip_configuration_info_ipv4_address_offset,
11562
15
            { "IPv4 Address Offset", "mbim.control.ip_configuration_info.ipv4_address.offset",
11563
15
               FT_UINT32, BASE_DEC, NULL, 0,
11564
15
              NULL, HFILL }
11565
15
        },
11566
15
        { &hf_mbim_ip_configuration_info_ipv6_address_count,
11567
15
            { "IPv6 Address Count", "mbim.control.ip_configuration_info.ipv6_address.count",
11568
15
               FT_UINT32, BASE_DEC, NULL, 0,
11569
15
              NULL, HFILL }
11570
15
        },
11571
15
        { &hf_mbim_ip_configuration_info_ipv6_address_offset,
11572
15
            { "IPv6 Address Offset", "mbim.control.ip_configuration_info.ipv6_address.offset",
11573
15
               FT_UINT32, BASE_DEC, NULL, 0,
11574
15
              NULL, HFILL }
11575
15
        },
11576
15
        { &hf_mbim_ip_configuration_info_ipv4_gateway_offset,
11577
15
            { "IPv4 Gateway Offset", "mbim.control.ip_configuration_info.ipv4_gateway.offset",
11578
15
               FT_UINT32, BASE_DEC, NULL, 0,
11579
15
              NULL, HFILL }
11580
15
        },
11581
15
        { &hf_mbim_ip_configuration_info_ipv6_gateway_offset,
11582
15
            { "IPv6 Gateway Offset", "mbim.control.ip_configuration_info.ipv6_gateway.offset",
11583
15
               FT_UINT32, BASE_DEC, NULL, 0,
11584
15
              NULL, HFILL }
11585
15
        },
11586
15
        { &hf_mbim_ip_configuration_info_ipv4_dns_count,
11587
15
            { "IPv4 DNS Server Count", "mbim.control.ip_configuration_info.ipv4_dns.count",
11588
15
               FT_UINT32, BASE_DEC, NULL, 0,
11589
15
              NULL, HFILL }
11590
15
        },
11591
15
        { &hf_mbim_ip_configuration_info_ipv4_dns_offset,
11592
15
            { "IPv4 DNS Server Offset", "mbim.control.ip_configuration_info.ipv4_dns.offset",
11593
15
               FT_UINT32, BASE_DEC, NULL, 0,
11594
15
              NULL, HFILL }
11595
15
        },
11596
15
        { &hf_mbim_ip_configuration_info_ipv6_dns_count,
11597
15
            { "IPv6 DNS Server Count", "mbim.control.ip_configuration_info.ipv6_dns.count",
11598
15
               FT_UINT32, BASE_DEC, NULL, 0,
11599
15
              NULL, HFILL }
11600
15
        },
11601
15
        { &hf_mbim_ip_configuration_info_ipv6_dns_offset,
11602
15
            { "IPv6 DNS Server Offset", "mbim.control.ip_configuration_info.ipv6_dns.offset",
11603
15
               FT_UINT32, BASE_DEC, NULL, 0,
11604
15
              NULL, HFILL }
11605
15
        },
11606
15
        { &hf_mbim_ip_configuration_info_ipv4_mtu,
11607
15
            { "IPv4 MTU", "mbim.control.ip_configuration_info.ipv4_mtu",
11608
15
               FT_UINT32, BASE_DEC, NULL, 0,
11609
15
              NULL, HFILL }
11610
15
        },
11611
15
        { &hf_mbim_ip_configuration_info_ipv6_mtu,
11612
15
            { "IPv6 MTU", "mbim.control.ip_configuration_info.ipv6_mtu",
11613
15
               FT_UINT32, BASE_DEC, NULL, 0,
11614
15
              NULL, HFILL }
11615
15
        },
11616
15
        { &hf_mbim_ip_configuration_info_ipv4_gateway,
11617
15
            { "IPv4 Gateway", "mbim.control.ip_configuration_info.ipv4_gateway",
11618
15
               FT_IPv4, BASE_NONE, NULL, 0,
11619
15
              NULL, HFILL }
11620
15
        },
11621
15
        { &hf_mbim_ip_configuration_info_ipv6_gateway,
11622
15
            { "IPv6 Gateway", "mbim.control.ip_configuration_info.ipv6_gateway",
11623
15
               FT_IPv6, BASE_NONE, NULL, 0,
11624
15
              NULL, HFILL }
11625
15
        },
11626
15
        { &hf_mbim_ip_configuration_info_ipv4_dns,
11627
15
            { "IPv4 DNS Server", "mbim.control.ip_configuration_info.ipv4_dns",
11628
15
               FT_IPv4, BASE_NONE, NULL, 0,
11629
15
              NULL, HFILL }
11630
15
        },
11631
15
        { &hf_mbim_ip_configuration_info_ipv6_dns,
11632
15
            { "IPv6 DNS Server", "mbim.control.ip_configuration_info.ipv6_dns",
11633
15
               FT_IPv6, BASE_NONE, NULL, 0,
11634
15
              NULL, HFILL }
11635
15
        },
11636
15
        { &hf_mbim_device_service_element_device_service_id,
11637
15
            { "Device Service Id", "mbim.control.device_service_element.device_service_id",
11638
15
               FT_GUID, BASE_NONE, NULL, 0,
11639
15
              NULL, HFILL }
11640
15
        },
11641
15
        { &hf_mbim_device_service_element_dss_payload,
11642
15
            { "DSS Payload", "mbim.control.device_service_element.dss_payload",
11643
15
               FT_UINT32, BASE_HEX, NULL, 0,
11644
15
              NULL, HFILL }
11645
15
        },
11646
15
        { &hf_mbim_device_service_element_dss_payload_host_device,
11647
15
            { "Host To Device", "mbim.control.device_service_element.dss_payload.host_device",
11648
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
11649
15
              NULL, HFILL }
11650
15
        },
11651
15
        { &hf_mbim_device_service_element_dss_payload_device_host,
11652
15
            { "Device To Host", "mbim.control.device_service_element.dss_payload.device_host",
11653
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
11654
15
              NULL, HFILL }
11655
15
        },
11656
15
        { &hf_mbim_device_service_element_max_dss_instances,
11657
15
            { "Max DSS Instances", "mbim.control.device_service_element.max_dss_instances",
11658
15
               FT_UINT32, BASE_DEC, NULL, 0,
11659
15
              NULL, HFILL }
11660
15
        },
11661
15
        { &hf_mbim_device_service_element_cid_count,
11662
15
            { "CID Count", "mbim.control.device_service_element.cid.count",
11663
15
               FT_UINT32, BASE_DEC, NULL, 0,
11664
15
              NULL, HFILL }
11665
15
        },
11666
15
        { &hf_mbim_device_service_element_cid,
11667
15
            { "CID", "mbim.control.device_service_element.cid",
11668
15
               FT_UINT32, BASE_DEC, NULL, 0,
11669
15
              NULL, HFILL }
11670
15
        },
11671
15
        { &hf_mbim_device_services_info_device_services_count,
11672
15
            { "Device Services Count", "mbim.control.device_services_info.device_services_count",
11673
15
               FT_UINT32, BASE_DEC, NULL, 0,
11674
15
              NULL, HFILL }
11675
15
        },
11676
15
        { &hf_mbim_device_services_info_max_dss_sessions,
11677
15
            { "Max DSS Sessions", "mbim.control.device_services_info.max_dss_sessions",
11678
15
               FT_UINT32, BASE_DEC, NULL, 0,
11679
15
              NULL, HFILL }
11680
15
        },
11681
15
        { &hf_mbim_device_services_info_device_services_offset,
11682
15
            { "Device Services Offset", "mbim.control.device_services_info.device_services.offset",
11683
15
               FT_UINT32, BASE_DEC, NULL, 0,
11684
15
              NULL, HFILL }
11685
15
        },
11686
15
        { &hf_mbim_device_services_info_device_services_size,
11687
15
            { "Device Services Size", "mbim.control.device_services_info.device_services.size",
11688
15
               FT_UINT32, BASE_DEC, NULL, 0,
11689
15
              NULL, HFILL }
11690
15
        },
11691
15
        { &hf_mbim_event_entry_device_service_id,
11692
15
            { "Device Service Id", "mbim.control.event_entry.device_service_id",
11693
15
               FT_GUID, BASE_NONE, NULL, 0,
11694
15
              NULL, HFILL }
11695
15
        },
11696
15
        { &hf_mbim_event_entry_cid_count,
11697
15
            { "CID Count", "mbim.control.event_entry.cid.count",
11698
15
               FT_UINT32, BASE_DEC, NULL, 0,
11699
15
              NULL, HFILL }
11700
15
        },
11701
15
        { &hf_mbim_event_entry_cid,
11702
15
            { "CID", "mbim.control.event_entry.cid",
11703
15
               FT_UINT32, BASE_DEC, NULL, 0,
11704
15
              NULL, HFILL }
11705
15
        },
11706
15
        { &hf_mbim_device_service_subscribe_element_count,
11707
15
            { "Element Count", "mbim.control.device_service_subscribe.element_count",
11708
15
               FT_UINT32, BASE_DEC, NULL, 0,
11709
15
              NULL, HFILL }
11710
15
        },
11711
15
        { &hf_mbim_device_service_subscribe_device_service_offset,
11712
15
            { "Device Service Offset", "mbim.control.device_service_subscribe.device_service.offset",
11713
15
               FT_UINT32, BASE_DEC, NULL, 0,
11714
15
              NULL, HFILL }
11715
15
        },
11716
15
        { &hf_mbim_device_service_subscribe_device_service_size,
11717
15
            { "Device Service Size", "mbim.control.device_service_subscribe.device_service.size",
11718
15
               FT_UINT32, BASE_DEC, NULL, 0,
11719
15
              NULL, HFILL }
11720
15
        },
11721
15
        { &hf_mbim_packet_statistics_info_in_discards,
11722
15
            { "In Discards", "mbim.control.packet_statistics_info.in_discards",
11723
15
               FT_UINT32, BASE_DEC, NULL, 0,
11724
15
              NULL, HFILL }
11725
15
        },
11726
15
        { &hf_mbim_packet_statistics_info_in_errors,
11727
15
            { "In Errors", "mbim.control.packet_statistics_info.in_errors",
11728
15
               FT_UINT32, BASE_DEC, NULL, 0,
11729
15
              NULL, HFILL }
11730
15
        },
11731
15
        { &hf_mbim_packet_statistics_info_in_octets,
11732
15
            { "In Octets", "mbim.control.packet_statistics_info.in_octets",
11733
15
               FT_UINT64, BASE_DEC, NULL, 0,
11734
15
              NULL, HFILL }
11735
15
        },
11736
15
        { &hf_mbim_packet_statistics_info_in_packets,
11737
15
            { "In Packets", "mbim.control.packet_statistics_info.in_packets",
11738
15
               FT_UINT64, BASE_DEC, NULL, 0,
11739
15
              NULL, HFILL }
11740
15
        },
11741
15
        { &hf_mbim_packet_statistics_info_out_octets,
11742
15
            { "Out Octets", "mbim.control.packet_statistics_info.out_octets",
11743
15
               FT_UINT64, BASE_DEC, NULL, 0,
11744
15
              NULL, HFILL }
11745
15
        },
11746
15
        { &hf_mbim_packet_statistics_info_out_packets,
11747
15
            { "Out Packets", "mbim.control.packet_statistics_info.out_packets",
11748
15
               FT_UINT64, BASE_DEC, NULL, 0,
11749
15
              NULL, HFILL }
11750
15
        },
11751
15
        { &hf_mbim_packet_statistics_info_out_errors,
11752
15
            { "Out Errors", "mbim.control.packet_statistics_info.out_errors",
11753
15
               FT_UINT32, BASE_DEC, NULL, 0,
11754
15
              NULL, HFILL }
11755
15
        },
11756
15
        { &hf_mbim_packet_statistics_info_out_discards,
11757
15
            { "Out Discards", "mbim.control.packet_statistics_info.out_discards",
11758
15
               FT_UINT32, BASE_DEC, NULL, 0,
11759
15
              NULL, HFILL }
11760
15
        },
11761
15
        { &hf_mbim_network_idle_hint_state,
11762
15
            { "Network Idle Hint State", "mbim.control.network_idle_hint.state",
11763
15
               FT_UINT32, BASE_DEC, VALS(mbim_network_idle_hint_states_vals), 0,
11764
15
              NULL, HFILL }
11765
15
        },
11766
15
        { &hf_mbim_emergency_mode_info_emergency_mode,
11767
15
            { "Emergency Mode", "mbim.control.emergency_mode_info.mode",
11768
15
               FT_UINT32, BASE_DEC, VALS(mbim_emergency_mode_states_vals), 0,
11769
15
              NULL, HFILL }
11770
15
        },
11771
15
        { &hf_mbim_single_packet_filter_filter_size,
11772
15
            { "Filter Size", "mbim.control.single_packet_filter.filter_size",
11773
15
               FT_UINT32, BASE_DEC, NULL, 0,
11774
15
              NULL, HFILL }
11775
15
        },
11776
15
        { &hf_mbim_single_packet_filter_packet_filter_offset,
11777
15
            { "Packet Filter Offset", "mbim.control.single_packet_filter.packet_filter.offset",
11778
15
               FT_UINT32, BASE_DEC, NULL, 0,
11779
15
              NULL, HFILL }
11780
15
        },
11781
15
        { &hf_mbim_single_packet_filter_packet_mask_offset,
11782
15
            { "Packet Mask Offset", "mbim.control.single_packet_filter.packet_mask.offset",
11783
15
               FT_UINT32, BASE_DEC, NULL, 0,
11784
15
              NULL, HFILL }
11785
15
        },
11786
15
        { &hf_mbim_single_packet_filter_filter_id,
11787
15
            { "Filter ID", "mbim.control.single_packet_filter.filter_id",
11788
15
               FT_UINT32, BASE_DEC, NULL, 0,
11789
15
              NULL, HFILL }
11790
15
        },
11791
15
        { &hf_mbim_single_packet_filter_packet_filter,
11792
15
            { "Packet Filter", "mbim.control.single_packet_filter.packet_filter",
11793
15
               FT_BYTES, BASE_NONE, NULL, 0,
11794
15
              NULL, HFILL }
11795
15
        },
11796
15
        { &hf_mbim_single_packet_filter_packet_mask,
11797
15
            { "Packet Mask", "mbim.control.single_packet_filter.packet_mask",
11798
15
               FT_BYTES, BASE_NONE, NULL, 0,
11799
15
              NULL, HFILL }
11800
15
        },
11801
15
        { &hf_mbim_packet_filters_session_id,
11802
15
            { "Session Id", "mbim.control.packet_filters.session_id",
11803
15
               FT_UINT32, BASE_DEC, NULL, 0,
11804
15
              NULL, HFILL }
11805
15
        },
11806
15
        { &hf_mbim_packet_filters_packet_filters_count,
11807
15
            { "Packet Filters Count", "mbim.control.packet_filters.packet_filters_count",
11808
15
               FT_UINT32, BASE_DEC, NULL, 0,
11809
15
              NULL, HFILL }
11810
15
        },
11811
15
        { &hf_mbim_packet_filters_packet_filters_packet_filter_offset,
11812
15
            { "Packet Filter Offset", "mbim.control.packet_filters.packet_filter.offset",
11813
15
               FT_UINT32, BASE_DEC, NULL, 0,
11814
15
              NULL, HFILL }
11815
15
        },
11816
15
        { &hf_mbim_packet_filters_packet_filters_packet_filter_size,
11817
15
            { "Packet Filters Size", "mbim.control.packet_filters.packet_filter.size",
11818
15
               FT_UINT32, BASE_DEC, NULL, 0,
11819
15
              NULL, HFILL }
11820
15
        },
11821
15
        { &hf_mbim_set_sms_configuration_format,
11822
15
            { "Format", "mbim.control.set_sms_configuration.format",
11823
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11824
15
              NULL, HFILL }
11825
15
        },
11826
15
        { &hf_mbim_set_sms_configuration_sc_address_offset,
11827
15
            { "Service Center Address Offset", "mbim.control.set_sms_configuration.sc_address.offset",
11828
15
               FT_UINT32, BASE_DEC, NULL, 0,
11829
15
              NULL, HFILL }
11830
15
        },
11831
15
        { &hf_mbim_set_sms_configuration_sc_address_size,
11832
15
            { "Service Center Address Size", "mbim.control.set_sms_configuration.sc_address.size",
11833
15
               FT_UINT32, BASE_DEC, NULL, 0,
11834
15
              NULL, HFILL }
11835
15
        },
11836
15
        { &hf_mbim_set_sms_configuration_sc_address,
11837
15
            { "Service Center Address", "mbim.control.set_sms_configuration.sc_address",
11838
15
               FT_STRING, BASE_NONE, NULL, 0,
11839
15
              NULL, HFILL }
11840
15
        },
11841
15
        { &hf_mbim_sms_configuration_info_sms_storage_state,
11842
15
            { "SMS Storage State", "mbim.control.sms_configuration_info.sms_storage_state",
11843
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_storage_state_vals), 0,
11844
15
              NULL, HFILL }
11845
15
        },
11846
15
        { &hf_mbim_sms_configuration_info_format,
11847
15
            { "Format", "mbim.control.sms_configuration_info.format",
11848
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11849
15
              NULL, HFILL }
11850
15
        },
11851
15
        { &hf_mbim_sms_configuration_info_max_messages,
11852
15
            { "Max Messages", "mbim.control.sms_configuration_info.max_messages",
11853
15
               FT_UINT32, BASE_DEC, NULL, 0,
11854
15
              NULL, HFILL }
11855
15
        },
11856
15
        { &hf_mbim_sms_configuration_info_cdma_short_message_size,
11857
15
            { "CDMA Short Message Size", "mbim.control.sms_configuration_info.cdma_short_message_size",
11858
15
               FT_UINT32, BASE_DEC, NULL, 0,
11859
15
              NULL, HFILL }
11860
15
        },
11861
15
        { &hf_mbim_sms_configuration_info_sc_address_offset,
11862
15
            { "Service Center Address Offset", "mbim.control.sms_configuration_info.sc_address.offset",
11863
15
               FT_UINT32, BASE_DEC, NULL, 0,
11864
15
              NULL, HFILL }
11865
15
        },
11866
15
        { &hf_mbim_sms_configuration_info_sc_address_size,
11867
15
            { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address.size",
11868
15
               FT_UINT32, BASE_DEC, NULL, 0,
11869
15
              NULL, HFILL }
11870
15
        },
11871
15
        { &hf_mbim_sms_configuration_info_sc_address,
11872
15
            { "Service Center Address Size", "mbim.control.sms_configuration_info.sc_address",
11873
15
               FT_STRING, BASE_NONE, NULL, 0,
11874
15
              NULL, HFILL }
11875
15
        },
11876
15
        { &hf_mbim_sms_pdu_record_message_index,
11877
15
            { "Message Index", "mbim.control.sms_pdu_record.message_index",
11878
15
               FT_UINT32, BASE_DEC, NULL, 0,
11879
15
              NULL, HFILL }
11880
15
        },
11881
15
        { &hf_mbim_sms_pdu_record_message_status,
11882
15
            { "Message Status", "mbim.control.sms_pdu_record.message_status",
11883
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_message_status_vals), 0,
11884
15
              NULL, HFILL }
11885
15
        },
11886
15
        { &hf_mbim_sms_pdu_record_pdu_data_offset,
11887
15
            { "PDU Data Offset", "mbim.control.sms_pdu_record.pdu_data.offset",
11888
15
               FT_UINT32, BASE_DEC, NULL, 0,
11889
15
              NULL, HFILL }
11890
15
        },
11891
15
        { &hf_mbim_sms_pdu_record_pdu_data_size,
11892
15
            { "PDU Data Size", "mbim.control.sms_pdu_record.pdu_data.size",
11893
15
               FT_UINT32, BASE_DEC, NULL, 0,
11894
15
              NULL, HFILL }
11895
15
        },
11896
15
        { &hf_mbim_sms_pdu_record_pdu_data,
11897
15
            { "PDU Data", "mbim.control.sms_pdu_record.pdu_data",
11898
15
               FT_BYTES, BASE_NONE, NULL, 0,
11899
15
              NULL, HFILL }
11900
15
        },
11901
15
        { &hf_mbim_sms_pdu_record_pdu_data_sc_address_size,
11902
15
            { "Size", "mbim.control.sms_pdu_record.pdu_data.sc_address_size",
11903
15
               FT_UINT8, BASE_DEC, NULL, 0,
11904
15
              NULL, HFILL }
11905
15
        },
11906
15
        { &hf_mbim_sms_cdma_record_message_index,
11907
15
            { "Message Index", "mbim.control.sms_cdma_record.message_index",
11908
15
               FT_UINT32, BASE_DEC, NULL, 0,
11909
15
              NULL, HFILL }
11910
15
        },
11911
15
        { &hf_mbim_sms_cdma_record_message_status,
11912
15
            { "Message Status", "mbim.control.sms_cdma_record.message_status",
11913
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_message_status_vals), 0,
11914
15
              NULL, HFILL }
11915
15
        },
11916
15
        { &hf_mbim_sms_cdma_record_address_offset,
11917
15
            { "Address Offset", "mbim.control.sms_cdma_record.address.offset",
11918
15
               FT_UINT32, BASE_DEC, NULL, 0,
11919
15
              NULL, HFILL }
11920
15
        },
11921
15
        { &hf_mbim_sms_cdma_record_address_size,
11922
15
            { "Address Size", "mbim.control.sms_cdma_record.address.size",
11923
15
               FT_UINT32, BASE_DEC, NULL, 0,
11924
15
              NULL, HFILL }
11925
15
        },
11926
15
        { &hf_mbim_sms_cdma_record_timestamp_offset,
11927
15
            { "Timestamp Offset", "mbim.control.sms_cdma_record.timestamp.offset",
11928
15
               FT_UINT32, BASE_DEC, NULL, 0,
11929
15
              NULL, HFILL }
11930
15
        },
11931
15
        { &hf_mbim_sms_cdma_record_timestamp_size,
11932
15
            { "Timestamp Size", "mbim.control.sms_cdma_record.timestamp.size",
11933
15
               FT_UINT32, BASE_DEC, NULL, 0,
11934
15
              NULL, HFILL }
11935
15
        },
11936
15
        { &hf_mbim_sms_cdma_record_encoding_id,
11937
15
            { "Encoding Id", "mbim.control.sms_cdma_record.encoding_id",
11938
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_encoding_vals), 0,
11939
15
              NULL, HFILL }
11940
15
        },
11941
15
        { &hf_mbim_sms_cdma_record_language_id,
11942
15
            { "Language Id", "mbim.control.sms_cdma_record.language_id",
11943
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_lang_vals), 0,
11944
15
              NULL, HFILL }
11945
15
        },
11946
15
        { &hf_mbim_sms_cdma_record_encoded_message_offset,
11947
15
            { "Encoded Message Offset", "mbim.control.sms_cdma_record.encoded_message.offset",
11948
15
               FT_UINT32, BASE_DEC, NULL, 0,
11949
15
              NULL, HFILL }
11950
15
        },
11951
15
        { &hf_mbim_sms_cdma_record_size_in_bytes,
11952
15
            { "Size In Bytes", "mbim.control.sms_cdma_record.size_in_bytes",
11953
15
               FT_UINT32, BASE_DEC, NULL, 0,
11954
15
              NULL, HFILL }
11955
15
        },
11956
15
        { &hf_mbim_sms_cdma_record_size_in_characters,
11957
15
            { "Size In Characters", "mbim.control.sms_cdma_record.size_in_characters",
11958
15
               FT_UINT32, BASE_DEC, NULL, 0,
11959
15
              NULL, HFILL }
11960
15
        },
11961
15
        { &hf_mbim_sms_cdma_record_address,
11962
15
            { "Address", "mbim.control.sms_cdma_record.address",
11963
15
               FT_STRING, BASE_NONE, NULL, 0,
11964
15
              NULL, HFILL }
11965
15
        },
11966
15
        { &hf_mbim_sms_cdma_record_timestamp,
11967
15
            { "Timestamp", "mbim.control.sms_cdma_record.timestamp",
11968
15
               FT_STRING, BASE_NONE, NULL, 0,
11969
15
              NULL, HFILL }
11970
15
        },
11971
15
        { &hf_mbim_sms_cdma_record_encoded_message,
11972
15
            { "Encoded Message", "mbim.control.sms_cdma_record.encoded_message",
11973
15
               FT_BYTES, BASE_NONE, NULL, 0,
11974
15
              NULL, HFILL }
11975
15
        },
11976
15
        { &hf_mbim_sms_cdma_record_encoded_message_text,
11977
15
            { "Text", "mbim.control.sms_cdma_record.encoded_message.text",
11978
15
            FT_STRING, BASE_NONE, NULL, 0,
11979
15
            NULL, HFILL }
11980
15
        },
11981
15
        { &hf_mbim_sms_read_req_format,
11982
15
            { "Format", "mbim.control.sms_read_req.format",
11983
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11984
15
              NULL, HFILL }
11985
15
        },
11986
15
        { &hf_mbim_sms_read_req_flag,
11987
15
            { "Flag", "mbim.control.sms_read_req.flag",
11988
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_flag_vals), 0,
11989
15
              NULL, HFILL }
11990
15
        },
11991
15
        { &hf_mbim_sms_read_req_message_index,
11992
15
            { "Message Index", "mbim.control.sms_read_req.message_index",
11993
15
               FT_UINT32, BASE_DEC, NULL, 0,
11994
15
              NULL, HFILL }
11995
15
        },
11996
15
        { &hf_mbim_sms_read_info_format,
11997
15
            { "Format", "mbim.control.sms_read_info.format",
11998
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
11999
15
              NULL, HFILL }
12000
15
        },
12001
15
        { &hf_mbim_sms_read_info_element_count,
12002
15
            { "Element Count", "mbim.control.sms_read_info.element_count",
12003
15
               FT_UINT32, BASE_DEC, NULL, 0,
12004
15
              NULL, HFILL }
12005
15
        },
12006
15
        { &hf_mbim_sms_read_info_sms_offset,
12007
15
            { "SMS Offset", "mbim.control.sms_read_info.sms.offset",
12008
15
               FT_UINT32, BASE_DEC, NULL, 0,
12009
15
              NULL, HFILL }
12010
15
        },
12011
15
        { &hf_mbim_sms_read_info_sms_size,
12012
15
            { "SMS Size", "mbim.control.sms_read_info.sms.size",
12013
15
               FT_UINT32, BASE_DEC, NULL, 0,
12014
15
              NULL, HFILL }
12015
15
        },
12016
15
        { &hf_mbim_sms_send_pdu_pdu_data_offset,
12017
15
            { "PDU Data Offset", "mbim.control.sms_send_pdu.pdu_data.offset",
12018
15
               FT_UINT32, BASE_DEC, NULL, 0,
12019
15
              NULL, HFILL }
12020
15
        },
12021
15
        { &hf_mbim_sms_send_pdu_pdu_data_size,
12022
15
            { "PDU Data Size", "mbim.control.sms_send_pdu.pdu_data.size",
12023
15
               FT_UINT32, BASE_DEC, NULL, 0,
12024
15
              NULL, HFILL }
12025
15
        },
12026
15
        { &hf_mbim_sms_send_pdu_pdu_data,
12027
15
            { "PDU Data", "mbim.control.sms_send_pdu.pdu_data",
12028
15
               FT_BYTES, BASE_NONE, NULL, 0,
12029
15
              NULL, HFILL }
12030
15
        },
12031
15
        { &hf_mbim_sms_send_pdu_pdu_data_sc_address_size,
12032
15
            { "Size", "mbim.control.sms_send_pdu.pdu_data.sc_address_size",
12033
15
               FT_UINT8, BASE_DEC, NULL, 0,
12034
15
              NULL, HFILL }
12035
15
        },
12036
15
        { &hf_mbim_sms_send_cdma_encoding_id,
12037
15
            { "Encoding Id", "mbim.control.sms_send_cdma.encoding_id",
12038
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_encoding_vals), 0,
12039
15
              NULL, HFILL }
12040
15
        },
12041
15
        { &hf_mbim_sms_send_cdma_language_id,
12042
15
            { "Language Id", "mbim.control.sms_send_cdma.language_id",
12043
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_cdma_lang_vals), 0,
12044
15
              NULL, HFILL }
12045
15
        },
12046
15
        { &hf_mbim_sms_send_cdma_address_offset,
12047
15
            { "Address Offset", "mbim.control.sms_send_cdma.address.offset",
12048
15
               FT_UINT32, BASE_DEC, NULL, 0,
12049
15
              NULL, HFILL }
12050
15
        },
12051
15
        { &hf_mbim_sms_send_cdma_address_size,
12052
15
            { "Address Size", "mbim.control.sms_send_cdma.address.size",
12053
15
               FT_UINT32, BASE_DEC, NULL, 0,
12054
15
              NULL, HFILL }
12055
15
        },
12056
15
        { &hf_mbim_sms_send_cdma_encoded_message_offset,
12057
15
            { "Encoded Message Offset", "mbim.control.sms_send_cdma.encoded_message.offset",
12058
15
               FT_UINT32, BASE_DEC, NULL, 0,
12059
15
              NULL, HFILL }
12060
15
        },
12061
15
        { &hf_mbim_sms_send_cdma_size_in_bytes,
12062
15
            { "Size In Bytes", "mbim.control.sms_send_cdma.size_in_bytes",
12063
15
               FT_UINT32, BASE_DEC, NULL, 0,
12064
15
              NULL, HFILL }
12065
15
        },
12066
15
        { &hf_mbim_sms_send_cdma_size_in_characters,
12067
15
            { "Size In Characters", "mbim.control.sms_send_cdma.size_in_characters",
12068
15
               FT_UINT32, BASE_DEC, NULL, 0,
12069
15
              NULL, HFILL }
12070
15
        },
12071
15
        { &hf_mbim_sms_send_cdma_address,
12072
15
            { "Address", "mbim.control.sms_send_cdma.address",
12073
15
               FT_STRING, BASE_NONE, NULL, 0,
12074
15
              NULL, HFILL }
12075
15
        },
12076
15
        { &hf_mbim_sms_send_cdma_encoded_message,
12077
15
            { "Encoded Message", "mbim.control.sms_send_cdma.encoded_message",
12078
15
               FT_BYTES, BASE_NONE, NULL, 0,
12079
15
              NULL, HFILL }
12080
15
        },
12081
15
        { &hf_mbim_sms_send_cdma_encoded_message_text,
12082
15
            { "Text", "mbim.control.sms_send_cdma.encoded_message.text",
12083
15
            FT_STRING, BASE_NONE, NULL, 0,
12084
15
            NULL, HFILL }
12085
15
        },
12086
15
        { &hf_mbim_set_sms_send_format,
12087
15
            { "Format", "mbim.control.set_sms_send.format",
12088
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_format_vals), 0,
12089
15
              NULL, HFILL }
12090
15
        },
12091
15
        { &hf_mbim_sms_send_info_message_reference,
12092
15
            { "Message Reference", "mbim.control.sms_send_info.message_reference",
12093
15
               FT_UINT32, BASE_DEC, NULL, 0,
12094
15
              NULL, HFILL }
12095
15
        },
12096
15
        { &hf_mbim_set_sms_delete_flag,
12097
15
            { "Flag", "mbim.control.set_sms_delete.flag",
12098
15
               FT_UINT32, BASE_DEC, VALS(mbim_sms_flag_vals), 0,
12099
15
              NULL, HFILL }
12100
15
        },
12101
15
        { &hf_mbim_set_sms_delete_message_index,
12102
15
            { "Message Index", "mbim.control.set_sms_delete.message_index",
12103
15
               FT_UINT32, BASE_DEC, NULL, 0,
12104
15
              NULL, HFILL }
12105
15
        },
12106
15
        { &hf_mbim_sms_status_info_flags,
12107
15
            { "Flags", "mbim.control.sms_status_info.flags",
12108
15
               FT_UINT32, BASE_HEX, NULL, 0,
12109
15
              NULL, HFILL }
12110
15
        },
12111
15
        { &hf_mbim_sms_status_info_flags_message_store_full,
12112
15
            { "Message Store Full", "mbim.control.sms_status_info.flags.message_store_full",
12113
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
12114
15
              NULL, HFILL }
12115
15
        },
12116
15
        { &hf_mbim_sms_status_info_flags_new_message,
12117
15
            { "New Message", "mbim.control.sms_status_info.flags.new_message",
12118
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
12119
15
              NULL, HFILL }
12120
15
        },
12121
15
        { &hf_mbim_sms_status_info_message_index,
12122
15
            { "Message Index", "mbim.control.sms_status_info.message_index",
12123
15
               FT_UINT32, BASE_DEC, NULL, 0,
12124
15
              NULL, HFILL }
12125
15
        },
12126
15
        { &hf_mbim_set_ussd_ussd_action,
12127
15
            { "USSD Action", "mbim.control.set_ussd.ussd_action",
12128
15
               FT_UINT32, BASE_DEC, VALS(mbim_ussd_action_vals), 0,
12129
15
              NULL, HFILL }
12130
15
        },
12131
15
        { &hf_mbim_set_ussd_ussd_data_coding_scheme,
12132
15
            { "USSD Data Coding Scheme", "mbim.control.set_ussd.ussd_data_coding_scheme",
12133
15
               FT_UINT32, BASE_HEX, NULL, 0,
12134
15
              NULL, HFILL }
12135
15
        },
12136
15
        { &hf_mbim_set_ussd_ussd_payload_offset,
12137
15
            { "USSD Payload Offset", "mbim.control.set_ussd.ussd_payload.offset",
12138
15
               FT_UINT32, BASE_DEC, NULL, 0,
12139
15
              NULL, HFILL }
12140
15
        },
12141
15
        { &hf_mbim_set_ussd_ussd_payload_length,
12142
15
            { "USSD Payload Length", "mbim.control.set_ussd.ussd_payload.length",
12143
15
               FT_UINT32, BASE_DEC, NULL, 0,
12144
15
              NULL, HFILL }
12145
15
        },
12146
15
        { &hf_mbim_set_ussd_ussd_payload,
12147
15
            { "USSD Payload", "mbim.control.set_ussd.ussd_payload",
12148
15
               FT_BYTES, BASE_NONE, NULL, 0,
12149
15
              NULL, HFILL }
12150
15
        },
12151
15
        { &hf_mbim_set_ussd_ussd_payload_text,
12152
15
            { "USSD Payload Text", "mbim.control.set_ussd.ussd_payload.text",
12153
15
               FT_STRING, BASE_NONE, NULL, 0,
12154
15
              NULL, HFILL }
12155
15
        },
12156
15
        { &hf_mbim_ussd_info_ussd_response,
12157
15
            { "USSD Response", "mbim.control.info_ussd.ussd_response",
12158
15
               FT_UINT32, BASE_DEC, VALS(mbim_ussd_response_vals), 0,
12159
15
              NULL, HFILL }
12160
15
        },
12161
15
        { &hf_mbim_ussd_info_ussd_session_state,
12162
15
            { "USSD Session State", "mbim.control.info_ussd.ussd_session_state",
12163
15
               FT_UINT32, BASE_DEC, VALS(mbim_ussd_session_state_vals), 0,
12164
15
              NULL, HFILL }
12165
15
        },
12166
15
        { &hf_mbim_ussd_info_ussd_data_coding_scheme,
12167
15
            { "USSD Data Coding Scheme", "mbim.control.ussd_info.ussd_data_coding_scheme",
12168
15
               FT_UINT32, BASE_HEX, NULL, 0,
12169
15
              NULL, HFILL }
12170
15
        },
12171
15
        { &hf_mbim_ussd_info_ussd_payload_offset,
12172
15
            { "USSD Payload Offset", "mbim.control.ussd_info.ussd_payload.offset",
12173
15
               FT_UINT32, BASE_DEC, NULL, 0,
12174
15
              NULL, HFILL }
12175
15
        },
12176
15
        { &hf_mbim_ussd_info_ussd_payload_length,
12177
15
            { "USSD Payload Length", "mbim.control.ussd_info.ussd_payload.length",
12178
15
               FT_UINT32, BASE_DEC, NULL, 0,
12179
15
              NULL, HFILL }
12180
15
        },
12181
15
        { &hf_mbim_ussd_info_ussd_payload,
12182
15
            { "USSD Payload", "mbim.control.ussd_info.ussd_payload",
12183
15
               FT_BYTES, BASE_NONE, NULL, 0,
12184
15
              NULL, HFILL }
12185
15
        },
12186
15
        { &hf_mbim_ussd_info_ussd_payload_text,
12187
15
            { "USSD Payload Text", "mbim.control.ussd_info.ussd_payload.text",
12188
15
               FT_STRING, BASE_NONE, NULL, 0,
12189
15
              NULL, HFILL }
12190
15
        },
12191
15
        { &hf_mbim_phonebook_configuration_info_phonebook_state,
12192
15
            { "Phonebook State", "mbim.control.phonebook_configuration_info.phonebook_state",
12193
15
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_state_vals), 0,
12194
15
              NULL, HFILL }
12195
15
        },
12196
15
        { &hf_mbim_phonebook_configuration_info_total_nb_of_entries,
12197
15
            { "Total Number Of Entries", "mbim.control.phonebook_configuration_info.total_nb_of_entries",
12198
15
               FT_UINT32, BASE_DEC, NULL, 0,
12199
15
              NULL, HFILL }
12200
15
        },
12201
15
        { &hf_mbim_phonebook_configuration_info_used_entries,
12202
15
            { "Used Entries", "mbim.control.phonebook_configuration_info.used_entries",
12203
15
               FT_UINT32, BASE_DEC, NULL, 0,
12204
15
              NULL, HFILL }
12205
15
        },
12206
15
        { &hf_mbim_phonebook_configuration_info_max_number_length,
12207
15
            { "Max Number Length", "mbim.control.phonebook_configuration_info.max_number_length",
12208
15
               FT_UINT32, BASE_DEC, NULL, 0,
12209
15
              NULL, HFILL }
12210
15
        },
12211
15
        { &hf_mbim_phonebook_configuration_info_max_name_length,
12212
15
            { "Max Name Length", "mbim.control.phonebook_configuration_info.max_name_length",
12213
15
               FT_UINT32, BASE_DEC, NULL, 0,
12214
15
              NULL, HFILL }
12215
15
        },
12216
15
        { &hf_mbim_phonebook_entry_entry_index,
12217
15
            { "Entry Index", "mbim.control.phonebook_entry.entry_index",
12218
15
               FT_UINT32, BASE_DEC, NULL, 0,
12219
15
              NULL, HFILL }
12220
15
        },
12221
15
        { &hf_mbim_phonebook_entry_number_offset,
12222
15
            { "Number Offset", "mbim.control.phonebook_entry.number.offset",
12223
15
               FT_UINT32, BASE_DEC, NULL, 0,
12224
15
              NULL, HFILL }
12225
15
        },
12226
15
        { &hf_mbim_phonebook_entry_number_length,
12227
15
            { "Number Length", "mbim.control.phonebook_entry.number.length",
12228
15
               FT_UINT32, BASE_DEC, NULL, 0,
12229
15
              NULL, HFILL }
12230
15
        },
12231
15
        { &hf_mbim_phonebook_entry_name_offset,
12232
15
            { "Name Offset", "mbim.control.phonebook_entry.name.offset",
12233
15
               FT_UINT32, BASE_DEC, NULL, 0,
12234
15
              NULL, HFILL }
12235
15
        },
12236
15
        { &hf_mbim_phonebook_entry_name_length,
12237
15
            { "Name Length", "mbim.control.phonebook_entry.name.length",
12238
15
               FT_UINT32, BASE_DEC, NULL, 0,
12239
15
              NULL, HFILL }
12240
15
        },
12241
15
        { &hf_mbim_phonebook_entry_number,
12242
15
            { "Number", "mbim.control.phonebook_entry.number",
12243
15
               FT_STRING, BASE_NONE, NULL, 0,
12244
15
              NULL, HFILL }
12245
15
        },
12246
15
        { &hf_mbim_phonebook_entry_name,
12247
15
            { "Name", "mbim.control.phonebook_entry.name",
12248
15
               FT_STRING, BASE_NONE, NULL, 0,
12249
15
              NULL, HFILL }
12250
15
        },
12251
15
        { &hf_mbim_phonebook_read_req_filter_flag,
12252
15
            { "Filter Flag", "mbim.control.phonebook_read_req.filter_flag",
12253
15
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_flag_vals), 0,
12254
15
              NULL, HFILL }
12255
15
        },
12256
15
        { &hf_mbim_phonebook_read_req_filter_message_index,
12257
15
            { "Filter Message Index", "mbim.control.phonebook_read_req.filter_message_index",
12258
15
               FT_UINT32, BASE_DEC, NULL, 0,
12259
15
              NULL, HFILL }
12260
15
        },
12261
15
        { &hf_mbim_phonebook_read_info_element_count,
12262
15
            { "Element Count", "mbim.control.phonebook_read_info.element_count",
12263
15
               FT_UINT32, BASE_DEC, NULL, 0,
12264
15
              NULL, HFILL }
12265
15
        },
12266
15
        { &hf_mbim_phonebook_read_info_phonebook_offset,
12267
15
            { "Phonebook Offset", "mbim.control.phonebook_read_info.phonebook.offset",
12268
15
               FT_UINT32, BASE_DEC, NULL, 0,
12269
15
              NULL, HFILL }
12270
15
        },
12271
15
        { &hf_mbim_phonebook_read_info_phonebook_size,
12272
15
            { "Phonebook Size", "mbim.control.phonebook_read_info.phonebook.size",
12273
15
               FT_UINT32, BASE_DEC, NULL, 0,
12274
15
              NULL, HFILL }
12275
15
        },
12276
15
        { &hf_mbim_set_phonebook_delete_filter_flag,
12277
15
            { "Filter Flag", "mbim.control.set_phonebook_delete.filter_flag",
12278
15
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_flag_vals), 0,
12279
15
              NULL, HFILL }
12280
15
        },
12281
15
        { &hf_mbim_set_phonebook_delete_filter_message_index,
12282
15
            { "Filter Message Index", "mbim.control.set_phonebook_delete.filter_message_index",
12283
15
               FT_UINT32, BASE_DEC, NULL, 0,
12284
15
              NULL, HFILL }
12285
15
        },
12286
15
        { &hf_mbim_set_phonebook_write_save_flag,
12287
15
            { "Save Flag", "mbim.control.set_phonebook_write.save_flag",
12288
15
               FT_UINT32, BASE_DEC, VALS(mbim_phonebook_write_flag_vals), 0,
12289
15
              NULL, HFILL }
12290
15
        },
12291
15
        { &hf_mbim_set_phonebook_write_save_index,
12292
15
            { "Save Index", "mbim.control.set_phonebook_write.save_index",
12293
15
               FT_UINT32, BASE_DEC, NULL, 0,
12294
15
              NULL, HFILL }
12295
15
        },
12296
15
        { &hf_mbim_set_phonebook_write_number_offset,
12297
15
            { "Number Offset", "mbim.control.set_phonebook_write.number.offset",
12298
15
               FT_UINT32, BASE_DEC, NULL, 0,
12299
15
              NULL, HFILL }
12300
15
        },
12301
15
        { &hf_mbim_set_phonebook_write_number_length,
12302
15
            { "Number Length", "mbim.control.set_phonebook_write.number.length",
12303
15
               FT_UINT32, BASE_DEC, NULL, 0,
12304
15
              NULL, HFILL }
12305
15
        },
12306
15
        { &hf_mbim_set_phonebook_write_name_offset,
12307
15
            { "Name Offset", "mbim.control.set_phonebook_write.name.offset",
12308
15
               FT_UINT32, BASE_DEC, NULL, 0,
12309
15
              NULL, HFILL }
12310
15
        },
12311
15
        { &hf_mbim_set_phonebook_write_name_length,
12312
15
            { "Name Length", "mbim.control.set_phonebook_write.name.length",
12313
15
               FT_UINT32, BASE_DEC, NULL, 0,
12314
15
              NULL, HFILL }
12315
15
        },
12316
15
        { &hf_mbim_set_phonebook_write_number,
12317
15
            { "Number", "mbim.control.set_phonebook_write.number",
12318
15
               FT_STRING, BASE_NONE, NULL, 0,
12319
15
              NULL, HFILL }
12320
15
        },
12321
15
        { &hf_mbim_set_phonebook_write_name,
12322
15
            { "Name", "mbim.control.set_phonebook_write.name",
12323
15
               FT_STRING, BASE_NONE, NULL, 0,
12324
15
              NULL, HFILL }
12325
15
        },
12326
15
        { &hf_mbim_set_stk_pac_pac_host_control,
12327
15
            { "PAC Host Control", "mbim.control.set_stk_pac.pac_host_control",
12328
15
               FT_BYTES, BASE_NONE, NULL, 0,
12329
15
              NULL, HFILL }
12330
15
        },
12331
15
        { &hf_mbim_set_stk_pac_pac_host_control_refresh,
12332
15
            { "Refresh", "mbim.control.set_stk_pac.pac_host_control.refresh",
12333
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12334
15
              NULL, HFILL }
12335
15
        },
12336
15
        { &hf_mbim_set_stk_pac_pac_host_control_more_time,
12337
15
            { "More Time", "mbim.control.set_stk_pac.pac_host_control.more_time",
12338
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12339
15
              NULL, HFILL }
12340
15
        },
12341
15
        { &hf_mbim_set_stk_pac_pac_host_control_poll_interval,
12342
15
            { "Poll Interval", "mbim.control.set_stk_pac.pac_host_control.poll_interval",
12343
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12344
15
              NULL, HFILL }
12345
15
        },
12346
15
        { &hf_mbim_set_stk_pac_pac_host_control_polling_off,
12347
15
            { "Polling Off", "mbim.control.set_stk_pac.pac_host_control.polling_off",
12348
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12349
15
              NULL, HFILL }
12350
15
        },
12351
15
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_evt_list,
12352
15
            { "Set Up Event List", "mbim.control.set_stk_pac.pac_host_control.set_up_evt_list",
12353
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12354
15
              NULL, HFILL }
12355
15
        },
12356
15
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_call,
12357
15
            { "Set Up Call", "mbim.control.set_stk_pac.pac_host_control.set_up_call",
12358
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12359
15
              NULL, HFILL }
12360
15
        },
12361
15
        { &hf_mbim_set_stk_pac_pac_host_control_send_ss,
12362
15
            { "Send SS", "mbim.control.set_stk_pac.pac_host_control.send_ss",
12363
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12364
15
              NULL, HFILL }
12365
15
        },
12366
15
        { &hf_mbim_set_stk_pac_pac_host_control_send_ussd,
12367
15
            { "Send USSD", "mbim.control.set_stk_pac.pac_host_control.send_ussd",
12368
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12369
15
              NULL, HFILL }
12370
15
        },
12371
15
        { &hf_mbim_set_stk_pac_pac_host_control_send_short_msg,
12372
15
            { "Send Short Message", "mbim.control.set_stk_pac.pac_host_control.send_short_msg",
12373
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12374
15
              NULL, HFILL }
12375
15
        },
12376
15
        { &hf_mbim_set_stk_pac_pac_host_control_send_dtmf,
12377
15
            { "Send DTMF", "mbim.control.set_stk_pac.pac_host_control.send_dtmf",
12378
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12379
15
              NULL, HFILL }
12380
15
        },
12381
15
        { &hf_mbim_set_stk_pac_pac_host_control_launch_browser,
12382
15
            { "Launch Browser", "mbim.control.set_stk_pac.pac_host_control.launch_browser",
12383
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12384
15
              NULL, HFILL }
12385
15
        },
12386
15
        { &hf_mbim_set_stk_pac_pac_host_control_geo_loc_req,
12387
15
            { "Geographical Location Request", "mbim.control.set_stk_pac.pac_host_control.geo_loc_req",
12388
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12389
15
              NULL, HFILL }
12390
15
        },
12391
15
        { &hf_mbim_set_stk_pac_pac_host_control_play_tone,
12392
15
            { "Play Tone", "mbim.control.set_stk_pac.pac_host_control.play_tone",
12393
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12394
15
              NULL, HFILL }
12395
15
        },
12396
15
        { &hf_mbim_set_stk_pac_pac_host_control_display_text,
12397
15
            { "Display Text", "mbim.control.set_stk_pac.pac_host_control.display_text",
12398
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12399
15
              NULL, HFILL }
12400
15
        },
12401
15
        { &hf_mbim_set_stk_pac_pac_host_control_get_inkey,
12402
15
            { "Get Inkey", "mbim.control.set_stk_pac.pac_host_control.get_inkey",
12403
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12404
15
              NULL, HFILL }
12405
15
        },
12406
15
        { &hf_mbim_set_stk_pac_pac_host_control_get_input,
12407
15
            { "Get Input", "mbim.control.set_stk_pac.pac_host_control.get_input",
12408
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12409
15
              NULL, HFILL }
12410
15
        },
12411
15
        { &hf_mbim_set_stk_pac_pac_host_control_select_item,
12412
15
            { "Select Item", "mbim.control.set_stk_pac.pac_host_control.select_item",
12413
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12414
15
              NULL, HFILL }
12415
15
        },
12416
15
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_menu,
12417
15
            { "Set Up Menu", "mbim.control.set_stk_pac.pac_host_control.set_up_menu",
12418
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12419
15
              NULL, HFILL }
12420
15
        },
12421
15
        { &hf_mbim_set_stk_pac_pac_host_control_prov_local_info,
12422
15
            { "Provide Local Information", "mbim.control.set_stk_pac.pac_host_control.prov_local_info",
12423
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12424
15
              NULL, HFILL }
12425
15
        },
12426
15
        { &hf_mbim_set_stk_pac_pac_host_control_timer_management,
12427
15
            { "Timer Management", "mbim.control.set_stk_pac.pac_host_control.timer_management",
12428
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12429
15
              NULL, HFILL }
12430
15
        },
12431
15
        { &hf_mbim_set_stk_pac_pac_host_control_set_up_idle_mode_text,
12432
15
            { "Set Up Idle Mode Text", "mbim.control.set_stk_pac.pac_host_control.set_up_idle_mode_text",
12433
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12434
15
              NULL, HFILL }
12435
15
        },
12436
15
        { &hf_mbim_set_stk_pac_pac_host_control_perform_card_apdu,
12437
15
            { "Perform Card APDU", "mbim.control.set_stk_pac.pac_host_control.perform_card_apdu",
12438
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12439
15
              NULL, HFILL }
12440
15
        },
12441
15
        { &hf_mbim_set_stk_pac_pac_host_control_power_on_card,
12442
15
            { "Power On Card", "mbim.control.set_stk_pac.pac_host_control.power_on_card",
12443
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12444
15
              NULL, HFILL }
12445
15
        },
12446
15
        { &hf_mbim_set_stk_pac_pac_host_control_power_off_card,
12447
15
            { "Power Off Card", "mbim.control.set_stk_pac.pac_host_control.power_off_card",
12448
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12449
15
              NULL, HFILL }
12450
15
        },
12451
15
        { &hf_mbim_set_stk_pac_pac_host_control_get_reader_status,
12452
15
            { "Get Reader Status", "mbim.control.set_stk_pac.pac_host_control.get_reader_status",
12453
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12454
15
              NULL, HFILL }
12455
15
        },
12456
15
        { &hf_mbim_set_stk_pac_pac_host_control_run_at_cmd,
12457
15
            { "Run AT Command", "mbim.control.set_stk_pac.pac_host_control.run_at_cmd",
12458
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12459
15
              NULL, HFILL }
12460
15
        },
12461
15
        { &hf_mbim_set_stk_pac_pac_host_control_lang_notif,
12462
15
            { "Language Notification", "mbim.control.set_stk_pac.pac_host_control.lang_notif",
12463
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12464
15
              NULL, HFILL }
12465
15
        },
12466
15
        { &hf_mbim_set_stk_pac_pac_host_control_open_channel,
12467
15
            { "Open Channel", "mbim.control.set_stk_pac.pac_host_control.open_channel",
12468
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12469
15
              NULL, HFILL }
12470
15
        },
12471
15
        { &hf_mbim_set_stk_pac_pac_host_control_close_channel,
12472
15
            { "Close Channel", "mbim.control.set_stk_pac.pac_host_control.close_channel",
12473
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12474
15
              NULL, HFILL }
12475
15
        },
12476
15
        { &hf_mbim_set_stk_pac_pac_host_control_receive_data,
12477
15
            { "Receive Data", "mbim.control.set_stk_pac.pac_host_control.receive_data",
12478
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12479
15
              NULL, HFILL }
12480
15
        },
12481
15
        { &hf_mbim_set_stk_pac_pac_host_control_send_data,
12482
15
            { "Send Data", "mbim.control.set_stk_pac.pac_host_control.send_data",
12483
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12484
15
              NULL, HFILL }
12485
15
        },
12486
15
        { &hf_mbim_set_stk_pac_pac_host_control_get_channel_status,
12487
15
            { "Get Channel Status", "mbim.control.set_stk_pac.pac_host_control.get_channel_status",
12488
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12489
15
              NULL, HFILL }
12490
15
        },
12491
15
        { &hf_mbim_set_stk_pac_pac_host_control_service_search,
12492
15
            { "Service Search", "mbim.control.set_stk_pac.pac_host_control.service_search",
12493
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12494
15
              NULL, HFILL }
12495
15
        },
12496
15
        { &hf_mbim_set_stk_pac_pac_host_control_get_service_info,
12497
15
            { "Get Service Information", "mbim.control.set_stk_pac.pac_host_control.get_service_info",
12498
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12499
15
              NULL, HFILL }
12500
15
        },
12501
15
        { &hf_mbim_set_stk_pac_pac_host_control_declare_service,
12502
15
            { "Declare Service", "mbim.control.set_stk_pac.pac_host_control.declare_service",
12503
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12504
15
              NULL, HFILL }
12505
15
        },
12506
15
        { &hf_mbim_set_stk_pac_pac_host_control_set_frames,
12507
15
            { "Set Frames", "mbim.control.set_stk_pac.pac_host_control.set_frames",
12508
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x04,
12509
15
              NULL, HFILL }
12510
15
        },
12511
15
        { &hf_mbim_set_stk_pac_pac_host_control_get_frames_status,
12512
15
            { "Get Frames Status", "mbim.control.set_stk_pac.pac_host_control.get_frames_status",
12513
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x08,
12514
15
              NULL, HFILL }
12515
15
        },
12516
15
        { &hf_mbim_set_stk_pac_pac_host_control_retrieve_multimedia_msg,
12517
15
            { "Retrieve Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.retrieve_multimedia_msg",
12518
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x10,
12519
15
              NULL, HFILL }
12520
15
        },
12521
15
        { &hf_mbim_set_stk_pac_pac_host_control_submit_multimedia_msg,
12522
15
            { "Submit Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.submit_multimedia_msg",
12523
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x20,
12524
15
              NULL, HFILL }
12525
15
        },
12526
15
        { &hf_mbim_set_stk_pac_pac_host_control_display_multimedia_msg,
12527
15
            { "Display Multimedia Message", "mbim.control.set_stk_pac.pac_host_control.display_multimedia_msg",
12528
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12529
15
              NULL, HFILL }
12530
15
        },
12531
15
        { &hf_mbim_set_stk_pac_pac_host_control_activate,
12532
15
            { "Activate", "mbim.control.set_stk_pac.pac_host_control.activate",
12533
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x40,
12534
15
              NULL, HFILL }
12535
15
        },
12536
15
        { &hf_mbim_set_stk_pac_pac_host_control_contactless_state_changed,
12537
15
            { "Contactless State Changed", "mbim.control.set_stk_pac.pac_host_control.contactless_state_changed",
12538
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x80,
12539
15
              NULL, HFILL }
12540
15
        },
12541
15
        { &hf_mbim_set_stk_pac_pac_host_control_cmd_container,
12542
15
            { "Command Container", "mbim.control.set_stk_pac.pac_host_control.cmd_container",
12543
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x01,
12544
15
              NULL, HFILL }
12545
15
        },
12546
15
        { &hf_mbim_set_stk_pac_pac_host_control_encapsulated_session_ctrl,
12547
15
            { "Encapsulated Session Control", "mbim.control.set_stk_pac.pac_host_control.encapsulated_session_ctrl",
12548
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12549
15
              NULL, HFILL }
12550
15
        },
12551
15
        { &hf_mbim_set_stk_pac_pac_host_control_end_proact_session,
12552
15
            { "End Proactive Session", "mbim.control.set_stk_pac.pac_host_control.end_proact_session",
12553
15
               FT_BOOLEAN, 8, TFS(&mbim_pac_host_control_val), 0x02,
12554
15
              NULL, HFILL }
12555
15
        },
12556
15
        { &hf_mbim_stk_pac_info_pac_support,
12557
15
            { "PAC Host Control", "mbim.control.stk_pac_info.pac_support",
12558
15
               FT_BYTES, BASE_NONE, NULL, 0,
12559
15
              NULL, HFILL }
12560
15
        },
12561
15
        { &hf_mbim_stk_pac_info_pac_support_refresh,
12562
15
            { "Refresh", "mbim.control.stk_pac_info.pac_support.refresh",
12563
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12564
15
              NULL, HFILL }
12565
15
        },
12566
15
        { &hf_mbim_stk_pac_info_pac_support_more_time,
12567
15
            { "More Time", "mbim.control.stk_pac_info.pac_support.more_time",
12568
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12569
15
              NULL, HFILL }
12570
15
        },
12571
15
        { &hf_mbim_stk_pac_info_pac_support_poll_interval,
12572
15
            { "Poll Interval", "mbim.control.stk_pac_info.pac_support.poll_interval",
12573
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12574
15
              NULL, HFILL }
12575
15
        },
12576
15
        { &hf_mbim_stk_pac_info_pac_support_polling_off,
12577
15
            { "Polling Off", "mbim.control.stk_pac_info.pac_support.polling_off",
12578
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12579
15
              NULL, HFILL }
12580
15
        },
12581
15
        { &hf_mbim_stk_pac_info_pac_support_set_up_evt_list,
12582
15
            { "Set Up Event List", "mbim.control.stk_pac_info.pac_support.set_up_evt_list",
12583
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12584
15
              NULL, HFILL }
12585
15
        },
12586
15
        { &hf_mbim_stk_pac_info_pac_support_set_up_call,
12587
15
            { "Set Up Call", "mbim.control.stk_pac_info.pac_support.set_up_call",
12588
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12589
15
              NULL, HFILL }
12590
15
        },
12591
15
        { &hf_mbim_stk_pac_info_pac_support_send_ss,
12592
15
            { "Send SS", "mbim.control.stk_pac_info.pac_support.send_ss",
12593
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12594
15
              NULL, HFILL }
12595
15
        },
12596
15
        { &hf_mbim_stk_pac_info_pac_support_send_ussd,
12597
15
            { "Send USSD", "mbim.control.stk_pac_info.pac_support.send_ussd",
12598
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12599
15
              NULL, HFILL }
12600
15
        },
12601
15
        { &hf_mbim_stk_pac_info_pac_support_send_short_msg,
12602
15
            { "Send Short Message", "mbim.control.stk_pac_info.pac_support.send_short_msg",
12603
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12604
15
              NULL, HFILL }
12605
15
        },
12606
15
        { &hf_mbim_stk_pac_info_pac_support_send_dtmf,
12607
15
            { "Send DTMF", "mbim.control.stk_pac_info.pac_support.send_dtmf",
12608
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12609
15
              NULL, HFILL }
12610
15
        },
12611
15
        { &hf_mbim_stk_pac_info_pac_support_launch_browser,
12612
15
            { "Launch Browser", "mbim.control.stk_pac_info.pac_support.launch_browser",
12613
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12614
15
              NULL, HFILL }
12615
15
        },
12616
15
        { &hf_mbim_stk_pac_info_pac_support_geo_loc_req,
12617
15
            { "Geographical Location Request", "mbim.control.stk_pac_info.pac_support.geo_loc_req",
12618
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12619
15
              NULL, HFILL }
12620
15
        },
12621
15
        { &hf_mbim_stk_pac_info_pac_support_play_tone,
12622
15
            { "Play Tone", "mbim.control.stk_pac_info.pac_support.play_tone",
12623
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12624
15
              NULL, HFILL }
12625
15
        },
12626
15
        { &hf_mbim_stk_pac_info_pac_support_display_text,
12627
15
            { "Display Text", "mbim.control.stk_pac_info.pac_support.display_text",
12628
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12629
15
              NULL, HFILL }
12630
15
        },
12631
15
        { &hf_mbim_stk_pac_info_pac_support_get_inkey,
12632
15
            { "Get Inkey", "mbim.control.stk_pac_info.pac_support.get_inkey",
12633
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12634
15
              NULL, HFILL }
12635
15
        },
12636
15
        { &hf_mbim_stk_pac_info_pac_support_get_input,
12637
15
            { "Get Input", "mbim.control.stk_pac_info.pac_support.get_input",
12638
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12639
15
              NULL, HFILL }
12640
15
        },
12641
15
        { &hf_mbim_stk_pac_info_pac_support_select_item,
12642
15
            { "Select Item", "mbim.control.stk_pac_info.pac_support.select_item",
12643
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12644
15
              NULL, HFILL }
12645
15
        },
12646
15
        { &hf_mbim_stk_pac_info_pac_support_set_up_menu,
12647
15
            { "Set Up Menu", "mbim.control.stk_pac_info.pac_support.set_up_menu",
12648
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12649
15
              NULL, HFILL }
12650
15
        },
12651
15
        { &hf_mbim_stk_pac_info_pac_support_prov_local_info,
12652
15
            { "Provide Local Information", "mbim.control.stk_pac_info.pac_support.prov_local_info",
12653
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12654
15
              NULL, HFILL }
12655
15
        },
12656
15
        { &hf_mbim_stk_pac_info_pac_support_timer_management,
12657
15
            { "Timer Management", "mbim.control.stk_pac_info.pac_support.timer_management",
12658
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12659
15
              NULL, HFILL }
12660
15
        },
12661
15
        { &hf_mbim_stk_pac_info_pac_support_set_up_idle_mode_text,
12662
15
            { "Set Up Idle Mode Text", "mbim.control.stk_pac_info.pac_support.set_up_idle_mode_text",
12663
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12664
15
              NULL, HFILL }
12665
15
        },
12666
15
        { &hf_mbim_stk_pac_info_pac_support_perform_card_apdu,
12667
15
            { "Perform Card APDU", "mbim.control.stk_pac_info.pac_support.perform_card_apdu",
12668
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12669
15
              NULL, HFILL }
12670
15
        },
12671
15
        { &hf_mbim_stk_pac_info_pac_support_power_on_card,
12672
15
            { "Power On Card", "mbim.control.stk_pac_info.pac_support.power_on_card",
12673
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12674
15
              NULL, HFILL }
12675
15
        },
12676
15
        { &hf_mbim_stk_pac_info_pac_support_power_off_card,
12677
15
            { "Power Off Card", "mbim.control.stk_pac_info.pac_support.power_off_card",
12678
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12679
15
              NULL, HFILL }
12680
15
        },
12681
15
        { &hf_mbim_stk_pac_info_pac_support_get_reader_status,
12682
15
            { "Get Reader Status", "mbim.control.stk_pac_info.pac_support.get_reader_status",
12683
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12684
15
              NULL, HFILL }
12685
15
        },
12686
15
        { &hf_mbim_stk_pac_info_pac_support_run_at_cmd,
12687
15
            { "Run AT Command", "mbim.control.stk_pac_info.pac_support.run_at_cmd",
12688
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12689
15
              NULL, HFILL }
12690
15
        },
12691
15
        { &hf_mbim_stk_pac_info_pac_support_lang_notif,
12692
15
            { "Language Notification", "mbim.control.stk_pac_info.pac_support.lang_notif",
12693
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12694
15
              NULL, HFILL }
12695
15
        },
12696
15
        { &hf_mbim_stk_pac_info_pac_support_open_channel,
12697
15
            { "Open Channel", "mbim.control.stk_pac_info.pac_support.open_channel",
12698
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12699
15
              NULL, HFILL }
12700
15
        },
12701
15
        { &hf_mbim_stk_pac_info_pac_support_close_channel,
12702
15
            { "Close Channel", "mbim.control.stk_pac_info.pac_support.close_channel",
12703
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12704
15
              NULL, HFILL }
12705
15
        },
12706
15
        { &hf_mbim_stk_pac_info_pac_support_receive_data,
12707
15
            { "Receive Data", "mbim.control.stk_pac_info.pac_support.receive_data",
12708
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12709
15
              NULL, HFILL }
12710
15
        },
12711
15
        { &hf_mbim_stk_pac_info_pac_support_send_data,
12712
15
            { "Send Data", "mbim.control.stk_pac_info.pac_support.send_data",
12713
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12714
15
              NULL, HFILL }
12715
15
        },
12716
15
        { &hf_mbim_stk_pac_info_pac_support_get_channel_status,
12717
15
            { "Get Channel Status", "mbim.control.stk_pac_info.pac_support.get_channel_status",
12718
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12719
15
              NULL, HFILL }
12720
15
        },
12721
15
        { &hf_mbim_stk_pac_info_pac_support_service_search,
12722
15
            { "Service Search", "mbim.control.stk_pac_info.pac_support.service_search",
12723
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12724
15
              NULL, HFILL }
12725
15
        },
12726
15
        { &hf_mbim_stk_pac_info_pac_support_get_service_info,
12727
15
            { "Get Service Information", "mbim.control.stk_pac_info.pac_support.get_service_info",
12728
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12729
15
              NULL, HFILL }
12730
15
        },
12731
15
        { &hf_mbim_stk_pac_info_pac_support_declare_service,
12732
15
            { "Declare Service", "mbim.control.stk_pac_info.pac_support.declare_service",
12733
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12734
15
              NULL, HFILL }
12735
15
        },
12736
15
        { &hf_mbim_stk_pac_info_pac_support_set_frames,
12737
15
            { "Set Frames", "mbim.control.stk_pac_info.pac_support.set_frames",
12738
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12739
15
              NULL, HFILL }
12740
15
        },
12741
15
        { &hf_mbim_stk_pac_info_pac_support_get_frames_status,
12742
15
            { "Get Frames Status", "mbim.control.stk_pac_info.pac_support.get_frames_status",
12743
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12744
15
              NULL, HFILL }
12745
15
        },
12746
15
        { &hf_mbim_stk_pac_info_pac_support_retrieve_multimedia_msg,
12747
15
            { "Retrieve Multimedia Message", "mbim.control.stk_pac_info.pac_support.retrieve_multimedia_msg",
12748
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12749
15
              NULL, HFILL }
12750
15
        },
12751
15
        { &hf_mbim_stk_pac_info_pac_support_submit_multimedia_msg,
12752
15
            { "Submit Multimedia Message", "mbim.control.stk_pac_info.pac_support.submit_multimedia_msg",
12753
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12754
15
              NULL, HFILL }
12755
15
        },
12756
15
        { &hf_mbim_stk_pac_info_pac_support_display_multimedia_msg,
12757
15
            { "Display Multimedia Message", "mbim.control.stk_pac_info.pac_support.display_multimedia_msg",
12758
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12759
15
              NULL, HFILL }
12760
15
        },
12761
15
        { &hf_mbim_stk_pac_info_pac_support_activate,
12762
15
            { "Activate", "mbim.control.stk_pac_info.pac_support.activate",
12763
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12764
15
              NULL, HFILL }
12765
15
        },
12766
15
        { &hf_mbim_stk_pac_info_pac_support_contactless_state_changed,
12767
15
            { "Contactless State Changed", "mbim.control.stk_pac_info.pac_support.contactless_state_changed",
12768
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12769
15
              NULL, HFILL }
12770
15
        },
12771
15
        { &hf_mbim_stk_pac_info_pac_support_cmd_container,
12772
15
            { "Command Container", "mbim.control.stk_pac_info.pac_support.cmd_container",
12773
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12774
15
              NULL, HFILL }
12775
15
        },
12776
15
        { &hf_mbim_stk_pac_info_pac_support_encapsulated_session_ctrl,
12777
15
            { "Encapsulated Session Control", "mbim.control.stk_pac_info.pac_support.encapsulated_session_ctrl",
12778
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12779
15
              NULL, HFILL }
12780
15
        },
12781
15
        { &hf_mbim_stk_pac_info_pac_support_end_proact_session,
12782
15
            { "End Proactive Session", "mbim.control.stk_pac_info.pac_support.end_proact_session",
12783
15
               FT_UINT8, BASE_DEC, VALS(mbim_stk_pac_profile_vals), 0,
12784
15
              NULL, HFILL }
12785
15
        },
12786
15
        { &hf_mbim_stk_pac_pac_type,
12787
15
            { "PAC Type", "mbim.control.stk_pac.pac_type",
12788
15
               FT_UINT32, BASE_DEC, VALS(mbim_stk_pac_type_vals), 0,
12789
15
              NULL, HFILL }
12790
15
        },
12791
15
        { &hf_mbim_stk_pac_pac,
12792
15
            { "PAC", "mbim.control.stk_pac.pac",
12793
15
               FT_BYTES, BASE_NONE, NULL, 0,
12794
15
              NULL, HFILL }
12795
15
        },
12796
15
        { &hf_mbim_set_stk_terminal_response_response_length,
12797
15
            { "Response Length", "mbim.control.set_stk_terminal_response.response_length",
12798
15
               FT_UINT32, BASE_DEC, NULL, 0,
12799
15
              NULL, HFILL }
12800
15
        },
12801
15
        { &hf_mbim_set_stk_terminal_response_data_buffer,
12802
15
            { "Data Buffer", "mbim.control.set_stk_terminal_response.data_buffer",
12803
15
               FT_BYTES, BASE_NONE, NULL, 0,
12804
15
              NULL, HFILL }
12805
15
        },
12806
15
        { &hf_mbim_stk_terminal_response_info_result_data_string_offset,
12807
15
            { "Result Data String Offset", "mbim.control.stk_terminal_response_info.result_data_string.offset",
12808
15
               FT_UINT32, BASE_DEC, NULL, 0,
12809
15
              NULL, HFILL }
12810
15
        },
12811
15
        { &hf_mbim_stk_terminal_response_info_result_data_string_length,
12812
15
            { "Result Data String Length", "mbim.control.stk_terminal_response_info.result_data_string.length",
12813
15
               FT_UINT32, BASE_DEC, NULL, 0,
12814
15
              NULL, HFILL }
12815
15
        },
12816
15
        { &hf_mbim_stk_terminal_response_info_status_word,
12817
15
            { "Status Word", "mbim.control.stk_terminal_response_info.status_word",
12818
15
               FT_UINT32, BASE_HEX, NULL, 0,
12819
15
              NULL, HFILL }
12820
15
        },
12821
15
        { &hf_mbim_stk_terminal_response_info_result_data_string,
12822
15
            { "Result Data String", "mbim.control.stk_terminal_response_info.result_data_string",
12823
15
               FT_BYTES, BASE_NONE, NULL, 0,
12824
15
              NULL, HFILL }
12825
15
        },
12826
15
        { &hf_mbim_set_stk_envelope_data_buffer,
12827
15
            { "Data Buffer", "mbim.control.set_stk_envelope.data_buffer",
12828
15
               FT_BYTES, BASE_NONE, NULL, 0,
12829
15
              NULL, HFILL }
12830
15
        },
12831
15
        { &hf_mbim_stk_envelope_info_envelope_support,
12832
15
            { "Envelope Support", "mbim.control.stk_envelope_info.envelope_support",
12833
15
               FT_BYTES, BASE_NONE, NULL, 0,
12834
15
              NULL, HFILL }
12835
15
        },
12836
15
        { &hf_mbim_aka_auth_req_rand,
12837
15
            { "RAND", "mbim.control.aka_auth_req.rand",
12838
15
               FT_BYTES, BASE_NONE, NULL, 0,
12839
15
              NULL, HFILL }
12840
15
        },
12841
15
        { &hf_mbim_aka_auth_req_autn,
12842
15
            { "AUTN", "mbim.control.aka_auth_req.autn",
12843
15
               FT_BYTES, BASE_NONE, NULL, 0,
12844
15
              NULL, HFILL }
12845
15
        },
12846
15
        { &hf_mbim_aka_auth_info_res,
12847
15
            { "RES", "mbim.control.aka_auth_info.res",
12848
15
               FT_BYTES, BASE_NONE, NULL, 0,
12849
15
              NULL, HFILL }
12850
15
        },
12851
15
        { &hf_mbim_aka_auth_info_res_length,
12852
15
            { "RES Length", "mbim.control.aka_auth_info.res_length",
12853
15
               FT_UINT32, BASE_DEC, NULL, 0,
12854
15
              NULL, HFILL }
12855
15
        },
12856
15
        { &hf_mbim_aka_auth_info_ik,
12857
15
            { "IK", "mbim.control.aka_auth_info.ik",
12858
15
               FT_BYTES, BASE_NONE, NULL, 0,
12859
15
              NULL, HFILL }
12860
15
        },
12861
15
        { &hf_mbim_aka_auth_info_ck,
12862
15
            { "CK", "mbim.control.aka_auth_info.ck",
12863
15
               FT_BYTES, BASE_NONE, NULL, 0,
12864
15
              NULL, HFILL }
12865
15
        },
12866
15
        { &hf_mbim_aka_auth_info_auts,
12867
15
            { "AUTS", "mbim.control.aka_auth_info.auts",
12868
15
               FT_BYTES, BASE_NONE, NULL, 0,
12869
15
              NULL, HFILL }
12870
15
        },
12871
15
        { &hf_mbim_akap_auth_req_rand,
12872
15
            { "RAND", "mbim.control.akap_auth_req.rand",
12873
15
               FT_BYTES, BASE_NONE, NULL, 0,
12874
15
              NULL, HFILL }
12875
15
        },
12876
15
        { &hf_mbim_akap_auth_req_autn,
12877
15
            { "AUTN", "mbim.control.akap_auth_req.autn",
12878
15
               FT_BYTES, BASE_NONE, NULL, 0,
12879
15
              NULL, HFILL }
12880
15
        },
12881
15
        { &hf_mbim_akap_auth_req_network_name_offset,
12882
15
            { "Network Name Offset", "mbim.control.akap_auth_req.network_name.offset",
12883
15
               FT_UINT32, BASE_DEC, NULL, 0,
12884
15
              NULL, HFILL }
12885
15
        },
12886
15
        { &hf_mbim_akap_auth_req_network_name_length,
12887
15
            { "Network Name Length", "mbim.control.akap_auth_req.network_name.length",
12888
15
               FT_UINT32, BASE_DEC, NULL, 0,
12889
15
              NULL, HFILL }
12890
15
        },
12891
15
        { &hf_mbim_akap_auth_req_network_name,
12892
15
            { "Network Name", "mbim.control.akap_auth_req.network_name",
12893
15
               FT_STRING, BASE_NONE, NULL, 0,
12894
15
              NULL, HFILL }
12895
15
        },
12896
15
        { &hf_mbim_akap_auth_info_res,
12897
15
            { "RES", "mbim.control.akap_auth_info.res",
12898
15
               FT_BYTES, BASE_NONE, NULL, 0,
12899
15
              NULL, HFILL }
12900
15
        },
12901
15
        { &hf_mbim_akap_auth_info_res_length,
12902
15
            { "RES Length", "mbim.control.akap_auth_info.res_length",
12903
15
               FT_UINT32, BASE_DEC, NULL, 0,
12904
15
              NULL, HFILL }
12905
15
        },
12906
15
        { &hf_mbim_akap_auth_info_ik,
12907
15
            { "IK", "mbim.control.akap_auth_info.ik",
12908
15
               FT_BYTES, BASE_NONE, NULL, 0,
12909
15
              NULL, HFILL }
12910
15
        },
12911
15
        { &hf_mbim_akap_auth_info_ck,
12912
15
            { "CK", "mbim.control.akap_auth_info.ck",
12913
15
               FT_BYTES, BASE_NONE, NULL, 0,
12914
15
              NULL, HFILL }
12915
15
        },
12916
15
        { &hf_mbim_akap_auth_info_auts,
12917
15
            { "AUTS", "mbim.control.akap_auth_info.auts",
12918
15
               FT_BYTES, BASE_NONE, NULL, 0,
12919
15
              NULL, HFILL }
12920
15
        },
12921
15
        { &hf_mbim_sim_auth_req_rand1,
12922
15
            { "RAND1", "mbim.control.sim_auth_req.rand1",
12923
15
               FT_BYTES, BASE_NONE, NULL, 0,
12924
15
              NULL, HFILL }
12925
15
        },
12926
15
        { &hf_mbim_sim_auth_req_rand2,
12927
15
            { "RAND2", "mbim.control.sim_auth_req.rand2",
12928
15
               FT_BYTES, BASE_NONE, NULL, 0,
12929
15
              NULL, HFILL }
12930
15
        },
12931
15
        { &hf_mbim_sim_auth_req_rand3,
12932
15
            { "RAND3", "mbim.control.sim_auth_req.rand3",
12933
15
               FT_BYTES, BASE_NONE, NULL, 0,
12934
15
              NULL, HFILL }
12935
15
        },
12936
15
        { &hf_mbim_sim_auth_req_n,
12937
15
            { "n", "mbim.control.sim_auth_req.n",
12938
15
               FT_UINT32, BASE_DEC, NULL, 0,
12939
15
              NULL, HFILL }
12940
15
        },
12941
15
        { &hf_mbim_sim_auth_info_sres1,
12942
15
            { "SRES1", "mbim.control.sim_auth_info.sres1",
12943
15
               FT_UINT32, BASE_HEX, NULL, 0,
12944
15
              NULL, HFILL }
12945
15
        },
12946
15
        { &hf_mbim_sim_auth_info_kc1,
12947
15
            { "KC1", "mbim.control.sim_auth_info.kc1",
12948
15
               FT_UINT64, BASE_HEX, NULL, 0,
12949
15
              NULL, HFILL }
12950
15
        },
12951
15
        { &hf_mbim_sim_auth_info_sres2,
12952
15
            { "SRES2", "mbim.control.sim_auth_info.sres2",
12953
15
               FT_UINT32, BASE_HEX, NULL, 0,
12954
15
              NULL, HFILL }
12955
15
        },
12956
15
        { &hf_mbim_sim_auth_info_kc2,
12957
15
            { "KC2", "mbim.control.sim_auth_info.kc2",
12958
15
               FT_UINT64, BASE_HEX, NULL, 0,
12959
15
              NULL, HFILL }
12960
15
        },
12961
15
        { &hf_mbim_sim_auth_info_sres3,
12962
15
            { "SRES3", "mbim.control.sim_auth_info.sres3",
12963
15
               FT_UINT32, BASE_HEX, NULL, 0,
12964
15
              NULL, HFILL }
12965
15
        },
12966
15
        { &hf_mbim_sim_auth_info_kc3,
12967
15
            { "KC3", "mbim.control.sim_auth_info.kc3",
12968
15
               FT_UINT64, BASE_HEX, NULL, 0,
12969
15
              NULL, HFILL }
12970
15
        },
12971
15
        { &hf_mbim_sim_auth_info_n,
12972
15
            { "n", "mbim.control.sim_auth_info.n",
12973
15
               FT_UINT32, BASE_DEC, NULL, 0,
12974
15
              NULL, HFILL }
12975
15
        },
12976
15
        { &hf_mbim_set_dss_connect_device_service_id,
12977
15
            { "Device Service Id", "mbim.control.set_dss_connect.device_service_id",
12978
15
               FT_GUID, BASE_NONE, NULL, 0,
12979
15
              NULL, HFILL }
12980
15
        },
12981
15
        { &hf_mbim_set_dss_connect_dss_session_id,
12982
15
            { "DSS Session Id", "mbim.control.set_dss_connect.dss_session_id",
12983
15
               FT_UINT32, BASE_DEC, NULL, 0,
12984
15
              NULL, HFILL }
12985
15
        },
12986
15
        { &hf_mbim_set_dss_connect_dss_link_state,
12987
15
            { "DSS Link State", "mbim.control.set_dss_connect.dss_link_state",
12988
15
               FT_UINT32, BASE_DEC, VALS(mbim_dss_link_state_vals), 0,
12989
15
              NULL, HFILL }
12990
15
        },
12991
15
        { &hf_mbim_multicarrier_capabilities_info_capabilities,
12992
15
            { "Capabilities", "mbim.control.multicarrier_capabilities_info.capabilities",
12993
15
               FT_UINT32, BASE_HEX, NULL, 0,
12994
15
              NULL, HFILL }
12995
15
        },
12996
15
        { &hf_mbim_multicarrier_capabilities_info_capabilities_static_scan,
12997
15
            { "Static Scan", "mbim.control.multicarrier_capabilities_info.capabilities.static_scan",
12998
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
12999
15
              NULL, HFILL }
13000
15
        },
13001
15
        { &hf_mbim_multicarrier_capabilities_info_capabilities_fw_requires_reboot,
13002
15
            { "FW Requires Reboot", "mbim.control.multicarrier_capabilities_info.capabilities.fw_requires_reboot",
13003
15
               FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
13004
15
              NULL, HFILL }
13005
15
        },
13006
15
        { &hf_mbim_location_info_country,
13007
15
            { "Country", "mbim.control.location_info.country",
13008
15
               FT_UINT32, BASE_HEX|BASE_EXT_STRING, &mbim_geoid_vals_ext, 0,
13009
15
              NULL, HFILL }
13010
15
        },
13011
15
        { &hf_mbim_multicarrier_current_cid_list_req_uuid,
13012
15
            { "UUID", "mbim.control.multicarrier_current_cid_list_req.uuid",
13013
15
               FT_GUID, BASE_NONE, NULL, 0,
13014
15
              NULL, HFILL }
13015
15
        },
13016
15
        { &hf_mbim_multicarrier_current_cid_list_info_cid_count,
13017
15
            { "CID Count", "mbim.control.multicarrier_current_cid_list_info.cid_count",
13018
15
               FT_UINT32, BASE_DEC, NULL, 0,
13019
15
              NULL, HFILL }
13020
15
        },
13021
15
        { &hf_mbim_multicarrier_current_cid_list_info_cid,
13022
15
            { "CID", "mbim.control.multicarrier_current_cid_list_info.cid",
13023
15
               FT_UINT32, BASE_DEC, VALS(mbim_uuid_multicarrier_cid_vals), 0,
13024
15
              NULL, HFILL }
13025
15
        },
13026
15
        { &hf_mbim_msfwid_firmwareid_info_firmware_id,
13027
15
            { "Firmware Id", "mbim.control.msfwid_firmwareid_info.firmware_id",
13028
15
               FT_GUID, BASE_NONE, NULL, 0,
13029
15
              NULL, HFILL }
13030
15
        },
13031
15
        { &hf_mbim_qmi_buffer,
13032
15
            { "Buffer", "mbim.control.qmi.buffer",
13033
15
               FT_BYTES, BASE_NONE, NULL, 0,
13034
15
              NULL, HFILL }
13035
15
        },
13036
15
        { &hf_mbim_thermal_config_enable,
13037
15
            { "Enable", "mbim.control.thermal_config.enable",
13038
15
               FT_UINT32, BASE_DEC, VALS(mbim_thermal_config_enable_vals), 0,
13039
15
              NULL, HFILL }
13040
15
        },
13041
15
        { &hf_mbim_thermal_config_temp_sensor_id,
13042
15
            { "Temperature Sensor ID", "mbim.control.thermal_config.temp_sensor_id",
13043
15
               FT_UINT32, BASE_DEC, NULL, 0,
13044
15
              NULL, HFILL }
13045
15
        },
13046
15
        { &hf_mbim_thermal_config_alarm_id,
13047
15
            { "Alarm ID", "mbim.control.thermal_config.alarm_id",
13048
15
               FT_UINT32, BASE_DEC, NULL, 0,
13049
15
              NULL, HFILL }
13050
15
        },
13051
15
        { &hf_mbim_thermal_config_threshold_value,
13052
15
            { "Threshold Value", "mbim.control.thermal_config.threshold_value",
13053
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13054
15
              NULL, HFILL }
13055
15
        },
13056
15
        { &hf_mbim_thermal_config_hyst_value,
13057
15
            { "Hysteresis Value", "mbim.control.thermal_config.hyst_value",
13058
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13059
15
              NULL, HFILL }
13060
15
        },
13061
15
        { &hf_mbim_thermal_config_sampling_period,
13062
15
            { "Sampling Period", "mbim.control.thermal_config.sampling_period",
13063
15
               FT_UINT32, BASE_DEC, NULL, 0,
13064
15
              NULL, HFILL }
13065
15
        },
13066
15
        { &hf_mbim_query_thermal_state_temp_sensor_id,
13067
15
            { "Temperature Sensor ID", "mbim.control.query_thermal_state.temp_sensor_id",
13068
15
               FT_UINT32, BASE_DEC, NULL, 0,
13069
15
              NULL, HFILL }
13070
15
        },
13071
15
        { &hf_mbim_thermal_state_info_current_temp_value,
13072
15
            { "Current Temperature Value", "mbim.control.thermal_state_info.current_temp_value",
13073
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13074
15
              NULL, HFILL }
13075
15
        },
13076
15
        { &hf_mbim_thermal_state_info_enable,
13077
15
            { "Enable", "mbim.control.thermal_state_info.enable",
13078
15
               FT_UINT32, BASE_DEC, VALS(mbim_thermal_config_enable_vals), 0,
13079
15
              NULL, HFILL }
13080
15
        },
13081
15
        { &hf_mbim_thermal_state_info_temp_sensor_id,
13082
15
            { "Temperature Sensor ID", "mbim.control.thermal_state_info.temp_sensor_id",
13083
15
               FT_UINT32, BASE_DEC, NULL, 0,
13084
15
              NULL, HFILL }
13085
15
        },
13086
15
        { &hf_mbim_thermal_state_info_alarm_id,
13087
15
            { "Alarm ID", "mbim.control.thermal_state_info.alarm_id",
13088
15
               FT_UINT32, BASE_DEC, NULL, 0,
13089
15
              NULL, HFILL }
13090
15
        },
13091
15
        { &hf_mbim_thermal_state_info_threshold_value,
13092
15
            { "Threshold Value", "mbim.control.thermal_state_info.threshold_value",
13093
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13094
15
              NULL, HFILL }
13095
15
        },
13096
15
        { &hf_mbim_thermal_state_info_hyst_value,
13097
15
            { "Hysteresis Value", "mbim.control.thermal_state_info.hyst_value",
13098
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_degrees_fmt), 0,
13099
15
              NULL, HFILL }
13100
15
        },
13101
15
        { &hf_mbim_thermal_state_info_sampling_period,
13102
15
            { "Sampling Period", "mbim.control.thermal_state_info.sampling_period",
13103
15
               FT_UINT32, BASE_DEC, NULL, 0,
13104
15
              NULL, HFILL }
13105
15
        },
13106
15
        { &hf_mbim_sar_config_sar_status,
13107
15
            { "SAR Status", "mbim.control.sar_config.sar_status",
13108
15
               FT_UINT32, BASE_DEC, VALS(mbim_sar_status_vals), 0,
13109
15
              NULL, HFILL }
13110
15
        },
13111
15
        { &hf_mbim_sar_config_level,
13112
15
            { "Level", "mbim.control.sar_config.level",
13113
15
               FT_UINT32, BASE_DEC, NULL, 0,
13114
15
              NULL, HFILL }
13115
15
        },
13116
15
        { &hf_mbim_ms_sar_config_sar_mode,
13117
15
            { "SAR Mode", "mbim.control.ms_sar_config.sar_mode",
13118
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_sar_config_sar_mode_vals), 0,
13119
15
              NULL, HFILL }
13120
15
        },
13121
15
        { &hf_mbim_ms_sar_config_sar_backoff_status,
13122
15
            { "SAR Backoff Status", "mbim.control.ms_sar_config.sar_backoff_status",
13123
15
               FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0,
13124
15
              NULL, HFILL }
13125
15
        },
13126
15
        { &hf_mbim_ms_sar_config_sar_wifi_Integration,
13127
15
            { "SAR Wifi Integration", "mbim.control.ms_sar_config.sar_wifi_integration",
13128
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_sar_config_sar_wifi_integration_vals), 0,
13129
15
              NULL, HFILL }
13130
15
        },
13131
15
        { &hf_mbim_ms_sar_config_element_count,
13132
15
            { "Element Count", "mbim.control.ms_sar_config.element_count",
13133
15
               FT_UINT32, BASE_DEC, NULL, 0,
13134
15
              NULL, HFILL }
13135
15
        },
13136
15
        { &hf_mbim_ms_sar_config_element_offset,
13137
15
            { "Element Offset", "mbim.control.ms_sar_config.element_offset",
13138
15
               FT_UINT32, BASE_DEC, NULL, 0,
13139
15
              NULL, HFILL }
13140
15
        },
13141
15
        { &hf_mbim_ms_sar_config_element_size,
13142
15
            { "Element Size", "mbim.control.ms_sar_config.element_size",
13143
15
               FT_UINT32, BASE_DEC, NULL, 0,
13144
15
              NULL, HFILL }
13145
15
        },
13146
15
        { &hf_mbim_ms_sar_config_state_sar_antenna_index,
13147
15
            { "SAR Antenna Index", "mbim.control.ms_sar_config.sar_antenna_index",
13148
15
               FT_UINT32, BASE_DEC, NULL, 0,
13149
15
              NULL, HFILL }
13150
15
        },
13151
15
        { &hf_mbim_ms_sar_config_state_sar_backoff_index,
13152
15
            { "SAR Backoff Index", "mbim.control.ms_sar_config.sar_backoff_index",
13153
15
               FT_UINT32, BASE_DEC, NULL, 0,
13154
15
              NULL, HFILL }
13155
15
        },
13156
15
        { &hf_mbim_ms_transmission_status_channel_notification,
13157
15
            { "Transmission Channel Notification", "mbim.control.ms_transmission_status.channel_notification",
13158
15
               FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled), 0,
13159
15
              NULL, HFILL }
13160
15
        },
13161
15
        { &hf_mbim_ms_transmission_status_transmission_status,
13162
15
            { "Transmission Status", "mbim.control.ms_transmission_status.transmission_status",
13163
15
               FT_BOOLEAN, BASE_NONE, TFS(&tfs_active_inactive), 0,
13164
15
              NULL, HFILL }
13165
15
        },
13166
15
        { &hf_mbim_ms_transmission_status_hysteresis_timer,
13167
15
            { "Hysteresis Timer", "mbim.control.ms_transmission_status.hysteresis_timer",
13168
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0,
13169
15
              NULL, HFILL }
13170
15
        },
13171
15
        { &hf_mbim_adpclk_activate_state,
13172
15
            { "State", "mbim.control.adpclk_activate.state",
13173
15
               FT_UINT32, BASE_DEC, VALS(mbim_adpclk_activate_state_vals), 0,
13174
15
              NULL, HFILL }
13175
15
        },
13176
15
        { &hf_mbim_adpclk_freq_info_elem_count,
13177
15
            { "Element Count", "mbim.control.adpclk_freq_info.elem_count",
13178
15
               FT_UINT32, BASE_DEC, NULL, 0,
13179
15
              NULL, HFILL }
13180
15
        },
13181
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_offset,
13182
15
            { "ADPCLK Freq Value Offset", "mbim.control.adpclk_freq_info.adpclk_freq_value.offset",
13183
15
               FT_UINT32, BASE_DEC, NULL, 0,
13184
15
              NULL, HFILL }
13185
15
        },
13186
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_size,
13187
15
            { "ADPCLK Freq Value Size", "mbim.control.adpclk_freq_info.adpclk_freq_value.size",
13188
15
               FT_UINT32, BASE_DEC, NULL, 0,
13189
15
              NULL, HFILL }
13190
15
        },
13191
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_center_freq,
13192
15
            { "Center Frequency", "mbim.control.adpclk_freq_info.adpclk_freq_value.center_freq",
13193
15
               FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_hz), 0,
13194
15
              NULL, HFILL }
13195
15
        },
13196
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_freq_spread,
13197
15
            { "Frequency Spread", "mbim.control.adpclk_freq_info.adpclk_freq_value.freq_spread",
13198
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_hz), 0,
13199
15
              NULL, HFILL }
13200
15
        },
13201
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_noise_power,
13202
15
            { "Noise Power", "mbim.control.adpclk_freq_info.adpclk_freq_value.noise_power",
13203
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13204
15
              NULL, HFILL }
13205
15
        },
13206
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_rssi,
13207
15
            { "Relative Signal Strength Indication", "mbim.control.adpclk_freq_info.adpclk_freq_value.rssi",
13208
15
               FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13209
15
              NULL, HFILL }
13210
15
        },
13211
15
        { &hf_mbim_adpclk_freq_info_adpclk_freq_value_connect_status,
13212
15
            { "Connect Status", "mbim.control.adpclk_freq_info.adpclk_freq_value.connect_status",
13213
15
               FT_UINT32, BASE_DEC, VALS(mbim_connect_status_vals), 0,
13214
15
              NULL, HFILL }
13215
15
        },
13216
15
        { &hf_mbim_trace_config_config,
13217
15
            { "Configuration", "mbim.control.trace_config.config",
13218
15
               FT_UINT32, BASE_DEC, VALS(mbim_trace_config_vals), 0,
13219
15
              NULL, HFILL }
13220
15
        },
13221
15
        { &hf_mbim_nrtc_app_info_period,
13222
15
            { "Period", "mbim.control.nrtc_app_info.period",
13223
15
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0,
13224
15
              NULL, HFILL }
13225
15
        },
13226
15
        { &hf_mbim_nrtc_app_info_duration,
13227
15
            { "Duration", "mbim.control.nrtc_app_info.duration",
13228
15
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0,
13229
15
              NULL, HFILL }
13230
15
        },
13231
15
        { &hf_mbim_nrtcws_config_mode,
13232
15
            { "Mode", "mbim.control.nrtcws_config.mode",
13233
15
               FT_UINT16, BASE_DEC, NULL, 0,
13234
15
              NULL, HFILL }
13235
15
        },
13236
15
        { &hf_mbim_nrtcws_config_wlan_active,
13237
15
            { "WLAN Active", "mbim.control.nrtcws_config.wlan_active",
13238
15
               FT_UINT16, BASE_DEC, NULL, 0,
13239
15
              NULL, HFILL }
13240
15
        },
13241
15
        { &hf_mbim_nrtcws_config_wlan_safe_rx,
13242
15
            { "WLAN Safe Rx", "mbim.control.nrtcws_config.wlan_safe_rx",
13243
15
               FT_UINT16, BASE_DEC, NULL, 0,
13244
15
              NULL, HFILL }
13245
15
        },
13246
15
        { &hf_mbim_nrtcws_config_wlan_bandwidth,
13247
15
            { "WLAN Bandwidth", "mbim.control.nrtcws_config.wlan_bandwidth",
13248
15
               FT_UINT16, BASE_DEC, NULL, 0,
13249
15
              NULL, HFILL }
13250
15
        },
13251
15
        { &hf_mbim_nrtcws_config_bt_active,
13252
15
            { "BT Active", "mbim.control.nrtcws_config.bt_active",
13253
15
               FT_UINT16, BASE_DEC, NULL, 0,
13254
15
              NULL, HFILL }
13255
15
        },
13256
15
        { &hf_mbim_nrtcws_config_bt_safe_rx,
13257
15
            { "BT Safe Rx", "mbim.control.nrtcws_config.bt_safe_rx",
13258
15
               FT_UINT16, BASE_DEC, NULL, 0,
13259
15
              NULL, HFILL }
13260
15
        },
13261
15
        { &hf_mbim_nrtcws_info_lte_active,
13262
15
            { "LTE Active", "mbim.control.nrtcws_info.lte_active",
13263
15
               FT_UINT16, BASE_DEC, NULL, 0,
13264
15
              NULL, HFILL }
13265
15
        },
13266
15
        { &hf_mbim_nrtcws_info_wlan_safe_rx_min,
13267
15
            { "WLAN Safe Rx Min", "mbim.control.nrtcws_info.wlan_safe_rx_min",
13268
15
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13269
15
              NULL, HFILL }
13270
15
        },
13271
15
        { &hf_mbim_nrtcws_info_wlan_safe_rx_max,
13272
15
            { "WLAN Safe Rx Max", "mbim.control.nrtcws_info.wlan_safe_rx_max",
13273
15
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13274
15
              NULL, HFILL }
13275
15
        },
13276
15
        { &hf_mbim_nrtcws_info_bt_safe_rx_min,
13277
15
            { "BT Safe Rx Min", "mbim.control.nrtcws_info.bt_safe_rx_min",
13278
15
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13279
15
              NULL, HFILL }
13280
15
        },
13281
15
        { &hf_mbim_nrtcws_info_bt_safe_rx_max,
13282
15
            { "BT Safe Rx Max", "mbim.control.nrtcws_info.bt_safe_rx_max",
13283
15
               FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_mhz), 0,
13284
15
              NULL, HFILL }
13285
15
        },
13286
15
        { &hf_mbim_nrtcws_info_lte_sps_period,
13287
15
            { "LTE SPS Periodicity", "mbim.control.nrtcws_info.lte_sps_period",
13288
15
               FT_UINT16, BASE_DEC, NULL, 0,
13289
15
              NULL, HFILL }
13290
15
        },
13291
15
        { &hf_mbim_nrtcws_info_lte_sps_duration,
13292
15
            { "LTE SPS Duration", "mbim.control.nrtcws_info.lte_sps_duration",
13293
15
               FT_UINT16, BASE_DEC, NULL, 0,
13294
15
              NULL, HFILL }
13295
15
        },
13296
15
        { &hf_mbim_nrtcws_info_lte_sps_initial_offset,
13297
15
            { "LTE SPS Initial Offset", "mbim.control.nrtcws_info.lte_sps_initial_offset",
13298
15
               FT_UINT16, BASE_DEC, NULL, 0,
13299
15
              NULL, HFILL }
13300
15
        },
13301
15
        { &hf_mbim_usbprofile_cmd_length,
13302
15
            { "Length", "mbim.control.usbprofile_cmd.length",
13303
15
               FT_UINT32, BASE_DEC, NULL, 0,
13304
15
              NULL, HFILL }
13305
15
        },
13306
15
        { &hf_mbim_usbprofile_cmd_buffer,
13307
15
            { "Buffer", "mbim.control.usbprofile_cmd.buffer",
13308
15
               FT_STRING, BASE_NONE, NULL, 0,
13309
15
              NULL, HFILL }
13310
15
        },
13311
15
        { &hf_mbim_usbprofile_rsp_length,
13312
15
            { "Length", "mbim.control.usbprofile_rsp.length",
13313
15
               FT_UINT32, BASE_DEC, NULL, 0,
13314
15
              NULL, HFILL }
13315
15
        },
13316
15
        { &hf_mbim_usbprofile_rsp_buffer,
13317
15
            { "Buffer", "mbim.control.usbprofile_rsp.buffer",
13318
15
               FT_STRING, BASE_NONE, NULL, 0,
13319
15
              NULL, HFILL }
13320
15
        },
13321
15
        { &hf_mbim_ciq_set_mode,
13322
15
            { "Mode", "mbim.control.ciq_set.mode",
13323
15
               FT_UINT32, BASE_DEC, NULL, 0,
13324
15
              NULL, HFILL }
13325
15
        },
13326
15
        { &hf_mbim_ciq_set_debug_info_size,
13327
15
            { "Debug Info Size", "mbim.control.ciq_set.debug_info.size",
13328
15
               FT_UINT32, BASE_DEC, NULL, 0,
13329
15
              NULL, HFILL }
13330
15
        },
13331
15
        { &hf_mbim_ciq_set_debug_info,
13332
15
            { "Debug Info", "mbim.control.ciq_set.debug_info",
13333
15
               FT_STRING, BASE_NONE, NULL, 0,
13334
15
              NULL, HFILL }
13335
15
        },
13336
15
        { &hf_mbim_ciq_info_mode,
13337
15
            { "Mode", "mbim.control.ciq_info.mode",
13338
15
               FT_UINT32, BASE_DEC, NULL, 0,
13339
15
              NULL, HFILL }
13340
15
        },
13341
15
        { &hf_mbim_atds_signal_info_rssi,
13342
15
            { "RSSI", "mbim.control.atds_signal_info.rssi",
13343
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
13344
15
              NULL, HFILL }
13345
15
        },
13346
15
        { &hf_mbim_atds_signal_info_ber,
13347
15
            { "BER", "mbim.control.atds_signal_info.ber",
13348
15
               FT_UINT32, BASE_DEC, VALS(mbim_ber_vals), 0,
13349
15
              NULL, HFILL }
13350
15
        },
13351
15
        { &hf_mbim_atds_signal_info_rscp,
13352
15
            { "RSCP", "mbim.control.atds_signal_info.rscp",
13353
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rscp_fmt), 0,
13354
15
              NULL, HFILL }
13355
15
        },
13356
15
        { &hf_mbim_atds_signal_info_ecno,
13357
15
            { "Ec/No", "mbim.control.atds_signal_info.ecno",
13358
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_ecno_fmt), 0,
13359
15
              NULL, HFILL }
13360
15
        },
13361
15
        { &hf_mbim_atds_signal_info_rsrq,
13362
15
            { "RSRQ", "mbim.control.atds_signal_info.rsrq",
13363
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrq_fmt), 0,
13364
15
              NULL, HFILL }
13365
15
        },
13366
15
        { &hf_mbim_atds_signal_info_rsrp,
13367
15
            { "RSRP", "mbim.control.atds_signal_info.rsrp",
13368
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rsrp_fmt), 0,
13369
15
              NULL, HFILL }
13370
15
        },
13371
15
        { &hf_mbim_atds_signal_info_rssnr,
13372
15
            { "RS SNR", "mbim.control.atds_signal_info.rssnr",
13373
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssnr_fmt), 0,
13374
15
              NULL, HFILL }
13375
15
        },
13376
15
        { &hf_mbim_atds_location_info_lac,
13377
15
            { "Location Area Code", "mbim.control.atds_location_info.lac",
13378
15
               FT_UINT32, BASE_HEX_DEC, NULL, 0,
13379
15
              NULL, HFILL }
13380
15
        },
13381
15
        { &hf_mbim_atds_location_info_tac,
13382
15
            { "Tracking Area Code", "mbim.control.atds_location_info.tac",
13383
15
               FT_UINT32, BASE_HEX_DEC, NULL, 0,
13384
15
              NULL, HFILL }
13385
15
        },
13386
15
        { &hf_mbim_atds_location_info_cellid,
13387
15
            { "Cell Identity", "mbim.control.atds_location_info.cellid",
13388
15
               FT_UINT32, BASE_HEX_DEC, NULL, 0,
13389
15
              NULL, HFILL }
13390
15
        },
13391
15
        { &hf_mbim_atds_operator_provider_id_offset,
13392
15
            { "Provider Id Offset", "mbim.control.atds_operator.provider_id_offset",
13393
15
               FT_UINT32, BASE_DEC, NULL, 0,
13394
15
              NULL, HFILL }
13395
15
        },
13396
15
        { &hf_mbim_atds_operator_provider_id_size,
13397
15
            { "Provider Id Size", "mbim.control.atds_operator.provider_id_size",
13398
15
               FT_UINT32, BASE_DEC, NULL, 0,
13399
15
              NULL, HFILL }
13400
15
        },
13401
15
        { &hf_mbim_atds_operator_provider_state,
13402
15
            { "Provider State", "mbim.control.atds_operator.provider_state",
13403
15
               FT_UINT32, BASE_HEX, NULL, 0,
13404
15
              NULL, HFILL }
13405
15
        },
13406
15
        { &hf_mbim_atds_operator_provider_name_offset,
13407
15
            { "Provider Name Offset", "mbim.control.atds_operator.provider_name_offset",
13408
15
               FT_UINT32, BASE_DEC, NULL, 0,
13409
15
              NULL, HFILL }
13410
15
        },
13411
15
        { &hf_mbim_atds_operator_provider_name_size,
13412
15
            { "Provider Name Size", "mbim.control.atds_operator.provider_name_size",
13413
15
               FT_UINT32, BASE_DEC, NULL, 0,
13414
15
              NULL, HFILL }
13415
15
        },
13416
15
        { &hf_mbim_atds_operator_plmn_mode,
13417
15
            { "PLMN Mode", "mbim.control.atds_operator.plmn_mode",
13418
15
               FT_UINT32, BASE_DEC, VALS(mbim_atds_operator_plmn_mode_vals), 0,
13419
15
              NULL, HFILL }
13420
15
        },
13421
15
        { &hf_mbim_atds_operator_rssi,
13422
15
            { "RSSI", "mbim.control.atds_operator.rssi",
13423
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_rssi_fmt), 0,
13424
15
              NULL, HFILL }
13425
15
        },
13426
15
        { &hf_mbim_atds_operator_error_rate,
13427
15
            { "Error Rate", "mbim.control.atds_operator.error_rate",
13428
15
               FT_UINT32, BASE_DEC, VALS(mbim_error_rate_vals), 0,
13429
15
              NULL, HFILL }
13430
15
        },
13431
15
        { &hf_mbim_atds_operator_provider_id,
13432
15
            { "Provider Id", "mbim.control.atds_operator.provider_id",
13433
15
               FT_STRING, BASE_NONE, NULL, 0,
13434
15
              NULL, HFILL }
13435
15
        },
13436
15
        { &hf_mbim_atds_operator_provider_name,
13437
15
            { "Provider Name", "mbim.control.atds_operator.provider_name",
13438
15
               FT_STRING, BASE_NONE, NULL, 0,
13439
15
              NULL, HFILL }
13440
15
        },
13441
15
        { &hf_mbim_atds_operators_elem_count,
13442
15
            { "Element Count", "mbim.control.atds_operators.elem_count",
13443
15
               FT_UINT32, BASE_DEC, NULL, 0,
13444
15
              NULL, HFILL }
13445
15
        },
13446
15
        { &hf_mbim_atds_operators_operator_offset,
13447
15
            { "Provider Offset", "mbim.control.atds_operators.provider_offset",
13448
15
               FT_UINT32, BASE_DEC, NULL, 0,
13449
15
              NULL, HFILL }
13450
15
        },
13451
15
        { &hf_mbim_atds_operators_operator_size,
13452
15
            { "Provider Size", "mbim.control.atds_operators.provider_size",
13453
15
               FT_UINT32, BASE_DEC, NULL, 0,
13454
15
              NULL, HFILL }
13455
15
        },
13456
15
        { &hf_mbim_atds_rat_info_mode,
13457
15
            { "Mode", "mbim.control.atds_rat_info.mode",
13458
15
               FT_UINT32, BASE_DEC, VALS(mbim_adts_rat_info_mode_vals), 0,
13459
15
              NULL, HFILL }
13460
15
        },
13461
15
        { &hf_mbim_atds_projection_table_type,
13462
15
            { "Type", "mbim.control.atds_projection_table.type",
13463
15
               FT_UINT32, BASE_DEC, VALS(mbim_adts_projection_table_type_vals), 0,
13464
15
              NULL, HFILL }
13465
15
        },
13466
15
        { &hf_mbim_atds_projection_table_bar5min,
13467
15
            { "Bar5 Min", "mbim.control.atds_projection_table.bar5min",
13468
15
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13469
15
              NULL, HFILL }
13470
15
        },
13471
15
        { &hf_mbim_atds_projection_table_a5,
13472
15
            { "A5", "mbim.control.atds_projection_table.a5",
13473
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13474
15
              NULL, HFILL }
13475
15
        },
13476
15
        { &hf_mbim_atds_projection_table_b5,
13477
15
            { "B5", "mbim.control.atds_projection_table.b5",
13478
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13479
15
              NULL, HFILL }
13480
15
        },
13481
15
        { &hf_mbim_atds_projection_table_bar4min,
13482
15
            { "Bar4 Min", "mbim.control.atds_projection_table.bar4min",
13483
15
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13484
15
              NULL, HFILL }
13485
15
        },
13486
15
        { &hf_mbim_atds_projection_table_a4,
13487
15
            { "A4", "mbim.control.atds_projection_table.a4",
13488
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13489
15
              NULL, HFILL }
13490
15
        },
13491
15
        { &hf_mbim_atds_projection_table_b4,
13492
15
            { "B4", "mbim.control.atds_projection_table.b4",
13493
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13494
15
              NULL, HFILL }
13495
15
        },
13496
15
        { &hf_mbim_atds_projection_table_bar3min,
13497
15
            { "Bar3 Min", "mbim.control.atds_projection_table.bar3min",
13498
15
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13499
15
              NULL, HFILL }
13500
15
        },
13501
15
        { &hf_mbim_atds_projection_table_a3,
13502
15
            { "A3", "mbim.control.atds_projection_table.a3",
13503
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13504
15
              NULL, HFILL }
13505
15
        },
13506
15
        { &hf_mbim_atds_projection_table_b3,
13507
15
            { "B3", "mbim.control.atds_projection_table.b3",
13508
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13509
15
              NULL, HFILL }
13510
15
        },
13511
15
        { &hf_mbim_atds_projection_table_bar2min,
13512
15
            { "Bar2 Min", "mbim.control.atds_projection_table.bar2min",
13513
15
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13514
15
              NULL, HFILL }
13515
15
        },
13516
15
        { &hf_mbim_atds_projection_table_a2,
13517
15
            { "A2", "mbim.control.atds_projection_table.a2",
13518
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13519
15
              NULL, HFILL }
13520
15
        },
13521
15
        { &hf_mbim_atds_projection_table_b2,
13522
15
            { "B2", "mbim.control.atds_projection_table.b2",
13523
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13524
15
              NULL, HFILL }
13525
15
        },
13526
15
        { &hf_mbim_atds_projection_table_bar1min,
13527
15
            { "Bar1 Min", "mbim.control.atds_projection_table.bar1min",
13528
15
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13529
15
              NULL, HFILL }
13530
15
        },
13531
15
        { &hf_mbim_atds_projection_table_a1,
13532
15
            { "A1", "mbim.control.atds_projection_table.a1",
13533
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13534
15
              NULL, HFILL }
13535
15
        },
13536
15
        { &hf_mbim_atds_projection_table_b1,
13537
15
            { "B1", "mbim.control.atds_projection_table.b1",
13538
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13539
15
              NULL, HFILL }
13540
15
        },
13541
15
        { &hf_mbim_atds_projection_table_bar0min,
13542
15
            { "Bar0 Min", "mbim.control.atds_projection_table.bar0min",
13543
15
               FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0,
13544
15
              NULL, HFILL }
13545
15
        },
13546
15
        { &hf_mbim_atds_projection_table_a0,
13547
15
            { "A0", "mbim.control.atds_projection_table.a0",
13548
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13549
15
              NULL, HFILL }
13550
15
        },
13551
15
        { &hf_mbim_atds_projection_table_b0,
13552
15
            { "B0", "mbim.control.atds_projection_table.b0",
13553
15
               FT_UINT32, BASE_CUSTOM, CF_FUNC(mbim_projection_table_coeff_fmt), 0,
13554
15
              NULL, HFILL }
13555
15
        },
13556
15
        { &hf_mbim_atds_projection_tables_elem_count,
13557
15
            { "Element Count", "mbim.control.atds_projection_tables.elem_count",
13558
15
               FT_UINT32, BASE_DEC, NULL, 0,
13559
15
              NULL, HFILL }
13560
15
        },
13561
15
        { &hf_mbim_atds_projection_tables_projection_table_offset,
13562
15
            { "Projection Table Offset", "mbim.control.atds_projection_tables.projection_table_offset",
13563
15
               FT_UINT32, BASE_DEC, NULL, 0,
13564
15
              NULL, HFILL }
13565
15
        },
13566
15
        { &hf_mbim_atds_projection_tables_projection_table_size,
13567
15
            { "Projection Table Size", "mbim.control.atds_projection_tables.projection_table_size",
13568
15
               FT_UINT32, BASE_DEC, NULL, 0,
13569
15
              NULL, HFILL }
13570
15
        },
13571
15
        { &hf_mbim_multiflow_caps_info_control_caps,
13572
15
            { "Control Caps", "mbim.control.multiflow_caps_info.control_caps",
13573
15
               FT_UINT32, BASE_HEX, NULL, 0,
13574
15
              NULL, HFILL }
13575
15
        },
13576
15
        { &hf_mbim_multiflow_caps_info_control_caps_uplink,
13577
15
            { "Uplink", "mbim.control.multiflow_caps_info.control_caps.uplink",
13578
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000001,
13579
15
              NULL, HFILL }
13580
15
        },
13581
15
        { &hf_mbim_multiflow_caps_info_control_caps_downlink,
13582
15
            { "Downlink", "mbim.control.multiflow_caps_info.control_caps.downlink",
13583
15
               FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x00000002,
13584
15
              NULL, HFILL }
13585
15
        },
13586
15
        { &hf_mbim_set_multiflow_state_state,
13587
15
            { "State", "mbim.control.set_multiflow_state.state",
13588
15
               FT_UINT32, BASE_DEC, VALS(mbim_multiflow_state_vals), 0,
13589
15
              NULL, HFILL }
13590
15
        },
13591
15
        { &hf_mbim_multiflow_state_info_state,
13592
15
            { "State", "mbim.control.multiflow_state_info.state",
13593
15
               FT_UINT32, BASE_DEC, VALS(mbim_multiflow_state_vals), 0,
13594
15
              NULL, HFILL }
13595
15
        },
13596
15
        { &hf_mbim_multiflow_tft_info_session_id,
13597
15
            { "Session Id", "mbim.control.multiflow_tft_info.session_id",
13598
15
               FT_UINT32, BASE_DEC, NULL, 0,
13599
15
              NULL, HFILL }
13600
15
        },
13601
15
        { &hf_mbim_multiflow_tft_info_elem_count,
13602
15
            { "Element Count", "mbim.control.multiflow_tft_info.elem_count",
13603
15
               FT_UINT32, BASE_DEC, NULL, 0,
13604
15
              NULL, HFILL }
13605
15
        },
13606
15
        { &hf_mbim_multiflow_tft_info_tft_list_offset,
13607
15
            { "TFT List Offset", "mbim.control.multiflow_tft_info.tft_list_offset",
13608
15
               FT_UINT32, BASE_DEC, NULL, 0,
13609
15
              NULL, HFILL }
13610
15
        },
13611
15
        { &hf_mbim_multiflow_tft_info_tft_list_size,
13612
15
            { "TFT List Size", "mbim.control.multiflow_tft_info.tft_list_size",
13613
15
               FT_UINT32, BASE_DEC, NULL, 0,
13614
15
              NULL, HFILL }
13615
15
        },
13616
15
        { &hf_mbim_set_ms_provisioned_context_v2_operation,
13617
15
            { "Operation", "mbim.control.set_ms_provisioned_context_v2.operation",
13618
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_operations_vals), 0,
13619
15
              NULL, HFILL }
13620
15
        },
13621
15
        { &hf_mbim_set_ms_provisioned_context_v2_ip_type,
13622
15
            { "IP Type", "mbim.control.set_ms_provisioned_context_v2.ip_type",
13623
15
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
13624
15
              NULL, HFILL }
13625
15
        },
13626
15
        { &hf_mbim_set_ms_provisioned_context_v2_enable,
13627
15
            { "Enable", "mbim.control.set_ms_provisioned_context_v2.enable",
13628
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_enable_vals), 0,
13629
15
              NULL, HFILL }
13630
15
        },
13631
15
        { &hf_mbim_set_ms_provisioned_context_v2_roaming,
13632
15
            { "Roaming", "mbim.control.set_ms_provisioned_context_v2.roaming",
13633
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_roaming_control_vals), 0,
13634
15
              NULL, HFILL }
13635
15
        },
13636
15
        { &hf_mbim_set_ms_provisioned_context_v2_media_type,
13637
15
            { "Media Type", "mbim.control.set_ms_provisioned_context_v2.media_type",
13638
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_media_type_vals), 0,
13639
15
              NULL, HFILL }
13640
15
        },
13641
15
        { &hf_mbim_set_ms_provisioned_context_v2_source,
13642
15
            { "Source", "mbim.control.set_ms_provisioned_context_v2.source",
13643
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_source_vals), 0,
13644
15
              NULL, HFILL }
13645
15
        },
13646
15
        { &hf_mbim_set_ms_provisioned_context_v2_access_string,
13647
15
            { "Access String", "mbim.control.set_ms_provisioned_context_v2.access_string",
13648
15
               FT_STRING, BASE_NONE, NULL, 0,
13649
15
              NULL, HFILL }
13650
15
        },
13651
15
        { &hf_mbim_set_ms_provisioned_context_v2_access_string_offset,
13652
15
            { "Access String Offset", "mbim.control.set_ms_provisioned_context_v2.access_string_offset",
13653
15
               FT_UINT32, BASE_DEC, NULL, 0,
13654
15
              NULL, HFILL }
13655
15
        },
13656
15
        { &hf_mbim_set_ms_provisioned_context_v2_access_string_size,
13657
15
            { "Access String Size", "mbim.control.set_ms_provisioned_context_v2.access_string_size",
13658
15
               FT_UINT32, BASE_DEC, NULL, 0,
13659
15
              NULL, HFILL }
13660
15
        },
13661
15
        { &hf_mbim_set_ms_provisioned_context_v2_user_name,
13662
15
            { "User Name", "mbim.control.set_ms_provisioned_context_v2.user_name",
13663
15
               FT_STRING, BASE_NONE, NULL, 0,
13664
15
              NULL, HFILL }
13665
15
        },
13666
15
        { &hf_mbim_set_ms_provisioned_context_v2_user_name_offset,
13667
15
            { "User Name Offset", "mbim.control.set_ms_provisioned_context_v2.user_name_offset",
13668
15
               FT_UINT32, BASE_DEC, NULL, 0,
13669
15
              NULL, HFILL }
13670
15
        },
13671
15
        { &hf_mbim_set_ms_provisioned_context_v2_user_name_size,
13672
15
            { "User Name Size", "mbim.control.set_ms_provisioned_context_v2.user_name_size",
13673
15
               FT_UINT32, BASE_DEC, NULL, 0,
13674
15
              NULL, HFILL }
13675
15
        },
13676
15
        { &hf_mbim_set_ms_provisioned_context_v2_password,
13677
15
            { "Password", "mbim.control.set_ms_provisioned_context_v2.password",
13678
15
               FT_STRING, BASE_NONE, NULL, 0,
13679
15
              NULL, HFILL }
13680
15
        },
13681
15
        { &hf_mbim_set_ms_provisioned_context_v2_password_offset,
13682
15
            { "Password Offset", "mbim.control.set_ms_provisioned_context_v2.password_offset",
13683
15
               FT_UINT32, BASE_DEC, NULL, 0,
13684
15
              NULL, HFILL }
13685
15
        },
13686
15
        { &hf_mbim_set_ms_provisioned_context_v2_password_size,
13687
15
            { "Password Size", "mbim.control.set_ms_provisioned_context_v2.password_size",
13688
15
               FT_UINT32, BASE_DEC, NULL, 0,
13689
15
              NULL, HFILL }
13690
15
        },
13691
15
        { &hf_mbim_set_ms_provisioned_context_v2_compression,
13692
15
            { "Compression", "mbim.control.set_ms_provisioned_context_v2.compression",
13693
15
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
13694
15
              NULL, HFILL }
13695
15
        },
13696
15
        { &hf_mbim_set_ms_provisioned_context_v2_auth_protocol,
13697
15
            { "Auth Protocol", "mbim.control.set_ms_provisioned_context_v2.auth_protocol",
13698
15
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
13699
15
              NULL, HFILL }
13700
15
        },
13701
15
        { &hf_mbim_ms_provisioned_context_info_v2_elem_count,
13702
15
            { "Element Count", "mbim.control.ms_provisioned_context_info_v2.auth_protocol",
13703
15
               FT_UINT32, BASE_DEC, NULL, 0,
13704
15
              NULL, HFILL }
13705
15
        },
13706
15
        { &hf_mbim_ms_provisioned_context_info_v2_list_offset,
13707
15
            { "Item Offset", "mbim.control.ms_provisioned_context_info_v2.list_offset",
13708
15
               FT_UINT32, BASE_DEC, NULL, 0,
13709
15
              NULL, HFILL }
13710
15
        },
13711
15
        { &hf_mbim_ms_provisioned_context_info_v2_list_size,
13712
15
            { "Item Size", "mbim.control.ms_provisioned_context_info_v2.list_size",
13713
15
               FT_UINT32, BASE_DEC, NULL, 0,
13714
15
              NULL, HFILL }
13715
15
        },
13716
15
        { &hf_mbim_ms_provisioned_context_info_v2_context_id,
13717
15
            { "Context ID", "mbim.control.ms_provisioned_context_info_v2.context_id",
13718
15
               FT_UINT32, BASE_DEC, NULL, 0,
13719
15
              NULL, HFILL }
13720
15
        },
13721
15
        { &hf_mbim_ms_network_blacklist_state_sim_provider_actuated,
13722
15
            { "SIM Provide Actuated", "mbim.control.ms_provisioned_context_info_v2.sim_provider_actuated",
13723
15
               FT_BOOLEAN, 32, TFS(&tfs_activated_deactivated), 0x00000001,
13724
15
              NULL, HFILL }
13725
15
        },
13726
15
        { &hf_mbim_ms_network_blacklist_state_network_provider_actuated,
13727
15
            { "Network Provider Actuated", "mbim.control.ms_provisioned_context_info_v2.network_provider_actuated",
13728
15
               FT_BOOLEAN, 32, TFS(&tfs_activated_deactivated), 0x00000002,
13729
15
              NULL, HFILL }
13730
15
        },
13731
15
        { &hf_mbim_ms_network_blacklist_info_blacklist_state,
13732
15
            { "Blacklist State", "mbim.control.mbim_ms_network_blacklist_info.blacklist_state",
13733
15
               FT_UINT32, BASE_DEC, NULL, 0,
13734
15
              NULL, HFILL }
13735
15
        },
13736
15
        { &hf_mbim_ms_network_blacklist_info_elem_count,
13737
15
            { "Element Count", "mbim.control.mbim_ms_network_blacklist_info.elem_count",
13738
15
               FT_UINT32, BASE_DEC, NULL, 0,
13739
15
              NULL, HFILL }
13740
15
        },
13741
15
        { &hf_mbim_ms_network_blacklist_info_list_offset,
13742
15
            { "Provider Blacklist Offset", "mbim.control.mbim_ms_network_blacklist_info.item_offset",
13743
15
               FT_UINT32, BASE_DEC, NULL, 0,
13744
15
              NULL, HFILL }
13745
15
        },
13746
15
        { &hf_mbim_ms_network_blacklist_info_list_size,
13747
15
            { "Provider Blacklist Size", "mbim.control.mbim_ms_network_blacklist_info.item_size",
13748
15
               FT_UINT32, BASE_DEC, NULL, 0,
13749
15
              NULL, HFILL }
13750
15
        },
13751
15
        { &hf_mbim_ms_network_blacklist_provider_mcc,
13752
15
            { "MCC", "mbim.control.ms_network_blacklist_provider.mcc",
13753
15
               FT_UINT32, BASE_DEC, NULL, 0,
13754
15
              NULL, HFILL }
13755
15
        },
13756
15
        { &hf_mbim_ms_network_blacklist_provider_mnc,
13757
15
            { "MNC", "mbim.control.ms_network_blacklist_provider.mnc",
13758
15
               FT_UINT32, BASE_DEC, NULL, 0,
13759
15
              NULL, HFILL }
13760
15
        },
13761
15
        { &hf_mbim_ms_network_blacklist_provider_type,
13762
15
            { "Blacklist Type", "mbim.control.ms_network_blacklist_provider.blacklist_type",
13763
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_network_blacklist_type_vals), 0,
13764
15
              NULL, HFILL }
13765
15
        },
13766
15
        { &hf_mbim_sys_caps_info_number_of_executors,
13767
15
            { "Number of Executors", "mbim.control.sys_caps_info.number_of_executors",
13768
15
               FT_UINT32, BASE_DEC, NULL, 0,
13769
15
              NULL, HFILL }
13770
15
        },
13771
15
        { &hf_mbim_sys_caps_info_number_of_slots,
13772
15
            { "Number of Slots", "mbim.control.sys_caps_info.number_of_slots",
13773
15
               FT_UINT32, BASE_DEC, NULL, 0,
13774
15
              NULL, HFILL }
13775
15
        },
13776
15
        { &hf_mbim_sys_caps_info_concurrency,
13777
15
            { "Concurrency", "mbim.control.sys_caps_info.concurrency",
13778
15
               FT_UINT32, BASE_DEC, NULL, 0,
13779
15
              NULL, HFILL }
13780
15
        },
13781
15
        { &hf_mbim_sys_caps_info_modem_id,
13782
15
            { "Modem Id", "mbim.control.sys_caps_info.modem_id",
13783
15
               FT_UINT64, BASE_HEX, NULL, 0,
13784
15
              NULL, HFILL }
13785
15
        },
13786
15
        { &hf_mbim_ms_set_lte_attach_operation,
13787
15
            { "Operation", "mbim.control.set_lte_attach.operation",
13788
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_set_lte_attach_operations_vals), 0,
13789
15
              NULL, HFILL }
13790
15
        },
13791
15
        { &hf_mbim_ms_lte_attach_context_count,
13792
15
            { "Context Count", "mbim.control.ms_lte_attach_context.count",
13793
15
               FT_UINT32, BASE_DEC, NULL, 0,
13794
15
              NULL, HFILL }
13795
15
        },
13796
15
        { &hf_mbim_ms_lte_attach_context_offset,
13797
15
            { "Context Offset", "mbim.control.ms_lte_attach_context.offset",
13798
15
               FT_UINT32, BASE_DEC, NULL, 0,
13799
15
              NULL, HFILL }
13800
15
        },
13801
15
        { &hf_mbim_ms_lte_attach_context_size,
13802
15
            { "Context Size", "mbim.control.ms_lte_attach_context.size",
13803
15
               FT_UINT32, BASE_DEC, NULL, 0,
13804
15
              NULL, HFILL }
13805
15
        },
13806
15
        { &hf_mbim_ms_lte_attach_context_ip_type,
13807
15
            { "IP Type", "mbim.control.ms_lte_attach_context.ip_type",
13808
15
               FT_UINT32, BASE_DEC, VALS(mbim_context_ip_type_vals), 0,
13809
15
              NULL, HFILL }
13810
15
        },
13811
15
        { &hf_mbim_ms_lte_attach_context_roaming,
13812
15
            { "Roaming", "mbim.control.ms_lte_attach_context.roaming",
13813
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_roaming_control_vals), 0,
13814
15
              NULL, HFILL }
13815
15
        },
13816
15
        { &hf_mbim_ms_lte_attach_context_source,
13817
15
            { "Source", "mbim.control.ms_lte_attach_context.source",
13818
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_context_source_vals), 0,
13819
15
              NULL, HFILL }
13820
15
        },
13821
15
        { &hf_mbim_ms_lte_attach_context_access_string,
13822
15
            { "Access String", "mbim.control.ms_lte_attach_context.access_string",
13823
15
               FT_STRING, BASE_NONE, NULL, 0,
13824
15
              NULL, HFILL }
13825
15
        },
13826
15
        { &hf_mbim_ms_lte_attach_context_access_string_offset,
13827
15
            { "Access String Offset", "mbim.control.ms_lte_attach_context.access_string_offset",
13828
15
               FT_UINT32, BASE_DEC, NULL, 0,
13829
15
              NULL, HFILL }
13830
15
        },
13831
15
        { &hf_mbim_ms_lte_attach_context_access_string_size,
13832
15
            { "Access String Size", "mbim.control.ms_lte_attach_context.access_string_size",
13833
15
               FT_UINT32, BASE_DEC, NULL, 0,
13834
15
              NULL, HFILL }
13835
15
        },
13836
15
        { &hf_mbim_ms_lte_attach_context_user_name,
13837
15
            { "User Name", "mbim.control.ms_lte_attach_context.user_name",
13838
15
               FT_STRING, BASE_NONE, NULL, 0,
13839
15
              NULL, HFILL }
13840
15
        },
13841
15
        { &hf_mbim_ms_lte_attach_context_user_name_offset,
13842
15
            { "User Name Offset", "mbim.control.ms_lte_attach_context.user_name_offset",
13843
15
               FT_UINT32, BASE_DEC, NULL, 0,
13844
15
              NULL, HFILL }
13845
15
        },
13846
15
        { &hf_mbim_ms_lte_attach_context_user_name_size,
13847
15
            { "User Name Size", "mbim.control.ms_lte_attach_context.user_name_size",
13848
15
               FT_UINT32, BASE_DEC, NULL, 0,
13849
15
              NULL, HFILL }
13850
15
        },
13851
15
        { &hf_mbim_ms_lte_attach_context_password,
13852
15
            { "Password", "mbim.control.ms_lte_attach_context.password",
13853
15
               FT_STRING, BASE_NONE, NULL, 0,
13854
15
              NULL, HFILL }
13855
15
        },
13856
15
        { &hf_mbim_ms_lte_attach_context_password_offset,
13857
15
            { "Password Offset", "mbim.control.ms_lte_attach_context.password_offset",
13858
15
               FT_UINT32, BASE_DEC, NULL, 0,
13859
15
              NULL, HFILL }
13860
15
        },
13861
15
        { &hf_mbim_ms_lte_attach_context_password_size,
13862
15
            { "Password Size", "mbim.control.ms_lte_attach_context.password_size",
13863
15
               FT_UINT32, BASE_DEC, NULL, 0,
13864
15
              NULL, HFILL }
13865
15
        },
13866
15
        { &hf_mbim_ms_lte_attach_context_compression,
13867
15
            { "Compression", "mbim.control.ms_lte_attach_context.compression",
13868
15
               FT_UINT32, BASE_DEC, VALS(mbim_compression_vals), 0,
13869
15
              NULL, HFILL }
13870
15
        },
13871
15
        { &hf_mbim_ms_lte_attach_context_auth_protocol,
13872
15
            { "Auth Protocol", "mbim.control.ms_lte_attach_context.auth_protocol",
13873
15
               FT_UINT32, BASE_DEC, VALS(mbim_auth_protocol_vals), 0,
13874
15
              NULL, HFILL }
13875
15
        },
13876
15
        { &hf_mbim_ms_lte_attach_state,
13877
15
            { "Auth Protocol", "mbim.control.ms_lte_attach.state",
13878
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_lte_attach_state_vals), 0,
13879
15
              NULL, HFILL }
13880
15
        },
13881
15
        { &hf_mbim_ms_device_slot_mapping_info_map_count,
13882
15
            { "Map Count", "mbim.control.ms_device_slot_mapping_info.map_count",
13883
15
               FT_UINT32, BASE_DEC, NULL, 0,
13884
15
              NULL, HFILL }
13885
15
        },
13886
15
        { &hf_mbim_ms_device_slot_mapping_info_map_offset,
13887
15
            { "Slot Map Offset", "mbim.control.ms_device_slot_mapping_info.map_offset",
13888
15
               FT_UINT32, BASE_DEC, NULL, 0,
13889
15
              NULL, HFILL }
13890
15
        },
13891
15
        { &hf_mbim_ms_device_slot_mapping_info_map_size,
13892
15
            { "Slot Map Size", "mbim.control.ms_device_slot_mapping_info.map_size",
13893
15
               FT_UINT32, BASE_DEC, NULL, 0,
13894
15
              NULL, HFILL }
13895
15
        },
13896
15
        { &hf_mbim_ms_device_slot_mapping_info_executor_slot_index,
13897
15
            { "Slot Index", "mbim.control.ms_device_slot_mapping_info.slot_index",
13898
15
               FT_UINT32, BASE_DEC, NULL, 0,
13899
15
              NULL, HFILL }
13900
15
        },
13901
15
        { &hf_mbim_ms_slot_info_req_slot_index,
13902
15
            { "Slot Index", "mbim.control.ms_slot_info_req.slot_index",
13903
15
               FT_UINT32, BASE_DEC, NULL, 0,
13904
15
              NULL, HFILL }
13905
15
        },
13906
15
        { &hf_mbim_ms_slot_info_slot_index,
13907
15
            { "Slot Index", "mbim.control.ms_slot_info.slot_index",
13908
15
               FT_UINT32, BASE_DEC, NULL, 0,
13909
15
              NULL, HFILL }
13910
15
        },
13911
15
        { &hf_mbim_ms_slot_info_state,
13912
15
            { "State", "mbim.control.ms_slot_info.state",
13913
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_uiccslot_state_vals), 0,
13914
15
              NULL, HFILL }
13915
15
        },
13916
15
        { &hf_mbim_base_station_max_gsm_count,
13917
15
            { "Max GSM Count", "mbim.control.base_station.max_gsm_count",
13918
15
               FT_UINT32, BASE_DEC, NULL, 0,
13919
15
              NULL, HFILL }
13920
15
        },
13921
15
        { &hf_mbim_base_station_max_umts_count,
13922
15
            { "Max UMTS Count", "mbim.control.base_station.max_umts_count",
13923
15
               FT_UINT32, BASE_DEC, NULL, 0,
13924
15
              NULL, HFILL }
13925
15
        },
13926
15
        { &hf_mbim_base_station_max_td_scdma_count,
13927
15
            { "Max TD-SCDMA Count", "mbim.control.base_station.max_td_scdma_count",
13928
15
               FT_UINT32, BASE_DEC, NULL, 0,
13929
15
              NULL, HFILL }
13930
15
        },
13931
15
        { &hf_mbim_base_station_max_lte_count,
13932
15
            { "Max LTE Count", "mbim.control.base_station.max_lte_count",
13933
15
               FT_UINT32, BASE_DEC, NULL, 0,
13934
15
              NULL, HFILL }
13935
15
        },
13936
15
        { &hf_mbim_base_station_max_cdma_count,
13937
15
            { "Max CDMA Count", "mbim.control.base_station.max_cdma_count",
13938
15
               FT_UINT32, BASE_DEC, NULL, 0,
13939
15
              NULL, HFILL }
13940
15
        },
13941
15
        { &hf_mbim_base_station_max_nr_count,
13942
15
            { "Max NR Count", "mbim.control.base_station.max_nr_count",
13943
15
               FT_UINT32, BASE_DEC, NULL, 0,
13944
15
              NULL, HFILL }
13945
15
        },
13946
15
        { &hf_mbim_base_station_provider_id_offset,
13947
15
            { "Provider Id Offset", "mbim.control.base_station.provider_id_offset",
13948
15
               FT_UINT32, BASE_DEC, NULL, 0,
13949
15
              NULL, HFILL }
13950
15
        },
13951
15
        { &hf_mbim_base_station_provider_id_size,
13952
15
            { "Provider Id Size", "mbim.control.base_station.provider_id_size",
13953
15
               FT_UINT32, BASE_DEC, NULL, 0,
13954
15
              NULL, HFILL }
13955
15
        },
13956
15
        { &hf_mbim_base_station_location_area_code,
13957
15
            { "Location Area Code", "mbim.control.base_station.location_area_code",
13958
15
               FT_UINT32, BASE_DEC, NULL, 0,
13959
15
              NULL, HFILL }
13960
15
        },
13961
15
        { &hf_mbim_base_station_cell_id,
13962
15
            { "Cell Id", "mbim.control.base_station.cell_id",
13963
15
               FT_UINT32, BASE_DEC, NULL, 0,
13964
15
              NULL, HFILL }
13965
15
        },
13966
15
        { &hf_mbim_base_station_timing_advance,
13967
15
            { "Timing Advance", "mbim.control.base_station.provider_timing_advance",
13968
15
               FT_UINT64, BASE_DEC, NULL, 0,
13969
15
              NULL, HFILL }
13970
15
        },
13971
15
        { &hf_mbim_base_station_arfcn,
13972
15
            { "ARFCN", "mbim.control.base_station.arfcn",
13973
15
               FT_UINT32, BASE_DEC, NULL, 0,
13974
15
              NULL, HFILL }
13975
15
        },
13976
15
        { &hf_mbim_base_station_base_station_id,
13977
15
            { "Base Station Id", "mbim.control.base_station.base_station_id",
13978
15
               FT_UINT32, BASE_DEC, NULL, 0,
13979
15
              NULL, HFILL }
13980
15
        },
13981
15
        { &hf_mbim_base_station_rx_level,
13982
15
            { "Rx Level", "mbim.control.base_station.rx_level",
13983
15
               FT_UINT32, BASE_DEC, NULL, 0,
13984
15
              NULL, HFILL }
13985
15
        },
13986
15
        { &hf_mbim_base_station_provider_id,
13987
15
            { "Provider Id", "mbim.control.base_station.provider_id",
13988
15
               FT_STRING, BASE_NONE, NULL, 0,
13989
15
              NULL, HFILL }
13990
15
        },
13991
15
        { &hf_mbim_base_station_frequency_info_ul,
13992
15
            { "Frequency Info Ul", "mbim.control.base_station.frequency_info_ul",
13993
15
               FT_UINT32, BASE_DEC, NULL, 0,
13994
15
              NULL, HFILL }
13995
15
        },
13996
15
        { &hf_mbim_base_station_frequency_info_dl,
13997
15
            { "Frequency Info Dl", "mbim.control.base_station.frequency_info_dl",
13998
15
               FT_UINT32, BASE_DEC, NULL, 0,
13999
15
              NULL, HFILL }
14000
15
        },
14001
15
        { &hf_mbim_base_station_frequency_info_nt,
14002
15
            { "Frequency Info Nt", "mbim.control.base_station.frequency_info_nt",
14003
15
               FT_UINT32, BASE_DEC, NULL, 0,
14004
15
              NULL, HFILL }
14005
15
        },
14006
15
        { &hf_mbim_base_station_uarfcn,
14007
15
            { "UARFCN", "mbim.control.base_station.uarfcn",
14008
15
               FT_UINT32, BASE_DEC, NULL, 0,
14009
15
              NULL, HFILL }
14010
15
        },
14011
15
        { &hf_mbim_base_station_primary_scrambling_code,
14012
15
            { "Primary Scrambling Code", "mbim.control.base_station.primary_scrambling_code",
14013
15
               FT_UINT32, BASE_DEC, NULL, 0,
14014
15
              NULL, HFILL }
14015
15
        },
14016
15
        { &hf_mbim_base_station_ecno,
14017
15
            { "EcNo", "mbim.control.base_station.ecno",
14018
15
               FT_UINT32, BASE_DEC, NULL, 0,
14019
15
              NULL, HFILL }
14020
15
        },
14021
15
        { &hf_mbim_base_station_rscp,
14022
15
            { "RSCP", "mbim.control.base_station.rscp",
14023
15
               FT_UINT32, BASE_DEC, NULL, 0,
14024
15
              NULL, HFILL }
14025
15
        },
14026
15
        { &hf_mbim_base_station_path_loss,
14027
15
            { "Path Loss", "mbim.control.base_station.path_loss",
14028
15
               FT_UINT32, BASE_DEC, NULL, 0,
14029
15
              NULL, HFILL }
14030
15
        },
14031
15
        { &hf_mbim_base_station_call_parameter,
14032
15
            { "Call Parameter", "mbim.control.base_station.call_parameter",
14033
15
               FT_UINT32, BASE_DEC, NULL, 0,
14034
15
              NULL, HFILL }
14035
15
        },
14036
15
        { &hf_mbim_base_station_earfcn,
14037
15
            { "EARFCN", "mbim.control.base_station.earfcn",
14038
15
               FT_UINT32, BASE_DEC, NULL, 0,
14039
15
              NULL, HFILL }
14040
15
        },
14041
15
        { &hf_mbim_base_station_physical_cell_id,
14042
15
            { "Physical Cell Id", "mbim.control.base_station.physical_cell_id",
14043
15
               FT_UINT32, BASE_DEC, NULL, 0,
14044
15
              NULL, HFILL }
14045
15
        },
14046
15
        { &hf_mbim_base_station_tac,
14047
15
            { "TAC", "mbim.control.base_station.tac",
14048
15
               FT_UINT32, BASE_DEC, NULL, 0,
14049
15
              NULL, HFILL }
14050
15
        },
14051
15
        { &hf_mbim_base_station_rsrp,
14052
15
            { "RSRP", "mbim.control.base_station.rsrp",
14053
15
               FT_UINT32, BASE_DEC, NULL, 0,
14054
15
              NULL, HFILL }
14055
15
        },
14056
15
        { &hf_mbim_base_station_rsrq,
14057
15
            { "RSRQ", "mbim.control.base_station.rsrq",
14058
15
               FT_UINT32, BASE_DEC, NULL, 0,
14059
15
              NULL, HFILL }
14060
15
        },
14061
15
        { &hf_mbim_base_station_serving_cell_flag,
14062
15
            { "Serving Cell Flag", "mbim.control.ms_slot_info.serving_cell_flag",
14063
15
               FT_UINT32, BASE_DEC, VALS(mbim_base_station_serving_cell_flag_vals), 0,
14064
15
              NULL, HFILL }
14065
15
        },
14066
15
        { &hf_mbim_base_station_nid,
14067
15
            { "NID", "mbim.control.base_station.nid",
14068
15
               FT_UINT32, BASE_DEC, NULL, 0,
14069
15
              NULL, HFILL }
14070
15
        },
14071
15
        { &hf_mbim_base_station_sid,
14072
15
            { "SID", "mbim.control.base_station.sid",
14073
15
               FT_UINT32, BASE_DEC, NULL, 0,
14074
15
              NULL, HFILL }
14075
15
        },
14076
15
        { &hf_mbim_base_station_base_latitude,
14077
15
            { "Base Latitude", "mbim.control.base_station.base_latitude",
14078
15
               FT_UINT32, BASE_DEC, NULL, 0,
14079
15
              NULL, HFILL }
14080
15
        },
14081
15
        { &hf_mbim_base_station_base_longitude,
14082
15
            { "Base Longitude", "mbim.control.base_station.base_longitude",
14083
15
               FT_UINT32, BASE_DEC, NULL, 0,
14084
15
              NULL, HFILL }
14085
15
        },
14086
15
        { &hf_mbim_base_station_ref_pn,
14087
15
            { "Ref PN", "mbim.control.base_station.ref_pn",
14088
15
               FT_UINT32, BASE_DEC, NULL, 0,
14089
15
              NULL, HFILL }
14090
15
        },
14091
15
        { &hf_mbim_base_station_gps_seconds,
14092
15
            { "GPS Seconds", "mbim.control.base_station.gps_seconds",
14093
15
               FT_UINT32, BASE_DEC, NULL, 0,
14094
15
              NULL, HFILL }
14095
15
        },
14096
15
        { &hf_mbim_base_station_pilot_strength,
14097
15
            { "Pilot Strength", "mbim.control.base_station.pilot_strength",
14098
15
               FT_UINT32, BASE_DEC, NULL, 0,
14099
15
              NULL, HFILL }
14100
15
        },
14101
15
        { &hf_mbim_base_station_nci,
14102
15
            { "NCI", "mbim.control.base_station.nci",
14103
15
               FT_UINT64, BASE_DEC, NULL, 0,
14104
15
              NULL, HFILL }
14105
15
        },
14106
15
        { &hf_mbim_base_station_sinr,
14107
15
            { "SINR", "mbim.control.base_station.sinr",
14108
15
               FT_UINT32, BASE_DEC, NULL, 0,
14109
15
              NULL, HFILL }
14110
15
        },
14111
15
        { &hf_mbim_base_station_cell_id_offset,
14112
15
            { "Cell Id Offset", "mbim.control.base_station.cell_id_offset",
14113
15
               FT_UINT32, BASE_DEC, NULL, 0,
14114
15
              NULL, HFILL }
14115
15
        },
14116
15
        { &hf_mbim_base_station_cell_id_size,
14117
15
            { "Cell Id Size", "mbim.control.base_station.cell_id_size",
14118
15
               FT_UINT32, BASE_DEC, NULL, 0,
14119
15
              NULL, HFILL }
14120
15
        },
14121
15
        { &hf_mbim_base_station_cell_id_string,
14122
15
            { "Cell Id", "mbim.control.ms_app_info.cell_id",
14123
15
               FT_STRING, BASE_NONE, NULL, 0,
14124
15
              NULL, HFILL }
14125
15
        },
14126
15
        { &hf_mbim_base_station_system_type,
14127
15
            { "System Type", "mbim.control.base_station.system_type",
14128
15
               FT_UINT32, BASE_DEC, NULL, 0,
14129
15
              NULL, HFILL }
14130
15
        },
14131
15
        { &hf_mbim_base_station_system_sub_type,
14132
15
            { "System Sub Type", "mbim.control.base_station.system_sub_type",
14133
15
               FT_UINT32, BASE_DEC, NULL, 0,
14134
15
              NULL, HFILL }
14135
15
        },
14136
15
        { &hf_mbim_base_station_gsm_serving_cell_offset,
14137
15
            { "GSM Serving Cell Offset", "mbim.control.base_station.gsm_serving_cell_offset",
14138
15
               FT_UINT32, BASE_DEC, NULL, 0,
14139
15
              NULL, HFILL }
14140
15
        },
14141
15
        { &hf_mbim_base_station_gsm_serving_cell_size,
14142
15
            { "GSM Serving Cell size", "mbim.control.base_station.gsm_serving_cell_size",
14143
15
               FT_UINT32, BASE_DEC, NULL, 0,
14144
15
              NULL, HFILL }
14145
15
        },
14146
15
        { &hf_mbim_base_station_umts_serving_cell_offset,
14147
15
            { "UMTS Serving Cell Offset", "mbim.control.base_station.umts_serving_cell_offset",
14148
15
               FT_UINT32, BASE_DEC, NULL, 0,
14149
15
              NULL, HFILL }
14150
15
        },
14151
15
        { &hf_mbim_base_station_umts_serving_cell_size,
14152
15
            { "UMTS Serving Cell Size", "mbim.control.base_station.umts_serving_cell_size",
14153
15
               FT_UINT32, BASE_DEC, NULL, 0,
14154
15
              NULL, HFILL }
14155
15
        },
14156
15
        { &hf_mbim_base_station_td_scdma_serving_cell_offset,
14157
15
            { "TD-SCDMA Serving Cell Offset", "mbim.control.base_station.td_scdma_serving_cell_offset",
14158
15
               FT_UINT32, BASE_DEC, NULL, 0,
14159
15
              NULL, HFILL }
14160
15
        },
14161
15
        { &hf_mbim_base_station_td_scdma_serving_cell_size,
14162
15
            { "TD-SCDMA Serving Cell Size", "mbim.control.base_station.td_scdma_serving_cell_size",
14163
15
               FT_UINT32, BASE_DEC, NULL, 0,
14164
15
              NULL, HFILL }
14165
15
        },
14166
15
        { &hf_mbim_base_station_lte_serving_cell_offset,
14167
15
            { "LTE Serving Cell Offset", "mbim.control.base_station.lte_serving_cell_offset",
14168
15
               FT_UINT32, BASE_DEC, NULL, 0,
14169
15
              NULL, HFILL }
14170
15
        },
14171
15
        { &hf_mbim_base_station_lte_serving_cell_size,
14172
15
            { "LTE Serving Cell Size", "mbim.control.base_station.lte_serving_cell_size",
14173
15
               FT_UINT32, BASE_DEC, NULL, 0,
14174
15
              NULL, HFILL }
14175
15
        },
14176
15
        { &hf_mbim_base_station_gsm_nmr_offset,
14177
15
            { "GSM NMR Offset", "mbim.control.base_station.gsm_nmr_offset",
14178
15
               FT_UINT32, BASE_DEC, NULL, 0,
14179
15
              NULL, HFILL }
14180
15
        },
14181
15
        { &hf_mbim_base_station_gsm_nmr_size,
14182
15
            { "GSM NMR Size", "mbim.control.base_station.gsm_nmr_size",
14183
15
               FT_UINT32, BASE_DEC, NULL, 0,
14184
15
              NULL, HFILL }
14185
15
        },
14186
15
        { &hf_mbim_base_station_umts_mrl_offset,
14187
15
            { "UMTS MRL Offset", "mbim.control.base_station.umts_mrl_offset",
14188
15
               FT_UINT32, BASE_DEC, NULL, 0,
14189
15
              NULL, HFILL }
14190
15
        },
14191
15
        { &hf_mbim_base_station_umts_mrl_size,
14192
15
            { "UMTS MRL Size", "mbim.control.base_station.umts_mrl_size",
14193
15
               FT_UINT32, BASE_DEC, NULL, 0,
14194
15
              NULL, HFILL }
14195
15
        },
14196
15
        { &hf_mbim_base_station_td_scdma_mrl_offset,
14197
15
            { "TD-SCDMA MRL Offset", "mbim.control.base_station.td_scdma_mrl_offset",
14198
15
               FT_UINT32, BASE_DEC, NULL, 0,
14199
15
              NULL, HFILL }
14200
15
        },
14201
15
        { &hf_mbim_base_station_td_scdma_mrl_size,
14202
15
            { "TD-SCDMA MRL Offset", "mbim.control.base_station.td_scdma_mrl_size",
14203
15
               FT_UINT32, BASE_DEC, NULL, 0,
14204
15
              NULL, HFILL }
14205
15
        },
14206
15
        { &hf_mbim_base_station_lte_mrl_offset,
14207
15
            { "LTE MRL Offset", "mbim.control.base_station.lte_mrl_offset",
14208
15
               FT_UINT32, BASE_DEC, NULL, 0,
14209
15
              NULL, HFILL }
14210
15
        },
14211
15
        { &hf_mbim_base_station_lte_mrl_size,
14212
15
            { "LTE MRL Size", "mbim.control.base_station.lte_mrl_size",
14213
15
               FT_UINT32, BASE_DEC, NULL, 0,
14214
15
              NULL, HFILL }
14215
15
        },
14216
15
        { &hf_mbim_base_station_cdma_mrl_offset,
14217
15
            { "CDMA MRL Offset", "mbim.control.base_station.cdma_mrl_offset",
14218
15
               FT_UINT32, BASE_DEC, NULL, 0,
14219
15
              NULL, HFILL }
14220
15
        },
14221
15
        { &hf_mbim_base_station_cdma_mrl_size,
14222
15
            { "CDMA MRL Size", "mbim.control.base_station.cdma_mrl_size",
14223
15
               FT_UINT32, BASE_DEC, NULL, 0,
14224
15
              NULL, HFILL }
14225
15
        },
14226
15
        { &hf_mbim_base_station_nr_serving_cell_offset,
14227
15
            { "NR Serving Cell Offset", "mbim.control.base_station.nr_serving_cell_offset",
14228
15
               FT_UINT32, BASE_DEC, NULL, 0,
14229
15
              NULL, HFILL }
14230
15
        },
14231
15
        { &hf_mbim_base_station_nr_serving_cell_size,
14232
15
            { "NR Serving Cell Size", "mbim.control.base_station.nr_serving_cell_size",
14233
15
               FT_UINT32, BASE_DEC, NULL, 0,
14234
15
              NULL, HFILL }
14235
15
        },
14236
15
        { &hf_mbim_base_station_nr_neighbor_cells_offset,
14237
15
            { "NR Neighbor Cells Offset", "mbim.control.base_station.nr_neighbor_cells_offset",
14238
15
               FT_UINT32, BASE_DEC, NULL, 0,
14239
15
              NULL, HFILL }
14240
15
        },
14241
15
        { &hf_mbim_base_station_nr_neighbor_cells_size,
14242
15
            { "NR Neighbor Cells Size", "mbim.control.base_station.nr_neighbor_cells_size",
14243
15
               FT_UINT32, BASE_DEC, NULL, 0,
14244
15
              NULL, HFILL }
14245
15
        },
14246
15
        { &hf_mbim_base_station_count,
14247
15
            { "Count", "mbim.control.base_station.count",
14248
15
               FT_UINT32, BASE_DEC, NULL, 0,
14249
15
              NULL, HFILL }
14250
15
        },
14251
15
        { &hf_mbim_version,
14252
15
            { "MBIM Version", "mbim.control.bcd_mbim_version",
14253
15
               FT_UINT16, BASE_CUSTOM, CF_FUNC(mbim_version_fmt), 0,
14254
15
              NULL, HFILL }
14255
15
        },
14256
15
        { &hf_mbim_extended_version,
14257
15
            { "MBIM Extended Version", "mbim.control.bcd_mbim_extended_version",
14258
15
               FT_UINT16, BASE_CUSTOM, CF_FUNC(mbim_version_fmt), 0,
14259
15
              NULL, HFILL }
14260
15
        },
14261
15
        { &hf_mbim_ms_modem_config_config_status,
14262
15
            { "Config Status", "mbim.control.ms_modem_config.config_status",
14263
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_modem_config_status_vals), 0,
14264
15
              NULL, HFILL }
14265
15
        },
14266
15
        { &hf_mbim_ms_registration_params_info_mico_mode,
14267
15
            { "Mico Mode", "mbim.control.ms_registration_params_info.mico_mode",
14268
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_mico_mode_vals), 0,
14269
15
              NULL, HFILL }
14270
15
        },
14271
15
        { &hf_mbim_ms_registration_params_info_drx_params,
14272
15
            { "DRX Params", "mbim.control.ms_registration_params_info.drx_params",
14273
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_drx_params_vals), 0,
14274
15
              NULL, HFILL }
14275
15
        },
14276
15
        { &hf_mbim_ms_registration_params_info_ladn_info,
14277
15
            { "LADN Info", "mbim.control.ms_registration_params_info.ladn_info",
14278
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_ladn_ind_vals), 0,
14279
15
              NULL, HFILL }
14280
15
        },
14281
15
        { &hf_mbim_ms_registration_params_info_default_pdu_hint,
14282
15
            { "Default PDU Hint", "mbim.control.ms_registration_params_info.default_pdu_hint",
14283
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_default_pdu_hint_vals), 0,
14284
15
              NULL, HFILL }
14285
15
        },
14286
15
        { &hf_mbim_ms_registration_params_info_re_register_if_needed,
14287
15
            { "Reregister If Needed", "mbim.control.ms_registration_params_info.re_register_if_needed",
14288
15
               FT_UINT32, BASE_DEC, NULL, 0,
14289
15
              NULL, HFILL }
14290
15
        },
14291
15
        { &hf_mbim_ms_network_params_info_mico_indication,
14292
15
            { "MICO indication", "mbim.control.ms_network_params_info.mico_indication",
14293
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_mico_indication_vals), 0,
14294
15
              NULL, HFILL }
14295
15
        },
14296
15
        { &hf_mbim_ms_network_params_info_drx_params,
14297
15
            { "DRX Params", "mbim.control.ms_network_params_info.drx_params",
14298
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_drx_params_vals), 0,
14299
15
              NULL, HFILL }
14300
15
        },
14301
15
        { &hf_mbim_ms_wake_reason_wake_type,
14302
15
            { "Wake Type", "mbim.control.ms_wake_reason.wake_type",
14303
15
               FT_UINT32, BASE_DEC, VALS(hf_mbim_ms_wake_reason_wake_type_vals), 0,
14304
15
              NULL, HFILL }
14305
15
        },
14306
15
        { &hf_mbim_ms_wake_reason_session_id,
14307
15
            { "Session ID", "mbim.control.ms_wake_reason.session_id",
14308
15
               FT_UINT32, BASE_DEC, NULL, 0,
14309
15
              NULL, HFILL }
14310
15
        },
14311
15
        { &hf_mbim_ms_wake_reason_command_payload_offset,
14312
15
            { "Payload Offset", "mbim.control.ms_wake_reason.command_payload_offset",
14313
15
               FT_UINT32, BASE_DEC, NULL, 0,
14314
15
              NULL, HFILL }
14315
15
        },
14316
15
        { &hf_mbim_ms_wake_reason_command_payload_size,
14317
15
            { "Payload Size", "mbim.control.ms_wake_reason.command_payload_size",
14318
15
               FT_UINT32, BASE_DEC, NULL, 0,
14319
15
              NULL, HFILL }
14320
15
        },
14321
15
        { &hf_mbim_ms_wake_reason_command_payload,
14322
15
            { "Payload", "mbim.control.ms_wake_reason.command_payload",
14323
15
               FT_BYTES, BASE_NONE, NULL, 0,
14324
15
              NULL, HFILL }
14325
15
        },
14326
15
        { &hf_mbim_ms_wake_reason_packet_original_size,
14327
15
            { "Original Size", "mbim.control.ms_wake_reason.packet_original_size",
14328
15
                FT_UINT32, BASE_DEC, NULL, 0,
14329
15
                NULL, HFILL }
14330
15
        },
14331
15
        { &hf_mbim_ms_wake_reason_packet_saved_offset,
14332
15
            { "Saved Offset", "mbim.control.ms_wake_reason.packet_saved_offset",
14333
15
               FT_UINT32, BASE_DEC, NULL, 0,
14334
15
              NULL, HFILL }
14335
15
        },
14336
15
        { &hf_mbim_ms_wake_reason_packet_saved_size,
14337
15
            { "Saved Size", "mbim.control.ms_wake_reason.packet_saved_size",
14338
15
               FT_UINT32, BASE_DEC, NULL, 0,
14339
15
              NULL, HFILL }
14340
15
        },
14341
15
        { &hf_mbim_ms_wake_reason_packet_saved_data,
14342
15
            { "Saved Data", "mbim.control.ms_wake_reason.packet_saved_data",
14343
15
               FT_BYTES, BASE_NONE, NULL, 0,
14344
15
              NULL, HFILL }
14345
15
        },
14346
15
        { &hf_mbim_ms_slot_id,
14347
15
            { "Slot Id", "mbim.control.ms_dual_sim.slot_id",
14348
15
               FT_UINT32, BASE_DEC, NULL, 0,
14349
15
              NULL, HFILL }
14350
15
        },
14351
15
        { &hf_mbim_ms_open_channel_app_id_size,
14352
15
            { "App Id Size", "mbim.control.ms_open_channel.app_id_size",
14353
15
               FT_UINT32, BASE_DEC, NULL, 0,
14354
15
              NULL, HFILL }
14355
15
        },
14356
15
        { &hf_mbim_ms_open_channel_app_id_offset,
14357
15
            { "App Id Offset", "mbim.control.ms_open_channel.app_id_offset",
14358
15
               FT_UINT32, BASE_DEC, NULL, 0,
14359
15
              NULL, HFILL }
14360
15
        },
14361
15
        { &hf_mbim_ms_open_channel_select_p2_arg,
14362
15
            { "Select P2 Arg", "mbim.control.ms_open_channel.select_p2_arg",
14363
15
               FT_UINT32, BASE_DEC, NULL, 0,
14364
15
              NULL, HFILL }
14365
15
        },
14366
15
        { &hf_mbim_ms_uicc_channel_group,
14367
15
            { "Channel Group", "mbim.control.ms_uicc.channel_group",
14368
15
               FT_UINT32, BASE_DEC, NULL, 0,
14369
15
              NULL, HFILL }
14370
15
        },
14371
15
        { &hf_mbim_ms_open_channel_app_id,
14372
15
            { "App Id", "mbim.control.ms_open_channel.app_id",
14373
15
               FT_BYTES, BASE_NONE, NULL, 0,
14374
15
              NULL, HFILL }
14375
15
        },
14376
15
        { &hf_mbim_ms_uicc_status,
14377
15
            { "Status", "mbim.control.ms_uicc.status",
14378
15
               FT_UINT32, BASE_DEC, NULL, 0,
14379
15
              NULL, HFILL }
14380
15
        },
14381
15
        { &hf_mbim_ms_uicc_channel,
14382
15
            { "Channel", "mbim.control.ms_uicc.channel",
14383
15
               FT_UINT32, BASE_DEC, NULL, 0,
14384
15
              NULL, HFILL }
14385
15
        },
14386
15
        { &hf_mbim_ms_uicc_response_length,
14387
15
            { "Response Length", "mbim.control.ms_uicc.response_length",
14388
15
               FT_UINT32, BASE_DEC, NULL, 0,
14389
15
              NULL, HFILL }
14390
15
        },
14391
15
        { &hf_mbim_ms_uicc_response_offset,
14392
15
            { "Response Offset", "mbim.control.ms_uicc.response_offset",
14393
15
               FT_UINT32, BASE_DEC, NULL, 0,
14394
15
              NULL, HFILL }
14395
15
        },
14396
15
        { &hf_mbim_ms_uicc_response,
14397
15
            { "Response", "mbim.control.ms_uicc.response",
14398
15
               FT_BYTES, BASE_NONE, NULL, 0,
14399
15
              NULL, HFILL }
14400
15
        },
14401
15
        { &hf_mbim_ms_uicc_padding,
14402
15
            { "Response Padding", "mbim.control.ms_uicc.padding",
14403
15
               FT_BYTES, BASE_NONE, NULL, 0,
14404
15
              NULL, HFILL }
14405
15
        },
14406
15
        { &hf_mbim_ms_apdu_secure_messaging,
14407
15
            { "Secure messaging", "mbim.control.ms_apdu.secure_messaging",
14408
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_apdu_secure_messaging_vals), 0,
14409
15
              NULL, HFILL }
14410
15
        },
14411
15
        { &hf_mbim_ms_apdu_type,
14412
15
            { "Type", "mbim.control.ms_apdu.type",
14413
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_apdu_type_vals), 0,
14414
15
              NULL, HFILL }
14415
15
        },
14416
15
        { &hf_mbim_ms_apdu_command_size,
14417
15
            { "Command Size", "mbim.control.ms_apdu.command_size",
14418
15
               FT_UINT32, BASE_DEC, NULL, 0,
14419
15
              NULL, HFILL }
14420
15
        },
14421
15
        { &hf_mbim_ms_apdu_command_offset,
14422
15
            { "Command Offset", "mbim.control.ms_apdu.command_offset",
14423
15
               FT_UINT32, BASE_DEC, NULL, 0,
14424
15
              NULL, HFILL }
14425
15
        },
14426
15
        { &hf_mbim_ms_apdu_command,
14427
15
            { "Command", "mbim.control.ms_apdu.command",
14428
15
               FT_BYTES, BASE_NONE, NULL, 0,
14429
15
              NULL, HFILL }
14430
15
        },
14431
15
        { &hf_mbim_ms_apdu_padding,
14432
15
            { "Command Padding", "mbim.control.ms_apdu.padding",
14433
15
               FT_BYTES, BASE_NONE, NULL, 0,
14434
15
              NULL, HFILL }
14435
15
        },
14436
15
        { &hf_mbim_ms_terminal_capability_count,
14437
15
            { "Capability Count", "mbim.control.ms_terminal_capability.count",
14438
15
               FT_UINT32, BASE_DEC, NULL, 0,
14439
15
              NULL, HFILL }
14440
15
        },
14441
15
        { &hf_mbim_ms_terminal_capability_offset,
14442
15
            { "Capability offset", "mbim.control.ms_terminal_capability.offset",
14443
15
               FT_UINT32, BASE_DEC, NULL, 0,
14444
15
              NULL, HFILL }
14445
15
        },
14446
15
        { &hf_mbim_ms_terminal_capability_size,
14447
15
            { "Capability size", "mbim.control.ms_terminal_capability.size",
14448
15
               FT_UINT32, BASE_DEC, NULL, 0,
14449
15
              NULL, HFILL }
14450
15
        },
14451
15
        { &hf_mbim_ms_terminal_capability,
14452
15
            { "Capability", "mbim.control.ms_terminal_capability.capability",
14453
15
               FT_BYTES, BASE_NONE, NULL, 0,
14454
15
              NULL, HFILL }
14455
15
        },
14456
15
        { &hf_mbim_ms_reset_pass_through_action,
14457
15
            { "Type", "mbim.control.ms_reset.pass_through_action",
14458
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_reset_pass_through_action_vals), 0,
14459
15
              NULL, HFILL }
14460
15
        },
14461
15
        { &hf_mbim_ms_atr_info_atr_offset,
14462
15
            { "ATR Offset", "mbim.control.ms_atr_info.atr_offset",
14463
15
               FT_UINT32, BASE_DEC, NULL, 0,
14464
15
              NULL, HFILL }
14465
15
        },
14466
15
        { &hf_mbim_ms_atr_info_atr_size,
14467
15
            { "ATR Size", "mbim.control.ms_atr_info.atr_size",
14468
15
               FT_UINT32, BASE_DEC, NULL, 0,
14469
15
              NULL, HFILL }
14470
15
        },
14471
15
        { &hf_mbim_ms_app_info_app_type,
14472
15
            { "App Type", "mbim.control.ms_app_info.app_type",
14473
15
               FT_UINT32, BASE_DEC, VALS(mbim_ms_uicc_app_type_vals), 0,
14474
15
              NULL, HFILL }
14475
15
        },
14476
15
        { &hf_mbim_ms_app_info_app_id_offset,
14477
15
            { "App ID Offset", "mbim.control.ms_app_info.app_id_offset",
14478
15
               FT_UINT32, BASE_DEC, NULL, 0,
14479
15
              NULL, HFILL }
14480
15
        },
14481
15
        { &hf_mbim_ms_app_info_app_id_size,
14482
15
            { "App ID Size", "mbim.control.ms_app_info.app_id_size",
14483
15
               FT_UINT32, BASE_DEC, NULL, 0,
14484
15
              NULL, HFILL }
14485
15
        },
14486
15
        { &hf_mbim_ms_app_info_app_id,
14487
15
            { "App ID", "mbim.control.ms_app_info.app_id",
14488
15
               FT_BYTES, BASE_NONE, NULL, 0,
14489
15
              NULL, HFILL }
14490
15
        },
14491
15
        { &hf_mbim_ms_app_info_app_name_offset,
14492
15
            { "App Name Offset", "mbim.control.ms_app_info.app_name_offset",
14493
15
               FT_UINT32, BASE_DEC, NULL, 0,
14494
15
              NULL, HFILL }
14495
15
        },
14496
15
        { &hf_mbim_ms_app_info_app_name_size,
14497
15
            { "App Name Size", "mbim.control.ms_app_info.app_name_size",
14498
15
               FT_UINT32, BASE_DEC, NULL, 0,
14499
15
              NULL, HFILL }
14500
15
        },
14501
15
        { &hf_mbim_ms_app_info_app_name,
14502
15
            { "App Name", "mbim.control.ms_app_info.app_name",
14503
15
               FT_STRING, BASE_NONE, NULL, 0,
14504
15
              NULL, HFILL }
14505
15
        },
14506
15
        { &hf_mbim_ms_app_info_num_pins,
14507
15
            { "Num Pins", "mbim.control.ms_app_info.num_pins",
14508
15
               FT_UINT32, BASE_DEC, NULL, 0,
14509
15
              NULL, HFILL }
14510
15
        },
14511
15
        { &hf_mbim_ms_app_info_pin_ref_offset,
14512
15
            { "Pin Ref Offset", "mbim.control.ms_app_info.pin_ref_offset",
14513
15
               FT_UINT32, BASE_DEC, NULL, 0,
14514
15
              NULL, HFILL }
14515
15
        },
14516
15
        { &hf_mbim_ms_app_info_pin_ref_size,
14517
15
            { "Pin Ref Size", "mbim.control.ms_app_info.pin_ref_size",
14518
15
               FT_UINT32, BASE_DEC, NULL, 0,
14519
15
              NULL, HFILL }
14520
15
        },
14521
15
        { &hf_mbim_ms_app_info_pin_ref,
14522
15
            { "Pin Ref", "mbim.control.ms_app_info.pin_ref",
14523
15
               FT_BYTES, BASE_NONE, NULL, 0,
14524
15
              NULL, HFILL }
14525
15
        },
14526
15
        { &hf_mbim_ms_app_list_version,
14527
15
            { "Version", "mbim.control.ms_app_list.version",
14528
15
               FT_UINT32, BASE_DEC, NULL, 0,
14529
15
              NULL, HFILL }
14530
15
        },
14531
15
        { &hf_mbim_ms_app_list_app_count,
14532
15
            { "App Count", "mbim.control.ms_app_list.app_count",
14533
15
               FT_UINT32, BASE_DEC, NULL, 0,
14534
15
              NULL, HFILL }
14535
15
        },
14536
15
        { &hf_mbim_ms_app_list_active_app_index,
14537
15
            { "Active App Index", "mbim.control.ms_app_list.active_app_index",
14538
15
               FT_UINT32, BASE_DEC, NULL, 0,
14539
15
              NULL, HFILL }
14540
15
        },
14541
15
        { &hf_mbim_ms_app_list_size,
14542
15
            { "App List Size", "mbim.control.ms_app_list.app_list_size",
14543
15
               FT_UINT32, BASE_DEC, NULL, 0,
14544
15
              NULL, HFILL }
14545
15
        },
14546
15
        { &hf_mbim_ms_app_list_app_info_offset,
14547
15
            { "App Info Offset", "mbim.control.ms_app_list.app_info_offset",
14548
15
               FT_UINT32, BASE_DEC, NULL, 0,
14549
15
              NULL, HFILL }
14550
15
        },
14551
15
        { &hf_mbim_ms_app_list_app_info_size,
14552
15
            { "App Info Size", "mbim.control.ms_app_list.app_info_size",
14553
15
               FT_UINT32, BASE_DEC, NULL, 0,
14554
15
              NULL, HFILL }
14555
15
        },
14556
15
        { &hf_mbim_ms_file_path_version,
14557
15
            { "Version", "mbim.control.ms_file_path.version",
14558
15
               FT_UINT32, BASE_DEC, NULL, 0,
14559
15
              NULL, HFILL }
14560
15
        },
14561
15
        { &hf_mbim_ms_file_path_app_id_offset,
14562
15
            { "App ID Offset", "mbim.control.ms_file_path.app_id_offset",
14563
15
               FT_UINT32, BASE_DEC, NULL, 0,
14564
15
              NULL, HFILL }
14565
15
        },
14566
15
        { &hf_mbim_ms_file_path_app_id_size,
14567
15
            { "App ID Size", "mbim.control.ms_file_path.app_id_size",
14568
15
               FT_UINT32, BASE_DEC, NULL, 0,
14569
15
              NULL, HFILL }
14570
15
        },
14571
15
        { &hf_mbim_ms_file_path_file_path_offset,
14572
15
            { "File Path Offset", "mbim.control.ms_file_path.file_path_offset",
14573
15
               FT_UINT32, BASE_DEC, NULL, 0,
14574
15
              NULL, HFILL }
14575
15
        },
14576
15
        { &hf_mbim_ms_file_path_file_path_size,
14577
15
            { "File Path Size", "mbim.control.ms_file_path.file_path_size",
14578
15
               FT_UINT32, BASE_DEC, NULL, 0,
14579
15
              NULL, HFILL }
14580
15
        },
14581
15
        { &hf_mbim_ms_file_path_app_id,
14582
15
            { "App ID", "mbim.control.ms_file_path.app_id",
14583
15
               FT_BYTES, BASE_NONE, NULL, 0,
14584
15
              NULL, HFILL }
14585
15
        },
14586
15
        { &hf_mbim_ms_file_path_file_path,
14587
15
            { "File Path", "mbim.control.ms_file_path.file_path",
14588
15
               FT_BYTES, BASE_NONE, NULL, 0,
14589
15
              NULL, HFILL }
14590
15
        },
14591
15
        { &hf_mbim_ms_file_status_version,
14592
15
            { "Version", "mbim.control.ms_file_status.version",
14593
15
               FT_UINT32, BASE_DEC, NULL, 0,
14594
15
              NULL, HFILL }
14595
15
        },
14596
15
        { &hf_mbim_ms_file_status_status_word_1,
14597
15
            { "Status Word 1", "mbim.control.ms_file_status.status_word_1",
14598
15
               FT_UINT32, BASE_DEC, NULL, 0,
14599
15
              NULL, HFILL }
14600
15
        },
14601
15
        { &hf_mbim_ms_file_status_status_word_2,
14602
15
            { "Status Word 2", "mbim.control.ms_file_status.status_word_2",
14603
15
               FT_UINT32, BASE_DEC, NULL, 0,
14604
15
              NULL, HFILL }
14605
15
        },
14606
15
        { &hf_mbim_ms_file_status_file_accessibility,
14607
15
            { "File Accessibility", "mbim.control.ms_file_status.file_accessibility",
14608
15
               FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_accessibility_vals), 0,
14609
15
              NULL, HFILL }
14610
15
        },
14611
15
        { &hf_mbim_ms_file_status_file_type,
14612
15
            { "File Type", "mbim.control.ms_file_status.file_type",
14613
15
               FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_type_vals), 0,
14614
15
              NULL, HFILL }
14615
15
        },
14616
15
        { &hf_mbim_ms_file_status_file_structure,
14617
15
            { "File Structure", "mbim.control.ms_file_status.file_structure",
14618
15
               FT_UINT32, BASE_DEC, VALS(mbim_uicc_file_structure_vals), 0,
14619
15
              NULL, HFILL }
14620
15
        },
14621
15
        { &hf_mbim_ms_file_status_item_count,
14622
15
            { "Item Count", "mbim.control.ms_file_status.item_count",
14623
15
               FT_UINT32, BASE_DEC, NULL, 0,
14624
15
              NULL, HFILL }
14625
15
        },
14626
15
        { &hf_mbim_ms_file_status_size,
14627
15
            { "Size", "mbim.control.ms_file_status.size",
14628
15
               FT_UINT32, BASE_DEC, NULL, 0,
14629
15
              NULL, HFILL }
14630
15
        },
14631
15
        { &hf_mbim_ms_file_status_file_lock_status,
14632
15
            { "File Lock Status", "mbim.control.ms_file_status.file_lock_status",
14633
15
               FT_UINT32, BASE_DEC, NULL, 0,
14634
15
              NULL, HFILL }
14635
15
        },
14636
15
        { &hf_mbim_ms_response_version,
14637
15
            { "Version", "mbim.control.ms_response.version",
14638
15
               FT_UINT32, BASE_DEC, NULL, 0,
14639
15
              NULL, HFILL }
14640
15
        },
14641
15
        { &hf_mbim_ms_response_status_word_1,
14642
15
            { "Status Word 1", "mbim.control.ms_response.status_word_1",
14643
15
               FT_UINT32, BASE_DEC, NULL, 0,
14644
15
              NULL, HFILL }
14645
15
        },
14646
15
        { &hf_mbim_ms_response_status_word_2,
14647
15
            { "Status Word 2", "mbim.control.ms_response.status_word_2",
14648
15
               FT_UINT32, BASE_DEC, NULL, 0,
14649
15
              NULL, HFILL }
14650
15
        },
14651
15
        { &hf_mbim_ms_response_response_data_offset,
14652
15
            { "Data Offset", "mbim.control.ms_response.response_data_offset",
14653
15
               FT_UINT32, BASE_DEC, NULL, 0,
14654
15
              NULL, HFILL }
14655
15
        },
14656
15
        { &hf_mbim_ms_response_response_data_size,
14657
15
            { "Data Size", "mbim.control.ms_response.response_data_size",
14658
15
               FT_UINT32, BASE_DEC, NULL, 0,
14659
15
              NULL, HFILL }
14660
15
        },
14661
15
        { &hf_mbim_ms_response_response_data,
14662
15
            { "Response Data", "mbim.control.ms_response.response_data",
14663
15
               FT_BYTES, BASE_NONE, NULL, 0,
14664
15
              NULL, HFILL }
14665
15
        },
14666
15
        { &hf_mbim_ms_access_binary_version,
14667
15
            { "Version", "mbim.control.ms_access_binary.version",
14668
15
               FT_UINT32, BASE_DEC, NULL, 0,
14669
15
              NULL, HFILL }
14670
15
        },
14671
15
        { &hf_mbim_ms_access_binary_app_id_offset,
14672
15
            { "App ID Offset", "mbim.control.ms_access_binary.app_id_offset",
14673
15
               FT_UINT32, BASE_DEC, NULL, 0,
14674
15
              NULL, HFILL }
14675
15
        },
14676
15
        { &hf_mbim_ms_access_binary_app_id_size,
14677
15
            { "App ID Size", "mbim.control.ms_access_binary.app_id_size",
14678
15
               FT_UINT32, BASE_DEC, NULL, 0,
14679
15
              NULL, HFILL }
14680
15
        },
14681
15
        { &hf_mbim_ms_access_binary_file_path_offset,
14682
15
            { "File Path Offset", "mbim.control.ms_access_binary.file_path_offset",
14683
15
               FT_UINT32, BASE_DEC, NULL, 0,
14684
15
              NULL, HFILL }
14685
15
        },
14686
15
        { &hf_mbim_ms_access_binary_file_path_size,
14687
15
            { "File Path Size", "mbim.control.ms_access_binary.file_path_size",
14688
15
               FT_UINT32, BASE_DEC, NULL, 0,
14689
15
              NULL, HFILL }
14690
15
        },
14691
15
        { &hf_mbim_ms_access_binary_file_offset,
14692
15
            { "File Offset", "mbim.control.ms_access_binary.file_offset",
14693
15
               FT_UINT32, BASE_DEC, NULL, 0,
14694
15
              NULL, HFILL }
14695
15
        },
14696
15
        { &hf_mbim_ms_access_binary_number_of_bytes,
14697
15
            { "Number of Bytes", "mbim.control.ms_access_binary.number_of_bytes",
14698
15
               FT_UINT32, BASE_DEC, NULL, 0,
14699
15
              NULL, HFILL }
14700
15
        },
14701
15
        { &hf_mbim_ms_access_binary_local_pin_offset,
14702
15
            { "Local Pin Offset", "mbim.control.ms_access_binary.local_pin_offset",
14703
15
               FT_UINT32, BASE_DEC, NULL, 0,
14704
15
              NULL, HFILL }
14705
15
        },
14706
15
        { &hf_mbim_ms_access_binary_local_pin_size,
14707
15
            { "Local Pin Size", "mbim.control.ms_access_binary.local_pin_size",
14708
15
               FT_UINT32, BASE_DEC, NULL, 0,
14709
15
              NULL, HFILL }
14710
15
        },
14711
15
        { &hf_mbim_ms_access_binary_binary_data_offset,
14712
15
            { "Binary Data Offset", "mbim.control.ms_access_binary.binary_data_offset",
14713
15
               FT_UINT32, BASE_DEC, NULL, 0,
14714
15
              NULL, HFILL }
14715
15
        },
14716
15
        { &hf_mbim_ms_access_binary_binary_data_size,
14717
15
            { "Binary Data Size", "mbim.control.ms_access_binary.binary_data_size",
14718
15
               FT_UINT32, BASE_DEC, NULL, 0,
14719
15
              NULL, HFILL }
14720
15
        },
14721
15
        { &hf_mbim_ms_access_binary_app_id,
14722
15
            { "App ID", "mbim.control.ms_access_binary.app_id",
14723
15
               FT_BYTES, BASE_NONE, NULL, 0,
14724
15
              NULL, HFILL }
14725
15
        },
14726
15
        { &hf_mbim_ms_access_binary_file_path,
14727
15
            { "File Path", "mbim.control.ms_access_binary.file_path",
14728
15
               FT_BYTES, BASE_NONE, NULL, 0,
14729
15
              NULL, HFILL }
14730
15
        },
14731
15
        { &hf_mbim_ms_access_binary_local_pin,
14732
15
            { "Local Pin", "mbim.control.ms_access_binary.local_pin",
14733
15
               FT_STRING, BASE_NONE, NULL, 0,
14734
15
              NULL, HFILL }
14735
15
        },
14736
15
        { &hf_mbim_ms_access_binary_binary_data,
14737
15
            { "Binary Data", "mbim.control.ms_access_binary.binary_data",
14738
15
               FT_BYTES, BASE_NONE, NULL, 0,
14739
15
              NULL, HFILL }
14740
15
        },
14741
15
        { &hf_mbim_ms_access_record_version,
14742
15
            { "Version", "mbim.control.ms_access_record.version",
14743
15
               FT_UINT32, BASE_DEC, NULL, 0,
14744
15
              NULL, HFILL }
14745
15
        },
14746
15
        { &hf_mbim_ms_access_record_app_id_offset,
14747
15
            { "App ID Offset", "mbim.control.ms_access_record.app_id_offset",
14748
15
               FT_UINT32, BASE_DEC, NULL, 0,
14749
15
              NULL, HFILL }
14750
15
        },
14751
15
        { &hf_mbim_ms_access_record_app_id_size,
14752
15
            { "App ID Size", "mbim.control.ms_access_record.app_id_size",
14753
15
               FT_UINT32, BASE_DEC, NULL, 0,
14754
15
              NULL, HFILL }
14755
15
        },
14756
15
        { &hf_mbim_ms_access_record_file_path_offset,
14757
15
            { "File Path Offset", "mbim.control.ms_access_record.file_path_offset",
14758
15
               FT_UINT32, BASE_DEC, NULL, 0,
14759
15
              NULL, HFILL }
14760
15
        },
14761
15
        { &hf_mbim_ms_access_record_file_path_size,
14762
15
            { "File Path Size", "mbim.control.ms_access_record.file_path_size",
14763
15
               FT_UINT32, BASE_DEC, NULL, 0,
14764
15
              NULL, HFILL }
14765
15
        },
14766
15
        { &hf_mbim_ms_access_record_record_number,
14767
15
            { "Record Number", "mbim.control.ms_access_record.record_number",
14768
15
               FT_UINT32, BASE_DEC, NULL, 0,
14769
15
              NULL, HFILL }
14770
15
        },
14771
15
        { &hf_mbim_ms_access_record_local_pin_offset,
14772
15
            { "Local Pin Offset", "mbim.control.ms_access_record.local_pin_offset",
14773
15
               FT_UINT32, BASE_DEC, NULL, 0,
14774
15
              NULL, HFILL }
14775
15
        },
14776
15
        { &hf_mbim_ms_access_record_local_pin_size,
14777
15
            { "Local Pin Size", "mbim.control.ms_access_record.local_pin_size",
14778
15
               FT_UINT32, BASE_DEC, NULL, 0,
14779
15
              NULL, HFILL }
14780
15
        },
14781
15
        { &hf_mbim_ms_access_record_record_data_offset,
14782
15
            { "Record Data Offset", "mbim.control.ms_access_record.record_data_offset",
14783
15
               FT_UINT32, BASE_DEC, NULL, 0,
14784
15
              NULL, HFILL }
14785
15
        },
14786
15
        { &hf_mbim_ms_access_record_record_data_size,
14787
15
            { "Record Data Size", "mbim.control.ms_access_record.record_data_size",
14788
15
               FT_UINT32, BASE_DEC, NULL, 0,
14789
15
              NULL, HFILL }
14790
15
        },
14791
15
        { &hf_mbim_ms_access_record_app_id,
14792
15
            { "App ID", "mbim.control.ms_access_record.app_id",
14793
15
               FT_BYTES, BASE_NONE, NULL, 0,
14794
15
              NULL, HFILL }
14795
15
        },
14796
15
        { &hf_mbim_ms_access_record_file_path,
14797
15
            { "File Path", "mbim.control.ms_access_record.file_path",
14798
15
               FT_BYTES, BASE_NONE, NULL, 0,
14799
15
              NULL, HFILL }
14800
15
        },
14801
15
        { &hf_mbim_ms_access_record_local_pin,
14802
15
            { "Local Pin", "mbim.control.ms_access_record.local_pin",
14803
15
               FT_STRING, BASE_NONE, NULL, 0,
14804
15
              NULL, HFILL }
14805
15
        },
14806
15
        { &hf_mbim_ms_access_record_record_data,
14807
15
            { "Record_Data", "mbim.control.ms_access_record.record_data",
14808
15
               FT_BYTES, BASE_NONE, NULL, 0,
14809
15
              NULL, HFILL }
14810
15
        },
14811
15
        { &hf_mbim_nitz_year,
14812
15
            { "Year", "mbim.control.nitz.year",
14813
15
               FT_UINT32, BASE_DEC, NULL, 0,
14814
15
              NULL, HFILL }
14815
15
        },
14816
15
        { &hf_mbim_nitz_month,
14817
15
            { "Month", "mbim.control.nitz.month",
14818
15
               FT_UINT32, BASE_DEC, NULL, 0,
14819
15
              NULL, HFILL }
14820
15
        },
14821
15
        { &hf_mbim_nitz_day,
14822
15
            { "Day", "mbim.control.nitz.day",
14823
15
               FT_UINT32, BASE_DEC, NULL, 0,
14824
15
              NULL, HFILL }
14825
15
        },
14826
15
        { &hf_mbim_nitz_hour,
14827
15
            { "Hour", "mbim.control.nitz.hour",
14828
15
               FT_UINT32, BASE_DEC, NULL, 0,
14829
15
              NULL, HFILL }
14830
15
        },
14831
15
        { &hf_mbim_nitz_minute,
14832
15
            { "Minute", "mbim.control.nitz.minute",
14833
15
               FT_UINT32, BASE_DEC, NULL, 0,
14834
15
              NULL, HFILL }
14835
15
        },
14836
15
        { &hf_mbim_nitz_second,
14837
15
            { "Second", "mbim.control.nitz.second",
14838
15
               FT_UINT32, BASE_DEC, NULL, 0,
14839
15
              NULL, HFILL }
14840
15
        },
14841
15
        { &hf_mbim_nitz_timezone_offset_minutes,
14842
15
            { "Timezone Offset Minutes", "mbim.control.nitz.timezone_offset_minutes",
14843
15
               FT_UINT32, BASE_DEC, NULL, 0,
14844
15
              NULL, HFILL }
14845
15
        },
14846
15
        { &hf_mbim_nitz_daylight_saving_time_offset_minutes,
14847
15
            { "Daylight Saving Time Offset Minutes", "mbim.control.nitz.daylight_saving_time_offset_minutes",
14848
15
               FT_UINT32, BASE_DEC, NULL, 0,
14849
15
              NULL, HFILL }
14850
15
        },
14851
15
        { &hf_mbim_nitz_data_class,
14852
15
            { "Data Class", "mbim.control.nitz.data_class",
14853
15
               FT_UINT32, BASE_HEX, NULL, 0,
14854
15
              NULL, HFILL }
14855
15
        },
14856
15
        { &hf_mbim_fragmented_payload,
14857
15
            { "Fragmented Payload", "mbim.control.fragmented_payload",
14858
15
               FT_BYTES, BASE_NONE, NULL, 0,
14859
15
              NULL, HFILL }
14860
15
        },
14861
15
        { &hf_mbim_request_in,
14862
15
            { "Request In", "mbim.control.request_in",
14863
15
               FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0,
14864
15
              NULL, HFILL }
14865
15
        },
14866
15
        { &hf_mbim_response_in,
14867
15
            { "Response In", "mbim.control.response_in",
14868
15
               FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0,
14869
15
              NULL, HFILL }
14870
15
        },
14871
15
        { &hf_mbim_descriptor,
14872
15
            { "Descriptor", "mbim.descriptor",
14873
15
               FT_NONE, BASE_NONE, NULL, 0,
14874
15
              NULL, HFILL }
14875
15
        },
14876
15
        { &hf_mbim_descriptor_version,
14877
15
            { "bcdMBIMVersion", "mbim.descriptor.version",
14878
15
               FT_UINT16, BASE_HEX, NULL, 0,
14879
15
              "MBIM Version", HFILL }
14880
15
        },
14881
15
        { &hf_mbim_descriptor_max_control_message,
14882
15
            { "wMaxControlMessage", "mbim.descriptor.max_control_message",
14883
15
               FT_UINT16, BASE_DEC, NULL, 0,
14884
15
              "Max Control Message", HFILL }
14885
15
        },
14886
15
        { &hf_mbim_descriptor_number_filters,
14887
15
            { "bNumberFilters", "mbim.descriptor.number_filters",
14888
15
               FT_UINT8, BASE_DEC, NULL, 0,
14889
15
              "Number Of Packet Filters", HFILL }
14890
15
        },
14891
15
        { &hf_mbim_descriptor_max_filter_size,
14892
15
            { "bMaxFilterSize", "mbim.descriptor.max_filter_size",
14893
15
               FT_UINT8, BASE_DEC, NULL, 0,
14894
15
              "Max Packet Filter Size", HFILL }
14895
15
        },
14896
15
        { &hf_mbim_descriptor_max_segment_size,
14897
15
            { "wMaxSegmentSize", "mbim.descriptor.max_segment_size",
14898
15
               FT_UINT16, BASE_DEC, NULL, 0,
14899
15
              "Max Segment Size", HFILL }
14900
15
        },
14901
15
        { &hf_mbim_descriptor_network_capabilities,
14902
15
            { "bmNetworkCapabilities", "mbim.descriptor.network_capabilities",
14903
15
               FT_UINT8, BASE_HEX, NULL, 0,
14904
15
              "Network Capabilities", HFILL }
14905
15
        },
14906
15
        { &hf_mbim_descriptor_network_capabilities_max_datagram_size,
14907
15
            { "SetMaxDatagramSize/GetMaxDatagramSize", "mbim.descriptor.network_capabilities.max_datagram_size",
14908
15
               FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
14909
15
              NULL, HFILL }
14910
15
        },
14911
15
        { &hf_mbim_descriptor_network_capabilities_ntb_input_size,
14912
15
            { "8-byte GetNtbInputSize/SetNtbInputSize", "mbim.descriptor.network_capabilities.ntb_input_size",
14913
15
               FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
14914
15
              NULL, HFILL }
14915
15
        },
14916
15
        { &hf_mbim_descriptor_extended_version,
14917
15
            { "bcdMBIMExtendedVersion", "mbim.descriptor.extended_version",
14918
15
               FT_UINT16, BASE_HEX, NULL, 0,
14919
15
              "MBIM Extended Version", HFILL }
14920
15
        },
14921
15
        { &hf_mbim_descriptor_max_outstanding_command_messages,
14922
15
            { "bMaxOutstandingCommandMessages", "mbim.descriptor.max_outstanding_command_messages",
14923
15
               FT_UINT8, BASE_DEC, NULL, 0,
14924
15
              "Max Outstanding Messages", HFILL }
14925
15
        },
14926
15
        { &hf_mbim_descriptor_mtu,
14927
15
            { "wMTU", "mbim.descriptor.mtu",
14928
15
               FT_UINT16, BASE_DEC, NULL, 0,
14929
15
              "MTU", HFILL }
14930
15
        },
14931
15
        { &hf_mbim_bulk,
14932
15
            { "Bulk", "mbim.bulk",
14933
15
               FT_NONE, BASE_NONE, NULL, 0,
14934
15
              NULL, HFILL }
14935
15
        },
14936
15
        { &hf_mbim_bulk_nth_signature,
14937
15
            { "Signature", "mbim.bulk.nth.signature",
14938
15
               FT_STRING, BASE_NONE, NULL, 0,
14939
15
              NULL, HFILL }
14940
15
        },
14941
15
        { &hf_mbim_bulk_nth_header_length,
14942
15
            { "Header Length", "mbim.bulk.nth.header_length",
14943
15
               FT_UINT16, BASE_DEC, NULL, 0,
14944
15
              NULL, HFILL }
14945
15
        },
14946
15
        { &hf_mbim_bulk_nth_sequence_number,
14947
15
            { "Sequence Number", "mbim.bulk.nth.sequence_number",
14948
15
               FT_UINT16, BASE_DEC, NULL, 0,
14949
15
              NULL, HFILL }
14950
15
        },
14951
15
        { &hf_mbim_bulk_nth_block_length,
14952
15
            { "Block Length", "mbim.bulk.nth.block_length",
14953
15
               FT_UINT16, BASE_DEC, NULL, 0,
14954
15
              NULL, HFILL }
14955
15
        },
14956
15
        { &hf_mbim_bulk_nth_block_length_32,
14957
15
            { "Block Length", "mbim.bulk.nth.block_length",
14958
15
               FT_UINT32, BASE_DEC, NULL, 0,
14959
15
              NULL, HFILL }
14960
15
        },
14961
15
        { &hf_mbim_bulk_nth_ndp_index,
14962
15
            { "NDP Index", "mbim.bulk.nth.ndp_index",
14963
15
               FT_UINT16, BASE_DEC, NULL, 0,
14964
15
              NULL, HFILL }
14965
15
        },
14966
15
        { &hf_mbim_bulk_nth_ndp_index_32,
14967
15
            { "NDP Index", "mbim.bulk.nth.ndp_index",
14968
15
               FT_UINT32, BASE_DEC, NULL, 0,
14969
15
              NULL, HFILL }
14970
15
        },
14971
15
        { &hf_mbim_bulk_ndp_signature,
14972
15
            { "Signature", "mbim.bulk.ndp.signature",
14973
15
               FT_UINT32, BASE_HEX, NULL, 0,
14974
15
              NULL, HFILL }
14975
15
        },
14976
15
        { &hf_mbim_bulk_ndp_signature_ips_session_id,
14977
15
            { "IPS Session Id", "mbim.bulk.ndp.signature.ips_session_id",
14978
15
               FT_UINT8, BASE_DEC, NULL, 0,
14979
15
              NULL, HFILL }
14980
15
        },
14981
15
        { &hf_mbim_bulk_ndp_signature_ipc_session_id,
14982
15
            { "IPC Session Id", "mbim.bulk.ndp.signature.ipc_session_id",
14983
15
               FT_UINT8, BASE_DEC, NULL, 0,
14984
15
              NULL, HFILL }
14985
15
        },
14986
15
        { &hf_mbim_bulk_ndp_signature_dss_session_id,
14987
15
            { "DSS Session Id", "mbim.bulk.ndp.signature.dss_session_id",
14988
15
               FT_UINT8, BASE_DEC, NULL, 0,
14989
15
              NULL, HFILL }
14990
15
        },
14991
15
        { &hf_mbim_bulk_ndp_signature_dsc_session_id,
14992
15
            { "DSC Session Id", "mbim.bulk.ndp.signature.dsc_session_id",
14993
15
               FT_UINT8, BASE_DEC, NULL, 0,
14994
15
              NULL, HFILL }
14995
15
        },
14996
15
        { &hf_mbim_bulk_ndp_length,
14997
15
            { "Length", "mbim.bulk.ndp.length",
14998
15
               FT_UINT16, BASE_DEC, NULL, 0,
14999
15
              NULL, HFILL }
15000
15
        },
15001
15
        { &hf_mbim_bulk_ndp_next_ndp_index,
15002
15
            { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
15003
15
               FT_UINT16, BASE_DEC, NULL, 0,
15004
15
              NULL, HFILL }
15005
15
        },
15006
15
        { &hf_mbim_bulk_ndp_next_ndp_index_32,
15007
15
            { "Next NDP Index", "mbim.bulk.ndp.next_ndp_index",
15008
15
               FT_UINT32, BASE_DEC, NULL, 0,
15009
15
              NULL, HFILL }
15010
15
        },
15011
15
        { &hf_mbim_bulk_ndp_reserved,
15012
15
            { "Reserved", "mbim.bulk.ndp.reserved",
15013
15
               FT_UINT16, BASE_HEX, NULL, 0,
15014
15
              NULL, HFILL }
15015
15
        },
15016
15
        { &hf_mbim_bulk_ndp_reserved2,
15017
15
            { "Reserved", "mbim.bulk.ndp.reserved",
15018
15
               FT_UINT32, BASE_HEX, NULL, 0,
15019
15
              NULL, HFILL }
15020
15
        },
15021
15
        { &hf_mbim_bulk_ndp_datagram_index,
15022
15
            { "Datagram Index", "mbim.bulk.ndp.datagram.index",
15023
15
               FT_UINT16, BASE_DEC, NULL, 0,
15024
15
              NULL, HFILL }
15025
15
        },
15026
15
        { &hf_mbim_bulk_ndp_datagram_index_32,
15027
15
            { "Datagram Index", "mbim.bulk.ndp.datagram.index",
15028
15
               FT_UINT32, BASE_DEC, NULL, 0,
15029
15
              NULL, HFILL }
15030
15
        },
15031
15
        { &hf_mbim_bulk_ndp_datagram_length,
15032
15
            { "Datagram Length", "mbim.bulk.ndp.datagram.length",
15033
15
               FT_UINT16, BASE_DEC, NULL, 0,
15034
15
              NULL, HFILL }
15035
15
        },
15036
15
        { &hf_mbim_bulk_ndp_datagram_length_32,
15037
15
            { "Datagram Length", "mbim.bulk.ndp.datagram.length",
15038
15
               FT_UINT32, BASE_DEC, NULL, 0,
15039
15
              NULL, HFILL }
15040
15
        },
15041
15
        { &hf_mbim_bulk_ndp_datagram,
15042
15
            { "Datagram", "mbim.bulk.ndp.datagram",
15043
15
               FT_BYTES, BASE_NONE, NULL, 0,
15044
15
              NULL, HFILL }
15045
15
        },
15046
15
        { &hf_mbim_bulk_ndp_padding,
15047
15
            { "Padding", "mbim.bulk.ndp.padding",
15048
15
               FT_BYTES, BASE_NONE, NULL, 0,
15049
15
              NULL, HFILL }
15050
15
        },
15051
15
        { &hf_mbim_bulk_ndp_nb_datagrams,
15052
15
            { "Number Of Datagrams", "mbim.bulk.ndp.nb_datagrams",
15053
15
               FT_UINT32, BASE_DEC, NULL, 0,
15054
15
              NULL, HFILL }
15055
15
        },
15056
15
        { &hf_mbim_bulk_total_nb_datagrams,
15057
15
            { "Total Number Of Datagrams", "mbim.bulk.total_nb_datagrams",
15058
15
               FT_UINT32, BASE_DEC, NULL, 0,
15059
15
              NULL, HFILL }
15060
15
        },
15061
15
        { &hf_mbim_bulk_ndp_ctrl,
15062
15
            { "NDP Control", "mbim.bulk.ndp_control",
15063
15
               FT_NONE, BASE_NONE, NULL, 0,
15064
15
              NULL, HFILL }
15065
15
        },
15066
15
        { &hf_mbim_bulk_ndp_ctrl_message_type,
15067
15
            { "Message Type", "mbim.bulk.ndp_control.message_type",
15068
15
               FT_UINT16, BASE_HEX, VALS(mbim_ndp_ctrl_msg_type_vals), 0,
15069
15
              NULL, HFILL }
15070
15
        },
15071
15
        { &hf_mbim_bulk_ndp_ctrl_message_length,
15072
15
            { "Message Length", "mbim.bulk.ndp_control.message_length",
15073
15
               FT_UINT16, BASE_DEC, NULL, 0,
15074
15
              NULL, HFILL }
15075
15
        },
15076
15
        { &hf_mbim_bulk_ndp_ctrl_multiflow_status,
15077
15
            { "Multiflow Status", "mbim.bulk.ndp_control.multiflow.status",
15078
15
               FT_UINT16, BASE_DEC, VALS(mbim_ndp_ctrl_multiflow_status_vals), 0,
15079
15
              NULL, HFILL }
15080
15
        },
15081
15
        { &hf_mbim_bulk_ndp_ctrl_multiflow_watermark,
15082
15
            { "Multiflow Watermark", "mbim.bulk.ndp_control.multiflow.watermark",
15083
15
               FT_UINT32, BASE_DEC, NULL, 0,
15084
15
              NULL, HFILL }
15085
15
        },
15086
15
        { &hf_mbim_bulk_ndp_ctrl_message_payload,
15087
15
            { "Message Payload", "mbim.bulk.ndp_control.message_payload",
15088
15
               FT_BYTES, BASE_NONE, NULL, 0,
15089
15
              NULL, HFILL }
15090
15
        },
15091
15
        { &hf_mbim_fragments,
15092
15
            { "Fragments", "mbim.control.fragments",
15093
15
               FT_NONE, BASE_NONE, NULL, 0,
15094
15
              NULL, HFILL }
15095
15
        },
15096
15
        { &hf_mbim_fragment,
15097
15
            { "Fragment", "mbim.control.fragment",
15098
15
               FT_FRAMENUM, BASE_NONE, NULL, 0,
15099
15
              NULL, HFILL }
15100
15
        },
15101
15
        { &hf_mbim_fragment_overlap,
15102
15
            { "Fragment Overlap", "mbim.control.fragment_overlap",
15103
15
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15104
15
              NULL, HFILL }
15105
15
        },
15106
15
        { &hf_mbim_fragment_overlap_conflict,
15107
15
            { "Fragment Overlap Conflict", "mbim.control.fragment_overlap_conflict",
15108
15
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15109
15
              NULL, HFILL }
15110
15
        },
15111
15
        { &hf_mbim_fragment_multiple_tails,
15112
15
            { "Fragment Multiple Tails", "mbim.control.fragment_multiple_tails",
15113
15
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15114
15
              NULL, HFILL }
15115
15
        },
15116
15
        { &hf_mbim_fragment_too_long_fragment,
15117
15
            { "Too Long Fragment", "mbim.control.fragment_too_long_fragment",
15118
15
               FT_BOOLEAN, BASE_NONE, NULL, 0,
15119
15
              NULL, HFILL }
15120
15
        },
15121
15
        { &hf_mbim_fragment_error,
15122
15
            { "Fragment Error", "mbim.control.fragment_error",
15123
15
               FT_FRAMENUM, BASE_NONE, NULL, 0,
15124
15
              NULL, HFILL }
15125
15
        },
15126
15
        { &hf_mbim_fragment_count,
15127
15
            { "Fragment Count", "mbim.control.fragment_count",
15128
15
               FT_UINT32, BASE_DEC, NULL, 0,
15129
15
              NULL, HFILL }
15130
15
        },
15131
15
        { &hf_mbim_reassembled_in,
15132
15
            { "Reassembled In", "mbim.control.reassembled_in",
15133
15
               FT_FRAMENUM, BASE_NONE, NULL, 0,
15134
15
              NULL, HFILL }
15135
15
        },
15136
15
        { &hf_mbim_reassembled_length,
15137
15
            { "Reassembled Length", "mbim.control.reassembled_length",
15138
15
               FT_UINT32, BASE_DEC, NULL, 0,
15139
15
              NULL, HFILL }
15140
15
        },
15141
15
        { &hf_mbim_reassembled_data,
15142
15
            { "Reassembled Data", "mbim.control.reassembled_data",
15143
15
               FT_BYTES, BASE_NONE, NULL, 0,
15144
15
              NULL, HFILL }
15145
15
        }
15146
15
    };
15147
15148
15
    static int *ett[] = {
15149
15
        &ett_mbim,
15150
15
        &ett_mbim_msg_header,
15151
15
        &ett_mbim_frag_header,
15152
15
        &ett_mbim_info_buffer,
15153
15
        &ett_mbim_bitmap,
15154
15
        &ett_mbim_pair_list,
15155
15
        &ett_mbim_pin,
15156
15
        &ett_mbim_buffer,
15157
15
        &ett_mbim_sc_address,
15158
15
        &ett_mbim_pac,
15159
15
        &ett_mbim_thermal_threshold_setting,
15160
15
        &ett_mbim_fragment,
15161
15
        &ett_mbim_fragments,
15162
15
        &ett_mbim_bulk_ndp_ctrl
15163
15
    };
15164
15165
15
    static ei_register_info ei[] = {
15166
15
        { &ei_mbim_max_ctrl_transfer,
15167
15
            { "mbim.max_control_transfer_too_small", PI_MALFORMED, PI_ERROR,
15168
15
                "Max Control Transfer is less than 64 bytes", EXPFILL }},
15169
15
        { &ei_mbim_unexpected_msg,
15170
15
            { "mbim.unexpected_msg", PI_MALFORMED, PI_ERROR,
15171
15
                "Unexpected message", EXPFILL }},
15172
15
        { &ei_mbim_unexpected_info_buffer,
15173
15
            { "mbim.unexpected_info_buffer", PI_MALFORMED, PI_WARN,
15174
15
                "Unexpected Information Buffer", EXPFILL }},
15175
15
        { &ei_mbim_illegal_on_link_prefix_length,
15176
15
            { "mbim.illegal_on_link_prefix_length", PI_MALFORMED, PI_WARN,
15177
15
                "Illegal On Link Prefix Length", EXPFILL }},
15178
15
        { &ei_mbim_unknown_sms_format,
15179
15
            { "mbim.unknown_sms_format", PI_PROTOCOL, PI_WARN,
15180
15
                "Unknown SMS format", EXPFILL }},
15181
15
        { &ei_mbim_unexpected_uuid_value,
15182
15
            { "mbim.unexpected_uuid_value", PI_PROTOCOL, PI_WARN,
15183
15
                "Unexpected UUID value", EXPFILL }},
15184
15
        { &ei_mbim_too_many_items,
15185
15
            { "mbim.too_many_items", PI_PROTOCOL, PI_WARN,
15186
15
                "Too many items", EXPFILL }},
15187
15
        { &ei_mbim_alignment_error,
15188
15
            { "mbim.alignment_error", PI_MALFORMED, PI_ERROR,
15189
15
                "Alignment error", EXPFILL }},
15190
15
        { &ei_mbim_invalid_block_len,
15191
15
            { "mbim.invalid_block_len", PI_PROTOCOL, PI_WARN,
15192
15
                "NTH Block Length does not match packet length", EXPFILL }},
15193
15
        { &ei_mbim_out_of_bounds_index,
15194
15
            { "mbim.out_of_bounds_index", PI_MALFORMED, PI_ERROR,
15195
15
                "Index is out of bounds", EXPFILL }},
15196
15
        { &ei_mbim_oversized_string,
15197
15
            { "mbim.oversized_string", PI_PROTOCOL, PI_WARN,
15198
15
                "String exceeds maximum size allowed", EXPFILL }},
15199
15
        { &ei_mbim_oversized_pdu,
15200
15
            { "mbim.oversized_pdu", PI_PROTOCOL, PI_WARN,
15201
15
                "PDU exceeds maximum size allowed", EXPFILL }}
15202
15
    };
15203
15204
15
    proto_mbim = proto_register_protocol("Mobile Broadband Interface Model",
15205
15
            "MBIM", "mbim");
15206
15207
15
    proto_register_field_array(proto_mbim, hf, array_length(hf));
15208
15
    proto_register_subtree_array(ett, array_length(ett));
15209
15
    expert_mbim = expert_register_protocol(proto_mbim);
15210
15
    expert_register_field_array(expert_mbim, ei, array_length(ei));
15211
15212
15
    reassembly_table_register(&mbim_reassembly_table,
15213
15
                          &addresses_reassembly_table_functions);
15214
15215
15
    mbim_control_handle = register_dissector("mbim.control", dissect_mbim_control, proto_mbim);
15216
15
    register_dissector("mbim.descriptor", dissect_mbim_descriptor, proto_mbim);
15217
15
    register_dissector("mbim.bulk", dissect_mbim_bulk, proto_mbim);
15218
15
    dss_dissector_table = register_dissector_table("mbim.dss_session_id",
15219
15
        "MBIM DSS Session Id", proto_mbim, FT_UINT8, BASE_DEC);
15220
15221
15
    mbim_module = prefs_register_protocol(proto_mbim, proto_reg_handoff_mbim);
15222
15
    prefs_register_obsolete_preference(mbim_module, "bulk_heuristic");
15223
15
    prefs_register_bool_preference(mbim_module, "control_decode_unknown_itf",
15224
15
        "Force decoding of unknown USB control data as MBIM",
15225
15
        "Decode control data received on \"usb.control\" with an "
15226
15
        "unknown interface class as MBIM",
15227
15
        &mbim_control_decode_unknown_itf);
15228
15
    prefs_register_enum_preference(mbim_module, "sms_pdu_format",
15229
15
        "SMS PDU format",
15230
15
        "Format used for SMS PDU decoding",
15231
15
        &mbim_sms_pdu_format, mbim_sms_pdu_format_vals, false);
15232
15
    prefs_register_enum_preference(mbim_module, "extended_version",
15233
15
        "Preferred MBIM Extended Version for decoding when MBIM_CID_VERSION not captured",
15234
15
        NULL,
15235
15
        &preferred_mbim_extended_version, preferred_mbim_extended_version_vals, false);
15236
15
    prefs_register_enum_preference(mbim_module, "uicc_apdu_dissector",
15237
15
        "Dissector used for UICC APDU decoding",
15238
15
        NULL,
15239
15
        &mbim_uicc_apdu_dissector, mbim_uicc_apdu_dissector_vals, false);
15240
15
}
15241
15242
void
15243
proto_reg_handoff_mbim(void)
15244
15
{
15245
15
    static bool initialized = false, mbim_control_decode_unknown_itf_prev = false;
15246
15247
15
    if (!initialized) {
15248
15
        dissector_handle_t mbim_decode_as_handle = create_dissector_handle(dissect_mbim_decode_as, proto_mbim);
15249
15
        bertlv_handle = find_dissector_add_dependency("gsm_sim.bertlv", proto_mbim);
15250
15
        gsm_sim_cmd_handle = find_dissector_add_dependency("gsm_sim.command", proto_mbim);
15251
15
        gsm_sim_rsp_handle = find_dissector_add_dependency("gsm_sim.response", proto_mbim);
15252
15
        etsi_cat_handle = find_dissector_add_dependency("etsi_cat", proto_mbim);
15253
15
        gsm_sms_handle = find_dissector_add_dependency("gsm_sms", proto_mbim);
15254
15
        cdma_sms_handle = find_dissector_add_dependency("ansi_637_trans", proto_mbim);
15255
15
        eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_mbim);
15256
15
        eth_fcs_handle = find_dissector_add_dependency("eth_withfcs", proto_mbim);
15257
15
        ip_handle = find_dissector_add_dependency("ip", proto_mbim);
15258
15
        iso7816_atr_handle = find_dissector_add_dependency("iso7816.atr", proto_mbim);
15259
15
        iso7816_handle = find_dissector_add_dependency("iso7816", proto_mbim);
15260
15
        data_handle = find_dissector("data");
15261
15
        bulk_ndp_ctrl_handle = create_dissector_handle(dissect_mbim_bulk_ndp_ctrl, proto_mbim);
15262
15
        heur_dissector_add("usb.bulk", dissect_mbim_bulk_heur, "MBIM USB bulk endpoint", "mbim_usb_bulk", proto_mbim, HEURISTIC_ENABLE);
15263
15
        dissector_add_for_decode_as("usb.device", mbim_decode_as_handle);
15264
15
        dissector_add_for_decode_as("usb.product", mbim_decode_as_handle);
15265
15
        dissector_add_for_decode_as("usb.protocol", mbim_decode_as_handle);
15266
15
        initialized = true;
15267
15
    }
15268
15
    if (mbim_control_decode_unknown_itf != mbim_control_decode_unknown_itf_prev) {
15269
0
        if (mbim_control_decode_unknown_itf) {
15270
0
            dissector_add_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
15271
0
        } else {
15272
0
            dissector_delete_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
15273
0
        }
15274
0
        mbim_control_decode_unknown_itf_prev = mbim_control_decode_unknown_itf;
15275
0
    }
15276
15
}
15277
15278
/*
15279
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
15280
 *
15281
 * Local variables:
15282
 * c-basic-offset: 4
15283
 * tab-width: 8
15284
 * indent-tabs-mode: nil
15285
 * End:
15286
 *
15287
 * vi: set shiftwidth=4 tabstop=8 expandtab:
15288
 * :indentSize=4:tabSize=8:noTabs=true:
15289
 */