VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.h

Last change on this file was 106061, checked in by vboxsync, 3 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: VBoxUsbRt.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox USB R0 runtime
4 */
5/*
6 * Copyright (C) 2011-2024 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.virtualbox.org.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
26 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
27 * in the VirtualBox distribution, in which case the provisions of the
28 * CDDL are applicable instead of those of the GPL.
29 *
30 * You may elect to license modified versions of this file under the
31 * terms and conditions of either the GPL or the CDDL or both.
32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
34 */
35
36#ifndef VBOX_INCLUDED_SRC_VBoxUSB_win_dev_VBoxUsbRt_h
37#define VBOX_INCLUDED_SRC_VBoxUSB_win_dev_VBoxUsbRt_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include "VBoxUsbCmn.h"
43#include "../cmn/VBoxUsbIdc.h"
44
45#define VBOXUSBRT_MAX_CFGS 4
46
47typedef struct VBOXUSB_PIPE_INFO {
48 UCHAR EndpointAddress;
49 ULONG NextScheduledFrame;
50} VBOXUSB_PIPE_INFO;
51
52typedef struct VBOXUSB_IFACE_INFO {
53 USBD_INTERFACE_INFORMATION *pInterfaceInfo;
54 VBOXUSB_PIPE_INFO *pPipeInfo;
55} VBOXUSB_IFACE_INFO;
56
57typedef struct VBOXUSB_RT
58{
59 UNICODE_STRING IfName;
60
61 HANDLE hPipe0;
62 HANDLE hConfiguration;
63 uint32_t uConfigValue;
64
65 uint32_t uNumInterfaces;
66 USB_DEVICE_DESCRIPTOR *devdescr;
67 USB_CONFIGURATION_DESCRIPTOR *cfgdescr[VBOXUSBRT_MAX_CFGS];
68
69 VBOXUSB_IFACE_INFO *pVBIfaceInfo;
70
71 uint16_t idVendor, idProduct, bcdDevice;
72 char szSerial[MAX_USB_SERIAL_STRING];
73 BOOLEAN fIsHighSpeed;
74
75 HVBOXUSBIDCDEV hMonDev;
76 PFILE_OBJECT pOwner;
77} VBOXUSB_RT, *PVBOXUSB_RT;
78
79typedef struct VBOXUSBRT_IDC
80{
81 PDEVICE_OBJECT pDevice;
82 PFILE_OBJECT pFile;
83} VBOXUSBRT_IDC, *PVBOXUSBRT_IDC;
84
85DECLHIDDEN(NTSTATUS) vboxUsbRtGlobalsInit();
86DECLHIDDEN(VOID) vboxUsbRtGlobalsTerm();
87
88DECLHIDDEN(NTSTATUS) vboxUsbRtInit(PVBOXUSBDEV_EXT pDevExt);
89DECLHIDDEN(VOID) vboxUsbRtClear(PVBOXUSBDEV_EXT pDevExt);
90DECLHIDDEN(NTSTATUS) vboxUsbRtRm(PVBOXUSBDEV_EXT pDevExt);
91DECLHIDDEN(NTSTATUS) vboxUsbRtStart(PVBOXUSBDEV_EXT pDevExt);
92
93DECLHIDDEN(NTSTATUS) vboxUsbRtDispatch(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp);
94DECLHIDDEN(NTSTATUS) vboxUsbRtCreate(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp);
95DECLHIDDEN(NTSTATUS) vboxUsbRtClose(PVBOXUSBDEV_EXT pDevExt, PIRP pIrp);
96
97#endif /* !VBOX_INCLUDED_SRC_VBoxUSB_win_dev_VBoxUsbRt_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette