gnsrecord plugin to provide the API for ABD records More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "delegate_misc.h"
#include "abd_serialization.h"
#include "gnunet_abd_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_gnsrecord_plugin.h"
#include "gnunet_signatures.h"
Go to the source code of this file.
Functions | |
static char * | abd_value_to_string (void *cls, uint32_t type, const void *data, size_t data_size) |
Convert the 'value' of a record to a string. More... | |
static int | abd_string_to_value (void *cls, uint32_t type, const char *s, void **data, size_t *data_size) |
Convert human-readable version of a 'value' of a record to the binary representation. More... | |
static uint32_t | abd_typename_to_number (void *cls, const char *gns_typename) |
Convert a type name (e.g. More... | |
static const char * | abd_number_to_typename (void *cls, uint32_t type) |
Convert a type number to the corresponding type string (e.g. More... | |
void * | libgnunet_plugin_gnsrecord_abd_init (void *cls) |
Entry point for the plugin. More... | |
void * | libgnunet_plugin_gnsrecord_abd_done (void *cls) |
Exit point from the plugin. More... | |
Variables | |
struct { | |
const char * name | |
uint32_t number | |
} | name_map [] |
Mapping of record type numbers to human-readable record type names. More... | |
gnsrecord plugin to provide the API for ABD records
Definition in file plugin_gnsrecord_abd.c.
|
static |
Convert the 'value' of a record to a string.
cls | closure, unused |
type | type of the record |
data | value in binary encoding |
data_size | number of bytes in data |
Definition at line 46 of file plugin_gnsrecord_abd.c.
References data, data_size, GNUNET_ABD_DelegationRecord::data_size, GNUNET_ABD_delegate_deserialize(), GNUNET_ABD_delegate_to_string(), GNUNET_ABD_delegation_set_deserialize(), GNUNET_asprintf(), GNUNET_free, GNUNET_GNSRECORD_TYPE_ATTRIBUTE, GNUNET_GNSRECORD_TYPE_DELEGATE, GNUNET_IDENTITY_public_key_to_string(), GNUNET_memcpy, GNUNET_ntohll(), GNUNET_OK, GNUNET_ABD_DelegationRecord::set_count, GNUNET_ABD_DelegationSet::subject_attribute, GNUNET_ABD_DelegationSet::subject_attribute_len, GNUNET_ABD_DelegationSet::subject_key, subject_pkey, and type.
Referenced by libgnunet_plugin_gnsrecord_abd_init().
|
static |
Convert human-readable version of a 'value' of a record to the binary representation.
cls | closure, unused |
type | type of the record |
s | human-readable string |
data | set to value in binary encoding (will be allocated) |
data_size | set to number of bytes in data |
Definition at line 147 of file plugin_gnsrecord_abd.c.
References _, data, data_size, GNUNET_ABD_DelegationRecord::data_size, entries, GNUNET_ABD_delegate_from_string(), GNUNET_ABD_delegate_serialize(), GNUNET_ABD_delegation_set_get_size(), GNUNET_ABD_delegation_set_serialize(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_free_nz, GNUNET_GNSRECORD_TYPE_ATTRIBUTE, GNUNET_GNSRECORD_TYPE_DELEGATE, GNUNET_htonll(), GNUNET_IDENTITY_public_key_from_string(), GNUNET_log, GNUNET_malloc, GNUNET_OK, GNUNET_strdup, GNUNET_SYSERR, warningfilter::matches, GNUNET_ABD_DelegationRecord::set_count, GNUNET_ABD_DelegationSet::subject_attribute, GNUNET_ABD_DelegationSet::subject_attribute_len, GNUNET_ABD_DelegationSet::subject_key, subject_pkey, and type.
Referenced by libgnunet_plugin_gnsrecord_abd_init().
|
static |
Convert a type name (e.g.
"AAAA") to the corresponding number.
cls | closure, unused |
gns_typename | name to convert |
Definition at line 290 of file plugin_gnsrecord_abd.c.
References name, and name_map.
Referenced by libgnunet_plugin_gnsrecord_abd_init().
|
static |
Convert a type number to the corresponding type string (e.g.
1 to "A")
cls | closure, unused |
type | number of a type to convert |
Definition at line 310 of file plugin_gnsrecord_abd.c.
References name, name_map, number, and type.
Referenced by libgnunet_plugin_gnsrecord_abd_init().
void* libgnunet_plugin_gnsrecord_abd_init | ( | void * | cls | ) |
Entry point for the plugin.
cls | NULL |
Definition at line 328 of file plugin_gnsrecord_abd.c.
References abd_number_to_typename(), abd_string_to_value(), abd_typename_to_number(), abd_value_to_string(), GNUNET_new, GNUNET_GNSRECORD_PluginFunctions::number_to_typename, GNUNET_GNSRECORD_PluginFunctions::string_to_value, GNUNET_GNSRECORD_PluginFunctions::typename_to_number, and GNUNET_GNSRECORD_PluginFunctions::value_to_string.
void* libgnunet_plugin_gnsrecord_abd_done | ( | void * | cls | ) |
Exit point from the plugin.
cls | the return value from libgnunet_plugin_block_test_init |
Definition at line 348 of file plugin_gnsrecord_abd.c.
References GNUNET_GNSRECORD_PluginFunctions::cls, and GNUNET_free.
const char* name |
Definition at line 275 of file plugin_gnsrecord_abd.c.
Referenced by abd_number_to_typename(), abd_typename_to_number(), add_services(), add_setter_action(), bandwidth_stats_iterator(), broadcast_status(), cache_answers(), callback_set_handle_name(), callback_setup_handle_name(), change_handle_name(), check_barrier_status(), check_delete_message(), check_get(), check_lookup_result(), check_monitor_notify(), check_monitor_start(), check_record_result(), check_set(), check_ssl_certificate(), check_statistics_value(), check_watch(), check_zone_to_name(), compare_mem_table_structs(), create_message_name(), create_response(), eat_tld(), ego_cb(), ego_delete_name(), ego_edit_name(), expect_data_dynamic(), expect_data_fixed(), find_service(), find_stat_entry(), generate_gns_certificate(), get_egoentry(), get_egoentry_namestore(), get_file_handle(), get_gns_cont(), get_srv_handle_data_subdir(), get_tld(), GNS_get_tld(), gns_resolve_name(), GNS_resolver_lookup(), GNUNET_DATACACHE_create(), GNUNET_DISK_directory_scan(), GNUNET_DNSPARSER_builder_add_name(), GNUNET_DNSPARSER_check_name(), GNUNET_DNSPARSER_parse_query(), GNUNET_DNSPARSER_parse_record(), GNUNET_GETOPT_run(), GNUNET_GNS_lookup(), GNUNET_GNS_lookup_limited(), GNUNET_GNS_lookup_with_tld(), GNUNET_IDENTITY_create(), GNUNET_IDENTITY_delete(), GNUNET_IDENTITY_ego_lookup(), GNUNET_MESSENGER_connect(), GNUNET_MESSENGER_set_name(), GNUNET_NETWORK_socket_accept(), GNUNET_PLUGIN_test(), GNUNET_PQ_connect2(), GNUNET_PQ_exec_prepared(), GNUNET_PQ_make_prepare(), GNUNET_RECLAIM_attribute_serialize(), GNUNET_RECLAIM_attribute_serialize_get_size(), GNUNET_RECLAIM_credential_serialize(), GNUNET_RECLAIM_credential_serialize_get_size(), GNUNET_STATISTICS_get(), GNUNET_STATISTICS_set(), GNUNET_STATISTICS_update(), GNUNET_STATISTICS_watch(), GNUNET_STATISTICS_watch_cancel(), GNUNET_TESTBED_barrier_init(), GNUNET_TESTBED_barrier_init_(), GNUNET_TESTBED_barrier_wait(), GNUNET_TESTBED_get_statistics(), GPI_plugins_find(), gst_element_factory_make_debug(), GST_plugins_find(), GST_plugins_printer_find(), handle_arm_list_result(), handle_barrier_cancel(), handle_barrier_init(), handle_barrier_status(), handle_barrier_wait(), handle_create(), handle_delete_message(), handle_get(), handle_get_name(), handle_lookup(), handle_lookup_by_suffix_message(), handle_lookup_message(), handle_lookup_result(), handle_record_result(), handle_set(), handle_set_name(), handle_statistics_value(), handle_watch(), http_common_dns_ip_lookup(), identity_cb(), iface_proc(), interface_proc(), is_canonical(), iterator_cb(), list_callback(), on_identity(), open_static_page(), open_static_resource(), parse_gnsrecordobject(), plugin_session_info_cb(), print_entry(), process_dids(), process_lookup_result(), process_stats(), REGEX_TEST_automaton_save_graph_step(), run(), send_client_status_msg(), send_ibf(), send_lookup_response_with_filter(), set_contact_name(), set_handle_name(), set_srv_handle_name(), setup_srv_handle_name(), signal_result(), stat_iterator(), statistics_cb(), statistics_result(), stats_iterator(), store_service(), stun_attr2str(), stun_msg2str(), translate_dot_plus(), and zone_iterate_proc().
uint32_t number |
Definition at line 276 of file plugin_gnsrecord_abd.c.
Referenced by abd_number_to_typename(), event_cb(), GNUNET_CONFIGURATION_get_data(), and GNUNET_TESTBED_run().
struct { ... } name_map[] |
Mapping of record type numbers to human-readable record type names.
Referenced by abd_number_to_typename(), and abd_typename_to_number().