api to lookup an ego More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_identity_service.h"
#include "identity.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_IDENTITY_EgoSuffixLookup |
Handle for ego lookup. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "identity-api", __VA_ARGS__) |
Functions | |
static int | check_identity_result_code (void *cls, const struct ResultCodeMessage *rcm) |
We received a result code from the service. More... | |
static void | handle_identity_result_code (void *cls, const struct ResultCodeMessage *rcm) |
We received a result code from the service. More... | |
static int | check_identity_update (void *cls, const struct UpdateMessage *um) |
Check validity of identity update message. More... | |
static void | handle_identity_update (void *cls, const struct UpdateMessage *um) |
Handle identity update message. More... | |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. More... | |
struct GNUNET_IDENTITY_EgoSuffixLookup * | GNUNET_IDENTITY_ego_lookup_by_suffix (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *suffix, GNUNET_IDENTITY_EgoSuffixCallback cb, void *cb_cls) |
Lookup an ego by name. More... | |
void | GNUNET_IDENTITY_ego_lookup_by_suffix_cancel (struct GNUNET_IDENTITY_EgoSuffixLookup *el) |
Abort ego lookup attempt. More... | |
api to lookup an ego
Definition in file identity_api_suffix_lookup.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "identity-api", __VA_ARGS__) |
Definition at line 31 of file identity_api_suffix_lookup.c.
|
static |
We received a result code from the service.
Check the message is well-formed.
cls | closure |
rcm | result message received |
Definition at line 70 of file identity_api_suffix_lookup.c.
References GNUNET_MQ_check_zero_termination, GNUNET_OK, ResultCodeMessage::header, and GNUNET_MessageHeader::size.
|
static |
We received a result code from the service.
cls | closure |
rcm | result message received |
Definition at line 86 of file identity_api_suffix_lookup.c.
References GNUNET_IDENTITY_EgoLookup::cb, GNUNET_IDENTITY_EgoLookup::cb_cls, el, and GNUNET_IDENTITY_ego_lookup_by_suffix_cancel().
|
static |
Check validity of identity update message.
cls | closure |
um | message received |
Definition at line 104 of file identity_api_suffix_lookup.c.
References GNUNET_break, GNUNET_OK, GNUNET_SYSERR, UpdateMessage::header, UpdateMessage::name_len, GNUNET_MessageHeader::size, and size.
|
static |
Handle identity update message.
cls | closure |
um | message received |
Definition at line 128 of file identity_api_suffix_lookup.c.
References GNUNET_IDENTITY_EgoLookup::cb, GNUNET_IDENTITY_EgoLookup::cb_cls, el, GNUNET_assert, GNUNET_CRYPTO_read_private_key_from_buffer(), GNUNET_IDENTITY_ego_lookup_by_suffix_cancel(), GNUNET_SYSERR, UpdateMessage::header, UpdateMessage::name_len, and GNUNET_MessageHeader::size.
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | closure with the struct GNUNET_IDENTITY_EgoSuffixLookup * |
error | error code |
Definition at line 165 of file identity_api_suffix_lookup.c.
References GNUNET_IDENTITY_EgoLookup::cb, GNUNET_IDENTITY_EgoLookup::cb_cls, el, and GNUNET_IDENTITY_ego_lookup_by_suffix_cancel().
Referenced by GNUNET_IDENTITY_ego_lookup_by_suffix().