libnl: /data/src/libnl3/include/netlink/route/link/macsec.h Source File

libnl 3.7.0

macsec.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2016 Sabrina Dubroca <sd@queasysnail.net>
4 */
5
6 #ifndef NETLINK_LINK_MACSEC_H_
7 #define NETLINK_LINK_MACSEC_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/route/link.h>
11 #include <linux/if_link.h>
12 #include <linux/if_macsec.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 enum macsec_validation_type;
19
20 struct rtnl_link *rtnl_link_macsec_alloc(void);
21
22 int rtnl_link_macsec_set_sci(struct rtnl_link *, uint64_t);
23 int rtnl_link_macsec_get_sci(struct rtnl_link *, uint64_t *);
24
25 int rtnl_link_macsec_set_port(struct rtnl_link *, uint16_t);
26 int rtnl_link_macsec_get_port(struct rtnl_link *, uint16_t *);
27
28 int rtnl_link_macsec_set_cipher_suite(struct rtnl_link *, uint64_t);
29 int rtnl_link_macsec_get_cipher_suite(struct rtnl_link *, uint64_t *);
30
31 int rtnl_link_macsec_set_icv_len(struct rtnl_link *, uint16_t);
32 int rtnl_link_macsec_get_icv_len(struct rtnl_link *, uint16_t *);
33
34 int rtnl_link_macsec_set_protect(struct rtnl_link *, uint8_t);
35 int rtnl_link_macsec_get_protect(struct rtnl_link *, uint8_t *);
36
37 int rtnl_link_macsec_set_encrypt(struct rtnl_link *, uint8_t);
38 int rtnl_link_macsec_get_encrypt(struct rtnl_link *, uint8_t *);
39
40 int rtnl_link_macsec_set_offload(struct rtnl_link *, uint8_t);
41 int rtnl_link_macsec_get_offload(struct rtnl_link *, uint8_t *);
42
43 int rtnl_link_macsec_set_encoding_sa(struct rtnl_link *, uint8_t);
44 int rtnl_link_macsec_get_encoding_sa(struct rtnl_link *, uint8_t *);
45
46 int rtnl_link_macsec_set_validation_type(struct rtnl_link *,
47 enum macsec_validation_type);
48 int rtnl_link_macsec_get_validation_type(struct rtnl_link *,
49 enum macsec_validation_type *);
50
51 int rtnl_link_macsec_set_replay_protect(struct rtnl_link *, uint8_t);
52 int rtnl_link_macsec_get_replay_protect(struct rtnl_link *, uint8_t *);
53
54 int rtnl_link_macsec_set_window(struct rtnl_link *, uint32_t);
55 int rtnl_link_macsec_get_window(struct rtnl_link *, uint32_t *);
56
57 int rtnl_link_macsec_set_send_sci(struct rtnl_link *, uint8_t);
58 int rtnl_link_macsec_get_send_sci(struct rtnl_link *, uint8_t *);
59
60 int rtnl_link_macsec_set_end_station(struct rtnl_link *, uint8_t);
61 int rtnl_link_macsec_get_end_station(struct rtnl_link *, uint8_t *);
62
63 int rtnl_link_macsec_set_scb(struct rtnl_link *, uint8_t);
64 int rtnl_link_macsec_get_scb(struct rtnl_link *, uint8_t *);
65
66
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif
rtnl_link_macsec_set_sci
int rtnl_link_macsec_set_sci(struct rtnl_link *, uint64_t)
Set SCI.
Definition: macsec.c:456
rtnl_link_macsec_get_sci
int rtnl_link_macsec_get_sci(struct rtnl_link *, uint64_t *)
Get SCI.
Definition: macsec.c:476
rtnl_link_macsec_set_port
int rtnl_link_macsec_set_port(struct rtnl_link *, uint16_t)
Set port identifier.
Definition: macsec.c:498
rtnl_link_macsec_get_port
int rtnl_link_macsec_get_port(struct rtnl_link *, uint16_t *)
Get port identifier.
Definition: macsec.c:517
rtnl_link
Link object.