libnl 3.7.0
ipip.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_IPIP_H_
7#define NETLINK_LINK_IPIP_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15 extern struct rtnl_link *rtnl_link_ipip_alloc(void);
16 extern int rtnl_link_ipip_add(struct nl_sock *sk, const char *name);
17
18 extern int rtnl_link_is_ipip(struct rtnl_link *link);
19
20 extern uint32_t rtnl_link_ipip_get_link(struct rtnl_link *link);
21 extern int rtnl_link_ipip_set_link(struct rtnl_link *link, uint32_t index);
22
23 extern int rtnl_link_ipip_set_local(struct rtnl_link *link, uint32_t addr);
24 extern uint32_t rtnl_link_ipip_get_local(struct rtnl_link *link);
25
26 extern int rtnl_link_ipip_set_remote(struct rtnl_link *link, uint32_t addr);
27 extern uint32_t rtnl_link_ipip_get_remote(struct rtnl_link *link);
28
29 extern int rtnl_link_ipip_set_ttl(struct rtnl_link *link, uint8_t ttl);
30 extern uint8_t rtnl_link_ipip_get_ttl(struct rtnl_link *link);
31
32 extern int rtnl_link_ipip_set_tos(struct rtnl_link *link, uint8_t tos);
33 extern uint8_t rtnl_link_ipip_get_tos(struct rtnl_link *link);
34
35 extern int rtnl_link_ipip_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc);
36 extern uint8_t rtnl_link_ipip_get_pmtudisc(struct rtnl_link *link);
37
38 extern int rtnl_link_ipip_set_fwmark(struct rtnl_link *link, uint32_t fwmark);
39 extern int rtnl_link_ipip_get_fwmark(struct rtnl_link *link, uint32_t *fwmark);
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif
int rtnl_link_ipip_set_tos(struct rtnl_link *link, uint8_t tos)
Set IPIP tunnel tos.
Definition: ipip.c:480
int rtnl_link_ipip_set_local(struct rtnl_link *link, uint32_t addr)
Set IPIP tunnel local address.
Definition: ipip.c:378
int rtnl_link_ipip_set_remote(struct rtnl_link *link, uint32_t addr)
Set IPIP tunnel remote address.
Definition: ipip.c:412
uint32_t rtnl_link_ipip_get_remote(struct rtnl_link *link)
Get IPIP tunnel remote address.
Definition: ipip.c:430
uint32_t rtnl_link_ipip_get_local(struct rtnl_link *link)
Get IPIP tunnel local address.
Definition: ipip.c:396
int rtnl_link_ipip_set_ttl(struct rtnl_link *link, uint8_t ttl)
Set IPIP tunnel ttl.
Definition: ipip.c:446
int rtnl_link_ipip_set_fwmark(struct rtnl_link *link, uint32_t fwmark)
Set IPIP tunnel fwmark.
Definition: ipip.c:548
int rtnl_link_ipip_add(struct nl_sock *sk, const char *name)
Create a new ipip tunnel device.
Definition: ipip.c:319
int rtnl_link_ipip_set_link(struct rtnl_link *link, uint32_t index)
Set IPIP tunnel interface index.
Definition: ipip.c:344
int rtnl_link_is_ipip(struct rtnl_link *link)
Check if link is a IPIP link.
Definition: ipip.c:306
uint8_t rtnl_link_ipip_get_ttl(struct rtnl_link *link)
Get IPIP tunnel ttl.
Definition: ipip.c:464
int rtnl_link_ipip_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc)
Set IPIP tunnel path MTU discovery.
Definition: ipip.c:514
uint8_t rtnl_link_ipip_get_tos(struct rtnl_link *link)
Get IPIP tunnel tos.
Definition: ipip.c:498
uint32_t rtnl_link_ipip_get_link(struct rtnl_link *link)
Get IPIP tunnel interface index.
Definition: ipip.c:362
int rtnl_link_ipip_get_fwmark(struct rtnl_link *link, uint32_t *fwmark)
Get IPIP tunnel fwmark.
Definition: ipip.c:567
uint8_t rtnl_link_ipip_get_pmtudisc(struct rtnl_link *link)
Get IPIP path MTU discovery.
Definition: ipip.c:532