mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-03 20:58:49 -05:00
6f551abdfc
This is specific to the macsec_qca driver. The core implementation shouldn't care about this, and only deal with the complete secure channel, and pass this down to the driver. Drivers that have such limitations should take care of these in their ->create functions and throw an error. Since the core MKA no longer saves the channel number, the macsec_qca driver must be able to recover it. Add a map (which is just an array since it's quite short) to match SCIs to channel numbers, and lookup functions that will be called in every place where functions would get the channel from the core code. Getting an available channel should be part of channel creation, instead of being a preparation step. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
57 lines
2.2 KiB
C
57 lines
2.2 KiB
C
/*
|
|
* SecY Operations
|
|
* Copyright (c) 2013, Qualcomm Atheros, Inc.
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifndef IEEE802_1X_SECY_OPS_H
|
|
#define IEEE802_1X_SECY_OPS_H
|
|
|
|
#include "common/defs.h"
|
|
#include "common/ieee802_1x_defs.h"
|
|
|
|
struct ieee802_1x_kay_conf;
|
|
|
|
int secy_init_macsec(struct ieee802_1x_kay *kay);
|
|
int secy_deinit_macsec(struct ieee802_1x_kay *kay);
|
|
|
|
/****** CP -> SecY ******/
|
|
int secy_cp_control_validate_frames(struct ieee802_1x_kay *kay,
|
|
enum validate_frames vf);
|
|
int secy_cp_control_protect_frames(struct ieee802_1x_kay *kay, Boolean flag);
|
|
int secy_cp_control_replay(struct ieee802_1x_kay *kay, Boolean flag, u32 win);
|
|
int secy_cp_control_current_cipher_suite(struct ieee802_1x_kay *kay, u64 cs);
|
|
int secy_cp_control_confidentiality_offset(struct ieee802_1x_kay *kay,
|
|
enum confidentiality_offset co);
|
|
int secy_cp_control_enable_port(struct ieee802_1x_kay *kay, Boolean flag);
|
|
|
|
/****** KaY -> SecY *******/
|
|
int secy_get_capability(struct ieee802_1x_kay *kay, enum macsec_cap *cap);
|
|
int secy_get_receive_lowest_pn(struct ieee802_1x_kay *kay,
|
|
struct receive_sa *rxsa);
|
|
int secy_get_transmit_next_pn(struct ieee802_1x_kay *kay,
|
|
struct transmit_sa *txsa);
|
|
int secy_set_transmit_next_pn(struct ieee802_1x_kay *kay,
|
|
struct transmit_sa *txsa);
|
|
int secy_create_receive_sc(struct ieee802_1x_kay *kay, struct receive_sc *rxsc);
|
|
int secy_delete_receive_sc(struct ieee802_1x_kay *kay, struct receive_sc *rxsc);
|
|
int secy_create_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa);
|
|
int secy_enable_receive_sa(struct ieee802_1x_kay *kay, struct receive_sa *rxsa);
|
|
int secy_disable_receive_sa(struct ieee802_1x_kay *kay,
|
|
struct receive_sa *rxsa);
|
|
|
|
int secy_create_transmit_sc(struct ieee802_1x_kay *kay,
|
|
struct transmit_sc *txsc);
|
|
int secy_delete_transmit_sc(struct ieee802_1x_kay *kay,
|
|
struct transmit_sc *txsc);
|
|
int secy_create_transmit_sa(struct ieee802_1x_kay *kay,
|
|
struct transmit_sa *txsa);
|
|
int secy_enable_transmit_sa(struct ieee802_1x_kay *kay,
|
|
struct transmit_sa *txsa);
|
|
int secy_disable_transmit_sa(struct ieee802_1x_kay *kay,
|
|
struct transmit_sa *txsa);
|
|
|
|
#endif /* IEEE802_1X_SECY_OPS_H */
|