OpenVPN
tap.h
Go to the documentation of this file.
1 /*
2  * tapctl -- Utility to manipulate TUN/TAP interfaces on Windows
3  * https://community.openvpn.net/openvpn/wiki/Tapctl
4  *
5  * Copyright (C) 2018 Simon Rozman <simon@rozman.si>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2
9  * as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef TAP_H
22 #define TAP_H
23 
24 #include <windows.h>
25 #include "basic.h"
26 
27 
49 DWORD
51  _In_opt_ HWND hwndParent,
52  _In_opt_ LPCTSTR szDeviceDescription,
53  _Inout_ LPBOOL pbRebootRequired,
54  _Out_ LPGUID pguidInterface);
55 
56 
75 DWORD
77  _In_opt_ HWND hwndParent,
78  _In_ LPCGUID pguidInterface,
79  _Inout_ LPBOOL pbRebootRequired);
80 
81 
91 DWORD
93  _In_ LPCGUID pguidInterface,
94  _In_ LPCTSTR szName);
95 
96 
101 {
102  GUID guid;
103  LPTSTR szzHardwareIDs;
104  LPTSTR szName;
107 };
108 
109 
128 DWORD
130  _In_opt_ HWND hwndParent,
131  _Out_ struct tap_interface_node **ppInterfaceList,
132  _In_ BOOL bAll);
133 
134 
140 void
142  _In_ struct tap_interface_node *pInterfaceList);
143 
144 #endif /* ifndef TAP_H */
LPCTSTR szName
Definition: openvpnmsica.c:67
LPTSTR szName
Device hardware ID(s)
Definition: tap.h:104
DWORD tap_delete_interface(_In_opt_ HWND hwndParent, _In_ LPCGUID pguidInterface, _Inout_ LPBOOL pbRebootRequired)
Deletes an interface.
Definition: tap.c:753
#define _Out_
Definition: basic.h:46
#define _In_
Definition: basic.h:34
struct tap_interface_node * pNext
Interface name.
Definition: tap.h:106
DWORD tap_list_interfaces(_In_opt_ HWND hwndParent, _Out_ struct tap_interface_node **ppInterfaceList, _In_ BOOL bAll)
Creates a list of available network interfaces.
Definition: tap.c:954
#define _Inout_
Definition: basic.h:43
LPTSTR szzHardwareIDs
Interface GUID.
Definition: tap.h:103
DWORD tap_create_interface(_In_opt_ HWND hwndParent, _In_opt_ LPCTSTR szDeviceDescription, _Inout_ LPBOOL pbRebootRequired, _Out_ LPGUID pguidInterface)
Creates a TUN/TAP interface.
Definition: tap.c:448
Network interface list node.
Definition: tap.h:100
DWORD tap_set_interface_name(_In_ LPCGUID pguidInterface, _In_ LPCTSTR szName)
Sets interface name.
Definition: tap.c:878
#define _In_opt_
Definition: basic.h:37
void tap_free_interface_list(_In_ struct tap_interface_node *pInterfaceList)
Frees a list of network interfaces.
Definition: tap.c:1163