GNUnet  0.11.x
Data Fields
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 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...
 
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 1208 of file gnunet-service-tng.c.

Field Documentation

◆ target

struct GNUNET_PeerIdentity VirtualLink::target

◆ 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 1219 of file gnunet-service-tng.c.

Referenced by handle_client_recv_ok(), and handle_raw_message().

◆ 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 1225 of file gnunet-service-tng.c.

Referenced by handle_client_recv_ok(), and handle_raw_message().

◆ pending_msg_head

struct PendingMessage* VirtualLink::pending_msg_head

◆ pending_msg_tail

struct PendingMessage* VirtualLink::pending_msg_tail

Tail of list of messages pending for this VL.

Definition at line 1235 of file gnunet-service-tng.c.

Referenced by forward_dv_box(), free_pending_message(), handle_client_send(), and update_pm_next_attempt().

◆ csc_tail

struct CoreSentContext* VirtualLink::csc_tail

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

Definition at line 1240 of file gnunet-service-tng.c.

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

◆ csc_head

struct CoreSentContext* VirtualLink::csc_head

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

Definition at line 1245 of file gnunet-service-tng.c.

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

◆ 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 1253 of file gnunet-service-tng.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 1259 of file gnunet-service-tng.c.

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

◆ n

struct Neighbour* VirtualLink::n

Neighbour used by this virtual link, NULL if dv is used.

Definition at line 1264 of file gnunet-service-tng.c.

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

◆ dv

struct DistanceVector* VirtualLink::dv

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

Definition at line 1269 of file gnunet-service-tng.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 1276 of file gnunet-service-tng.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 1283 of file gnunet-service-tng.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 1292 of file gnunet-service-tng.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 1298 of file gnunet-service-tng.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 1304 of file gnunet-service-tng.c.

Referenced by activate_core_visible_dv_path(), and set_pending_message_uuid().

◆ 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 1313 of file gnunet-service-tng.c.

Referenced by activate_core_visible_dv_path(), handle_raw_message(), 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 1321 of file gnunet-service-tng.c.

Referenced by core_env_sent_cb(), and handle_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 1328 of file gnunet-service-tng.c.

Referenced by consider_sending_fc(), and handle_flow_control().

◆ 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 1337 of file gnunet-service-tng.c.

Referenced by core_env_sent_cb(), handle_flow_control(), and handle_raw_message().

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

Referenced by 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 1356 of file gnunet-service-tng.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 1363 of file gnunet-service-tng.c.

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

◆ 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 1374 of file gnunet-service-tng.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 1380 of file gnunet-service-tng.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 1387 of file gnunet-service-tng.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 1400 of file gnunet-service-tng.c.

Referenced by activate_core_visible_dv_path(), handle_client_recv_ok(), handle_raw_message(), and handle_validation_response().


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