GNUnet  0.10.x
gnunet_dns_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2012 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your 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  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
33 #ifndef GNUNET_DNS_SERVICE_H
34 #define GNUNET_DNS_SERVICE_H
35 
36 #include "gnunet_util_lib.h"
37 
38 
42 struct GNUNET_DNS_Handle;
43 
48 
57 
66 
77 
86 
95 };
96 
97 
98 
122 typedef void
124  struct GNUNET_DNS_RequestHandle *rh,
125  size_t request_length,
126  const char *request);
127 
128 
136 void
138 
139 
146 void
148 
149 
160 void
162  uint16_t reply_length,
163  const char *reply);
164 
165 
175 struct GNUNET_DNS_Handle *
177  enum GNUNET_DNS_Flags flags,
179  void *rh_cls);
180 
181 
187 void
189 
190 
191 #endif
192  /* end of group */
static struct GNUNET_VPN_RedirectionRequest * request
Opaque redirection request handle.
Definition: gnunet-vpn.c:41
void * rh_cls
Closure for rh.
Definition: dns_api.c:74
enum GNUNET_DNS_Flags flags
Flags for events we care about.
Definition: dns_api.c:89
This client wants to be called on the results of a DNS resolution (either resolved by PRE-RESOLUTION ...
Set this flag to see all requests just before they are returned to the network.
void GNUNET_DNS_disconnect(struct GNUNET_DNS_Handle *dh)
Disconnect from the DNS service.
Definition: dns_api.c:368
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
DNS handle.
Definition: dns_api.c:55
Set this flag to see all requests first prior to resolution (for monitoring).
void(* GNUNET_DNS_RequestHandler)(void *cls, struct GNUNET_DNS_RequestHandle *rh, size_t request_length, const char *request)
Signature of a function that is called whenever the DNS service encounters a DNS request and needs to...
struct GNUNET_DNS_Handle * GNUNET_DNS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, enum GNUNET_DNS_Flags flags, GNUNET_DNS_RequestHandler rh, void *rh_cls)
Connect to the service-dns.
Definition: dns_api.c:345
void GNUNET_DNS_request_answer(struct GNUNET_DNS_RequestHandle *rh, uint16_t reply_length, const char *reply)
If a GNUNET_DNS_RequestHandler calls this function, the request is supposed to be answered with the d...
Definition: dns_api.c:301
Handle to identify an individual DNS request.
Definition: dns_api.c:34
configuration data
Definition: configuration.c:83
void GNUNET_DNS_request_forward(struct GNUNET_DNS_RequestHandle *rh)
If a GNUNET_DNS_RequestHandler calls this function, the client has no desire to interfer with the req...
Definition: dns_api.c:242
void GNUNET_DNS_request_drop(struct GNUNET_DNS_RequestHandle *rh)
If a GNUNET_DNS_RequestHandler calls this function, the request is to be dropped and no response shou...
Definition: dns_api.c:270
This client should be called on requests that have not yet been resolved as this client provides a re...
Useless option: never call the client.
GNUNET_DNS_Flags
Flags that specify when to call the client&#39;s handler.