GNUnet  0.20.0
gnunet-service-transport_manipulation.c File Reference

transport component manipulation traffic for simulation More...

Include dependency graph for gnunet-service-transport_manipulation.c:

Go to the source code of this file.

Data Structures

struct  TM_Peer
 Struct containing information about manipulations to a specific peer. More...
 
struct  DelayQueueEntry
 Entry in the delay queue for an outbound delayed message. More...
 

Functions

void GST_manipulation_set_metric (const struct TrafficMetricMessage *tm)
 Set traffic metric to manipulate. More...
 
static void send_delayed (void *cls)
 We have delayed transmission, now it is time to send the message. 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...
 
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...
 
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_init ()
 Initialize traffic manipulation. More...
 
void GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer)
 Notify manipulation about disconnect so it can discard queued messages. More...
 
static int free_tmps (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
 Free manipulation information about a peer. More...
 
void GST_manipulation_stop ()
 Stop traffic manipulation. More...
 

Variables

static struct GNUNET_CONTAINER_MultiPeerMappeers
 Hashmap contain all peers currently manipulated. More...
 
static struct GNUNET_TIME_Relative delay_in
 Inbound delay to apply to all peers. More...
 
static struct GNUNET_TIME_Relative delay_out
 Outbound delay to apply to all peers. More...
 
static struct DelayQueueEntrygeneric_dqe_head
 DLL head for delayed messages based on general delay. More...
 
static struct DelayQueueEntrygeneric_dqe_tail
 DLL tail for delayed messages based on general delay. More...
 
static struct GNUNET_SCHEDULER_Taskgeneric_send_delay_task
 Task to schedule delayed sending based on general delay. More...
 

Detailed Description

transport component manipulation traffic for simulation

Author
Christian Grothoff
Matthias Wachs

Definition in file gnunet-service-transport_manipulation.c.

Function Documentation

◆ GST_manipulation_set_metric()

void GST_manipulation_set_metric ( const struct TrafficMetricMessage tm)

Set traffic metric to manipulate.

Parameters
tmmessage containing information

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

175 {
176  static struct GNUNET_PeerIdentity zero;
177  struct TM_Peer *tmp;
178 
179  if (0 == memcmp (&tm->peer,
180  &zero,
181  sizeof(struct GNUNET_PeerIdentity)))
182  {
184  "Received traffic metrics for all peers\n");
187  return;
188  }
190  "Received traffic metrics for peer `%s'\n",
191  GNUNET_i2s (&tm->peer));
192  if (NULL ==
194  &tm->peer)))
195  {
196  tmp = GNUNET_new (struct TM_Peer);
197  tmp->peer = tm->peer;
199  &tm->peer,
200  tmp,
202  }
204  &tm->properties);
207 }
static const struct GNUNET_IDENTITY_PrivateKey zero
Public key of all zeros.
static struct GNUNET_CONTAINER_MultiPeerMap * peers
Hashmap contain all peers currently manipulated.
static struct GNUNET_TIME_Relative delay_out
Outbound delay to apply to all peers.
static struct GNUNET_TIME_Relative delay_in
Inbound delay to apply to all peers.
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.
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.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST
, ' bother checking if a value already exists (faster than GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE...
#define GNUNET_log(kind,...)
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_new(type)
Allocate a struct or union of the given type.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh(struct GNUNET_TIME_RelativeNBO a)
Convert relative time from network byte order.
Definition: time.c:628
The identity of the host (wraps the signing key of the peer).
Struct containing information about manipulations to a specific peer.
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_PeerIdentity peer
Peer ID.
struct GNUNET_ATS_Properties properties
Manipulated properties to use for this peer.
struct GNUNET_TIME_RelativeNBO delay_in
Fake delay to add on inbound traffic.
Definition: transport.h:518
struct GNUNET_TIME_RelativeNBO delay_out
Fake delay to add on outbound traffic.
Definition: transport.h:523
struct GNUNET_ATS_PropertiesNBO properties
Fake properties to generate.
Definition: transport.h:513
struct GNUNET_PeerIdentity peer
The identity of the peer to look up.
Definition: transport.h:508

References delay_in, TM_Peer::delay_in, TrafficMetricMessage::delay_in, delay_out, TM_Peer::delay_out, TrafficMetricMessage::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(), TM_Peer::peer, TrafficMetricMessage::peer, peers, TM_Peer::properties, TrafficMetricMessage::properties, and zero.

Referenced by handle_client_set_metric().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_delayed()

static void send_delayed ( void *  cls)
static

We have delayed transmission, now it is time to send the message.

Parameters
clsthe struct DelayQueueEntry to transmit

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

218 {
219  struct DelayQueueEntry *dqe = cls;
220  struct DelayQueueEntry *next;
221  struct TM_Peer *tmp = dqe->tmp;
222 
225  if (NULL != tmp)
226  {
227  tmp->send_delay_task = NULL;
229  tmp->send_tail,
230  dqe);
231  next = tmp->send_head;
232  if (NULL != next)
233  {
234  /* More delayed messages */
236  &send_delayed,
237  next);
238  }
239  }
240  else
241  {
242  /* Remove from generic queue */
246  dqe);
247  next = generic_dqe_head;
248  if (NULL != next)
249  {
250  /* More delayed messages */
252  &send_delayed,
253  next);
254  }
255  }
256  GST_neighbours_send (&dqe->id,
257  dqe->msg,
258  dqe->msg_size,
259  dqe->timeout,
260  dqe->cont,
261  dqe->cont_cls);
262  GNUNET_free (dqe);
263 }
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 void send_delayed(void *cls)
We have delayed transmission, now it is time to send the message.
static struct DelayQueueEntry * generic_dqe_tail
DLL tail for delayed messages based on general delay.
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.
int GST_neighbours_test_connected(const struct GNUNET_PeerIdentity *target)
Test if we're connected to the given peer.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
@ GNUNET_YES
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
#define GNUNET_free(ptr)
Wrapper around free.
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:1249
Entry in the delay queue for an outbound delayed message.
struct GNUNET_PeerIdentity id
Peer ID.
struct GNUNET_TIME_Relative timeout
Message timeout.
GST_NeighbourSendContinuation cont
Transports send continuation.
struct TM_Peer * tmp
Peer this entry is belonging to if (NULL == tmp): enqueued in generic DLL and scheduled by generic_se...
void * cont_cls
Transports send continuation cls.
struct DelayQueueEntry * next
Previous in DLL.
struct GNUNET_TIME_Absolute sent_at
Absolute time when to send.
struct GNUNET_SCHEDULER_Task * send_delay_task
Task to schedule delayed sendding.
struct DelayQueueEntry * send_tail
Send queue DLL tail.
struct DelayQueueEntry * send_head
Send queue DLL head.

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, generic_dqe_head, generic_dqe_tail, generic_send_delay_task, GNUNET_break, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_add_at(), GNUNET_YES, GST_neighbours_send(), GST_neighbours_test_connected(), DelayQueueEntry::id, DelayQueueEntry::msg, DelayQueueEntry::msg_size, DelayQueueEntry::next, TM_Peer::send_delay_task, TM_Peer::send_head, TM_Peer::send_tail, DelayQueueEntry::sent_at, DelayQueueEntry::timeout, and DelayQueueEntry::tmp.

Referenced by GST_manipulation_peer_disconnect(), and GST_manipulation_send().

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.

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 278 of file gnunet-service-transport_manipulation.c.

284 {
285  struct TM_Peer *tmp;
286  struct DelayQueueEntry *dqe;
288 
289  if (NULL != (tmp =
291  target)))
292  delay = tmp->delay_out;
293  else
294  delay = delay_out;
295  if (0 == delay.rel_value_us)
296  {
297  /* Normal sending */
298  GST_neighbours_send (target,
299  msg,
300  msg_size,
301  timeout,
302  cont, cont_cls);
303  return;
304  }
305  dqe = GNUNET_malloc (sizeof(struct DelayQueueEntry) + msg_size);
306  dqe->id = *target;
307  dqe->tmp = tmp;
309  dqe->cont = cont;
310  dqe->cont_cls = cont_cls;
311  dqe->msg = &dqe[1];
312  dqe->msg_size = msg_size;
313  dqe->timeout = timeout;
314  GNUNET_memcpy (dqe->msg,
315  msg,
316  msg_size);
317  if (NULL == tmp)
318  {
321  dqe);
322  if (NULL == generic_send_delay_task)
324  &send_delayed,
325  dqe);
326  }
327  else
328  {
330  tmp->send_tail,
331  dqe);
332  if (NULL == tmp->send_delay_task)
334  &send_delayed,
335  dqe);
336  }
338  "Delaying %u byte message to peer `%s' with peer specific delay for %s\n",
339  (unsigned int) msg_size,
340  GNUNET_i2s (target),
342  GNUNET_YES));
343 }
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
static struct GNUNET_TIME_Relative timeout
Desired timeout for the lookup (default is no timeout).
Definition: gnunet-abd.c:61
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_malloc(size)
Wrapper around malloc.
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:1272
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:316
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:569
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, delay, delay_out, TM_Peer::delay_out, generic_dqe_head, generic_dqe_tail, generic_send_delay_task, 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, msg, DelayQueueEntry::msg, DelayQueueEntry::msg_size, peers, 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().

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
[in,out]propmetrics to modify

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

358 {
359  const struct GNUNET_PeerIdentity *peer = &address->peer;
360  struct TM_Peer *tmp;
361 
363  peer);
364  if (NULL != tmp)
365  *prop = tmp->properties;
366 }
static char * address
GNS address for this phone.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.

References address, GNUNET_CONTAINER_multipeermap_get(), peer, peers, and TM_Peer::properties.

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

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 355 of file gnunet-service-transport_manipulation.c.

384 {
385  struct TM_Peer *tmp;
386  struct GNUNET_TIME_Relative quota_delay;
387  struct GNUNET_TIME_Relative m_delay;
388 
389  if (NULL !=
391  &address->peer)))
392  m_delay = tmp->delay_in;
393  else
394  m_delay = delay_in;
395 
396  quota_delay = GST_receive_callback (cls,
397  address,
398  session,
399  message);
400  m_delay = GNUNET_TIME_relative_max (m_delay,
401  quota_delay);
403  "Delaying next receive for peer `%s' for %s\n",
404  GNUNET_i2s (&address->peer),
406  GNUNET_YES));
407  return m_delay;
408 }
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_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:351

Referenced by run().

Here is the caller graph for this function:

◆ GST_manipulation_init()

void GST_manipulation_init ( void  )

Initialize traffic manipulation.

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

416 {
418 
419  if ((GNUNET_OK ==
421  "transport",
422  "MANIPULATE_DELAY_IN",
423  &delay)) &&
424  (delay.rel_value_us > 0))
425  {
427  "Delaying inbound traffic for %s\n",
429  GNUNET_YES));
430  delay_in = delay;
431  }
432  if ((GNUNET_OK ==
434  "transport",
435  "MANIPULATE_DELAY_OUT",
436  &delay)) &&
437  (delay.rel_value_us > 0))
438  {
440  "Delaying outbound traffic for %s\n",
442  GNUNET_YES));
443  delay_out = delay;
444  }
446  GNUNET_NO);
447 }
static const struct GNUNET_CONFIGURATION_Handle * GST_cfg
Configuration handle.
enum GNUNET_GenericReturnValue 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.
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).
@ GNUNET_OK
@ GNUNET_NO
@ GNUNET_ERROR_TYPE_INFO

References delay, delay_in, 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, peers, and GNUNET_TIME_Relative::rel_value_us.

Referenced by run().

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 456 of file gnunet-service-transport_manipulation.c.

457 {
458  struct TM_Peer *tmp;
459  struct DelayQueueEntry *dqe;
460  struct DelayQueueEntry *next;
461 
463  peer);
464  if (NULL != tmp)
465  {
466  while (NULL != (dqe = tmp->send_head))
467  {
469  tmp->send_tail,
470  dqe);
471  if (NULL != dqe->cont)
472  dqe->cont (dqe->cont_cls,
474  dqe->msg_size,
475  0);
476  GNUNET_free (dqe);
477  }
478  }
480  while (NULL != (dqe = next))
481  {
482  next = dqe->next;
483  if (0 == memcmp (peer,
484  &dqe->id,
485  sizeof(dqe->id)))
486  {
489  dqe);
490  if (NULL != dqe->cont)
491  dqe->cont (dqe->cont_cls,
493  dqe->msg_size,
494  0);
495  GNUNET_free (dqe);
496  }
497  }
498  if (NULL != generic_send_delay_task)
499  {
502  if (NULL != generic_dqe_head)
505  &send_delayed,
507  }
508 }
@ GNUNET_SYSERR
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:975

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, generic_dqe_head, generic_dqe_tail, generic_send_delay_task, 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, peer, peers, send_delayed(), TM_Peer::send_head, TM_Peer::send_tail, DelayQueueEntry::sent_at, and DelayQueueEntry::tmp.

Referenced by neighbours_disconnect_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_tmps()

static int free_tmps ( void *  cls,
const struct GNUNET_PeerIdentity key,
void *  value 
)
static

Free manipulation information about a peer.

Parameters
clsNULL
keypeer the info is about
valuea struct TM_Peer to free
Returns
GNUNET_OK (continue to iterate)

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

523 {
524  struct TM_Peer *tmp = value;
525  struct DelayQueueEntry *dqe;
526 
529  key,
530  value));
531  while (NULL != (dqe = tmp->send_head))
532  {
534  tmp->send_tail,
535  dqe);
536  if (NULL != dqe->cont)
537  dqe->cont (dqe->cont_cls,
539  dqe->msg_size,
540  0);
541  GNUNET_free (dqe);
542  }
543  if (NULL != tmp->send_delay_task)
544  {
546  tmp->send_delay_task = NULL;
547  }
548  GNUNET_free (tmp);
549  return GNUNET_OK;
550 }
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multipeermap_remove(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Remove the given key-value pair from the map.

References DelayQueueEntry::cont, DelayQueueEntry::cont_cls, GNUNET_break, GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multipeermap_remove(), GNUNET_free, GNUNET_OK, GNUNET_SCHEDULER_cancel(), GNUNET_SYSERR, GNUNET_YES, key, DelayQueueEntry::msg_size, peers, TM_Peer::send_delay_task, TM_Peer::send_head, TM_Peer::send_tail, DelayQueueEntry::tmp, and value.

Here is the call graph for this function:

◆ GST_manipulation_stop()

void GST_manipulation_stop ( void  )

Stop traffic manipulation.

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

558 {
559  struct DelayQueueEntry *cur;
560 
562  &free_tmps,
563  NULL);
565  peers = NULL;
566  while (NULL != (cur = generic_dqe_head))
567  {
570  cur);
571  if (NULL != cur->cont)
572  cur->cont (cur->cont_cls,
574  cur->msg_size,
575  0);
576  GNUNET_free (cur);
577  }
578  if (NULL != generic_send_delay_task)
579  {
582  }
583 }
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.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.

Referenced by shutdown_task().

Here is the caller graph for this function:

Variable Documentation

◆ peers

◆ delay_in

struct GNUNET_TIME_Relative delay_in
static

Inbound delay to apply to all peers.

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

Referenced by GNUNET_TRANSPORT_manipulation_set(), GST_manipulation_init(), and GST_manipulation_set_metric().

◆ delay_out

struct GNUNET_TIME_Relative delay_out
static

◆ generic_dqe_head

struct DelayQueueEntry* generic_dqe_head
static

DLL head for delayed messages based on general delay.

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

Referenced by GST_manipulation_peer_disconnect(), GST_manipulation_send(), and send_delayed().

◆ generic_dqe_tail

struct DelayQueueEntry* generic_dqe_tail
static

DLL tail for delayed messages based on general delay.

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

Referenced by GST_manipulation_peer_disconnect(), GST_manipulation_send(), and send_delayed().

◆ generic_send_delay_task

struct GNUNET_SCHEDULER_Task* generic_send_delay_task
static

Task to schedule delayed sending based on general delay.

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

Referenced by GST_manipulation_peer_disconnect(), GST_manipulation_send(), and send_delayed().