GNUnet 0.21.1
gnunet_resolver_service.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2001-2013 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
35#ifndef GNUNET_RESOLVER_SERVICE_H
36#define GNUNET_RESOLVER_SERVICE_H
37
38#ifdef __cplusplus
39extern "C"
40{
41#if 0 /* keep Emacsens' auto-indent happy */
42}
43#endif
44#endif
45
46
49#include "gnunet_time_lib.h"
50
51
59typedef void
61 const struct sockaddr *addr,
62 socklen_t addrlen);
63
64
70
76void
78
79
83void
85
86
98GNUNET_RESOLVER_ip_get (const char *hostname,
99 int af,
102 void *callback_cls);
103
104
118 void *cls);
119
120
128typedef void
130 const char *hostname);
131
137char *
139
140
153GNUNET_RESOLVER_hostname_get (const struct sockaddr *sa,
154 socklen_t salen,
155 int do_resolve,
158 void *cls);
159
160
169void
171
172
173#if 0 /* keep Emacsens' auto-indent happy */
174{
175#endif
176#ifdef __cplusplus
177}
178#endif
179
180/* ifndef GNUNET_RESOLVER_SERVICE_H */
181#endif
182 /* end of group resolver */
184 /* end of group addition to vpn_suite */
186
187/* end of gnunet_resolver_service.h */
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:109
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:119
Configuration API.
API to schedule computations using continuation passing style.
Functions related to time.
char * GNUNET_RESOLVER_local_fqdn_get(void)
Get local fully qualified domain name.
struct GNUNET_RESOLVER_RequestHandle * GNUNET_RESOLVER_ip_get(const char *hostname, int af, struct GNUNET_TIME_Relative timeout, GNUNET_RESOLVER_AddressCallback callback, void *callback_cls)
Convert a string to one or more IP addresses.
Definition: resolver_api.c:940
void GNUNET_RESOLVER_disconnect(void)
Destroy the connection to the resolver service.
Definition: resolver_api.c:270
void GNUNET_RESOLVER_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Create the connection to the resolver service.
Definition: resolver_api.c:258
struct GNUNET_RESOLVER_RequestHandle * GNUNET_RESOLVER_hostname_resolve(int af, struct GNUNET_TIME_Relative timeout, GNUNET_RESOLVER_AddressCallback callback, void *cls)
Resolve our hostname to an IP address.
void(* GNUNET_RESOLVER_AddressCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Function called by the resolver for each address obtained from DNS.
struct GNUNET_RESOLVER_RequestHandle * GNUNET_RESOLVER_hostname_get(const struct sockaddr *sa, socklen_t salen, int do_resolve, struct GNUNET_TIME_Relative timeout, GNUNET_RESOLVER_HostnameCallback callback, void *cls)
Perform a reverse DNS lookup.
void GNUNET_RESOLVER_request_cancel(struct GNUNET_RESOLVER_RequestHandle *rh)
Cancel a request that is still pending with the resolver.
void(* GNUNET_RESOLVER_HostnameCallback)(void *cls, const char *hostname)
Function called by the resolver for each hostname obtained from DNS.
Handle to a request given to the resolver.
Definition: resolver_api.c:104
void * cls
Closure for the callbacks.
Definition: resolver_api.c:130
int af
Desired address family.
Definition: resolver_api.c:146
Time for relative time used by GNUnet, in microseconds.