move GNUNET_TRANSPORT_ATS_ to GNUNET_ATS_
[oweals/gnunet.git] / src / vpn / gnunet-daemon-vpn-dns.h
1 /*
2      This file is part of GNUnet.
3      (C) 2010 Christian Grothoff
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file vpn/gnunet-daemon-vpn-dns.h
23  * @brief
24  * @author Philipp Toelke
25  */
26 #ifndef GNUNET_DAEMON_VPN_DNS_H
27 #define GNUNET_DAEMON_VPN_DNS_H
28
29 /**
30  * a list of outgoing dns-query-packets
31  */
32 extern struct query_packet_list *head;
33
34 /**
35  * The last element of the list of outgoing dns-query-packets
36  */
37 extern struct query_packet_list *tail;
38
39 /**
40  * Callback called by notify_transmit_ready; sends dns-queries or rehijack-messages
41  * to the service-dns
42  */
43 size_t
44 send_query (void *cls, size_t size, void *buf);
45
46 /**
47  * Connect to the service-dns
48  */
49 void
50 connect_to_service_dns (void *cls,
51                         const struct GNUNET_SCHEDULER_TaskContext *tc);
52
53 /**
54  * This receives packets from the service-dns and schedules process_answer to
55  * handle it
56  */
57 void
58 dns_answer_handler (void *cls, const struct GNUNET_MessageHeader *msg);
59
60 /**
61  * The connection to the service-dns
62  */
63 extern struct GNUNET_CLIENT_Connection *dns_connection;
64
65 /**
66  * A flag to show that the service-dns has to rehijack the outbound dns-packets
67  *
68  * This gets set when the helper restarts as the routing-tables are flushed when
69  * the interface vanishes.
70  */
71 extern unsigned char restart_hijack;
72
73 /**
74  * A list of processed dns-responses.
75  *
76  * "processed" means that the packet is complete and can be sent out via udp
77  * directly
78  */
79 extern struct answer_packet_list *answer_proc_head;
80
81 /**
82  * The last element of the list of processed dns-responses.
83  */
84 extern struct answer_packet_list *answer_proc_tail;
85
86 extern GNUNET_SCHEDULER_TaskIdentifier conn_task;
87
88 #endif /* end of include guard: GNUNET-DAEMON-VPN-DNS_H */