GNU Name System. 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_Handle * | GNUNET_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_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. More... | |
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. More... | |
void * | GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr) |
Cancel pending lookup request. More... | |
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. More... | |
void * | GNUNET_GNS_lookup_with_tld_cancel (struct GNUNET_GNS_LookupWithTldRequest *ltr) |
Cancel pending lookup request. More... | |
enum GNUNET_GenericReturnValue | GNUNET_GNS_parse_ztld (const char *name, struct GNUNET_CRYPTO_PublicKey *ztld_key) |
Try to parse the zTLD into a public key. More... | |
GNU Name System.
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.
cls | closure |
rd_count | number of records in rd |
rd | the records in reply |
Definition at line 96 of file gnunet_gns_service.h.
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.
cls | closure |
gns_tld | GNUNET_YES if a GNS lookup was attempted, GNUNET_NO if the TLD is not configured for GNS |
rd_count | number of records in rd |
rd | the records in the reply |
Definition at line 192 of file gnunet_gns_service.h.
Options for the GNS lookup.
Definition at line 105 of file gnunet_gns_service.h.
struct GNUNET_GNS_Handle * GNUNET_GNS_connect | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg | ) |
Initialize the connection with the GNS service.
cfg | configuration to use |
Definition at line 267 of file gns_api.c.
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().
void GNUNET_GNS_disconnect | ( | struct GNUNET_GNS_Handle * | handle | ) |
Shutdown connection with the GNS service.
handle | connection to shut down |
handle | handle of the GNS connection to stop |
Definition at line 289 of file gns_api.c.
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().
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.
handle | handle to the GNS service |
name | the name to look up (in UTF-8 encoding) |
zone | zone to look in |
type | the GNS record type to look for |
options | local options for the lookup |
proc | function to call on result |
proc_cls | closure for proc |
handle | handle to the GNS service |
name | the name to look up (in UTF-8 encoding) |
zone | the zone to start the resolution in |
type | the record type to look up |
options | local options for the lookup |
proc | processor to call on result |
proc_cls | closure for proc |
Definition at line 421 of file gns_api.c.
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(), and lookup_with_public_key().
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.
handle | handle to the GNS service |
name | the name to look up (in UTF-8 encoding) |
zone | zone to look in |
type | the GNS record type to look for |
options | local options for the lookup |
recursion_depth_limit | maximum number of zones that the lookup may (still) traverse |
proc | function to call on result |
proc_cls | closure for proc |
Definition at line 343 of file gns_api.c.
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().
void * GNUNET_GNS_lookup_cancel | ( | struct GNUNET_GNS_LookupRequest * | lr | ) |
Cancel pending lookup request.
lr | the lookup request to cancel |
Definition at line 313 of file gns_api.c.
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().
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.
handle | handle to the GNS service |
name | the name to look up, including TLD (in UTF-8 encoding) |
type | the record type to look up |
options | local options for the lookup |
proc | processor to call on result |
proc_cls | closure for proc |
Definition at line 240 of file gns_tld_api.c.
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_GNS_parse_ztld(), 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(), RECLAIM_TICKETS_consume(), and run().
void * GNUNET_GNS_lookup_with_tld_cancel | ( | struct GNUNET_GNS_LookupWithTldRequest * | ltr | ) |
Cancel pending lookup request.
ltr | the lookup request to cancel |
Definition at line 331 of file gns_tld_api.c.
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_cth(), cleanup_handle(), cleanup_s5r(), do_shutdown(), do_timeout(), free_request(), GNUNET_CONVERSATION_call_stop(), and process_lookup_result().
enum GNUNET_GenericReturnValue GNUNET_GNS_parse_ztld | ( | const char * | name, |
struct GNUNET_CRYPTO_PublicKey * | ztld_key | ||
) |
Try to parse the zTLD into a public key.
[in] | name | the name to parse |
[out] | ztld_key | the identity key (must be allocated by caller). Only set of GNUNET_OK is returned. |
Definition at line 228 of file gns_tld_api.c.
References get_tld(), GNUNET_CRYPTO_public_key_from_string(), and name.
Referenced by GNUNET_GNS_lookup_with_tld(), lookup_authz_cb(), OIDC_parse_authz_code(), process_parallel_lookup_result(), revoke_ticket_cont(), and token_endpoint().