GNUnet 0.21.1
VirtualLink Struct Reference

A virtual link is another reachable peer that is known to CORE. More...

Collaboration diagram for VirtualLink:
[legend]

Data Fields

struct GNUNET_PeerIdentity target
 Identity of the peer at the other end of the link. More...
 
struct GNUNET_CONTAINER_MultiHashMap32reassembly_map
 Map with struct ReassemblyContext structs for fragments under reassembly. More...
 
struct GNUNET_CONTAINER_Heapreassembly_heap
 Heap with struct ReassemblyContext structs for fragments under reassembly. More...
 
struct GNUNET_SCHEDULER_Taskreassembly_timeout_task
 Task to free old entries from the reassembly_heap and reassembly_map. More...
 
struct CommunicatorMessageContextcmc_head
 Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase. More...
 
struct CommunicatorMessageContextcmc_tail
 Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase. More...
 
struct PendingMessagepending_msg_head
 Head of list of messages pending for this VL. More...
 
struct PendingMessagepending_msg_tail
 Tail of list of messages pending for this VL. More...
 
struct CoreSentContextcsc_tail
 Kept in a DLL to clear vl in case vl is lost. More...
 
struct CoreSentContextcsc_head
 Kept in a DLL to clear vl in case vl is lost. More...
 
struct GNUNET_SCHEDULER_Taskvisibility_task
 Task scheduled to possibly notfiy core that this peer is no longer counting as confirmed. More...
 
struct GNUNET_SCHEDULER_Taskfc_retransmit_task
 Task scheduled to periodically retransmit FC messages (in case one got lost). More...
 
unsigned int fc_retransmit_count
 Number of FC retransmissions for this running task. More...
 
unsigned int confirmed
 Is this VirtualLink confirmed. More...
 
struct Neighbourn
 Neighbour used by this virtual link, NULL if dv is used. More...
 
struct DistanceVectordv
 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...
 
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...
 

Detailed Description

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 1350 of file gnunet-service-transport.c.

Field Documentation

◆ target

◆ reassembly_map

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 1362 of file gnunet-service-transport.c.

Referenced by free_reassembly_context(), free_virtual_link(), and handle_fragment_box().

◆ reassembly_heap

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 1369 of file gnunet-service-transport.c.

Referenced by free_virtual_link(), handle_fragment_box(), and reassembly_cleanup_task().

◆ reassembly_timeout_task

struct GNUNET_SCHEDULER_Task* VirtualLink::reassembly_timeout_task

Task to free old entries from the reassembly_heap and reassembly_map.

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

Referenced by free_virtual_link(), handle_fragment_box(), and reassembly_cleanup_task().

◆ cmc_head

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 1380 of file gnunet-service-transport.c.

Referenced by finish_handling_raw_message(), handle_client_recv_ok(), and resume_communicators().

◆ cmc_tail

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 1386 of file gnunet-service-transport.c.

Referenced by finish_handling_raw_message(), handle_client_recv_ok(), and resume_communicators().

◆ pending_msg_head

◆ pending_msg_tail

struct PendingMessage* VirtualLink::pending_msg_tail

Tail of list of messages pending for this VL.

Definition at line 1396 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().

◆ csc_tail

struct CoreSentContext* VirtualLink::csc_tail

Kept in a DLL to clear vl in case vl is lost.

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

Referenced by core_env_sent_cb(), finish_handling_raw_message(), and free_virtual_link().

◆ csc_head

struct CoreSentContext* VirtualLink::csc_head

Kept in a DLL to clear vl in case vl is lost.

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

Referenced by core_env_sent_cb(), finish_handling_raw_message(), and free_virtual_link().

◆ visibility_task

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 1414 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().

◆ fc_retransmit_task

struct GNUNET_SCHEDULER_Task* VirtualLink::fc_retransmit_task

Task scheduled to periodically retransmit FC messages (in case one got lost).

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

Referenced by consider_sending_fc(), free_virtual_link(), handle_flow_control(), and task_consider_sending_fc().

◆ fc_retransmit_count

unsigned int VirtualLink::fc_retransmit_count

Number of FC retransmissions for this running task.

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

Referenced by consider_sending_fc(), and handle_flow_control().

◆ confirmed

◆ n

struct Neighbour* VirtualLink::n

◆ dv

struct DistanceVector* VirtualLink::dv

Distance vector used by this virtual link, NULL if n is used.

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

Referenced by activate_core_visible_dv_path(), check_link_down(), check_vl_transmission(), free_dv_route(), free_neighbour(), and free_virtual_link().

◆ n_challenge_time

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 1448 of file gnunet-service-transport.c.

◆ last_fc_transmission

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 1455 of file gnunet-service-transport.c.

Referenced by consider_sending_fc().

◆ last_fc_timestamp

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 1464 of file gnunet-service-transport.c.

Referenced by handle_flow_control().

◆ last_fc_rtt

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 1470 of file gnunet-service-transport.c.

Referenced by consider_sending_fc().

◆ message_uuid_ctr

uint64_t VirtualLink::message_uuid_ctr

Used to generate unique UUIDs for messages that are being fragmented.

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

Referenced by activate_core_visible_dv_path(), handle_flow_control(), and handle_validation_response().

◆ available_fc_window_size

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 1485 of file gnunet-service-transport.c.

Referenced by activate_core_visible_dv_path(), finish_handling_raw_message(), handle_flow_control(), and handle_validation_response().

◆ incoming_fc_window_size_ram

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 1493 of file gnunet-service-transport.c.

Referenced by core_env_sent_cb(), and finish_handling_raw_message().

◆ incoming_fc_window_size

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 1500 of file gnunet-service-transport.c.

Referenced by activate_core_visible_dv_path(), consider_sending_fc(), handle_flow_control(), and handle_validation_response().

◆ incoming_fc_window_size_used

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 1509 of file gnunet-service-transport.c.

Referenced by consider_sending_fc(), core_env_sent_cb(), finish_handling_raw_message(), and handle_flow_control().

◆ incoming_fc_window_size_loss

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 1522 of file gnunet-service-transport.c.

Referenced by consider_sending_fc(), and handle_flow_control().

◆ outbound_fc_window_size

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 1528 of file gnunet-service-transport.c.

Referenced by check_vl_transmission(), consider_sending_fc(), and handle_flow_control().

◆ outbound_fc_window_size_used

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 1535 of file gnunet-service-transport.c.

Referenced by check_vl_transmission(), consider_sending_fc(), and handle_flow_control().

◆ last_outbound_window_size_received

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 1546 of file gnunet-service-transport.c.

Referenced by handle_flow_control().

◆ fc_seq_gen

uint32_t VirtualLink::fc_seq_gen

Generator for the sequence numbers of GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL messages we send.

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

Referenced by consider_sending_fc().

◆ last_fc_seq

uint32_t VirtualLink::last_fc_seq

Last sequence number of a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received.

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

Referenced by handle_flow_control().

◆ core_recv_window

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 1572 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().


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