35 #define LOG(kind, ...) GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__) 87 "Loading block plugin `%s'\n",
132 plugin = gns_plugins[i];
169 plugin = gns_plugins[i];
170 if (NULL != (ret = plugin->
api->value_to_string (plugin->
api->
cls,
201 plugin = gns_plugins[i];
225 if (0 == strcasecmp (dns_typename,
231 plugin = gns_plugins[i];
232 if (UINT32_MAX != (ret = plugin->
api->typename_to_number (plugin->
api->
cls,
257 plugin = gns_plugins[i];
258 if (NULL != (ret = plugin->
api->number_to_typename (plugin->
api->
cls,
Project-specific data used to help the OS subsystem find installation paths.
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
static size_t data_size
Number of bytes in data.
uint32_t GNUNET_GNSRECORD_typename_to_number(const char *dns_typename)
Convert a type name (i.e.
#define GNUNET_GNSRECORD_TYPE_ANY
Record type indicating any record/'*'.
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).
static int ret
Return value of the commandline.
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_default(void)
Return default project data used by 'libgnunetutil' for GNUnet.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
char * library_name
Name of the shared library.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GNUNET_BLOCK_PluginFunctions * api
Plugin API.
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
static int once
Global to mark if we've run the initialization.
static unsigned int num_plugins
Size of the 'plugins' array.
int GNUNET_GNSRECORD_string_to_value(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.
static char * plugin
Solver plugin name as string.
void GNUNET_PLUGIN_load_all(const char *basename, void *arg, GNUNET_PLUGIN_LoaderCallback cb, void *cb_cls)
Load all compatible plugins with the given base name.
struct GNUNET_GNSRECORD_PluginFunctions * api
Plugin API.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
#define GNUNET_log(kind,...)
void __attribute__((destructor))
Dual function to init().
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_get(void)
static struct Plugin ** gns_plugins
Array of our plugins.
void GNUNET_OS_init(const struct GNUNET_OS_ProjectData *pd)
Setup OS subsystem with project data.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void * cls
Closure for all of the callbacks.
uint32_t data
The data value.
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.
const char * GNUNET_GNSRECORD_number_to_typename(uint32_t type)
Convert a type number (i.e.
#define GNUNET_free(ptr)
Wrapper around free.