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 13 extern "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 46