home *** CD-ROM | disk | FTP | other *** search
- /*
- * DNSQueryMX.h
- *
- * (Part of) A multiply threadable, multitasking DNS resolver
- *
- * Copyright (C) Stewart Brodie, February 1996.
- * Portions are copyright Regents of the University California Berkeley
- *
- * This code may be freely used in applications designed to work with the
- * Acorn TCP/IP stack or FreeNet or compatible stacks for RISC OS, provided
- * that a copy of the UCB copyright & disclaimer message is included, and
- * also my own disclaimer.
- *
- * This code is based on the res_ function code from BIND-4.9.3-REL
- * but with extensive modifications to make it state driven.
- */
- #ifndef dnsquerymx_h_included
- #define dnsquerymx_h_included
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef struct dnsquery_mx {
- int preference;
- char hostname[MAXDNAME];
- } dnsquery_mx;
-
- /* dnsquery_mx *dnsquery_getanswerraw(dnsquery *query, int *mxhostcount)
- *
- * Similar to dnsquery_getanswer, but used when the lookup was T_MX
- * in order to retrieve a sanitised structure containing the response.
- *
- * You must only ever make this call after dnsquery_check(query) has
- * returned dns_query_complete_success. You must not make this call
- * after 'query' has been passed to dnsquery_dispose.
- *
- * You can make this call more than once in between those two states,
- * although there is a performance hit with this function call
- *
- * This function returns you a pointer to an array of dnsquery_mx
- * structures. The number of structures is stored in mxhostcount.
- * The returned pointer remains valid until the 'query' has been passed
- * to dnsquery_dispose. The mxhostcount may be set to zero, indicating
- * no responses, and in that case, the pointer may not be valid.
- */
- extern dnsquery_mx *dnsquery_getanswermx(dnsquery *, int *);
-
- #ifdef __cplusplus
- }
- #endif
- #endif
-