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. More... | |
struct GNUNET_CONTAINER_MultiHashMap32 * | reassembly_map |
Map with struct ReassemblyContext structs for fragments under reassembly. More... | |
struct GNUNET_CONTAINER_Heap * | reassembly_heap |
Heap with struct ReassemblyContext structs for fragments under reassembly. More... | |
struct GNUNET_SCHEDULER_Task * | reassembly_timeout_task |
Task to free old entries from the reassembly_heap and reassembly_map. More... | |
struct CommunicatorMessageContext * | cmc_head |
Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase. More... | |
struct CommunicatorMessageContext * | cmc_tail |
Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase. More... | |
struct PendingMessage * | pending_msg_head |
Head of list of messages pending for this VL. More... | |
struct PendingMessage * | pending_msg_tail |
Tail of list of messages pending for this VL. More... | |
struct CoreSentContext * | csc_tail |
Kept in a DLL to clear vl in case vl is lost. More... | |
struct CoreSentContext * | csc_head |
Kept in a DLL to clear vl in case vl is lost. More... | |
struct GNUNET_SCHEDULER_Task * | visibility_task |
Task scheduled to possibly notfiy core that this peer is no longer counting as confirmed. More... | |
struct GNUNET_SCHEDULER_Task * | fc_retransmit_task |
Task scheduled to periodically retransmit FC messages (in case one got lost). More... | |
struct GNUNET_StartBurstCls * | sb_cls |
The actual GNUNET_StartBurstCls of this VirtualLink. More... | |
char * | burst_addr |
global addresses for the peer. More... | |
unsigned int | fc_retransmit_count |
Number of FC retransmissions for this running task. More... | |
unsigned int | confirmed |
Is this VirtualLink confirmed. More... | |
struct Neighbour * | n |
Neighbour used by this virtual link, NULL if dv is used. More... | |
struct DistanceVector * | dv |
Distance vector used by this virtual link, NULL if n is used. More... | |
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). More... | |
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. More... | |
struct GNUNET_TIME_Absolute | last_fc_timestamp |
Sender timestamp of the last GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received. More... | |
struct GNUNET_TIME_Relative | last_fc_rtt |
Expected RTT from the last FC transmission. More... | |
struct GNUNET_TIME_Relative | other_rtt |
Average RTT for over all paths of the DistanceVector of this VirtualLink calculated by the target. More... | |
struct GNUNET_PEERSTORE_IterateContext * | ic |
IterationContext for searching a burst address. More... | |
uint64_t | message_uuid_ctr |
Used to generate unique UUIDs for messages that are being fragmented. More... | |
uint64_t | available_fc_window_size |
Memory allocated for this virtual link. More... | |
uint64_t | incoming_fc_window_size_ram |
Memory actually used to buffer packets on this virtual link. More... | |
uint64_t | incoming_fc_window_size |
Last flow control window size we provided to the other peer, in bytes. More... | |
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. More... | |
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). More... | |
uint64_t | outbound_fc_window_size |
Our current flow control window size in bytes. More... | |
uint64_t | outbound_fc_window_size_used |
How much of our current flow control window size have we used (in bytes). More... | |
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. More... | |
uint32_t | fc_seq_gen |
Generator for the sequence numbers of GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL messages we send. More... | |
uint32_t | last_fc_seq |
Last sequence number of a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received. More... | |
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. More... | |
enum GNUNET_GenericReturnValue | sync_ready |
Are we ready to start the burst? More... | |
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 1365 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 1370 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(), free_neighbour(), free_virtual_link(), handle_flow_control(), handle_validation_response(), queue_burst(), send_msg_from_cache(), and start_burst().
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 1377 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 1384 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 1389 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 1395 of file gnunet-service-transport.c.
Referenced by finish_handling_raw_message(), handle_client_recv_ok(), and resume_communicators().
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 1401 of file gnunet-service-transport.c.
Referenced by finish_handling_raw_message(), 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 1406 of file gnunet-service-transport.c.
Referenced by check_vl_transmission(), forward_dv_box(), free_pending_message(), free_queue_entry(), free_virtual_link(), handle_client_send(), reorder_root_pm(), 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 1411 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 1416 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 1421 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 1429 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 1435 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), free_virtual_link(), handle_flow_control(), and task_consider_sending_fc().
struct GNUNET_StartBurstCls* VirtualLink::sb_cls |
The actual GNUNET_StartBurstCls of this VirtualLink.
Definition at line 1440 of file gnunet-service-transport.c.
Referenced by check_for_burst_address(), handle_flow_control(), queue_burst(), and start_burst().
char* VirtualLink::burst_addr |
global addresses for the peer.
Definition at line 1445 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), 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 1450 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), and handle_flow_control().
unsigned int VirtualLink::confirmed |
Is this VirtualLink confirmed.
A unconfirmed VirtualLink might exist, if we got a FC from that target.
Definition at line 1456 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), 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_challenge(), handle_validation_response(), notify_client_connect_info(), and transmit_cummulative_ack_cb().
struct Neighbour* VirtualLink::n |
Neighbour used by this virtual link, NULL if dv is used.
Definition at line 1461 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(), and handle_validation_response().
struct DistanceVector* VirtualLink::dv |
Distance vector used by this virtual link, NULL if n is used.
Definition at line 1466 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(), and handle_flow_control().
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 1473 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 1480 of file gnunet-service-transport.c.
Referenced by consider_sending_fc().
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 1489 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 1495 of file gnunet-service-transport.c.
Referenced by consider_sending_fc().
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 1501 of file gnunet-service-transport.c.
struct GNUNET_PEERSTORE_IterateContext* VirtualLink::ic |
IterationContext for searching a burst address.
Definition at line 1506 of file gnunet-service-transport.c.
Referenced by check_for_burst_address(), and queue_burst().
uint64_t VirtualLink::message_uuid_ctr |
Used to generate unique UUIDs for messages that are being fragmented.
Definition at line 1512 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), handle_flow_control(), and handle_validation_response().
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 1521 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), finish_handling_raw_message(), handle_flow_control(), and handle_validation_response().
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 1529 of file gnunet-service-transport.c.
Referenced by core_env_sent_cb(), and finish_handling_raw_message().
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 1536 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), consider_sending_fc(), handle_flow_control(), and handle_validation_response().
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 1545 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), core_env_sent_cb(), finish_handling_raw_message(), and handle_flow_control().
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 1558 of file gnunet-service-transport.c.
Referenced by consider_sending_fc(), and handle_flow_control().
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 1564 of file gnunet-service-transport.c.
Referenced by check_vl_transmission(), consider_sending_fc(), and handle_flow_control().
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 1571 of file gnunet-service-transport.c.
Referenced by check_vl_transmission(), consider_sending_fc(), and handle_flow_control().
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 1582 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 1588 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 1595 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 1608 of file gnunet-service-transport.c.
Referenced by activate_core_visible_dv_path(), finish_handling_raw_message(), handle_client_recv_ok(), handle_flow_control(), and handle_validation_response().
enum GNUNET_GenericReturnValue VirtualLink::sync_ready |
Are we ready to start the burst?
Definition at line 1613 of file gnunet-service-transport.c.
Referenced by consider_sending_fc().