1243883Sbapt/*- 2243883Sbapt * Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org> 3243883Sbapt * All rights reserved. 4243883Sbapt * 5243883Sbapt * Redistribution and use in source and binary forms, with or without 6243883Sbapt * modification, are permitted provided that the following conditions 7243883Sbapt * are met: 8243883Sbapt * 1. Redistributions of source code must retain the above copyright 9243883Sbapt * notice, this list of conditions and the following disclaimer. 10243883Sbapt * 2. Redistributions in binary form must reproduce the above copyright 11243883Sbapt * notice, this list of conditions and the following disclaimer in the 12243883Sbapt * documentation and/or other materials provided with the distribution. 13243883Sbapt * 14243883Sbapt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15243883Sbapt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16243883Sbapt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17243883Sbapt * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18243883Sbapt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19243883Sbapt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20243883Sbapt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21243883Sbapt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22243883Sbapt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23243883Sbapt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24243883Sbapt * SUCH DAMAGE. 25243883Sbapt * 26243883Sbapt * $FreeBSD$ 27243883Sbapt */ 28243883Sbapt 29243883Sbapt#ifndef DNS_UTILS_H 30243883Sbapt#define DNS_UTILS_H 31243883Sbaptstruct dns_srvinfo { 32243883Sbapt unsigned int type; 33243883Sbapt unsigned int class; 34243883Sbapt unsigned int ttl; 35243883Sbapt unsigned int priority; 36243883Sbapt unsigned int weight; 37243883Sbapt unsigned int port; 38257309Sbapt unsigned int finalweight; 39243883Sbapt char host[MAXHOSTNAMELEN]; 40243883Sbapt struct dns_srvinfo *next; 41243883Sbapt}; 42243883Sbapt 43243883Sbaptstruct dns_srvinfo * 44243883Sbapt dns_getsrvinfo(const char *zone); 45243883Sbapt 46243883Sbapt#endif 47