32#define LOG(kind, ...) GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__)
84 "Loading block plugin `%s'\n",
103 "libgnunet_plugin_gnsrecord_",
197 if (0 == strcasecmp (dns_typename,
249 if (NULL ==
plugin->api->is_critical)
static void add_plugin(void *cls, const char *library_name, void *lib_ret)
Add a plugin to the list managed by the block library.
void GNSRECORD_fini(void)
static unsigned int num_plugins
Size of the 'plugins' array.
static struct Plugin ** gns_plugins
Array of our plugins.
static int once
Global to mark if we've run the initialization.
void __attribute__((destructor))
Dual function to init().
static void init()
Loads all plugins (lazy initialization).
static int ret
Final status code.
static struct GNUNET_TESTING_PluginFunctions * plugin
Plugin to dynamically load a test case.
static char * data
The data to insert into the dht.
static uint32_t type
Type string converted to DNS type value.
static size_t data_size
Number of bytes in data.
API that can be used to manipulate GNS record data.
Plugin API for GNS record types.
const char * GNUNET_GNSRECORD_number_to_typename(uint32_t type)
Convert a type number to the corresponding type string (e.g.
uint32_t GNUNET_GNSRECORD_typename_to_number(const char *dns_typename)
Convert a type name (e.g.
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 repre...
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_is_critical(uint32_t type)
Check if this type is a critical record.
#define GNUNET_GNSRECORD_TYPE_ANY
Record type indicating any record/'*'.
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.
#define GNUNET_log(kind,...)
GNUNET_GenericReturnValue
Named constants for return values.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
#define GNUNET_free(ptr)
Wrapper around free.
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_gnunet(void)
Return default project data used by 'libgnunetutil' for GNUnet.
void GNUNET_PLUGIN_load_all(const struct GNUNET_OS_ProjectData *pd, const char *basename, void *arg, GNUNET_PLUGIN_LoaderCallback cb, void *cb_cls)
Load all compatible plugins with the given base name.
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
void * cls
Closure to pass to start_testcase.
struct GNUNET_BLOCK_PluginFunctions * api
Plugin API.
struct GNUNET_GNSRECORD_PluginFunctions * api
Plugin API.
char * library_name
Name of the shared library.