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

107  {
112 
117 
123 };
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 260 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().

261 {
262  struct GNUNET_GNS_Handle *handle;
263 
264  handle = GNUNET_new(struct GNUNET_GNS_Handle);
265  handle->cfg = cfg;
266  reconnect(handle);
267  if (NULL == handle->mq)
268  {
269  GNUNET_free(handle);
270  return NULL;
271  }
272  return handle;
273 }
Connection to the GNS service.
Definition: gns_api.h:35
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: gns_api.h:39
#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:44
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:225
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 282 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().

283 {
284  if (NULL != handle->mq)
285  {
286  GNUNET_MQ_destroy(handle->mq);
287  handle->mq = NULL;
288  }
289  if (NULL != handle->reconnect_task)
290  {
292  handle->reconnect_task = NULL;
293  }
294  GNUNET_assert(NULL == handle->lookup_head);
295  GNUNET_free(handle);
296 }
#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:44
struct GNUNET_GNS_LookupRequest * lookup_head
Head of linked list of active lookup requests.
Definition: gns_api.h:49
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:821
struct GNUNET_SCHEDULER_Task * reconnect_task
Reconnect task.
Definition: gns_api.h:59
#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:956
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 334 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(), lookup_authz_cb(), lookup_with_public_key(), and RECLAIM_TICKETS_consume().

341 {
342  /* IPC to shorten gns names, return shorten_handle */
343  struct LookupMessage *lookup_msg;
345  size_t nlen;
346 
347  if (NULL == name)
348  {
349  GNUNET_break(0);
350  return NULL;
351  }
353  "Trying to lookup `%s' in GNS\n",
354  name);
355  nlen = strlen(name) + 1;
356  if (nlen >= GNUNET_MAX_MESSAGE_SIZE - sizeof(*lr))
357  {
358  GNUNET_break(0);
359  return NULL;
360  }
362  lr->gns_handle = handle;
363  lr->lookup_proc = proc;
364  lr->proc_cls = proc_cls;
365  lr->r_id = handle->r_id_gen++;
366  lr->env = GNUNET_MQ_msg_extra(lookup_msg,
367  nlen,
369  lookup_msg->id = htonl(lr->r_id);
370  lookup_msg->options = htons((uint16_t)options);
371  lookup_msg->zone = *zone;
372  lookup_msg->type = htonl(type);
373  GNUNET_memcpy(&lookup_msg[1],
374  name,
375  nlen);
377  handle->lookup_tail,
378  lr);
379  if (NULL != handle->mq)
380  GNUNET_MQ_send_copy(handle->mq,
381  lr->env);
382  return lr;
383 }
uint32_t r_id
request id
Definition: gns_api.c:76
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:45
struct GNUNET_GNS_Handle * gns_handle
handle to gns
Definition: gns_api.c:56
#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:50
#define GNUNET_MESSAGE_TYPE_GNS_LOOKUP
Client would like to resolve a name.
Handle to a lookup request.
Definition: gns_api.c:42
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
int32_t type
the type of record to look up
Definition: gns.h:66
#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:61
#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
struct GNUNET_MQ_Handle * mq
Connection to service (if available).
Definition: gns_api.h:44
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:54
int16_t options
Local options for where to look for results (an enum GNUNET_GNS_LocalOptions in NBO).
Definition: gns.h:56
struct GNUNET_MQ_Envelope * env
Envelope with the message for this queue entry.
Definition: gns_api.c:71
const char * name
struct GNUNET_GNS_LookupRequest * lookup_head
Head of linked list of active lookup requests.
Definition: gns_api.h:49
#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:430
uint32_t r_id_gen
Request Id generator.
Definition: gns_api.h:69
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void * proc_cls
lookup_proc closure
Definition: gns_api.c:66
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 306 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(), and GNUNET_GNS_lookup_with_tld_cancel().

307 {
308  struct GNUNET_GNS_Handle *handle = lr->gns_handle;
309  void *ret;
310 
312  handle->lookup_tail,
313  lr);
314  GNUNET_MQ_discard(lr->env);
315  ret = lr->proc_cls;
316  GNUNET_free(lr);
317  return ret;
318 }
#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:56
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:54
void GNUNET_MQ_discard(struct GNUNET_MQ_Envelope *mqm)
Discard the message queue message, free all allocated resources.
Definition: mq.c:319
struct GNUNET_MQ_Envelope * env
Envelope with the message for this queue entry.
Definition: gns_api.c:71
struct GNUNET_GNS_LookupRequest * lookup_head
Head of linked list of active lookup requests.
Definition: gns_api.h:49
void * proc_cls
lookup_proc closure
Definition: gns_api.c:66
#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 240 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().

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  {
265  eat_tld(ltr->name, tld);
267  return ltr;
268  }
269 
270  /* second case: domain is mapped in our configuration file */
271  for (const char *domain = name; NULL != domain;
272  domain = strchr(domain, (unsigned char)'.'))
273  {
274  if ('.' == domain[0])
275  domain++;
276  GNUNET_asprintf(&dot_tld, ".%s", domain);
278  "gns",
279  dot_tld,
280  &zonestr))
281  {
282  if (GNUNET_OK !=
284  strlen(zonestr),
285  &pkey))
286  {
289  "gns",
290  dot_tld,
291  _("Expected a base32-encoded public zone key\n"));
292  GNUNET_free(zonestr);
293  GNUNET_free(dot_tld);
294  GNUNET_free(ltr->name);
295  GNUNET_free(ltr);
296  return NULL;
297  }
298  eat_tld(ltr->name, &dot_tld[1]);
299  GNUNET_free(zonestr);
300  GNUNET_free(dot_tld);
302  return ltr;
303  }
304  GNUNET_free(dot_tld);
305  }
306  ltr->id_co =
307  GNUNET_IDENTITY_ego_lookup_by_suffix(ltr->gns_handle->cfg,
308  ltr->name,
310  ltr);
311  if (NULL == ltr->id_co)
312  {
313  GNUNET_free(ltr->name);
314  GNUNET_free(ltr);
315  return NULL;
316  }
317  return ltr;
318 }
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
Definition: gns_api.h:39
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:126
static const char * get_tld(const char *name)
Obtain the TLD of the given name.
Definition: gns_tld_api.c:106
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
#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:181
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:191
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:168
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 328 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().

329 {
330  void *ret = ltr->lookup_proc_cls;
331 
332  if (NULL != ltr->id_co)
333  {
335  ltr->id_co = NULL;
336  }
337  if (NULL != ltr->lr)
338  {
340  ltr->lr = NULL;
341  }
343  GNUNET_free(ltr->name);
344  GNUNET_free(ltr);
345  return ret;
346 }
struct GNUNET_GNS_LookupRequest * lr
Underlying GNS lookup.
Definition: gns_tld_api.c:68
#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:73
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:58
char * longest_match
Name of the longest matching ego found so far.
Definition: gns_tld_api.c:79
void * GNUNET_GNS_lookup_cancel(struct GNUNET_GNS_LookupRequest *lr)
Cancel pending lookup request.
Definition: gns_api.c:306
void * lookup_proc_cls
lookup_proc closure
Definition: gns_tld_api.c:63
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function: