blob: 4c58b614dd0909e2b667ae5a0890fd50975ba96f [file] [log] [blame]
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00001/*
2 * Copyright (C) 1998 Marcus Meissner
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
Marcus Meissner30ef8771998-12-11 13:26:26 +000019#ifndef __WINE_RAS_H
20#define __WINE_RAS_H
21
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +000022#include <lmcons.h>
Marcus Meissner30ef8771998-12-11 13:26:26 +000023
François Gougetce03ac82000-12-24 20:44:08 +000024#ifdef __cplusplus
25extern "C" {
26#endif
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +000027#include <pshpack4.h>
François Gougetce03ac82000-12-24 20:44:08 +000028
Rein Klazes34a02f11999-11-07 05:49:28 +000029#define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
François Gougetce03ac82000-12-24 20:44:08 +000030#define RAS_MaxDeviceName 128
31#define RAS_MaxDeviceType 16
32#define RAS_MaxEntryName 256
33#define RAS_MaxPhoneNumber 128
Marcus Meissnerd0a58e22002-11-08 18:53:19 +000034#define RAS_MaxAreaCode 10
35#define RAS_MaxPadType 32
36#define RAS_MaxX25Address 200
37#define RAS_MaxFacilities 200
38#define RAS_MaxUserData 200
Alexandre Julliard6677ac42003-08-21 21:32:48 +000039#define RAS_MaxDnsSuffix 256
François Gougetce03ac82000-12-24 20:44:08 +000040
41DECLARE_HANDLE(HRASCONN);
Marcus Meissner30ef8771998-12-11 13:26:26 +000042
Marcus Meissnerd0a58e22002-11-08 18:53:19 +000043/* szDeviceType strings for RASDEVINFO */
44#define RASDT_Direct "direct"
45#define RASDT_Modem "modem"
46#define RASDT_Isdn "isdn"
47#define RASDT_X25 "x25"
48
49#define RASBASE 600
50#define ERROR_BUFFER_TOO_SMALL (RASBASE+3)
51#define ERROR_INVALID_SIZE (RASBASE+32)
52
53typedef struct tagRASDEVINFOA {
54 DWORD dwSize;
55 CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
56 CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
57} RASDEVINFOA, *LPRASDEVINFOA;
58
59typedef struct tagRASDEVINFOW {
60 DWORD dwSize;
61 WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
62 WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
63} RASDEVINFOW, *LPRASDEVINFOW;
64
65DECL_WINELIB_TYPE_AW(RASDEVINFO)
66DECL_WINELIB_TYPE_AW(LPRASDEVINFO)
67
Alexandre Julliarda3960291999-02-26 11:11:13 +000068typedef struct tagRASCONNA {
François Gougetce03ac82000-12-24 20:44:08 +000069 DWORD dwSize;
70 HRASCONN hRasConn;
71 CHAR szEntryName[ RAS_MaxEntryName + 1 ];
72 CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
73 CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
74 CHAR szPhonebook[ MAX_PATH ];
75 DWORD dwSubEntry;
Alexandre Julliarda3960291999-02-26 11:11:13 +000076} RASCONNA,*LPRASCONNA;
Marcus Meissner30ef8771998-12-11 13:26:26 +000077
François Gougetce03ac82000-12-24 20:44:08 +000078typedef struct tagRASCONNW {
79 DWORD dwSize;
80 HRASCONN hRasConn;
81 WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
82 WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
83 WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
84 WCHAR szPhonebook[ MAX_PATH ];
85 DWORD dwSubEntry;
86} RASCONNW,*LPRASCONNW;
87
88DECL_WINELIB_TYPE_AW(RASCONN)
89DECL_WINELIB_TYPE_AW(LPRASCONN)
90
91typedef struct tagRASENTRYNAMEA {
Rein Klazes34a02f11999-11-07 05:49:28 +000092 DWORD dwSize;
93 CHAR szEntryName[ RAS_MaxEntryName + 1 ];
François Gougetce03ac82000-12-24 20:44:08 +000094} RASENTRYNAMEA, *LPRASENTRYNAMEA;
Rein Klazes34a02f11999-11-07 05:49:28 +000095
François Gougetce03ac82000-12-24 20:44:08 +000096typedef struct tagRASENTRYNAMEW {
97 DWORD dwSize;
98 WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
99} RASENTRYNAMEW, *LPRASENTRYNAMEW;
100
101DECL_WINELIB_TYPE_AW(RASENTRYNAME)
102DECL_WINELIB_TYPE_AW(LPRASENTRYNAME)
103
104typedef struct tagRASDIALPARAMSA {
105 DWORD dwSize;
106 CHAR szEntryName[ RAS_MaxEntryName + 1 ];
107 CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
108 CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
109 CHAR szUserName[ UNLEN + 1 ];
110 CHAR szPassword[ PWLEN + 1 ];
111 CHAR szDomain[ DNLEN + 1 ];
112 DWORD dwSubEntry;
113 DWORD dwCallbackId;
114} RASDIALPARAMSA, *LPRASDIALPARAMSA;
115
116typedef struct tagRASDIALPARAMSW {
Rein Klazes34a02f11999-11-07 05:49:28 +0000117 DWORD dwSize;
118 WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
119 WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
120 WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
121 WCHAR szUserName[ UNLEN + 1 ];
122 WCHAR szPassword[ PWLEN + 1 ];
123 WCHAR szDomain[ DNLEN + 1 ];
124 DWORD dwSubEntry;
125 DWORD dwCallbackId;
François Gougetce03ac82000-12-24 20:44:08 +0000126} RASDIALPARAMSW, *LPRASDIALPARAMSW;
127
128DECL_WINELIB_TYPE_AW(RASDIALPARAMS)
129DECL_WINELIB_TYPE_AW(LPRASDIALPARAMS)
Rein Klazes34a02f11999-11-07 05:49:28 +0000130
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000131typedef struct tagRASIPADDR {
132 BYTE classA,classB,classC,classD;
133} RASIPADDR;
134
135#define RASEO_UseCountryAndAreaCodes 0x0001
136#define RASEO_SpecificIpAddr 0x0002
137#define RASEO_SpecificNameServers 0x0004
138#define RASEO_IpHeaderCompression 0x0008
139#define RASEO_RemoteDefaultGateway 0x0010
140#define RASEO_DisableLcpExtensions 0x0020
141#define RASEO_TerminalBeforeDial 0x0040
142#define RASEO_TerminalAfterDial 0x0080
143#define RASEO_ModemLights 0x0100
144#define RASEO_SwCompression 0x0200
145#define RASEO_RequireEncryptedPw 0x0400
146#define RASEO_RequireMsEncryptedPw 0x0800
147#define RASEO_RequireDataEncryption 0x1000
148#define RASEO_NetworkLogon 0x2000
149#define RASEO_UseLogonCredentials 0x4000
150#define RASEO_PromoteAlternates 0x8000
151typedef struct tagRASENTRYA {
152 DWORD dwSize;
153 DWORD dwfOptions;
154
155 /* Location */
156
157 DWORD dwCountryID;
158 DWORD dwCountryCode;
159 CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
160 CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
161 DWORD dwAlternateOffset;
162
163 /* IP related stuff */
164
165 RASIPADDR ipaddr;
166 RASIPADDR ipaddrDns;
167 RASIPADDR ipaddrDnsAlt;
168 RASIPADDR ipaddrWins;
169 RASIPADDR ipaddrWinsAlt;
170
171 /* Framing (for ppp/isdn etc...) */
172
173 DWORD dwFrameSize;
174 DWORD dwfNetProtocols;
175 DWORD dwFramingProtocol;
176
177 CHAR szScript[ MAX_PATH ];
178
179 CHAR szAutodialDll[ MAX_PATH ];
180 CHAR szAutodialFunc[ MAX_PATH ];
181
182 CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
183 CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
184
185 /* x25 only */
186
187 CHAR szX25PadType[ RAS_MaxPadType + 1 ];
188 CHAR szX25Address[ RAS_MaxX25Address + 1 ];
189 CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
190 CHAR szX25UserData[ RAS_MaxUserData + 1 ];
191 DWORD dwChannels;
192
193 DWORD dwReserved1;
194 DWORD dwReserved2;
195
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000196 /* Multilink and BAP */
197
198 DWORD dwSubEntries;
199 DWORD dwDialMode;
200 DWORD dwDialExtraPercent;
201 DWORD dwDialExtraSampleSeconds;
202 DWORD dwHangUpExtraPercent;
203 DWORD dwHangUpExtraSampleSeconds;
204
205 /* Idle time out */
206 DWORD dwIdleDisconnectSeconds;
207
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000208 DWORD dwType; /* entry type */
209 DWORD dwEncryptionType; /* type of encryption to use */
210 DWORD dwCustomAuthKey; /* authentication key for EAP */
211 GUID guidId; /* guid that represents the phone-book entry */
212 CHAR szCustomDialDll[MAX_PATH]; /* DLL for custom dialing */
213 DWORD dwVpnStrategy; /* specifies type of VPN protocol */
Alexandre Julliard6677ac42003-08-21 21:32:48 +0000214
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000215 DWORD dwfOptions2;
216 DWORD dwfOptions3;
217 CHAR szDnsSuffix[RAS_MaxDnsSuffix];
218 DWORD dwTcpWindowSize;
219 CHAR szPrerequisitePbk[MAX_PATH];
220 CHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
221 DWORD dwRedialCount;
222 DWORD dwRedialPause;
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000223} RASENTRYA, *LPRASENTRYA;
224
225typedef struct tagRASENTRYW {
226 DWORD dwSize;
227 DWORD dwfOptions;
228
229 /* Location */
230
231 DWORD dwCountryID;
232 DWORD dwCountryCode;
233 WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
234 WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
235 DWORD dwAlternateOffset;
236
237 /* IP related stuff */
238
239 RASIPADDR ipaddr;
240 RASIPADDR ipaddrDns;
241 RASIPADDR ipaddrDnsAlt;
242 RASIPADDR ipaddrWins;
243 RASIPADDR ipaddrWinsAlt;
244
245 /* Framing (for ppp/isdn etc...) */
246
247 DWORD dwFrameSize;
248 DWORD dwfNetProtocols;
249 DWORD dwFramingProtocol;
250
251 WCHAR szScript[ MAX_PATH ];
252
253 WCHAR szAutodialDll[ MAX_PATH ];
254 WCHAR szAutodialFunc[ MAX_PATH ];
255
256 WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
257 WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
258
259 /* x25 only */
260
261 WCHAR szX25PadType[ RAS_MaxPadType + 1 ];
262 WCHAR szX25Address[ RAS_MaxX25Address + 1 ];
263 WCHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
264 WCHAR szX25UserData[ RAS_MaxUserData + 1 ];
265 DWORD dwChannels;
266
267 DWORD dwReserved1;
268 DWORD dwReserved2;
269
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000270 /* Multilink and BAP */
271
272 DWORD dwSubEntries;
273 DWORD dwDialMode;
274 DWORD dwDialExtraPercent;
275 DWORD dwDialExtraSampleSeconds;
276 DWORD dwHangUpExtraPercent;
277 DWORD dwHangUpExtraSampleSeconds;
278
279 /* Idle time out */
280 DWORD dwIdleDisconnectSeconds;
281
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000282 DWORD dwType; /* entry type */
283 DWORD dwEncryptionType; /* type of encryption to use */
284 DWORD dwCustomAuthKey; /* authentication key for EAP */
285 GUID guidId; /* guid that represents the phone-book entry */
286 WCHAR szCustomDialDll[MAX_PATH]; /* DLL for custom dialing */
287 DWORD dwVpnStrategy; /* specifies type of VPN protocol */
Alexandre Julliard6677ac42003-08-21 21:32:48 +0000288
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000289 DWORD dwfOptions2;
290 DWORD dwfOptions3;
291 WCHAR szDnsSuffix[RAS_MaxDnsSuffix];
292 DWORD dwTcpWindowSize;
293 WCHAR szPrerequisitePbk[MAX_PATH];
294 WCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
295 DWORD dwRedialCount;
296 DWORD dwRedialPause;
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000297} RASENTRYW, *LPRASENTRYW;
298
299DECL_WINELIB_TYPE_AW(RASENTRY)
300
Francois Gougetc8ad3cb2003-06-13 18:52:36 +0000301DWORD WINAPI RasDeleteEntryA(LPCSTR,LPCSTR);
302DWORD WINAPI RasDeleteEntryW(LPCWSTR,LPCWSTR);
303#define RasDeleteEntry WINELIB_NAME_AW(RasDeleteEntry)
304DWORD WINAPI RasDeleteSubEntryA(LPCSTR,LPCSTR,DWORD);
305DWORD WINAPI RasDeleteSubEntryW(LPCWSTR,LPCWSTR,DWORD);
306#define RasDeleteSubEntry WINELIB_NAME_AW(RasDeleteSubEntry)
François Gougetce03ac82000-12-24 20:44:08 +0000307DWORD WINAPI RasEnumConnectionsA(LPRASCONNA,LPDWORD,LPDWORD);
308DWORD WINAPI RasEnumConnectionsW(LPRASCONNW,LPDWORD,LPDWORD);
309#define RasEnumConnections WINELIB_NAME_AW(RasEnumConnections)
Alexandre Julliard2fdc4dc2003-11-26 04:11:56 +0000310DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA,LPDWORD,LPDWORD);
311DWORD WINAPI RasEnumDevicesW(LPRASDEVINFOW,LPDWORD,LPDWORD);
312#define RasEnumDevices WINELIB_NAME_AW(RasEnumDevices)
Vincent Béron9a624912002-05-31 23:06:46 +0000313DWORD WINAPI RasEnumEntriesA(LPCSTR,LPCSTR,LPRASENTRYNAMEA,LPDWORD,LPDWORD);
314DWORD WINAPI RasEnumEntriesW(LPCWSTR,LPCWSTR,LPRASENTRYNAMEW,LPDWORD,LPDWORD);
François Gougetce03ac82000-12-24 20:44:08 +0000315#define RasEnumEntries WINELIB_NAME_AW(RasEnumEntries)
Vincent Béron9a624912002-05-31 23:06:46 +0000316DWORD WINAPI RasGetEntryDialParamsA(LPCSTR,LPRASDIALPARAMSA,LPBOOL);
317DWORD WINAPI RasGetEntryDialParamsW(LPCWSTR,LPRASDIALPARAMSW,LPBOOL);
François Gougetce03ac82000-12-24 20:44:08 +0000318#define RasGetEntryDialParams WINELIB_NAME_AW(RasGetEntryDialParams)
319DWORD WINAPI RasHangUpA(HRASCONN);
320DWORD WINAPI RasHangUpW(HRASCONN);
321#define RasHangUp WINELIB_NAME_AW(RasHangUp)
Marcus Meissnerd0a58e22002-11-08 18:53:19 +0000322DWORD WINAPI RasValidateEntryNameA(LPCSTR lpszPhonebook, LPCSTR lpszEntry);
323DWORD WINAPI RasValidateEntryNameW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry);
324#define RasValidateEntryName WINELIB_NAME_AW(RasValidateEntryName)
325DWORD WINAPI RasSetEntryPropertiesA(LPCSTR lpszPhonebook, LPCSTR lpszEntry,
326 LPRASENTRYA lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
327 DWORD dwDeviceInfoSize);
328DWORD WINAPI RasSetEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry,
329 LPRASENTRYW lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
330 DWORD dwDeviceInfoSize);
331#define RasSetEntryProperties WINELIB_NAME_AW(RasSetEntryProperties)
332DWORD WINAPI RasGetAutodialParamA(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
333DWORD WINAPI RasGetAutodialParamW(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
334#define RasGetAutodialParam WINELIB_NAME_AW(RasGetAutodialParam)
335DWORD WINAPI RasSetAutodialEnableA(DWORD dwDialingLocation, BOOL fEnabled);
336DWORD WINAPI RasSetAutodialEnableW(DWORD dwDialingLocation, BOOL fEnabled);
337#define RasSetAutodialEnable WINELIB_NAME_AW(RasSetAutodialEnable)
Rein Klazes34a02f11999-11-07 05:49:28 +0000338
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +0000339#include <poppack.h>
François Gougetce03ac82000-12-24 20:44:08 +0000340#ifdef __cplusplus
341}
342#endif
Rein Klazes34a02f11999-11-07 05:49:28 +0000343
Marcus Meissner30ef8771998-12-11 13:26:26 +0000344#endif