VirtualBox

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

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

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/** @file
2 * VirtualBox - TAP for Windows definitions.
3 */
4
5/*
6 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * 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.
28 */
29
30#ifndef ___VBox_tapwin32_h
31#define ___VBox_tapwin32_h
32
33#define TAP_DRIVER_MAJOR_VERSION 8
34#define TAP_DRIVER_MINOR_VERSION 2
35
36//=============
37// TAP IOCTLs
38//=============
39
40#pragma pack(4)
41typedef struct
42{
43 ULONG major;
44 ULONG minor;
45 ULONG debug;
46} TAP_VERSION;
47
48typedef struct
49{
50 LONG fConnect;
51} TAP_MEDIASTATUS;
52
53typedef 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
62typedef struct
63{
64 ULONG cPackets;
65 TAP_SCATTER_GATHER_ITEM aPacket[1];
66} TAP_SCATTER_GATHER_LIST, *PTAP_SCATTER_GATHER_LIST;
67
68typedef 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
74#pragma pack()
75
76#define TAP_CONTROL_CODE(request,method) \
77 CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
78
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)
90
91
92#endif
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use