ieee802_1x_defs.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 {0x00, 0x80, 0x02, 0x00, 0x01, 0x00, 0x00, 0x01}
  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. /* IEEE Std 802.1X-2010 - Table 11-6 - MACsec Capability */
  26. enum macsec_cap {
  27. /**
  28. * MACsec is not implemented
  29. */
  30. MACSEC_CAP_NOT_IMPLEMENTED,
  31. /**
  32. * 'Integrity without confidentiality'
  33. */
  34. MACSEC_CAP_INTEGRITY,
  35. /**
  36. * 'Integrity without confidentiality' and
  37. * 'Integrity and confidentiality' with a confidentiality offset of 0
  38. */
  39. MACSEC_CAP_INTEG_AND_CONF,
  40. /**
  41. * 'Integrity without confidentiality' and
  42. * 'Integrity and confidentiality' with a confidentiality offset of 0,
  43. * 30, 50
  44. */
  45. MACSEC_CAP_INTEG_AND_CONF_0_30_50,
  46. };
  47. enum validate_frames {
  48. Disabled,
  49. Checked,
  50. Strict,
  51. };
  52. /* IEEE Std 802.1X-2010 - Table 11-6 - Confidentiality Offset */
  53. enum confidentiality_offset {
  54. CONFIDENTIALITY_NONE = 0,
  55. CONFIDENTIALITY_OFFSET_0 = 1,
  56. CONFIDENTIALITY_OFFSET_30 = 2,
  57. CONFIDENTIALITY_OFFSET_50 = 3,
  58. };
  59. /* IEEE Std 802.1X-2010 - Table 9-2 */
  60. #define DEFAULT_PRIO_INFRA_PORT 0x10
  61. #define DEFAULT_PRIO_PRIMRAY_AP 0x30
  62. #define DEFAULT_PRIO_SECONDARY_AP 0x50
  63. #define DEFAULT_PRIO_GROUP_CA_MEMBER 0x70
  64. #define DEFAULT_PRIO_NOT_KEY_SERVER 0xFF
  65. #endif /* IEEE802_1X_DEFS_H */