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.

89 lines
3.1 KiB

  1. //============================================================================//
  2. // MODULE: eapol.h //
  3. // //
  4. // Description: EAPOL/802.1X Parser //
  5. // //
  6. // Note: info for this parsers was gleaned from :
  7. // IEEE 802.1X
  8. // //
  9. // Modification History //
  10. // //
  11. // timmoore 04/04/2000 Created //
  12. //===========================================================================//
  13. #ifndef __EAPOL_H_
  14. #define __EAPOL_H_
  15. #include <windows.h>
  16. #include <netmon.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. // #include <parser.h>
  20. // EAPOL Header structure----------------------------------------------------
  21. #pragma pack(1)
  22. typedef struct _EAPHDR
  23. {
  24. BYTE bVersion;
  25. BYTE bType; // packet type
  26. WORD wLength;
  27. BYTE pEAPPacket[0];
  28. } EAPHDR;
  29. typedef EAPHDR UNALIGNED *ULPEAPHDR;
  30. typedef struct _EAPOLKEY
  31. {
  32. BYTE bSignType;
  33. BYTE bKeyType;
  34. WORD wKeyLength;
  35. BYTE bKeyReplay[16];
  36. BYTE bKeyIV[16];
  37. BYTE bKeyIndex;
  38. BYTE bKeySign[16];
  39. BYTE bKey[0];
  40. } EAPOLKEY;
  41. typedef EAPOLKEY UNALIGNED *ULPEAPOLKEY;
  42. #pragma pack()
  43. // packet types
  44. #define EAPOL_PACKET 0
  45. #define EAPOL_START 1
  46. #define EAPOL_LOGOFF 2
  47. #define EAPOL_KEY 3
  48. // property table indice
  49. typedef enum
  50. {
  51. EAPOL_SUMMARY,
  52. EAPOL_VERSION,
  53. EAPOL_TYPE,
  54. EAPOL_LENGTH,
  55. EAPOL_KEY_SIGNTYPE,
  56. EAPOL_KEY_KEYTYPE,
  57. EAPOL_KEY_KEYLENGTH,
  58. EAPOL_KEY_KEYREPLAY,
  59. EAPOL_KEY_KEYIV,
  60. EAPOL_KEY_KEYINDEX,
  61. EAPOL_KEY_KEYSIGN,
  62. EAPOL_KEY_KEY,
  63. EAPOL_UNKNOWN,
  64. };
  65. // Functions Prototypes --------------------------------------------------------
  66. extern VOID WINAPI EAPOL_Register( HPROTOCOL hEAPOL);
  67. extern VOID WINAPI EAPOL_Deregister( HPROTOCOL hEAPOL);
  68. extern ULPBYTE WINAPI EAPOL_RecognizeFrame(HFRAME, LPVOID, LPVOID, DWORD, DWORD, HPROTOCOL, DWORD, LPDWORD, LPHPROTOCOL, PDWORD_PTR);
  69. extern ULPBYTE WINAPI EAPOL_AttachProperties(HFRAME, ULPBYTE, ULPBYTE, DWORD, DWORD, HPROTOCOL, DWORD, DWORD_PTR);
  70. extern DWORD WINAPI EAPOL_FormatProperties( HFRAME hFrame,
  71. ULPBYTE pMacFrame,
  72. ULPBYTE pEAPOLFrame,
  73. DWORD nPropertyInsts,
  74. LPPROPERTYINST p);
  75. VOID WINAPIV EAPOL_FormatSummary( LPPROPERTYINST pPropertyInst);
  76. VOID WINAPIV EAPOL_FormatAttribute( LPPROPERTYINST pPropertyInst);
  77. #endif