GNUnet 0.22.2
gnunet_gns_service.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012-2014, 2017 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
37#ifndef GNUNET_GNS_SERVICE_H
38#define GNUNET_GNS_SERVICE_H
39
40
41#include "gnunet_util_lib.h"
44
45#ifdef __cplusplus
46extern "C" {
47#if 0 /* keep Emacsens' auto-indent happy */
48}
49#endif
50#endif
51
52
57
62
68
69
76struct GNUNET_GNS_Handle *
78
79
85void
87
88
97 void *cls,
98 uint32_t rd_count,
99 const struct GNUNET_GNSRECORD_Data *rd);
100
101
106{
111
116
123
124
139 const char *name,
140 const struct GNUNET_CRYPTO_PublicKey *zone,
141 uint32_t type,
144 void *proc_cls);
145
146
163 const char *name,
164 const struct GNUNET_CRYPTO_PublicKey *zone,
165 uint32_t type,
167 uint16_t recursion_depth_limit,
169 void *proc_cls);
170
171
178void *
180
181
193 void *cls,
194 int gns_tld,
195 uint32_t rd_count,
196 const struct GNUNET_GNSRECORD_Data *rd);
197
198
214 const char *name,
215 uint32_t type,
218 void *proc_cls);
219
220
227void *
229
238GNUNET_GNS_parse_ztld (const char *name,
239 struct GNUNET_CRYPTO_PublicKey *ztld_key);
240
241#if 0 /* keep Emacsens' auto-indent happy */
242{
243#endif
244#ifdef __cplusplus
245}
246#endif
247
248#endif
249 /* end of group */
251 /* end of group addition */
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:108
static struct GNUNET_GNS_LookupWithTldRequest * lr
Handle to lookup request.
Definition: gnunet-gns.c:98
static char * name
Name (label) of the records to list.
static unsigned int rd_count
Number of records for currently parsed set.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
static uint32_t type
Type string converted to DNS type value.
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
Definition: gnunet-vpn.c:35
Identity service; implements identity management for GNUnet.
API that can be used to store naming information on a GNUnet node;.
void GNUNET_GNS_disconnect(struct GNUNET_GNS_Handle *handle)
Shutdown connection with the GNS service.
Definition: gns_api.c:289
struct GNUNET_GNS_LookupRequest * GNUNET_GNS_lookup(struct GNUNET_GNS_Handle *handle, const char *name, const struct GNUNET_CRYPTO_PublicKey *zone, uint32_t type, enum GNUNET_GNS_LocalOptions options, GNUNET_GNS_LookupResultProcessor proc, void *proc_cls)
Perform an asynchronous lookup operation on the GNS.
Definition: gns_api.c:421
void(* GNUNET_GNS_LookupResultProcessor2)(void *cls, int gns_tld, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
Iterator called on obtained result for a GNS lookup where "not GNS" is a valid answer.
void(* GNUNET_GNS_LookupResultProcessor)(void *cls, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
Iterator called on obtained result for a GNS lookup.
enum GNUNET_GenericReturnValue GNUNET_GNS_parse_ztld(const char *name, struct GNUNET_CRYPTO_PublicKey *ztld_key)
Try to parse the zTLD into a public key.
Definition: gns_tld_api.c:228
struct GNUNET_GNS_LookupWithTldRequest * GNUNET_GNS_lookup_with_tld(struct GNUNET_GNS_Handle *handle, const char *name, uint32_t type, enum GNUNET_GNS_LocalOptions options, GNUNET_GNS_LookupResultProcessor2 proc, void *proc_cls)
Perform an asynchronous lookup operation on the GNS, determining the zone using the TLD of the given ...
Definition: gns_tld_api.c:240
void * GNUNET_GNS_lookup_with_tld_cancel(struct GNUNET_GNS_LookupWithTldRequest *ltr)
Cancel pending lookup request.
Definition: gns_tld_api.c:331
void * GNUNET_GNS_lookup_cancel(struct GNUNET_GNS_LookupRequest *lr)
Cancel pending lookup request.
Definition: gns_api.c:313
GNUNET_GNS_LocalOptions
Options for the GNS lookup.
struct GNUNET_GNS_LookupRequest * GNUNET_GNS_lookup_limited(struct GNUNET_GNS_Handle *handle, const char *name, const struct GNUNET_CRYPTO_PublicKey *zone, uint32_t type, enum GNUNET_GNS_LocalOptions options, uint16_t recursion_depth_limit, GNUNET_GNS_LookupResultProcessor proc, void *proc_cls)
Perform an asynchronous lookup operation on the GNS.
Definition: gns_api.c:343
struct GNUNET_GNS_Handle * GNUNET_GNS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize the connection with the GNS service.
Definition: gns_api.c:267
@ GNUNET_GNS_LO_NO_DHT
Never look in the DHT, keep request to local cache.
@ GNUNET_GNS_LO_LOCAL_MASTER
For the rightmost label, only look in the cache (it is our local namestore), for the others,...
@ GNUNET_GNS_LO_DEFAULT
Defaults, look in cache, then in DHT.
GNUNET_GenericReturnValue
Named constants for return values.
An identity key as per LSD0001.
Connection to the GNS service.
Definition: gns_api.h:36
Handle to a lookup request.
Definition: gns_api.c:48
void * proc_cls
lookup_proc closure
Definition: gns_api.c:72
Handle to a lookup request.
Definition: gns_tld_api.c:45