GNUnet  0.10.x
Data Fields
Peer Struct Reference

Information about preferences and sessions we track per peer. More...

#include </home/handbook/gnunet/src/testbed/gnunet-service-testbed.h>

Collaboration diagram for Peer:
[legend]

Data Fields

struct GNUNET_ATS_SessionHandlesh_head
 Kept in DLL per peer. More...
 
struct GNUNET_ATS_SessionHandlesh_tail
 Kept in DLL per peer. More...
 
struct Helloh_head
 Kept in a DLL. More...
 
struct Helloh_tail
 Kept in a DLL. More...
 
struct SimpleHandleh
 The handle for the proportional solver. More...
 
struct GNUNET_PEERSTORE_WatchContextwc
 Watch context where we are currently looking for HELLOs for this peer. More...
 
struct GNUNET_SCHEDULER_Tasktask
 Task used to try again to suggest an address for this peer. More...
 
struct GNUNET_PeerIdentity pid
 Which peer is this for? More...
 
struct GNUNET_TIME_Absolute last_suggestion
 When did we last suggest an address to connect to for this peer? More...
 
uint64_t bw_by_pk [GNUNET_MQ_PREFERENCE_COUNT]
 Array where we sum up the bandwidth requests received indexed by preference kind (see enum GNUNET_MQ_PreferenceKind) More...
 
union {
   struct {
      struct GNUNET_TESTING_Peer *   peer
 The peer handle from testing API. More...
 
      struct GNUNET_CONFIGURATION_Handle *   cfg
 The modified (by GNUNET_TESTING_peer_configure) configuration this peer is configured with. More...
 
      int   is_running
 Is the peer running. More...
 
   }   local
 
   struct {
      struct Slave *   slave
 The slave this peer is started through. More...
 
      uint32_t   remote_host_id
 The id of the remote host this peer is running on. More...
 
   }   remote
 
details
 
int is_remote
 Is this peer locally created? More...
 
uint32_t id
 Our local reference id for this peer. More...
 
uint32_t reference_cnt
 References to peers are using in forwarded overlay contexts and remote overlay connect contexts. More...
 
uint32_t destroy_flag
 While destroying a peer, due to the fact that there could be references to this peer, we delay the peer destroy to a further time. More...
 
struct GNUNET_MQ_Handlemq
 Our handle for transmitting to this peer; NULL if peer is not connected. More...
 
struct GNUNET_HELLO_Messagehello
 Pointer to the HELLO message of this peer; can be NULL. More...
 
struct GNUNET_CONTAINER_BloomFilterfilter
 Bloom filter used to mark which peers already got the HELLO from this peer. More...
 
struct GNUNET_TIME_Absolute next_hello_allowed
 Next time we are allowed to transmit a HELLO to this peer? More...
 
struct GNUNET_TIME_Absolute filter_expiration
 When should we reset the bloom filter of this entry? More...
 
struct GNUNET_SCHEDULER_Taskhello_delay_task
 ID of task we use to wait for the time to send the next HELLO to this peer. More...
 
struct GNUNET_ATS_ConnectivitySuggestHandlesh
 Handle for our connectivity suggestion for this peer. More...
 
uint32_t strength
 How much would we like to connect to this peer? More...
 
int is_friend
 Is this peer listed here because it is a friend? More...
 

Detailed Description

Information about preferences and sessions we track per peer.

Record for neighbours, friends and blacklisted peers.

A peer.

Definition at line 192 of file plugin_ats2_simple.c.

Field Documentation

◆ sh_head

struct GNUNET_ATS_SessionHandle* Peer::sh_head

◆ sh_tail

struct GNUNET_ATS_SessionHandle* Peer::sh_tail

Kept in DLL per peer.

Definition at line 201 of file plugin_ats2_simple.c.

Referenced by simple_session_add(), and simple_session_del().

◆ h_head

struct Hello* Peer::h_head

Kept in a DLL.

Definition at line 206 of file plugin_ats2_simple.c.

Referenced by peer_free(), simple_session_add(), suggest_start_cb(), and watch_cb().

◆ h_tail

struct Hello* Peer::h_tail

Kept in a DLL.

Definition at line 211 of file plugin_ats2_simple.c.

Referenced by peer_free(), suggest_start_cb(), and watch_cb().

◆ h

struct SimpleHandle* Peer::h

The handle for the proportional solver.

Definition at line 216 of file plugin_ats2_simple.c.

Referenced by consider_notify_transport(), peer_add(), peer_free(), and suggest_hello().

◆ wc

Watch context where we are currently looking for HELLOs for this peer.

Definition at line 222 of file plugin_ats2_simple.c.

Referenced by peer_add(), and peer_free().

◆ task

struct GNUNET_SCHEDULER_Task* Peer::task

Task used to try again to suggest an address for this peer.

Definition at line 227 of file plugin_ats2_simple.c.

Referenced by peer_free(), simple_session_del(), suggest_start_cb(), and watch_cb().

◆ pid

struct GNUNET_PeerIdentity Peer::pid

◆ last_suggestion

struct GNUNET_TIME_Absolute Peer::last_suggestion

When did we last suggest an address to connect to for this peer?

Definition at line 237 of file plugin_ats2_simple.c.

Referenced by suggest_hello().

◆ bw_by_pk

uint64_t Peer::bw_by_pk[GNUNET_MQ_PREFERENCE_COUNT]

Array where we sum up the bandwidth requests received indexed by preference kind (see enum GNUNET_MQ_PreferenceKind)

Definition at line 243 of file plugin_ats2_simple.c.

Referenced by peer_test_dead(), simple_preference_add(), simple_preference_del(), and update_counters().

◆ peer

struct GNUNET_TESTING_Peer* Peer::peer

The peer handle from testing API.

Definition at line 177 of file gnunet-service-testbed.h.

Referenced by consider_for_advertising(), handle_hello(), make_peer(), and reschedule_hellos().

◆ cfg

struct GNUNET_CONFIGURATION_Handle* Peer::cfg

The modified (by GNUNET_TESTING_peer_configure) configuration this peer is configured with.

Definition at line 183 of file gnunet-service-testbed.h.

◆ is_running

int Peer::is_running

Is the peer running.

Definition at line 188 of file gnunet-service-testbed.h.

◆ local

struct { ... } Peer::local

◆ slave

struct Slave* Peer::slave

The slave this peer is started through.

Definition at line 195 of file gnunet-service-testbed.h.

Referenced by handle_peer_destroy(), handle_peer_get_config(), handle_peer_start(), and handle_peer_stop().

◆ remote_host_id

uint32_t Peer::remote_host_id

The id of the remote host this peer is running on.

Definition at line 200 of file gnunet-service-testbed.h.

◆ remote

struct { ... } Peer::remote

◆ details

union { ... } Peer::details

◆ is_remote

int Peer::is_remote

◆ id

uint32_t Peer::id

◆ reference_cnt

uint32_t Peer::reference_cnt

References to peers are using in forwarded overlay contexts and remote overlay connect contexts.

A peer can only be destroyed after all such contexts are destroyed. For this, we maintain a reference counter. When we use a peer in any such context, we increment this counter. We decrement it when we are destroying these contexts

Definition at line 221 of file gnunet-service-testbed.h.

Referenced by cleanup_mctx(), cleanup_occ(), cleanup_rocc(), GST_destroy_peer(), GST_destroy_peers(), handle_manage_peer_service(), handle_overlay_connect(), handle_peer_destroy(), handle_peer_reconfigure(), handle_remote_overlay_connect(), and peer_destroy_success_cb().

◆ destroy_flag

uint32_t Peer::destroy_flag

While destroying a peer, due to the fact that there could be references to this peer, we delay the peer destroy to a further time.

We do this by using this flag to destroy the peer while destroying a context in which this peer has been used. When the flag is set to 1 and reference_cnt = 0 we destroy the peer

Definition at line 230 of file gnunet-service-testbed.h.

Referenced by cleanup_mctx(), cleanup_rocc(), GST_destroy_peers(), handle_peer_destroy(), handle_peer_reconfigure(), and peer_destroy_success_cb().

◆ mq

struct GNUNET_MQ_Handle* Peer::mq

Our handle for transmitting to this peer; NULL if peer is not connected.

Definition at line 77 of file gnunet-daemon-topology.c.

Referenced by attempt_connect(), connect_notify(), disconnect_notify(), free_peer(), process_peer(), reschedule_hellos(), and schedule_next_hello().

◆ hello

struct GNUNET_HELLO_Message* Peer::hello

Pointer to the HELLO message of this peer; can be NULL.

Definition at line 82 of file gnunet-daemon-topology.c.

Referenced by consider_for_advertising(), find_advertisable_hello(), free_peer(), make_peer(), process_peer(), run(), and schedule_next_hello().

◆ filter

struct GNUNET_CONTAINER_BloomFilter* Peer::filter

Bloom filter used to mark which peers already got the HELLO from this peer.

Definition at line 88 of file gnunet-daemon-topology.c.

Referenced by consider_for_advertising(), find_advertisable_hello(), free_peer(), process_peer(), schedule_next_hello(), and setup_filter().

◆ next_hello_allowed

struct GNUNET_TIME_Absolute Peer::next_hello_allowed

Next time we are allowed to transmit a HELLO to this peer?

Definition at line 93 of file gnunet-daemon-topology.c.

Referenced by schedule_next_hello().

◆ filter_expiration

struct GNUNET_TIME_Absolute Peer::filter_expiration

When should we reset the bloom filter of this entry?

Definition at line 98 of file gnunet-daemon-topology.c.

Referenced by find_advertisable_hello(), and setup_filter().

◆ hello_delay_task

struct GNUNET_SCHEDULER_Task* Peer::hello_delay_task

ID of task we use to wait for the time to send the next HELLO to this peer.

Definition at line 104 of file gnunet-daemon-topology.c.

Referenced by disconnect_notify(), free_peer(), reschedule_hellos(), and schedule_next_hello().

◆ sh

Handle for our connectivity suggestion for this peer.

Definition at line 109 of file gnunet-daemon-topology.c.

Referenced by attempt_connect(), and free_peer().

◆ strength

uint32_t Peer::strength

How much would we like to connect to this peer?

Definition at line 114 of file gnunet-daemon-topology.c.

Referenced by attempt_connect().

◆ is_friend

int Peer::is_friend

Is this peer listed here because it is a friend?

Definition at line 119 of file gnunet-daemon-topology.c.

Referenced by attempt_connect(), blacklist_check(), connect_notify(), disconnect_notify(), handle_hello(), make_peer(), and process_peer().


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