GNUnet 0.22.2
PendingMessage Struct Reference

List containing all messages that are yet to be send. More...

Collaboration diagram for PendingMessage:
[legend]

Data Fields

struct PendingMessagenext
 DLL next, prev. More...
 
struct PendingMessageprev
 
struct GNUNET_MQ_Envelopeev
 The envelope to the corresponding message. More...
 
struct PeerContextpeer_ctx
 The corresponding context. More...
 
const char * type
 The message type. More...
 
struct PendingMessagenext_vl
 Kept in a MDLL of messages for this vl. More...
 
struct PendingMessageprev_vl
 Kept in a MDLL of messages for this vl. More...
 
struct PendingMessagenext_client
 Kept in a MDLL of messages from this client (if pmt is PMT_CORE) More...
 
struct PendingMessageprev_client
 Kept in a MDLL of messages from this client (if pmt is PMT_CORE) More...
 
struct PendingMessagenext_frag
 Kept in a MDLL of messages from this cpm (if pmt is #PMT_FRAGMENT_BOx) More...
 
struct PendingMessageprev_frag
 Kept in a MDLL of messages from this cpm (if pmt is PMT_FRAGMENT_BOX) More...
 
struct PendingAcknowledgementpa_head
 Head of DLL of PAs for this pending message. More...
 
struct PendingAcknowledgementpa_tail
 Tail of DLL of PAs for this pending message. More...
 
struct PendingMessagebpm
 This message, reliability or DV-boxed. More...
 
struct VirtualLinkvl
 Target of the request (always the ultimate destination!). More...
 
struct GNUNET_PeerIdentity target
 In case of a not validated neighbour, we store the target peer. More...
 
struct QueueEntryqe
 Set to non-NULL value if this message is currently being given to a communicator and we are awaiting that communicator's acknowledgement. More...
 
struct TransportClientclient
 Client that issued the transmission request, if pmt is PMT_CORE. More...
 
struct PendingMessagehead_frag
 Head of a MDLL of fragments created for this core message. More...
 
struct PendingMessagetail_frag
 Tail of a MDLL of fragments created for this core message. More...
 
struct PendingMessagefrag_parent
 Our parent in the fragmentation tree. More...
 
struct GNUNET_TIME_Absolute timeout
 At what time should we give up on the transmission (and no longer retry)? More...
 
struct GNUNET_TIME_Absolute next_attempt
 What is the earliest time for us to retry transmission of this message? More...
 
struct MessageUUIDP msg_uuid
 UUID to use for this message (used for reassembly of fragments, only initialized if msg_uuid_set is GNUNET_YES). More...
 
uint64_t logging_uuid
 UUID we use to identify this message in our logs. More...
 
enum PendingMessageType pmt
 Type of the pending message. More...
 
enum GNUNET_MQ_PriorityPreferences prefs
 Preferences for this message. More...
 
struct DistanceVectorHopused_dvh
 If pmt is of type PMT_DV_BOX we store the used path here. More...
 
uint16_t bytes_msg
 Size of the original message. More...
 
uint16_t frag_off
 Offset at which we should generate the next fragment. More...
 
uint32_t frags_in_flight
 Are we sending fragments at the moment? More...
 
uint32_t frags_in_flight_round
 The round we are (re)-sending fragments. More...
 
uint16_t frag_count
 How many fragments do we have? More...
 
int16_t msg_uuid_set
 GNUNET_YES once msg_uuid was initialized More...
 

Detailed Description

List containing all messages that are yet to be send.

Transmission request that is awaiting delivery.

This is used to keep track of all messages that have not been sent yet. When a peer is to be removed the pending messages can be removed properly.

The original transmission requests from CORE may be too big for some queues. In this case, a tree of fragments is created. At each level of the tree, fragments are kept in a DLL ordered by which fragment should be sent next (at the head). The tree is searched top-down, with the original message at the root.

To select a node for transmission, first it is checked if the current node's message fits with the MTU. If it does not, we either calculate the next fragment (based on frag_off) from the current node, or, if all fragments have already been created, descend to the head_frag. Even though the node was already fragmented, the fragment may be too big if the fragment was generated for a queue with a larger MTU. In this case, the node may be fragmented again, thus creating a tree.

When acknowledgements for fragments are received, the tree must be pruned, removing those parts that were already acknowledged. When fragments are sent over a reliable channel, they can be immediately removed.

If a message is ever fragmented, then the original "full" message is never again transmitted (even if it fits below the MTU), and only (remaining) fragments are sent.

Definition at line 114 of file gnunet-service-rps.c.

Field Documentation

◆ next

struct PendingMessage* PendingMessage::next

DLL next, prev.

Definition at line 119 of file gnunet-service-rps.c.

◆ prev

struct PendingMessage* PendingMessage::prev

Definition at line 120 of file gnunet-service-rps.c.

◆ ev

struct GNUNET_MQ_Envelope* PendingMessage::ev

The envelope to the corresponding message.

Definition at line 125 of file gnunet-service-rps.c.

Referenced by insert_pending_message().

◆ peer_ctx

struct PeerContext* PendingMessage::peer_ctx

The corresponding context.

Definition at line 130 of file gnunet-service-rps.c.

Referenced by insert_pending_message(), mq_notify_sent_cb(), and remove_pending_message().

◆ type

const char* PendingMessage::type

The message type.

Definition at line 135 of file gnunet-service-rps.c.

Referenced by destroy_peer(), insert_pending_message(), and mq_notify_sent_cb().

◆ next_vl

struct PendingMessage* PendingMessage::next_vl

Kept in a MDLL of messages for this vl.

Definition at line 2260 of file gnunet-service-transport.c.

Referenced by select_best_pending_from_link().

◆ prev_vl

struct PendingMessage* PendingMessage::prev_vl

Kept in a MDLL of messages for this vl.

Definition at line 2265 of file gnunet-service-transport.c.

Referenced by reorder_root_pm().

◆ next_client

struct PendingMessage* PendingMessage::next_client

Kept in a MDLL of messages from this client (if pmt is PMT_CORE)

Definition at line 2270 of file gnunet-service-transport.c.

◆ prev_client

struct PendingMessage* PendingMessage::prev_client

Kept in a MDLL of messages from this client (if pmt is PMT_CORE)

Definition at line 2275 of file gnunet-service-transport.c.

◆ next_frag

struct PendingMessage* PendingMessage::next_frag

Kept in a MDLL of messages from this cpm (if pmt is #PMT_FRAGMENT_BOx)

Definition at line 2281 of file gnunet-service-transport.c.

Referenced by check_next_attempt_tree(), and harmonize_flight_round().

◆ prev_frag

struct PendingMessage* PendingMessage::prev_frag

Kept in a MDLL of messages from this cpm (if pmt is PMT_FRAGMENT_BOX)

Definition at line 2287 of file gnunet-service-transport.c.

◆ pa_head

struct PendingAcknowledgement* PendingMessage::pa_head

Head of DLL of PAs for this pending message.

Definition at line 2292 of file gnunet-service-transport.c.

Referenced by free_fragment_tree().

◆ pa_tail

struct PendingAcknowledgement* PendingMessage::pa_tail

Tail of DLL of PAs for this pending message.

Definition at line 2297 of file gnunet-service-transport.c.

Referenced by free_fragment_tree().

◆ bpm

struct PendingMessage* PendingMessage::bpm

This message, reliability or DV-boxed.

Only possibly available if pmt is PMT_CORE.

Definition at line 2303 of file gnunet-service-transport.c.

Referenced by completed_pending_message(), extract_box_cb(), and reliability_box_message().

◆ vl

struct VirtualLink* PendingMessage::vl

Target of the request (always the ultimate destination!).

Might be NULL in case of a forwarded DVBox we have no validated neighbour.

Definition at line 2309 of file gnunet-service-transport.c.

Referenced by extract_box_cb(), fragment_message(), reliability_box_message(), reorder_root_pm(), and send_msg_from_cache().

◆ target

struct GNUNET_PeerIdentity PendingMessage::target

In case of a not validated neighbour, we store the target peer.

Definition at line 2314 of file gnunet-service-transport.c.

Referenced by send_msg_from_cache().

◆ qe

struct QueueEntry* PendingMessage::qe

Set to non-NULL value if this message is currently being given to a communicator and we are awaiting that communicator's acknowledgement.

Note that we must not retransmit a pending message while we're still in the process of giving it to a communicator. If a pending message is free'd while this entry is non-NULL, the qe reference to us should simply be set to NULL.

Definition at line 2324 of file gnunet-service-transport.c.

Referenced by free_fragment_tree().

◆ client

struct TransportClient* PendingMessage::client

Client that issued the transmission request, if pmt is PMT_CORE.

Definition at line 2329 of file gnunet-service-transport.c.

Referenced by client_disconnect_cb().

◆ head_frag

struct PendingMessage* PendingMessage::head_frag

Head of a MDLL of fragments created for this core message.

Definition at line 2334 of file gnunet-service-transport.c.

Referenced by completed_pending_message(), fragment_message(), and free_fragment_tree().

◆ tail_frag

struct PendingMessage* PendingMessage::tail_frag

Tail of a MDLL of fragments created for this core message.

Definition at line 2339 of file gnunet-service-transport.c.

Referenced by completed_pending_message(), fragment_message(), and free_fragment_tree().

◆ frag_parent

struct PendingMessage* PendingMessage::frag_parent

◆ timeout

struct GNUNET_TIME_Absolute PendingMessage::timeout

At what time should we give up on the transmission (and no longer retry)?

Definition at line 2349 of file gnunet-service-transport.c.

Referenced by extract_box_cb(), fragment_message(), and reliability_box_message().

◆ next_attempt

struct GNUNET_TIME_Absolute PendingMessage::next_attempt

What is the earliest time for us to retry transmission of this message?

Definition at line 2354 of file gnunet-service-transport.c.

Referenced by reorder_root_pm(), and update_pm_next_attempt().

◆ msg_uuid

struct MessageUUIDP PendingMessage::msg_uuid

UUID to use for this message (used for reassembly of fragments, only initialized if msg_uuid_set is GNUNET_YES).

Definition at line 2360 of file gnunet-service-transport.c.

◆ logging_uuid

uint64_t PendingMessage::logging_uuid

UUID we use to identify this message in our logs.

Generated by incrementing the "logging_uuid_gen".

Definition at line 2366 of file gnunet-service-transport.c.

Referenced by extract_box_cb(), fragment_message(), reliability_box_message(), and update_pm_next_attempt().

◆ pmt

◆ prefs

enum GNUNET_MQ_PriorityPreferences PendingMessage::prefs

Preferences for this message.

TODO: actually use this!

Definition at line 2377 of file gnunet-service-transport.c.

◆ used_dvh

struct DistanceVectorHop* PendingMessage::used_dvh

If pmt is of type PMT_DV_BOX we store the used path here.

Definition at line 2382 of file gnunet-service-transport.c.

◆ bytes_msg

uint16_t PendingMessage::bytes_msg

◆ frag_off

uint16_t PendingMessage::frag_off

Offset at which we should generate the next fragment.

Definition at line 2392 of file gnunet-service-transport.c.

Referenced by completed_pending_message(), fragment_message(), transmit_on_queue(), and update_pm_next_attempt().

◆ frags_in_flight

uint32_t PendingMessage::frags_in_flight

Are we sending fragments at the moment?

Definition at line 2397 of file gnunet-service-transport.c.

Referenced by check_next_attempt_tree(), and update_pm_next_attempt().

◆ frags_in_flight_round

uint32_t PendingMessage::frags_in_flight_round

The round we are (re)-sending fragments.

Definition at line 2402 of file gnunet-service-transport.c.

Referenced by check_next_attempt_tree(), harmonize_flight_round(), and update_pm_next_attempt().

◆ frag_count

uint16_t PendingMessage::frag_count

How many fragments do we have?

Definition at line 2407 of file gnunet-service-transport.c.

Referenced by free_pending_message(), transmit_on_queue(), and update_pm_next_attempt().

◆ msg_uuid_set

int16_t PendingMessage::msg_uuid_set

GNUNET_YES once msg_uuid was initialized

Definition at line 2412 of file gnunet-service-transport.c.


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