List containing all messages that are yet to be send. More...
Data Fields | |
struct PendingMessage * | next |
DLL next, prev. More... | |
struct PendingMessage * | prev |
struct GNUNET_MQ_Envelope * | ev |
The envelope to the corresponding message. More... | |
struct PeerContext * | peer_ctx |
The corresponding context. More... | |
const char * | type |
The message type. More... | |
struct PendingMessage * | next_vl |
Kept in a MDLL of messages for this vl. More... | |
struct PendingMessage * | prev_vl |
Kept in a MDLL of messages for this vl. More... | |
struct PendingMessage * | next_client |
Kept in a MDLL of messages from this client (if pmt is PMT_CORE) More... | |
struct PendingMessage * | prev_client |
Kept in a MDLL of messages from this client (if pmt is PMT_CORE) More... | |
struct PendingMessage * | next_frag |
Kept in a MDLL of messages from this cpm (if pmt is #PMT_FRAGMENT_BOx) More... | |
struct PendingMessage * | prev_frag |
Kept in a MDLL of messages from this cpm (if pmt is PMT_FRAGMENT_BOX) More... | |
struct PendingAcknowledgement * | pa_head |
Head of DLL of PAs for this pending message. More... | |
struct PendingAcknowledgement * | pa_tail |
Tail of DLL of PAs for this pending message. More... | |
struct PendingMessage * | bpm |
This message, reliability or DV-boxed. More... | |
struct VirtualLink * | vl |
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 QueueEntry * | qe |
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 TransportClient * | client |
Client that issued the transmission request, if pmt is PMT_CORE. More... | |
struct PendingMessage * | head_frag |
Head of a MDLL of fragments created for this core message. More... | |
struct PendingMessage * | tail_frag |
Tail of a MDLL of fragments created for this core message. More... | |
struct PendingMessage * | frag_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 DistanceVectorHop * | used_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... | |
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.
struct PendingMessage* PendingMessage::next |
DLL next, prev.
Definition at line 119 of file gnunet-service-rps.c.
struct PendingMessage* PendingMessage::prev |
Definition at line 120 of file gnunet-service-rps.c.
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().
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().
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().
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().
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().
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.
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.
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().
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.
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().
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().
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().
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().
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().
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().
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().
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().
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().
struct PendingMessage* PendingMessage::frag_parent |
Our parent in the fragmentation tree.
Definition at line 2344 of file gnunet-service-transport.c.
Referenced by completed_pending_message(), extract_box_cb(), fragment_message(), free_pending_message(), reliability_box_message(), transmit_on_queue(), and update_pm_next_attempt().
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().
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().
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.
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().
enum PendingMessageType PendingMessage::pmt |
Type of the pending message.
Definition at line 2371 of file gnunet-service-transport.c.
Referenced by completed_pending_message(), extract_box_cb(), fragment_message(), free_pending_message(), reliability_box_message(), transmit_on_queue(), and update_pm_next_attempt().
enum GNUNET_MQ_PriorityPreferences PendingMessage::prefs |
Preferences for this message.
TODO: actually use this!
Definition at line 2377 of file gnunet-service-transport.c.
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.
uint16_t PendingMessage::bytes_msg |
Size of the original message.
Definition at line 2387 of file gnunet-service-transport.c.
Referenced by completed_pending_message(), extract_box_cb(), fragment_message(), reliability_box_message(), transmit_on_queue(), and update_pm_next_attempt().
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().
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().
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().
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().
int16_t PendingMessage::msg_uuid_set |
GNUNET_YES once msg_uuid was initialized
Definition at line 2412 of file gnunet-service-transport.c.