xref: /freebsd/contrib/wpa/src/pae/ieee802_1x_secy_ops.h (revision 9bc300465e48e19d794d88d0c158a2adb92c7197)
1  /*
2  * SecY Operations
3  * Copyright (c) 2013, 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_SECY_OPS_H
10 #define IEEE802_1X_SECY_OPS_H
11 
12 #include "common/defs.h"
13 #include "common/ieee802_1x_defs.h"
14 
15 struct ieee802_1x_kay_conf;
16 
17 int secy_init_macsec(struct ieee802_1x_kay *kay);
18 int secy_deinit_macsec(struct ieee802_1x_kay *kay);
19 
20 /****** CP -> SecY ******/
21 int secy_cp_control_validate_frames(struct ieee802_1x_kay *kay,
22 				    enum validate_frames vf);
23 int secy_cp_control_protect_frames(struct ieee802_1x_kay *kay, bool flag);
24 int secy_cp_control_encrypt(struct ieee802_1x_kay *kay, bool enabled);
25 int secy_cp_control_replay(struct ieee802_1x_kay *kay, bool flag, u32 win);
26 int secy_cp_control_offload(struct ieee802_1x_kay *kay, u8 offload);
27 int secy_cp_control_current_cipher_suite(struct ieee802_1x_kay *kay, u64 cs);
28 int secy_cp_control_confidentiality_offset(struct ieee802_1x_kay *kay,
29 					   enum confidentiality_offset co);
30 int secy_cp_control_enable_port(struct ieee802_1x_kay *kay, bool flag);
31 
32 /****** KaY -> SecY *******/
33 int secy_get_capability(struct ieee802_1x_kay *kay, enum macsec_cap *cap);
34 int secy_get_receive_lowest_pn(struct ieee802_1x_kay *kay,
35 			       struct receive_sa *rxsa);
36 int secy_get_transmit_next_pn(struct ieee802_1x_kay *kay,
37 			      struct transmit_sa *txsa);
38 int secy_set_transmit_next_pn(struct ieee802_1x_kay *kay,
39 			      struct transmit_sa *txsa);
40 int secy_set_receive_lowest_pn(struct ieee802_1x_kay *kay,
41 			       struct receive_sa *txsa);
42 int secy_create_receive_sc(struct ieee802_1x_kay *kay, struct receive_sc *rxsc);
43 int secy_delete_receive_sc(struct ieee802_1x_kay *kay, struct receive_sc *rxsc);
44 int secy_create_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa);
45 int secy_delete_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa);
46 int secy_enable_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa);
47 int secy_disable_receive_sa(struct ieee802_1x_kay *kay,
48 			    struct receive_sa *rxsa);
49 
50 int secy_create_transmit_sc(struct ieee802_1x_kay *kay,
51 			    struct transmit_sc *txsc);
52 int secy_delete_transmit_sc(struct ieee802_1x_kay *kay,
53 			    struct transmit_sc *txsc);
54 int secy_create_transmit_sa(struct ieee802_1x_kay *kay,
55 			    struct transmit_sa *txsa);
56 int secy_delete_transmit_sa(struct ieee802_1x_kay *kay,
57 			    struct transmit_sa *txsa);
58 int secy_enable_transmit_sa(struct ieee802_1x_kay *kay,
59 			    struct transmit_sa *txsa);
60 int secy_disable_transmit_sa(struct ieee802_1x_kay *kay,
61 			     struct transmit_sa *txsa);
62 
63 #endif /* IEEE802_1X_SECY_OPS_H */
64