enable clients to convert addresses to human readable strings More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_arm_service.h"
#include "gnunet_hello_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_transport_service.h"
#include "transport.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TRANSPORT_AddressToStringContext |
Context for the address lookup. More... | |
Functions | |
static int | check_reply (void *cls, const struct AddressToStringResultMessage *atsm) |
Function called with responses from the service. More... | |
static void | handle_reply (void *cls, const struct AddressToStringResultMessage *atsm) |
Function called with responses from the service. 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_TRANSPORT_AddressToStringContext * | GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_HELLO_Address *address, int numeric, struct GNUNET_TIME_Relative timeout, GNUNET_TRANSPORT_AddressToStringCallback aluc, void *aluc_cls) |
Convert a binary address into a human readable address. More... | |
void | GNUNET_TRANSPORT_address_to_string_cancel (struct GNUNET_TRANSPORT_AddressToStringContext *alc) |
Cancel request for address conversion. More... | |
enable clients to convert addresses to human readable strings
Definition in file transport_api_address_to_string.c.
|
static |
Function called with responses from the service.
cls | our struct GNUNET_TRANSPORT_AddressToStringContext * |
atsm | message with the human-readable address |
Definition at line 63 of file transport_api_address_to_string.c.
References AddressToStringResultMessage::addr_len, address, GNUNET_break, GNUNET_OK, GNUNET_SYSERR, AddressToStringResultMessage::header, consensus-simulation::int, AddressToStringResultMessage::res, result, GNUNET_MessageHeader::size, and size.
|
static |
Function called with responses from the service.
cls | our struct GNUNET_TRANSPORT_AddressToStringContext * |
atsm | message with the human-readable address |
Definition at line 103 of file transport_api_address_to_string.c.
References address, GNUNET_TRANSPORT_AddressToStringContext::cb, GNUNET_TRANSPORT_AddressToStringContext::cb_cls, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_TRANSPORT_address_to_string_cancel(), AddressToStringResultMessage::header, consensus-simulation::int, AddressToStringResultMessage::res, result, GNUNET_MessageHeader::size, and 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 | the struct GNUNET_TRANSPORT_AddressToStringContext * |
error | error code |
Definition at line 150 of file transport_api_address_to_string.c.
References GNUNET_TRANSPORT_AddressToStringContext::cb, GNUNET_TRANSPORT_AddressToStringContext::cb_cls, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_SYSERR, and GNUNET_TRANSPORT_address_to_string_cancel().
Referenced by GNUNET_TRANSPORT_address_to_string().