1 /* packet-mbim.h 2 * Routines for MBIM dissection 3 * Copyright 2013, 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 #ifndef __PACKET_MBIM_H__ 13 #define __PACKET_MBIM_H__ 14 15 #include "ws_symbol_export.h" 16 17 #define MBIM_COMMAND_QUERY 0 18 #define MBIM_COMMAND_SET 1 19 20 struct mbim_info { 21 guint32 req_frame; 22 guint32 resp_frame; 23 guint32 cmd_type; 24 }; 25 26 typedef void (*mbim_dissect_fct) (tvbuff_t *, packet_info *, proto_tree *, gint /* offset */, struct mbim_info *); 27 28 /* Structure listing the dissection function to be called for a given CID */ 29 struct mbim_cid_dissect { 30 mbim_dissect_fct cmd_set; 31 mbim_dissect_fct cmd_query; 32 mbim_dissect_fct cmd_done; 33 mbim_dissect_fct ind_status; 34 }; 35 36 /* Structure handling the description of the UUID extension to be registered */ 37 struct mbim_uuid_ext { 38 /* UUID value stored in network byte order */ 39 guint32 uuid[4]; 40 /* UUID name to be displayed during dissection */ 41 const gchar *uuid_name; 42 /* value_string array containing the CID list for this UUID */ 43 const value_string *uuid_cid_list; 44 /* Array of the dissection functions per CID. Pointers can be NULL when no dissection is expected */ 45 /* BEWARE: the array must be ordered the same way as uuid_cid_list as it will be accessed with the CID index */ 46 const struct mbim_cid_dissect *uuid_fct_list; 47 /* Handle used for the DSS of this UUID. Set it to NULL if unused */ 48 dissector_handle_t dss_handle; 49 }; 50 51 /* Function allowing to register a new UUID used during MBIM dissection */ 52 WS_DLL_PUBLIC void mbim_register_uuid_ext(struct mbim_uuid_ext *uuid_ext); 53 54 #endif /* __PACKET_MBIM_H__ */ 55