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 
53 {
54 
59 
68 
79 
88 
97 
98 };
99 
100 
101 
125 typedef void
127  struct GNUNET_DNS_RequestHandle *rh,
128  size_t request_length,
129  const char *request);
130 
131 
139 void
141 
142 
149 void
151 
152 
163 void
165  uint16_t reply_length,
166  const char *reply);
167 
168 
178 struct GNUNET_DNS_Handle *
180  enum GNUNET_DNS_Flags flags,
182  void *rh_cls);
183 
184 
190 void
192 
193 
194 #endif
195  /* 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:79
enum GNUNET_DNS_Flags flags
Flags for events we care about.
Definition: dns_api.c:94
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:373
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
DNS handle.
Definition: dns_api.c:58
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:350
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:306
Handle to identify an individual DNS request.
Definition: dns_api.c:34
configuration data
Definition: configuration.c:85
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:247
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:275
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.