1 /* 2 * netlink/route/link/macsec.h MACsec Link Info 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation version 2.1 7 * of the License. 8 * 9 * Copyright (c) 2016 Sabrina Dubroca <sd@queasysnail.net> 10 */ 11 12 #ifndef NETLINK_LINK_MACSEC_H_ 13 #define NETLINK_LINK_MACSEC_H_ 14 15 #include <netlink/netlink.h> 16 #include <netlink/route/link.h> 17 #include <linux/if_link.h> 18 #include <linux/if_macsec.h> 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 enum macsec_validation_type; 25 26 struct rtnl_link *rtnl_link_macsec_alloc(void); 27 28 int rtnl_link_macsec_set_sci(struct rtnl_link *, uint64_t); 29 int rtnl_link_macsec_get_sci(struct rtnl_link *, uint64_t *); 30 31 int rtnl_link_macsec_set_port(struct rtnl_link *, uint16_t); 32 int rtnl_link_macsec_get_port(struct rtnl_link *, uint16_t *); 33 34 int rtnl_link_macsec_set_cipher_suite(struct rtnl_link *, uint64_t); 35 int rtnl_link_macsec_get_cipher_suite(struct rtnl_link *, uint64_t *); 36 37 int rtnl_link_macsec_set_icv_len(struct rtnl_link *, uint16_t); 38 int rtnl_link_macsec_get_icv_len(struct rtnl_link *, uint16_t *); 39 40 int rtnl_link_macsec_set_protect(struct rtnl_link *, uint8_t); 41 int rtnl_link_macsec_get_protect(struct rtnl_link *, uint8_t *); 42 43 int rtnl_link_macsec_set_encrypt(struct rtnl_link *, uint8_t); 44 int rtnl_link_macsec_get_encrypt(struct rtnl_link *, uint8_t *); 45 46 int rtnl_link_macsec_set_encoding_sa(struct rtnl_link *, uint8_t); 47 int rtnl_link_macsec_get_encoding_sa(struct rtnl_link *, uint8_t *); 48 49 int rtnl_link_macsec_set_validation_type(struct rtnl_link *, 50 enum macsec_validation_type); 51 int rtnl_link_macsec_get_validation_type(struct rtnl_link *, 52 enum macsec_validation_type *); 53 54 int rtnl_link_macsec_set_replay_protect(struct rtnl_link *, uint8_t); 55 int rtnl_link_macsec_get_replay_protect(struct rtnl_link *, uint8_t *); 56 57 int rtnl_link_macsec_set_window(struct rtnl_link *, uint32_t); 58 int rtnl_link_macsec_get_window(struct rtnl_link *, uint32_t *); 59 60 int rtnl_link_macsec_set_send_sci(struct rtnl_link *, uint8_t); 61 int rtnl_link_macsec_get_send_sci(struct rtnl_link *, uint8_t *); 62 63 int rtnl_link_macsec_set_end_station(struct rtnl_link *, uint8_t); 64 int rtnl_link_macsec_get_end_station(struct rtnl_link *, uint8_t *); 65 66 int rtnl_link_macsec_set_scb(struct rtnl_link *, uint8_t); 67 int rtnl_link_macsec_get_scb(struct rtnl_link *, uint8_t *); 68 69 70 71 #ifdef __cplusplus 72 } 73 #endif 74 75 #endif 76