| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-mbim.h
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 uint32_t req_frame;
22 uint32_t resp_frame;
23 uint32_t cmd_type;
24};
25
26typedef void (*mbim_dissect_fct) (tvbuff_t *, packet_info *, proto_tree *, int /* 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 uint32_t uuid[4];
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;
49};
50
51/* Function allowing to register a new UUID used during MBIM dissection */
52WS_DLL_PUBLIC void mbim_register_uuid_ext(struct mbim_uuid_ext *uuid_ext);
53
54#endif /* __PACKET_MBIM_H__ */
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:907
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
dissector_handle
Definition packet.c:857
mbim_cid_dissect
Definition packet-mbim.h:29
mbim_info
Definition packet-mbim.h:20
mbim_uuid_ext
Definition packet-mbim.h:37
tvbuff
Definition tvbuff-int.h:35