129 if ((NULL == (dash = strchr (s,
'-'))) ||
130 (1 != sscanf (s,
"%103s-",
key)) ||
136 _ (
"Unable to parse MESSENGER_ROOM_ENTRY record `%s'\n"),
151 _ (
"Unable to parse MESSENGER_ROOM_ENTRY record `%s'\n"),
167 if ((NULL == (dash = strchr (s,
'-'))) ||
168 (1 != sscanf (s,
"%7s-", flags)) ||
169 (strlen (dash + 1) > 256))
172 _ (
"Unable to parse MESSENGER_ROOM_DETAILS record `%s'\n"),
187 _ (
"Unable to parse MESSENGER_ROOM_DETAILS record `%s'\n"),
229 const char *gns_typename)
#define GNUNET_GNSRECORD_TYPE_MESSENGER_ROOM_ENTRY
Record type to share an entry of a messenger room.
#define GNUNET_GNSRECORD_TYPE_MESSENGER_ROOM_DETAILS
Record type to store details about a messenger room.
static int ret
Return value of the commandline.
static size_t data_size
Number of bytes in data.
static void record(void *cls, size_t data_size, const void *data)
Process recorded audio data.
struct GNUNET_HashCode key
The key used in the DHT.
uint32_t data
The data value.
API that can be used to manipulate GNS record data.
Plugin API for GNS record types.
#define GNUNET_log(kind,...)
char * GNUNET_CRYPTO_eddsa_public_key_to_string(const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Convert a public key to a string.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_public_key_from_string(const char *enc, size_t enclen, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Convert a string representing a public key to a public key.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_break_op(cond)
Use this for assertion violations caused by other peers (i.e.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_ERROR
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strndup(a, length)
Wrapper around GNUNET_xstrndup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
enum GNUNET_GenericReturnValue GNUNET_STRINGS_string_to_data(const char *enc, size_t enclen, void *out, size_t out_size)
Convert CrockfordBase32 encoding back to data.
void * libgnunet_plugin_gnsrecord_messenger_done(void *cls)
Exit point from the plugin.
static const char * messenger_number_to_typename(void *cls, uint32_t type)
Convert a type number to the corresponding type string (e.g.
static struct @52 name_map[]
Mapping of record type numbers to human-readable record type names.
static char * messenger_value_to_string(void *cls, uint32_t type, const void *data, size_t data_size)
Convert the 'value' of a record to a string.
void * libgnunet_plugin_gnsrecord_messenger_init(void *cls)
Entry point for the plugin.
static uint32_t messenger_typename_to_number(void *cls, const char *gns_typename)
Convert a type name (e.g.
static int messenger_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.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
GNUNET_GNSRECORD_TypenameToNumberFunction typename_to_number
Typename to number.
GNUNET_GNSRECORD_NumberToTypenameFunction number_to_typename
Number to typename.
GNUNET_GNSRECORD_ValueToStringFunction value_to_string
Conversion to string.
void * cls
Closure for all of the callbacks.
GNUNET_GNSRECORD_StringToValueFunction string_to_value
Conversion to binary.
A room details record specifies a custom name for a given room and some additional space for flags.
uint32_t flags
The flags of the room.
A room entry record specifies which peer is hosting a given room and may also specify the key to ente...
struct GNUNET_PeerIdentity door
The peer identity of an open door to a room.
The identity of the host (wraps the signing key of the peer).
struct GNUNET_CRYPTO_EddsaPublicKey public_key
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model