39#ifndef GNUNET_REGEX_SERVICE_H
40#define GNUNET_REGEX_SERVICE_H
57#define GNUNET_REGEX_INITIAL_BYTES 24
113 unsigned int get_path_length,
115 unsigned int put_path_length);
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static uint16_t port
Port number.
static struct GNUNET_IDENTITY_Handle * id
Handle to IDENTITY.
static int ipv6
Option -6: IPv6 requested.
struct GNUNET_REGEX_Search * GNUNET_REGEX_search(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *string, GNUNET_REGEX_Found callback, void *callback_cls)
Search for a peer offering a regex matching certain string in the DHT.
char * GNUNET_REGEX_ipv6policy2regex(const char *policy)
Convert an exit policy to a regular expression.
void(* GNUNET_REGEX_Found)(void *cls, const struct GNUNET_PeerIdentity *id, const struct GNUNET_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length)
Search callback function, invoked for every result that was found.
void GNUNET_REGEX_announce_cancel(struct GNUNET_REGEX_Announcement *a)
Stop announcing the regex specified by the given handle.
void GNUNET_REGEX_search_cancel(struct GNUNET_REGEX_Search *s)
Stop search and free all data used by a GNUNET_REGEX_search call.
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 this peer under the given regular expression.
char * GNUNET_REGEX_ipv4policy2regex(const char *policy)
Convert an exit policy to a regular expression.
void GNUNET_REGEX_ipv4toregexsearch(const struct in_addr *ip, uint16_t port, char *rxstr)
Create a regex in rxstr from the given ip and port.
void GNUNET_REGEX_ipv6toregexsearch(const struct in6_addr *ipv6, uint16_t port, char *rxstr)
Create a regex in rxstr from the given ipv6 and port.
The identity of the host (wraps the signing key of the peer).
Handle to store cached data about a regex announce.
char * regex
Message we're sending to the service.
uint16_t compression
Number of characters per edge.
struct GNUNET_TIME_Relative refresh_delay
Frequency of announcements.
Handle to store data about a regex search.
GNUNET_REGEX_Found callback
Function to call with results.
void * callback_cls
Closure for callback.
Time for relative time used by GNUnet, in microseconds.