GNUnet  0.20.0
MessageContext Struct Reference

Information we keep for one message that is being assembled. More...

Collaboration diagram for MessageContext:
[legend]

Data Fields

struct MessageContextnext
 This is a DLL. More...
 
struct MessageContextprev
 This is a DLL. More...
 
struct GNUNET_DEFRAGMENT_Contextdc
 Associated defragmentation context. More...
 
const struct GNUNET_MessageHeadermsg
 Pointer to the assembled message, allocated at the end of this struct. More...
 
struct GNUNET_TIME_Absolute last_update
 Last time we received any update for this message (least-recently updated message will be discarded if we hit the queue size). More...
 
struct GNUNET_SCHEDULER_Taskack_task
 Task scheduled for transmitting the next ACK to the other peer. More...
 
struct FragTimes frag_times [64]
 When did we receive which fragment? Used to calculate the time we should send the ACK. More...
 
uint64_t bits
 Which fragments have we gotten yet? bits that are 1 indicate missing fragments. More...
 
uint32_t fragment_id
 Unique ID for this message. More...
 
unsigned int last_bit
 Which 'bit' did the last fragment we received correspond to? More...
 
unsigned int frag_times_start_offset
 For the current ACK round, which is the first relevant offset in frag_times? More...
 
unsigned int frag_times_write_offset
 Which offset would we write the next frag value into in the frag_times array? All smaller entries are valid. More...
 
uint16_t total_size
 Total size of the message that we are assembling. More...
 
int16_t last_duplicate
 Was the last fragment we got a duplicate? More...
 

Detailed Description

Information we keep for one message that is being assembled.

Note that we keep the context around even after the assembly is done to handle 'stray' messages that are received 'late'. A message context is ONLY discarded when the queue gets too big.

Definition at line 52 of file defragmentation.c.

Field Documentation

◆ next

struct MessageContext* MessageContext::next

This is a DLL.

Definition at line 57 of file defragmentation.c.

Referenced by discard_oldest_mc().

◆ prev

struct MessageContext* MessageContext::prev

This is a DLL.

Definition at line 62 of file defragmentation.c.

◆ dc

struct GNUNET_DEFRAGMENT_Context* MessageContext::dc

Associated defragmentation context.

Definition at line 67 of file defragmentation.c.

◆ msg

const struct GNUNET_MessageHeader* MessageContext::msg

Pointer to the assembled message, allocated at the end of this struct.

Definition at line 73 of file defragmentation.c.

◆ last_update

struct GNUNET_TIME_Absolute MessageContext::last_update

Last time we received any update for this message (least-recently updated message will be discarded if we hit the queue size).

Definition at line 73 of file defragmentation.c.

Referenced by discard_oldest_mc().

◆ ack_task

struct GNUNET_SCHEDULER_Task* MessageContext::ack_task

Task scheduled for transmitting the next ACK to the other peer.

Definition at line 86 of file defragmentation.c.

Referenced by discard_oldest_mc().

◆ frag_times

struct FragTimes MessageContext::frag_times[64]

When did we receive which fragment? Used to calculate the time we should send the ACK.

Definition at line 86 of file defragmentation.c.

◆ bits

uint64_t MessageContext::bits

Which fragments have we gotten yet? bits that are 1 indicate missing fragments.

Definition at line 98 of file defragmentation.c.

◆ fragment_id

uint32_t MessageContext::fragment_id

Unique ID for this message.

Definition at line 103 of file defragmentation.c.

◆ last_bit

unsigned int MessageContext::last_bit

Which 'bit' did the last fragment we received correspond to?

Definition at line 108 of file defragmentation.c.

◆ frag_times_start_offset

unsigned int MessageContext::frag_times_start_offset

For the current ACK round, which is the first relevant offset in frag_times?

Definition at line 114 of file defragmentation.c.

◆ frag_times_write_offset

unsigned int MessageContext::frag_times_write_offset

Which offset would we write the next frag value into in the frag_times array? All smaller entries are valid.

Definition at line 120 of file defragmentation.c.

◆ total_size

uint16_t MessageContext::total_size

Total size of the message that we are assembling.

Definition at line 125 of file defragmentation.c.

◆ last_duplicate

int16_t MessageContext::last_duplicate

Was the last fragment we got a duplicate?

Definition at line 130 of file defragmentation.c.


The documentation for this struct was generated from the following file: