diff options
Diffstat (limited to 'libc/include/resolv.h')
-rw-r--r-- | libc/include/resolv.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libc/include/resolv.h b/libc/include/resolv.h index 4247d68b7..7257d343d 100644 --- a/libc/include/resolv.h +++ b/libc/include/resolv.h @@ -34,12 +34,13 @@ #include <sys/socket.h> #include <stdio.h> #include <arpa/nameser.h> +#include <netinet/in.h> __BEGIN_DECLS struct res_state; -extern struct __res_state *__res_state(void); +extern struct __res_state *__res_state(void) __attribute__((const)); #define _res (*__res_state()) /* Base-64 functions - because some code expects it there */ @@ -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_ */ |