A peer. More...
#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/testbed/gnunet-service-testbed.h>
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_Handle * | mq |
Our handle for transmitting to this peer; NULL if peer is not connected. More... | |
struct GNUNET_HELLO_Message * | hello |
Pointer to the HELLO message of this peer; can be NULL. More... | |
struct GNUNET_CONTAINER_BloomFilter * | filter |
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_Task * | hello_delay_task |
ID of task we use to wait for the time to send the next HELLO to this peer. More... | |
struct GNUNET_ATS_ConnectivitySuggestHandle * | sh |
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... | |
A peer.
Record for neighbours, friends and blacklisted peers.
Definition at line 175 of file gnunet-service-testbed.h.
struct GNUNET_TESTING_Peer* Peer::peer |
The peer handle from testing API.
Definition at line 184 of file gnunet-service-testbed.h.
Referenced by gnunet_testing.StatisticsCondition::check(), gnunet_testing.EqualStatisticsCondition::check(), gnunet_testing.StatisticsCondition::evaluate(), and gnunet_testing.EqualStatisticsCondition::evaluate().
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().
int Peer::is_running |
Is the peer running.
Definition at line 195 of file gnunet-service-testbed.h.
struct { ... } Peer::local |
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().
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().
union { ... } Peer::details |
int Peer::is_remote |
Is this peer locally created?
Definition at line 215 of file gnunet-service-testbed.h.
uint32_t Peer::id |
Our local reference id for this peer.
Definition at line 220 of file gnunet-service-testbed.h.
Referenced by attempt_connect_task(), handle_overlay_connect(), hello_update_cb(), occ_cache_get_handle_ats_occ_cb(), occ_cache_get_handle_core_cb(), overlay_connect_get_config(), rocc_cache_get_handle_transport_cb(), rocc_hello_sent_cb(), send_overlay_connect_success_msg(), service_manage_result_cb(), and gnunet_testing.Peer::start().
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().
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().
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().
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().
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().
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().
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().
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().
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().
struct GNUNET_ATS_ConnectivitySuggestHandle* Peer::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().
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().
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().