Raseapif.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. raseapif.h
  5. Abstract:
  6. Defines interface between a third party authentication module
  7. and the Remote Access Service PPP engine.
  8. --*/
  9. #ifndef _RASEAPIF_
  10. #define _RASEAPIF_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #if(WINVER >= 0x0500)
  18. //
  19. // Defines used for installtion of EAP DLL
  20. //
  21. // Custom EAP DLL (ex. Name=Sample.dll, Type=(decimal 40) regsitry installation)
  22. //
  23. // HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\PPP\EAP\40)
  24. // Path (REG_EXPAND_SZ) %SystemRoot%\system32\sample.dll
  25. // ConfigUIPath (REG_EXPAND_SZ) %SystemRoot%\system32\sample.dll
  26. // InteractiveUIPath (REG_EXPAND_SZ) %SystemRoot%\system32\sample.dll
  27. // IdentityPath (REG_EXPAND_SZ) %SystemRoot%\system32\sample.dll
  28. // FriendlyName (REG_SZ) Sample EAP Protocol
  29. // RequireConfigUI (REG_DWORD) 1
  30. // ConfigCLSID (REG_SZ) {0000031A-0000-0000-C000-000000000046}
  31. // StandaloneSupported (REG_DWORD) 1
  32. //
  33. #define RAS_EAP_REGISTRY_LOCATION \
  34. TEXT("System\\CurrentControlSet\\Services\\Rasman\\PPP\\EAP")
  35. #define RAS_EAP_VALUENAME_PATH TEXT("Path")
  36. #define RAS_EAP_VALUENAME_CONFIGUI TEXT("ConfigUIPath")
  37. #define RAS_EAP_VALUENAME_INTERACTIVEUI TEXT("InteractiveUIPath")
  38. #define RAS_EAP_VALUENAME_IDENTITY TEXT("IdentityPath")
  39. #define RAS_EAP_VALUENAME_FRIENDLY_NAME TEXT("FriendlyName")
  40. #define RAS_EAP_VALUENAME_DEFAULT_DATA TEXT("ConfigData")
  41. #define RAS_EAP_VALUENAME_REQUIRE_CONFIGUI TEXT("RequireConfigUI")
  42. #define RAS_EAP_VALUENAME_ENCRYPTION TEXT("MPPEEncryptionSupported")
  43. #define RAS_EAP_VALUENAME_INVOKE_NAMEDLG TEXT("InvokeUsernameDialog")
  44. #define RAS_EAP_VALUENAME_INVOKE_PWDDLG TEXT("InvokePasswordDialog")
  45. #define RAS_EAP_VALUENAME_CONFIG_CLSID TEXT("ConfigCLSID")
  46. #define RAS_EAP_VALUENAME_STANDALONE_SUPPORTED TEXT("StandaloneSupported")
  47. #define RAS_EAP_VALUENAME_ROLES_SUPPORTED TEXT("RolesSupported")
  48. // Flags for RolesSupported.
  49. #define RAS_EAP_ROLE_AUTHENTICATOR 0x00000001
  50. #define RAS_EAP_ROLE_AUTHENTICATEE 0x00000002
  51. #define RAS_EAP_ROLE_DISABLED_IN_VPN_CLIENT 0x00000004
  52. //
  53. // Following flags describe the hosting of EAP
  54. // methods in PEAP or in EAP. If this role is
  55. // missing the default behavior is to show the
  56. // EAP method in PEAP and in EAP.
  57. //
  58. #define RAS_EAP_ROLE_EXCLUDE_IN_EAP 0x00000004
  59. #define RAS_EAP_ROLE_EXCLUDE_IN_PEAP 0x00000008
  60. #define RAS_EAP_ROLE_WIRELESS_EAP 0x00000010
  61. #define RAS_EAP_ROLE_VPN_EAP 0x00000020
  62. typedef enum _RAS_AUTH_ATTRIBUTE_TYPE_
  63. {
  64. raatMinimum = 0, // Undefined
  65. raatUserName, // Value field is a Pointer
  66. raatUserPassword, // Value field is a Pointer
  67. raatMD5CHAPPassword, // Value field is a Pointer
  68. raatNASIPAddress, // Value field is a 32 bit integral value
  69. raatNASPort, // Value field is a 32 bit integral value
  70. raatServiceType, // Value field is a 32 bit integral value
  71. raatFramedProtocol, // Value field is a 32 bit integral value
  72. raatFramedIPAddress, // Value field is a 32 bit integral value
  73. raatFramedIPNetmask, // Value field is a 32 bit integral value
  74. raatFramedRouting = 10, // Value field is a 32 bit integral value
  75. raatFilterId, // Value field is a Pointer
  76. raatFramedMTU, // Value field is a 32 bit integral value
  77. raatFramedCompression, // Value field is a 32 bit integral value
  78. raatLoginIPHost, // Value field is a 32 bit integral value
  79. raatLoginService, // Value field is a 32 bit integral value
  80. raatLoginTCPPort, // Value field is a 32 bit integral value
  81. raatUnassigned17, // Undefined
  82. raatReplyMessage, // Value field is a Pointer
  83. raatCallbackNumber, // Value field is a Pointer
  84. raatCallbackId =20, // Value field is a Pointer
  85. raatUnassigned21, // Undefined
  86. raatFramedRoute, // Value field is a Pointer
  87. raatFramedIPXNetwork, // Value field is a 32 bit integral value
  88. raatState, // Value field is a Pointer
  89. raatClass, // Value field is a Pointer
  90. raatVendorSpecific, // Value field is a Pointer
  91. raatSessionTimeout, // Value field is a 32 bit integral value
  92. raatIdleTimeout, // Value field is a 32 bit integral value
  93. raatTerminationAction, // Value field is a 32 bit integral value
  94. raatCalledStationId = 30, // Value field is a Pointer
  95. raatCallingStationId, // Value field is a Pointer
  96. raatNASIdentifier, // Value field is a Pointer
  97. raatProxyState, // Value field is a Pointer
  98. raatLoginLATService, // Value field is a Pointer
  99. raatLoginLATNode, // Value field is a Pointer
  100. raatLoginLATGroup, // Value field is a Pointer
  101. raatFramedAppleTalkLink, // Value field is a 32 bit integral value
  102. raatFramedAppleTalkNetwork, // Value field is a 32 bit integral value
  103. raatFramedAppleTalkZone, // Value field is a Pointer
  104. raatAcctStatusType = 40, // Value field is a 32 bit integral value
  105. raatAcctDelayTime, // Value field is a 32 bit integral value
  106. raatAcctInputOctets, // Value field is a 32 bit integral value
  107. raatAcctOutputOctets, // Value field is a 32 bit integral value
  108. raatAcctSessionId, // Value field is a Pointer
  109. raatAcctAuthentic, // Value field is a 32 bit integral value
  110. raatAcctSessionTime, // Value field is a 32 bit integral value
  111. raatAcctInputPackets, // Value field is a 32 bit integral value
  112. raatAcctOutputPackets, // Value field is a 32 bit integral value
  113. raatAcctTerminateCause, // Value field is a 32 bit integral value
  114. raatAcctMultiSessionId = 50, // Value field is a Pointer
  115. raatAcctLinkCount, // Value field is a 32 bit integral value
  116. raatAcctEventTimeStamp = 55, // Value field is a 32 bit integral value
  117. raatMD5CHAPChallenge = 60, // Value field is a Pointer
  118. raatNASPortType, // Value field is a 32 bit integral value
  119. raatPortLimit, // Value field is a 32 bit integral value
  120. raatLoginLATPort, // Value field is a Pointer
  121. raatTunnelType, // Value field is a 32 bit integral value
  122. raatTunnelMediumType, // Value field is a 32 bit integral value
  123. raatTunnelClientEndpoint, // Value field is a Pointer
  124. raatTunnelServerEndpoint, // Value field is a Pointer
  125. raatARAPPassword = 70, // Value field is a Pointer
  126. raatARAPFeatures, // Value field is a Pointer
  127. raatARAPZoneAccess, // Value field is a 32 bit integral value
  128. raatARAPSecurity, // Value field is a 32 bit integral value
  129. raatARAPSecurityData, // Value field is a Pointer
  130. raatPasswordRetry, // Value field is a 32 bit integral value
  131. raatPrompt, // Value field is a 32 bit integral value
  132. raatConnectInfo, // Value field is a Pointer
  133. raatConfigurationToken, // Value field is a Pointer
  134. raatEAPMessage, // Value field is a Pointer
  135. raatSignature = 80, // Value field is a Pointer
  136. raatARAPChallengeResponse = 84, // Value field is a Pointer
  137. raatAcctInterimInterval = 85, // Value field is a 32 bit integral value
  138. raatARAPGuestLogon = 8096, // Value field is a 32 bit integral value
  139. raatCertificateOID, // Value field is a Pointer
  140. raatEAPConfiguration, // Value field is a Pointer
  141. raatPEAPEmbeddedEAPTypeId, // Value field is a 32 bit integral value
  142. raatPEAPFastRoamedSession, // Value field is a 32 bit integral value
  143. raatEAPTLV = 8102, // Value field is a Pointer
  144. raatReserved = 0xFFFFFFFF // Undefined
  145. }RAS_AUTH_ATTRIBUTE_TYPE;
  146. //
  147. // VSA attribute ids for ARAP
  148. //
  149. #define raatARAPChallenge 33
  150. #define raatARAPOldPassword 19
  151. #define raatARAPNewPassword 20
  152. #define raatARAPPasswordChangeReason 21
  153. //
  154. // Value is set to the 32 bit integral value or a pointer to data.
  155. // 32 bit integral values should be in host format, not network format.
  156. // Length for a 32 bit integral value can be 1, 2 or 4. The array of
  157. // attributes must be terminated with an attribute of type raatMinimum.
  158. //
  159. typedef struct _RAS_AUTH_ATTRIBUTE
  160. {
  161. RAS_AUTH_ATTRIBUTE_TYPE raaType;
  162. DWORD dwLength;
  163. PVOID Value;
  164. }RAS_AUTH_ATTRIBUTE, *PRAS_AUTH_ATTRIBUTE;
  165. //
  166. // EAP packet codes from EAP spec.
  167. //
  168. #define EAPCODE_Request 1
  169. #define EAPCODE_Response 2
  170. #define EAPCODE_Success 3
  171. #define EAPCODE_Failure 4
  172. #define MAXEAPCODE 4
  173. //
  174. // Values of the fFlags field in PPP_EAP_INPUT
  175. // These have the same values as the RASEAPF_ flags in ras.h
  176. //
  177. #define RAS_EAP_FLAG_ROUTER 0x00000001 // This is a router
  178. #define RAS_EAP_FLAG_NON_INTERACTIVE 0x00000002 // No UI should be displayed
  179. #define RAS_EAP_FLAG_LOGON 0x00000004 // The user data was
  180. // obtained from Winlogon
  181. #define RAS_EAP_FLAG_PREVIEW 0x00000008 // User has checked
  182. // "Prompt for information
  183. // before dialing"
  184. #define RAS_EAP_FLAG_FIRST_LINK 0x00000010 // This is the first link
  185. #define RAS_EAP_FLAG_MACHINE_AUTH 0x00000020 // Use the default machine cert
  186. // or user cert based on the
  187. // application logon context
  188. #define RAS_EAP_FLAG_GUEST_ACCESS 0x00000040 // Request to provide guest
  189. // access.
  190. #define RAS_EAP_FLAG_8021X_AUTH 0x00000080 // Anything specific to 8021x
  191. //FIXME: FLAG CHANGED // to be done in TLS
  192. //#define RAS_EAP_FLAG_RESUME_FROM_HIBERNATE 0x00000100 // Indicates this is the first call
  193. // // after m/c resumed from hibernation.
  194. #define RAS_EAP_FLAG_HOSTED_IN_PEAP 0x00000100 // This EAP Method is hosted
  195. // in PEAP
  196. #define RAS_EAP_FLAG_RESUME_FROM_HIBERNATE 0x00000200 // Indicates this is the
  197. // first call after m/c
  198. // resumed from hibernation.
  199. #define RAS_EAP_FLAG_PEAP_UPFRONT 0x00000400 // Indicate peap is enabled
  200. // at the beginning of IAS pipeline.
  201. typedef struct _PPP_EAP_PACKET
  202. {
  203. BYTE Code; // 1-Request, 2-Response, 3-Success, 4-Failure
  204. BYTE Id; // Id of this packet
  205. BYTE Length[2]; // Length of this packet
  206. BYTE Data[1]; // Data - First byte is Type for Request/Response
  207. }PPP_EAP_PACKET, *PPPP_EAP_PACKET;
  208. #define PPP_EAP_PACKET_HDR_LEN ( sizeof( PPP_EAP_PACKET ) - 1 )
  209. //
  210. // Interface structure between the engine and APs. This is passed to the
  211. // AP's via the RasCpBegin call.
  212. //
  213. typedef struct _PPP_EAP_INPUT
  214. {
  215. //
  216. // Size of this structure
  217. //
  218. DWORD dwSizeInBytes;
  219. //
  220. // The following five fields are valid only in RasEapBegin call
  221. //
  222. DWORD fFlags; // See RAS_EAP_FLAG_*
  223. BOOL fAuthenticator; // Act as authenticator or authenticatee
  224. WCHAR * pwszIdentity; // Users's identity
  225. WCHAR * pwszPassword; // Client's account password. Only valid when
  226. // fAuthenticator is FALSE.
  227. BYTE bInitialId; // Initial packet identifier. Must be used for
  228. // the first EAP packet sent by the DLL and
  229. // incremented by one for each subsequent
  230. // request packet.
  231. //
  232. // During the RasEapBegin call on the authenticator side, pUserAttributes
  233. // contains the set of attributes for the currently dialed in user, e.g.,
  234. // the port used, NAS IP Address, etc.
  235. //
  236. // When the fAuthenticationComplete flag is TRUE, pUserAttributes contains
  237. // attributes (if any) returned by the authentication provider.
  238. //
  239. // This memory is not owned by the EAP DLL and should be treated as
  240. // read-only.
  241. //
  242. RAS_AUTH_ATTRIBUTE * pUserAttributes;
  243. //
  244. // The next two fields are used only if the EAP DLL is using the
  245. // currently configured authentication provider ex: RADIUS or Windows NT
  246. // domain authentication, and the fAuthenticator field above is set to
  247. // TRUE.
  248. //
  249. //
  250. // Indicates that the authenticator has completed authentication.
  251. // Ignore this field if an authentication provider is not being used.
  252. //
  253. BOOL fAuthenticationComplete;
  254. //
  255. // Result of the authentication process by the authentication provider.
  256. // NO_ERROR indicates success, otherwise it is a value from winerror.h,
  257. // raserror.h or mprerror.h indicating failure reason.
  258. //
  259. DWORD dwAuthResultCode;
  260. //
  261. // Valid only on the authenticatee side. This may be used on the
  262. // authenticatee side to impersonate the user being authenticated.
  263. //
  264. OPTIONAL HANDLE hTokenImpersonateUser;
  265. //
  266. // This variable should be examined only by the authenticatee side.
  267. // The EAP specification states that the success packet may be lost and
  268. // since it is a non-acknowledged packet, reception of an NCP packet should
  269. // be interpreted as a success packet. This varable is set to TRUE in this
  270. // case only on the authenticatee side
  271. //
  272. BOOL fSuccessPacketReceived;
  273. //
  274. // Will be set to TRUE only when the user dismissed the interactive
  275. // UI that was invoked by the EAP dll
  276. //
  277. BOOL fDataReceivedFromInteractiveUI;
  278. //
  279. // Data received from the Interactive UI. Will be set to
  280. // non-NULL when fDataReceivedFromInteractiveUI is set to TRUE and
  281. // RasEapInvokeInteractiveUI returned non-NULL data. This buffer will be
  282. // freed by the PPP engine on return from the RasEapMakeMessage call. A
  283. // copy of this data should be made in the EAP Dll's memory space.
  284. //
  285. OPTIONAL PBYTE pDataFromInteractiveUI;
  286. //
  287. // Size in bytes of data pointed to by pInteractiveConnectionData. This may
  288. // be 0 if there was no data passed back by RasEapInvokeInteractiveUI.
  289. //
  290. DWORD dwSizeOfDataFromInteractiveUI;
  291. //
  292. // Connection data received from the Config UI. Will be set to non-NULL
  293. // when the RasEapBegin call is made and the RasEapInvokeConfigUI
  294. // returned non-NULL data. This buffer will be freed by the PPP engine
  295. // on return from the RasEapBegin call. A copy of this data should
  296. // be made in the EAP Dll's memory space.
  297. //
  298. OPTIONAL PBYTE pConnectionData;
  299. //
  300. // Size in bytes of data pointed to by pConnectionData. This may be
  301. // 0 if there was no data passed back by the RasEapInvokeConfigUI call.
  302. //
  303. DWORD dwSizeOfConnectionData;
  304. //
  305. // User data received from the Identity UI or Interactive UI. Will be set
  306. // to non-NULL when the RasEapBegin call is made if such data exists.
  307. // This buffer will be freed by the PPP engine on return from the
  308. // RasEapBegin call. A copy of this data should be made in the EAP Dll's
  309. // memory space.
  310. //
  311. OPTIONAL PBYTE pUserData;
  312. //
  313. // Size in bytes of data pointed to by pUserData. This may be 0 if there
  314. // is no data.
  315. //
  316. DWORD dwSizeOfUserData;
  317. //
  318. // Reserved.
  319. //
  320. HANDLE hReserved;
  321. }PPP_EAP_INPUT, *PPPP_EAP_INPUT;
  322. typedef enum _PPP_EAP_ACTION
  323. {
  324. //
  325. // These actions are provided by the EAP DLL as output from the
  326. // RasEapMakeMessage API. They tell the PPP engine what action (if any) to
  327. // take on the EAP DLL's behalf, and eventually inform the engine that the
  328. // EAP DLL has finished authentication.
  329. //
  330. EAPACTION_NoAction, // Be passive, i.e. listen without timeout (default)
  331. EAPACTION_Authenticate, // Invoke the back-end authenticator.
  332. EAPACTION_Done, // End auth session, dwAuthResultCode is set
  333. EAPACTION_SendAndDone, // As above but send message without timeout first
  334. EAPACTION_Send, // Send message, don't timeout waiting for reply
  335. EAPACTION_SendWithTimeout, // Send message, timeout if reply not received
  336. EAPACTION_SendWithTimeoutInteractive, // As above, but don't increment
  337. // retry count
  338. EAPACTION_IndicateTLV, // Do not use
  339. EAPACTION_IndicateIdentity // Do not use
  340. }PPP_EAP_ACTION;
  341. typedef struct _PPP_EAP_OUTPUT
  342. {
  343. //
  344. // Size of this structure
  345. //
  346. DWORD dwSizeInBytes;
  347. //
  348. // Action that the PPP engine should take
  349. //
  350. PPP_EAP_ACTION Action;
  351. //
  352. // dwAuthResultCode is valid only with an Action code of Done or
  353. // SendAndDone. Zero value indicates succesful authentication.
  354. // Non-zero indicates unsuccessful authentication with the value
  355. // indicating the reason for authentication failure.
  356. // Non-zero return codes should be only from winerror.h, raserror.h and
  357. // mprerror.h
  358. //
  359. DWORD dwAuthResultCode;
  360. //
  361. // When Action is EAPACTION_Authenticate, pUserAttributes may contain
  362. // additional attributes necessary to authenticate the user, e.g.,
  363. // User-Password. If no credentials are presented, the back-end
  364. // authenticator will assume the user is authentic and only retrieve
  365. // authorizations.
  366. //
  367. // When Action is EAPACTION_Done, EAPACTION_SendAndDone, or EAPACTION_Send,
  368. // pUserAttributes may contain additional attributes for the user. These
  369. // attributes will overwrite any attributes of the same type returned by
  370. // the back-end authenticator.
  371. //
  372. // It is up to the EAP DLL to free this memory in RasEapEnd call.
  373. //
  374. OPTIONAL RAS_AUTH_ATTRIBUTE * pUserAttributes;
  375. //
  376. // Flag set to true will cause the RasEapInvokeInteractiveUI call to be
  377. // made.
  378. //
  379. BOOL fInvokeInteractiveUI;
  380. //
  381. // Pointer to context data, if any, to be sent to the UI. The EAP dll
  382. // is responsible for freeing this buffer in the RasEapEnd call or when
  383. // a response from the user for this invocation is obtained.
  384. //
  385. OPTIONAL PBYTE pUIContextData;
  386. //
  387. // Size in bytes of the data pointed to by pUIContextData. Ignored if
  388. // pUIContextData is NULL
  389. //
  390. DWORD dwSizeOfUIContextData;
  391. //
  392. // When set to TRUE, indicates that the information pointed to by
  393. // pConnectionData should be saved in the phonebook. Only valid on
  394. // the authenticatee side.
  395. //
  396. BOOL fSaveConnectionData;
  397. //
  398. // If fSaveConnectionData above is true, the data pointed to by
  399. // pConnectionData will be saved in the phonebook. This data
  400. // must be freed by the DLL when the RasEapEnd call is made.
  401. //
  402. OPTIONAL PBYTE pConnectionData;
  403. //
  404. // Size, in bytes, of the data pointed to by pConnectionData
  405. //
  406. DWORD dwSizeOfConnectionData;
  407. //
  408. // When set to TRUE, indicates that the information pointed to by
  409. // pUserData should be saved in the registry for this user. Only valid
  410. // on the authenticatee side.
  411. //
  412. BOOL fSaveUserData;
  413. //
  414. // If fSaveUserData above is true, the data pointed to by pUserData will be
  415. // saved in the registry for this user. This data must be freed by the DLL
  416. // when the RasEapEnd call is made.
  417. //
  418. OPTIONAL PBYTE pUserData;
  419. //
  420. // Size, in bytes, of the data pointed to by pUserData
  421. //
  422. DWORD dwSizeOfUserData;
  423. }PPP_EAP_OUTPUT, *PPPP_EAP_OUTPUT;
  424. typedef struct _PPP_EAP_INFO
  425. {
  426. //
  427. // Size of this structure
  428. //
  429. DWORD dwSizeInBytes;
  430. DWORD dwEapTypeId;
  431. //
  432. // Called to initialize/uninitialize this module. This will be called before
  433. // any other call is made. fInitialize will be TRUE iff the module has to be
  434. // initialized. Must return errorcodes only from winerror.h, raserror.h or
  435. // mprerror.h
  436. //
  437. DWORD (APIENTRY *RasEapInitialize)( IN BOOL fInitialize );
  438. //
  439. // Called to get a context buffer for this EAP session and pass
  440. // initialization information. This will be called before any other
  441. // call is made, except RasEapInitialize. Must return errorcodes only from
  442. // winerror.h, raserror.h or mprerror.h
  443. //
  444. DWORD (APIENTRY *RasEapBegin)( OUT VOID ** ppWorkBuffer,
  445. IN PPP_EAP_INPUT * pPppEapInput );
  446. //
  447. // Called to free the context buffer for this EAP session.
  448. // Called after this session is completed successfully or not, provided
  449. // the RasEapBegin call for this EAP session returned successfully.
  450. // Must return errorcodes only from winerror.h, raserror.h or mprerror.h
  451. //
  452. DWORD (APIENTRY *RasEapEnd)( IN VOID * pWorkBuffer );
  453. //
  454. // Called to process an incomming packet and/or send a packet.
  455. // cbSendPacket is the size in bytes of the buffer pointed to by
  456. // pSendPacket. Must return errorcodes only from winerror.h, raserror.h or
  457. // mprerror.h. Error return code indicates an error occurance during the
  458. // authentication process.
  459. //
  460. DWORD (APIENTRY *RasEapMakeMessage)(
  461. IN VOID* pWorkBuf,
  462. IN PPP_EAP_PACKET* pReceivePacket,
  463. OUT PPP_EAP_PACKET* pSendPacket,
  464. IN DWORD cbSendPacket,
  465. OUT PPP_EAP_OUTPUT* pEapOutput,
  466. IN PPP_EAP_INPUT* pEapInput );
  467. }PPP_EAP_INFO, *PPPP_EAP_INFO;
  468. //
  469. // RasEapGetInfo should be exported by the 3rd party EAP dll installed in the
  470. // registry via the Path value.
  471. //
  472. DWORD APIENTRY
  473. RasEapGetInfo(
  474. IN DWORD dwEapTypeId,
  475. OUT PPP_EAP_INFO* pEapInfo
  476. );
  477. //
  478. // RasEapFreeMemory should be exported by the 3rd party EAP dlls installed in
  479. // the registry via the InteractiveUIPath, ConfigUIPath, and IdentityPath
  480. // values.
  481. //
  482. DWORD APIENTRY
  483. RasEapFreeMemory(
  484. IN BYTE* pMemory
  485. );
  486. //
  487. // RasEapInvokeInteractiveUI and RasEapFreeMemory should be exported by the
  488. // 3rd party EAP dll installed in the registry via the InteractiveUIPath
  489. // value.
  490. //
  491. DWORD APIENTRY
  492. RasEapInvokeInteractiveUI(
  493. IN DWORD dwEapTypeId,
  494. IN HWND hwndParent,
  495. IN BYTE* pUIContextData,
  496. IN DWORD dwSizeOfUIContextData,
  497. OUT BYTE** ppDataFromInteractiveUI,
  498. OUT DWORD* pdwSizeOfDataFromInteractiveUI
  499. );
  500. //
  501. // RasEapInvokeConfigUI and RasEapFreeMemory should be exported by the
  502. // 3rd party EAP dll installed in the registry via the ConfigUIPath value.
  503. //
  504. DWORD APIENTRY
  505. RasEapInvokeConfigUI(
  506. IN DWORD dwEapTypeId,
  507. IN HWND hwndParent,
  508. IN DWORD dwFlags,
  509. IN BYTE* pConnectionDataIn,
  510. IN DWORD dwSizeOfConnectionDataIn,
  511. OUT BYTE** ppConnectionDataOut,
  512. OUT DWORD* pdwSizeOfConnectionDataOut
  513. );
  514. //
  515. // RasEapGetIdentity and RasEapFreeMemory should be exported by the
  516. // 3rd party EAP dll installed in the registry via the IdentityPath value.
  517. //
  518. DWORD APIENTRY
  519. RasEapGetIdentity(
  520. IN DWORD dwEapTypeId,
  521. IN HWND hwndParent,
  522. IN DWORD dwFlags,
  523. IN const WCHAR* pwszPhonebook,
  524. IN const WCHAR* pwszEntry,
  525. IN BYTE* pConnectionDataIn,
  526. IN DWORD dwSizeOfConnectionDataIn,
  527. IN BYTE* pUserDataIn,
  528. IN DWORD dwSizeOfUserDataIn,
  529. OUT BYTE** ppUserDataOut,
  530. OUT DWORD* pdwSizeOfUserDataOut,
  531. OUT WCHAR** ppwszIdentity
  532. );
  533. #endif /* WINVER >= 0x0500 */
  534. #ifdef __cplusplus
  535. }
  536. #endif
  537. #endif // _RASEAPIF_