72 _ (
"PHONE version %u not supported\n"),
128 if ((NULL == (dash = strchr (s,
'-'))) ||
129 (1 != sscanf (s,
"%103s-", line_port)) ||
136 _ (
"Unable to parse PHONE record `%s'\n"),
150 _ (
"Unable to parse PHONE record `%s'\n"),
190 const char *gns_typename)
static int ret
Final status code.
static char * data
The data to insert into the dht.
static char * pkey
Public key of the zone to look in, in ASCII.
static uint32_t type
Type string converted to DNS type value.
static size_t data_size
Number of bytes in data.
API to the conversation service.
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_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_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_conversation_init(void *cls)
Entry point for the plugin.
void * libgnunet_plugin_gnsrecord_conversation_done(void *cls)
Exit point from the plugin.
static struct @7 name_map[]
Mapping of record type numbers to human-readable record type names.
static int conversation_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.
static char * conversation_value_to_string(void *cls, uint32_t type, const void *data, size_t data_size)
Convert the 'value' of a record to a string.
static const char * conversation_number_to_typename(void *cls, uint32_t type)
Convert a type number to the corresponding type string (e.g.
static uint32_t conversation_typename_to_number(void *cls, const char *gns_typename)
Convert a type name (e.g.
#define GNUNET_GNSRECORD_TYPE_PHONE
Endpoint for conversation.
A phone record specifies which peer is hosting a given user and may also specify the phone line that ...
struct GNUNET_HashCode line_port
Phone line (CADET port) to connect to.
struct GNUNET_PeerIdentity peer
Identity of the peer hosting the phone service.
uint32_t reserved
Reserved.
uint32_t version
Version of the phone record, for now always one.
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.
The identity of the host (wraps the signing key of the peer).
struct GNUNET_CRYPTO_EddsaPublicKey public_key