GNUnet  0.11.x
Data Fields
Peer Struct Reference

A peer. More...

#include </home/handbook/gnunet/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

struct GNUNET_TESTING_Peer* Peer::peer

The peer handle from testing API.

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

◆ is_running

int Peer::is_running

Is the peer running.

Definition at line 195 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 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.

◆ 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 229 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 238 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().

◆ pid

struct GNUNET_PeerIdentity Peer::pid

◆ 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(), 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 83 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 89 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 94 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 99 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 105 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 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(), handle_hello(), make_peer(), and process_peer().


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