Wireshark  4.3.0
The Wireshark network protocol analyzer
packet-mausb.h
1 /* packet-mausb.h
2  * Definitions for Media Agnostic USB dissection
3  * Copyright 2016, Intel Corporation
4  * Author: Sean O. Stalley <sean.stalley@intel.com>
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * SPDX-License-Identifier: GPL-2.0-or-later
11  */
12 
13 #ifndef __PACKET_MAUSB_H__
14 #define __PACKET_MAUSB_H__
15 
16 #define MAUSB_DPH_LENGTH 20
18 struct mausb_header {
19  /* DWORD 0 */
20  guint8 ver_flags;
21  guint8 type;
22  guint16 length;
23  /* DWORD 1 */
24  guint16 handle;
25  guint8 ma_dev_addr;
26  guint8 mass_id;
27  /* DWORD 2 */
28  guint8 status;
29  union {
30  guint16 token;
31  struct {
32  guint8 eps_tflags;
33  union {
34  guint16 stream_id;
35  guint16 num_headers_iflags;
36  } u1;
37  /* DWORD 3 */
38  guint32 seq_num; /* Note: only 24 bits used */
39  guint8 req_id;
40  /* DWORD 4 */
41  union {
42  guint32 credit;
43  guint32 present_time_num_seg;
44  } u2;
45  /* DWORD 5 */
46  guint32 timestamp;
47  /* DWORD 6 */
48  guint32 tx_dly; /* Note: if no timestamp, tx_dly will be in DWORD 5 */
49  } s;
50  } u;
51 };
52 
53 gboolean mausb_is_from_host(struct mausb_header *header);
54 guint8 mausb_ep_handle_ep_d(guint16 handle);
55 guint8 mausb_ep_handle_ep_num(guint16 handle);
56 guint8 mausb_ep_handle_dev_addr(guint16 handle);
57 guint8 mausb_ep_handle_bus_num(guint16 handle);
58 
59 void mausb_set_usb_conv_info(usb_conv_info_t *usb_conv_info,
60  struct mausb_header *header);
61 
62 #endif
63 
64 /*
65  * Editor modelines - https://www.wireshark.org/tools/modelines.html
66  *
67  * Local variables:
68  * c-basic-offset: 4
69  * tab-width: 8
70  * indent-tabs-mode: nil
71  * End:
72  *
73  * vi: set shiftwidth=4 tabstop=8 expandtab:
74  * :indentSize=4:tabSize=8:noTabs=true:
75  */
Definition: packet-usb.h:114
Definition: packet-mausb.h:18