2 * Routines for MBIM dissection
3 * Copyright 2013, Pascal Quantin <pascal@wireshark.org>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __PACKET_MBIM_H__
13 #define __PACKET_MBIM_H__
15 #include "ws_symbol_export.h"
17 #define MBIM_COMMAND_QUERY 0
18 #define MBIM_COMMAND_SET 1
26 typedef void (*mbim_dissect_fct
) (tvbuff_t
*, packet_info
*, proto_tree
*, int /* offset */, struct mbim_info
*);
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
;
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 */
40 /* UUID name to be displayed during dissection */
41 const char *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
;
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
);
54 #endif /* __PACKET_MBIM_H__ */