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

libnl 3.10.0

ipgre.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2014 Susant Sahani <susant@redhat.com>
4 */
5
6#ifndef NETLINK_LINK_IPGRE_H_
7#define NETLINK_LINK_IPGRE_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16 extern int rtnl_link_is_ipgre(struct rtnl_link *link);
17 extern int rtnl_link_is_ipgretap(struct rtnl_link *link);
18
19 extern struct rtnl_link *rtnl_link_ipgre_alloc(void);
20 extern struct rtnl_link *rtnl_link_ipgretap_alloc(void);
21 extern int rtnl_link_ipgre_add(struct nl_sock *sk, const char *name);
22 extern int rtnl_link_ipgretap_add(struct nl_sock *sk, const char *name);
23
24 extern int rtnl_link_ipgre_set_link(struct rtnl_link *link, uint32_t index);
25 extern uint32_t rtnl_link_ipgre_get_link(struct rtnl_link *link);
26
27 extern int rtnl_link_ipgre_set_iflags(struct rtnl_link *link, uint16_t iflags);
28 extern uint16_t rtnl_link_ipgre_get_iflags(struct rtnl_link *link);
29
30 extern int rtnl_link_ipgre_set_oflags(struct rtnl_link *link, uint16_t oflags);
31 extern uint16_t rtnl_link_ipgre_get_oflags(struct rtnl_link *link);
32
33 extern int rtnl_link_ipgre_set_ikey(struct rtnl_link *link, uint32_t ikey);
34 extern uint32_t rtnl_link_ipgre_get_ikey(struct rtnl_link *link);
35
36 extern int rtnl_link_ipgre_set_okey(struct rtnl_link *link, uint32_t okey);
37 extern uint32_t rtnl_link_ipgre_get_okey(struct rtnl_link *link);
38
39 extern int rtnl_link_ipgre_set_local(struct rtnl_link *link, uint32_t addr);
40 extern uint32_t rtnl_link_ipgre_get_local(struct rtnl_link *link);
41
42 extern int rtnl_link_ipgre_set_remote(struct rtnl_link *link, uint32_t addr);
43 extern uint32_t rtnl_link_ipgre_get_remote(struct rtnl_link *link);
44
45 extern int rtnl_link_ipgre_set_ttl(struct rtnl_link *link, uint8_t ttl);
46 extern uint8_t rtnl_link_ipgre_get_ttl(struct rtnl_link *link);
47
48 extern int rtnl_link_ipgre_set_tos(struct rtnl_link *link, uint8_t tos);
49 extern uint8_t rtnl_link_ipgre_get_tos(struct rtnl_link *link);
50
51 extern int rtnl_link_ipgre_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc);
52 extern uint8_t rtnl_link_ipgre_get_pmtudisc(struct rtnl_link *link);
53
54 extern int rtnl_link_ipgre_set_fwmark(struct rtnl_link *link, uint32_t fwmark);
55 extern int rtnl_link_ipgre_get_fwmark(struct rtnl_link *link, uint32_t *fwmark);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif
rtnl_link_ipgre_get_link
uint32_t rtnl_link_ipgre_get_link(struct rtnl_link *link)
Get IPGRE tunnel interface index.
Definition ipgre.c:520
rtnl_link_ipgre_get_fwmark
int rtnl_link_ipgre_get_fwmark(struct rtnl_link *link, uint32_t *fwmark)
Get IPGRE tunnel fwmark.
Definition ipgre.c:872
rtnl_link_ipgre_set_oflags
int rtnl_link_ipgre_set_oflags(struct rtnl_link *link, uint16_t oflags)
Set IPGRE tunnel set oflags.
Definition ipgre.c:570
rtnl_link_ipgretap_add
int rtnl_link_ipgretap_add(struct nl_sock *sk, const char *name)
Create a new IPGRETAP tunnel device.
Definition ipgre.c:477
rtnl_link_ipgre_set_okey
int rtnl_link_ipgre_set_okey(struct rtnl_link *link, uint32_t okey)
Set IPGRE tunnel set okey.
Definition ipgre.c:638
rtnl_link_is_ipgretap
int rtnl_link_is_ipgretap(struct rtnl_link *link)
Check if link is a IPGRETAP link.
Definition ipgre.c:465
rtnl_link_ipgre_get_iflags
uint16_t rtnl_link_ipgre_get_iflags(struct rtnl_link *link)
Get IPGRE tunnel iflags.
Definition ipgre.c:554
rtnl_link_ipgre_get_tos
uint8_t rtnl_link_ipgre_get_tos(struct rtnl_link *link)
Get IPGRE tunnel tos.
Definition ipgre.c:792
rtnl_link_ipgre_get_ttl
uint8_t rtnl_link_ipgre_get_ttl(struct rtnl_link *link)
Set IPGRE tunnel ttl.
Definition ipgre.c:758
rtnl_link_ipgre_set_local
int rtnl_link_ipgre_set_local(struct rtnl_link *link, uint32_t addr)
Set IPGRE tunnel local address.
Definition ipgre.c:672
rtnl_link_ipgre_set_link
int rtnl_link_ipgre_set_link(struct rtnl_link *link, uint32_t index)
Set IPGRE tunnel interface index.
Definition ipgre.c:502
rtnl_link_ipgre_get_pmtudisc
uint8_t rtnl_link_ipgre_get_pmtudisc(struct rtnl_link *link)
Get IPGRE path MTU discovery.
Definition ipgre.c:826
rtnl_link_is_ipgre
int rtnl_link_is_ipgre(struct rtnl_link *link)
Check if link is a IPGRE link.
Definition ipgre.c:410
rtnl_link_ipgre_set_remote
int rtnl_link_ipgre_set_remote(struct rtnl_link *link, uint32_t addr)
Set IPGRE tunnel remote address.
Definition ipgre.c:706
rtnl_link_ipgre_set_pmtudisc
int rtnl_link_ipgre_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc)
Set IPGRE tunnel path MTU discovery.
Definition ipgre.c:808
rtnl_link_ipgre_get_ikey
uint32_t rtnl_link_ipgre_get_ikey(struct rtnl_link *link)
Get IPGRE tunnel ikey.
Definition ipgre.c:622
rtnl_link_ipgre_get_remote
uint32_t rtnl_link_ipgre_get_remote(struct rtnl_link *link)
Get IPGRE tunnel remote address.
Definition ipgre.c:724
rtnl_link_ipgre_add
int rtnl_link_ipgre_add(struct nl_sock *sk, const char *name)
Create a new IPGRE tunnel device.
Definition ipgre.c:423
rtnl_link_ipgre_set_iflags
int rtnl_link_ipgre_set_iflags(struct rtnl_link *link, uint16_t iflags)
Set IPGRE tunnel set iflags.
Definition ipgre.c:536
rtnl_link_ipgre_set_tos
int rtnl_link_ipgre_set_tos(struct rtnl_link *link, uint8_t tos)
Set IPGRE tunnel tos.
Definition ipgre.c:774
rtnl_link_ipgre_get_oflags
uint16_t rtnl_link_ipgre_get_oflags(struct rtnl_link *link)
Get IPGRE tunnel oflags.
Definition ipgre.c:588
rtnl_link_ipgre_set_fwmark
int rtnl_link_ipgre_set_fwmark(struct rtnl_link *link, uint32_t fwmark)
Set IPGRE tunnel fwmark.
Definition ipgre.c:853
rtnl_link_ipgre_get_okey
uint32_t rtnl_link_ipgre_get_okey(struct rtnl_link *link)
Get IPGRE tunnel okey.
Definition ipgre.c:656
rtnl_link_ipgre_get_local
uint32_t rtnl_link_ipgre_get_local(struct rtnl_link *link)
Get IPGRE tunnel local address.
Definition ipgre.c:690
rtnl_link_ipgre_set_ttl
int rtnl_link_ipgre_set_ttl(struct rtnl_link *link, uint8_t ttl)
Set IPGRE tunnel ttl.
Definition ipgre.c:740
rtnl_link_ipgre_set_ikey
int rtnl_link_ipgre_set_ikey(struct rtnl_link *link, uint32_t ikey)
Set IPGRE tunnel set ikey.
Definition ipgre.c:604
rtnl_link
Link object.
Definition nl-route.h:29