GNUnet  0.11.x
Macros | Typedefs | Enumerations | Functions
GNS service

GNU Name System. More...

Macros

#define GNUNET_GNS_EMPTY_LABEL_AT   "@"
 String we use to indicate an empty label (top-level entry in the zone). More...
 

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_IDENTITY_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_IDENTITY_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

Macro Definition Documentation

◆ GNUNET_GNS_EMPTY_LABEL_AT

#define GNUNET_GNS_EMPTY_LABEL_AT   "@"

String we use to indicate an empty label (top-level entry in the zone).

DNS uses "@", so do we.

Definition at line 54 of file gnunet_gns_service.h.

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 99 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 195 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 108 of file gnunet_gns_service.h.

109 {
114 
119 
125 };
@ 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 268 of file gns_api.c.

269 {
270  struct GNUNET_GNS_Handle *handle;
271 
273  handle->cfg = cfg;
274  reconnect (handle);
275  if (NULL == handle->mq)
276  {
278  return NULL;
279  }
280  return handle;
281 }
static void reconnect(struct GNUNET_GNS_Handle *handle)
Reconnect to GNS service.
Definition: gns_api.c:233
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: dns_api.c:66
struct GNUNET_MQ_Handle * mq
Connection to DNS service, or NULL.
Definition: dns_api.c:61
Connection to the GNS service.
Definition: gns_api.h:36

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

Referenced by GNUNET_CONVERSATION_call_start(), libgnunet_plugin_rest_gns_init(), libgnunet_plugin_rest_openid_connect_init(), RECLAIM_TICKETS_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 290 of file gns_api.c.

291 {
292  if (NULL != handle->mq)
293  {
295  handle->mq = NULL;
296  }
297  if (NULL != handle->reconnect_task)
298  {
300  handle->reconnect_task = NULL;
301  }
302  GNUNET_assert (NULL == handle->lookup_head);
304 }
#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:837
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:972
struct GNUNET_SCHEDULER_Task * reconnect_task
Task to reconnect to the service.
Definition: dns_api.c:81

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

Referenced by do_shutdown(), GNUNET_CONVERSATION_call_stop(), libgnunet_plugin_rest_gns_done(), libgnunet_plugin_rest_openid_connect_done(), RECLAIM_TICKETS_deinit(), 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_IDENTITY_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 412 of file gns_api.c.

419 {
421  name,
422  zone,
423  type,
424  options,
426  proc,
427  proc_cls);
428 }
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:43
static char * zone
Name of the zone being managed.
struct GNUNET_GNS_LookupRequest * GNUNET_GNS_lookup_limited(struct GNUNET_GNS_Handle *handle, const char *name, const struct GNUNET_IDENTITY_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:344
const char * name
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model

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

Referenced by backward_resolution(), client_redirect(), delegation_chain_bw_resolution_start(), delegation_chain_fw_resolution_start(), 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_IDENTITY_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 344 of file gns_api.c.

352 {
353  /* IPC to shorten gns names, return shorten_handle */
354  struct LookupMessage *lookup_msg;
356  size_t nlen;
357 
358  if (NULL == name)
359  {
360  GNUNET_break (0);
361  return NULL;
362  }
364  "Trying to lookup `%s' in GNS\n",
365  name);
366  nlen = strlen (name) + 1;
367  if (nlen >= GNUNET_MAX_MESSAGE_SIZE - sizeof(*lr))
368  {
369  GNUNET_break (0);
370  return NULL;
371  }
373  lr->gns_handle = handle;
374  lr->lookup_proc = proc;
375  lr->proc_cls = proc_cls;
376  lr->r_id = handle->r_id_gen++;
377  lr->env = GNUNET_MQ_msg_extra (lookup_msg,
378  nlen,
380  lookup_msg->id = htonl (lr->r_id);
381  lookup_msg->options = htons ((uint16_t) options);
382  lookup_msg->recursion_depth_limit
383  = htons (recursion_depth_limit);
384  lookup_msg->zone = *zone;
385  lookup_msg->type = htonl (type);
386  GNUNET_memcpy (&lookup_msg[1],
387  name,
388  nlen);
389  GNUNET_CONTAINER_DLL_insert (handle->lookup_head,
390  handle->lookup_tail,
391  lr);
392  if (NULL != handle->mq)
394  lr->env);
395  return lr;
396 }
#define LOG(kind,...)
Definition: gns_api.c:37
static struct GNUNET_GNS_LookupWithTldRequest * lr
Handle to lookup request.
Definition: gnunet-gns.c:99
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#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.
#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:443
#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:52
#define GNUNET_MESSAGE_TYPE_GNS_LOOKUP
Client would like to resolve a name.
Handle to a lookup request.
Definition: gns_api.c:49
void * proc_cls
lookup_proc closure
Definition: gns_api.c:73
GNUNET_GNS_LookupResultProcessor2 lookup_proc
processor to call on lookup result
Definition: gns_tld_api.c:54
struct GNUNET_GNS_Handle * gns_handle
handle to gns
Definition: gns_tld_api.c:49
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:57
uint32_t id
Unique identifier for this request (for key collisions).
Definition: gns.h:46
uint16_t recursion_depth_limit
Recursion depth limit, i.e.
Definition: gns.h:64
int32_t type
the type of record to look up
Definition: gns.h:69
struct GNUNET_IDENTITY_PublicKey zone
Zone that is to be used for lookup.
Definition: gns.h:51

References GNUNET_GNS_LookupWithTldRequest::gns_handle, GNUNET_break, GNUNET_CONTAINER_DLL_insert, 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, LOG, GNUNET_GNS_LookupWithTldRequest::lookup_proc, lr, GNUNET_DNS_Handle::mq, name, options, LookupMessage::options, GNUNET_GNS_LookupRequest::proc_cls, LookupMessage::recursion_depth_limit, LookupMessage::type, type, LookupMessage::zone, and zone.

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 314 of file gns_api.c.

315 {
317  void *ret;
318 
319  GNUNET_CONTAINER_DLL_remove (handle->lookup_head,
320  handle->lookup_tail,
321  lr);
322  GNUNET_MQ_discard (lr->env);
323  ret = lr->proc_cls;
324  GNUNET_free (lr);
325  return ret;
326 }
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
#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:323

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 241 of file gns_tld_api.c.

247 {
249  const char *tld;
250  char *dot_tld;
251  char *zonestr;
253 
255  ltr->gns_handle = handle;
256  ltr->name = GNUNET_strdup (name);
257  ltr->type = type;
258  ltr->options = options;
259  ltr->lookup_proc = proc;
260  ltr->lookup_proc_cls = proc_cls;
261  /* start with trivial case: TLD is zkey */
262  tld = get_tld (ltr->name);
263  if (GNUNET_OK ==
265  {
267  "`%s' seems to be a valid zone key\n", tld);
268  eat_tld (ltr->name, tld);
270  return ltr;
271  }
272 
273  /* second case: domain is mapped in our configuration file */
274  for (const char *domain = name; NULL != domain;
275  domain = strchr (domain, (unsigned char) '.'))
276  {
277  if ('.' == domain[0])
278  domain++;
279  GNUNET_asprintf (&dot_tld, ".%s", domain);
281  "gns",
282  dot_tld,
283  &zonestr))
284  {
285  if (GNUNET_OK !=
287  &pkey))
288  {
291  "gns",
292  dot_tld,
293  _ ("Expected a base32-encoded public zone key\n"));
294  GNUNET_free (zonestr);
295  GNUNET_free (dot_tld);
296  GNUNET_free (ltr->name);
297  GNUNET_free (ltr);
298  return NULL;
299  }
300  eat_tld (ltr->name, &dot_tld[1]);
301  GNUNET_free (zonestr);
302  GNUNET_free (dot_tld);
304  return ltr;
305  }
306  GNUNET_free (dot_tld);
307  }
309  "`%s' should be a valid ego\n", ltr->name);
310  ltr->id_co =
312  ltr->name,
314  ltr);
315  if (NULL == ltr->id_co)
316  {
317  GNUNET_free (ltr->name);
318  GNUNET_free (ltr);
319  return NULL;
320  }
321  return ltr;
322 }
static void identity_zone_cb(void *cls, const struct GNUNET_IDENTITY_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:192
static void lookup_with_public_key(struct GNUNET_GNS_LookupWithTldRequest *ltr, const struct GNUNET_IDENTITY_PublicKey *pkey)
Perform the actual resolution, starting with the zone identified by the given public key.
Definition: gns_tld_api.c:169
#define LOG(kind,...)
Definition: gns_tld_api.c:38
static const char * get_tld(const char *name)
Obtain the TLD of the given name.
Definition: gns_tld_api.c:107
static void eat_tld(char *name, const char *tld)
Eat the "TLD" (last bit) of the given name.
Definition: gns_tld_api.c:127
static char * pkey
Public key of the zone to look in, in ASCII.
@ GNUNET_OK
Definition: gnunet_common.h:95
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.
enum GNUNET_GenericReturnValue GNUNET_IDENTITY_public_key_from_string(const char *str, struct GNUNET_IDENTITY_PublicKey *key)
Parses a (Base32) string representation of the public key.
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)
Lookup an ego by name.
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:177
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: gns_api.h:40
Handle to a lookup request.
Definition: gns_tld_api.c:45
enum GNUNET_GNS_LocalOptions options
Lookup options.
Definition: gns_tld_api.c:95
uint32_t type
Desired result record type.
Definition: gns_tld_api.c:90
char * name
Domain name we are resolving.
Definition: gns_tld_api.c:59
void * lookup_proc_cls
lookup_proc closure
Definition: gns_tld_api.c:64
struct GNUNET_IDENTITY_EgoSuffixLookup * id_co
Lookup an ego with the identity service.
Definition: gns_tld_api.c:74
An identity key as per LSD0001.

References _, GNUNET_DNS_Handle::cfg, GNUNET_GNS_Handle::cfg, eat_tld(), get_tld(), GNUNET_GNS_LookupWithTldRequest::gns_handle, GNUNET_asprintf(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_IDENTITY_ego_lookup_by_suffix(), GNUNET_IDENTITY_public_key_from_string(), 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, GNUNET_GNS_LookupWithTldRequest::type, and 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 332 of file gns_tld_api.c.

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

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: