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
15extern "C" {
16#endif
17
18enum macsec_validation_type;
19
20struct rtnl_link *rtnl_link_macsec_alloc(void);
21
22int rtnl_link_macsec_set_sci(struct rtnl_link *, uint64_t);
23int rtnl_link_macsec_get_sci(struct rtnl_link *, uint64_t *);
24
25int rtnl_link_macsec_set_port(struct rtnl_link *, uint16_t);
26int rtnl_link_macsec_get_port(struct rtnl_link *, uint16_t *);
27
28int rtnl_link_macsec_set_cipher_suite(struct rtnl_link *, uint64_t);
29int rtnl_link_macsec_get_cipher_suite(struct rtnl_link *, uint64_t *);
30
31int rtnl_link_macsec_set_icv_len(struct rtnl_link *, uint16_t);
32int rtnl_link_macsec_get_icv_len(struct rtnl_link *, uint16_t *);
33
34int rtnl_link_macsec_set_protect(struct rtnl_link *, uint8_t);
35int rtnl_link_macsec_get_protect(struct rtnl_link *, uint8_t *);
36
37int rtnl_link_macsec_set_encrypt(struct rtnl_link *, uint8_t);
38int rtnl_link_macsec_get_encrypt(struct rtnl_link *, uint8_t *);
39
40int rtnl_link_macsec_set_offload(struct rtnl_link *, uint8_t);
41int rtnl_link_macsec_get_offload(struct rtnl_link *, uint8_t *);
42
43int rtnl_link_macsec_set_encoding_sa(struct rtnl_link *, uint8_t);
44int rtnl_link_macsec_get_encoding_sa(struct rtnl_link *, uint8_t *);
45
46int rtnl_link_macsec_set_validation_type(struct rtnl_link *,
47 enum macsec_validation_type);
48int rtnl_link_macsec_get_validation_type(struct rtnl_link *,
49 enum macsec_validation_type *);
50
51int rtnl_link_macsec_set_replay_protect(struct rtnl_link *, uint8_t);
52int rtnl_link_macsec_get_replay_protect(struct rtnl_link *, uint8_t *);
53
54int rtnl_link_macsec_set_window(struct rtnl_link *, uint32_t);
55int rtnl_link_macsec_get_window(struct rtnl_link *, uint32_t *);
56
57int rtnl_link_macsec_set_send_sci(struct rtnl_link *, uint8_t);
58int rtnl_link_macsec_get_send_sci(struct rtnl_link *, uint8_t *);
59
60int rtnl_link_macsec_set_end_station(struct rtnl_link *, uint8_t);
61int rtnl_link_macsec_get_end_station(struct rtnl_link *, uint8_t *);
62
63int rtnl_link_macsec_set_scb(struct rtnl_link *, uint8_t);
64int rtnl_link_macsec_get_scb(struct rtnl_link *, uint8_t *);
65
66
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif
int rtnl_link_macsec_set_sci(struct rtnl_link *, uint64_t)
Set SCI.
Definition: macsec.c:456
int rtnl_link_macsec_get_sci(struct rtnl_link *, uint64_t *)
Get SCI.
Definition: macsec.c:476
int rtnl_link_macsec_set_port(struct rtnl_link *, uint16_t)
Set port identifier.
Definition: macsec.c:498
int rtnl_link_macsec_get_port(struct rtnl_link *, uint16_t *)
Get port identifier.
Definition: macsec.c:517