libnl 3.7.0
geneve.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2
3#ifndef NETLINK_LINK_GENEVE_H_
4#define NETLINK_LINK_GENEVE_H_
5
6#include <netlink/netlink.h>
7#include <netlink/route/link.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#define RTNL_GENEVE_ID_MAX 16777215
14
15#define RTNL_LINK_GENEVE_F_COLLECT_METADATA (1<<0)
16
17extern struct rtnl_link *rtnl_link_geneve_alloc(void);
18extern int rtnl_link_is_geneve(struct rtnl_link *);
19
20extern int rtnl_link_geneve_set_id(struct rtnl_link *, uint32_t);
21extern int rtnl_link_geneve_get_id(struct rtnl_link *, uint32_t *);
22
23extern int rtnl_link_geneve_set_remote(struct rtnl_link *, struct nl_addr *);
24extern int rtnl_link_geneve_get_remote(struct rtnl_link *, struct nl_addr **);
25
26extern int rtnl_link_geneve_set_ttl(struct rtnl_link *, uint8_t);
27extern int rtnl_link_geneve_get_ttl(struct rtnl_link *);
28
29extern int rtnl_link_geneve_set_tos(struct rtnl_link *, uint8_t);
30extern int rtnl_link_geneve_get_tos(struct rtnl_link *);
31
32extern int rtnl_link_geneve_set_port(struct rtnl_link *, uint32_t);
33extern int rtnl_link_geneve_get_port(struct rtnl_link *, uint32_t *);
34
35extern int rtnl_link_geneve_set_label(struct rtnl_link *, uint32_t);
36extern int rtnl_link_geneve_get_label(struct rtnl_link *, uint32_t *);
37
38extern int rtnl_link_geneve_set_udp_csum(struct rtnl_link *, uint8_t);
39extern int rtnl_link_geneve_get_udp_csum(struct rtnl_link *);
40
41extern int rtnl_link_geneve_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t);
43
44extern int rtnl_link_geneve_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t);
46
47extern int rtnl_link_geneve_set_flags(struct rtnl_link *, uint8_t flags, int enable);
48extern int rtnl_link_geneve_get_flags(struct rtnl_link *, uint8_t *flags);
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif
int rtnl_link_geneve_get_remote(struct rtnl_link *, struct nl_addr **)
Get Geneve unicast destination IP address.
Definition: geneve.c:458
struct rtnl_link * rtnl_link_geneve_alloc(void)
Allocate link object of type Geneve.
Definition: geneve.c:348
int rtnl_link_geneve_get_port(struct rtnl_link *, uint32_t *)
Get UDP destination port to use for Geneve.
Definition: geneve.c:578
int rtnl_link_geneve_set_flags(struct rtnl_link *, uint8_t flags, int enable)
Set Geneve flags.
Definition: geneve.c:756
int rtnl_link_geneve_set_tos(struct rtnl_link *, uint8_t)
Set IP ToS value to use for Geneve.
Definition: geneve.c:521
int rtnl_link_geneve_get_udp_zero_csum6_tx(struct rtnl_link *)
Get skip UDP checksum transmitted over IPv6 status to use for Geneve.
Definition: geneve.c:699
int rtnl_link_geneve_get_udp_zero_csum6_rx(struct rtnl_link *)
Get skip UDP checksum received over IPv6 status to use for Geneve.
Definition: geneve.c:736
int rtnl_link_geneve_set_remote(struct rtnl_link *, struct nl_addr *)
Set Geneve unicast destination IP address.
Definition: geneve.c:427
int rtnl_link_geneve_get_tos(struct rtnl_link *)
Get IP ToS value to use for Geneve.
Definition: geneve.c:539
int rtnl_link_geneve_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t)
Set skip UDP checksum transmitted over IPv6 status to use for Geneve.
Definition: geneve.c:681
int rtnl_link_geneve_get_flags(struct rtnl_link *, uint8_t *flags)
Get Geneve flags.
Definition: geneve.c:780
int rtnl_link_geneve_set_ttl(struct rtnl_link *, uint8_t)
Set IP TTL value to use for Geneve.
Definition: geneve.c:484
int rtnl_link_geneve_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t)
Set skip UDP checksum received over IPv6 status to use for Geneve.
Definition: geneve.c:718
int rtnl_link_geneve_set_label(struct rtnl_link *, uint32_t)
Set flow label to use for Geneve.
Definition: geneve.c:602
int rtnl_link_geneve_get_label(struct rtnl_link *, uint32_t *)
Get flow label to use for Geneve.
Definition: geneve.c:621
int rtnl_link_geneve_set_udp_csum(struct rtnl_link *, uint8_t)
Set UDP checksum status to use for Geneve.
Definition: geneve.c:644
int rtnl_link_geneve_get_udp_csum(struct rtnl_link *)
Get UDP checksum status to use for Geneve.
Definition: geneve.c:662
int rtnl_link_geneve_set_port(struct rtnl_link *, uint32_t)
Set UDP destination port to use for Geneve.
Definition: geneve.c:559
int rtnl_link_geneve_set_id(struct rtnl_link *, uint32_t)
Set Geneve Network Indentifier.
Definition: geneve.c:381
int rtnl_link_geneve_get_ttl(struct rtnl_link *)
Get IP TTL value to use for Geneve.
Definition: geneve.c:502
int rtnl_link_geneve_get_id(struct rtnl_link *, uint32_t *)
Get Geneve Network Identifier.
Definition: geneve.c:403
int rtnl_link_is_geneve(struct rtnl_link *)
Check if link is a Geneve link.
Definition: geneve.c:369