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_EgoLookup |
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_EgoLookup * | GNUNET_IDENTITY_ego_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *name, GNUNET_IDENTITY_EgoCallback cb, void *cb_cls) |
Lookup an ego by name. More... | |
void | GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el) |
Abort ego lookup attempt. More... | |
api to lookup an ego
Definition in file identity_api_lookup.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "identity-api", __VA_ARGS__) |
Definition at line 31 of file identity_api_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_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 85 of file identity_api_lookup.c.
References GNUNET_IDENTITY_EgoLookup::cb, GNUNET_IDENTITY_EgoLookup::cb_cls, el, and GNUNET_IDENTITY_ego_lookup_cancel().
|
static |
Check validity of identity update message.
cls | closure |
um | message received |
Definition at line 102 of file identity_api_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 125 of file identity_api_lookup.c.
References GNUNET_IDENTITY_EgoLookup::cb, GNUNET_IDENTITY_EgoLookup::cb_cls, el, UpdateMessage::end_of_list, GNUNET_assert, GNUNET_break, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_read_private_key_from_buffer(), GNUNET_IDENTITY_ego_lookup_cancel(), GNUNET_SYSERR, GNUNET_YES, UpdateMessage::header, id, GNUNET_IDENTITY_Ego::id, GNUNET_IDENTITY_Ego::name, UpdateMessage::name_len, GNUNET_IDENTITY_Ego::pk, 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_EgoLookup * |
error | error code |
Definition at line 168 of file identity_api_lookup.c.
References GNUNET_IDENTITY_EgoLookup::cb, GNUNET_IDENTITY_EgoLookup::cb_cls, and el.
Referenced by GNUNET_IDENTITY_ego_lookup().