GNUnet  0.11.x
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 
34 #ifndef GNUNET_GNS_SERVICE_H
35 #define GNUNET_GNS_SERVICE_H
36 
37 #include "gnunet_util_lib.h"
38 #include "gnunet_dnsparser_lib.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #if 0 /* keep Emacsens' auto-indent happy */
44 }
45 #endif
46 #endif
47 
48 
53 #define GNUNET_GNS_EMPTY_LABEL_AT "@"
54 
58 struct GNUNET_GNS_Handle;
59 
64 
70 
71 
78 struct GNUNET_GNS_Handle *
80 
81 
87 void
89 
90 
99  void *cls,
100  uint32_t rd_count,
101  const struct GNUNET_GNSRECORD_Data *rd);
102 
103 
108 {
113 
118 
124 };
125 
126 
141  const char *name,
142  const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
143  uint32_t type,
146  void *proc_cls);
147 
148 
165  const char *name,
166  const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
167  uint32_t type,
169  uint16_t recursion_depth_limit,
171  void *proc_cls);
172 
173 
180 void *
182 
183 
195  void *cls,
196  int gns_tld,
197  uint32_t rd_count,
198  const struct GNUNET_GNSRECORD_Data *rd);
199 
200 
216  const char *name,
217  uint32_t type,
220  void *proc_cls);
221 
222 
229 void *
231 
232 
233 #if 0 /* keep Emacsens' auto-indent happy */
234 {
235 #endif
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #endif
241  /* end of group */
Connection to the GNS service.
Definition: gns_api.h:35
For the rightmost label, only look in the cache (it is our local namestore), for the others...
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
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.
static struct GNUNET_GNS_LookupWithTldRequest * lr
Handle to lookup request.
Definition: gnunet-gns.c:99
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
void * GNUNET_GNS_lookup_with_tld_cancel(struct GNUNET_GNS_LookupWithTldRequest *ltr)
Cancel pending lookup request.
Definition: gns_tld_api.c:329
Handle to a lookup request.
Definition: gns_api.c:48
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:241
GNUNET_GNS_LocalOptions
Options for the GNS lookup.
static char * zone
Name of the zone we manage.
void GNUNET_GNS_disconnect(struct GNUNET_GNS_Handle *handle)
Shutdown connection with the GNS service.
Definition: gns_api.c:290
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
struct GNUNET_GNS_Handle * GNUNET_GNS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize the connection with the GNS service.
Definition: gns_api.c:268
Never look in the DHT, keep request to local cache.
configuration data
Definition: configuration.c:84
struct GNUNET_GNS_LookupRequest * GNUNET_GNS_lookup_limited(struct GNUNET_GNS_Handle *handle, const char *name, const struct GNUNET_CRYPTO_EcdsaPublicKey *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:344
const char * name
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
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_lookup_cancel(struct GNUNET_GNS_LookupRequest *lr)
Cancel pending lookup request.
Definition: gns_api.c:314
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Defaults, look in cache, then in DHT.
struct GNUNET_GNS_LookupRequest * GNUNET_GNS_lookup(struct GNUNET_GNS_Handle *handle, const char *name, const struct GNUNET_CRYPTO_EcdsaPublicKey *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:412
Handle to a lookup request.
Definition: gns_tld_api.c:44
void * proc_cls
lookup_proc closure
Definition: gns_api.c:73