1 /* SPDX-License-Identifier: LGPL-2.1-only */ 2 /* 3 * Copyright (c) 2017 David Ahern <dsa@cumulusnetworks.com> 4 */ 5 6 #ifndef NETCONF_H_ 7 #define NETCONF_H_ 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 struct rtnl_netconf; 14 15 int rtnl_netconf_alloc_cache(struct nl_sock *sk, struct nl_cache **result); 16 17 struct rtnl_netconf *rtnl_netconf_get_by_idx(struct nl_cache *cache, int family, 18 int ifindex); 19 struct rtnl_netconf *rtnl_netconf_get_all(struct nl_cache *cache, 20 int family); 21 struct rtnl_netconf *rtnl_netconf_get_default(struct nl_cache *cache, 22 int family); 23 void rtnl_netconf_put(struct rtnl_netconf *nc); 24 25 int rtnl_netconf_get_family(struct rtnl_netconf *nc, int *val); 26 int rtnl_netconf_get_ifindex(struct rtnl_netconf *nc, int *val); 27 int rtnl_netconf_get_forwarding(struct rtnl_netconf *nc, int *val); 28 int rtnl_netconf_get_mc_forwarding(struct rtnl_netconf *nc, int *val); 29 int rtnl_netconf_get_rp_filter(struct rtnl_netconf *nc, int *val); 30 int rtnl_netconf_get_proxy_neigh(struct rtnl_netconf *nc, int *val); 31 int rtnl_netconf_get_ignore_routes_linkdown(struct rtnl_netconf *nc, int *val); 32 int rtnl_netconf_get_input(struct rtnl_netconf *nc, int *val); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif 39