source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/raseapif.h@ 1170

Last change on this file since 1170 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 8.6 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#ifndef _RASEAPIF_
7#define _RASEAPIF_
8
9#include <winapifamily.h>
10
11#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#define RAS_EAP_REGISTRY_LOCATION TEXT("System\\CurrentControlSet\\Services\\Rasman\\PPP\\EAP")
18
19#define RAS_EAP_VALUENAME_PATH TEXT("Path")
20#define RAS_EAP_VALUENAME_CONFIGUI TEXT("ConfigUIPath")
21#define RAS_EAP_VALUENAME_INTERACTIVEUI TEXT("InteractiveUIPath")
22#define RAS_EAP_VALUENAME_IDENTITY TEXT("IdentityPath")
23#define RAS_EAP_VALUENAME_FRIENDLY_NAME TEXT("FriendlyName")
24#define RAS_EAP_VALUENAME_DEFAULT_DATA TEXT("ConfigData")
25#define RAS_EAP_VALUENAME_REQUIRE_CONFIGUI TEXT("RequireConfigUI")
26#define RAS_EAP_VALUENAME_ENCRYPTION TEXT("MPPEEncryptionSupported")
27#define RAS_EAP_VALUENAME_INVOKE_NAMEDLG TEXT("InvokeUsernameDialog")
28#define RAS_EAP_VALUENAME_INVOKE_PWDDLG TEXT("InvokePasswordDialog")
29#define RAS_EAP_VALUENAME_CONFIG_CLSID TEXT("ConfigCLSID")
30#define RAS_EAP_VALUENAME_STANDALONE_SUPPORTED TEXT("StandaloneSupported")
31#define RAS_EAP_VALUENAME_ROLES_SUPPORTED TEXT("RolesSupported")
32#define RAS_EAP_VALUENAME_PER_POLICY_CONFIG TEXT("PerPolicyConfig")
33#define RAS_EAP_VALUENAME_ISTUNNEL_METHOD TEXT("IsTunnelMethod")
34#define RAS_EAP_VALUENAME_FILTER_INNERMETHODS TEXT("FilterInnerMethods")
35
36#define RAS_EAP_ROLE_AUTHENTICATOR 0x00000001
37#define RAS_EAP_ROLE_AUTHENTICATEE 0x00000002
38
39#define RAS_EAP_ROLE_EXCLUDE_IN_EAP 0x00000004
40#define RAS_EAP_ROLE_EXCLUDE_IN_PEAP 0x00000008
41#define RAS_EAP_ROLE_EXCLUDE_IN_VPN 0x00000010
42
43 typedef enum _RAS_AUTH_ATTRIBUTE_TYPE_ {
44 raatMinimum = 0,
45 raatUserName,
46 raatUserPassword,
47 raatMD5CHAPPassword,
48 raatNASIPAddress,
49 raatNASPort,
50 raatServiceType,
51 raatFramedProtocol,
52 raatFramedIPAddress,
53 raatFramedIPNetmask,
54 raatFramedRouting = 10,
55 raatFilterId,
56 raatFramedMTU,
57 raatFramedCompression,
58 raatLoginIPHost,
59 raatLoginService,
60 raatLoginTCPPort,
61 raatUnassigned17,
62 raatReplyMessage,
63 raatCallbackNumber,
64 raatCallbackId =20,
65 raatUnassigned21,
66 raatFramedRoute,
67 raatFramedIPXNetwork,
68 raatState,
69 raatClass,
70 raatVendorSpecific,
71 raatSessionTimeout,
72 raatIdleTimeout,
73 raatTerminationAction,
74 raatCalledStationId = 30,
75 raatCallingStationId,
76 raatNASIdentifier,
77 raatProxyState,
78 raatLoginLATService,
79 raatLoginLATNode,
80 raatLoginLATGroup,
81 raatFramedAppleTalkLink,
82 raatFramedAppleTalkNetwork,
83 raatFramedAppleTalkZone,
84 raatAcctStatusType = 40,
85 raatAcctDelayTime,
86 raatAcctInputOctets,
87 raatAcctOutputOctets,
88 raatAcctSessionId,
89 raatAcctAuthentic,
90 raatAcctSessionTime,
91 raatAcctInputPackets,
92 raatAcctOutputPackets,
93 raatAcctTerminateCause,
94 raatAcctMultiSessionId = 50,
95 raatAcctLinkCount,
96 raatAcctEventTimeStamp = 55,
97 raatMD5CHAPChallenge = 60,
98 raatNASPortType,
99 raatPortLimit,
100 raatLoginLATPort,
101 raatTunnelType,
102 raatTunnelMediumType,
103 raatTunnelClientEndpoint,
104 raatTunnelServerEndpoint,
105 raatARAPPassword = 70,
106 raatARAPFeatures,
107 raatARAPZoneAccess,
108 raatARAPSecurity,
109 raatARAPSecurityData,
110 raatPasswordRetry,
111 raatPrompt,
112 raatConnectInfo,
113 raatConfigurationToken,
114 raatEAPMessage,
115 raatSignature = 80,
116 raatARAPChallengeResponse = 84,
117 raatAcctInterimInterval = 85,
118 raatNASIPv6Address = 95,
119 raatFramedInterfaceId,
120 raatFramedIPv6Prefix,
121 raatLoginIPv6Host,
122 raatFramedIPv6Route,
123 raatFramedIPv6Pool,
124 raatARAPGuestLogon = 8096,
125 raatCertificateOID,
126 raatEAPConfiguration,
127 raatPEAPEmbeddedEAPTypeId = 8099,
128 raatInnerEAPTypeId = 8099,
129 raatPEAPFastRoamedSession = 8100,
130 raatFastRoamedSession = 8100,
131 raatEAPTLV = 8102,
132 raatCredentialsChanged,
133 raatPeerId = 9000,
134 raatServerId,
135 raatMethodId,
136 raatEMSK,
137 raatSessionId,
138 raatReserved = 0xffffffff
139 } RAS_AUTH_ATTRIBUTE_TYPE;
140
141#define raatARAPChallenge 33
142#define raatARAPOldPassword 19
143#define raatARAPNewPassword 20
144#define raatARAPPasswordChangeReason 21
145
146 typedef struct _RAS_AUTH_ATTRIBUTE {
147 RAS_AUTH_ATTRIBUTE_TYPE raaType;
148 DWORD dwLength;
149 PVOID Value;
150 } RAS_AUTH_ATTRIBUTE,*PRAS_AUTH_ATTRIBUTE;
151
152#define EAPCODE_Request 1
153#define EAPCODE_Response 2
154#define EAPCODE_Success 3
155#define EAPCODE_Failure 4
156
157#define MAXEAPCODE 4
158
159#define RAS_EAP_FLAG_ROUTER 0x00000001
160#define RAS_EAP_FLAG_NON_INTERACTIVE 0x00000002
161#define RAS_EAP_FLAG_LOGON 0x00000004
162#define RAS_EAP_FLAG_PREVIEW 0x00000008
163#define RAS_EAP_FLAG_FIRST_LINK 0x00000010
164#define RAS_EAP_FLAG_MACHINE_AUTH 0x00000020
165#define RAS_EAP_FLAG_GUEST_ACCESS 0x00000040
166#define RAS_EAP_FLAG_8021X_AUTH 0x00000080
167#define RAS_EAP_FLAG_HOSTED_IN_PEAP 0x00000100
168#define RAS_EAP_FLAG_RESUME_FROM_HIBERNATE 0x00000200
169#define RAS_EAP_FLAG_PEAP_UPFRONT 0x00000400
170#define RAS_EAP_FLAG_ALTERNATIVE_USER_DB 0x00000800
171#define RAS_EAP_FLAG_PEAP_FORCE_FULL_AUTH 0x00001000
172#define RAS_EAP_FLAG_PRE_LOGON 0x00020000
173#define RAS_EAP_FLAG_CONFG_READONLY 0x00080000
174#define RAS_EAP_FLAG_RESERVED 0x00100000
175#define RAS_EAP_FLAG_SAVE_CREDMAN 0x00200000
176
177 typedef struct _PPP_EAP_PACKET {
178 BYTE Code;
179 BYTE Id;
180 BYTE Length[2];
181 BYTE Data[1];
182 } PPP_EAP_PACKET,*PPPP_EAP_PACKET;
183
184#define PPP_EAP_PACKET_HDR_LEN (sizeof(PPP_EAP_PACKET) - 1)
185
186 typedef struct _PPP_EAP_INPUT {
187 DWORD dwSizeInBytes;
188 DWORD fFlags;
189 WINBOOL fAuthenticator;
190 WCHAR *pwszIdentity;
191 WCHAR *pwszPassword;
192 BYTE bInitialId;
193 RAS_AUTH_ATTRIBUTE *pUserAttributes;
194 WINBOOL fAuthenticationComplete;
195 DWORD dwAuthResultCode;
196 HANDLE hTokenImpersonateUser;
197 WINBOOL fSuccessPacketReceived;
198 WINBOOL fDataReceivedFromInteractiveUI;
199 PBYTE pDataFromInteractiveUI;
200 DWORD dwSizeOfDataFromInteractiveUI;
201 PBYTE pConnectionData;
202 DWORD dwSizeOfConnectionData;
203 PBYTE pUserData;
204 DWORD dwSizeOfUserData;
205 HANDLE hReserved;
206 } PPP_EAP_INPUT,*PPPP_EAP_INPUT;
207
208 typedef enum _PPP_EAP_ACTION {
209 EAPACTION_NoAction,
210 EAPACTION_Authenticate,
211 EAPACTION_Done,
212 EAPACTION_SendAndDone,
213 EAPACTION_Send,
214 EAPACTION_SendWithTimeout,
215 EAPACTION_SendWithTimeoutInteractive,
216 EAPACTION_IndicateTLV,
217 EAPACTION_IndicateIdentity
218 } PPP_EAP_ACTION;
219
220 typedef struct _PPP_EAP_OUTPUT {
221 DWORD dwSizeInBytes;
222 PPP_EAP_ACTION Action;
223 DWORD dwAuthResultCode;
224 RAS_AUTH_ATTRIBUTE *pUserAttributes;
225 WINBOOL fInvokeInteractiveUI;
226 PBYTE pUIContextData;
227 DWORD dwSizeOfUIContextData;
228 WINBOOL fSaveConnectionData;
229 PBYTE pConnectionData;
230 DWORD dwSizeOfConnectionData;
231 WINBOOL fSaveUserData;
232 PBYTE pUserData;
233 DWORD dwSizeOfUserData;
234 } PPP_EAP_OUTPUT,*PPPP_EAP_OUTPUT;
235
236 typedef struct _PPP_EAP_INFO {
237 DWORD dwSizeInBytes;
238 DWORD dwEapTypeId;
239 DWORD (WINAPI *RasEapInitialize)(WINBOOL fInitialize);
240 DWORD (WINAPI *RasEapBegin)(VOID **ppWorkBuffer, PPP_EAP_INPUT *pPppEapInput);
241 DWORD (WINAPI *RasEapEnd)(VOID *pWorkBuffer);
242 DWORD (WINAPI *RasEapMakeMessage)(VOID *pWorkBuf, PPP_EAP_PACKET *pReceivePacket, PPP_EAP_PACKET *pSendPacket, DWORD cbSendPacket, PPP_EAP_OUTPUT *pEapOutput, PPP_EAP_INPUT *pEapInput);
243 } PPP_EAP_INFO,*PPPP_EAP_INFO;
244
245 typedef struct _LEGACY_IDENTITY_UI_PARAMS {
246 DWORD eapType;
247 DWORD dwFlags;
248 DWORD dwSizeofConnectionData;
249 BYTE *pConnectionData;
250 DWORD dwSizeofUserData;
251 BYTE *pUserData;
252 DWORD dwSizeofUserDataOut;
253 BYTE *pUserDataOut;
254 LPWSTR pwszIdentity;
255 DWORD dwError;
256 } LEGACY_IDENTITY_UI_PARAMS;
257
258 typedef struct _LEGACY_INTERACTIVE_UI_PARAMS {
259 DWORD eapType;
260 DWORD dwSizeofContextData;
261 BYTE *pContextData;
262 DWORD dwSizeofInteractiveUIData;
263 BYTE *pInteractiveUIData;
264 DWORD dwError;
265 } LEGACY_INTERACTIVE_UI_PARAMS;
266
267 DWORD WINAPI RasEapGetInfo(DWORD dwEapTypeId, PPP_EAP_INFO *pEapInfo);
268 DWORD WINAPI RasEapFreeMemory(BYTE *pMemory);
269 DWORD WINAPI RasEapInvokeInteractiveUI(DWORD dwEapTypeId, HWND hwndParent, BYTE *pUIContextData, DWORD dwSizeOfUIContextData, BYTE **ppDataFromInteractiveUI, DWORD *pdwSizeOfDataFromInteractiveUI);
270 DWORD WINAPI RasEapInvokeConfigUI(DWORD dwEapTypeId, HWND hwndParent, DWORD dwFlags, BYTE *pConnectionDataIn, DWORD dwSizeOfConnectionDataIn, BYTE **ppConnectionDataOut, DWORD *pdwSizeOfConnectionDataOut);
271 DWORD WINAPI RasEapGetIdentity(DWORD dwEapTypeId, HWND hwndParent, DWORD dwFlags, const WCHAR *pwszPhonebook, const WCHAR *pwszEntry, BYTE *pConnectionDataIn, DWORD dwSizeOfConnectionDataIn, BYTE *pUserDataIn, DWORD dwSizeOfUserDataIn, BYTE **ppUserDataOut, DWORD *pdwSizeOfUserDataOut, WCHAR **ppwszIdentityOut);
272
273#ifdef __cplusplus
274}
275#endif
276
277#endif
278#endif
Note: See TracBrowser for help on using the repository browser.