![]() |
GNUnet
0.11.x
|
command line tool to inspect the name cache More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_dnsparser_lib.h"
#include "gnunet_identity_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_namecache_service.h"
Go to the source code of this file.
Functions | |
static void | do_shutdown (void *cls) |
Task run on shutdown. More... | |
static void | display_records_from_block (void *cls, unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd) |
Process a record that was stored in the namecache in a block. More... | |
static void | handle_block (void *cls, const struct GNUNET_GNSRECORD_Block *block) |
Display block obtained from listing (by name). More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run. More... | |
int | main (int argc, char *const *argv) |
The main function for gnunet-namecache. More... | |
Variables | |
static struct GNUNET_NAMECACHE_Handle * | ns |
Handle to the namecache. More... | |
static struct GNUNET_NAMECACHE_QueueEntry * | qe |
Queue entry for the 'query' operation. More... | |
static char * | name |
Name (label) of the records to list. More... | |
static struct GNUNET_IDENTITY_PublicKey | pubkey |
Public key of the zone to look in. More... | |
static char * | pkey |
Public key of the zone to look in, in ASCII. More... | |
static int | ret |
Global return value. More... | |
|
static |
Task run on shutdown.
Cleans up everything.
cls | unused |
Definition at line 73 of file gnunet-namecache.c.
References GNUNET_NAMECACHE_cancel(), GNUNET_NAMECACHE_disconnect(), ns, and qe.
Referenced by run().
|
static |
Process a record that was stored in the namecache in a block.
cls | closure, NULL |
rd_len | number of entries in rd array |
rd | array of records with data to store |
Definition at line 96 of file gnunet-namecache.c.
References _, data, data_size, GNUNET_free, GNUNET_GNSRECORD_number_to_typename(), GNUNET_GNSRECORD_value_to_string(), name, and typestring.
Referenced by handle_block().
|
static |
Display block obtained from listing (by name).
cls | NULL |
block | NULL if not found |
Definition at line 137 of file gnunet-namecache.c.
References display_records_from_block(), GNUNET_GNSRECORD_block_decrypt(), GNUNET_OK, GNUNET_SCHEDULER_shutdown(), name, pubkey, and qe.
Referenced by run().
|
static |
Main function that will be run.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 166 of file gnunet-namecache.c.
References _, cfg, do_shutdown(), GNUNET_GNSRECORD_query_from_public_key(), GNUNET_IDENTITY_public_key_from_string(), GNUNET_NAMECACHE_connect(), GNUNET_NAMECACHE_lookup_block(), GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), handle_block(), name, ns, pkey, pubkey, and qe.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function for gnunet-namecache.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 207 of file gnunet-namecache.c.
References _, gettext_noop, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_string(), GNUNET_log_setup(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), name, options, pkey, ret, and run().
|
static |
Handle to the namecache.
Definition at line 39 of file gnunet-namecache.c.
Referenced by do_shutdown(), and run().
|
static |
Queue entry for the 'query' operation.
Definition at line 44 of file gnunet-namecache.c.
Referenced by do_shutdown(), handle_block(), and run().
|
static |
Name (label) of the records to list.
Definition at line 49 of file gnunet-namecache.c.
Referenced by display_records_from_block(), handle_block(), main(), and run().
|
static |
Public key of the zone to look in.
Definition at line 49 of file gnunet-namecache.c.
Referenced by check_get_key(), check_pkey(), code_redirect(), create_member_session(), get_egoentry(), get_store_contact(), GNUNET_HELLO_parse_uri(), gnunet_try_connect(), handle_block(), handle_get_key(), handle_gns_resolution_result(), notify_handle_message(), remove_store_contact(), run(), run_with_zone_pkey(), set_handle_key(), and update_store_contact().
|
static |
Public key of the zone to look in, in ASCII.
Definition at line 59 of file gnunet-namecache.c.
Referenced by authorize_endpoint(), block_decrypt_ecdsa(), checkvec(), conversation_value_to_string(), create_did_ego_lockup_cb(), create_did_generate(), DID_ego_to_did(), get_pkey_from_attr_did(), GNS_find_tld(), GNUNET_CRYPTO_eddsa_key_get_public_from_scalar(), GNUNET_CRYPTO_rsa_blind(), GNUNET_CRYPTO_rsa_sign_fdh(), GNUNET_CRYPTO_rsa_unblind(), GNUNET_GNS_lookup_with_tld(), GNUNET_GNSRECORD_data_from_identity(), GNUNET_GNSRECORD_pkey_to_zkey(), GNUNET_HELLO_compose_uri(), GNUNET_NAMESTORE_records_lookup(), GNUNET_NAMESTORE_records_replace(), GNUNET_NAMESTORE_records_select(), GNUNET_NAMESTORE_records_store(), GNUNET_RECLAIM_attribute_delete(), GNUNET_RECLAIM_attribute_store(), GNUNET_RECLAIM_credential_delete(), GNUNET_RECLAIM_credential_store(), hash_pkey_and_label(), identity_zone_cb(), lookup_with_public_key(), main(), namestore_postgres_store_records(), namestore_sqlite_store_records(), output_vectors(), refresh_block(), resolve_did_document(), rsa_blinding_key_derive(), run(), run_with_zone_pkey(), and tld_iter().
|
static |