5 #ifndef IEEE802_1X_KAY_H
6 #define IEEE802_1X_KAY_H
12 struct macsec_init_params;
16 #define MAX_KEY_LEN 32
17 #define MAX_CKN_LEN 32
20 #define MKA_HELLO_TIME 2000
21 #define MKA_LIFE_TIME 6000
22 #define MKA_SAK_RETIRE_TIME 3000
44 enum mka_created_mode {
56 int (*macsec_init)(
void *ctx,
struct macsec_init_params *params);
57 int (*macsec_deinit)(
void *ctx);
58 int (*enable_protect_frames)(
void *ctx, Boolean enabled);
59 int (*set_replay_protect)(
void *ctx, Boolean enabled, u32 window);
60 int (*set_current_cipher_suite)(
void *ctx,
const u8 *cs,
size_t cs_len);
61 int (*enable_controlled_port)(
void *ctx, Boolean enabled);
62 int (*get_receive_lowest_pn)(
void *ctx, u32 channel, u8 an,
64 int (*get_transmit_next_pn)(
void *ctx, u32 channel, u8 an,
66 int (*set_transmit_next_pn)(
void *ctx, u32 channel, u8 an, u32 next_pn);
67 int (*get_available_receive_sc)(
void *ctx, u32 *channel);
68 int (*create_receive_sc)(
void *ctx, u32 channel,
70 enum validate_frames vf,
71 enum confidentiality_offset co);
72 int (*delete_receive_sc)(
void *ctx, u32 channel);
73 int (*create_receive_sa)(
void *ctx, u32 channel, u8 an, u32 lowest_pn,
75 int (*enable_receive_sa)(
void *ctx, u32 channel, u8 an);
76 int (*disable_receive_sa)(
void *ctx, u32 channel, u8 an);
77 int (*get_available_transmit_sc)(
void *ctx, u32 *channel);
78 int (*create_transmit_sc)(
void *ctx, u32 channel,
80 enum confidentiality_offset co);
81 int (*delete_transmit_sc)(
void *ctx, u32 channel);
82 int (*create_transmit_sa)(
void *ctx, u32 channel, u8 an, u32 next_pn,
83 Boolean confidentiality,
const u8 *sak);
84 int (*enable_transmit_sa)(
void *ctx, u32 channel, u8 an);
85 int (*disable_transmit_sa)(
void *ctx, u32 channel, u8 an);
92 Boolean authenticated;
99 u8 key_server_priority;
102 Boolean macsec_desired;
103 Boolean macsec_protect;
104 Boolean macsec_replay_protect;
105 u32 macsec_replay_window;
106 enum validate_frames macsec_validate;
107 enum confidentiality_offset macsec_confidentiality;
121 Boolean is_key_server;
122 Boolean is_obliged_key_server;
123 char if_name[IFNAMSIZ];
141 struct dl_list participant_list;
148 enum validate_frames vf;
149 enum confidentiality_offset co;
155 const char *ifname,
const u8 *addr);
161 u32 life,
enum mka_created_mode mode,
162 Boolean is_authenticator);
174 Boolean ltx, Boolean lrx);
177 u8 oan, Boolean otx, Boolean orx);
int ieee802_1x_kay_enable_rx_sas(struct ieee802_1x_kay *kay, struct ieee802_1x_mka_ki *lki)
ieee802_1x_kay_enable_rx_sas -
Definition: ieee802_1x_kay.c:2746
Definition: ieee802_1x_kay.h:39
Definition: ieee802_1x_cp.h:15
int ieee802_1x_kay_set_latest_sa_attr(struct ieee802_1x_kay *kay, struct ieee802_1x_mka_ki *lki, u8 lan, Boolean ltx, Boolean lrx)
ieee802_1x_kay_set_latest_sa_attr -
Definition: ieee802_1x_kay.c:2540
Definition: ieee802_1x_kay.h:34
WPA Supplicant - Common definitions.
IEEE Std 802.1X-2010 definitions.
int ieee802_1x_kay_enable_tx_sas(struct ieee802_1x_kay *kay, struct ieee802_1x_mka_ki *lki)
ieee802_1x_kay_enable_tx_sas -
Definition: ieee802_1x_kay.c:2718
int ieee802_1x_kay_change_cipher_suite(struct ieee802_1x_kay *kay, int cs_index)
ieee802_1x_kay_change_cipher_suite -
Definition: ieee802_1x_kay.c:3468
int ieee802_1x_kay_delete_sas(struct ieee802_1x_kay *kay, struct ieee802_1x_mka_ki *ki)
ieee802_1x_kay_delete_sas -
Definition: ieee802_1x_kay.c:2666
Definition: l2_packet_freebsd.c:32
macsec_cap
Definition: ieee802_1x_defs.h:28
Definition: ieee802_1x_kay.h:88
int ieee802_1x_kay_cp_conf(struct ieee802_1x_kay *kay, struct ieee802_1x_cp_conf *pconf)
ieee802_1x_kay_cp_conf -
Definition: ieee802_1x_kay.c:2797
int ieee802_1x_kay_create_sas(struct ieee802_1x_kay *kay, struct ieee802_1x_mka_ki *lki)
ieee802_1x_kay_create_sas -
Definition: ieee802_1x_kay.c:2611
int ieee802_1x_kay_set_old_sa_attr(struct ieee802_1x_kay *kay, struct ieee802_1x_mka_ki *oki, u8 oan, Boolean otx, Boolean orx)
ieee802_1x_kay_set_old_sa_attr -
Definition: ieee802_1x_kay.c:2575
Definition: ieee802_1x_kay_i.h:174
Definition: ieee802_1x_kay.h:29
Doubly-linked list.
Definition: list.h:12
void ieee802_1x_kay_mka_participate(struct ieee802_1x_kay *kay, struct mka_key_name *ckn, Boolean status)
ieee802_1x_kay_mka_participate -
Definition: ieee802_1x_kay.c:3425
struct ieee802_1x_mka_participant * ieee802_1x_kay_create_mka(struct ieee802_1x_kay *kay, struct mka_key_name *ckn, struct mka_key *cak, u32 life, enum mka_created_mode mode, Boolean is_authenticator)
ieee802_1x_kay_create_mka -
Definition: ieee802_1x_kay.c:3211
macsec_policy
Definition: ieee802_1x_defs.h:12
struct ieee802_1x_kay * ieee802_1x_kay_init(struct ieee802_1x_kay_ctx *ctx, enum macsec_policy policy, const char *ifname, const u8 *addr)
ieee802_1x_kay_init -
Definition: ieee802_1x_kay.c:3082
Definition: ieee802_1x_cp.c:24
Definition: ieee802_1x_kay.h:51
Definition: ieee802_1x_kay.h:24
int ieee802_1x_kay_new_sak(struct ieee802_1x_kay *kay)
ieee802_1x_kay_new_sak -
Definition: ieee802_1x_kay.c:3446
void ieee802_1x_kay_deinit(struct ieee802_1x_kay *kay)
ieee802_1x_kay_deinit -
Definition: ieee802_1x_kay.c:3178
int ieee802_1x_kay_enable_new_info(struct ieee802_1x_kay *kay)
ieee802_1x_kay_enable_new_info -
Definition: ieee802_1x_kay.c:2777
void ieee802_1x_kay_delete_mka(struct ieee802_1x_kay *kay, struct mka_key_name *ckn)
ieee802_1x_kay_delete_mka -
Definition: ieee802_1x_kay.c:3360