Partager via


EAP_PEER_METHOD_ROUTINES (Compact 7)

3/12/2014

This structure contains a set of function pointers to the EAPHost Peer Method API.

Syntax

typedef struct {
  DWORD dwVersion;
  EAP_TYPE* pEapType;
  DWORD (APIENTRY * EapPeerInitialize) (
    [out]  EAP_ERROR* pEapError
  );
  DWORD (APIENTRY * EapPeerBeginSession) (
    [in]  DWORD dwFlags, 
    [in]  EAP_METHOD_TYPE eapType, 
    [in]  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, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerGetIdentity) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [out]  BOOL* pfInvokeUI, 
    [out]  LPWSTR* ppwszIdentity, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerSetCredentials) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [in]  CHAR pwszIdentity, 
    [in]  CHAR pwszPassword, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerProcessRequestPacket) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [in]  DWORD cbReceivePacket, 
    [in]  EapPacket* pReceivePacket, 
    [out]  EapPeerMethodOutput* pEapOutput, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerGetResponsePacket) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [in, out]  DWORD* pcbSendPacket, 
    [out]  EapPacket* pSendPacket, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerGetResult) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [in]  EapPeerMethodResultReason reason, 
    [out]  EapPeerMethodResult* ppResult, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerGetUIContext) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [out]  DWORD* pdwSizeOfUIContextData, 
    [out]  BYTE** ppUIContextData, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerSetUIContext) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [in]  DWORD dwSizeOfUIContextData, 
    [in]  BYTE* pUIContextData, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerGetResponseAttributes) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [out]  EapAttributes* pAttribs, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerSetResponseAttributes) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [in]  EapAttributes* pAttribs, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerEndSession) (
    [in]  EAP_SESSION_HANDLE sessionHandle, 
    [out, optional]  EAP_ERROR** ppEapError
  );
  DWORD (APIENTRY * EapPeerShutdown) (
    [out, optional]  EAP_ERROR** ppEapError
  );
} EAP_PEER_METHOD_ROUTINES;

Members

  • dwVersion
    The version of this structure.
  • 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 using the error data, this memory must be freed by passing a pointer to EapPeerFreeErrorMemory.
  • EapPeerBeginSession
    A function pointer for EapPeerBeginSession.

    • dwFlags
      Specifies a set of flags that describe the behavior of the new EAP authentication session. See EapPeerBeginSession for possible value(s).
    • eapType
      A pointer to an EAP_METHOD_TYPE structure that contains the ID for the EAP method and specific vendor information.
    • 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 has 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 using the error data, this memory must be freed by calling EapPeerFreeErrorMemory.
  • EapPeerGetIdentity
    A function pointer for EapPeerGetIdentity.

    • 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
    • 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.
    • ppwszIdentity
      A pointer to the returned user identity. The pointer will be included in the identity response packet and returned to the server.
    • ppEapError
      Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After using the error data, this memory must be freed by calling EapPeerFreeErrorMemory.
  • EapPeerSetCredentials
    A function pointer for EapPeerSetCredentials.

    • 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
    • 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
      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 using 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 using 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 using the error data, this memory must be freed by calling EapPeerFreeErrorMemory.
  • 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 using 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 using 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.
    • ppEapError
      Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After using 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 using the error data, this memory must be freed by calling EapPeerFreeErrorMemory.
  • 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.
    • ppEapError
      Pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call. After using 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 using 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 using the error data, this memory must be freed by passing a pointer to EapPeerFreeErrorMemory.

Remarks

Each EAP method DLL must implement the following APIs:

  • EapPeerInitialize
  • EapPeerBeginSession
  • EapPeerGetIdentity
  • EapPeerSetCredentials
  • EapPeerProcessRequestPacket
  • EapPeerGetResponsePacket
  • EapPeerGetResult
  • EapPeerGetUIContext
  • EapPeerSetUIContext
  • EapPeerGetResponseAttributes
  • EapPeerSetResponseAttributes
  • EapPeerEndSession
  • EapPeerShutdown

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 that was 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.

See Also

Reference

EAPHost Peer Method Structures
EapPeerGetInfo