122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI_MACSEC_H
2022851890Sopenharmony_ci#define _UAPI_MACSEC_H
2122851890Sopenharmony_ci#include <linux/types.h>
2222851890Sopenharmony_ci#define MACSEC_GENL_NAME "macsec"
2322851890Sopenharmony_ci#define MACSEC_GENL_VERSION 1
2422851890Sopenharmony_ci#define MACSEC_MAX_KEY_LEN 128
2522851890Sopenharmony_ci#define MACSEC_KEYID_LEN 16
2622851890Sopenharmony_ci#define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL
2722851890Sopenharmony_ci#define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL
2822851890Sopenharmony_ci#define MACSEC_CIPHER_ID_GCM_AES_XPN_128 0x0080C20001000003ULL
2922851890Sopenharmony_ci#define MACSEC_CIPHER_ID_GCM_AES_XPN_256 0x0080C20001000004ULL
3022851890Sopenharmony_ci#define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL
3122851890Sopenharmony_ci#define MACSEC_DEFAULT_CIPHER_ALT MACSEC_CIPHER_ID_GCM_AES_128
3222851890Sopenharmony_ci#define MACSEC_MIN_ICV_LEN 8
3322851890Sopenharmony_ci#define MACSEC_MAX_ICV_LEN 32
3422851890Sopenharmony_ci#define MACSEC_STD_ICV_LEN 16
3522851890Sopenharmony_cienum macsec_attrs {
3622851890Sopenharmony_ci  MACSEC_ATTR_UNSPEC,
3722851890Sopenharmony_ci  MACSEC_ATTR_IFINDEX,
3822851890Sopenharmony_ci  MACSEC_ATTR_RXSC_CONFIG,
3922851890Sopenharmony_ci  MACSEC_ATTR_SA_CONFIG,
4022851890Sopenharmony_ci  MACSEC_ATTR_SECY,
4122851890Sopenharmony_ci  MACSEC_ATTR_TXSA_LIST,
4222851890Sopenharmony_ci  MACSEC_ATTR_RXSC_LIST,
4322851890Sopenharmony_ci  MACSEC_ATTR_TXSC_STATS,
4422851890Sopenharmony_ci  MACSEC_ATTR_SECY_STATS,
4522851890Sopenharmony_ci  MACSEC_ATTR_OFFLOAD,
4622851890Sopenharmony_ci  __MACSEC_ATTR_END,
4722851890Sopenharmony_ci  NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
4822851890Sopenharmony_ci  MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
4922851890Sopenharmony_ci};
5022851890Sopenharmony_cienum macsec_secy_attrs {
5122851890Sopenharmony_ci  MACSEC_SECY_ATTR_UNSPEC,
5222851890Sopenharmony_ci  MACSEC_SECY_ATTR_SCI,
5322851890Sopenharmony_ci  MACSEC_SECY_ATTR_ENCODING_SA,
5422851890Sopenharmony_ci  MACSEC_SECY_ATTR_WINDOW,
5522851890Sopenharmony_ci  MACSEC_SECY_ATTR_CIPHER_SUITE,
5622851890Sopenharmony_ci  MACSEC_SECY_ATTR_ICV_LEN,
5722851890Sopenharmony_ci  MACSEC_SECY_ATTR_PROTECT,
5822851890Sopenharmony_ci  MACSEC_SECY_ATTR_REPLAY,
5922851890Sopenharmony_ci  MACSEC_SECY_ATTR_OPER,
6022851890Sopenharmony_ci  MACSEC_SECY_ATTR_VALIDATE,
6122851890Sopenharmony_ci  MACSEC_SECY_ATTR_ENCRYPT,
6222851890Sopenharmony_ci  MACSEC_SECY_ATTR_INC_SCI,
6322851890Sopenharmony_ci  MACSEC_SECY_ATTR_ES,
6422851890Sopenharmony_ci  MACSEC_SECY_ATTR_SCB,
6522851890Sopenharmony_ci  MACSEC_SECY_ATTR_PAD,
6622851890Sopenharmony_ci  __MACSEC_SECY_ATTR_END,
6722851890Sopenharmony_ci  NUM_MACSEC_SECY_ATTR = __MACSEC_SECY_ATTR_END,
6822851890Sopenharmony_ci  MACSEC_SECY_ATTR_MAX = __MACSEC_SECY_ATTR_END - 1,
6922851890Sopenharmony_ci};
7022851890Sopenharmony_cienum macsec_rxsc_attrs {
7122851890Sopenharmony_ci  MACSEC_RXSC_ATTR_UNSPEC,
7222851890Sopenharmony_ci  MACSEC_RXSC_ATTR_SCI,
7322851890Sopenharmony_ci  MACSEC_RXSC_ATTR_ACTIVE,
7422851890Sopenharmony_ci  MACSEC_RXSC_ATTR_SA_LIST,
7522851890Sopenharmony_ci  MACSEC_RXSC_ATTR_STATS,
7622851890Sopenharmony_ci  MACSEC_RXSC_ATTR_PAD,
7722851890Sopenharmony_ci  __MACSEC_RXSC_ATTR_END,
7822851890Sopenharmony_ci  NUM_MACSEC_RXSC_ATTR = __MACSEC_RXSC_ATTR_END,
7922851890Sopenharmony_ci  MACSEC_RXSC_ATTR_MAX = __MACSEC_RXSC_ATTR_END - 1,
8022851890Sopenharmony_ci};
8122851890Sopenharmony_cienum macsec_sa_attrs {
8222851890Sopenharmony_ci  MACSEC_SA_ATTR_UNSPEC,
8322851890Sopenharmony_ci  MACSEC_SA_ATTR_AN,
8422851890Sopenharmony_ci  MACSEC_SA_ATTR_ACTIVE,
8522851890Sopenharmony_ci  MACSEC_SA_ATTR_PN,
8622851890Sopenharmony_ci  MACSEC_SA_ATTR_KEY,
8722851890Sopenharmony_ci  MACSEC_SA_ATTR_KEYID,
8822851890Sopenharmony_ci  MACSEC_SA_ATTR_STATS,
8922851890Sopenharmony_ci  MACSEC_SA_ATTR_PAD,
9022851890Sopenharmony_ci  MACSEC_SA_ATTR_SSCI,
9122851890Sopenharmony_ci  MACSEC_SA_ATTR_SALT,
9222851890Sopenharmony_ci  __MACSEC_SA_ATTR_END,
9322851890Sopenharmony_ci  NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END,
9422851890Sopenharmony_ci  MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
9522851890Sopenharmony_ci};
9622851890Sopenharmony_cienum macsec_offload_attrs {
9722851890Sopenharmony_ci  MACSEC_OFFLOAD_ATTR_UNSPEC,
9822851890Sopenharmony_ci  MACSEC_OFFLOAD_ATTR_TYPE,
9922851890Sopenharmony_ci  MACSEC_OFFLOAD_ATTR_PAD,
10022851890Sopenharmony_ci  __MACSEC_OFFLOAD_ATTR_END,
10122851890Sopenharmony_ci  NUM_MACSEC_OFFLOAD_ATTR = __MACSEC_OFFLOAD_ATTR_END,
10222851890Sopenharmony_ci  MACSEC_OFFLOAD_ATTR_MAX = __MACSEC_OFFLOAD_ATTR_END - 1,
10322851890Sopenharmony_ci};
10422851890Sopenharmony_cienum macsec_nl_commands {
10522851890Sopenharmony_ci  MACSEC_CMD_GET_TXSC,
10622851890Sopenharmony_ci  MACSEC_CMD_ADD_RXSC,
10722851890Sopenharmony_ci  MACSEC_CMD_DEL_RXSC,
10822851890Sopenharmony_ci  MACSEC_CMD_UPD_RXSC,
10922851890Sopenharmony_ci  MACSEC_CMD_ADD_TXSA,
11022851890Sopenharmony_ci  MACSEC_CMD_DEL_TXSA,
11122851890Sopenharmony_ci  MACSEC_CMD_UPD_TXSA,
11222851890Sopenharmony_ci  MACSEC_CMD_ADD_RXSA,
11322851890Sopenharmony_ci  MACSEC_CMD_DEL_RXSA,
11422851890Sopenharmony_ci  MACSEC_CMD_UPD_RXSA,
11522851890Sopenharmony_ci  MACSEC_CMD_UPD_OFFLOAD,
11622851890Sopenharmony_ci};
11722851890Sopenharmony_cienum macsec_rxsc_stats_attr {
11822851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_UNSPEC,
11922851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_OCTETS_VALIDATED,
12022851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_OCTETS_DECRYPTED,
12122851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_UNCHECKED,
12222851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_DELAYED,
12322851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_OK,
12422851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_INVALID,
12522851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_LATE,
12622851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_NOT_VALID,
12722851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_NOT_USING_SA,
12822851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_IN_PKTS_UNUSED_SA,
12922851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_PAD,
13022851890Sopenharmony_ci  __MACSEC_RXSC_STATS_ATTR_END,
13122851890Sopenharmony_ci  NUM_MACSEC_RXSC_STATS_ATTR = __MACSEC_RXSC_STATS_ATTR_END,
13222851890Sopenharmony_ci  MACSEC_RXSC_STATS_ATTR_MAX = __MACSEC_RXSC_STATS_ATTR_END - 1,
13322851890Sopenharmony_ci};
13422851890Sopenharmony_cienum macsec_sa_stats_attr {
13522851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_UNSPEC,
13622851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_IN_PKTS_OK,
13722851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_IN_PKTS_INVALID,
13822851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_IN_PKTS_NOT_VALID,
13922851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_IN_PKTS_NOT_USING_SA,
14022851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_IN_PKTS_UNUSED_SA,
14122851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_OUT_PKTS_PROTECTED,
14222851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_OUT_PKTS_ENCRYPTED,
14322851890Sopenharmony_ci  __MACSEC_SA_STATS_ATTR_END,
14422851890Sopenharmony_ci  NUM_MACSEC_SA_STATS_ATTR = __MACSEC_SA_STATS_ATTR_END,
14522851890Sopenharmony_ci  MACSEC_SA_STATS_ATTR_MAX = __MACSEC_SA_STATS_ATTR_END - 1,
14622851890Sopenharmony_ci};
14722851890Sopenharmony_cienum macsec_txsc_stats_attr {
14822851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_UNSPEC,
14922851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_OUT_PKTS_PROTECTED,
15022851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_OUT_PKTS_ENCRYPTED,
15122851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_OUT_OCTETS_PROTECTED,
15222851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_OUT_OCTETS_ENCRYPTED,
15322851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_PAD,
15422851890Sopenharmony_ci  __MACSEC_TXSC_STATS_ATTR_END,
15522851890Sopenharmony_ci  NUM_MACSEC_TXSC_STATS_ATTR = __MACSEC_TXSC_STATS_ATTR_END,
15622851890Sopenharmony_ci  MACSEC_TXSC_STATS_ATTR_MAX = __MACSEC_TXSC_STATS_ATTR_END - 1,
15722851890Sopenharmony_ci};
15822851890Sopenharmony_cienum macsec_secy_stats_attr {
15922851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_UNSPEC,
16022851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_OUT_PKTS_UNTAGGED,
16122851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_IN_PKTS_UNTAGGED,
16222851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_OUT_PKTS_TOO_LONG,
16322851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_IN_PKTS_NO_TAG,
16422851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_IN_PKTS_BAD_TAG,
16522851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_IN_PKTS_UNKNOWN_SCI,
16622851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_IN_PKTS_NO_SCI,
16722851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_IN_PKTS_OVERRUN,
16822851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_PAD,
16922851890Sopenharmony_ci  __MACSEC_SECY_STATS_ATTR_END,
17022851890Sopenharmony_ci  NUM_MACSEC_SECY_STATS_ATTR = __MACSEC_SECY_STATS_ATTR_END,
17122851890Sopenharmony_ci  MACSEC_SECY_STATS_ATTR_MAX = __MACSEC_SECY_STATS_ATTR_END - 1,
17222851890Sopenharmony_ci};
17322851890Sopenharmony_ci#endif
174