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
30 #define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
31 #define RAS_MaxDeviceName 128
32 #define RAS_MaxDeviceType 16
33 #define RAS_MaxEntryName 256
34 #define RAS_MaxPhoneNumber 128
35 #define RAS_MaxAreaCode 10
36 #define RAS_MaxPadType 32
37 #define RAS_MaxX25Address 200
38 #define RAS_MaxFacilities 200
39 #define RAS_MaxUserData 200
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"
50 #define ERROR_BUFFER_TOO_SMALL (RASBASE+3)
51 #define ERROR_INVALID_SIZE (RASBASE+32)
53 typedef struct tagRASDEVINFOA
{
55 CHAR szDeviceType
[ RAS_MaxDeviceType
+ 1 ];
56 CHAR szDeviceName
[ RAS_MaxDeviceName
+ 1 ];
57 } RASDEVINFOA
, *LPRASDEVINFOA
;
59 typedef struct tagRASDEVINFOW
{
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
{
71 CHAR szEntryName
[ RAS_MaxEntryName
+ 1 ];
72 CHAR szDeviceType
[ RAS_MaxDeviceType
+ 1 ];
73 CHAR szDeviceName
[ RAS_MaxDeviceName
+ 1 ];
74 CHAR szPhonebook
[ MAX_PATH
];
76 } RASCONNA
,*LPRASCONNA
;
78 typedef struct tagRASCONNW
{
81 WCHAR szEntryName
[ RAS_MaxEntryName
+ 1 ];
82 WCHAR szDeviceType
[ RAS_MaxDeviceType
+ 1 ];
83 WCHAR szDeviceName
[ RAS_MaxDeviceName
+ 1 ];
84 WCHAR szPhonebook
[ MAX_PATH
];
86 } RASCONNW
,*LPRASCONNW
;
88 DECL_WINELIB_TYPE_AW(RASCONN
)
89 DECL_WINELIB_TYPE_AW(LPRASCONN
)
91 typedef struct tagRASENTRYNAMEA
{
93 CHAR szEntryName
[ RAS_MaxEntryName
+ 1 ];
94 } RASENTRYNAMEA
, *LPRASENTRYNAMEA
;
96 typedef struct tagRASENTRYNAMEW
{
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
{
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 ];
114 } RASDIALPARAMSA
, *LPRASDIALPARAMSA
;
116 typedef struct tagRASDIALPARAMSW
{
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 ];
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
;
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
{
159 CHAR szAreaCode
[ RAS_MaxAreaCode
+ 1 ];
160 CHAR szLocalPhoneNumber
[ RAS_MaxPhoneNumber
+ 1 ];
161 DWORD dwAlternateOffset
;
163 /* IP related stuff */
167 RASIPADDR ipaddrDnsAlt
;
168 RASIPADDR ipaddrWins
;
169 RASIPADDR ipaddrWinsAlt
;
171 /* Framing (for ppp/isdn etc...) */
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 ];
187 CHAR szX25PadType
[ RAS_MaxPadType
+ 1 ];
188 CHAR szX25Address
[ RAS_MaxX25Address
+ 1 ];
189 CHAR szX25Facilities
[ RAS_MaxFacilities
+ 1 ];
190 CHAR szX25UserData
[ RAS_MaxUserData
+ 1 ];
196 #if (WINVER >= 0x401)
198 /* Multilink and BAP */
202 DWORD dwDialExtraPercent
;
203 DWORD dwDialExtraSampleSeconds
;
204 DWORD dwHangUpExtraPercent
;
205 DWORD dwHangUpExtraSampleSeconds
;
208 DWORD dwIdleDisconnectSeconds
;
211 #if (WINVER >= 0x500)
213 DWORD dwType
; /* entry type */
214 DWORD dwEncryptionType
; /* type of encryption to use */
215 DWORD dwCustomAuthKey
; /* authentication key for EAP */
216 GUID guidId
; /* guid that represents the phone-book entry */
217 CHAR szCustomDialDll
[MAX_PATH
]; /* DLL for custom dialing */
218 DWORD dwVpnStrategy
; /* specifies type of VPN protocol */
220 #if (WINVER >= 0x501)
223 CHAR szDnsSuffix
[RAS_MaxDnsSuffix
];
224 DWORD dwTcpWindowSize
;
225 CHAR szPrerequisitePbk
[MAX_PATH
];
226 CHAR szPrerequisiteEntry
[RAS_MaxEntryName
+ 1];
230 } RASENTRYA
, *LPRASENTRYA
;
232 typedef struct tagRASENTRYW
{
240 WCHAR szAreaCode
[ RAS_MaxAreaCode
+ 1 ];
241 WCHAR szLocalPhoneNumber
[ RAS_MaxPhoneNumber
+ 1 ];
242 DWORD dwAlternateOffset
;
244 /* IP related stuff */
248 RASIPADDR ipaddrDnsAlt
;
249 RASIPADDR ipaddrWins
;
250 RASIPADDR ipaddrWinsAlt
;
252 /* Framing (for ppp/isdn etc...) */
255 DWORD dwfNetProtocols
;
256 DWORD dwFramingProtocol
;
258 WCHAR szScript
[ MAX_PATH
];
260 WCHAR szAutodialDll
[ MAX_PATH
];
261 WCHAR szAutodialFunc
[ MAX_PATH
];
263 WCHAR szDeviceType
[ RAS_MaxDeviceType
+ 1 ];
264 WCHAR szDeviceName
[ RAS_MaxDeviceName
+ 1 ];
268 WCHAR szX25PadType
[ RAS_MaxPadType
+ 1 ];
269 WCHAR szX25Address
[ RAS_MaxX25Address
+ 1 ];
270 WCHAR szX25Facilities
[ RAS_MaxFacilities
+ 1 ];
271 WCHAR szX25UserData
[ RAS_MaxUserData
+ 1 ];
277 #if (WINVER >= 0x401)
279 /* Multilink and BAP */
283 DWORD dwDialExtraPercent
;
284 DWORD dwDialExtraSampleSeconds
;
285 DWORD dwHangUpExtraPercent
;
286 DWORD dwHangUpExtraSampleSeconds
;
289 DWORD dwIdleDisconnectSeconds
;
292 #if (WINVER >= 0x500)
294 DWORD dwType
; /* entry type */
295 DWORD dwEncryptionType
; /* type of encryption to use */
296 DWORD dwCustomAuthKey
; /* authentication key for EAP */
297 GUID guidId
; /* guid that represents the phone-book entry */
298 WCHAR szCustomDialDll
[MAX_PATH
]; /* DLL for custom dialing */
299 DWORD dwVpnStrategy
; /* specifies type of VPN protocol */
301 #if (WINVER >= 0x501)
304 WCHAR szDnsSuffix
[RAS_MaxDnsSuffix
];
305 DWORD dwTcpWindowSize
;
306 WCHAR szPrerequisitePbk
[MAX_PATH
];
307 WCHAR szPrerequisiteEntry
[RAS_MaxEntryName
+ 1];
311 } RASENTRYW
, *LPRASENTRYW
;
313 DECL_WINELIB_TYPE_AW(RASENTRY
)
316 DWORD WINAPI
RasEnumConnectionsA(LPRASCONNA
,LPDWORD
,LPDWORD
);
317 DWORD WINAPI
RasEnumConnectionsW(LPRASCONNW
,LPDWORD
,LPDWORD
);
318 #define RasEnumConnections WINELIB_NAME_AW(RasEnumConnections)
319 DWORD WINAPI
RasEnumEntriesA(LPCSTR
,LPCSTR
,LPRASENTRYNAMEA
,LPDWORD
,LPDWORD
);
320 DWORD WINAPI
RasEnumEntriesW(LPCWSTR
,LPCWSTR
,LPRASENTRYNAMEW
,LPDWORD
,LPDWORD
);
321 #define RasEnumEntries WINELIB_NAME_AW(RasEnumEntries)
322 DWORD WINAPI
RasGetEntryDialParamsA(LPCSTR
,LPRASDIALPARAMSA
,LPBOOL
);
323 DWORD WINAPI
RasGetEntryDialParamsW(LPCWSTR
,LPRASDIALPARAMSW
,LPBOOL
);
324 #define RasGetEntryDialParams WINELIB_NAME_AW(RasGetEntryDialParams)
325 DWORD WINAPI
RasHangUpA(HRASCONN
);
326 DWORD WINAPI
RasHangUpW(HRASCONN
);
327 #define RasHangUp WINELIB_NAME_AW(RasHangUp)
328 DWORD WINAPI
RasValidateEntryNameA(LPCSTR lpszPhonebook
, LPCSTR lpszEntry
);
329 DWORD WINAPI
RasValidateEntryNameW(LPCWSTR lpszPhonebook
, LPCWSTR lpszEntry
);
330 #define RasValidateEntryName WINELIB_NAME_AW(RasValidateEntryName)
331 DWORD WINAPI
RasSetEntryPropertiesA(LPCSTR lpszPhonebook
, LPCSTR lpszEntry
,
332 LPRASENTRYA lpRasEntry
, DWORD dwEntryInfoSize
, LPBYTE lpbDeviceInfo
,
333 DWORD dwDeviceInfoSize
);
334 DWORD WINAPI
RasSetEntryPropertiesW(LPCWSTR lpszPhonebook
, LPCWSTR lpszEntry
,
335 LPRASENTRYW lpRasEntry
, DWORD dwEntryInfoSize
, LPBYTE lpbDeviceInfo
,
336 DWORD dwDeviceInfoSize
);
337 #define RasSetEntryProperties WINELIB_NAME_AW(RasSetEntryProperties)
338 DWORD WINAPI
RasGetAutodialParamA(DWORD dwKey
, LPVOID lpvValue
, LPDWORD lpdwcbValue
);
339 DWORD WINAPI
RasGetAutodialParamW(DWORD dwKey
, LPVOID lpvValue
, LPDWORD lpdwcbValue
);
340 #define RasGetAutodialParam WINELIB_NAME_AW(RasGetAutodialParam)
341 DWORD WINAPI
RasSetAutodialEnableA(DWORD dwDialingLocation
, BOOL fEnabled
);
342 DWORD WINAPI
RasSetAutodialEnableW(DWORD dwDialingLocation
, BOOL fEnabled
);
343 #define RasSetAutodialEnable WINELIB_NAME_AW(RasSetAutodialEnable)