36#ifndef GNUNET_PEERSTORE_SERVICE_H
37#define GNUNET_PEERSTORE_SERVICE_H
52#define GNUNET_PEERSTORE_HELLO_KEY "peerstore-peer-hello-uri"
57#define GNUNET_PEERSTORE_TRANSPORT_URLADDRESS_KEY "transport-communicator-url"
62#define GNUNET_PEERSTORE_TRANSPORT_HELLO_KEY "transport-peer-hello"
68#define GNUNET_PEERSTORE_TRANSPORT_BACKCHANNEL_MONOTIME \
69 "transport-backchannel-monotonic-time"
75#define GNUNET_PEERSTORE_TRANSPORT_DVLEARN_MONOTIME \
76 "transport-dv-learn-monotonic-time"
81#define GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE \
82 "transport-tcp-communicator-handshake"
87#define GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE_ACK \
88 "transport-tcp-communicator-handshake-ack"
93#define GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_REKEY \
94 "transport-tcp-communicator-rekey"
206 const char *err_msg);
struct GNUNET_GETOPT_CommandLineOption options[]
struct GNUNET_MessageHeader * msg
static void error_cb(void *cls)
Function called if lookup fails.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static void record(void *cls, size_t data_size, const void *data)
Process recorded audio data.
struct GNUNET_HashCode key
The key used in the DHT.
static void sync_cb(void *cls)
Function called once we are in sync in monitor mode.
static struct GNUNET_NAMESTORE_ZoneMonitor * zm
Monitor handle.
static char * value
Value of the record to add/remove.
static struct GNUNET_FS_SearchContext * sc
void GNUNET_PEERSTORE_monitor_stop(struct GNUNET_PEERSTORE_Monitor *zm)
Stop monitoring.
struct GNUNET_PEERSTORE_IterateContext * GNUNET_PEERSTORE_iteration_start(struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_PEERSTORE_Processor callback, void *callback_cls)
Iterate over peerstore entries.
void GNUNET_PEERSTORE_iteration_next(struct GNUNET_PEERSTORE_IterateContext *ic, uint64_t limit)
Continue an iteration.
void GNUNET_PEERSTORE_store_cancel(struct GNUNET_PEERSTORE_StoreContext *sc)
Cancel a store request.
void GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h)
Disconnect from the PEERSTORE service.
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...
void(* GNUNET_PEERSTORE_hello_notify_cb)(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *hello, const char *err_msg)
Function called by PEERSTORE when notifying a client about a changed hello.
struct GNUNET_PEERSTORE_Handle * GNUNET_PEERSTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the PEERSTORE service.
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).
GNUNET_PEERSTORE_StoreOption
Options for storing values in PEERSTORE.
void(* GNUNET_PEERSTORE_Processor)(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
Function called by PEERSTORE for each matching record.
void GNUNET_PEERSTORE_hello_add_cancel(struct GNUNET_PEERSTORE_StoreHelloContext *huc)
Cancel the request to add a hello.
struct GNUNET_PEERSTORE_StoreContext * GNUNET_PEERSTORE_store(struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
Store a new entry in the PEERSTORE.
void(* GNUNET_PEERSTORE_Continuation)(void *cls, int success)
Continuation called with a status result.
void GNUNET_PEERSTORE_iteration_stop(struct GNUNET_PEERSTORE_IterateContext *ic)
Cancel an iteration.
struct GNUNET_PEERSTORE_StoreHelloContext * GNUNET_PEERSTORE_hello_add(struct GNUNET_PEERSTORE_Handle *h, const struct GNUNET_MessageHeader *msg, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
Add hello to peerstore.
@ GNUNET_PEERSTORE_STOREOPTION_MULTIPLE
Possibly store multiple values under given key.
@ GNUNET_PEERSTORE_STOREOPTION_REPLACE
Delete any previous values for the given key before storing the given value.
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
static unsigned int size
Size of the "table".
Handle to the PEERSTORE service.
Context for a iterate request.
char * sub_system
Which subsystem does the store?
void * callback_cls
Closure for callback.
GNUNET_PEERSTORE_Processor callback
Callback with each matching record.
struct GNUNET_PeerIdentity peer
Peer the store is for.
void * error_cb_cls
Closure for error_cb.
void * callback_cls
Closure for callback.
const struct GNUNET_PeerIdentity * peer
The peer we are watching for values.
int iterate_first
Iterate first flag.
GNUNET_PEERSTORE_Processor callback
Callback with each record received.
char * sub_system
The sub system requested the watch.
void * sync_cb_cls
Sync CB cls.
Context for the info handler.
size_t value_size
Size of value BLOB.
struct GNUNET_PeerIdentity peer
Peer Identity.
void * value
Record value BLOB.
struct GNUNET_TIME_Absolute expiry
Expiry time of entry.
char * sub_system
Responsible sub system string.
char * key
Record key string.
Context for a store request.
char * sub_system
Which subsystem does the store?
struct GNUNET_TIME_Absolute expiry
When does the value expire?
void * cont_cls
Closure for cont.
GNUNET_PEERSTORE_Continuation cont
Continuation called with service response.
struct GNUNET_PeerIdentity peer
Peer the store is for.
Context for a add hello uri request.
GNUNET_PEERSTORE_Continuation cont
Function to call with information.
void * cont_cls
Closure for callback.
The identity of the host (wraps the signing key of the peer).
Time for absolute times used by GNUnet, in microseconds.