GNUnet  0.10.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_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. 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 53 of file gnunet_gns_service.h.

Referenced by client_redirect(), display_record(), eat_tld(), get_nick_record(), GNUNET_NAMESTORE_set_nick(), handle_gns_resolution_result(), handle_record_store(), identity_zone_cb(), lookup_it(), lookup_nick_it(), send_lookup_response(), and start_resolver_lookup().

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 98 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 170 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 107 of file gnunet_gns_service.h.

108 {
113 
118 
124 
125 };
For the rightmost label, only look in the cache (it is our local namestore), for the others...
Never look in the DHT, keep request to local cache.
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 263 of file gns_api.c.

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

Referenced by GNUNET_CONVERSATION_call_start(), RECLAIM_TICKETS_init(), rest_identity_process_request(), rest_process_request(), and run().

264 {
265  struct GNUNET_GNS_Handle *handle;
266 
267  handle = GNUNET_new (struct GNUNET_GNS_Handle);
268  handle->cfg = cfg;
269  reconnect (handle);
270  if (NULL == handle->mq)
271  {
272  GNUNET_free (handle);
273  return NULL;
274  }
275  return handle;
276 }
Connection to the GNS service.
Definition: gns_api.h:35
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: gns_api.h:41
#define GNUNET_new(type)
Allocate a struct or union of the given type.
struct GNUNET_MQ_Handle * mq
Connection to service (if available).
Definition: gns_api.h:46
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
static void reconnect(struct GNUNET_GNS_Handle *handle)
Reconnect to GNS service.
Definition: gns_api.c:228
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
#define GNUNET_free(ptr)
Wrapper around free.
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 285 of file gns_api.c.

References GNUNET_assert, GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_cancel(), GNUNET_GNS_Handle::lookup_head, GNUNET_GNS_Handle::mq, and GNUNET_GNS_Handle::reconnect_task.

Referenced by cleanup_handle(), do_shutdown(), GNUNET_CONVERSATION_call_stop(), RECLAIM_TICKETS_deinit(), run(), and shutdown_task().

286 {
287  if (NULL != handle->mq)
288  {
289  GNUNET_MQ_destroy (handle->mq);
290  handle->mq = NULL;
291  }
292  if (NULL != handle->reconnect_task)
293  {
295  handle->reconnect_task = NULL;
296  }
297  GNUNET_assert (NULL == handle->lookup_head);
298  GNUNET_free (handle);
299 }
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_MQ_Handle * mq
Connection to service (if available).
Definition: gns_api.h:46
struct GNUNET_GNS_LookupRequest * lookup_head
Head of linked list of active lookup requests.
Definition: gns_api.h:51
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:824
struct GNUNET_SCHEDULER_Task * reconnect_task
Reconnect task.
Definition: gns_api.h:61
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:965
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_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.

Parameters
handlehandle to the GNS service
namethe name to look up
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
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 337 of file gns_api.c.

References GNUNET_GNS_LookupRequest::env, GNUNET_GNS_LookupRequest::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_Handle::lookup_head, GNUNET_GNS_LookupRequest::lookup_proc, GNUNET_GNS_Handle::lookup_tail, lr, GNUNET_GNS_Handle::mq, LookupMessage::options, GNUNET_GNS_LookupRequest::proc_cls, GNUNET_GNS_LookupRequest::r_id, GNUNET_GNS_Handle::r_id_gen, LookupMessage::type, LookupMessage::zone, and zone.

Referenced by backward_resolution(), client_redirect(), delegation_chain_resolution_start(), get_ip_from_hostname(), lookup_authz_cb(), lookup_with_public_key(), and RECLAIM_TICKETS_consume().

344 {
345  /* IPC to shorten gns names, return shorten_handle */
346  struct LookupMessage *lookup_msg;
348  size_t nlen;
349 
350  if (NULL == name)
351  {
352  GNUNET_break (0);
353  return NULL;
354  }
356  "Trying to lookup `%s' in GNS\n",
357  name);
358  nlen = strlen (name) + 1;
359  if (nlen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (*lr))
360  {
361  GNUNET_break (0);
362  return NULL;
363  }
364  lr = GNUNET_new (struct GNUNET_GNS_LookupRequest);
365  lr->gns_handle = handle;
366  lr->lookup_proc = proc;
367  lr->proc_cls = proc_cls;
368  lr->r_id = handle->r_id_gen++;
369  lr->env = GNUNET_MQ_msg_extra (lookup_msg,
370  nlen,
372  lookup_msg->id = htonl (lr->r_id);
373  lookup_msg->options = htons ((uint16_t) options);
374  lookup_msg->zone = *zone;
375  lookup_msg->type = htonl (type);
376  GNUNET_memcpy (&lookup_msg[1],
377  name,
378  nlen);
380  handle->lookup_tail,
381  lr);
382  if (NULL != handle->mq)
383  GNUNET_MQ_send_copy (handle->mq,
384  lr->env);
385  return lr;
386 }
uint32_t r_id
request id
Definition: gns_api.c:78
Message from client to GNS service to lookup records.
Definition: gns.h:36
uint32_t id
Unique identifier for this request (for key collisions).
Definition: gns.h:46
struct GNUNET_GNS_Handle * gns_handle
handle to gns
Definition: gns_api.c:58
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
static struct GNUNET_GNS_LookupWithTldRequest * lr
Handle to lookup request.
Definition: gnunet-gns.c:75
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
struct GNUNET_CRYPTO_EcdsaPublicKey zone
Zone that is to be used for lookup.
Definition: gns.h:51
#define GNUNET_MESSAGE_TYPE_GNS_LOOKUP
Client would like to resolve a name.
Handle to a lookup request.
Definition: gns_api.c:42
int32_t type
the type of record to look up
Definition: gns.h:67
#define GNUNET_new(type)
Allocate a struct or union of the given type.
GNUNET_GNS_LookupResultProcessor lookup_proc
processor to call on lookup result
Definition: gns_api.c:63
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
static char * zone
Name of the zone we manage.
#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_memcpy(dst, src, n)
struct GNUNET_MQ_Handle * mq
Connection to service (if available).
Definition: gns_api.h:46
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
struct GNUNET_GNS_LookupRequest * lookup_tail
Tail of linked list of active lookup requests.
Definition: gns_api.h:56
int16_t options
Local options for where to look for results (an enum GNUNET_GNS_LocalOptions in NBO).
Definition: gns.h:57
struct GNUNET_MQ_Envelope * env
Envelope with the message for this queue entry.
Definition: gns_api.c:73
const char * name
struct GNUNET_GNS_LookupRequest * lookup_head
Head of linked list of active lookup requests.
Definition: gns_api.h:51
#define LOG(kind,...)
Definition: gns_api.c:37
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message...
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:432
uint32_t r_id_gen
Request Id generator.
Definition: gns_api.h:71
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void * proc_cls
lookup_proc closure
Definition: gns_api.c:68
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 309 of file gns_api.c.

References GNUNET_GNS_LookupRequest::env, GNUNET_GNS_LookupRequest::gns_handle, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MQ_discard(), handle, GNUNET_GNS_Handle::lookup_head, GNUNET_GNS_Handle::lookup_tail, GNUNET_GNS_LookupRequest::proc_cls, and ret.

Referenced by abort_parallel_lookups(), cleanup_cth(), cleanup_delegation_set(), cleanup_handle(), do_shutdown(), and GNUNET_GNS_lookup_with_tld_cancel().

310 {
311  struct GNUNET_GNS_Handle *handle = lr->gns_handle;
312  void *ret;
313 
315  handle->lookup_tail,
316  lr);
317  GNUNET_MQ_discard (lr->env);
318  ret = lr->proc_cls;
319  GNUNET_free (lr);
320  return ret;
321 }
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
Connection to the GNS service.
Definition: gns_api.h:35
struct GNUNET_GNS_Handle * gns_handle
handle to gns
Definition: gns_api.c:58
static int ret
Final status code.
Definition: gnunet-arm.c:89
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
struct GNUNET_GNS_LookupRequest * lookup_tail
Tail of linked list of active lookup requests.
Definition: gns_api.h:56
void GNUNET_MQ_discard(struct GNUNET_MQ_Envelope *mqm)
Discard the message queue message, free all allocated resources.
Definition: mq.c:321
struct GNUNET_MQ_Envelope * env
Envelope with the message for this queue entry.
Definition: gns_api.c:73
struct GNUNET_GNS_LookupRequest * lookup_head
Head of linked list of active lookup requests.
Definition: gns_api.h:51
void * proc_cls
lookup_proc closure
Definition: gns_api.c:68
#define GNUNET_free(ptr)
Wrapper around free.
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
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
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 (i.e. bad configuration)

Definition at line 242 of file gns_tld_api.c.

References _, GNUNET_GNS_Handle::cfg, eat_tld(), get_tld(), GNUNET_asprintf(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CRYPTO_ecdsa_public_key_from_string(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_IDENTITY_ego_lookup_by_suffix(), GNUNET_log_config_invalid(), GNUNET_new, GNUNET_OK, GNUNET_strdup, handle, identity_zone_cb(), lookup_with_public_key(), GNUNET_GNS_LookupWithTldRequest::options, and GNUNET_GNS_LookupWithTldRequest::type.

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

248 {
250  const char *tld;
251  char *dot_tld;
252  char *zonestr;
254 
256  ltr->gns_handle = handle;
257  ltr->name = GNUNET_strdup (name);
258  ltr->type = type;
259  ltr->options = options;
260  ltr->lookup_proc = proc;
261  ltr->lookup_proc_cls = proc_cls;
262  /* start with trivial case: TLD is zkey */
263  tld = get_tld (ltr->name);
264  if (GNUNET_OK ==
265  GNUNET_CRYPTO_ecdsa_public_key_from_string (tld, strlen (tld), &pkey))
266  {
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  strlen (zonestr),
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  }
308  ltr->id_co =
309  GNUNET_IDENTITY_ego_lookup_by_suffix (ltr->gns_handle->cfg,
310  ltr->name,
312  ltr);
313  if (NULL == ltr->id_co)
314  {
315  GNUNET_free (ltr->name);
316  GNUNET_free (ltr);
317  return NULL;
318  }
319  return ltr;
320 }
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: gns_api.h:41
static char * pkey
Public key of the zone to look in, in ASCII.
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static void eat_tld(char *name, const char *tld)
Eat the "TLD" (last bit) of the given name.
Definition: gns_tld_api.c:128
static const char * get_tld(const char *name)
Obtain the TLD of the given name.
Definition: gns_tld_api.c:108
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
#define GNUNET_new(type)
Allocate a struct or union of the given type.
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.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
int GNUNET_asprintf(char **buf, const char *format,...)
Like asprintf, just portable.
static void identity_zone_cb(void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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:193
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.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
int 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.
const char * name
int GNUNET_CRYPTO_ecdsa_public_key_from_string(const char *enc, size_t enclen, struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Convert a string representing a public key to a public key.
Definition: crypto_ecc.c:468
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
static void lookup_with_public_key(struct GNUNET_GNS_LookupWithTldRequest *ltr, const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey)
Perform the actual resolution, starting with the zone identified by the given public key...
Definition: gns_tld_api.c:170
Handle to a lookup request.
Definition: gns_tld_api.c:44
#define GNUNET_free(ptr)
Wrapper around free.
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 330 of file gns_tld_api.c.

References GNUNET_free, GNUNET_free_non_null, 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().

331 {
332  void *ret = ltr->lookup_proc_cls;
333 
334  if (NULL != ltr->id_co)
335  {
337  ltr->id_co = NULL;
338  }
339  if (NULL != ltr->lr)
340  {
342  ltr->lr = NULL;
343  }
345  GNUNET_free (ltr->name);
346  GNUNET_free (ltr);
347  return ret;
348 }
struct GNUNET_GNS_LookupRequest * lr
Underlying GNS lookup.
Definition: gns_tld_api.c:70
#define GNUNET_free_non_null(ptr)
Free the memory pointed to by ptr if ptr is not NULL.
struct GNUNET_IDENTITY_EgoSuffixLookup * id_co
Lookup an ego with the identity service.
Definition: gns_tld_api.c:75
static int ret
Final status code.
Definition: gnunet-arm.c:89
void GNUNET_IDENTITY_ego_lookup_by_suffix_cancel(struct GNUNET_IDENTITY_EgoSuffixLookup *el)
Abort ego lookup attempt.
char * name
Domain name we are resolving.
Definition: gns_tld_api.c:60
char * longest_match
Name of the longest matching ego found so far.
Definition: gns_tld_api.c:81
void * GNUNET_GNS_lookup_cancel(struct GNUNET_GNS_LookupRequest *lr)
Cancel pending lookup request.
Definition: gns_api.c:309
void * lookup_proc_cls
lookup_proc closure
Definition: gns_tld_api.c:65
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function: