src/resolve.h
branchnew-lib-errors
changeset 219 cefec18b8268
parent 218 5229a5d098b2
--- a/src/resolve.h	Thu May 28 00:35:02 2009 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-#ifndef RESOLVE_H
-#define RESOLVE_H
-
-/**
- * @file
- *
- * DNS resolver interface
- */
-#include "error.h"
-#include <netdb.h>
-
-/**
- * Lookup result state
- */
-struct resolve_result {
-    /** Head of the addrinfo list */
-    struct addrinfo *list;
-    
-    /** Current addrinfo item */
-    struct addrinfo *item;
-};
-
-/**
- * Resolve the given node/service tuple as a series of addrinfos for the given socktype.
- *
- * This will never return an empty result.
- *
- * XXX: blocking DNS stuff
- *
- * @param res where to store the result state
- * @param node hostname/address to look up
- * @param service service/port to look up
- * @param socktype a SOCK_* value to return addrinfo's for that socktype
- * @param ai_flags optional bitmask of AI_* flags to use
- * @param err returned error info
- */
-err_t resolve_addr (struct resolve_result *res, const char *node, const char *service, int socktype, int ai_flags, error_t *err);
-
-/**
- * Initialize the given result to zero
- */
-void resolve_result_init (struct resolve_result *res);
-
-/**
- * Get the next address from a result, if any left
- */
-struct addrinfo* resolve_result_next (struct resolve_result *res);
-
-/**
- * Release the addrinfo resources associated with the given result
- */
-void resolve_result_deinit (struct resolve_result *res);
-
-/**
- * Returns a pointer to a static buffer containing a string description of the given addrinfo
- */
-const char * resolve_addr_text (const struct addrinfo *addr);
-
-#endif /* RESOLVE_H */