summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2014-05-10 04:48:12 (GMT)
committerThomas Haller <thaller@redhat.com>2014-06-16 14:59:16 (GMT)
commit11f9cc0914aef697c1f49bca7353117cb65fd318 (patch)
tree12134513d469f6e49883c49ca62d182c97481d96 /doc
parentcfc57ce3596cfe9dacf01219f118534fb2686137 (diff)
downloadlibnl-11f9cc0914aef697c1f49bca7353117cb65fd318.zip
libnl-11f9cc0914aef697c1f49bca7353117cb65fd318.tar.gz
libnl-11f9cc0914aef697c1f49bca7353117cb65fd318.tar.bz2
ip6tnl: introduce ip6 tunnel support
This patch adds support for ip6 tunnel that works with the ip6_tunnel kernel module. Signed-off-by: Susant Sahani <susant@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/route.txt59
1 files changed, 59 insertions, 0 deletions
diff --git a/doc/route.txt b/doc/route.txt
index d87e79f..d9f88e1 100644
--- a/doc/route.txt
+++ b/doc/route.txt
@@ -1140,6 +1140,65 @@ if((err = rtnl_link_add(sk, link, NLM_F_CREATE)) < 0)
rtnl_link_put(link);
-----
+[[link_ip6tnl]]
+==== IP6TNL
+
+[source,c]
+-----
+extern struct rtnl_link *rtnl_link_ip6_tnl_alloc(void);
+extern int rtnl_link_ip6_tnl_add(struct nl_sock *sk, const char *name);
+
+extern int rtnl_link_ip6_tnl_set_link(struct rtnl_link *link, uint32_t index);
+extern uint32_t rtnl_link_ip6_tnl_get_link(struct rtnl_link *link);
+
+extern int rtnl_link_ip6_tnl_set_local(struct rtnl_link *link, struct in6_addr *);
+extern int rtnl_link_ip6_tnl_get_local(struct rtnl_link *link, struct in6_addr *);
+
+extern int rtnl_link_ip6_tnl_set_remote(struct rtnl_link *link, struct in6_addr *);
+extern int rtnl_link_ip6_tnl_get_remote(struct rtnl_link *link, struct in6_addr *);
+
+extern int rtnl_link_ip6_tnl_set_ttl(struct rtnl_link *link, uint8_t ttl);
+extern uint8_t rtnl_link_ip6_tnl_get_ttl(struct rtnl_link *link);
+
+extern int rtnl_link_ip6_tnl_set_tos(struct rtnl_link *link, uint8_t tos);
+extern uint8_t rtnl_link_ip6_tnl_get_tos(struct rtnl_link *link);
+
+extern int rtnl_link_ip6_tnl_set_encaplimit(struct rtnl_link *link, uint8_t encap_limit);
+extern uint8_t rtnl_link_ip6_tnl_get_encaplimit(struct rtnl_link *link);
+
+extern int rtnl_link_ip6_tnl_set_flags(struct rtnl_link *link, uint32_t flags);
+extern uint32_t rtnl_link_ip6_tnl_get_flags(struct rtnl_link *link);
+
+extern uint32_t rtnl_link_ip6_tnl_get_flowinfo(struct rtnl_link *link);
+extern int rtnl_link_ip6_tnl_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo);
+
+extern int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto);
+extern uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link);
+
+-----
+
+.Example: Add a ip6tnl tunnel device
+[source,c]
+-----
+struct rtnl_link *link
+struct in6_addr addr
+
+link = rtnl_link_ip6_tnl_alloc();
+
+rtnl_link_set_name(link, "ip6tnl-tun");
+rtnl_link_ip6_tnl_set_link(link, if_index);
+
+inet_pton(AF_INET6, "2607:f0d0:1002:51::4", &addr);
+rtnl_link_ip6_tnl_set_local(link, &addr);
+
+inet_pton(AF_INET6, "2607:f0d0:1002:52::5", &addr);
+rtnl_link_ip6_tnl_set_remote(link, &addr);
+
+rtnl_link_add(sk, link, NLM_F_CREATE);
+rtnl_link_put(link);
+
+-----
+
== Neighbouring