2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
12 * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
13 * (Royal Institute of Technology, Stockholm, Sweden).
14 * All rights reserved.
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
27 * 3. Neither the name of the Institute nor the names of its contributors
28 * may be used to endorse or promote products derived from this software
29 * without specific prior written permission.
31 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
32 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
44 /* $Id: sm_resolve.h,v 8.8 2001/09/01 00:06:02 gshapiro Exp $ */
47 # ifndef __ROKEN_RESOLVE_H__
48 # define __ROKEN_RESOLVE_H__
50 /* We use these, but they are not always present in <arpa/nameser.h> */
57 # endif /* ! T_AFSDB */
63 # endif /* ! T_NAPTR */
68 unsigned int dns_q_type;
69 unsigned int dns_q_class;
74 unsigned int mx_r_preference;
80 unsigned int srv_r_priority;
81 unsigned int srv_r_weight;
82 unsigned int srv_r_port;
87 typedef struct resource_record RESOURCE_RECORD_T;
89 struct resource_record
93 unsigned int rr_class;
100 MX_RECORD_T *rr_afsdb; /* mx and afsdb are identical */
101 SRV_RECORDT_T *rr_srv;
103 struct in_addr *rr_a;
104 # endif /* NETINET */
106 struct in6_addr *rr_aaaa;
107 # endif /* NETINET6 */
110 RESOURCE_RECORD_T *rr_next;
113 # if !defined(T_A) && !defined(T_AAAA)
114 /* XXX if <arpa/nameser.h> isn't included */
115 typedef int HEADER; /* will never be used */
116 # endif /* !defined(T_A) && !defined(T_AAAA) */
122 RESOURCE_RECORD_T *dns_r_head;
126 extern void dns_free_data __P((DNS_REPLY_T *));
127 extern int dns_string_to_type __P((const char *));
128 extern const char *dns_type_to_string __P((int));
129 extern DNS_REPLY_T *dns_lookup_int __P((const char *,
135 extern DNS_REPLY_T *dns_lookup __P((const char *domain,
136 const char *type_name,
141 # endif /* ! __ROKEN_RESOLVE_H__ */