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