gnsrecord plugin to provide the API for identity records More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_gnsrecord_plugin.h"
Go to the source code of this file.
Functions | |
static char * | 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 | 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 | typename_to_number (void *cls, const char *dns_typename) |
Convert a type name (e.g. More... | |
static const char * | number_to_typename (void *cls, uint32_t type) |
Convert a type number to the corresponding type string (e.g. More... | |
void * | libgnunet_plugin_gnsrecord_reclaim_init (void *cls) |
Entry point for the plugin. More... | |
void * | libgnunet_plugin_gnsrecord_reclaim_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 identity records
Definition in file plugin_gnsrecord_reclaim.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 43 of file plugin_gnsrecord_reclaim.c.
References data, data_size, GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE, GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF, GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL, GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT, GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT, GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION, GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET, GNUNET_STRINGS_data_to_string_alloc(), GNUNET_strndup, and type.
Referenced by libgnunet_plugin_gnsrecord_reclaim_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 75 of file plugin_gnsrecord_reclaim.c.
References data, data_size, GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE, GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF, GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL, GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT, GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT, GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION, GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET, GNUNET_OK, GNUNET_strdup, GNUNET_STRINGS_string_to_data(), GNUNET_SYSERR, and type.
Referenced by libgnunet_plugin_gnsrecord_reclaim_init().
|
static |
Convert a type name (e.g.
"AAAA") to the corresponding number.
cls | closure, unused |
dns_typename | name to convert |
Definition at line 128 of file plugin_gnsrecord_reclaim.c.
References name, and name_map.
Referenced by libgnunet_plugin_gnsrecord_reclaim_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 148 of file plugin_gnsrecord_reclaim.c.
References name, name_map, number, and type.
Referenced by libgnunet_plugin_gnsrecord_reclaim_init().
void * libgnunet_plugin_gnsrecord_reclaim_init | ( | void * | cls | ) |
Entry point for the plugin.
cls | NULL |
Definition at line 168 of file plugin_gnsrecord_reclaim.c.
References GNUNET_new, GNUNET_GNSRECORD_PluginFunctions::number_to_typename, number_to_typename(), GNUNET_GNSRECORD_PluginFunctions::string_to_value, string_to_value(), GNUNET_GNSRECORD_PluginFunctions::typename_to_number, typename_to_number(), GNUNET_GNSRECORD_PluginFunctions::value_to_string, and value_to_string().
void * libgnunet_plugin_gnsrecord_reclaim_done | ( | void * | cls | ) |
Exit point from the plugin.
cls | the return value from libgnunet_plugin_block_test_init |
Definition at line 190 of file plugin_gnsrecord_reclaim.c.
References GNUNET_GNSRECORD_PluginFunctions::cls, and GNUNET_free.
const char* name |
Definition at line 106 of file plugin_gnsrecord_reclaim.c.
Referenced by number_to_typename(), and typename_to_number().
uint32_t number |
Definition at line 107 of file plugin_gnsrecord_reclaim.c.
Referenced by number_to_typename().
struct { ... } name_map[] |
Mapping of record type numbers to human-readable record type names.
Referenced by number_to_typename(), and typename_to_number().