library to help fragment messages More...
Go to the source code of this file.
Data Structures | |
struct | GNUNET_FRAGMENT_Context |
Fragmentation context. More... | |
Macros | |
#define | MIN_ACK_DELAY |
Absolute minimum delay we impose between sending and expecting ACK to arrive. More... | |
Functions | |
const char * | GNUNET_FRAGMENT_print_ack (const struct GNUNET_MessageHeader *ack) |
Convert an ACK message to a printable format suitable for logging. More... | |
static void | transmit_next (void *cls) |
Transmit the next fragment to the other peer. More... | |
struct GNUNET_FRAGMENT_Context * | GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats, uint16_t mtu, struct GNUNET_BANDWIDTH_Tracker *tracker, struct GNUNET_TIME_Relative msg_delay, struct GNUNET_TIME_Relative ack_delay, const struct GNUNET_MessageHeader *msg, GNUNET_FRAGMENT_MessageProcessor proc, void *proc_cls) |
Create a fragmentation context for the given message. More... | |
void | GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context *fc) |
Continuation to call from the 'proc' function after the fragment has been transmitted (and hence the next fragment can now be given to proc). More... | |
int | GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc, const struct GNUNET_MessageHeader *msg) |
Process an acknowledgement message we got from the other side (to control re-transmits). More... | |
void | GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc, struct GNUNET_TIME_Relative *msg_delay, struct GNUNET_TIME_Relative *ack_delay) |
Destroy the given fragmentation context (stop calling 'proc', free resources). More... | |
library to help fragment messages
Definition in file fragmentation.c.
#define MIN_ACK_DELAY |
Absolute minimum delay we impose between sending and expecting ACK to arrive.
Definition at line 33 of file fragmentation.c.
|
static |
Transmit the next fragment to the other peer.
cls | the struct GNUNET_FRAGMENT_Context |
Definition at line 171 of file fragmentation.c.
References _, GNUNET_TIME_Absolute::abs_value_us, GNUNET_FRAGMENT_Context::ack_delay, GNUNET_FRAGMENT_Context::acks, delay, GNUNET_FRAGMENT_Context::delay_until, fh, GNUNET_FRAGMENT_Context::fragment_id, GNUNET_assert, GNUNET_BANDWIDTH_tracker_consume(), GNUNET_BANDWIDTH_tracker_get_delay(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_FRAGMENT, GNUNET_NO, GNUNET_SCHEDULER_add_delayed(), GNUNET_STATISTICS_update(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_TIME_relative_max(), GNUNET_TIME_relative_saturating_multiply(), GNUNET_TIME_relative_to_absolute(), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_TIME_UNIT_ZERO, GNUNET_YES, GNUNET_FRAGMENT_Context::last_round, MIN_ACK_DELAY, msg, GNUNET_FRAGMENT_Context::msg, GNUNET_FRAGMENT_Context::msg_delay, GNUNET_FRAGMENT_Context::mtu, GNUNET_FRAGMENT_Context::next_transmission, GNUNET_FRAGMENT_Context::num_rounds, GNUNET_FRAGMENT_Context::num_transmissions, GNUNET_FRAGMENT_Context::proc, GNUNET_FRAGMENT_Context::proc_busy, GNUNET_FRAGMENT_Context::proc_cls, GNUNET_TIME_Relative::rel_value_us, GNUNET_MessageHeader::size, size, GNUNET_FRAGMENT_Context::stats, GNUNET_FRAGMENT_Context::task, GNUNET_FRAGMENT_Context::tracker, and GNUNET_FRAGMENT_Context::wack.
Referenced by GNUNET_FRAGMENT_context_create(), GNUNET_FRAGMENT_context_transmission_done(), and GNUNET_FRAGMENT_process_ack().