1275970Scy/* 2275970Scy * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu> 3275970Scy * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4275970Scy * 5275970Scy * Redistribution and use in source and binary forms, with or without 6275970Scy * modification, are permitted provided that the following conditions 7275970Scy * are met: 8275970Scy * 1. Redistributions of source code must retain the above copyright 9275970Scy * notice, this list of conditions and the following disclaimer. 10275970Scy * 2. Redistributions in binary form must reproduce the above copyright 11275970Scy * notice, this list of conditions and the following disclaimer in the 12275970Scy * documentation and/or other materials provided with the distribution. 13275970Scy * 3. The name of the author may not be used to endorse or promote products 14275970Scy * derived from this software without specific prior written permission. 15275970Scy * 16275970Scy * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17275970Scy * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18275970Scy * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19275970Scy * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20275970Scy * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21275970Scy * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22275970Scy * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23275970Scy * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24275970Scy * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25275970Scy * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26275970Scy */ 27275970Scy#ifndef EVENT2_DNS_STRUCT_H_INCLUDED_ 28275970Scy#define EVENT2_DNS_STRUCT_H_INCLUDED_ 29275970Scy 30275970Scy/** @file event2/dns_struct.h 31275970Scy 32275970Scy Data structures for dns. Using these structures may hurt forward 33275970Scy compatibility with later versions of Libevent: be careful! 34275970Scy 35275970Scy */ 36275970Scy 37275970Scy#ifdef __cplusplus 38275970Scyextern "C" { 39275970Scy#endif 40275970Scy 41275970Scy#include <event2/event-config.h> 42275970Scy#ifdef EVENT__HAVE_SYS_TYPES_H 43275970Scy#include <sys/types.h> 44275970Scy#endif 45275970Scy#ifdef EVENT__HAVE_SYS_TIME_H 46275970Scy#include <sys/time.h> 47275970Scy#endif 48275970Scy 49275970Scy/* For int types. */ 50275970Scy#include <event2/util.h> 51275970Scy 52275970Scy/* 53275970Scy * Structures used to implement a DNS server. 54275970Scy */ 55275970Scy 56275970Scystruct evdns_server_request { 57275970Scy int flags; 58275970Scy int nquestions; 59275970Scy struct evdns_server_question **questions; 60275970Scy}; 61275970Scystruct evdns_server_question { 62275970Scy int type; 63275970Scy#ifdef __cplusplus 64275970Scy int dns_question_class; 65275970Scy#else 66275970Scy /* You should refer to this field as "dns_question_class". The 67275970Scy * name "class" works in C for backward compatibility, and will be 68275970Scy * removed in a future version. (1.5 or later). */ 69275970Scy int class; 70275970Scy#define dns_question_class class 71275970Scy#endif 72275970Scy char name[1]; 73275970Scy}; 74275970Scy 75275970Scy#ifdef __cplusplus 76275970Scy} 77275970Scy#endif 78275970Scy 79275970Scy#endif /* EVENT2_DNS_STRUCT_H_INCLUDED_ */ 80275970Scy 81