1 /* 2 * netlink/route/link/sit.h SIT 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_SIT_H_ 13 #define NETLINK_LINK_SIT_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_sit_alloc(void); 23 extern int rtnl_link_sit_add(struct nl_sock *sk, const char *name); 24 25 extern int rtnl_link_is_sit(struct rtnl_link *link); 26 27 extern int rtnl_link_sit_set_link(struct rtnl_link *link, uint32_t index); 28 extern uint32_t rtnl_link_sit_get_link(struct rtnl_link *link); 29 30 extern int rtnl_link_sit_set_local(struct rtnl_link *link, uint32_t addr); 31 extern uint32_t rtnl_link_sit_get_local(struct rtnl_link *link); 32 33 extern int rtnl_link_sit_set_remote(struct rtnl_link *link, uint32_t addr); 34 extern uint32_t rtnl_link_sit_get_remote(struct rtnl_link *link); 35 36 extern int rtnl_link_sit_set_ttl(struct rtnl_link *link, uint8_t ttl); 37 extern uint8_t rtnl_link_sit_get_ttl(struct rtnl_link *link); 38 39 extern int rtnl_link_sit_set_tos(struct rtnl_link *link, uint8_t tos); 40 extern uint8_t rtnl_link_sit_get_tos(struct rtnl_link *link); 41 42 extern int rtnl_link_sit_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc); 43 extern uint8_t rtnl_link_sit_get_pmtudisc(struct rtnl_link *link); 44 45 extern int rtnl_link_sit_set_flags(struct rtnl_link *link, uint16_t flags); 46 extern uint16_t rtnl_link_sit_get_flags(struct rtnl_link *link); 47 48 int rtnl_link_sit_set_proto(struct rtnl_link *link, uint8_t proto); 49 uint8_t rtnl_link_sit_get_proto(struct rtnl_link *link); 50 51 int rtnl_link_sit_set_ip6rd_prefix(struct rtnl_link *link, const struct in6_addr *prefix); 52 int rtnl_link_sit_get_ip6rd_prefix(const struct rtnl_link *link, struct in6_addr *prefix); 53 54 int rtnl_link_sit_set_ip6rd_prefixlen(struct rtnl_link *link, uint16_t prefixlen); 55 int rtnl_link_sit_get_ip6rd_prefixlen(struct rtnl_link *link, uint16_t *prefixlen); 56 57 int rtnl_link_sit_set_ip6rd_relay_prefix(struct rtnl_link *link, uint32_t prefix); 58 int rtnl_link_sit_get_ip6rd_relay_prefix(const struct rtnl_link *link, uint32_t *prefix); 59 60 int rtnl_link_sit_set_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t prefix); 61 int rtnl_link_sit_get_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t *prefix); 62 63 #ifdef __cplusplus 64 } 65 #endif 66 67 #endif 68