| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
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 uint8_t ver_flags;
21 uint8_t type;
22 uint16_t length;
23 /* DWORD 1 */
24 uint16_t handle;
25 uint8_t ma_dev_addr;
26 uint8_t mass_id;
27 /* DWORD 2 */
28 uint8_t status;
29 union {
30 uint16_t token;
31 struct {
32 uint8_t eps_tflags;
33 union {
34 uint16_t stream_id;
35 uint16_t num_headers_iflags;
36 } u1;
37 /* DWORD 3 */
38 uint32_t seq_num; /* Note: only 24 bits used */
39 uint8_t req_id;
40 /* DWORD 4 */
41 union {
42 uint32_t credit;
43 uint32_t present_time_num_seg;
44 } u2;
45 /* DWORD 5 */
46 uint32_t timestamp;
47 /* DWORD 6 */
48 uint32_t tx_dly; /* Note: if no timestamp, tx_dly will be in DWORD 5 */
49 } s;
50 } u;
51};
52
53 bool mausb_is_from_host(struct mausb_header *header);
54uint8_t mausb_ep_handle_ep_d(uint16_t handle);
55uint8_t mausb_ep_handle_ep_num(uint16_t handle);
56uint8_t mausb_ep_handle_dev_addr(uint16_t handle);
57uint8_t mausb_ep_handle_bus_num(uint16_t handle);
58
59 void mausb_set_urb_info(urb_info_t *urb, struct mausb_header *header);
60
61#endif
62
63/*
64 * Editor modelines - https://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 */
_urb_info_t
Definition packet-usb.h:141
mausb_header
Definition packet-mausb.h:18