aboutsummaryrefslogtreecommitdiffstats
path: root/libc/include/resolv.h
diff options
context:
space:
mode:
authorMattias Falk <mattias.falk@sonyericsson.com>2011-04-04 16:12:35 +0200
committerJohan Redestig <johan.redestig@sonyericsson.com>2011-06-08 15:39:29 +0200
commit23d3e6b21b4b6debff87da8c6558495e564cc38e (patch)
tree12c38b3f07f332621e4cedf34dd9ac118428b7d5 /libc/include/resolv.h
parentb127b1f208e67d74a7ee94ad2bd0ffb2fed3af6b (diff)
downloadandroid_bionic-23d3e6b21b4b6debff87da8c6558495e564cc38e.tar.gz
android_bionic-23d3e6b21b4b6debff87da8c6558495e564cc38e.tar.bz2
android_bionic-23d3e6b21b4b6debff87da8c6558495e564cc38e.zip
Add support for a dns cache per interface
Initial commit for dns cache per interface. Added a type that holds a reference to a cache and name of associated interface, address of interface, name server(s) associated with an interface etc. New functions to set default interface, address of name servers etc. Change-Id: Ie991bc5592fd998409853d8bf77d7fe69035dac5
Diffstat (limited to 'libc/include/resolv.h')
-rw-r--r--libc/include/resolv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/include/resolv.h b/libc/include/resolv.h
index 4247d68b7..bb21c2380 100644
--- a/libc/include/resolv.h
+++ b/libc/include/resolv.h
@@ -34,6 +34,7 @@
#include <sys/socket.h>
#include <stdio.h>
#include <arpa/nameser.h>
+#include <netinet/in.h>
__BEGIN_DECLS
@@ -49,6 +50,21 @@ extern struct __res_state *__res_state(void);
extern int b64_ntop(u_char const *, size_t, char *, size_t);
extern int b64_pton(char const *, u_char *, size_t);
+/* Set name of default interface */
+extern void _resolv_set_default_iface(const char* ifname);
+
+/* set name servers for an interface */
+extern void _resolv_set_nameservers_for_iface(const char* ifname, char** servers, int numservers);
+
+/* tell resolver of the address of an interface */
+extern void _resolv_set_addr_of_iface(const char* ifname, struct in_addr* addr);
+
+/* flush the cache associated with the default interface */
+extern void _resolv_flush_cache_for_default_iface();
+
+/* flush the cache associated with a certain interface */
+extern void _resolv_flush_cache_for_iface(const char* ifname);
+
__END_DECLS
#endif /* _RESOLV_H_ */