GNUnet  0.20.0
Peer Struct Reference

A peer. More...

#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/testbed/gnunet-service-testbed.h>

Collaboration diagram for Peer:
[legend]

Data Fields

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_PeerIdentity pid
 Which peer is this entry about? 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

A peer.

Record for neighbours, friends and blacklisted peers.

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

Field Documentation

◆ peer

◆ cfg

struct GNUNET_CONFIGURATION_Handle* Peer::cfg

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

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

Referenced by gnunet_testing.Peer::__del__(), gnunet_testing.Peer::get_statistics_value(), gnunet_testing.Peer::start(), and gnunet_testing.Peer::stop().

◆ is_running

int Peer::is_running

Is the peer running.

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

◆ 

◆ slave

struct Slave* Peer::slave

The slave this peer is started through.

Definition at line 203 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 208 of file gnunet-service-testbed.h.

◆ 

struct { ... } Peer::remote

Referenced by handle_overlay_connect().

◆ 

◆ is_remote

int Peer::is_remote

Is this peer locally created?

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

◆ 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 229 of file gnunet-service-testbed.h.

Referenced by cleanup_mctx(), cleanup_occ(), cleanup_rocc(), handle_overlay_connect(), 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 238 of file gnunet-service-testbed.h.

Referenced by cleanup_mctx(), cleanup_rocc(), and peer_destroy_success_cb().

◆ pid

struct GNUNET_PeerIdentity Peer::pid

Which peer is this entry about?

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

Referenced by attempt_connect(), find_advertisable_hello(), handle_friend(), process_peer(), and schedule_next_hello().

◆ mq

struct GNUNET_MQ_Handle* Peer::mq

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

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

Referenced by attempt_connect(), connect_notify(), disconnect_notify(), free_peer(), process_peer(), 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 83 of file gnunet-daemon-topology.c.

Referenced by consider_for_advertising(), find_advertisable_hello(), free_peer(), make_peer(), process_peer(), 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 89 of file gnunet-daemon-topology.c.

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

◆ 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 89 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 89 of file gnunet-daemon-topology.c.

Referenced by find_advertisable_hello().

◆ 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 105 of file gnunet-daemon-topology.c.

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

◆ sh

Handle for our connectivity suggestion for this peer.

Definition at line 110 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 115 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 120 of file gnunet-daemon-topology.c.

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


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