API to access GNS record data. More...
Go to the source code of this file.
| Data Structures | |
| struct | Plugin | 
| Handle for a plugin.  More... | |
| Macros | |
| #define | LOG(kind, ...) GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__) | 
| Functions | |
| static void | add_plugin (void *cls, const char *library_name, void *lib_ret) | 
| Add a plugin to the list managed by the block library. | |
| static void | init () | 
| Loads all plugins (lazy initialization). | |
| void | GNSRECORD_fini (void) | 
| void | __attribute__ ((destructor)) | 
| Dual function to init(). | |
| char * | GNUNET_GNSRECORD_value_to_string (uint32_t type, const void *data, size_t data_size) | 
| Convert the 'value' of a record to a string. | |
| int | GNUNET_GNSRECORD_string_to_value (uint32_t type, const char *s, void **data, size_t *data_size) | 
| Convert human-readable version of the value s of a record of type type to the respective binary representation. | |
| uint32_t | GNUNET_GNSRECORD_typename_to_number (const char *dns_typename) | 
| Convert a type name (e.g. | |
| const char * | GNUNET_GNSRECORD_number_to_typename (uint32_t type) | 
| Convert a type number to the corresponding type string (e.g. | |
| enum GNUNET_GenericReturnValue | GNUNET_GNSRECORD_is_critical (uint32_t type) | 
| Check if this type is a critical record. | |
| Variables | |
| static struct Plugin ** | gns_plugins | 
| Array of our plugins. | |
| static unsigned int | num_plugins | 
| Size of the 'plugins' array. | |
| static int | once | 
| Global to mark if we've run the initialization. | |
API to access GNS record data.
Definition in file gnsrecord.c.
| #define LOG | ( | kind, | |
| ... | |||
| ) | GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__) | 
Definition at line 32 of file gnsrecord.c.
| 
 | static | 
Add a plugin to the list managed by the block library.
| cls | NULL | 
| library_name | name of the plugin | 
| lib_ret | the plugin API | 
Definition at line 76 of file gnsrecord.c.
References Plugin::api, gns_plugins, GNUNET_array_append, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_new, GNUNET_strdup, Plugin::library_name, num_plugins, and plugin.
Referenced by init().
| 
 | static | 
Loads all plugins (lazy initialization).
Definition at line 97 of file gnsrecord.c.
References add_plugin(), GNUNET_OS_project_data_gnunet(), GNUNET_PLUGIN_load_all(), and once.
Referenced by GNUNET_GNSRECORD_is_critical(), GNUNET_GNSRECORD_number_to_typename(), GNUNET_GNSRECORD_string_to_value(), GNUNET_GNSRECORD_typename_to_number(), and GNUNET_GNSRECORD_value_to_string().
| void GNSRECORD_fini | ( | void | ) | 
| void __attribute__ | ( | (destructor) | ) | 
Dual function to init().
Definition at line 117 of file gnsrecord.c.
References gns_plugins, GNUNET_break, GNUNET_free, GNUNET_PLUGIN_unload(), num_plugins, once, and plugin.
| 
 | static | 
Array of our plugins.
Definition at line 55 of file gnsrecord.c.
Referenced by __attribute__(), add_plugin(), GNUNET_GNSRECORD_is_critical(), GNUNET_GNSRECORD_number_to_typename(), GNUNET_GNSRECORD_string_to_value(), GNUNET_GNSRECORD_typename_to_number(), and GNUNET_GNSRECORD_value_to_string().
| 
 | static | 
Size of the 'plugins' array.
Definition at line 60 of file gnsrecord.c.
Referenced by __attribute__(), add_plugin(), GNUNET_GNSRECORD_is_critical(), GNUNET_GNSRECORD_number_to_typename(), GNUNET_GNSRECORD_string_to_value(), GNUNET_GNSRECORD_typename_to_number(), and GNUNET_GNSRECORD_value_to_string().
| 
 | static | 
Global to mark if we've run the initialization.
Definition at line 65 of file gnsrecord.c.
Referenced by __attribute__(), and init().