Struct containing all information regarding a given peer. More...
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_MessageQueueManager * | mqm_head |
Notifications to call when core_mq changes. More... | |
struct GCP_MessageQueueManager * | mqm_tail |
Notifications to call when core_mq changes. More... | |
struct GCP_MessageQueueManager * | mqm_ready_ptr |
Pointer to first "ready" entry in mqm_head. More... | |
struct GNUNET_CONTAINER_Heap * | path_heap |
MIN-heap of paths owned by this peer (they also end at this peer). More... | |
struct GCD_search_handle * | search_h |
Handle to stop the DHT search for paths to this peer. More... | |
struct GNUNET_SCHEDULER_Task * | heap_cleanup_task |
Task to clean up path_heap asynchronously. More... | |
struct GNUNET_SCHEDULER_Task * | destroy_task |
Task to destroy this entry. More... | |
struct CadetTunnel * | t |
Tunnel to this peer, if any. More... | |
struct GNUNET_CONTAINER_MultiShortmap * | connections |
Connections that go through this peer; indexed by tid. More... | |
struct GNUNET_MQ_Handle * | core_mq |
Handle for core transmissions. More... | |
struct GNUNET_MessageHeader * | hello |
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_ApplicationSuggestHandle * | ash |
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... | |
Struct containing all information regarding a given peer.
Definition at line 110 of file gnunet-service-cadet_peer.c.
struct GNUNET_PeerIdentity CadetPeer::pid |
ID of the peer.
Definition at line 115 of file gnunet-service-cadet_peer.c.
Referenced by consider_peer_activate(), destroy_peer(), GCP_2s(), GCP_check_monotime_sig(), GCP_get(), GCP_get_id(), GCP_iterate_paths(), GCP_path_entry_remove(), GCP_set_hello(), and GCP_set_mq().
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().
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().
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().
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().
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().
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().
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().
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().
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().
struct GNUNET_SCHEDULER_Task* CadetPeer::destroy_task |
Task to destroy this entry.
Definition at line 168 of file gnunet-service-cadet_peer.c.
Referenced by consider_peer_activate(), consider_peer_destroy(), destroy_iterator_cb(), destroy_peer(), drop_paths(), GCP_add_connection(), GCP_path_entry_add(), and GCP_path_entry_remove().
struct CadetTunnel* CadetPeer::t |
Tunnel to this peer, if any.
Definition at line 173 of file gnunet-service-cadet_peer.c.
Referenced by consider_peer_activate(), consider_peer_destroy(), destroy_peer(), GCP_drop_tunnel(), GCP_get_tunnel(), GCP_path_entry_add(), GCP_path_entry_remove(), and GCP_set_mq().
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().
struct GNUNET_MQ_Handle* CadetPeer::core_mq |
Handle for core transmissions.
Definition at line 183 of file gnunet-service-cadet_peer.c.
Referenced by consider_peer_activate(), consider_peer_destroy(), destroy_peer(), GCP_has_core_connection(), GCP_iterate_paths(), GCP_path_entry_remove(), GCP_request_mq(), GCP_request_mq_cancel(), GCP_send(), GCP_send_ooo(), GCP_set_mq(), and mqm_execute().
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().
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.
struct GNUNET_TRANSPORT_ApplicationSuggestHandle* CadetPeer::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().
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.
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().
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().
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().
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().