Lines Matching refs:ifname
1184 char ifname[IF_NAMESIZE + 1];
1603 static struct resolv_cache* _find_named_cache_locked(const char* ifname);
1605 static struct resolv_cache_info* _find_cache_info_locked(const char* ifname);
1609 static struct resolv_cache* _get_res_cache_for_iface_locked(const char* ifname);
1611 static void _flush_cache_for_iface_locked(const char* ifname);
1615 static int _get_nameserver_locked(const char* ifname, int n, char* addr, int addrLen);
1617 static struct addrinfo* _get_nameserver_addr_locked(const char* ifname, int n);
1619 static struct in_addr* _get_addr_locked(const char * ifname);
1647 char* ifname = _get_default_iface_locked();
1651 if (ifname[0] == '\0') {
1654 if (cache_info->ifname[0] != '\0') {
1655 ifname = cache_info->ifname;
1662 cache = _get_res_cache_for_iface_locked(ifname);
1665 XLOG("_get_res_cache. default_ifname = %s\n", ifname);
1670 _get_res_cache_for_iface_locked(const char* ifname)
1672 if (ifname == NULL)
1675 struct resolv_cache* cache = _find_named_cache_locked(ifname);
1681 int len = sizeof(cache_info->ifname);
1683 strncpy(cache_info->ifname, ifname, len - 1);
1684 cache_info->ifname[len - 1] = '\0';
1703 char* ifname = _get_default_iface_locked();
1709 if (ifname[0] == '\0') {
1712 if (cache_info->ifname[0] != '\0') {
1713 ifname = cache_info->ifname;
1720 struct resolv_cache* cache = _get_res_cache_for_iface_locked(ifname);
1737 char* ifname;
1742 ifname = _get_default_iface_locked();
1743 _flush_cache_for_iface_locked(ifname);
1749 _resolv_flush_cache_for_iface(const char* ifname)
1754 _flush_cache_for_iface_locked(ifname);
1760 _flush_cache_for_iface_locked(const char* ifname)
1762 struct resolv_cache* cache = _find_named_cache_locked(ifname);
1791 _find_named_cache_locked(const char* ifname) {
1793 struct resolv_cache_info* info = _find_cache_info_locked(ifname);
1801 _find_cache_info_locked(const char* ifname)
1803 if (ifname == NULL)
1809 if (strcmp(cache_info->ifname, ifname) == 0) {
1827 _resolv_set_default_iface(const char* ifname)
1829 XLOG("_resolv_set_default_if ifname %s\n",ifname);
1836 strncpy(_res_default_ifname, ifname, size - 1);
1843 _resolv_set_nameservers_for_iface(const char* ifname, char** servers, int numservers)
1853 _get_res_cache_for_iface_locked(ifname);
1855 struct resolv_cache_info* cache_info = _find_cache_info_locked(ifname);
1898 char *ifname;
1904 ifname = _get_default_iface_locked();
1905 result = _get_nameserver_locked(ifname, n, addr, addrLen);
1912 _get_nameserver_locked(const char* ifname, int n, char* addr, int addrLen)
1921 cache_info = _find_cache_info_locked(ifname);
1942 char* ifname;
1947 ifname = _get_default_iface_locked();
1949 result = _get_nameserver_addr_locked(ifname, n);
1955 _get_nameserver_addr_locked(const char* ifname, int n)
1963 cache_info = _find_cache_info_locked(ifname);
1971 _resolv_set_addr_of_iface(const char* ifname, struct in_addr* addr)
1975 struct resolv_cache_info* cache_info = _find_cache_info_locked(ifname);
1981 XLOG("address of interface %s is %s\n", ifname, addr_s);
1991 char* ifname;
1995 ifname = _get_default_iface_locked();
1996 ai = _get_addr_locked(ifname);
2003 _resolv_get_addr_of_iface(const char* ifname)
2009 ai =_get_addr_locked(ifname);
2015 _get_addr_locked(const char * ifname)
2017 struct resolv_cache_info* cache_info = _find_cache_info_locked(ifname);