GNUnet 0.22.2
CadetPeer Struct Reference

Struct containing all information regarding a given peer. More...

Collaboration diagram for CadetPeer:
[legend]

Data Fields

struct GNUNET_PeerIdentity pid
 ID of the peer. More...
 
struct GNUNET_TIME_Absolute last_connection_create
 Last time we heard from this peer (currently not used!) More...
 
struct CadetPeerPathEntry ** path_heads
 Array of DLLs of paths traversing the peer, organized by the offset of the peer on the larger path. More...
 
struct CadetPeerPathEntry ** path_tails
 Array of DLL of paths traversing the peer, organized by the offset of the peer on the larger path. More...
 
struct GCP_MessageQueueManagermqm_head
 Notifications to call when core_mq changes. More...
 
struct GCP_MessageQueueManagermqm_tail
 Notifications to call when core_mq changes. More...
 
struct GCP_MessageQueueManagermqm_ready_ptr
 Pointer to first "ready" entry in mqm_head. More...
 
struct GNUNET_CONTAINER_Heappath_heap
 MIN-heap of paths owned by this peer (they also end at this peer). More...
 
struct GCD_search_handlesearch_h
 Handle to stop the DHT search for paths to this peer. More...
 
struct GNUNET_SCHEDULER_Taskheap_cleanup_task
 Task to clean up path_heap asynchronously. More...
 
struct GNUNET_SCHEDULER_Taskdestroy_task
 Task to destroy this entry. More...
 
struct CadetTunnelt
 Tunnel to this peer, if any. More...
 
struct GNUNET_CONTAINER_MultiShortmapconnections
 Connections that go through this peer; indexed by tid. More...
 
struct GNUNET_MQ_Handlecore_mq
 Handle for core transmissions. More...
 
struct GNUNET_MessageHeaderhello
 Hello message of the peer. More...
 
struct GNUNET_TRANSPORT_OfferHelloHandle * hello_offer
 Handle to us offering the HELLO to the transport. More...
 
struct GNUNET_TRANSPORT_ApplicationSuggestHandleash
 Transport suggest handle. More...
 
unsigned int queue_n
 How many messages are in the queue to this peer. More...
 
unsigned int num_paths
 How many paths do we have to this peer (in all path_heads DLLs combined). More...
 
unsigned int off_sum
 Sum over all of the offsets of all of the paths in the path_heads DLLs. More...
 
unsigned int mqm_ready_counter
 Number of message queue managers of this peer that have a message in waiting. More...
 
unsigned int path_dll_length
 Current length of the path_heads and path_tails arrays. More...
 

Detailed Description

Struct containing all information regarding a given peer.

Definition at line 110 of file gnunet-service-cadet_peer.c.

Field Documentation

◆ pid

◆ last_connection_create

struct GNUNET_TIME_Absolute CadetPeer::last_connection_create

Last time we heard from this peer (currently not used!)

Definition at line 120 of file gnunet-service-cadet_peer.c.

Referenced by GCP_check_and_update_monotime().

◆ path_heads

struct CadetPeerPathEntry** CadetPeer::path_heads

Array of DLLs of paths traversing the peer, organized by the offset of the peer on the larger path.

Definition at line 126 of file gnunet-service-cadet_peer.c.

Referenced by destroy_peer(), GCP_get_desirability_of_path(), GCP_iterate_indirect_paths(), GCP_iterate_paths(), GCP_iterate_paths_at(), GCP_path_entry_add(), and GCP_path_entry_remove().

◆ path_tails

struct CadetPeerPathEntry** CadetPeer::path_tails

Array of DLL of paths traversing the peer, organized by the offset of the peer on the larger path.

Definition at line 132 of file gnunet-service-cadet_peer.c.

Referenced by destroy_peer(), GCP_path_entry_add(), and GCP_path_entry_remove().

◆ mqm_head

struct GCP_MessageQueueManager* CadetPeer::mqm_head

Notifications to call when core_mq changes.

Definition at line 137 of file gnunet-service-cadet_peer.c.

Referenced by destroy_peer(), GCP_request_mq(), GCP_request_mq_cancel(), GCP_send(), GCP_set_mq(), and mqm_execute().

◆ mqm_tail

struct GCP_MessageQueueManager* CadetPeer::mqm_tail

Notifications to call when core_mq changes.

Definition at line 142 of file gnunet-service-cadet_peer.c.

Referenced by GCP_request_mq(), GCP_request_mq_cancel(), and mqm_execute().

◆ mqm_ready_ptr

struct GCP_MessageQueueManager* CadetPeer::mqm_ready_ptr

Pointer to first "ready" entry in mqm_head.

Definition at line 147 of file gnunet-service-cadet_peer.c.

Referenced by destroy_peer(), GCP_request_mq_cancel(), GCP_send(), mqm_execute(), and send_next_ready().

◆ path_heap

struct GNUNET_CONTAINER_Heap* CadetPeer::path_heap

MIN-heap of paths owned by this peer (they also end at this peer).

Ordered by desirability.

Definition at line 153 of file gnunet-service-cadet_peer.c.

Referenced by consider_peer_destroy(), destroy_peer(), drop_paths(), GCP_attach_path(), GCP_drop_owned_paths(), GCP_get(), and path_heap_cleanup().

◆ search_h

struct GCD_search_handle* CadetPeer::search_h

Handle to stop the DHT search for paths to this peer.

Definition at line 158 of file gnunet-service-cadet_peer.c.

Referenced by consider_peer_activate(), destroy_peer(), GCP_path_entry_add(), and GCP_path_entry_remove().

◆ heap_cleanup_task

struct GNUNET_SCHEDULER_Task* CadetPeer::heap_cleanup_task

Task to clean up path_heap asynchronously.

Definition at line 163 of file gnunet-service-cadet_peer.c.

Referenced by destroy_peer(), GCP_attach_path(), and path_heap_cleanup().

◆ destroy_task

◆ t

◆ connections

struct GNUNET_CONTAINER_MultiShortmap* CadetPeer::connections

Connections that go through this peer; indexed by tid.

Definition at line 178 of file gnunet-service-cadet_peer.c.

Referenced by consider_peer_activate(), consider_peer_destroy(), destroy_peer(), GCP_add_connection(), GCP_get(), and GCP_remove_connection().

◆ core_mq

◆ hello

struct GNUNET_MessageHeader* CadetPeer::hello

Hello message of the peer.

Definition at line 188 of file gnunet-service-cadet_peer.c.

Referenced by consider_peer_destroy(), destroy_peer(), dht_get_id_handler(), and GCP_set_hello().

◆ hello_offer

struct GNUNET_TRANSPORT_OfferHelloHandle* CadetPeer::hello_offer

Handle to us offering the HELLO to the transport.

Definition at line 193 of file gnunet-service-cadet_peer.c.

◆ ash

Transport suggest handle.

Definition at line 198 of file gnunet-service-cadet_peer.c.

Referenced by consider_peer_activate(), destroy_peer(), and GCP_set_hello().

◆ queue_n

unsigned int CadetPeer::queue_n

How many messages are in the queue to this peer.

Definition at line 203 of file gnunet-service-cadet_peer.c.

◆ num_paths

unsigned int CadetPeer::num_paths

How many paths do we have to this peer (in all path_heads DLLs combined).

Definition at line 208 of file gnunet-service-cadet_peer.c.

Referenced by consider_peer_activate(), consider_peer_destroy(), destroy_peer(), GCP_attach_path(), GCP_count_paths(), GCP_get_desirability_of_path(), GCP_path_entry_add(), and GCP_path_entry_remove().

◆ off_sum

unsigned int CadetPeer::off_sum

Sum over all of the offsets of all of the paths in the path_heads DLLs.

Used to speed-up GCP_get_desirability_of_path() calculation.

Definition at line 214 of file gnunet-service-cadet_peer.c.

Referenced by GCP_get_desirability_of_path(), GCP_path_entry_add(), and GCP_path_entry_remove().

◆ mqm_ready_counter

unsigned int CadetPeer::mqm_ready_counter

Number of message queue managers of this peer that have a message in waiting.

Used to quickly see if we need to bother scanning the msm_head DLL. TODO: could be replaced by another DLL that would then allow us to avoid the O(n)-scan of the DLL for ready entries!

Definition at line 223 of file gnunet-service-cadet_peer.c.

Referenced by GCP_send(), mqm_execute(), and send_next_ready().

◆ path_dll_length

unsigned int CadetPeer::path_dll_length

Current length of the path_heads and path_tails arrays.

The arrays should be grown as needed.

Definition at line 229 of file gnunet-service-cadet_peer.c.

Referenced by destroy_peer(), GCP_get_desirability_of_path(), GCP_iterate_indirect_paths(), GCP_iterate_paths(), GCP_iterate_paths_at(), and GCP_path_entry_add().


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