Revert "dns cache per interface iteration 2"

This reverts commit f1464ff956

Change-Id: I3496b9a8cb54614fe3eea016d1391c8a89f3db38
This commit is contained in:
Robert Greenwalt
2013-01-19 00:40:24 +00:00
committed by Android (Google) Code Review
parent f1464ff956
commit b002a2ff77
13 changed files with 258 additions and 574 deletions

View File

@@ -28,13 +28,13 @@
#ifndef _RESOLV_CACHE_H_
#define _RESOLV_CACHE_H_
struct __res_state;
struct resolv_cache; /* forward */
/* gets the cache for an interface. Set ifname argument to NULL or
* empty buffer ('\0') to get cache for default interface.
* returned cache might be NULL*/
extern struct resolv_cache* __get_res_cache(const char* ifname);
/* gets the cache for the default interface. Might be NULL*/
extern struct resolv_cache* __get_res_cache(void);
/* get the cache for a specified interface. Can be NULL*/
extern struct resolv_cache* __get_res_cache_for_iface(const char* ifname);
/* this gets called everytime we detect some changes in the DNS configuration
* and will flush the cache */
@@ -67,14 +67,8 @@ extern struct in_addr* _resolv_get_addr_of_default_iface();
/* gets the address associated with the specified interface */
extern struct in_addr* _resolv_get_addr_of_iface(const char* ifname);
/* Copy the name of the default interface to provided buffer.
* Return length of buffer on success on failure -1 is returned */
extern int _resolv_get_default_iface(char* buff, int buffLen);
/* sets the name server addresses to the provided res_state structure. The
* name servers are retrieved from the cache which is associated
* with the interface to which the res_state structure is associated */
extern int _resolv_populate_res_for_iface(struct __res_state* statp);
/* Get name of default interface */
extern char* _resolv_get_default_iface();
typedef enum {
RESOLV_CACHE_UNSUPPORTED, /* the cache can't handle that kind of queries */