1 /* 2 * netlink/route/link/ip6tnl.h IP6TNL interface 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation version 2.1 7 * of the License. 8 * 9 * Copyright (c) 2014 Susant Sahani <susant@redhat.com> 10 */ 11 12 #ifndef NETLINK_LINK_IP6TNL_H_ 13 #define NETLINK_LINK_IP6TNL_H_ 14 15 #include <netlink/netlink.h> 16 #include <netlink/route/link.h> 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 extern struct rtnl_link *rtnl_link_ip6_tnl_alloc(void); 23 extern int rtnl_link_ip6_tnl_add(struct nl_sock *sk, const char *name); 24 25 extern int rtnl_link_ip6_tnl_set_link(struct rtnl_link *link, uint32_t index); 26 extern uint32_t rtnl_link_ip6_tnl_get_link(struct rtnl_link *link); 27 28 extern int rtnl_link_ip6_tnl_set_local(struct rtnl_link *link, struct in6_addr *); 29 extern int rtnl_link_ip6_tnl_get_local(struct rtnl_link *link, struct in6_addr *addr); 30 31 extern int rtnl_link_ip6_tnl_set_remote(struct rtnl_link *link, struct in6_addr *); 32 extern int rtnl_link_ip6_tnl_get_remote(struct rtnl_link *link, struct in6_addr *); 33 34 extern int rtnl_link_ip6_tnl_set_ttl(struct rtnl_link *link, uint8_t ttl); 35 extern uint8_t rtnl_link_ip6_tnl_get_ttl(struct rtnl_link *link); 36 37 extern int rtnl_link_ip6_tnl_set_tos(struct rtnl_link *link, uint8_t tos); 38 extern uint8_t rtnl_link_ip6_tnl_get_tos(struct rtnl_link *link); 39 40 extern int rtnl_link_ip6_tnl_set_encaplimit(struct rtnl_link *link, uint8_t encap_limit); 41 extern uint8_t rtnl_link_ip6_tnl_get_encaplimit(struct rtnl_link *link); 42 43 extern int rtnl_link_ip6_tnl_set_flags(struct rtnl_link *link, uint32_t flags); 44 extern uint32_t rtnl_link_ip6_tnl_get_flags(struct rtnl_link *link); 45 46 extern uint32_t rtnl_link_ip6_tnl_get_flowinfo(struct rtnl_link *link); 47 extern int rtnl_link_ip6_tnl_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo); 48 49 extern int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto); 50 extern uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link); 51 52 #ifdef _cplusplus 53 } 54 #endif 55 56 #endif 57