summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mbim.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /epan/dissectors/packet-mbim.h
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-mbim.h')
-rw-r--r--epan/dissectors/packet-mbim.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/epan/dissectors/packet-mbim.h b/epan/dissectors/packet-mbim.h
new file mode 100644
index 00000000..f421b70c
--- /dev/null
+++ b/epan/dissectors/packet-mbim.h
@@ -0,0 +1,54 @@
+/* packet-mbim.h
+ * Routines for MBIM dissection
+ * Copyright 2013, Pascal Quantin <pascal@wireshark.org>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef __PACKET_MBIM_H__
+#define __PACKET_MBIM_H__
+
+#include "ws_symbol_export.h"
+
+#define MBIM_COMMAND_QUERY 0
+#define MBIM_COMMAND_SET 1
+
+struct mbim_info {
+ guint32 req_frame;
+ guint32 resp_frame;
+ guint32 cmd_type;
+};
+
+typedef void (*mbim_dissect_fct) (tvbuff_t *, packet_info *, proto_tree *, gint /* offset */, struct mbim_info *);
+
+/* Structure listing the dissection function to be called for a given CID */
+struct mbim_cid_dissect {
+ mbim_dissect_fct cmd_set;
+ mbim_dissect_fct cmd_query;
+ mbim_dissect_fct cmd_done;
+ mbim_dissect_fct ind_status;
+};
+
+/* Structure handling the description of the UUID extension to be registered */
+struct mbim_uuid_ext {
+ /* UUID value stored in network byte order */
+ guint32 uuid[4];
+ /* UUID name to be displayed during dissection */
+ const gchar *uuid_name;
+ /* value_string array containing the CID list for this UUID */
+ const value_string *uuid_cid_list;
+ /* Array of the dissection functions per CID. Pointers can be NULL when no dissection is expected */
+ /* BEWARE: the array must be ordered the same way as uuid_cid_list as it will be accessed with the CID index */
+ const struct mbim_cid_dissect *uuid_fct_list;
+ /* Handle used for the DSS of this UUID. Set it to NULL if unused */
+ dissector_handle_t dss_handle;
+};
+
+/* Function allowing to register a new UUID used during MBIM dissection */
+WS_DLL_PUBLIC void mbim_register_uuid_ext(struct mbim_uuid_ext *uuid_ext);
+
+#endif /* __PACKET_MBIM_H__ */