GNUnet 0.21.1
GNS service

GNU Name System. More...

Collaboration diagram for GNS service:

Typedefs

typedef 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. More...
 
typedef 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. More...
 

Enumerations

enum  GNUNET_GNS_LocalOptions { GNUNET_GNS_LO_DEFAULT = 0 , GNUNET_GNS_LO_NO_DHT = 1 , GNUNET_GNS_LO_LOCAL_MASTER = 2 }
 Options for the GNS lookup. More...
 

Functions

struct GNUNET_GNS_HandleGNUNET_GNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Initialize the connection with the GNS service. More...
 
void GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle)
 Shutdown connection with the GNS service. More...
 
struct GNUNET_GNS_LookupRequestGNUNET_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. More...
 
struct GNUNET_GNS_LookupRequestGNUNET_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. More...
 
void * GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr)
 Cancel pending lookup request. More...
 
struct GNUNET_GNS_LookupWithTldRequestGNUNET_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 name and the current configuration to resolve TLDs to zones. More...
 
void * GNUNET_GNS_lookup_with_tld_cancel (struct GNUNET_GNS_LookupWithTldRequest *ltr)
 Cancel pending lookup request. More...
 

Detailed Description

GNU Name System.

See also
Documentation

Typedef Documentation

◆ GNUNET_GNS_LookupResultProcessor

typedef 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.

Parameters
clsclosure
rd_countnumber of records in rd
rdthe records in reply

Definition at line 96 of file gnunet_gns_service.h.

◆ GNUNET_GNS_LookupResultProcessor2

typedef 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.

Parameters
clsclosure
gns_tldGNUNET_YES if a GNS lookup was attempted, GNUNET_NO if the TLD is not configured for GNS
rd_countnumber of records in rd
rdthe records in the reply

Definition at line 192 of file gnunet_gns_service.h.

Enumeration Type Documentation

◆ GNUNET_GNS_LocalOptions

Options for the GNS lookup.

Enumerator
GNUNET_GNS_LO_DEFAULT 

Defaults, look in cache, then in DHT.

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, the DHT is OK.

Definition at line 105 of file gnunet_gns_service.h.

106{
111
116
122};
@ 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.

Function Documentation

◆ GNUNET_GNS_connect()

struct GNUNET_GNS_Handle * GNUNET_GNS_connect ( const struct GNUNET_CONFIGURATION_Handle cfg)

Initialize the connection with the GNS service.

Parameters
cfgconfiguration to use
Returns
handle to the GNS service, or NULL on error

Definition at line 267 of file gns_api.c.

268{
270
272 handle->cfg = cfg;
274 if (NULL == handle->mq)
275 {
277 return NULL;
278 }
279 return handle;
280}
static void reconnect(struct GNUNET_GNS_Handle *handle)
Reconnect to GNS service.
Definition: gns_api.c:232
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:109
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
Definition: gnunet-vpn.c:35
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
Connection to the GNS service.
Definition: gns_api.h:36
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we use.
Definition: vpn_api.c:39
struct GNUNET_MQ_Handle * mq
Connection to VPN service.
Definition: vpn_api.c:44

References cfg, GNUNET_VPN_Handle::cfg, GNUNET_free, GNUNET_new, handle, GNUNET_VPN_Handle::mq, and reconnect().

Referenced by GNUNET_CONVERSATION_call_start(), RECLAIM_TICKETS_init(), REST_gns_init(), REST_openid_init(), and run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_GNS_disconnect()

void GNUNET_GNS_disconnect ( struct GNUNET_GNS_Handle handle)

Shutdown connection with the GNS service.

Parameters
handleconnection to shut down
handlehandle of the GNS connection to stop

Definition at line 289 of file gns_api.c.

290{
291 if (NULL != handle->mq)
292 {
294 handle->mq = NULL;
295 }
296 if (NULL != handle->reconnect_task)
297 {
298 GNUNET_SCHEDULER_cancel (handle->reconnect_task);
299 handle->reconnect_task = NULL;
300 }
301 GNUNET_assert (NULL == handle->lookup_head);
303}
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:683
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:981

References GNUNET_assert, GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_cancel(), handle, and GNUNET_VPN_Handle::mq.

Referenced by cleanup(), do_shutdown(), GNUNET_CONVERSATION_call_stop(), RECLAIM_TICKETS_deinit(), REST_gns_done(), REST_openid_done(), run(), and shutdown_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_GNS_lookup()

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.

Parameters
handlehandle to the GNS service
namethe name to look up (in UTF-8 encoding)
zonezone to look in
typethe GNS record type to look for
optionslocal options for the lookup
procfunction to call on result
proc_clsclosure for proc
Returns
handle to the queued request
Parameters
handlehandle to the GNS service
namethe name to look up (in UTF-8 encoding)
zonethe zone to start the resolution in
typethe record type to look up
optionslocal options for the lookup
procprocessor to call on result
proc_clsclosure for proc
Returns
handle to the get request

Definition at line 421 of file gns_api.c.

428{
430 name,
431 zone,
432 type,
433 options,
435 proc,
436 proc_cls);
437}
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
#define DEFAULT_LIMIT
Default recursion depth limit to apply if the application does not specify any.
Definition: gns_api.c:42
static char * name
Name (label) of the records to list.
static uint32_t type
Type string converted to DNS type value.
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

References DEFAULT_LIMIT, GNUNET_GNS_lookup_limited(), handle, name, options, GNUNET_GNS_LookupRequest::proc_cls, and type.

Referenced by backward_resolution(), client_redirect(), delegation_chain_bw_resolution_start(), delegation_chain_fw_resolution_start(), DID_resolve(), forward_resolution(), lookup_authz_cb(), lookup_with_public_key(), and RECLAIM_TICKETS_consume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_GNS_lookup_limited()

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.

Parameters
handlehandle to the GNS service
namethe name to look up (in UTF-8 encoding)
zonezone to look in
typethe GNS record type to look for
optionslocal options for the lookup
recursion_depth_limitmaximum number of zones that the lookup may (still) traverse
procfunction to call on result
proc_clsclosure for proc
Returns
handle to the queued request

Definition at line 343 of file gns_api.c.

351{
352 /* IPC to shorten gns names, return shorten_handle */
353 struct LookupMessage *lookup_msg;
355 size_t nlen;
356 size_t key_len;
357 ssize_t written;
358 char *buf;
359
360 if (NULL == name)
361 {
362 GNUNET_break (0);
363 return NULL;
364 }
366 "Trying to lookup `%s' in GNS\n",
367 name);
368 nlen = strlen (name) + 1;
369 if (nlen >= GNUNET_MAX_MESSAGE_SIZE - sizeof(*lr))
370 {
371 GNUNET_break (0);
372 return NULL;
373 }
376 lr->lookup_proc = proc;
377 lr->proc_cls = proc_cls;
378 lr->r_id = handle->r_id_gen++;
380 lr->env = GNUNET_MQ_msg_extra (lookup_msg,
381 nlen + key_len,
383 buf = (char *) &lookup_msg[1];
384 lookup_msg->id = htonl (lr->r_id);
385 lookup_msg->options = htons ((uint16_t) options);
386 lookup_msg->recursion_depth_limit
387 = htons (recursion_depth_limit);
388 lookup_msg->key_len = htonl (key_len);
390 buf,
391 key_len);
392 GNUNET_assert (0 <= written);
393 buf += written;
394 lookup_msg->type = htonl (type);
395 GNUNET_memcpy (buf,
396 name,
397 nlen);
399 handle->lookup_tail,
400 lr);
401 if (NULL != handle->mq)
403 lr->env);
404 return lr;
405}
#define LOG(kind,...)
Definition: gns_api.c:36
static struct GNUNET_GNS_LookupWithTldRequest * lr
Handle to lookup request.
Definition: gnunet-gns.c:98
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message,...
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
ssize_t GNUNET_CRYPTO_public_key_get_length(const struct GNUNET_CRYPTO_PublicKey *key)
Get the compacted length of a GNUNET_CRYPTO_PublicKey.
Definition: crypto_pkey.c:68
ssize_t GNUNET_CRYPTO_write_public_key_to_buffer(const struct GNUNET_CRYPTO_PublicKey *key, void *buffer, size_t len)
Writes a GNUNET_CRYPTO_PublicKey to a compact buffer.
Definition: crypto_pkey.c:128
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_DEBUG
void GNUNET_MQ_send_copy(struct GNUNET_MQ_Handle *mq, const struct GNUNET_MQ_Envelope *ev)
Send a copy of a message with the given message queue.
Definition: mq.c:370
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct.
Definition: gnunet_mq_lib.h:63
#define GNUNET_MESSAGE_TYPE_GNS_LOOKUP
Client would like to resolve a name.
Handle to a lookup request.
Definition: gns_api.c:48
void * proc_cls
lookup_proc closure
Definition: gns_api.c:72
GNUNET_GNS_LookupResultProcessor2 lookup_proc
processor to call on lookup result
Definition: gns_tld_api.c:53
struct GNUNET_GNS_Handle * gns_handle
handle to gns
Definition: gns_tld_api.c:48
Message from client to GNS service to lookup records.
Definition: gns.h:37
int16_t options
Local options for where to look for results (an enum GNUNET_GNS_LocalOptions in NBO).
Definition: gns.h:52
uint32_t id
Unique identifier for this request (for key collisions).
Definition: gns.h:46
uint32_t key_len
Length of the zone key.
Definition: gns.h:69
uint16_t recursion_depth_limit
Recursion depth limit, i.e.
Definition: gns.h:59
int32_t type
the type of record to look up
Definition: gns.h:64

References GNUNET_GNS_LookupWithTldRequest::gns_handle, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_DLL_insert, GNUNET_CRYPTO_public_key_get_length(), GNUNET_CRYPTO_write_public_key_to_buffer(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_MAX_MESSAGE_SIZE, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_GNS_LOOKUP, GNUNET_MQ_msg_extra, GNUNET_MQ_send_copy(), GNUNET_new, handle, LookupMessage::id, LookupMessage::key_len, LOG, GNUNET_GNS_LookupWithTldRequest::lookup_proc, lr, GNUNET_VPN_Handle::mq, name, options, LookupMessage::options, GNUNET_GNS_LookupRequest::proc_cls, LookupMessage::recursion_depth_limit, type, and LookupMessage::type.

Referenced by GNUNET_GNS_lookup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_GNS_lookup_cancel()

void * GNUNET_GNS_lookup_cancel ( struct GNUNET_GNS_LookupRequest lr)

Cancel pending lookup request.

Parameters
lrthe lookup request to cancel
Returns
closure from the lookup result processor

Definition at line 313 of file gns_api.c.

314{
316 void *ret;
317
319 handle->lookup_tail,
320 lr);
321 GNUNET_MQ_discard (lr->env);
322 ret = lr->proc_cls;
323 GNUNET_free (lr);
324 return ret;
325}
static int ret
Final status code.
Definition: gnunet-arm.c:94
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
void GNUNET_MQ_discard(struct GNUNET_MQ_Envelope *mqm)
Discard the message queue message, free all allocated resources.
Definition: mq.c:285

References GNUNET_GNS_LookupWithTldRequest::gns_handle, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MQ_discard(), handle, lr, and ret.

Referenced by abort_parallel_lookups(), cleanup_cth(), cleanup_dsq_entry(), cleanup_handle(), and GNUNET_GNS_lookup_with_tld_cancel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_GNS_lookup_with_tld()

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 name and the current configuration to resolve TLDs to zones.

Parameters
handlehandle to the GNS service
namethe name to look up, including TLD (in UTF-8 encoding)
typethe record type to look up
optionslocal options for the lookup
procprocessor to call on result
proc_clsclosure for proc
Returns
handle to the get request
Parameters
handlehandle to the GNS service
namethe name to look up, including TLD (in UTF-8 encoding)
typethe record type to look up
optionslocal options for the lookup
procprocessor to call on result
proc_clsclosure for proc
Returns
handle to the get request, NULL on error (e.g. bad configuration)

Definition at line 240 of file gns_tld_api.c.

246{
248 const char *tld;
249 char *dot_tld;
250 char *zonestr;
252
254 ltr->gns_handle = handle;
255 ltr->name = GNUNET_strdup (name);
256 ltr->type = type;
257 ltr->options = options;
258 ltr->lookup_proc = proc;
259 ltr->lookup_proc_cls = proc_cls;
260 /* start with trivial case: TLD is zkey */
261 tld = get_tld (ltr->name);
262 if (GNUNET_OK ==
264 {
266 "`%s' seems to be a valid zone key\n", tld);
267 eat_tld (ltr->name, tld);
269 return ltr;
270 }
271
272 /* second case: domain is mapped in our configuration file */
273 for (const char *domain = name; NULL != domain;
274 domain = strchr (domain, (unsigned char) '.'))
275 {
276 if ('.' == domain[0])
277 domain++;
278 GNUNET_asprintf (&dot_tld, ".%s", domain);
280 "gns",
281 dot_tld,
282 &zonestr))
283 {
284 if (GNUNET_OK !=
286 &pkey))
287 {
290 "gns",
291 dot_tld,
292 _ ("Expected a base32-encoded public zone key\n"));
293 GNUNET_free (zonestr);
294 GNUNET_free (dot_tld);
295 GNUNET_free (ltr->name);
296 GNUNET_free (ltr);
297 return NULL;
298 }
299 eat_tld (ltr->name, &dot_tld[1]);
300 GNUNET_free (zonestr);
301 GNUNET_free (dot_tld);
303 return ltr;
304 }
305 GNUNET_free (dot_tld);
306 }
308 "`%s' should be a valid ego\n", ltr->name);
309 ltr->id_co =
311 ltr->name,
313 ltr);
314 if (NULL == ltr->id_co)
315 {
316 GNUNET_free (ltr->name);
317 GNUNET_free (ltr);
318 return NULL;
319 }
320 return ltr;
321}
static void lookup_with_public_key(struct GNUNET_GNS_LookupWithTldRequest *ltr, const struct GNUNET_CRYPTO_PublicKey *pkey)
Perform the actual resolution, starting with the zone identified by the given public key.
Definition: gns_tld_api.c:168
static const char * get_tld(const char *name)
Obtain the TLD of the given name.
Definition: gns_tld_api.c:106
#define LOG(kind,...)
Definition: gns_tld_api.c:37
static void identity_zone_cb(void *cls, const struct GNUNET_CRYPTO_PrivateKey *priv, const char *ego_name)
Method called to with the ego we are to use for the lookup, when the ego is determined by a name.
Definition: gns_tld_api.c:191
static void eat_tld(char *name, const char *tld)
Eat the "TLD" (last bit) of the given name.
Definition: gns_tld_api.c:126
static char * pkey
Public key of the zone to look in, in ASCII.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_string(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be a string.
struct GNUNET_IDENTITY_EgoSuffixLookup * GNUNET_IDENTITY_ego_lookup_by_suffix(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *suffix, GNUNET_IDENTITY_EgoSuffixCallback cb, void *cb_cls)
Obtain the ego with the maximum suffix match between the ego's name and the given domain name suffix.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_public_key_from_string(const char *str, struct GNUNET_CRYPTO_PublicKey *key)
Parses a (Base32) string representation of the public key.
Definition: crypto_pkey.c:571
@ GNUNET_OK
void GNUNET_log_config_invalid(enum GNUNET_ErrorType kind, const char *section, const char *option, const char *required)
Log error message about invalid configuration option value.
@ GNUNET_ERROR_TYPE_ERROR
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define _(String)
GNU gettext support macro.
Definition: platform.h:178
An identity key as per LSD0001.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: gns_api.h:40
Handle to a lookup request.
Definition: gns_tld_api.c:44
enum GNUNET_GNS_LocalOptions options
Lookup options.
Definition: gns_tld_api.c:94
uint32_t type
Desired result record type.
Definition: gns_tld_api.c:89
char * name
Domain name we are resolving.
Definition: gns_tld_api.c:58
void * lookup_proc_cls
lookup_proc closure
Definition: gns_tld_api.c:63
struct GNUNET_IDENTITY_EgoSuffixLookup * id_co
Lookup an ego with the identity service.
Definition: gns_tld_api.c:73

References _, GNUNET_GNS_Handle::cfg, GNUNET_VPN_Handle::cfg, eat_tld(), get_tld(), GNUNET_GNS_LookupWithTldRequest::gns_handle, GNUNET_asprintf(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CRYPTO_public_key_from_string(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_IDENTITY_ego_lookup_by_suffix(), GNUNET_log_config_invalid(), GNUNET_new, GNUNET_OK, GNUNET_strdup, handle, GNUNET_GNS_LookupWithTldRequest::id_co, identity_zone_cb(), LOG, GNUNET_GNS_LookupWithTldRequest::lookup_proc, GNUNET_GNS_LookupWithTldRequest::lookup_proc_cls, lookup_with_public_key(), name, GNUNET_GNS_LookupWithTldRequest::name, options, GNUNET_GNS_LookupWithTldRequest::options, pkey, type, and GNUNET_GNS_LookupWithTldRequest::type.

Referenced by do_s5r_read(), get_gns_cont(), GNUNET_CONVERSATION_call_start(), handle_request(), process_queue(), and run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_GNS_lookup_with_tld_cancel()

void * GNUNET_GNS_lookup_with_tld_cancel ( struct GNUNET_GNS_LookupWithTldRequest ltr)

Cancel pending lookup request.

Parameters
ltrthe lookup request to cancel
Returns
closure from the lookup result processor

Definition at line 331 of file gns_tld_api.c.

332{
333 void *ret = ltr->lookup_proc_cls;
334
335 if (NULL != ltr->id_co)
336 {
338 ltr->id_co = NULL;
339 }
340 if (NULL != ltr->lr)
341 {
343 ltr->lr = NULL;
344 }
346 GNUNET_free (ltr->name);
347 GNUNET_free (ltr);
348 return ret;
349}
void * GNUNET_GNS_lookup_cancel(struct GNUNET_GNS_LookupRequest *lr)
Cancel pending lookup request.
Definition: gns_api.c:313
void GNUNET_IDENTITY_ego_lookup_by_suffix_cancel(struct GNUNET_IDENTITY_EgoSuffixLookup *el)
Abort ego suffix lookup attempt.
struct GNUNET_GNS_LookupRequest * lr
Underlying GNS lookup.
Definition: gns_tld_api.c:68
char * longest_match
Name of the longest matching ego found so far.
Definition: gns_tld_api.c:79

References GNUNET_free, GNUNET_GNS_lookup_cancel(), GNUNET_IDENTITY_ego_lookup_by_suffix_cancel(), GNUNET_GNS_LookupWithTldRequest::id_co, GNUNET_GNS_LookupWithTldRequest::longest_match, GNUNET_GNS_LookupWithTldRequest::lookup_proc_cls, GNUNET_GNS_LookupWithTldRequest::lr, GNUNET_GNS_LookupWithTldRequest::name, and ret.

Referenced by cleanup_handle(), cleanup_s5r(), do_shutdown(), do_timeout(), free_request(), GNUNET_CONVERSATION_call_stop(), and process_lookup_result().

Here is the call graph for this function:
Here is the caller graph for this function: