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