[1] | 1 | /** @file
|
---|
| 2 | * VirtualBox - TAP for Windows definitions.
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | /*
|
---|
[8155] | 6 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
[1] | 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
|
---|
[5999] | 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.
|
---|
[8155] | 24 | *
|
---|
| 25 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
| 26 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
| 27 | * additional information or have any questions.
|
---|
[1] | 28 | */
|
---|
| 29 |
|
---|
[3632] | 30 | #ifndef ___VBox_tapwin32_h
|
---|
| 31 | #define ___VBox_tapwin32_h
|
---|
[1] | 32 |
|
---|
[505] | 33 | #define TAP_DRIVER_MAJOR_VERSION 8
|
---|
[554] | 34 | #define TAP_DRIVER_MINOR_VERSION 2
|
---|
[1] | 35 |
|
---|
| 36 | //=============
|
---|
| 37 | // TAP IOCTLs
|
---|
| 38 | //=============
|
---|
| 39 |
|
---|
[554] | 40 | #pragma pack(4)
|
---|
[1] | 41 | typedef struct
|
---|
| 42 | {
|
---|
[505] | 43 | ULONG major;
|
---|
| 44 | ULONG minor;
|
---|
| 45 | ULONG debug;
|
---|
[1] | 46 | } TAP_VERSION;
|
---|
| 47 |
|
---|
| 48 | typedef struct
|
---|
| 49 | {
|
---|
| 50 | LONG fConnect;
|
---|
| 51 | } TAP_MEDIASTATUS;
|
---|
| 52 |
|
---|
[554] | 53 | typedef struct
|
---|
| 54 | {
|
---|
| 55 | ULONG cb;
|
---|
| 56 | PVOID pPacket;
|
---|
| 57 | } TAP_SCATTER_GATHER_ITEM;
|
---|
| 58 |
|
---|
| 59 | /** Arbitrary maximum for sanity checks. */
|
---|
| 60 | #define TAP_SCATTER_GATHER_MAX_PACKETS 64
|
---|
| 61 |
|
---|
| 62 | typedef struct
|
---|
| 63 | {
|
---|
| 64 | ULONG cPackets;
|
---|
| 65 | TAP_SCATTER_GATHER_ITEM aPacket[1];
|
---|
| 66 | } TAP_SCATTER_GATHER_LIST, *PTAP_SCATTER_GATHER_LIST;
|
---|
[561] | 67 |
|
---|
| 68 | typedef struct
|
---|
| 69 | {
|
---|
| 70 | ULONG cPackets;
|
---|
| 71 | TAP_SCATTER_GATHER_ITEM aPacket[TAP_SCATTER_GATHER_MAX_PACKETS];
|
---|
| 72 | } TAP_SCATTER_GATHER_LIST_MAX, *PTAP_SCATTER_GATHER_LIST_MAX;
|
---|
| 73 |
|
---|
[554] | 74 | #pragma pack()
|
---|
| 75 |
|
---|
[1] | 76 | #define TAP_CONTROL_CODE(request,method) \
|
---|
| 77 | CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
|
---|
| 78 |
|
---|
[554] | 79 | #define TAP_IOCTL_GET_MAC TAP_CONTROL_CODE (1, METHOD_BUFFERED)
|
---|
| 80 | #define TAP_IOCTL_GET_VERSION TAP_CONTROL_CODE (2, METHOD_BUFFERED)
|
---|
| 81 | #define TAP_IOCTL_GET_MTU TAP_CONTROL_CODE (3, METHOD_BUFFERED)
|
---|
| 82 | #define TAP_IOCTL_GET_INFO TAP_CONTROL_CODE (4, METHOD_BUFFERED)
|
---|
| 83 | #define TAP_IOCTL_CONFIG_POINT_TO_POINT TAP_CONTROL_CODE (5, METHOD_BUFFERED)
|
---|
| 84 | #define TAP_IOCTL_SET_MEDIA_STATUS TAP_CONTROL_CODE (6, METHOD_BUFFERED)
|
---|
| 85 | #define TAP_IOCTL_CONFIG_DHCP_MASQ TAP_CONTROL_CODE (7, METHOD_BUFFERED)
|
---|
| 86 | #define TAP_IOCTL_GET_LOG_LINE TAP_CONTROL_CODE (8, METHOD_BUFFERED)
|
---|
| 87 | #define TAP_IOCTL_CONFIG_DHCP_SET_OPT TAP_CONTROL_CODE (9, METHOD_BUFFERED)
|
---|
| 88 | /* Starting with version 8.2 */
|
---|
| 89 | #define TAP_IOCTL_TRANSFER_ETHPACKETS TAP_CONTROL_CODE (10, METHOD_BUFFERED)
|
---|
[1] | 90 |
|
---|
| 91 |
|
---|
[3633] | 92 | #endif
|
---|