xref: /freebsd/usr.sbin/pkg/dns_utils.h (revision 29aaa9615959a0523074de389e74204f3828fd4a)
1*29aaa961SBaptiste Daroussin /*-
2*29aaa961SBaptiste Daroussin  * Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org>
3*29aaa961SBaptiste Daroussin  * All rights reserved.
4*29aaa961SBaptiste Daroussin  *
5*29aaa961SBaptiste Daroussin  * Redistribution and use in source and binary forms, with or without
6*29aaa961SBaptiste Daroussin  * modification, are permitted provided that the following conditions
7*29aaa961SBaptiste Daroussin  * are met:
8*29aaa961SBaptiste Daroussin  * 1. Redistributions of source code must retain the above copyright
9*29aaa961SBaptiste Daroussin  *    notice, this list of conditions and the following disclaimer.
10*29aaa961SBaptiste Daroussin  * 2. Redistributions in binary form must reproduce the above copyright
11*29aaa961SBaptiste Daroussin  *    notice, this list of conditions and the following disclaimer in the
12*29aaa961SBaptiste Daroussin  *    documentation and/or other materials provided with the distribution.
13*29aaa961SBaptiste Daroussin  *
14*29aaa961SBaptiste Daroussin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*29aaa961SBaptiste Daroussin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*29aaa961SBaptiste Daroussin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*29aaa961SBaptiste Daroussin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*29aaa961SBaptiste Daroussin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*29aaa961SBaptiste Daroussin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*29aaa961SBaptiste Daroussin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*29aaa961SBaptiste Daroussin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*29aaa961SBaptiste Daroussin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*29aaa961SBaptiste Daroussin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*29aaa961SBaptiste Daroussin  * SUCH DAMAGE.
25*29aaa961SBaptiste Daroussin  *
26*29aaa961SBaptiste Daroussin  * $FreeBSD$
27*29aaa961SBaptiste Daroussin  */
28*29aaa961SBaptiste Daroussin 
29*29aaa961SBaptiste Daroussin #ifndef DNS_UTILS_H
30*29aaa961SBaptiste Daroussin #define DNS_UTILS_H
31*29aaa961SBaptiste Daroussin struct dns_srvinfo {
32*29aaa961SBaptiste Daroussin 	unsigned int type;
33*29aaa961SBaptiste Daroussin 	unsigned int class;
34*29aaa961SBaptiste Daroussin 	unsigned int ttl;
35*29aaa961SBaptiste Daroussin 	unsigned int priority;
36*29aaa961SBaptiste Daroussin 	unsigned int weight;
37*29aaa961SBaptiste Daroussin 	unsigned int port;
38*29aaa961SBaptiste Daroussin 	char host[MAXHOSTNAMELEN];
39*29aaa961SBaptiste Daroussin 	struct dns_srvinfo *next;
40*29aaa961SBaptiste Daroussin };
41*29aaa961SBaptiste Daroussin 
42*29aaa961SBaptiste Daroussin struct dns_srvinfo *
43*29aaa961SBaptiste Daroussin 	dns_getsrvinfo(const char *zone);
44*29aaa961SBaptiste Daroussin 
45*29aaa961SBaptiste Daroussin #endif
46