ieee802_1x_defs.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * IEEE Std 802.1X-2010 definitions
  3. * Copyright (c) 2013-2014, Qualcomm Atheros, Inc.
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef IEEE802_1X_DEFS_H
  9. #define IEEE802_1X_DEFS_H
  10. #define CS_ID_LEN 8
  11. #define CS_ID_GCM_AES_128 0x0080020001000001ULL
  12. #define CS_NAME_GCM_AES_128 "GCM-AES-128"
  13. enum macsec_policy {
  14. /**
  15. * Should secure sessions.
  16. * This accepts key server's advice to determine whether to secure the
  17. * session or not.
  18. */
  19. SHOULD_SECURE,
  20. /**
  21. * Disabled MACsec - do not secure sessions.
  22. */
  23. DO_NOT_SECURE,
  24. /**
  25. * Should secure sessions, and try to use encryption.
  26. * Like @SHOULD_SECURE, this follows the key server's decision.
  27. */
  28. SHOULD_ENCRYPT,
  29. };
  30. /* IEEE Std 802.1X-2010 - Table 11-6 - MACsec Capability */
  31. enum macsec_cap {
  32. /**
  33. * MACsec is not implemented
  34. */
  35. MACSEC_CAP_NOT_IMPLEMENTED,
  36. /**
  37. * 'Integrity without confidentiality'
  38. */
  39. MACSEC_CAP_INTEGRITY,
  40. /**
  41. * 'Integrity without confidentiality' and
  42. * 'Integrity and confidentiality' with a confidentiality offset of 0
  43. */
  44. MACSEC_CAP_INTEG_AND_CONF,
  45. /**
  46. * 'Integrity without confidentiality' and
  47. * 'Integrity and confidentiality' with a confidentiality offset of 0,
  48. * 30, 50
  49. */
  50. MACSEC_CAP_INTEG_AND_CONF_0_30_50,
  51. };
  52. enum validate_frames {
  53. Disabled,
  54. Checked,
  55. Strict,
  56. };
  57. /* IEEE Std 802.1X-2010 - Table 11-6 - Confidentiality Offset */
  58. enum confidentiality_offset {
  59. CONFIDENTIALITY_NONE = 0,
  60. CONFIDENTIALITY_OFFSET_0 = 1,
  61. CONFIDENTIALITY_OFFSET_30 = 2,
  62. CONFIDENTIALITY_OFFSET_50 = 3,
  63. };
  64. /* IEEE Std 802.1X-2010 - Table 9-2 */
  65. #define DEFAULT_PRIO_INFRA_PORT 0x10
  66. #define DEFAULT_PRIO_PRIMRAY_AP 0x30
  67. #define DEFAULT_PRIO_SECONDARY_AP 0x50
  68. #define DEFAULT_PRIO_GROUP_CA_MEMBER 0x70
  69. #define DEFAULT_PRIO_NOT_KEY_SERVER 0xFF
  70. #endif /* IEEE802_1X_DEFS_H */