List containing all messages that are yet to be send. More...
Data Fields | |
struct PendingMessage * | next |
DLL next, prev. More... | |
struct PendingMessage * | prev |
This is a doubly-linked list. More... | |
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... | |
unsigned long long | 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... | |
unsigned int | frags_in_flight |
Are we sending fragments at the moment? 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... | |
const char * | msg |
The pending message. More... | |
GNUNET_TRANSPORT_TransmitContinuation | transmit_cont |
Continuation function to call once the message has been sent. More... | |
void * | transmit_cont_cls |
Closure for transmit_cont. More... | |
size_t | message_size |
So that the gnunet-service-transport can group messages together, these pending messages need to accept a message buffer and size instead of just a struct GNUNET_MessageHeader . More... | |
struct WlanHeader * | msg |
The pending message. More... | |
struct GNUNET_SCHEDULER_Task * | timeout_task |
Timeout task (for this message). More... | |
List containing all messages that are yet to be send.
Information kept for each message that is yet to be fragmented and transmitted.
Information kept for each message that is yet to be transmitted.
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 113 of file gnunet-service-rps.c.
struct PendingMessage * PendingMessage::next |
DLL next, prev.
next entry in the DLL
This is a doubly-linked list.
Definition at line 118 of file gnunet-service-rps.c.
struct PendingMessage * PendingMessage::prev |
This is a doubly-linked list.
previous entry in the DLL
Definition at line 119 of file gnunet-service-rps.c.
struct GNUNET_MQ_Envelope* PendingMessage::ev |
The envelope to the corresponding message.
Definition at line 124 of file gnunet-service-rps.c.
Referenced by insert_pending_message().
struct PeerContext* PendingMessage::peer_ctx |
The corresponding context.
Definition at line 129 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 134 of file gnunet-service-rps.c.
Referenced by gnunet_testing.Condition::__init__(), destroy_peer(), gnunet_testing.Condition::evaluate(), gnunet_testing.FileExistCondition::evaluate(), 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 2146 of file gnunet-service-tng.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 2151 of file gnunet-service-tng.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 2156 of file gnunet-service-tng.c.
struct PendingMessage* PendingMessage::prev_client |
Kept in a MDLL of messages from this client (if pmt is PMT_CORE)
Definition at line 2161 of file gnunet-service-tng.c.
struct PendingMessage* PendingMessage::next_frag |
Kept in a MDLL of messages from this cpm (if pmt is #PMT_FRAGMENT_BOx)
Definition at line 2167 of file gnunet-service-tng.c.
Referenced by check_next_attempt_tree().
struct PendingMessage* PendingMessage::prev_frag |
Kept in a MDLL of messages from this cpm (if pmt is PMT_FRAGMENT_BOX)
Definition at line 2173 of file gnunet-service-tng.c.
struct PendingAcknowledgement* PendingMessage::pa_head |
Head of DLL of PAs for this pending message.
Definition at line 2178 of file gnunet-service-tng.c.
Referenced by free_fragment_tree().
struct PendingAcknowledgement* PendingMessage::pa_tail |
Tail of DLL of PAs for this pending message.
Definition at line 2183 of file gnunet-service-tng.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 2189 of file gnunet-service-tng.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 2195 of file gnunet-service-tng.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 2195 of file gnunet-service-tng.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 2210 of file gnunet-service-tng.c.
Referenced by free_fragment_tree().
struct TransportClient* PendingMessage::client |
Client that issued the transmission request, if pmt is PMT_CORE.
Definition at line 2215 of file gnunet-service-tng.c.
Referenced by client_disconnect_cb(), and create_session().
struct PendingMessage* PendingMessage::head_frag |
Head of a MDLL of fragments created for this core message.
Definition at line 2220 of file gnunet-service-tng.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 2225 of file gnunet-service-tng.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 2230 of file gnunet-service-tng.c.
Referenced by completed_pending_message(), extract_box_cb(), fragment_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)?
Timeout value for the pending message.
Definition at line 2230 of file gnunet-service-tng.c.
Referenced by do_transmit(), 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 2230 of file gnunet-service-tng.c.
Referenced by check_next_attempt_tree(), 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 2230 of file gnunet-service-tng.c.
unsigned long long PendingMessage::logging_uuid |
UUID we use to identify this message in our logs.
Generated by incrementing the "logging_uuid_gen".
Definition at line 2252 of file gnunet-service-tng.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 2252 of file gnunet-service-tng.c.
Referenced by extract_box_cb(), fragment_message(), and reliability_box_message().
enum GNUNET_MQ_PriorityPreferences PendingMessage::prefs |
Preferences for this message.
TODO: actually use this!
Definition at line 2252 of file gnunet-service-tng.c.
struct DistanceVectorHop* PendingMessage::used_dvh |
If pmt is of type PMT_DV_BOX we store the used path here.
Definition at line 2268 of file gnunet-service-tng.c.
uint16_t PendingMessage::bytes_msg |
Size of the original message.
Definition at line 2273 of file gnunet-service-tng.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 2278 of file gnunet-service-tng.c.
Referenced by completed_pending_message(), fragment_message(), transmit_on_queue(), and update_pm_next_attempt().
unsigned int PendingMessage::frags_in_flight |
Are we sending fragments at the moment?
Definition at line 2283 of file gnunet-service-tng.c.
Referenced by update_pm_next_attempt().
uint16_t PendingMessage::frag_count |
How many fragments do we have?
Definition at line 2288 of file gnunet-service-tng.c.
Referenced by transmit_on_queue(), and update_pm_next_attempt().
int16_t PendingMessage::msg_uuid_set |
GNUNET_YES once msg_uuid was initialized
Definition at line 2293 of file gnunet-service-tng.c.
const char* PendingMessage::msg |
The pending message.
Definition at line 731 of file plugin_transport_tcp.c.
Referenced by do_transmit().
GNUNET_TRANSPORT_TransmitContinuation PendingMessage::transmit_cont |
Continuation function to call once the message has been sent.
Can be NULL if there is no continuation to call.
Definition at line 738 of file plugin_transport_tcp.c.
Referenced by do_transmit().
void * PendingMessage::transmit_cont_cls |
Closure for transmit_cont.
Cls for transmit_cont.
Definition at line 743 of file plugin_transport_tcp.c.
Referenced by do_transmit().
size_t PendingMessage::message_size |
So that the gnunet-service-transport can group messages together, these pending messages need to accept a message buffer and size instead of just a struct GNUNET_MessageHeader
.
Definition at line 755 of file plugin_transport_tcp.c.
Referenced by do_transmit().
struct WlanHeader* PendingMessage::msg |
The pending message.
Definition at line 230 of file plugin_transport_wlan.c.
struct GNUNET_SCHEDULER_Task* PendingMessage::timeout_task |
Timeout task (for this message).
Definition at line 247 of file plugin_transport_wlan.c.