library to help defragment messages More...
Go to the source code of this file.
Data Structures | |
struct | FragTimes |
Timestamps for fragments. More... | |
struct | MessageContext |
Information we keep for one message that is being assembled. More... | |
struct | GNUNET_DEFRAGMENT_Context |
Defragmentation context (one per connection). More... | |
Functions | |
struct GNUNET_DEFRAGMENT_Context * | GNUNET_DEFRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats, uint16_t mtu, unsigned int num_msgs, void *cls, GNUNET_FRAGMENT_MessageProcessor proc, GNUNET_DEFRAGMENT_AckProcessor ackp) |
Create a defragmentation context. More... | |
void | GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc) |
Destroy the given defragmentation context. More... | |
static void | send_ack (void *cls) |
Send acknowledgement to the other peer now. More... | |
static void | gsl_fit_mul (const double *x, const size_t xstride, const double *y, const size_t ystride, const size_t n, double *c1, double *cov_11, double *sumsq) |
This function is from the GNU Scientific Library, linear/fit.c, Copyright (C) 2000 Brian Gough. More... | |
static struct GNUNET_TIME_Relative | estimate_latency (struct MessageContext *mc) |
Estimate the latency between messages based on the most recent message time stamps. More... | |
static void | discard_oldest_mc (struct GNUNET_DEFRAGMENT_Context *dc) |
Discard the message context that was inactive for the longest time. More... | |
int | GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, const struct GNUNET_MessageHeader *msg) |
We have received a fragment. More... | |
library to help defragment messages
Definition in file defragmentation.c.
|
static |
Send acknowledgement to the other peer now.
cls | the message context |
Definition at line 260 of file defragmentation.c.
References _, FragmentAcknowledgement::bits, dc, FragmentAcknowledgement::fragment_id, GNUNET_htonll(), GNUNET_MESSAGE_TYPE_FRAGMENT_ACK, GNUNET_NO, GNUNET_STATISTICS_update(), FragmentAcknowledgement::header, mc, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.
|
static |
This function is from the GNU Scientific Library, linear/fit.c, Copyright (C) 2000 Brian Gough.
Definition at line 287 of file defragmentation.c.
|
static |
Estimate the latency between messages based on the most recent message time stamps.
mc | context with time stamps |
Definition at line 287 of file defragmentation.c.
|
static |
Discard the message context that was inactive for the longest time.
dc | defragmentation context |
Definition at line 380 of file defragmentation.c.
References GNUNET_TIME_Absolute::abs_value_us, MessageContext::ack_task, dc, GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_cancel(), MessageContext::last_update, and MessageContext::next.