VirtualBox

source: vbox/trunk/include/VBox/tapwin32.h@ 8006

Last change on this file since 8006 was 5999, checked in by vboxsync, 16 years ago

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/** @file
2 * VirtualBox - TAP for Windows definitions.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_tapwin32_h
27#define ___VBox_tapwin32_h
28
29#define TAP_DRIVER_MAJOR_VERSION 8
30#define TAP_DRIVER_MINOR_VERSION 2
31
32//=============
33// TAP IOCTLs
34//=============
35
36#pragma pack(4)
37typedef struct
38{
39 ULONG major;
40 ULONG minor;
41 ULONG debug;
42} TAP_VERSION;
43
44typedef struct
45{
46 LONG fConnect;
47} TAP_MEDIASTATUS;
48
49typedef struct
50{
51 ULONG cb;
52 PVOID pPacket;
53} TAP_SCATTER_GATHER_ITEM;
54
55/** Arbitrary maximum for sanity checks. */
56#define TAP_SCATTER_GATHER_MAX_PACKETS 64
57
58typedef struct
59{
60 ULONG cPackets;
61 TAP_SCATTER_GATHER_ITEM aPacket[1];
62} TAP_SCATTER_GATHER_LIST, *PTAP_SCATTER_GATHER_LIST;
63
64typedef struct
65{
66 ULONG cPackets;
67 TAP_SCATTER_GATHER_ITEM aPacket[TAP_SCATTER_GATHER_MAX_PACKETS];
68} TAP_SCATTER_GATHER_LIST_MAX, *PTAP_SCATTER_GATHER_LIST_MAX;
69
70#pragma pack()
71
72#define TAP_CONTROL_CODE(request,method) \
73 CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
74
75#define TAP_IOCTL_GET_MAC TAP_CONTROL_CODE (1, METHOD_BUFFERED)
76#define TAP_IOCTL_GET_VERSION TAP_CONTROL_CODE (2, METHOD_BUFFERED)
77#define TAP_IOCTL_GET_MTU TAP_CONTROL_CODE (3, METHOD_BUFFERED)
78#define TAP_IOCTL_GET_INFO TAP_CONTROL_CODE (4, METHOD_BUFFERED)
79#define TAP_IOCTL_CONFIG_POINT_TO_POINT TAP_CONTROL_CODE (5, METHOD_BUFFERED)
80#define TAP_IOCTL_SET_MEDIA_STATUS TAP_CONTROL_CODE (6, METHOD_BUFFERED)
81#define TAP_IOCTL_CONFIG_DHCP_MASQ TAP_CONTROL_CODE (7, METHOD_BUFFERED)
82#define TAP_IOCTL_GET_LOG_LINE TAP_CONTROL_CODE (8, METHOD_BUFFERED)
83#define TAP_IOCTL_CONFIG_DHCP_SET_OPT TAP_CONTROL_CODE (9, METHOD_BUFFERED)
84/* Starting with version 8.2 */
85#define TAP_IOCTL_TRANSFER_ETHPACKETS TAP_CONTROL_CODE (10, METHOD_BUFFERED)
86
87
88#endif
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use