access regex service to advertise capabilities via regex More...
#include "platform.h"
#include "gnunet_protocols.h"
#include "gnunet_util_lib.h"
#include "gnunet_regex_service.h"
#include "regex_ipc.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_REGEX_Announcement |
Handle to store cached data about a regex announce. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "regex-api", __VA_ARGS__) |
Functions | |
static void | announce_reconnect (struct GNUNET_REGEX_Announcement *a) |
(Re)connect to the REGEX service with the given announcement a. More... | |
static void | announce_mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
We got a disconnect after asking regex to do the announcement. More... | |
struct GNUNET_REGEX_Announcement * | GNUNET_REGEX_announce (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *regex, struct GNUNET_TIME_Relative refresh_delay, uint16_t compression) |
Announce the given peer under the given regular expression. More... | |
void | GNUNET_REGEX_announce_cancel (struct GNUNET_REGEX_Announcement *a) |
Stop announcing the regex specified by the given handle. More... | |
access regex service to advertise capabilities via regex
Definition in file regex_api_announce.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "regex-api", __VA_ARGS__) |
Definition at line 32 of file regex_api_announce.c.
|
static |
(Re)connect to the REGEX service with the given announcement a.
a | REGEX to announce. |
Definition at line 100 of file regex_api_announce.c.
References announce_mq_error_handler(), GNUNET_REGEX_Announcement::cfg, GNUNET_REGEX_Announcement::compression, AnnounceMessage::compression, env, GNUNET_CLIENT_connect(), GNUNET_memcpy, GNUNET_MESSAGE_TYPE_REGEX_ANNOUNCE, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_TIME_relative_hton(), GNUNET_REGEX_Announcement::mq, GNUNET_REGEX_Announcement::refresh_delay, AnnounceMessage::refresh_delay, GNUNET_REGEX_Announcement::regex, and AnnounceMessage::reserved.
Referenced by announce_mq_error_handler(), and GNUNET_REGEX_announce().
|
static |
We got a disconnect after asking regex to do the announcement.
Retry.
cls | the struct GNUNET_REGEX_Announcement to retry |
error | error code |
Definition at line 83 of file regex_api_announce.c.
References announce_reconnect(), GNUNET_MQ_destroy(), and GNUNET_REGEX_Announcement::mq.
Referenced by announce_reconnect().