summaryrefslogtreecommitdiff
path: root/include/netlink/route/link/geneve.h
blob: aaba1f9034913540cfada0d4d82df01e23b333ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * netlink/route/link/geneve.h          GENEVE interface
 *      This library is free software; you can redistribute it and/or
 *      modify it under the terms of the GNU Lesser General Public
 *      License as published by the Free Software Foundation version 2.1
 *      of the License.
 */

#ifndef NETLINK_LINK_GENEVE_H_
#define NETLINK_LINK_GENEVE_H_

#include <netlink/netlink.h>
#include <netlink/route/link.h>

#ifdef __cplusplus
extern "C" {
#endif

#define RTNL_GENEVE_ID_MAX 16777215

#define RTNL_LINK_GENEVE_F_COLLECT_METADATA     (1<<0)

extern struct rtnl_link *rtnl_link_geneve_alloc(void);
extern int rtnl_link_is_geneve(struct rtnl_link *);

extern int rtnl_link_geneve_set_id(struct rtnl_link *, uint32_t);
extern int rtnl_link_geneve_get_id(struct rtnl_link *, uint32_t *);

extern int rtnl_link_geneve_set_remote(struct rtnl_link *, struct nl_addr *);
extern int rtnl_link_geneve_get_remote(struct rtnl_link *, struct nl_addr **);

extern int rtnl_link_geneve_set_ttl(struct rtnl_link *, uint8_t);
extern int rtnl_link_geneve_get_ttl(struct rtnl_link *);

extern int rtnl_link_geneve_set_tos(struct rtnl_link *, uint8_t);
extern int rtnl_link_geneve_get_tos(struct rtnl_link *);

extern int rtnl_link_geneve_set_port(struct rtnl_link *, uint32_t);
extern int rtnl_link_geneve_get_port(struct rtnl_link *, uint32_t *);

extern int rtnl_link_geneve_set_label(struct rtnl_link *, uint32_t);
extern int rtnl_link_geneve_get_label(struct rtnl_link *, uint32_t *);

extern int rtnl_link_geneve_set_udp_csum(struct rtnl_link *, uint8_t);
extern int rtnl_link_geneve_get_udp_csum(struct rtnl_link *);

extern int rtnl_link_geneve_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t);
extern int rtnl_link_geneve_get_udp_zero_csum6_tx(struct rtnl_link *);

extern int rtnl_link_geneve_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t);
extern int rtnl_link_geneve_get_udp_zero_csum6_rx(struct rtnl_link *);

extern int rtnl_link_geneve_set_flags(struct rtnl_link *, uint8_t flags, int enable);
extern int rtnl_link_geneve_get_flags(struct rtnl_link *, uint8_t *flags);

#ifdef __cplusplus
}
#endif

#endif