eapol.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. eapol.h
  5. Abstract:
  6. This header contains definitions for the Extensible Authentication Protocol
  7. over LAN, which facilitates authenticating nodes over a secured network.
  8. Author:
  9. Chris Stevens 4-Nov-2015
  10. --*/
  11. //
  12. // ------------------------------------------------------------------- Includes
  13. //
  14. //
  15. // ---------------------------------------------------------------- Definitions
  16. //
  17. //
  18. // ------------------------------------------------------ Data Type Definitions
  19. //
  20. typedef enum EAPOL_MODE {
  21. EapolModeInvalid,
  22. EapolModeSupplicant,
  23. EapolModeAuthenticator
  24. } EAPOL_MODE, *PEAPOL_MODE;
  25. typedef
  26. VOID
  27. (*PEAPOL_COMPLETION_ROUTINE) (
  28. PVOID Context,
  29. KSTATUS Status
  30. );
  31. /*++
  32. Routine Description:
  33. This routine is called when an EAPOL exchange completes. It is supplied by
  34. the creator of the EAPOL instance.
  35. Arguments:
  36. Context - Supplies a pointer to the context supplied by the creator of the
  37. EAPOL instance.
  38. Status - Supplies the completion status of the EAPOL exchange.
  39. Return Value:
  40. None.
  41. --*/
  42. /*++
  43. Structure Description:
  44. This structure defines the parameters required to create an EAPOL instance.
  45. Members:
  46. Mode - Store the mode in which this EAPOL instance should act.
  47. NetworkLink - Stores a pointer to the network link over which this EAPOL
  48. instance will send and receive data.
  49. Net80211Link - Stores a pointer to the 802.11 link over which this EAPOL
  50. instance will send and receive data.
  51. SupplicantAddress - Stores the physical address of the EAPOL supplicant.
  52. AuthenticatorAddress - Stores the physical address of the EAPOL
  53. authenticator.
  54. Ssid - Stores a pointer to the SSID of the BSS for which the authentication
  55. is taking place.
  56. SsidLength - Stores the length of the SSID.
  57. Passphrase - Stores a pointer to the passphrase for the BSS.
  58. PassphraseLength - Stores the length of the passphrase.
  59. SupplicantRsn - Stores the RSN information from the supplicant's IEEE
  60. 802.11 association request packet.
  61. SupplicantRsnSize - Stores the size of the supplicant's RSN information.
  62. AuthenticatorRsn - Stores the RSN information from the authenticator's
  63. IEEE 802.11 beacon packet or probe response packet.
  64. AuthenticatorRsnSize - Stores the size of the authenticator's RSN
  65. information.
  66. CompletionRoutine - Stores a pointer to the completion routine.
  67. CompletionContext - Stores a pointer to the completion context.
  68. --*/
  69. typedef struct _EAPOL_CREATION_PARAMETERS {
  70. EAPOL_MODE Mode;
  71. PNET_LINK NetworkLink;
  72. PNET80211_LINK Net80211Link;
  73. PNETWORK_ADDRESS SupplicantAddress;
  74. PNETWORK_ADDRESS AuthenticatorAddress;
  75. PUCHAR Ssid;
  76. ULONG SsidLength;
  77. PUCHAR Passphrase;
  78. ULONG PassphraseLength;
  79. PUCHAR SupplicantRsn;
  80. ULONG SupplicantRsnSize;
  81. PUCHAR AuthenticatorRsn;
  82. ULONG AuthenticatorRsnSize;
  83. PEAPOL_COMPLETION_ROUTINE CompletionRoutine;
  84. PVOID CompletionContext;
  85. } EAPOL_CREATION_PARAMETERS, *PEAPOL_CREATION_PARAMETERS;
  86. //
  87. // -------------------------------------------------------------------- Globals
  88. //
  89. //
  90. // -------------------------------------------------------- Function Prototypes
  91. //
  92. KSTATUS
  93. Net80211pEapolCreateInstance (
  94. PEAPOL_CREATION_PARAMETERS Parameters,
  95. PHANDLE EapolHandle
  96. );
  97. /*++
  98. Routine Description:
  99. This routine creates an EAPOL instance through which a session's private
  100. key will be derived. The caller can indicate if it intends to be the
  101. supplicant or the authenticator in the parameters.
  102. Arguments:
  103. Parameters - Supplies a pointer to the EAPOL instance creation parameters.
  104. EapolHandle - Supplies a pointer that receives a handle to the created
  105. EAPOL instance.
  106. Return Value:
  107. Status code.
  108. --*/
  109. VOID
  110. Net80211pEapolDestroyInstance (
  111. HANDLE EapolHandle
  112. );
  113. /*++
  114. Routine Description:
  115. This routine destroys the given EAPOL instance.
  116. Arguments:
  117. EapolHandle - Supplies the handle to the EAPOL instance to destroy.
  118. Return Value:
  119. None.
  120. --*/