]> The Tcpdump Group git mirrors - libpcap/blob - pcap-usb.h
950465c510bdb9896d0eccfb839d1e09b25e66c9
[libpcap] / pcap-usb.h
1 /*
2 * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
3 * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino, CACE Technologies
16 * nor the names of its contributors may be used to endorse or promote
17 * products derived from this software without specific prior written
18 * permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * Basic USB data struct
33 * By Paolo Abeni <paolo.abeni@email.com>
34 *
35 */
36
37 #ifndef _PCAP_USB_STRUCTS_H__
38 #define _PCAP_USB_STRUCTS_H__
39
40 typedef enum {
41 URB_CONTROL_INPUT,
42 URB_CONTROL_OUTPUT,
43 URB_ISOCHRONOUS_INPUT,
44 URB_ISOCHRONOUS_OUTPUT,
45 URB_INTERRUPT_INPUT,
46 URB_INTERRUPT_OUTPUT,
47 URB_BULK_INPUT,
48 URB_BULK_OUTPUT,
49 URB_UNKNOWN
50 } pcap_urb_type_t;
51
52 typedef struct _usb_header {
53 bpf_u_int32 urb_type;
54 bpf_u_int32 device_address;
55 bpf_u_int32 endpoint_number;
56 bpf_u_int32 setup_packet;
57 } pcap_usb_header;
58
59 typedef struct _usb_setup {
60 bpf_u_int32 bmRequestType;
61 bpf_u_int32 bRequest;
62 bpf_u_int32 wValue;
63 bpf_u_int32 wIndex;
64 bpf_u_int32 wLength;
65 } pcap_usb_setup;
66
67 #endif