Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:12

0001 /*
0002  * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
0003  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
0004  *
0005  * Redistribution and use in source and binary forms, with or without
0006  * modification, are permitted provided that the following conditions
0007  * are met:
0008  * 1. Redistributions of source code must retain the above copyright
0009  *    notice, this list of conditions and the following disclaimer.
0010  * 2. Redistributions in binary form must reproduce the above copyright
0011  *    notice, this list of conditions and the following disclaimer in the
0012  *    documentation and/or other materials provided with the distribution.
0013  * 3. The name of the author may not be used to endorse or promote products
0014  *    derived from this software without specific prior written permission.
0015  *
0016  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
0017  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0018  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
0019  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
0020  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
0021  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0022  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0023  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0024  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
0025  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0026  */
0027 #ifndef EVENT2_DNS_STRUCT_H_INCLUDED_
0028 #define EVENT2_DNS_STRUCT_H_INCLUDED_
0029 
0030 /** @file event2/dns_struct.h
0031 
0032   Data structures for dns.  Using these structures may hurt forward
0033   compatibility with later versions of Libevent: be careful!
0034 
0035  */
0036 
0037 #ifdef __cplusplus
0038 extern "C" {
0039 #endif
0040 
0041 #include <event2/event-config.h>
0042 #ifdef EVENT__HAVE_SYS_TYPES_H
0043 #include <sys/types.h>
0044 #endif
0045 #ifdef EVENT__HAVE_SYS_TIME_H
0046 #include <sys/time.h>
0047 #endif
0048 
0049 /* For int types. */
0050 #include <event2/util.h>
0051 
0052 /*
0053  * Structures used to implement a DNS server.
0054  */
0055 
0056 struct evdns_server_request {
0057     int flags;
0058     int nquestions;
0059     struct evdns_server_question **questions;
0060 };
0061 struct evdns_server_question {
0062     int type;
0063 #ifdef __cplusplus
0064     int dns_question_class;
0065 #else
0066     /* You should refer to this field as "dns_question_class".  The
0067      * name "class" works in C for backward compatibility, and will be
0068      * removed in a future version. (1.5 or later). */
0069     int class;
0070 #define dns_question_class class
0071 #endif
0072     char name[1];
0073 };
0074 
0075 #ifdef __cplusplus
0076 }
0077 #endif
0078 
0079 #endif /* EVENT2_DNS_STRUCT_H_INCLUDED_ */
0080