1 /* 2 * netlink/route/netconf.h rtnetlink netconf layer 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) 2017 David Ahern <dsa@cumulusnetworks.com> 10 */ 11 12 #ifndef NETCONF_H_ 13 #define NETCONF_H_ 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 struct rtnl_netconf; 20 21 int rtnl_netconf_alloc_cache(struct nl_sock *sk, struct nl_cache **result); 22 23 struct rtnl_netconf *rtnl_netconf_get_by_idx(struct nl_cache *cache, int family, 24 int ifindex); 25 struct rtnl_netconf *rtnl_netconf_get_all(struct nl_cache *cache, 26 int family); 27 struct rtnl_netconf *rtnl_netconf_get_default(struct nl_cache *cache, 28 int family); 29 void rtnl_netconf_put(struct rtnl_netconf *nc); 30 31 int rtnl_netconf_get_family(struct rtnl_netconf *nc, int *val); 32 int rtnl_netconf_get_ifindex(struct rtnl_netconf *nc, int *val); 33 int rtnl_netconf_get_forwarding(struct rtnl_netconf *nc, int *val); 34 int rtnl_netconf_get_mc_forwarding(struct rtnl_netconf *nc, int *val); 35 int rtnl_netconf_get_rp_filter(struct rtnl_netconf *nc, int *val); 36 int rtnl_netconf_get_proxy_neigh(struct rtnl_netconf *nc, int *val); 37 int rtnl_netconf_get_ignore_routes_linkdown(struct rtnl_netconf *nc, int *val); 38 int rtnl_netconf_get_input(struct rtnl_netconf *nc, int *val); 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif 45