#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
#include "peerstore.h"
#include "peerstore_common.h"
#include "gnunet_peerstore_service.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_PEERSTORE_Monitor |
Context for a monitor. More... | |
Macros | |
#define | LOG(kind, ...) |
Functions | |
static void | handle_sync (void *cls, const struct GNUNET_MessageHeader *msg) |
static int | check_result (void *cls, const struct PeerstoreRecordMessage *msg) |
When a response for iterate request is received, check the message is well-formed. More... | |
static void | handle_result (void *cls, const struct PeerstoreRecordMessage *msg) |
When a response to monitor is received. More... | |
static void | reconnect (struct GNUNET_PEERSTORE_Monitor *mc) |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error err) |
struct GNUNET_PEERSTORE_Monitor * | GNUNET_PEERSTORE_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, int iterate_first, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_SCHEDULER_TaskCallback sync_cb, void *sync_cb_cls, GNUNET_PEERSTORE_Processor callback, void *callback_cls) |
Request watching a given key The monitoring can be filtered to contain only records matching peer and/or key. More... | |
void | GNUNET_PEERSTORE_monitor_stop (struct GNUNET_PEERSTORE_Monitor *zm) |
Stop monitoring. More... | |
void | GNUNET_PEERSTORE_monitor_next (struct GNUNET_PEERSTORE_Monitor *zm, uint64_t limit) |
Calls the monitor processor specified in GNUNET_PEERSTORE_monitor_start for the next record(s). More... | |
#define LOG | ( | kind, | |
... | |||
) |
Definition at line 32 of file peerstore_api_monitor.c.
|
static |
Definition at line 121 of file peerstore_api_monitor.c.
References mc.
|
static |
When a response for iterate request is received, check the message is well-formed.
cls | a struct GNUNET_PEERSTORE_Handle * |
msg | message received |
Definition at line 138 of file peerstore_api_monitor.c.
References GNUNET_OK.
|
static |
When a response to monitor is received.
cls | a struct GNUNET_PEERSTORE_Handle * |
msg | message received |
Definition at line 152 of file peerstore_api_monitor.c.
References _, GNUNET_ERROR_TYPE_DEBUG, LOG, mc, msg, PEERSTORE_destroy_record(), PEERSTORE_parse_record_message(), and record().
|
static |
Definition at line 185 of file peerstore_api_monitor.c.
References env, GNUNET_CLIENT_connect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_PEERSTORE_MONITOR_START, GNUNET_MESSAGE_TYPE_PEERSTORE_MONITOR_SYNC, GNUNET_MESSAGE_TYPE_PEERSTORE_RECORD, GNUNET_MQ_destroy(), GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_hd_var_size, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_YES, handlers, PeerstoreMonitorStartMessage::iterate_first, PeerstoreMonitorStartMessage::key_size, mc, mq_error_handler(), PeerstoreMonitorStartMessage::peer, PeerstoreMonitorStartMessage::peer_set, result, and PeerstoreMonitorStartMessage::sub_system_size.
Referenced by GNUNET_PEERSTORE_monitor_start(), and mq_error_handler().
|
static |
Definition at line 176 of file peerstore_api_monitor.c.
References mc, and reconnect().
Referenced by reconnect().