1 /* 2 * netlink/route/link/ip_gre.h IPGRE 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_IPGRE_H_ 13 #define NETLINK_LINK_IPGRE_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 int rtnl_link_is_ipgre(struct rtnl_link *link); 23 extern int rtnl_link_is_ipgretap(struct rtnl_link *link); 24 25 extern struct rtnl_link *rtnl_link_ipgre_alloc(void); 26 extern struct rtnl_link *rtnl_link_ipgretap_alloc(void); 27 extern int rtnl_link_ipgre_add(struct nl_sock *sk, const char *name); 28 extern int rtnl_link_ipgretap_add(struct nl_sock *sk, const char *name); 29 30 extern int rtnl_link_ipgre_set_link(struct rtnl_link *link, uint32_t index); 31 extern uint32_t rtnl_link_ipgre_get_link(struct rtnl_link *link); 32 33 extern int rtnl_link_ipgre_set_iflags(struct rtnl_link *link, uint16_t iflags); 34 extern uint16_t rtnl_link_ipgre_get_iflags(struct rtnl_link *link); 35 36 extern int rtnl_link_ipgre_set_oflags(struct rtnl_link *link, uint16_t oflags); 37 extern uint16_t rtnl_link_ipgre_get_oflags(struct rtnl_link *link); 38 39 extern int rtnl_link_ipgre_set_ikey(struct rtnl_link *link, uint32_t ikey); 40 extern uint32_t rtnl_link_ipgre_get_ikey(struct rtnl_link *link); 41 42 extern int rtnl_link_ipgre_set_okey(struct rtnl_link *link, uint32_t okey); 43 extern uint32_t rtnl_link_ipgre_get_okey(struct rtnl_link *link); 44 45 extern int rtnl_link_ipgre_set_local(struct rtnl_link *link, uint32_t addr); 46 extern uint32_t rtnl_link_ipgre_get_local(struct rtnl_link *link); 47 48 extern int rtnl_link_ipgre_set_remote(struct rtnl_link *link, uint32_t addr); 49 extern uint32_t rtnl_link_ipgre_get_remote(struct rtnl_link *link); 50 51 extern int rtnl_link_ipgre_set_ttl(struct rtnl_link *link, uint8_t ttl); 52 extern uint8_t rtnl_link_ipgre_get_ttl(struct rtnl_link *link); 53 54 extern int rtnl_link_ipgre_set_tos(struct rtnl_link *link, uint8_t tos); 55 extern uint8_t rtnl_link_ipgre_get_tos(struct rtnl_link *link); 56 57 extern int rtnl_link_ipgre_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc); 58 extern uint8_t rtnl_link_ipgre_get_pmtudisc(struct rtnl_link *link); 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif 65