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
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"
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 /* Multilink and BAP */
200 DWORD dwDialExtraPercent
;
201 DWORD dwDialExtraSampleSeconds
;
202 DWORD dwHangUpExtraPercent
;
203 DWORD dwHangUpExtraSampleSeconds
;
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 */
217 CHAR szDnsSuffix
[RAS_MaxDnsSuffix
];
218 DWORD dwTcpWindowSize
;
219 CHAR szPrerequisitePbk
[MAX_PATH
];
220 CHAR szPrerequisiteEntry
[RAS_MaxEntryName
+ 1];
223 } RASENTRYA
, *LPRASENTRYA
;
225 typedef struct tagRASENTRYW
{
233 WCHAR szAreaCode
[ RAS_MaxAreaCode
+ 1 ];
234 WCHAR szLocalPhoneNumber
[ RAS_MaxPhoneNumber
+ 1 ];
235 DWORD dwAlternateOffset
;
237 /* IP related stuff */
241 RASIPADDR ipaddrDnsAlt
;
242 RASIPADDR ipaddrWins
;
243 RASIPADDR ipaddrWinsAlt
;
245 /* Framing (for ppp/isdn etc...) */
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 ];
261 WCHAR szX25PadType
[ RAS_MaxPadType
+ 1 ];
262 WCHAR szX25Address
[ RAS_MaxX25Address
+ 1 ];
263 WCHAR szX25Facilities
[ RAS_MaxFacilities
+ 1 ];
264 WCHAR szX25UserData
[ RAS_MaxUserData
+ 1 ];
270 /* Multilink and BAP */
274 DWORD dwDialExtraPercent
;
275 DWORD dwDialExtraSampleSeconds
;
276 DWORD dwHangUpExtraPercent
;
277 DWORD dwHangUpExtraSampleSeconds
;
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 */
291 WCHAR szDnsSuffix
[RAS_MaxDnsSuffix
];
292 DWORD dwTcpWindowSize
;
293 WCHAR szPrerequisitePbk
[MAX_PATH
];
294 WCHAR szPrerequisiteEntry
[RAS_MaxEntryName
+ 1];
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
RasEnumEntriesA(LPCSTR
,LPCSTR
,LPRASENTRYNAMEA
,LPDWORD
,LPDWORD
);
311 DWORD WINAPI
RasEnumEntriesW(LPCWSTR
,LPCWSTR
,LPRASENTRYNAMEW
,LPDWORD
,LPDWORD
);
312 #define RasEnumEntries WINELIB_NAME_AW(RasEnumEntries)
313 DWORD WINAPI
RasGetEntryDialParamsA(LPCSTR
,LPRASDIALPARAMSA
,LPBOOL
);
314 DWORD WINAPI
RasGetEntryDialParamsW(LPCWSTR
,LPRASDIALPARAMSW
,LPBOOL
);
315 #define RasGetEntryDialParams WINELIB_NAME_AW(RasGetEntryDialParams)
316 DWORD WINAPI
RasHangUpA(HRASCONN
);
317 DWORD WINAPI
RasHangUpW(HRASCONN
);
318 #define RasHangUp WINELIB_NAME_AW(RasHangUp)
319 DWORD WINAPI
RasValidateEntryNameA(LPCSTR lpszPhonebook
, LPCSTR lpszEntry
);
320 DWORD WINAPI
RasValidateEntryNameW(LPCWSTR lpszPhonebook
, LPCWSTR lpszEntry
);
321 #define RasValidateEntryName WINELIB_NAME_AW(RasValidateEntryName)
322 DWORD WINAPI
RasSetEntryPropertiesA(LPCSTR lpszPhonebook
, LPCSTR lpszEntry
,
323 LPRASENTRYA lpRasEntry
, DWORD dwEntryInfoSize
, LPBYTE lpbDeviceInfo
,
324 DWORD dwDeviceInfoSize
);
325 DWORD WINAPI
RasSetEntryPropertiesW(LPCWSTR lpszPhonebook
, LPCWSTR lpszEntry
,
326 LPRASENTRYW lpRasEntry
, DWORD dwEntryInfoSize
, LPBYTE lpbDeviceInfo
,
327 DWORD dwDeviceInfoSize
);
328 #define RasSetEntryProperties WINELIB_NAME_AW(RasSetEntryProperties)
329 DWORD WINAPI
RasGetAutodialParamA(DWORD dwKey
, LPVOID lpvValue
, LPDWORD lpdwcbValue
);
330 DWORD WINAPI
RasGetAutodialParamW(DWORD dwKey
, LPVOID lpvValue
, LPDWORD lpdwcbValue
);
331 #define RasGetAutodialParam WINELIB_NAME_AW(RasGetAutodialParam)
332 DWORD WINAPI
RasSetAutodialEnableA(DWORD dwDialingLocation
, BOOL fEnabled
);
333 DWORD WINAPI
RasSetAutodialEnableW(DWORD dwDialingLocation
, BOOL fEnabled
);
334 #define RasSetAutodialEnable WINELIB_NAME_AW(RasSetAutodialEnable)