GNUnet  0.10.x
Data Structures | Macros | Functions
peerinfo_api.c File Reference

API to access peerinfo service. More...

#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
#include "peerinfo.h"
Include dependency graph for peerinfo_api.c:

Go to the source code of this file.

Data Structures

struct  GNUNET_PEERINFO_IteratorContext
 Context for an iteration request. More...
 
struct  GNUNET_PEERINFO_Handle
 Handle to the peerinfo service. More...
 

Macros

#define LOG(kind, ...)   GNUNET_log_from (kind, "peerinfo-api",__VA_ARGS__)
 

Functions

static void reconnect (struct GNUNET_PEERINFO_Handle *h)
 Close the existing connection to PEERINFO and reconnect. More...
 
struct GNUNET_PEERINFO_HandleGNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Connect to the peerinfo service. More...
 
void GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h)
 Disconnect from the peerinfo service. More...
 
static void reconnect_task (void *cls)
 Task scheduled to re-try connecting to the peerinfo service. More...
 
static void do_reconnect (struct GNUNET_PEERINFO_Handle *h)
 We encountered an error, reconnect to the PEERINFO service. More...
 
static void mq_error_handler (void *cls, enum GNUNET_MQ_Error error)
 We got a disconnect after asking regex to do the announcement. More...
 
static int check_info (void *cls, const struct InfoMessage *im)
 Function called when we receive an info message. More...
 
static void handle_info (void *cls, const struct InfoMessage *im)
 Handle info message. More...
 
static void send_ic_request (struct GNUNET_PEERINFO_Handle *h)
 Send the next IC request at the head of the queue. More...
 
static void handle_end_iteration (void *cls, const struct GNUNET_MessageHeader *msg)
 Type of a function to call when we receive a message from the service. More...
 
struct GNUNET_PEERINFO_IteratorContextGNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, int include_friend_only, const struct GNUNET_PeerIdentity *peer, GNUNET_PEERINFO_Processor callback, void *callback_cls)
 Call a method for each known matching host. More...
 
void GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic)
 Cancel an iteration over peer information. More...
 
struct GNUNET_MQ_EnvelopeGNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h, const struct GNUNET_HELLO_Message *hello, GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
 Add a host to the persistent list. More...
 

Detailed Description

API to access peerinfo service.

Author
Christian Grothoff

Definition in file peerinfo_api.c.

Macro Definition Documentation

◆ LOG

#define LOG (   kind,
  ... 
)    GNUNET_log_from (kind, "peerinfo-api",__VA_ARGS__)

Function Documentation

◆ reconnect()

static void reconnect ( struct GNUNET_PEERINFO_Handle h)
static

Close the existing connection to PEERINFO and reconnect.

Parameters
hhandle to the service

Definition at line 440 of file peerinfo_api.c.

References GNUNET_PEERINFO_Handle::cfg, GNUNET_CLIENT_connect(), GNUNET_MESSAGE_TYPE_PEERINFO_INFO, GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END, GNUNET_MQ_destroy(), GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_hd_var_size, GNUNET_SCHEDULER_cancel(), GNUNET_PEERINFO_Handle::ic_head, GNUNET_PEERINFO_Handle::mq, mq_error_handler(), GNUNET_PEERINFO_Handle::r_task, and send_ic_request().

Referenced by GNUNET_PEERINFO_connect(), handle_end_iteration(), and reconnect_task().

441 {
443  GNUNET_MQ_hd_var_size (info,
445  struct InfoMessage,
446  h),
447  GNUNET_MQ_hd_fixed_size (end_iteration,
449  struct GNUNET_MessageHeader,
450  h),
452  };
453 
454  if (NULL != h->r_task)
455  {
457  h->r_task = NULL;
458  }
459  if (NULL != h->mq)
460  {
461  GNUNET_MQ_destroy (h->mq);
462  h->mq = NULL;
463  }
464  h->mq = GNUNET_CLIENT_connect (h->cfg,
465  "peerinfo",
466  handlers,
468  h);
469  if (NULL != h->ic_head)
470  send_ic_request (h);
471 }
struct GNUNET_MQ_Handle * mq
Connection to the service.
Definition: peerinfo_api.c:96
struct GNUNET_MQ_Handle * GNUNET_CLIENT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name, const struct GNUNET_MQ_MessageHandler *handlers, GNUNET_MQ_ErrorHandler error_handler, void *error_handler_cls)
Create a message queue to connect to a GNUnet service.
Definition: client.c:901
static void send_ic_request(struct GNUNET_PEERINFO_Handle *h)
Send the next IC request at the head of the queue.
Definition: peerinfo_api.c:355
Message used to inform the client about a particular peer; this message is optionally followed by a H...
Definition: peerinfo.h:107
const struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: peerinfo_api.c:91
struct GNUNET_PEERINFO_IteratorContext * ic_head
Head of iterator DLL.
Definition: peerinfo_api.c:101
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
static struct GNUNET_CADET_MessageHandler handlers[]
Handlers, for diverse services.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
static void mq_error_handler(void *cls, enum GNUNET_MQ_Error error)
We got a disconnect after asking regex to do the announcement.
Definition: peerinfo_api.c:236
Message handler for a specific message type.
struct GNUNET_SCHEDULER_Task * r_task
ID for a reconnect task.
Definition: peerinfo_api.c:111
#define GNUNET_MESSAGE_TYPE_PEERINFO_INFO
Information about one of the peers.
Header for all communications.
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:824
#define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END
End of information about other peers.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:965
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reconnect_task()

static void reconnect_task ( void *  cls)
static

Task scheduled to re-try connecting to the peerinfo service.

Parameters
clsthe struct GNUNET_PEERINFO_Handle *

Definition at line 190 of file peerinfo_api.c.

References GNUNET_PEERINFO_IteratorContext::h, GNUNET_PEERINFO_Handle::r_task, and reconnect().

Referenced by do_reconnect().

191 {
192  struct GNUNET_PEERINFO_Handle *h = cls;
193 
194  h->r_task = NULL;
195  reconnect (h);
196 }
Handle to the peerinfo service.
Definition: peerinfo_api.c:86
static void reconnect(struct GNUNET_PEERINFO_Handle *h)
Close the existing connection to PEERINFO and reconnect.
Definition: peerinfo_api.c:440
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
struct GNUNET_SCHEDULER_Task * r_task
ID for a reconnect task.
Definition: peerinfo_api.c:111
Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_reconnect()

static void do_reconnect ( struct GNUNET_PEERINFO_Handle h)
static

We encountered an error, reconnect to the PEERINFO service.

Parameters
hhandle to reconnect

Definition at line 205 of file peerinfo_api.c.

References _, GNUNET_PEERINFO_IteratorContext::callback, GNUNET_PEERINFO_IteratorContext::callback_cls, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_add_now(), GNUNET_PEERINFO_Handle::ic_head, GNUNET_PEERINFO_Handle::ic_tail, GNUNET_PEERINFO_Handle::mq, GNUNET_PEERINFO_Handle::r_task, and reconnect_task().

Referenced by mq_error_handler().

206 {
208 
209  GNUNET_MQ_destroy (h->mq);
210  h->mq = NULL;
211  if (NULL != ic)
212  {
214  h->ic_tail,
215  ic);
216  if (NULL != ic->callback)
217  ic->callback (ic->callback_cls,
218  NULL,
219  NULL,
220  _("Failed to receive response from `PEERINFO' service."));
221  GNUNET_free (ic);
222  }
224  h);
225 }
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
struct GNUNET_MQ_Handle * mq
Connection to the service.
Definition: peerinfo_api.c:96
struct GNUNET_PEERINFO_IteratorContext * ic_tail
Tail of iterator DLL.
Definition: peerinfo_api.c:106
struct GNUNET_PEERINFO_IteratorContext * ic_head
Head of iterator DLL.
Definition: peerinfo_api.c:101
Context for an iteration request.
Definition: peerinfo_api.c:37
#define _(String)
GNU gettext support macro.
Definition: platform.h:208
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1273
void * callback_cls
Closure for callback.
Definition: peerinfo_api.c:63
static void reconnect_task(void *cls)
Task scheduled to re-try connecting to the peerinfo service.
Definition: peerinfo_api.c:190
struct GNUNET_SCHEDULER_Task * r_task
ID for a reconnect task.
Definition: peerinfo_api.c:111
GNUNET_PEERINFO_Processor callback
Function to call with the results.
Definition: peerinfo_api.c:58
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:824
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mq_error_handler()

static void mq_error_handler ( void *  cls,
enum GNUNET_MQ_Error  error 
)
static

We got a disconnect after asking regex to do the announcement.

Retry.

Parameters
clsthe struct GNUNET_PEERINFO_Handle to retry
errorerror code

Definition at line 236 of file peerinfo_api.c.

References do_reconnect(), and GNUNET_PEERINFO_IteratorContext::h.

Referenced by reconnect().

238 {
239  struct GNUNET_PEERINFO_Handle *h = cls;
240 
241  do_reconnect (h);
242 }
Handle to the peerinfo service.
Definition: peerinfo_api.c:86
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
static void do_reconnect(struct GNUNET_PEERINFO_Handle *h)
We encountered an error, reconnect to the PEERINFO service.
Definition: peerinfo_api.c:205
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_info()

static int check_info ( void *  cls,
const struct InfoMessage im 
)
static

Function called when we receive an info message.

Check it is well-formed.

Parameters
clsclosure
immessage received
Returns
GNUNET_OK if the message is OK

Definition at line 255 of file peerinfo_api.c.

References GNUNET_break, GNUNET_ERROR_TYPE_ERROR, GNUNET_HELLO_get_id(), GNUNET_HELLO_size(), GNUNET_i2s(), GNUNET_memcmp, GNUNET_OK, GNUNET_SYSERR, GNUNET_YES, GNUNET_PEERINFO_IteratorContext::h, GNUNET_PEERINFO_IteratorContext::have_peer, InfoMessage::header, GNUNET_PEERINFO_Handle::ic_head, LOG, GNUNET_PEERINFO_IteratorContext::peer, InfoMessage::peer, InfoMessage::reserved, and GNUNET_MessageHeader::size.

257 {
258  struct GNUNET_PEERINFO_Handle *h = cls;
260  uint16_t ms = ntohs (im->header.size) - sizeof (*im);
261 
262  if (0 != ntohl (im->reserved))
263  {
264  GNUNET_break (0);
265  return GNUNET_SYSERR;
266  }
267  if (NULL == ic)
268  {
269  /* didn't expect a response, bad */
270  GNUNET_break (0);
271  return GNUNET_SYSERR;
272  }
273  if ( (GNUNET_YES == ic->have_peer) &&
274  (0 != GNUNET_memcmp (&ic->peer,
275  &im->peer)) )
276  {
277  /* bogus message (from a different iteration call?); out of sequence! */
279  "Received HELLO for peer `%s', expected peer `%s'\n",
280  GNUNET_i2s (&im->peer),
281  GNUNET_i2s (&ic->peer));
282  GNUNET_break (0);
283  return GNUNET_SYSERR;
284  }
285  if (ms > sizeof (struct GNUNET_MessageHeader))
286  {
287  const struct GNUNET_HELLO_Message *hello;
288  struct GNUNET_PeerIdentity id;
289 
290  hello = (const struct GNUNET_HELLO_Message *) &im[1];
291  if (ms != GNUNET_HELLO_size (hello))
292  {
293  /* malformed message */
294  GNUNET_break (0);
295  return GNUNET_SYSERR;
296  }
297  if (GNUNET_OK !=
298  GNUNET_HELLO_get_id (hello,
299  &id))
300  {
301  /* malformed message */
302  GNUNET_break (0);
303  return GNUNET_SYSERR;
304  }
305  if (0 != GNUNET_memcmp (&im->peer,
306  &id))
307  {
308  /* malformed message */
309  GNUNET_break (0);
310  return GNUNET_SYSERR;
311  }
312  }
313  else if (0 != ms)
314  {
315  /* malformed message */
316  GNUNET_break (0);
317  return GNUNET_SYSERR;
318  }
319  return GNUNET_OK;
320 }
int GNUNET_HELLO_get_id(const struct GNUNET_HELLO_Message *hello, struct GNUNET_PeerIdentity *peer)
Get the peer identity from a HELLO message.
Definition: hello.c:668
Handle to the peerinfo service.
Definition: peerinfo_api.c:86
A HELLO message is used to exchange information about transports with other peers.
struct GNUNET_PEERINFO_IteratorContext * ic_head
Head of iterator DLL.
Definition: peerinfo_api.c:101
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format...
#define LOG(kind,...)
Definition: peerinfo_api.c:31
Context for an iteration request.
Definition: peerinfo_api.c:37
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
struct GNUNET_PeerIdentity peer
About which peer are we talking here?
Definition: peerinfo.h:123
uint32_t reserved
Always zero.
Definition: peerinfo.h:118
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_PEERINFO_INFO.
Definition: peerinfo.h:113
#define GNUNET_SYSERR
Definition: gnunet_common.h:79
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
The identity of the host (wraps the signing key of the peer).
uint16_t GNUNET_HELLO_size(const struct GNUNET_HELLO_Message *hello)
Return the size of the given HELLO message.
Definition: hello.c:649
Header for all communications.
struct GNUNET_PeerIdentity peer
Peer we are interested in (only valid if iteration was restricted to one peer).
Definition: peerinfo_api.c:68
#define GNUNET_YES
Definition: gnunet_common.h:80
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
Here is the call graph for this function:

◆ handle_info()

static void handle_info ( void *  cls,
const struct InfoMessage im 
)
static

Handle info message.

Parameters
clsclosure
immessage received

Definition at line 330 of file peerinfo_api.c.

References GNUNET_PEERINFO_IteratorContext::callback, GNUNET_PEERINFO_IteratorContext::callback_cls, GNUNET_PEERINFO_IteratorContext::h, InfoMessage::header, GNUNET_PEERINFO_Handle::ic_head, InfoMessage::peer, and GNUNET_MessageHeader::size.

332 {
333  struct GNUNET_PEERINFO_Handle *h = cls;
335  const struct GNUNET_HELLO_Message *hello = NULL;
336  uint16_t ms;
337 
338  ms = ntohs (im->header.size);
339  if (ms > sizeof (struct InfoMessage))
340  hello = (const struct GNUNET_HELLO_Message *) &im[1];
341  if (NULL != ic->callback)
342  ic->callback (ic->callback_cls,
343  &im->peer,
344  hello,
345  NULL);
346 }
Handle to the peerinfo service.
Definition: peerinfo_api.c:86
A HELLO message is used to exchange information about transports with other peers.
Message used to inform the client about a particular peer; this message is optionally followed by a H...
Definition: peerinfo.h:107
struct GNUNET_PEERINFO_IteratorContext * ic_head
Head of iterator DLL.
Definition: peerinfo_api.c:101
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format...
Context for an iteration request.
Definition: peerinfo_api.c:37
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
struct GNUNET_PeerIdentity peer
About which peer are we talking here?
Definition: peerinfo.h:123
void * callback_cls
Closure for callback.
Definition: peerinfo_api.c:63
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_PEERINFO_INFO.
Definition: peerinfo.h:113
GNUNET_PEERINFO_Processor callback
Function to call with the results.
Definition: peerinfo_api.c:58

◆ send_ic_request()

static void send_ic_request ( struct GNUNET_PEERINFO_Handle h)
static

Send the next IC request at the head of the queue.

Parameters
hhandle

Definition at line 355 of file peerinfo_api.c.

References env, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_MESSAGE_TYPE_PEERINFO_GET, GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_PEERINFO_IteratorContext::have_peer, GNUNET_PEERINFO_Handle::ic_head, ListPeerMessage::include_friend_only, ListAllPeersMessage::include_friend_only, GNUNET_PEERINFO_IteratorContext::include_friend_only, LOG, GNUNET_PEERINFO_Handle::mq, ListPeerMessage::peer, and GNUNET_PEERINFO_IteratorContext::peer.

Referenced by GNUNET_PEERINFO_iterate(), handle_end_iteration(), and reconnect().

356 {
358  struct GNUNET_MQ_Envelope *env;
359  struct ListAllPeersMessage *lapm;
360  struct ListPeerMessage *lpm;
361 
362  if (NULL == ic)
363  {
364  GNUNET_break (0);
365  return;
366  }
367  if (NULL == h->mq)
368  {
369  GNUNET_break (0);
370  return;
371  }
372  if (GNUNET_NO == ic->have_peer)
373  {
375  "Requesting list of peers from PEERINFO service\n");
376  env = GNUNET_MQ_msg (lapm,
378  lapm->include_friend_only = htonl (ic->include_friend_only);
379  }
380  else
381  {
383  "Requesting information on peer `%s' from PEERINFO service\n",
384  GNUNET_i2s (&ic->peer));
385  env = GNUNET_MQ_msg (lpm,
387  lpm->include_friend_only = htonl (ic->include_friend_only);
388  lpm->peer = ic->peer;
389  }
390  GNUNET_MQ_send (h->mq,
391  env);
392 }
uint32_t include_friend_only
Include friend only HELLOs and peers in callbacks.
Definition: peerinfo.h:77
#define GNUNET_MESSAGE_TYPE_PEERINFO_GET
Request update and listing of a peer.
struct GNUNET_MQ_Handle * mq
Connection to the service.
Definition: peerinfo_api.c:96
uint32_t include_friend_only
Include friend only HELLOs and peers in callbacks.
Definition: peerinfo.h:53
struct GNUNET_PeerIdentity peer
Restrict to peers with this identity (optional field, check header.size!).
Definition: peerinfo.h:59
struct GNUNET_PEERINFO_IteratorContext * ic_head
Head of iterator DLL.
Definition: peerinfo_api.c:101
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
Definition: gnunet_mq_lib.h:67
#define GNUNET_NO
Definition: gnunet_common.h:81
#define LOG(kind,...)
Definition: peerinfo_api.c:31
Context for an iteration request.
Definition: peerinfo_api.c:37
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
Message requesting a listing of all peers, restricted to the specified peer identity.
Definition: peerinfo.h:67
int include_friend_only
Only include friends in reply?
Definition: peerinfo_api.c:78
Message requesting a listing of peers, restricted to the specified peer identity. ...
Definition: peerinfo.h:42
#define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL
Request update and listing of all peers.
struct GNUNET_PeerIdentity peer
Peer we are interested in (only valid if iteration was restricted to one peer).
Definition: peerinfo_api.c:68
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:353
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_end_iteration()

static void handle_end_iteration ( void *  cls,
const struct GNUNET_MessageHeader msg 
)
static

Type of a function to call when we receive a message from the service.

Call the iterator with the result and (if applicable) continue to receive more messages or trigger processing the next event (if applicable).

Parameters
clsclosure
msgmessage received, NULL on timeout or fatal error

Definition at line 405 of file peerinfo_api.c.

References GNUNET_PEERINFO_IteratorContext::callback, GNUNET_PEERINFO_IteratorContext::callback_cls, GNUNET_break, GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_PEERINFO_IteratorContext::h, GNUNET_PEERINFO_Handle::ic_head, GNUNET_PEERINFO_Handle::ic_tail, LOG, reconnect(), and send_ic_request().

407 {
408  struct GNUNET_PEERINFO_Handle *h = cls;
410 
411  if (NULL == ic)
412  {
413  /* didn't expect a response, reconnect */
414  GNUNET_break (0);
415  reconnect (h);
416  return;
417  }
419  "Received end of list of peers from PEERINFO service\n");
421  h->ic_tail,
422  ic);
423  if (NULL != h->ic_head)
424  send_ic_request (h);
425  if (NULL != ic->callback)
426  ic->callback (ic->callback_cls,
427  NULL,
428  NULL,
429  NULL);
430  GNUNET_free (ic);
431 }
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
Handle to the peerinfo service.
Definition: peerinfo_api.c:86
static void reconnect(struct GNUNET_PEERINFO_Handle *h)
Close the existing connection to PEERINFO and reconnect.
Definition: peerinfo_api.c:440
static void send_ic_request(struct GNUNET_PEERINFO_Handle *h)
Send the next IC request at the head of the queue.
Definition: peerinfo_api.c:355
struct GNUNET_PEERINFO_IteratorContext * ic_tail
Tail of iterator DLL.
Definition: peerinfo_api.c:106
struct GNUNET_PEERINFO_IteratorContext * ic_head
Head of iterator DLL.
Definition: peerinfo_api.c:101
#define LOG(kind,...)
Definition: peerinfo_api.c:31
Context for an iteration request.
Definition: peerinfo_api.c:37
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:94
void * callback_cls
Closure for callback.
Definition: peerinfo_api.c:63
GNUNET_PEERINFO_Processor callback
Function to call with the results.
Definition: peerinfo_api.c:58
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function: