EAP_PEER_METHOD_ROUTINES structure

Contains a set of function pointers to the EAPHost Peer Method APIs.

Syntax


typedef struct _EAP_PEER_METHOD_ROUTINES {
  DWORD    dwVersion;
  EAP_TYPE *pEapType;
  DWORD    (APIENTRY *EapPeerInitialize)(EAP_ERROR **pEapError);
  DWORD    (APIENTRY *EapPeerGetIdentity)(
      _In_ DWORD dwflags, 
      _In_ DWORD dwSizeofConnectionData, 
      _In_ const BYTE *pConnectionData, 
      _In_ DWORD dwSizeOfUserData, 
      _In_ const BYTE *pUserData, 
      _In_ HANDLE hTokenImpersonateUser, 
      _Out_ BOOL *pfInvokeUI, 
      _Inout_ DWORD *pdwSizeOfUserDataOut, 
      _Out_ BYTE **ppUserDataOut, 
      _Out_ WCHAR **ppwszIdentity, 
      _Out_ EAP_ERROR *ppEapError);
  DWORD    (APIENTRY *EapPeerBeginSession)(
      _In_ DWORD dwFlags, 
      _In_ const EapAttributes *pAttributeArray, 
      _In_ HANDLE hTokenImpersonateUser, 
      _In_ DWORD dwSizeOfConnectionData, 
      _In_ BYTE *pConnectionData, 
      _In_ DWORD dwSizeOfUserData, 
      _In_ BYTE *pUserData, 
      _In_ DWORD dwMaxSendPacketSize, 
      _Out_ EAP_SESSION_HANDLE *pSessionHandle, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerSetCredentials)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _In_ WCHAR *pwszIdentity, 
      _In_ WCHAR *pwszPassword, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerProcessRequestPacket)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _In_ DWORD cbReceivePacket, 
      _In_ EapPacket *pReceivePacket, 
      _Out_ EapPeerMethodOutput *pEapOutput, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerGetResponsePacket)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _Inout_ DWORD *pcbSendPacket, 
      _Out_ EapPacket *pSendPacket, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerGetResult)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _In_ EapPeerMethodResultReason reason, 
      _Out_ EapPeerMethodResult *ppResult, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerGetUIContext)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _Out_ DWORD *pdwSizeOfUIContextData, 
      _Out_ BYTE **ppUIContextData, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerSetUIContext)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _In_ DWORD dwSizeOfUIContextData, 
      _In_ const BYTE *pUIContextData, 
      _In_ EapPeerMethodOutput *pEapOutput, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerGetResponseAttributes)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _Out_ EapAttributes *pAttribs, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerSetResponseAttributes)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _In_ EapAttributes *pAttribs, 
      _Out_ EapPeerMethodOutput *pEapOutput, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerEndSession)(
      _In_ EAP_SESSION_HANDLE sessionHandle, 
      _Out_ EAP_ERROR **ppEapError);
  DWORD    (APIENTRY *EapPeerShutdown)(_Out_ EAP_ERROR **ppEapError);
} EAP_PEER_METHOD_ROUTINES;

Members

dwVersion

The implementer-defined structure version.

Note  Values for this field are not defined by Microsoft.
 
pEapType

A pointer to an EAP_TYPE structure that contains the vendor information on the implementer of the APIs pointed to by the members of this structure.

EapPeerInitialize

A function pointer for EapPeerInitialize.

pEapError

A pointer to the EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by passing a pointer to EapPeerFreeErrorMemory.

EapPeerGetIdentity

A function pointer for EapPeerGetIdentity.

dwflags

A combination of EAP flags that describe the EAP authentication session behavior.

dwSizeofConnectionData

Specifies the size, in bytes, of the connection data buffer provided in pConnectionData

pConnectionData

A pointer to a byte buffer that contains the opaque configuration data BLOB.

dwSizeOfUserData

Specifies the size, in bytes, of the user data buffer provided in pUserData.

pUserData

A pointer to the user data specific to this authentication used to pre-populate the user data. When this API is called for the first time, or when a new authentication session starts, this parameter is NULL. Otherwise, set this parameter to the pUserData member of the structure pointed to by theppResult parameter received by EapPeerGetResult.

hTokenImpersonateUser

Specifies a handle to the impersonation token of the user being authenticated. This handle will be NULL when doing machine authentication. By using this handle an EAP method can impersonate the user for the purpose of obtaining user specific information such as user name, domain name and credentials.

pfInvokeUI

Returns TRUE if the user identity and user data blob are not returned successfully, and the method seeks to collect the information from the user through the user interface dialog.

pdwSizeOfUserDataOut

Specifies the size, in bytes, of the ppUserDataOut buffer.

ppUserDataOut

A pointer to a pointer to the returned user data. The data is passed to EapPeerBeginSession as input pUserData.

ppwszIdentity

A pointer to the returned user identity. The pointer will be included in the identity response packet and returned to the server.

ppEapError

A pointer to the pointer to an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.

EapPeerBeginSession

A function pointer for EapPeerBeginSession.

dwFlags

A combination of EAP flags that describe the new EAP authentication session behavior.

pAttributeArray

Pointer to an EAP_ATTRIBUTES array structure that specifies the EAP attributes of the entity to authenticate.

hTokenImpersonateUser

Specifies a handle to the user impersonation token to use in this session.

dwSizeOfConnectionData

Specifies the size, in bytes, of the connection data buffer provided in pConnectionData.

pConnectionData

Pointer to a byte buffer that contains the opaque configuration data BLOB.

dwSizeOfUserData

Specifies the size in bytes of the user data buffer provided in pUserData.

pUserData

Pointer to a byte buffer that contains the opaque user data BLOB.

dwMaxSendPacketSize

Specifies the maximum size in bytes of an EAP packet sent during the session. If the method needs to send a packet larger than the maximum size, the method must accommodate fragmentation and reassembly.

pSessionHandle

Pointer to a EAP_SESSION_HANDLE structure that contains the unique ID for the new EAP authentication session on EAPHost

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised by EAPHost during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.

EapPeerSetCredentials

A function pointer for EapPeerSetCredentials.

sessionHandle

A pointer to an EAP_SESSION_HANDLE structure that contains the unique handle for this EAP authentication session on the EAPHost server. This handle is returned in the pSessionHandle parameter in a previous call to EapPeerBeginSession.

pwszIdentity

Pointer that specifies the user identity for which to set the credentials. This user identity string is obtained by calling the EapPeerGetIdentity function.

pwszPassword

A pointer that contains the clear text password for the user identity.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.

EapPeerProcessRequestPacket

A function pointer for EapPeerProcessRequestPacket.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

cbReceivePacket

The size in bytes of the request packet specified in pReceivePacket.

pReceivePacket

Pointer to an EapPacket structure that contains the request packet to process.

pEapOutput

Pointer to an EapPeerMethodOutput structure that contains the output of the packet process operation.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.

EapPeerGetResponsePacket

A function pointer for EapPeerGetResponsePacket.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

pcbSendPacket

Pointer to a value that contains the size in bytes of the buffer allocated for the response packet. On return, this parameter receives a pointer to the actual size in bytes of pSendPacket.

pSendPacket

Pointer to an EapPacket structure that contains the response packet.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by callingEapPeerFreeErrorMemory.

EapPeerGetResult

A function pointer for EapPeerGetResult.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

reason

Enumeration value that specifies the reason code for the authentication result returned in ppResult.

ppResult

Pointer to a EapHostPeerMethodResult structure that contains the authentication results.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by passing a pointer to EapPeerFreeErrorMemory.

EapPeerGetUIContext

A function pointer for EapPeerGetUIContext.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

pdwSizeOfUIContextData

Pointer to a value that specifies the size of the user interface context data byte buffer returned in ppUIContextData.

ppUIContextData

Pointer to an address that contains a byte buffer with the supplicant user interface context data from EAPHost.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by passing a pointer to the error data to EapPeerFreeErrorMemory.

EapPeerSetUIContext

A function pointer for EapPeerSetUIContext.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

dwSizeOfUIContextData

Pointer to a value that specifies the size of the UI context data byte buffer provided in pUIContextData.

pUIContextData

Pointer to an address that contains a byte buffer with the new supplicant UI context data to set on EAPHost.

pEapOutput

A pointer to an EapPeerMethodOutput structure that contains the output of the packet process operation.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by passing a pointer to EapPeerFreeErrorMemory.

EapPeerGetResponseAttributes

A function pointer for EapPeerGetResponseAttributes.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

pAttribs

Receives a pointer to an EAP_ATTRIBUTES structure that contains an array of EAP authentication response attributes for the supplicant.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by callingEapPeerFreeErrorMemory.

EapPeerSetResponseAttributes

A function pointer for EapPeerSetResponseAttributes.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

pAttribs

Pointer to an EAP_ATTRIBUTES structure that contains an array of new EAP authentication response attributes to set for the supplicant on EAPHost.

pEapOutput

A pointer to an EapPeerMethodOutput structure that specifies the suggested action the supplicant should take as a response to the updated attributes.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.

EapPeerEndSession

A function pointer for EapPeerEndSession.

sessionHandle

EAP_SESSION_HANDLE value that contains the specific handle for the EAP authentication session to close on EAPHost. This handle is obtained by a previous call to EapPeerBeginSession.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.

EapPeerShutdown

A function pointer for EapPeerShutdown.

ppEapError

Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by passing a pointer to EapPeerFreeErrorMemory.

Remarks

Each EAP method DLL must implement the following APIs:

These APIs correspond to calls made by a supplicant, and serve as a proxy between the supplicant's API calls and the public APIs exposed on the EAP method DLL. Therefore, when a supplicant makes a call to a peer-based EAPHost to establish an authentication session or to perform an operation during that session, EAPHost calls the corresponding implemented function on the EAP method DLL with the parameter data provided. The EAP method functions are managed by pointers to their respective entry points.

The other functions in the EAP Peer Method API set are called by a peer-based EAPHost without a corresponding supplicant call, and are used for connection validation or user interface raising operations.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Eapmethodpeerapis.h

See also

EapPeerGetInfo
EAPHost Peer Method Structures

 

 

Community Additions

ADD
Show: