Updated DNS to use not-yet-implemented UDP data-xfer API.

This commit is contained in:
Michael Brown
2007-06-11 23:30:44 +01:00
parent a74ecf3057
commit f87bc837f4
3 changed files with 123 additions and 128 deletions

View File

@@ -9,8 +9,6 @@
#include <stdint.h>
#include <gpxe/in.h>
#include <gpxe/async.h>
#include <gpxe/retry.h>
/*
* Constants
@@ -89,29 +87,6 @@ union dns_rr_info {
struct dns_rr_info_cname cname;
};
/** A DNS request */
struct dns_request {
/** Socket address to fill in with resolved address */
struct sockaddr *sa;
/** Current query packet */
struct dns_query query;
/** Length of current query packet */
struct dns_query_info *qinfo;
/** Recursion counter */
unsigned int recursion;
/** Asynchronous operation */
struct async async;
/** UDP connection */
struct udp_connection udp;
/** Retry timer */
struct retry_timer timer;
};
extern struct in_addr nameserver;
extern int dns_resolv ( const char *name, struct sockaddr *sa,
struct async *parent );
extern struct sockaddr_tcpip nameserver;
#endif /* _GPXE_DNS_H */

View File

@@ -153,6 +153,13 @@ struct resolver {
#define __resolver( resolv_order ) \
__table ( struct resolver, resolvers, resolv_order )
extern void resolv_done ( struct resolv_interface *resolv,
struct sockaddr *sa, int rc );
extern void ignore_resolv_done ( struct resolv_interface *resolv,
struct sockaddr *sa, int rc );
extern struct resolv_interface_operations null_resolv_ops;
struct resolv_interface null_resolv;
extern int resolv ( struct resolv_interface *resolv, const char *name,
struct sockaddr *sa );