Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1999, Microsoft Corporation
  3. Module Name:
  4. eapol.h
  5. Abstract:
  6. This module contains declarations which will be used by other processes.
  7. This may be placed in sdk\inc
  8. Revision History:
  9. sachins, Apr 23 2000, Created
  10. --*/
  11. #ifndef _EAPOL_H_
  12. #define _EAPOL_H_
  13. //
  14. // Structure: EAPOL_STATS
  15. //
  16. typedef struct _EAPOL_STATS
  17. {
  18. DWORD dwEAPOLFramesRcvd;
  19. DWORD dwEAPOLFramesXmt;
  20. DWORD dwEAPOLStartFramesXmt;
  21. DWORD dwEAPOLLogoffFramesXmt;
  22. DWORD dwEAPRespIdFramesXmt;
  23. DWORD dwEAPRespFramesXmt;
  24. DWORD dwEAPReqIdFramesRcvd;
  25. DWORD dwEAPReqFramesRcvd;
  26. DWORD dwEAPOLInvalidFramesRcvd;
  27. DWORD dwEAPLengthErrorFramesRcvd;
  28. DWORD dwEAPOLLastFrameVersion;
  29. BYTE bEAPOLLastFrameSource[6]; // assuming 6-byte MAC addr
  30. } EAPOL_STATS, *PEAPOL_STATS;
  31. //
  32. // Structure: EAPOL_CONFIG
  33. //
  34. typedef struct _EAPOL_CONFIG
  35. {
  36. DWORD dwheldPeriod; // Time in seconds, for which the
  37. // port will be held in HELD state
  38. DWORD dwauthPeriod; // Time in seconds, for which the
  39. // port will wait in AUTHENTICATING/
  40. // ACQUIRED state waiting for requests
  41. DWORD dwstartPeriod; // Time in seconds, the port will
  42. // wait in CONNECTING state, before
  43. // re-issuing EAPOL_START packet
  44. DWORD dwmaxStart; // Max number of EAPOL_Start packets
  45. // that can be sent out without any
  46. // response
  47. } EAPOL_CONFIG, *PEAPOL_CONFIG;
  48. //
  49. // EAPOL states
  50. //
  51. typedef enum _EAPOL_STATE
  52. {
  53. EAPOLSTATE_LOGOFF,
  54. EAPOLSTATE_DISCONNECTED,
  55. EAPOLSTATE_CONNECTING,
  56. EAPOLSTATE_ACQUIRED,
  57. EAPOLSTATE_AUTHENTICATING,
  58. EAPOLSTATE_HELD,
  59. EAPOLSTATE_AUTHENTICATED
  60. } EAPOL_STATE;
  61. //
  62. // Structure: EAPOL_CUSTOM_AUTH_DATA
  63. //
  64. typedef struct _EAPOL_CUSTOM_AUTH_DATA
  65. {
  66. DWORD dwSizeOfCustomAuthData;
  67. BYTE pbCustomAuthData[1];
  68. } EAPOL_CUSTOM_AUTH_DATA, *PEAPOL_CUSTOM_AUTH_DATA;
  69. //
  70. // Structure: EAPOL_EAP_UI_DATA
  71. //
  72. typedef struct _EAPOL_EAP_UI_DATA
  73. {
  74. DWORD dwContextId;
  75. PBYTE pEapUIData;
  76. DWORD dwSizeOfEapUIData;
  77. } EAPOL_EAP_UI_DATA, *PEAPOL_EAP_UI_DATA;
  78. // Definitions common to elport.c and eleap.c
  79. //
  80. // Defines states for the EAP protocol.
  81. //
  82. typedef enum _EAPSTATE
  83. {
  84. EAPSTATE_Initial,
  85. EAPSTATE_IdentityRequestSent,
  86. EAPSTATE_Working,
  87. EAPSTATE_EapPacketSentToAuthServer,
  88. EAPSTATE_EapPacketSentToClient,
  89. EAPSTATE_NotificationSentToClient
  90. } EAPSTATE;
  91. typedef enum _EAPTYPE
  92. {
  93. EAPTYPE_Identity = 1,
  94. EAPTYPE_Notification,
  95. EAPTYPE_Nak,
  96. EAPTYPE_MD5Challenge,
  97. EAPTYPE_SKey,
  98. EAPTYPE_GenericTokenCard
  99. } EAPTYPE;
  100. //
  101. // Actions that need to be performed on EAP data after it is processed
  102. //
  103. typedef enum _ELEAP_ACTION
  104. {
  105. ELEAP_NoAction,
  106. ELEAP_Done,
  107. ELEAP_SendAndDone,
  108. ELEAP_Send
  109. } ELEAP_ACTION;
  110. //
  111. // EAPOL Authentication Types - Used for MACHINE_AUTH
  112. //
  113. typedef enum _EAPOL_AUTHENTICATION_TYPE
  114. {
  115. EAPOL_UNAUTHENTICATED_ACCESS,
  116. EAPOL_USER_AUTHENTICATION,
  117. EAPOL_MACHINE_AUTHENTICATION
  118. } EAPOL_AUTHENTICATION_TYPE;
  119. #endif // _EAPOL_H_