A virtual link is another reachable peer that is known to CORE. More...
Data Fields | |
| struct GNUNET_PeerIdentity | target |
| Identity of the peer at the other end of the link. | |
| struct GNUNET_CONTAINER_MultiHashMap32 * | reassembly_map |
Map with struct ReassemblyContext structs for fragments under reassembly. | |
| struct GNUNET_CONTAINER_Heap * | reassembly_heap |
Heap with struct ReassemblyContext structs for fragments under reassembly. | |
| struct GNUNET_SCHEDULER_Task * | reassembly_timeout_task |
| Task to free old entries from the reassembly_heap and reassembly_map. | |
| struct CommunicatorMessageContext * | cmc_head |
| Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase. | |
| struct CommunicatorMessageContext * | cmc_tail |
| Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase. | |
| unsigned int | cmc_count |
| Number of entries in the cmc_head DLL, bounded by MAX_STALLED_CMCS. | |
| struct GNUNET_SCHEDULER_Task * | core_fc_stall_task |
| Task bounding how long the communicators queued in cmc_head stay blocked waiting for CORE to increase core_recv_window. | |
| struct PendingMessage * | pending_msg_head |
| Head of list of messages pending for this VL. | |
| struct PendingMessage * | pending_msg_tail |
| Tail of list of messages pending for this VL. | |
| struct CoreSentContext * | csc_tail |
| Kept in a DLL to clear vl in case vl is lost. | |
| struct CoreSentContext * | csc_head |
| Kept in a DLL to clear vl in case vl is lost. | |
| struct GNUNET_SCHEDULER_Task * | visibility_task |
| Task scheduled to possibly notfiy core that this peer is no longer counting as confirmed. | |
| struct GNUNET_SCHEDULER_Task * | fc_retransmit_task |
| Task scheduled to periodically retransmit FC messages (in case one got lost). | |
| struct GNUNET_SCHEDULER_Task * | unconfirmed_timeout_task |
| Task that discards this link if it never becomes confirmed. | |
| struct GNUNET_StartBurstCls * | sb_cls |
| The actual GNUNET_StartBurstCls of this VirtualLink. | |
| char * | burst_addr |
| global addresses for the peer. | |
| unsigned int | fc_retransmit_count |
| Number of FC retransmissions for this running task. | |
| unsigned int | confirmed |
| Is this VirtualLink confirmed. | |
| struct Neighbour * | n |
| Neighbour used by this virtual link, NULL if dv is used. | |
| struct DistanceVector * | dv |
| Distance vector used by this virtual link, NULL if n is used. | |
| struct GNUNET_TIME_Absolute | n_challenge_time |
| Sender timestamp of n_challenge, used to generate out-of-order challenges (as sender's timestamps must be monotonically increasing). | |
| struct GNUNET_TIME_Absolute | last_fc_transmission |
| When did we last send a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message? Used to determine whether it is time to re-transmit the message. | |
| struct GNUNET_TIME_Absolute | last_fc_timestamp |
| Sender timestamp of the last GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received. | |
| struct GNUNET_TIME_Relative | last_fc_rtt |
| Expected RTT from the last FC transmission. | |
| struct GNUNET_TIME_Relative | other_rtt |
| Average RTT for over all paths of the DistanceVector of this VirtualLink calculated by the target. | |
| struct GNUNET_PEERSTORE_IterateContext * | ic |
| IterationContext for searching a burst address. | |
| uint64_t | message_uuid_ctr |
| Used to generate unique UUIDs for messages that are being fragmented. | |
| uint64_t | available_fc_window_size |
| Memory allocated for this virtual link. | |
| uint64_t | incoming_fc_window_size_ram |
| Memory actually used to buffer packets on this virtual link. | |
| uint64_t | incoming_fc_window_size |
| Last flow control window size we provided to the other peer, in bytes. | |
| uint64_t | incoming_fc_window_size_used |
| How much of the window did the other peer successfully use (and we already passed it on to CORE)? Must be below incoming_fc_window_size. | |
| int64_t | incoming_fc_window_size_loss |
| What is our current estimate on the message loss rate for the sender? Based on the difference between how much the sender sent according to the last GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message (outbound_sent field) and how much we actually received at that time (incoming_fc_window_size_used). | |
| uint64_t | outbound_fc_window_size |
| Our current flow control window size in bytes. | |
| uint64_t | outbound_fc_window_size_used |
| How much of our current flow control window size have we used (in bytes). | |
| uint64_t | last_outbound_window_size_received |
What is the most recent FC window the other peer sent us in outbound_window_size? This is basically the window size value the other peer has definitively received from us. | |
| uint32_t | fc_seq_gen |
| Generator for the sequence numbers of GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL messages we send. | |
| uint32_t | last_fc_seq |
| Last sequence number of a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received. | |
| int | core_recv_window |
| How many more messages can we send to CORE before we exhaust the receive window of CORE for this peer? If this hits zero, we must tell communicators to stop providing us more messages for this peer. | |
| enum GNUNET_GenericReturnValue | sync_ready |
| Are we ready to start the burst? | |
A virtual link is another reachable peer that is known to CORE.
It can be either a struct Neighbour with at least one confirmed struct Queue, or a struct DistanceVector with at least one confirmed struct DistanceVectorHop. With a virtual link we track data that is per neighbour that is not specific to how the connectivity is established.
Definition at line 1568 of file gnunet-service-transport.c.
| struct GNUNET_PeerIdentity VirtualLink::target |
Identity of the peer at the other end of the link.
Definition at line 1573 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), check_for_burst_address(), check_link_down(), check_vl_transmission(), client_send_response(), consider_sending_fc(), core_fc_stalled(), credit_client(), disconnect_and_free_virtual_link(), fragment_message(), free_virtual_link(), handle_flow_control(), handle_validation_response(), queue_burst(), reliability_box_message(), send_msg_from_cache(), start_burst(), and unconfirmed_link_timeout().
| struct GNUNET_CONTAINER_MultiHashMap32* VirtualLink::reassembly_map |
Map with struct ReassemblyContext structs for fragments under reassembly.
May be NULL if we currently have no fragments from this pid (lazy initialization).
Definition at line 1580 of file gnunet-service-transport.c.
Referenced by free_reassembly_context(), free_virtual_link(), and handle_fragment_box().
| struct GNUNET_CONTAINER_Heap* VirtualLink::reassembly_heap |
Heap with struct ReassemblyContext structs for fragments under reassembly.
May be NULL if we currently have no fragments from this pid (lazy initialization).
Definition at line 1587 of file gnunet-service-transport.c.
Referenced by free_virtual_link(), handle_fragment_box(), and reassembly_cleanup_task().
| struct GNUNET_SCHEDULER_Task* VirtualLink::reassembly_timeout_task |
Task to free old entries from the reassembly_heap and reassembly_map.
Definition at line 1592 of file gnunet-service-transport.c.
Referenced by free_virtual_link(), handle_fragment_box(), and reassembly_cleanup_task().
| struct CommunicatorMessageContext* VirtualLink::cmc_head |
Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase.
Definition at line 1598 of file gnunet-service-transport.c.
Referenced by detach_cmcs_from_link(), finish_handling_raw_message(), free_virtual_link(), and release_stalled_cmc().
| struct CommunicatorMessageContext* VirtualLink::cmc_tail |
Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase.
Definition at line 1604 of file gnunet-service-transport.c.
Referenced by core_fc_stalled(), finish_handling_raw_message(), handle_client_recv_ok(), release_stalled_cmc(), and resume_communicators().
| unsigned int VirtualLink::cmc_count |
Number of entries in the cmc_head DLL, bounded by MAX_STALLED_CMCS.
Definition at line 1610 of file gnunet-service-transport.c.
Referenced by finish_handling_raw_message(), release_stalled_cmc(), and report_link().
| struct GNUNET_SCHEDULER_Task* VirtualLink::core_fc_stall_task |
Task bounding how long the communicators queued in cmc_head stay blocked waiting for CORE to increase core_recv_window.
NULL whenever that list is empty.
Definition at line 1617 of file gnunet-service-transport.c.
Referenced by core_fc_stalled(), finish_handling_raw_message(), free_virtual_link(), handle_client_recv_ok(), and resume_communicators().
| struct PendingMessage* VirtualLink::pending_msg_head |
Head of list of messages pending for this VL.
Definition at line 1622 of file gnunet-service-transport.c.
Referenced by check_vl_transmission(), disconnect_and_free_virtual_link(), forward_dv_box(), free_pending_message(), free_queue_entry(), free_virtual_link(), handle_client_send(), reorder_root_pm(), report_link(), select_best_pending_from_link(), and send_msg_from_cache().
| struct PendingMessage* VirtualLink::pending_msg_tail |
Tail of list of messages pending for this VL.
Definition at line 1627 of file gnunet-service-transport.c.
Referenced by forward_dv_box(), free_pending_message(), handle_client_send(), reorder_root_pm(), and send_msg_from_cache().
| struct CoreSentContext* VirtualLink::csc_tail |
Kept in a DLL to clear vl in case vl is lost.
Definition at line 1632 of file gnunet-service-transport.c.
Referenced by core_env_sent_cb(), finish_handling_raw_message(), and free_virtual_link().
| struct CoreSentContext* VirtualLink::csc_head |
Kept in a DLL to clear vl in case vl is lost.
Definition at line 1637 of file gnunet-service-transport.c.
Referenced by core_env_sent_cb(), finish_handling_raw_message(), and free_virtual_link().
| struct GNUNET_SCHEDULER_Task* VirtualLink::visibility_task |
Task scheduled to possibly notfiy core that this peer is no longer counting as confirmed.
Runs the #core_visibility_check(), which checks that some DV-path or a queue exists that is still considered confirmed.
Definition at line 1645 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), check_link_down(), free_dv_route(), free_neighbour(), free_queue(), free_virtual_link(), and handle_validation_response().
| struct GNUNET_SCHEDULER_Task* VirtualLink::fc_retransmit_task |
Task scheduled to periodically retransmit FC messages (in case one got lost).
Definition at line 1651 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), free_virtual_link(), handle_flow_control(), and task_consider_sending_fc().
| struct GNUNET_SCHEDULER_Task* VirtualLink::unconfirmed_timeout_task |
Task that discards this link if it never becomes confirmed.
Only set for links created from an incoming FLOW_CONTROL message.
Definition at line 1657 of file gnunet-service-transport.c.
Referenced by free_virtual_link(), handle_flow_control(), and unconfirmed_link_timeout().
| struct GNUNET_StartBurstCls* VirtualLink::sb_cls |
The actual GNUNET_StartBurstCls of this VirtualLink.
Definition at line 1662 of file gnunet-service-transport.c.
Referenced by check_for_burst_address(), free_burst_cls(), free_virtual_link(), handle_flow_control(), queue_burst(), and start_burst().
| char* VirtualLink::burst_addr |
global addresses for the peer.
Definition at line 1667 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), free_virtual_link(), handle_flow_control(), handle_validation_response(), iterate_address_start_burst(), queue_burst(), and start_burst().
| unsigned int VirtualLink::fc_retransmit_count |
Number of FC retransmissions for this running task.
Definition at line 1672 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), handle_flow_control(), and report_link().
| unsigned int VirtualLink::confirmed |
Is this VirtualLink confirmed.
A unconfirmed VirtualLink might exist, if we got a FC from that target.
Definition at line 1678 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), consider_sending_fc(), forward_dv_box(), forward_dv_learn(), handle_client_recv_ok(), handle_client_send(), handle_communicator_backchannel(), handle_flow_control(), handle_fragment_box(), handle_raw_message(), handle_validation_response(), notify_client_connect_info(), report_link(), send_t_validation_response(), start_address_validation(), suggest_retry_cb(), transmit_cummulative_ack_cb(), unconfirmed_link_timeout(), and validation_challenge_freq().
| struct Neighbour* VirtualLink::n |
Neighbour used by this virtual link, NULL if dv is used.
Definition at line 1683 of file gnunet-service-transport.c.
Referenced by check_link_down(), check_vl_transmission(), consider_sending_fc(), free_dv_route(), free_neighbour(), free_queue(), free_virtual_link(), handle_flow_control(), handle_validation_response(), report_link(), and unconfirmed_link_timeout().
| struct DistanceVector* VirtualLink::dv |
Distance vector used by this virtual link, NULL if n is used.
Definition at line 1688 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), check_link_down(), check_vl_transmission(), consider_sending_fc(), free_dv_route(), free_neighbour(), free_virtual_link(), handle_flow_control(), pick_random_dv_hops(), report_link(), and unconfirmed_link_timeout().
| struct GNUNET_TIME_Absolute VirtualLink::n_challenge_time |
Sender timestamp of n_challenge, used to generate out-of-order challenges (as sender's timestamps must be monotonically increasing).
FIXME: where do we need this?
Definition at line 1695 of file gnunet-service-transport.c.
| struct GNUNET_TIME_Absolute VirtualLink::last_fc_transmission |
When did we last send a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message? Used to determine whether it is time to re-transmit the message.
Definition at line 1702 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), and report_link().
| struct GNUNET_TIME_Absolute VirtualLink::last_fc_timestamp |
Sender timestamp of the last GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received.
Note that we do not persist this monotonic time as we do not really have to worry about ancient flow control window sizes after restarts.
Definition at line 1711 of file gnunet-service-transport.c.
Referenced by handle_flow_control().
| struct GNUNET_TIME_Relative VirtualLink::last_fc_rtt |
Expected RTT from the last FC transmission.
(Zero if the last attempt failed, but could theoretically be zero even on success.)
Definition at line 1717 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), and report_link().
| struct GNUNET_TIME_Relative VirtualLink::other_rtt |
Average RTT for over all paths of the DistanceVector of this VirtualLink calculated by the target.
Definition at line 1723 of file gnunet-service-transport.c.
Referenced by report_link().
| struct GNUNET_PEERSTORE_IterateContext* VirtualLink::ic |
IterationContext for searching a burst address.
Definition at line 1728 of file gnunet-service-transport.c.
Referenced by check_for_burst_address(), free_virtual_link(), and queue_burst().
| uint64_t VirtualLink::message_uuid_ctr |
Used to generate unique UUIDs for messages that are being fragmented.
Definition at line 1734 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), handle_flow_control(), handle_validation_response(), and set_pending_message_uuid().
| uint64_t VirtualLink::available_fc_window_size |
Memory allocated for this virtual link.
Expresses how much RAM we are willing to allocate to this virtual link. OPTIMIZE-ME: Can be adapted to dedicate more RAM to links that need it, while sticking to some overall RAM limit. For now, set to DEFAULT_WINDOW_SIZE.
Definition at line 1743 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), finish_handling_raw_message(), handle_flow_control(), handle_validation_response(), and report_link().
| uint64_t VirtualLink::incoming_fc_window_size_ram |
Memory actually used to buffer packets on this virtual link.
Expresses how much RAM we are currently using for virtual link. Note that once CORE is done with a packet, we decrement the value here.
Definition at line 1751 of file gnunet-service-transport.c.
Referenced by core_env_sent_cb(), finish_handling_raw_message(), and report_link().
| uint64_t VirtualLink::incoming_fc_window_size |
Last flow control window size we provided to the other peer, in bytes.
We are allowing the other peer to send this many bytes.
Definition at line 1758 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), consider_sending_fc(), handle_flow_control(), handle_validation_response(), and report_link().
| uint64_t VirtualLink::incoming_fc_window_size_used |
How much of the window did the other peer successfully use (and we already passed it on to CORE)? Must be below incoming_fc_window_size.
We should effectively signal the other peer that the window is this much bigger at the next opportunity / challenge.
Definition at line 1767 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), core_env_sent_cb(), finish_handling_raw_message(), handle_flow_control(), and report_link().
| int64_t VirtualLink::incoming_fc_window_size_loss |
What is our current estimate on the message loss rate for the sender? Based on the difference between how much the sender sent according to the last GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message (outbound_sent field) and how much we actually received at that time (incoming_fc_window_size_used).
This delta is then added onto the incoming_fc_window_size when determining the outbound_window_size we send to the other peer. Initially zero. May be negative if we (due to out-of-order delivery) actually received more than the sender claims to have sent in its last FC message.
Definition at line 1780 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), handle_flow_control(), and report_link().
| uint64_t VirtualLink::outbound_fc_window_size |
Our current flow control window size in bytes.
We are allowed to transmit this many bytes to n.
Definition at line 1786 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), check_vl_transmission(), consider_sending_fc(), handle_flow_control(), handle_validation_response(), and report_link().
| uint64_t VirtualLink::outbound_fc_window_size_used |
How much of our current flow control window size have we used (in bytes).
Must be below outbound_fc_window_size.
Definition at line 1793 of file gnunet-service-transport.c.
Referenced by check_vl_transmission(), consider_sending_fc(), handle_flow_control(), report_link(), and transmit_on_queue().
| uint64_t VirtualLink::last_outbound_window_size_received |
What is the most recent FC window the other peer sent us in outbound_window_size? This is basically the window size value the other peer has definitively received from us.
If it matches incoming_fc_window_size, we should not send a FC message to increase the FC window. However, we may still send an FC message to notify the other peer that we received the other peer's FC message.
Definition at line 1804 of file gnunet-service-transport.c.
Referenced by handle_flow_control().
| uint32_t VirtualLink::fc_seq_gen |
Generator for the sequence numbers of GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL messages we send.
Definition at line 1810 of file gnunet-service-transport.c.
Referenced by consider_sending_fc().
| uint32_t VirtualLink::last_fc_seq |
Last sequence number of a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received.
Definition at line 1817 of file gnunet-service-transport.c.
Referenced by handle_flow_control().
| int VirtualLink::core_recv_window |
How many more messages can we send to CORE before we exhaust the receive window of CORE for this peer? If this hits zero, we must tell communicators to stop providing us more messages for this peer.
In fact, the window can go negative as we have multiple communicators, so per communicator we can go down by one into the negative range. Furthermore, we count delivery per CORE client, so if we had multiple cores, that might also cause a negative window size here (as one message would decrement the window by one per CORE client).
Definition at line 1830 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), core_fc_stalled(), finish_handling_raw_message(), handle_client_recv_ok(), handle_flow_control(), handle_validation_response(), report_link(), and resume_communicators().
| enum GNUNET_GenericReturnValue VirtualLink::sync_ready |
Are we ready to start the burst?
Definition at line 1835 of file gnunet-service-transport.c.
Referenced by consider_sending_fc().