15b9c547cSRui Paulo /* 25b9c547cSRui Paulo * SecY Operations 35b9c547cSRui Paulo * Copyright (c) 2013, Qualcomm Atheros, Inc. 45b9c547cSRui Paulo * 55b9c547cSRui Paulo * This software may be distributed under the terms of the BSD license. 65b9c547cSRui Paulo * See README for more details. 75b9c547cSRui Paulo */ 85b9c547cSRui Paulo 95b9c547cSRui Paulo #ifndef IEEE802_1X_SECY_OPS_H 105b9c547cSRui Paulo #define IEEE802_1X_SECY_OPS_H 115b9c547cSRui Paulo 125b9c547cSRui Paulo #include "common/defs.h" 135b9c547cSRui Paulo #include "common/ieee802_1x_defs.h" 145b9c547cSRui Paulo 155b9c547cSRui Paulo struct ieee802_1x_kay_conf; 165b9c547cSRui Paulo 175b9c547cSRui Paulo int secy_init_macsec(struct ieee802_1x_kay *kay); 185b9c547cSRui Paulo int secy_deinit_macsec(struct ieee802_1x_kay *kay); 195b9c547cSRui Paulo 205b9c547cSRui Paulo /****** CP -> SecY ******/ 215b9c547cSRui Paulo int secy_cp_control_validate_frames(struct ieee802_1x_kay *kay, 225b9c547cSRui Paulo enum validate_frames vf); 23c1d255d3SCy Schubert int secy_cp_control_protect_frames(struct ieee802_1x_kay *kay, bool flag); 24c1d255d3SCy Schubert int secy_cp_control_encrypt(struct ieee802_1x_kay *kay, bool enabled); 25c1d255d3SCy Schubert int secy_cp_control_replay(struct ieee802_1x_kay *kay, bool flag, u32 win); 26*a90b9d01SCy Schubert int secy_cp_control_offload(struct ieee802_1x_kay *kay, u8 offload); 27780fb4a2SCy Schubert int secy_cp_control_current_cipher_suite(struct ieee802_1x_kay *kay, u64 cs); 285b9c547cSRui Paulo int secy_cp_control_confidentiality_offset(struct ieee802_1x_kay *kay, 295b9c547cSRui Paulo enum confidentiality_offset co); 30c1d255d3SCy Schubert int secy_cp_control_enable_port(struct ieee802_1x_kay *kay, bool flag); 315b9c547cSRui Paulo 325b9c547cSRui Paulo /****** KaY -> SecY *******/ 3385732ac8SCy Schubert int secy_get_capability(struct ieee802_1x_kay *kay, enum macsec_cap *cap); 345b9c547cSRui Paulo int secy_get_receive_lowest_pn(struct ieee802_1x_kay *kay, 355b9c547cSRui Paulo struct receive_sa *rxsa); 365b9c547cSRui Paulo int secy_get_transmit_next_pn(struct ieee802_1x_kay *kay, 375b9c547cSRui Paulo struct transmit_sa *txsa); 385b9c547cSRui Paulo int secy_set_transmit_next_pn(struct ieee802_1x_kay *kay, 395b9c547cSRui Paulo struct transmit_sa *txsa); 404bc52338SCy Schubert int secy_set_receive_lowest_pn(struct ieee802_1x_kay *kay, 414bc52338SCy Schubert struct receive_sa *txsa); 425b9c547cSRui Paulo int secy_create_receive_sc(struct ieee802_1x_kay *kay, struct receive_sc *rxsc); 435b9c547cSRui Paulo int secy_delete_receive_sc(struct ieee802_1x_kay *kay, struct receive_sc *rxsc); 445b9c547cSRui Paulo int secy_create_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa); 4585732ac8SCy Schubert int secy_delete_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa); 465b9c547cSRui Paulo int secy_enable_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa); 475b9c547cSRui Paulo int secy_disable_receive_sa(struct ieee802_1x_kay *kay, 485b9c547cSRui Paulo struct receive_sa *rxsa); 495b9c547cSRui Paulo 505b9c547cSRui Paulo int secy_create_transmit_sc(struct ieee802_1x_kay *kay, 515b9c547cSRui Paulo struct transmit_sc *txsc); 525b9c547cSRui Paulo int secy_delete_transmit_sc(struct ieee802_1x_kay *kay, 535b9c547cSRui Paulo struct transmit_sc *txsc); 545b9c547cSRui Paulo int secy_create_transmit_sa(struct ieee802_1x_kay *kay, 555b9c547cSRui Paulo struct transmit_sa *txsa); 5685732ac8SCy Schubert int secy_delete_transmit_sa(struct ieee802_1x_kay *kay, 5785732ac8SCy Schubert struct transmit_sa *txsa); 585b9c547cSRui Paulo int secy_enable_transmit_sa(struct ieee802_1x_kay *kay, 595b9c547cSRui Paulo struct transmit_sa *txsa); 605b9c547cSRui Paulo int secy_disable_transmit_sa(struct ieee802_1x_kay *kay, 615b9c547cSRui Paulo struct transmit_sa *txsa); 625b9c547cSRui Paulo 635b9c547cSRui Paulo #endif /* IEEE802_1X_SECY_OPS_H */ 64