GNUnet  0.10.x
Functions
gnunet-service-transport_manipulation.h File Reference
#include "platform.h"
#include "gnunet-service-transport_hello.h"
#include "gnunet-service-transport_neighbours.h"
#include "gnunet-service-transport_plugins.h"
#include "gnunet-service-transport_validation.h"
#include "gnunet-service-transport.h"
#include "transport.h"
Include dependency graph for gnunet-service-transport_manipulation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GST_manipulation_set_metric (const struct TrafficMetricMessage *tm)
 Set traffic metric to manipulate. More...
 
void GST_manipulation_send (const struct GNUNET_PeerIdentity *target, const void *msg, size_t msg_size, struct GNUNET_TIME_Relative timeout, GST_NeighbourSendContinuation cont, void *cont_cls)
 Adapter function between transport's send function and transport plugins. More...
 
struct GNUNET_TIME_Relative GST_manipulation_recv (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
 Adapter function between transport plugins and transport receive function manipulation delays for next send. More...
 
void GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, struct GNUNET_ATS_Properties *prop)
 Function that will be called to manipulate ATS information according to current manipulation settings. More...
 
void GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer)
 Notify manipulation about disconnect so it can discard queued messages. More...
 
void GST_manipulation_init (void)
 Initialize traffic manipulation. More...
 
void GST_manipulation_stop (void)
 Stop traffic manipulation. More...
 

Function Documentation

◆ GST_manipulation_set_metric()

void GST_manipulation_set_metric ( const struct TrafficMetricMessage tm)

Set traffic metric to manipulate.

Parameters
messagecontaining information

Definition at line 172 of file gnunet-service-transport_manipulation.c.

References TrafficMetricMessage::delay_in, TM_Peer::delay_in, TrafficMetricMessage::delay_out, TM_Peer::delay_out, GNUNET_ATS_properties_ntoh(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_CONTAINER_multipeermap_get(), GNUNET_CONTAINER_multipeermap_put(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_new, GNUNET_TIME_relative_ntoh(), TrafficMetricMessage::peer, TM_Peer::peer, TrafficMetricMessage::properties, and TM_Peer::properties.

Referenced by handle_client_set_metric().

173 {
174  static struct GNUNET_PeerIdentity zero;
175  struct TM_Peer *tmp;
176 
177  if (0 == memcmp(&tm->peer,
178  &zero,
179  sizeof(struct GNUNET_PeerIdentity)))
180  {
182  "Received traffic metrics for all peers\n");
185  return;
186  }
188  "Received traffic metrics for peer `%s'\n",
189  GNUNET_i2s(&tm->peer));
190  if (NULL ==
192  &tm->peer)))
193  {
194  tmp = GNUNET_new(struct TM_Peer);
195  tmp->peer = tm->peer;
197  &tm->peer,
198  tmp,
200  }
202  &tm->properties);
205 }
static const struct GNUNET_CRYPTO_EcdsaPrivateKey zero
Public key of all zeros.
struct GNUNET_PeerIdentity peer
The identity of the peer to look up.
Definition: transport.h:494
static struct GNUNET_TIME_Relative delay_in
Inbound delay to apply to all peers.
struct GNUNET_TIME_Relative delay_in
How long to delay incoming messages for this peer.
struct GNUNET_TIME_Relative delay_out
How long to delay outgoing messages for this peer.
struct GNUNET_TIME_RelativeNBO delay_in
Fake delay to add on inbound traffic.
Definition: transport.h:504
#define GNUNET_new(type)
Allocate a struct or union of the given type.
struct GNUNET_TIME_RelativeNBO delay_out
Fake delay to add on outbound traffic.
Definition: transport.h:509
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
, ' bother checking if a value already exists (faster than GNUNET_CONTAINER_MULTIHASHMAPOPTION_...
Struct containing information about manipulations to a specific peer.
struct GNUNET_ATS_Properties properties
Manipulated properties to use for this peer.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh(struct GNUNET_TIME_RelativeNBO a)
Convert relative time from network byte order.
Definition: time.c:639
struct GNUNET_ATS_PropertiesNBO properties
Fake properties to generate.
Definition: transport.h:499
static struct GNUNET_TIME_Relative delay_out
Outbound delay to apply to all peers.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
The identity of the host (wraps the signing key of the peer).
void GNUNET_ATS_properties_ntoh(struct GNUNET_ATS_Properties *hbo, const struct GNUNET_ATS_PropertiesNBO *nbo)
Convert ATS properties from network to host byte order.
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
#define GNUNET_log(kind,...)
struct GNUNET_PeerIdentity peer
Peer ID.
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:

◆ GST_manipulation_send()

void GST_manipulation_send ( const struct GNUNET_PeerIdentity target,
const void *  msg,
size_t  msg_size,
struct GNUNET_TIME_Relative  timeout,
GST_NeighbourSendContinuation  cont,
void *  cont_cls 
)

Adapter function between transport's send function and transport plugins.

Parameters
targetthe peer the message to send to
msgthe message received
msg_sizemessage size
timeouttimeout
contthe continuation to call after sending
cont_clscls for continuation

Delays message transmission if an artificial delay is configured.

Parameters
targetthe peer the message to send to
msgthe message received
msg_sizemessage size
timeouttimeout
contthe continuation to call after sending
cont_clscls for cont

Definition at line 276 of file gnunet-service-transport_manipulation.c.

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, TM_Peer::delay_out, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_CONTAINER_multipeermap_get(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_SCHEDULER_add_delayed(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_relative_to_absolute(), GNUNET_YES, GST_neighbours_send(), DelayQueueEntry::id, DelayQueueEntry::msg, DelayQueueEntry::msg_size, GNUNET_TIME_Relative::rel_value_us, TM_Peer::send_delay_task, send_delayed(), TM_Peer::send_head, TM_Peer::send_tail, DelayQueueEntry::sent_at, timeout, DelayQueueEntry::timeout, and DelayQueueEntry::tmp.

Referenced by handle_client_send().

282 {
283  struct TM_Peer *tmp;
284  struct DelayQueueEntry *dqe;
286 
287  if (NULL != (tmp =
289  target)))
290  delay = tmp->delay_out;
291  else
292  delay = delay_out;
293  if (0 == delay.rel_value_us)
294  {
295  /* Normal sending */
296  GST_neighbours_send(target,
297  msg,
298  msg_size,
299  timeout,
300  cont, cont_cls);
301  return;
302  }
303  dqe = GNUNET_malloc(sizeof(struct DelayQueueEntry) + msg_size);
304  dqe->id = *target;
305  dqe->tmp = tmp;
307  dqe->cont = cont;
308  dqe->cont_cls = cont_cls;
309  dqe->msg = &dqe[1];
310  dqe->msg_size = msg_size;
311  dqe->timeout = timeout;
312  GNUNET_memcpy(dqe->msg,
313  msg,
314  msg_size);
315  if (NULL == tmp)
316  {
319  dqe);
320  if (NULL == generic_send_delay_task)
322  &send_delayed,
323  dqe);
324  }
325  else
326  {
328  tmp->send_tail,
329  dqe);
330  if (NULL == tmp->send_delay_task)
332  &send_delayed,
333  dqe);
334  }
336  "Delaying %u byte message to peer `%s' with peer specific delay for %s\n",
337  (unsigned int)msg_size,
338  GNUNET_i2s(target),
340  GNUNET_YES));
341 }
Entry in the delay queue for an outbound delayed message.
struct DelayQueueEntry * send_head
Send queue DLL head.
struct DelayQueueEntry * send_tail
Send queue DLL tail.
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
void * cont_cls
Transports send continuation cls.
uint64_t rel_value_us
The actual value.
struct GNUNET_TIME_Relative delay_out
How long to delay outgoing messages for this peer.
struct TM_Peer * tmp
Peer this entry is belonging to if (NULL == tmp): enqueued in generic DLL and scheduled by generic_se...
struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute(struct GNUNET_TIME_Relative rel)
Convert relative time to an absolute time in the future.
Definition: time.c:246
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
GST_NeighbourSendContinuation cont
Transports send continuation.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1237
struct GNUNET_SCHEDULER_Task * send_delay_task
Task to schedule delayed sendding.
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:114
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
Struct containing information about manipulations to a specific peer.
static void send_delayed(void *cls)
We have delayed transmission, now it is time to send the message.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
Definition: strings.c:686
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
static struct GNUNET_TIME_Relative delay_out
Outbound delay to apply to all peers.
static struct DelayQueueEntry * generic_dqe_head
DLL head for delayed messages based on general delay.
static struct GNUNET_SCHEDULER_Task * generic_send_delay_task
Task to schedule delayed sending based on general delay.
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
#define GNUNET_log(kind,...)
void GST_neighbours_send(const struct GNUNET_PeerIdentity *target, const void *msg, size_t msg_size, struct GNUNET_TIME_Relative timeout, GST_NeighbourSendContinuation cont, void *cont_cls)
Transmit a message to the given target using the active connection.
struct GNUNET_TIME_Relative timeout
Message timeout.
#define GNUNET_YES
Definition: gnunet_common.h:77
struct GNUNET_TIME_Absolute sent_at
Absolute time when to send.
static struct DelayQueueEntry * generic_dqe_tail
DLL tail for delayed messages based on general delay.
struct GNUNET_PeerIdentity id
Peer ID.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_malloc(size)
Wrapper around malloc.
Time for relative time used by GNUnet, in microseconds.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GST_manipulation_recv()

struct GNUNET_TIME_Relative GST_manipulation_recv ( void *  cls,
const struct GNUNET_HELLO_Address address,
struct GNUNET_ATS_Session session,
const struct GNUNET_MessageHeader message 
)

Adapter function between transport plugins and transport receive function manipulation delays for next send.

Parameters
clsthe closure for transport
addressthe address and the peer the message was received from
messagethe message received
sessionthe session the message was received on
Returns
manipulated delay for next receive

Definition at line 378 of file gnunet-service-transport_manipulation.c.

References TM_Peer::delay_in, GNUNET_CONTAINER_multipeermap_get(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_relative_max(), GNUNET_YES, GST_receive_callback(), and GNUNET_HELLO_Address::peer.

Referenced by run().

382 {
383  struct TM_Peer *tmp;
384  struct GNUNET_TIME_Relative quota_delay;
385  struct GNUNET_TIME_Relative m_delay;
386 
387  if (NULL !=
389  &address->peer)))
390  m_delay = tmp->delay_in;
391  else
392  m_delay = delay_in;
393 
394  quota_delay = GST_receive_callback(cls,
395  address,
396  session,
397  message);
398  m_delay = GNUNET_TIME_relative_max(m_delay,
399  quota_delay);
401  "Delaying next receive for peer `%s' for %s\n",
402  GNUNET_i2s(&address->peer),
404  GNUNET_YES));
405  return m_delay;
406 }
static struct GNUNET_TIME_Relative delay_in
Inbound delay to apply to all peers.
struct GNUNET_TIME_Relative delay_in
How long to delay incoming messages for this peer.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_max(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the maximum of two relative time values.
Definition: time.c:287
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
Struct containing information about manipulations to a specific peer.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
Definition: strings.c:686
struct GNUNET_TIME_Relative GST_receive_callback(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
Function called by the transport for each received message.
struct GNUNET_PeerIdentity peer
For which peer is this an address?
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
#define GNUNET_log(kind,...)
#define GNUNET_YES
Definition: gnunet_common.h:77
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
Time for relative time used by GNUnet, in microseconds.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GST_manipulation_manipulate_metrics()

void GST_manipulation_manipulate_metrics ( const struct GNUNET_HELLO_Address address,
struct GNUNET_ATS_Session session,
struct GNUNET_ATS_Properties prop 
)

Function that will be called to manipulate ATS information according to current manipulation settings.

Parameters
addressbinary address
sessionthe session
prop[IN|OUT]metrics to modify

Definition at line 353 of file gnunet-service-transport_manipulation.c.

References GNUNET_CONTAINER_multipeermap_get(), GNUNET_HELLO_Address::peer, TM_Peer::peer, and TM_Peer::properties.

Referenced by GST_ats_update_delay(), GST_ats_update_distance(), and GST_ats_update_utilization().

356 {
357  const struct GNUNET_PeerIdentity *peer = &address->peer;
358  struct TM_Peer *tmp;
359 
361  peer);
362  if (NULL != tmp)
363  *prop = tmp->properties;
364 }
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
Struct containing information about manipulations to a specific peer.
struct GNUNET_ATS_Properties properties
Manipulated properties to use for this peer.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_PeerIdentity peer
For which peer is this an address?
The identity of the host (wraps the signing key of the peer).
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GST_manipulation_peer_disconnect()

void GST_manipulation_peer_disconnect ( const struct GNUNET_PeerIdentity peer)

Notify manipulation about disconnect so it can discard queued messages.

Parameters
peerthe disconnecting peer

Definition at line 454 of file gnunet-service-transport_manipulation.c.

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, generic_dqe_head, GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multipeermap_get(), GNUNET_free, GNUNET_SCHEDULER_add_at(), GNUNET_SCHEDULER_cancel(), GNUNET_SYSERR, DelayQueueEntry::id, DelayQueueEntry::msg_size, DelayQueueEntry::next, send_delayed(), TM_Peer::send_head, TM_Peer::send_tail, and DelayQueueEntry::sent_at.

Referenced by neighbours_disconnect_notification().

455 {
456  struct TM_Peer *tmp;
457  struct DelayQueueEntry *dqe;
458  struct DelayQueueEntry *next;
459 
461  peer);
462  if (NULL != tmp)
463  {
464  while (NULL != (dqe = tmp->send_head))
465  {
467  tmp->send_tail,
468  dqe);
469  if (NULL != dqe->cont)
470  dqe->cont(dqe->cont_cls,
472  dqe->msg_size,
473  0);
474  GNUNET_free(dqe);
475  }
476  }
477  next = generic_dqe_head;
478  while (NULL != (dqe = next))
479  {
480  next = dqe->next;
481  if (0 == memcmp(peer,
482  &dqe->id,
483  sizeof(dqe->id)))
484  {
487  dqe);
488  if (NULL != dqe->cont)
489  dqe->cont(dqe->cont_cls,
491  dqe->msg_size,
492  0);
493  GNUNET_free(dqe);
494  }
495  }
496  if (NULL != generic_send_delay_task)
497  {
500  if (NULL != generic_dqe_head)
503  &send_delayed,
505  }
506 }
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
Entry in the delay queue for an outbound delayed message.
struct DelayQueueEntry * send_head
Send queue DLL head.
struct DelayQueueEntry * send_tail
Send queue DLL tail.
void * cont_cls
Transports send continuation cls.
GST_NeighbourSendContinuation cont
Transports send continuation.
struct DelayQueueEntry * next
Previous in DLL.
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
Struct containing information about manipulations to a specific peer.
static void send_delayed(void *cls)
We have delayed transmission, now it is time to send the message.
#define GNUNET_SYSERR
Definition: gnunet_common.h:76
static struct DelayQueueEntry * generic_dqe_head
DLL head for delayed messages based on general delay.
static struct GNUNET_SCHEDULER_Task * generic_send_delay_task
Task to schedule delayed sending based on general delay.
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
struct GNUNET_TIME_Absolute sent_at
Absolute time when to send.
static struct DelayQueueEntry * generic_dqe_tail
DLL tail for delayed messages based on general delay.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_at(struct GNUNET_TIME_Absolute at, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run at the specified time.
Definition: scheduler.c:1214
struct GNUNET_PeerIdentity id
Peer ID.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:956
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GST_manipulation_init()

void GST_manipulation_init ( void  )

Initialize traffic manipulation.

Definition at line 413 of file gnunet-service-transport_manipulation.c.

References delay, TM_Peer::delay_in, TM_Peer::delay_out, GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONTAINER_multipeermap_create(), GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_OK, GNUNET_STRINGS_relative_time_to_string(), GNUNET_YES, GST_cfg, and GNUNET_TIME_Relative::rel_value_us.

Referenced by run().

414 {
416 
417  if ((GNUNET_OK ==
419  "transport",
420  "MANIPULATE_DELAY_IN",
421  &delay)) &&
422  (delay.rel_value_us > 0))
423  {
425  "Delaying inbound traffic for %s\n",
427  GNUNET_YES));
428  delay_in = delay;
429  }
430  if ((GNUNET_OK ==
432  "transport",
433  "MANIPULATE_DELAY_OUT",
434  &delay)) &&
435  (delay.rel_value_us > 0))
436  {
438  "Delaying outbound traffic for %s\n",
440  GNUNET_YES));
441  delay_out = delay;
442  }
444  GNUNET_NO);
445 }
static struct GNUNET_TIME_Relative delay_in
Inbound delay to apply to all peers.
int GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
uint64_t rel_value_us
The actual value.
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
Definition: strings.c:686
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
static struct GNUNET_TIME_Relative delay_out
Outbound delay to apply to all peers.
#define GNUNET_log(kind,...)
#define GNUNET_YES
Definition: gnunet_common.h:77
static const struct GNUNET_CONFIGURATION_Handle * GST_cfg
Configuration handle.
Time for relative time used by GNUnet, in microseconds.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GST_manipulation_stop()

void GST_manipulation_stop ( void  )

Stop traffic manipulation.

Definition at line 555 of file gnunet-service-transport_manipulation.c.

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, free_tmps(), GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multipeermap_destroy(), GNUNET_CONTAINER_multipeermap_iterate(), GNUNET_free, GNUNET_SCHEDULER_cancel(), GNUNET_SYSERR, and DelayQueueEntry::msg_size.

Referenced by shutdown_task().

556 {
557  struct DelayQueueEntry *cur;
558 
560  &free_tmps,
561  NULL);
563  peers = NULL;
564  while (NULL != (cur = generic_dqe_head))
565  {
568  cur);
569  if (NULL != cur->cont)
570  cur->cont(cur->cont_cls,
572  cur->msg_size,
573  0);
574  GNUNET_free(cur);
575  }
576  if (NULL != generic_send_delay_task)
577  {
580  }
581 }
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
Entry in the delay queue for an outbound delayed message.
void * cont_cls
Transports send continuation cls.
static int free_tmps(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Free manipulation information about a peer.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
GST_NeighbourSendContinuation cont
Transports send continuation.
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
#define GNUNET_SYSERR
Definition: gnunet_common.h:76
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
static struct DelayQueueEntry * generic_dqe_head
DLL head for delayed messages based on general delay.
static struct GNUNET_SCHEDULER_Task * generic_send_delay_task
Task to schedule delayed sending based on general delay.
static struct DelayQueueEntry * generic_dqe_tail
DLL tail for delayed messages based on general delay.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:956
Here is the call graph for this function:
Here is the caller graph for this function: