diff options
author | Philipp Tölke <toelke@in.tum.de> | 2011-01-10 21:41:33 +0000 |
---|---|---|
committer | Philipp Tölke <toelke@in.tum.de> | 2011-01-10 21:41:33 +0000 |
commit | bc795e47152af4db3800ffd6ea15c5833c4404ff (patch) | |
tree | 55353adaddb8d58233241589029203c5e31f303f /src/vpn/gnunet-daemon-vpn-dns.h | |
parent | bdb2a491e0b595a782cea7177878dbc6a4d49c8f (diff) | |
download | gnunet-bc795e47152af4db3800ffd6ea15c5833c4404ff.tar.gz gnunet-bc795e47152af4db3800ffd6ea15c5833c4404ff.zip |
split up daemon-vpn in multiple files, remove exit-functionality
Diffstat (limited to 'src/vpn/gnunet-daemon-vpn-dns.h')
-rw-r--r-- | src/vpn/gnunet-daemon-vpn-dns.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/vpn/gnunet-daemon-vpn-dns.h b/src/vpn/gnunet-daemon-vpn-dns.h new file mode 100644 index 000000000..f72a29ad1 --- /dev/null +++ b/src/vpn/gnunet-daemon-vpn-dns.h | |||
@@ -0,0 +1,83 @@ | |||
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 | struct query_packet_list *head; | ||
33 | |||
34 | /** | ||
35 | * The last element of the list of outgoing dns-query-packets | ||
36 | */ | ||
37 | 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 send_query(void* cls, size_t size, void* buf); | ||
44 | |||
45 | /** | ||
46 | * Connect to the service-dns | ||
47 | */ | ||
48 | void connect_to_service_dns (void *cls, | ||
49 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
50 | |||
51 | /** | ||
52 | * This receives packets from the service-dns and schedules process_answer to | ||
53 | * handle it | ||
54 | */ | ||
55 | void dns_answer_handler(void* cls, const struct GNUNET_MessageHeader *msg); | ||
56 | |||
57 | /** | ||
58 | * The connection to the service-dns | ||
59 | */ | ||
60 | struct GNUNET_CLIENT_Connection *dns_connection; | ||
61 | |||
62 | /** | ||
63 | * A flag to show that the service-dns has to rehijack the outbound dns-packets | ||
64 | * | ||
65 | * This gets set when the helper restarts as the routing-tables are flushed when | ||
66 | * the interface vanishes. | ||
67 | */ | ||
68 | unsigned char restart_hijack; | ||
69 | |||
70 | /** | ||
71 | * A list of processed dns-responses. | ||
72 | * | ||
73 | * "processed" means that the packet is complete and can be sent out via udp | ||
74 | * directly | ||
75 | */ | ||
76 | struct answer_packet_list *answer_proc_head; | ||
77 | |||
78 | /** | ||
79 | * The last element of the list of processed dns-responses. | ||
80 | */ | ||
81 | struct answer_packet_list *answer_proc_tail; | ||
82 | |||
83 | #endif /* end of include guard: GNUNET-DAEMON-VPN-DNS_H */ | ||