Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
17
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_num(guint16 handle);
55 guint8 mausb_ep_handle_dev_addr(guint16 handle);
56 guint8 mausb_ep_handle_bus_num(guint16 handle);
57
58 void mausb_set_usb_conv_info(usb_conv_info_t *usb_conv_info,
59 struct mausb_header *header);
60
61 #endif
62
63 /*
64 * Editor modelines - http://www.wireshark.org/tools/modelines.html
65 *
66 * Local variables:
67 * c-basic-offset: 4
68 * tab-width: 8
69 * indent-tabs-mode: nil
70 * End:
71 *
72 * vi: set shiftwidth=4 tabstop=8 expandtab:
73 * :indentSize=4:tabSize=8:noTabs=true:
74 */
mausb_header
Definition: packet-mausb.h:18
_usb_conv_info_t
Definition: packet-usb.h:86