xref: /freebsd/contrib/wpa/src/common/ieee802_1x_defs.h (revision a25896ca1270e25b657ceaa8d47d5699515f5c25)
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 
9 #ifndef IEEE802_1X_DEFS_H
10 #define IEEE802_1X_DEFS_H
11 
12 #define CS_ID_LEN		8
13 #define CS_ID_GCM_AES_128	0x0080020001000001ULL
14 #define CS_NAME_GCM_AES_128	"GCM-AES-128"
15 
16 enum macsec_policy {
17 	/**
18 	 * Should secure sessions.
19 	 * This accepts key server's advice to determine whether to secure the
20 	 * session or not.
21 	 */
22 	SHOULD_SECURE,
23 
24 	/**
25 	 * Disabled MACsec - do not secure sessions.
26 	 */
27 	DO_NOT_SECURE,
28 };
29 
30 
31 /* IEEE Std 802.1X-2010 - Table 11-6 - MACsec Capability */
32 enum macsec_cap {
33 	/**
34 	 * MACsec is not implemented
35 	 */
36 	MACSEC_CAP_NOT_IMPLEMENTED,
37 
38 	/**
39 	 * 'Integrity without confidentiality'
40 	 */
41 	MACSEC_CAP_INTEGRITY,
42 
43 	/**
44 	 * 'Integrity without confidentiality' and
45 	 * 'Integrity and confidentiality' with a confidentiality offset of 0
46 	 */
47 	MACSEC_CAP_INTEG_AND_CONF,
48 
49 	/**
50 	 * 'Integrity without confidentiality' and
51 	 * 'Integrity and confidentiality' with a confidentiality offset of 0,
52 	 * 30, 50
53 	 */
54 	MACSEC_CAP_INTEG_AND_CONF_0_30_50,
55 };
56 
57 enum validate_frames {
58 	Disabled,
59 	Checked,
60 	Strict,
61 };
62 
63 /* IEEE Std 802.1X-2010 - Table 11-6 - Confidentiality Offset */
64 enum confidentiality_offset {
65 	CONFIDENTIALITY_NONE      = 0,
66 	CONFIDENTIALITY_OFFSET_0  = 1,
67 	CONFIDENTIALITY_OFFSET_30 = 2,
68 	CONFIDENTIALITY_OFFSET_50 = 3,
69 };
70 
71 /* IEEE Std 802.1X-2010 - Table 9-2 */
72 #define DEFAULT_PRIO_INFRA_PORT        0x10
73 #define DEFAULT_PRIO_PRIMRAY_AP        0x30
74 #define DEFAULT_PRIO_SECONDARY_AP      0x50
75 #define DEFAULT_PRIO_GROUP_CA_MEMBER   0x70
76 #define DEFAULT_PRIO_NOT_KEY_SERVER    0xFF
77 
78 #endif /* IEEE802_1X_DEFS_H */
79