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

libnl 3.10.0

sit.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_SIT_H_
7#define NETLINK_LINK_SIT_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16 extern struct rtnl_link *rtnl_link_sit_alloc(void);
17 extern int rtnl_link_sit_add(struct nl_sock *sk, const char *name);
18
19 extern int rtnl_link_is_sit(struct rtnl_link *link);
20
21 extern int rtnl_link_sit_set_link(struct rtnl_link *link, uint32_t index);
22 extern uint32_t rtnl_link_sit_get_link(struct rtnl_link *link);
23
24 extern int rtnl_link_sit_set_local(struct rtnl_link *link, uint32_t addr);
25 extern uint32_t rtnl_link_sit_get_local(struct rtnl_link *link);
26
27 extern int rtnl_link_sit_set_remote(struct rtnl_link *link, uint32_t addr);
28 extern uint32_t rtnl_link_sit_get_remote(struct rtnl_link *link);
29
30 extern int rtnl_link_sit_set_ttl(struct rtnl_link *link, uint8_t ttl);
31 extern uint8_t rtnl_link_sit_get_ttl(struct rtnl_link *link);
32
33 extern int rtnl_link_sit_set_tos(struct rtnl_link *link, uint8_t tos);
34 extern uint8_t rtnl_link_sit_get_tos(struct rtnl_link *link);
35
36 extern int rtnl_link_sit_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc);
37 extern uint8_t rtnl_link_sit_get_pmtudisc(struct rtnl_link *link);
38
39 extern int rtnl_link_sit_set_flags(struct rtnl_link *link, uint16_t flags);
40 extern uint16_t rtnl_link_sit_get_flags(struct rtnl_link *link);
41
42 int rtnl_link_sit_set_proto(struct rtnl_link *link, uint8_t proto);
43 uint8_t rtnl_link_sit_get_proto(struct rtnl_link *link);
44
45 int rtnl_link_sit_set_ip6rd_prefix(struct rtnl_link *link, const struct in6_addr *prefix);
46 int rtnl_link_sit_get_ip6rd_prefix(const struct rtnl_link *link, struct in6_addr *prefix);
47
48 int rtnl_link_sit_set_ip6rd_prefixlen(struct rtnl_link *link, uint16_t prefixlen);
49 int rtnl_link_sit_get_ip6rd_prefixlen(struct rtnl_link *link, uint16_t *prefixlen);
50
51 int rtnl_link_sit_set_ip6rd_relay_prefix(struct rtnl_link *link, uint32_t prefix);
52 int rtnl_link_sit_get_ip6rd_relay_prefix(const struct rtnl_link *link, uint32_t *prefix);
53
54 int rtnl_link_sit_set_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t prefix);
55 int rtnl_link_sit_get_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t *prefix);
56
57 extern int rtnl_link_sit_set_fwmark(struct rtnl_link *link, uint32_t fwmark);
58 extern int rtnl_link_sit_get_fwmark(struct rtnl_link *link, uint32_t *fwmark);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif
rtnl_link_sit_get_proto
uint8_t rtnl_link_sit_get_proto(struct rtnl_link *link)
Get SIT proto.
Definition sit.c:678
rtnl_link_sit_set_local
int rtnl_link_sit_set_local(struct rtnl_link *link, uint32_t addr)
Set SIT tunnel local address.
Definition sit.c:482
rtnl_link_sit_set_ip6rd_relay_prefix
int rtnl_link_sit_set_ip6rd_relay_prefix(struct rtnl_link *link, uint32_t prefix)
Set ip6rd relay prefix.
Definition sit.c:764
rtnl_link_sit_set_ip6rd_prefix
int rtnl_link_sit_set_ip6rd_prefix(struct rtnl_link *link, const struct in6_addr *prefix)
Set ip6rd prefix.
Definition sit.c:692
rtnl_link_sit_set_remote
int rtnl_link_sit_set_remote(struct rtnl_link *link, uint32_t addr)
Set SIT tunnel remote address.
Definition sit.c:512
rtnl_link_sit_set_tos
int rtnl_link_sit_set_tos(struct rtnl_link *link, uint8_t tos)
Set SIT tunnel tos.
Definition sit.c:572
rtnl_link_sit_set_pmtudisc
int rtnl_link_sit_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc)
Set SIT tunnel path MTU discovery.
Definition sit.c:602
rtnl_link_sit_set_flags
int rtnl_link_sit_set_flags(struct rtnl_link *link, uint16_t flags)
Set SIT tunnel flags.
Definition sit.c:632
rtnl_link_sit_get_ip6rd_relay_prefixlen
int rtnl_link_sit_get_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t *prefix)
Get ip6rd relay prefix length.
Definition sit.c:817
rtnl_link_is_sit
int rtnl_link_is_sit(struct rtnl_link *link)
Check if link is a SIT link.
Definition sit.c:414
rtnl_link_sit_get_ip6rd_prefixlen
int rtnl_link_sit_get_ip6rd_prefixlen(struct rtnl_link *link, uint16_t *prefixlen)
Get ip6rd prefix length.
Definition sit.c:745
rtnl_link_sit_get_tos
uint8_t rtnl_link_sit_get_tos(struct rtnl_link *link)
Get SIT tunnel tos.
Definition sit.c:588
rtnl_link_sit_get_flags
uint16_t rtnl_link_sit_get_flags(struct rtnl_link *link)
Get SIT path flags.
Definition sit.c:648
rtnl_link_sit_add
int rtnl_link_sit_add(struct nl_sock *sk, const char *name)
Create a new sit tunnel device.
Definition sit.c:427
rtnl_link_sit_get_fwmark
int rtnl_link_sit_get_fwmark(struct rtnl_link *link, uint32_t *fwmark)
Get SIT tunnel fwmark.
Definition sit.c:853
rtnl_link_sit_get_ttl
uint8_t rtnl_link_sit_get_ttl(struct rtnl_link *link)
Get SIT tunnel ttl.
Definition sit.c:558
rtnl_link_sit_set_fwmark
int rtnl_link_sit_set_fwmark(struct rtnl_link *link, uint32_t fwmark)
Set SIT tunnel fwmark.
Definition sit.c:836
rtnl_link_sit_get_ip6rd_prefix
int rtnl_link_sit_get_ip6rd_prefix(const struct rtnl_link *link, struct in6_addr *prefix)
Get ip6rd prefix.
Definition sit.c:709
rtnl_link_sit_set_ip6rd_relay_prefixlen
int rtnl_link_sit_set_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t prefix)
Set ip6rd relay prefix length.
Definition sit.c:800
rtnl_link_sit_set_ttl
int rtnl_link_sit_set_ttl(struct rtnl_link *link, uint8_t ttl)
Set SIT tunnel ttl.
Definition sit.c:542
rtnl_link_sit_set_link
int rtnl_link_sit_set_link(struct rtnl_link *link, uint32_t index)
Set SIT tunnel interface index.
Definition sit.c:452
rtnl_link_sit_set_ip6rd_prefixlen
int rtnl_link_sit_set_ip6rd_prefixlen(struct rtnl_link *link, uint16_t prefixlen)
Set ip6rd prefix length.
Definition sit.c:728
rtnl_link_sit_get_local
uint32_t rtnl_link_sit_get_local(struct rtnl_link *link)
Get SIT tunnel local address.
Definition sit.c:498
rtnl_link_sit_set_proto
int rtnl_link_sit_set_proto(struct rtnl_link *link, uint8_t proto)
Set SIT tunnel proto.
Definition sit.c:662
rtnl_link_sit_get_pmtudisc
uint8_t rtnl_link_sit_get_pmtudisc(struct rtnl_link *link)
Get SIT path MTU discovery.
Definition sit.c:618
rtnl_link_sit_get_ip6rd_relay_prefix
int rtnl_link_sit_get_ip6rd_relay_prefix(const struct rtnl_link *link, uint32_t *prefix)
Get ip6rd prefix length.
Definition sit.c:781
rtnl_link_sit_get_remote
uint32_t rtnl_link_sit_get_remote(struct rtnl_link *link)
Get SIT tunnel remote address.
Definition sit.c:528
rtnl_link_sit_get_link
uint32_t rtnl_link_sit_get_link(struct rtnl_link *link)
Get SIT tunnel interface index.
Definition sit.c:468
rtnl_link
Link object.
Definition nl-route.h:29