DECLARE_OLD_HANDLE is not used anymore.
[wine.git] / include / ras.h
blob4c58b614dd0909e2b667ae5a0890fd50975ba96f
1 /*
2 * Copyright (C) 1998 Marcus Meissner
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.
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.
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
19 #ifndef __WINE_RAS_H
20 #define __WINE_RAS_H
22 #include <lmcons.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 #include <pshpack4.h>
29 #define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
30 #define RAS_MaxDeviceName 128
31 #define RAS_MaxDeviceType 16
32 #define RAS_MaxEntryName 256
33 #define RAS_MaxPhoneNumber 128
34 #define RAS_MaxAreaCode 10
35 #define RAS_MaxPadType 32
36 #define RAS_MaxX25Address 200
37 #define RAS_MaxFacilities 200
38 #define RAS_MaxUserData 200
39 #define RAS_MaxDnsSuffix 256
41 DECLARE_HANDLE(HRASCONN);
43 /* szDeviceType strings for RASDEVINFO */
44 #define RASDT_Direct "direct"
45 #define RASDT_Modem "modem"
46 #define RASDT_Isdn "isdn"
47 #define RASDT_X25 "x25"
49 #define RASBASE 600
50 #define ERROR_BUFFER_TOO_SMALL (RASBASE+3)
51 #define ERROR_INVALID_SIZE (RASBASE+32)
53 typedef struct tagRASDEVINFOA {
54 DWORD dwSize;
55 CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
56 CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
57 } RASDEVINFOA, *LPRASDEVINFOA;
59 typedef struct tagRASDEVINFOW {
60 DWORD dwSize;
61 WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
62 WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
63 } RASDEVINFOW, *LPRASDEVINFOW;
65 DECL_WINELIB_TYPE_AW(RASDEVINFO)
66 DECL_WINELIB_TYPE_AW(LPRASDEVINFO)
68 typedef struct tagRASCONNA {
69 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;
76 } RASCONNA,*LPRASCONNA;
78 typedef 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;
88 DECL_WINELIB_TYPE_AW(RASCONN)
89 DECL_WINELIB_TYPE_AW(LPRASCONN)
91 typedef struct tagRASENTRYNAMEA {
92 DWORD dwSize;
93 CHAR szEntryName[ RAS_MaxEntryName + 1 ];
94 } RASENTRYNAMEA, *LPRASENTRYNAMEA;
96 typedef struct tagRASENTRYNAMEW {
97 DWORD dwSize;
98 WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
99 } RASENTRYNAMEW, *LPRASENTRYNAMEW;
101 DECL_WINELIB_TYPE_AW(RASENTRYNAME)
102 DECL_WINELIB_TYPE_AW(LPRASENTRYNAME)
104 typedef 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;
116 typedef struct tagRASDIALPARAMSW {
117 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;
126 } RASDIALPARAMSW, *LPRASDIALPARAMSW;
128 DECL_WINELIB_TYPE_AW(RASDIALPARAMS)
129 DECL_WINELIB_TYPE_AW(LPRASDIALPARAMS)
131 typedef struct tagRASIPADDR {
132 BYTE classA,classB,classC,classD;
133 } RASIPADDR;
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
151 typedef struct tagRASENTRYA {
152 DWORD dwSize;
153 DWORD dwfOptions;
155 /* Location */
157 DWORD dwCountryID;
158 DWORD dwCountryCode;
159 CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
160 CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
161 DWORD dwAlternateOffset;
163 /* IP related stuff */
165 RASIPADDR ipaddr;
166 RASIPADDR ipaddrDns;
167 RASIPADDR ipaddrDnsAlt;
168 RASIPADDR ipaddrWins;
169 RASIPADDR ipaddrWinsAlt;
171 /* Framing (for ppp/isdn etc...) */
173 DWORD dwFrameSize;
174 DWORD dwfNetProtocols;
175 DWORD dwFramingProtocol;
177 CHAR szScript[ MAX_PATH ];
179 CHAR szAutodialDll[ MAX_PATH ];
180 CHAR szAutodialFunc[ MAX_PATH ];
182 CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
183 CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
185 /* x25 only */
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;
193 DWORD dwReserved1;
194 DWORD dwReserved2;
196 /* Multilink and BAP */
198 DWORD dwSubEntries;
199 DWORD dwDialMode;
200 DWORD dwDialExtraPercent;
201 DWORD dwDialExtraSampleSeconds;
202 DWORD dwHangUpExtraPercent;
203 DWORD dwHangUpExtraSampleSeconds;
205 /* Idle time out */
206 DWORD dwIdleDisconnectSeconds;
208 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 */
215 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;
223 } RASENTRYA, *LPRASENTRYA;
225 typedef struct tagRASENTRYW {
226 DWORD dwSize;
227 DWORD dwfOptions;
229 /* Location */
231 DWORD dwCountryID;
232 DWORD dwCountryCode;
233 WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
234 WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
235 DWORD dwAlternateOffset;
237 /* IP related stuff */
239 RASIPADDR ipaddr;
240 RASIPADDR ipaddrDns;
241 RASIPADDR ipaddrDnsAlt;
242 RASIPADDR ipaddrWins;
243 RASIPADDR ipaddrWinsAlt;
245 /* Framing (for ppp/isdn etc...) */
247 DWORD dwFrameSize;
248 DWORD dwfNetProtocols;
249 DWORD dwFramingProtocol;
251 WCHAR szScript[ MAX_PATH ];
253 WCHAR szAutodialDll[ MAX_PATH ];
254 WCHAR szAutodialFunc[ MAX_PATH ];
256 WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
257 WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
259 /* x25 only */
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;
267 DWORD dwReserved1;
268 DWORD dwReserved2;
270 /* Multilink and BAP */
272 DWORD dwSubEntries;
273 DWORD dwDialMode;
274 DWORD dwDialExtraPercent;
275 DWORD dwDialExtraSampleSeconds;
276 DWORD dwHangUpExtraPercent;
277 DWORD dwHangUpExtraSampleSeconds;
279 /* Idle time out */
280 DWORD dwIdleDisconnectSeconds;
282 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 */
289 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;
297 } RASENTRYW, *LPRASENTRYW;
299 DECL_WINELIB_TYPE_AW(RASENTRY)
301 DWORD WINAPI RasDeleteEntryA(LPCSTR,LPCSTR);
302 DWORD WINAPI RasDeleteEntryW(LPCWSTR,LPCWSTR);
303 #define RasDeleteEntry WINELIB_NAME_AW(RasDeleteEntry)
304 DWORD WINAPI RasDeleteSubEntryA(LPCSTR,LPCSTR,DWORD);
305 DWORD WINAPI RasDeleteSubEntryW(LPCWSTR,LPCWSTR,DWORD);
306 #define RasDeleteSubEntry WINELIB_NAME_AW(RasDeleteSubEntry)
307 DWORD WINAPI RasEnumConnectionsA(LPRASCONNA,LPDWORD,LPDWORD);
308 DWORD WINAPI RasEnumConnectionsW(LPRASCONNW,LPDWORD,LPDWORD);
309 #define RasEnumConnections WINELIB_NAME_AW(RasEnumConnections)
310 DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA,LPDWORD,LPDWORD);
311 DWORD WINAPI RasEnumDevicesW(LPRASDEVINFOW,LPDWORD,LPDWORD);
312 #define RasEnumDevices WINELIB_NAME_AW(RasEnumDevices)
313 DWORD WINAPI RasEnumEntriesA(LPCSTR,LPCSTR,LPRASENTRYNAMEA,LPDWORD,LPDWORD);
314 DWORD WINAPI RasEnumEntriesW(LPCWSTR,LPCWSTR,LPRASENTRYNAMEW,LPDWORD,LPDWORD);
315 #define RasEnumEntries WINELIB_NAME_AW(RasEnumEntries)
316 DWORD WINAPI RasGetEntryDialParamsA(LPCSTR,LPRASDIALPARAMSA,LPBOOL);
317 DWORD WINAPI RasGetEntryDialParamsW(LPCWSTR,LPRASDIALPARAMSW,LPBOOL);
318 #define RasGetEntryDialParams WINELIB_NAME_AW(RasGetEntryDialParams)
319 DWORD WINAPI RasHangUpA(HRASCONN);
320 DWORD WINAPI RasHangUpW(HRASCONN);
321 #define RasHangUp WINELIB_NAME_AW(RasHangUp)
322 DWORD WINAPI RasValidateEntryNameA(LPCSTR lpszPhonebook, LPCSTR lpszEntry);
323 DWORD WINAPI RasValidateEntryNameW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry);
324 #define RasValidateEntryName WINELIB_NAME_AW(RasValidateEntryName)
325 DWORD WINAPI RasSetEntryPropertiesA(LPCSTR lpszPhonebook, LPCSTR lpszEntry,
326 LPRASENTRYA lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
327 DWORD dwDeviceInfoSize);
328 DWORD WINAPI RasSetEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry,
329 LPRASENTRYW lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
330 DWORD dwDeviceInfoSize);
331 #define RasSetEntryProperties WINELIB_NAME_AW(RasSetEntryProperties)
332 DWORD WINAPI RasGetAutodialParamA(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
333 DWORD WINAPI RasGetAutodialParamW(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
334 #define RasGetAutodialParam WINELIB_NAME_AW(RasGetAutodialParam)
335 DWORD WINAPI RasSetAutodialEnableA(DWORD dwDialingLocation, BOOL fEnabled);
336 DWORD WINAPI RasSetAutodialEnableW(DWORD dwDialingLocation, BOOL fEnabled);
337 #define RasSetAutodialEnable WINELIB_NAME_AW(RasSetAutodialEnable)
339 #include <poppack.h>
340 #ifdef __cplusplus
342 #endif
344 #endif