ReactOS  0.4.15-dev-2776-g4130f0b
raseapif.h
Go to the documentation of this file.
1 #ifndef _RASEAPIF_
2 #define _RASEAPIF_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #if(WINVER >= 0x0500)
9 
10 #define RAS_EAP_REGISTRY_LOCATION TEXT("SYSTEM\\CurrentControlSet\\Services\\Rasman\\PPP\\EAP")
11 
12 #define RAS_EAP_VALUENAME_PATH TEXT("Path")
13 #define RAS_EAP_VALUENAME_CONFIGUI TEXT("ConfigUIPath")
14 #define RAS_EAP_VALUENAME_INTERACTIVEUI TEXT("InteractiveUIPath")
15 #define RAS_EAP_VALUENAME_IDENTITY TEXT("IdentityPath")
16 #define RAS_EAP_VALUENAME_FRIENDLY_NAME TEXT("FriendlyName")
17 #define RAS_EAP_VALUENAME_DEFAULT_DATA TEXT("ConfigData")
18 #define RAS_EAP_VALUENAME_REQUIRE_CONFIGUI TEXT("RequireConfigUI")
19 #define RAS_EAP_VALUENAME_ENCRYPTION TEXT("MPPEEncryptionSupported")
20 #define RAS_EAP_VALUENAME_INVOKE_NAMEDLG TEXT("InvokeUsernameDialog")
21 #define RAS_EAP_VALUENAME_INVOKE_PWDDLG TEXT("InvokePasswordDialog")
22 #define RAS_EAP_VALUENAME_CONFIG_CLSID TEXT("ConfigCLSID")
23 #define RAS_EAP_VALUENAME_STANDALONE_SUPPORTED TEXT("StandaloneSupported")
24 #define RAS_EAP_VALUENAME_ROLES_SUPPORTED TEXT("RolesSupported")
25 #define RAS_EAP_VALUENAME_PER_POLICY_CONFIG TEXT("PerPolicyConfig")
26 
27 #define RAS_EAP_ROLE_AUTHENTICATOR 0x00000001
28 #define RAS_EAP_ROLE_AUTHENTICATEE 0x00000002
29 
30 #define RAS_EAP_ROLE_EXCLUDE_IN_EAP 0x00000004
31 #define RAS_EAP_ROLE_EXCLUDE_IN_PEAP 0x00000008
32 #define RAS_EAP_ROLE_EXCLUDE_IN_VPN 0x00000010
33 
34 #define raatARAPChallenge 33
35 #define raatARAPOldPassword 19
36 #define raatARAPNewPassword 20
37 #define raatARAPPasswordChangeReason 21
38 
39 #define EAPCODE_Request 1
40 #define EAPCODE_Response 2
41 #define EAPCODE_Success 3
42 #define EAPCODE_Failure 4
43 
44 #define MAXEAPCODE 4
45 
46 #define RAS_EAP_FLAG_ROUTER 0x00000001
47 #define RAS_EAP_FLAG_NON_INTERACTIVE 0x00000002
48 #define RAS_EAP_FLAG_LOGON 0x00000004
49 #define RAS_EAP_FLAG_PREVIEW 0x00000008
50 #define RAS_EAP_FLAG_FIRST_LINK 0x00000010
51 #define RAS_EAP_FLAG_MACHINE_AUTH 0x00000020
52 #define RAS_EAP_FLAG_GUEST_ACCESS 0x00000040
53 #define RAS_EAP_FLAG_8021X_AUTH 0x00000080
54 #define RAS_EAP_FLAG_HOSTED_IN_PEAP 0x00000100
55 #define RAS_EAP_FLAG_RESUME_FROM_HIBERNATE 0x00000200
56 #define RAS_EAP_FLAG_PEAP_UPFRONT 0x00000400
57 #define RAS_EAP_FLAG_ALTERNATIVE_USER_DB 0x00000800
58 
59 typedef enum _RAS_AUTH_ATTRIBUTE_TYPE_
60 {
61  raatMinimum = 0,
62  raatUserName,
63  raatUserPassword,
64  raatMD5CHAPPassword,
65  raatNASIPAddress,
66  raatNASPort,
67  raatServiceType,
68  raatFramedProtocol,
69  raatFramedIPAddress,
70  raatFramedIPNetmask,
71  raatFramedRouting = 10,
72  raatFilterId,
73  raatFramedMTU,
74  raatFramedCompression,
75  raatLoginIPHost,
76  raatLoginService,
77  raatLoginTCPPort,
78  raatUnassigned17,
79  raatReplyMessage,
80  raatCallbackNumber,
81  raatCallbackId =20,
82  raatUnassigned21,
83  raatFramedRoute,
84  raatFramedIPXNetwork,
85  raatState,
86  raatClass,
87  raatVendorSpecific,
88  raatSessionTimeout,
89  raatIdleTimeout,
90  raatTerminationAction,
91  raatCalledStationId = 30,
92  raatCallingStationId,
93  raatNASIdentifier,
94  raatProxyState,
95  raatLoginLATService,
96  raatLoginLATNode,
97  raatLoginLATGroup,
98  raatFramedAppleTalkLink,
99  raatFramedAppleTalkNetwork,
100  raatFramedAppleTalkZone,
101  raatAcctStatusType = 40,
102  raatAcctDelayTime,
103  raatAcctInputOctets,
104  raatAcctOutputOctets,
105  raatAcctSessionId,
106  raatAcctAuthentic,
107  raatAcctSessionTime,
108  raatAcctInputPackets,
109  raatAcctOutputPackets,
110  raatAcctTerminateCause,
111  raatAcctMultiSessionId = 50,
112  raatAcctLinkCount,
113  raatAcctEventTimeStamp = 55,
114  raatMD5CHAPChallenge = 60,
115  raatNASPortType,
116  raatPortLimit,
117  raatLoginLATPort,
118  raatTunnelType,
119  raatTunnelMediumType,
120  raatTunnelClientEndpoint,
121  raatTunnelServerEndpoint,
122  raatARAPPassword = 70,
123  raatARAPFeatures,
124  raatARAPZoneAccess,
125  raatARAPSecurity,
126  raatARAPSecurityData,
127  raatPasswordRetry,
128  raatPrompt,
129  raatConnectInfo,
130  raatConfigurationToken,
131  raatEAPMessage,
132  raatSignature = 80,
133  raatARAPChallengeResponse = 84,
134  raatAcctInterimInterval = 85,
135  raatARAPGuestLogon = 8096,
136  raatCertificateOID,
137  raatEAPConfiguration,
138  raatPEAPEmbeddedEAPTypeId,
139  raatPEAPFastRoamedSession,
140  raatEAPTLV = 8102,
141  raatReserved = 0xFFFFFFFF
142 
143 }RAS_AUTH_ATTRIBUTE_TYPE;
144 
145 typedef struct _RAS_AUTH_ATTRIBUTE
146 {
147  RAS_AUTH_ATTRIBUTE_TYPE raaType;
148  DWORD dwLength;
149  PVOID Value;
150 
151 }RAS_AUTH_ATTRIBUTE, *PRAS_AUTH_ATTRIBUTE;
152 
153 typedef struct _PPP_EAP_PACKET
154 {
155  BYTE Code;
156  BYTE Id;
157  BYTE Length[2];
158  BYTE Data[1];
159 }PPP_EAP_PACKET, *PPPP_EAP_PACKET;
160 
161 #define PPP_EAP_PACKET_HDR_LEN (sizeof(PPP_EAP_PACKET) - 1)
162 
163 typedef struct _PPP_EAP_INPUT
164 {
165  DWORD dwSizeInBytes;
166  DWORD fFlags;
167  BOOL fAuthenticator;
168  WCHAR* pwszIdentity;
169  WCHAR* pwszPassword;
170  BYTE bInitialId;
171  RAS_AUTH_ATTRIBUTE* pUserAttributes;
172  BOOL fAuthenticationComplete;
173  DWORD dwAuthResultCode;
174  OPTIONAL HANDLE hTokenImpersonateUser;
175  BOOL fSuccessPacketReceived;
176  BOOL fDataReceivedFromInteractiveUI;
177  OPTIONAL PBYTE pDataFromInteractiveUI;
178  DWORD dwSizeOfDataFromInteractiveUI;
179  OPTIONAL PBYTE pConnectionData;
180  DWORD dwSizeOfConnectionData;
181  OPTIONAL PBYTE pUserData;
182  DWORD dwSizeOfUserData;
183  HANDLE hReserved;
184 }PPP_EAP_INPUT, *PPPP_EAP_INPUT;
185 
186 typedef enum _PPP_EAP_ACTION
187 {
188  EAPACTION_NoAction,
189  EAPACTION_Authenticate,
190  EAPACTION_Done,
191  EAPACTION_SendAndDone,
192  EAPACTION_Send,
193  EAPACTION_SendWithTimeout,
194  EAPACTION_SendWithTimeoutInteractive,
195  EAPACTION_IndicateTLV,
196  EAPACTION_IndicateIdentity
197 }PPP_EAP_ACTION;
198 
199 typedef struct _PPP_EAP_OUTPUT
200 {
201  DWORD dwSizeInBytes;
202  PPP_EAP_ACTION Action;
203  DWORD dwAuthResultCode;
204  OPTIONAL RAS_AUTH_ATTRIBUTE* pUserAttributes;
205  BOOL fInvokeInteractiveUI;
206  OPTIONAL PBYTE pUIContextData;
207  DWORD dwSizeOfUIContextData;
208  BOOL fSaveConnectionData;
209  OPTIONAL PBYTE pConnectionData;
210  DWORD dwSizeOfConnectionData;
211  BOOL fSaveUserData;
212  OPTIONAL PBYTE pUserData;
213  DWORD dwSizeOfUserData;
214 }PPP_EAP_OUTPUT, *PPPP_EAP_OUTPUT;
215 
216 typedef struct _PPP_EAP_INFO
217 {
218  DWORD dwSizeInBytes;
219  DWORD dwEapTypeId;
220  DWORD (APIENTRY *RasEapInitialize)(IN BOOL fInitialize );
221  DWORD (APIENTRY *RasEapBegin)(OUT VOID** ppWorkBuffer, IN PPP_EAP_INPUT* pPppEapInput);
222  DWORD (APIENTRY *RasEapEnd)(IN VOID* pWorkBuffer);
223  DWORD (APIENTRY *RasEapMakeMessage)(IN VOID* pWorkBuf, IN PPP_EAP_PACKET* pReceivePacket, OUT PPP_EAP_PACKET* pSendPacket, IN DWORD cbSendPacket, OUT PPP_EAP_OUTPUT* pEapOutput, IN PPP_EAP_INPUT* pEapInput);
224 }PPP_EAP_INFO, *PPPP_EAP_INFO;
225 
227 RasEapGetInfo(IN DWORD dwEapTypeId,
228  OUT PPP_EAP_INFO* pEapInfo);
229 
231 RasEapFreeMemory(IN BYTE* pMemory);
232 
234 RasEapInvokeInteractiveUI(IN DWORD dwEapTypeId,
236  IN BYTE* pUIContextData,
237  IN DWORD dwSizeOfUIContextData,
238  OUT BYTE** ppDataFromInteractiveUI,
239  OUT DWORD* pdwSizeOfDataFromInteractiveUI);
240 
242 RasEapInvokeConfigUI(IN DWORD dwEapTypeId,
244  IN DWORD dwFlags,
245  IN BYTE* pConnectionDataIn,
246  IN DWORD dwSizeOfConnectionDataIn,
247  OUT BYTE** ppConnectionDataOut,
248  OUT DWORD* pdwSizeOfConnectionDataOut);
249 
251 RasEapGetIdentity(IN DWORD dwEapTypeId,
253  IN DWORD dwFlags,
254  IN const WCHAR* pwszPhonebook,
255  IN const WCHAR* pwszEntry,
256  IN BYTE* pConnectionDataIn,
257  IN DWORD dwSizeOfConnectionDataIn,
258  IN BYTE* pUserDataIn,
259  IN DWORD dwSizeOfUserDataIn,
260  OUT BYTE** ppUserDataOut,
261  OUT DWORD* pdwSizeOfUserDataOut,
262  OUT WCHAR** ppwszIdentity
263 );
264 
265 #endif /* WINVER >= 0x0500 */
266 
267 #ifdef __cplusplus
268 }
269 #endif
270 
271 #endif /* _RASEAPIF_ */
272 
#define IN
Definition: typedefs.h:39
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
FxMemoryObject * pMemory
#define DWORD
Definition: nt_native.h:44
DWORD Id
unsigned int BOOL
Definition: ntddk_ex.h:94
static HWND hwndParent
Definition: cryptui.c:300
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
#define Code
Definition: deflate.h:80
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:85
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
unsigned char BYTE
Definition: xxhash.c:193
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:506
#define OUT
Definition: typedefs.h:40
BYTE * PBYTE
Definition: pedump.c:66
#define APIENTRY
Definition: api.h:79
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68