Information we track per peer. More...
Go to the source code of this file.
Data Structures | |
struct | CadetPeerPathEntry |
Entry in a peer path. More... | |
struct | CadetTConnection |
Entry in list of connections used by tunnel, with metadata. More... | |
struct | OpenPort |
Port opened by a client. More... | |
Functions | |
void | GSC_send_to_client (struct CadetClient *c, struct GNUNET_MQ_Envelope *env) |
Send a message to a client. More... | |
void | GSC_handle_remote_channel_destroy (struct CadetClient *c, struct GNUNET_CADET_ClientChannelNumber ccn, struct CadetChannel *ch) |
A channel was destroyed by the other peer. More... | |
void | GSC_drop_loose_channel (const struct GNUNET_HashCode *h_port, struct CadetChannel *ch) |
A client that created a loose channel that was not bound to a port disconnected, drop it from the loose_channels list. More... | |
struct GNUNET_CADET_ClientChannelNumber | GSC_bind (struct CadetClient *c, struct CadetChannel *ch, struct CadetPeer *dest, const struct GNUNET_HashCode *port, uint32_t options) |
Bind incoming channel to this client, and notify client about incoming connection. More... | |
const char * | GSC_2s (struct CadetClient *c) |
Return identifier for a client as a string. More... | |
Variables | |
const struct GNUNET_CONFIGURATION_Handle * | cfg |
Handle to our configuration. More... | |
struct GNUNET_STATISTICS_Handle * | stats |
Handle to the statistics service. More... | |
struct GNUNET_TRANSPORT_ApplicationHandle * | transport |
Handle to Transport service. More... | |
struct GNUNET_PeerIdentity | my_full_id |
Local peer own ID. More... | |
struct GNUNET_CRYPTO_EddsaPrivateKey * | my_private_key |
Own private key. More... | |
struct GNUNET_CONTAINER_MultiHashMap * | open_ports |
All ports clients of this peer have opened. More... | |
struct GNUNET_CONTAINER_MultiShortmap * | connections |
Map from struct GNUNET_CADET_ConnectionTunnelIdentifier hash codes to struct CadetConnection objects. More... | |
struct GNUNET_CONTAINER_MultiHashMap * | loose_channels |
Map from ports to channels where the ports were closed at the time we got the inbound connection. More... | |
struct GNUNET_CONTAINER_MultiPeerMap * | peers |
Map from PIDs to struct CadetPeer entries. More... | |
unsigned long long | ratchet_messages |
How many messages are needed to trigger an AXOLOTL ratchet advance. More... | |
struct GNUNET_TIME_Relative | ratchet_time |
How long until we trigger a ratched advance due to time. More... | |
struct GNUNET_TIME_Relative | keepalive_period |
How frequently do we send KEEPALIVE messages on idle connections? More... | |
int | shutting_down |
Signal that shutdown is happening: prevent recovery measures. More... | |
unsigned long long | drop_percent |
Set to non-zero values to create random drops to test retransmissions. More... | |
Information we track per peer.
Definition in file gnunet-service-cadet.h.
void GSC_send_to_client | ( | struct CadetClient * | c, |
struct GNUNET_MQ_Envelope * | env | ||
) |
Send a message to a client.
c | client to get the message |
env | envelope with the message |
Definition at line 207 of file gnunet-service-cadet.c.
References env, GNUNET_MQ_send(), and CadetClient::mq.
Referenced by GCCH_handle_channel_plaintext_data(), GCCH_handle_local_ack(), GCCH_handle_local_data(), GSC_bind(), GSC_handle_remote_channel_destroy(), and send_ack_to_client().
void GSC_handle_remote_channel_destroy | ( | struct CadetClient * | c, |
struct GNUNET_CADET_ClientChannelNumber | ccn, | ||
struct CadetChannel * | ch | ||
) |
A channel was destroyed by the other peer.
Tell our client.
c | client that lost a channel |
ccn | channel identification number for the client |
ch | the channel object |
Definition at line 1082 of file gnunet-service-cadet.c.
References GNUNET_CADET_LocalChannelDestroyMessage::ccn, ch, GNUNET_CADET_ClientChannelNumber::channel_of_client, CadetClient::channels, env, GNUNET_assert, GNUNET_CONTAINER_multihashmap32_remove(), GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_DESTROY, GNUNET_MQ_msg, GNUNET_YES, and GSC_send_to_client().
Referenced by GCCH_handle_remote_destroy(), and signal_remote_destroy_cb().
void GSC_drop_loose_channel | ( | const struct GNUNET_HashCode * | h_port, |
struct CadetChannel * | ch | ||
) |
A client that created a loose channel that was not bound to a port disconnected, drop it from the loose_channels list.
h_port | the hashed port the channel was trying to bind to |
ch | the channel that was lost |
Definition at line 1103 of file gnunet-service-cadet.c.
References ch, GNUNET_assert, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_YES, and loose_channels.
Referenced by channel_destroy().
struct GNUNET_CADET_ClientChannelNumber GSC_bind | ( | struct CadetClient * | c, |
struct CadetChannel * | ch, | ||
struct CadetPeer * | dest, | ||
const struct GNUNET_HashCode * | port, | ||
uint32_t | options | ||
) |
Bind incoming channel to this client, and notify client about incoming connection.
c | client to bind to |
ch | channel to be bound |
dest | peer that establishes the connection |
port | port number |
options | options |
Caller is responsible for notifying the other peer about our acceptance of the channel.
c | client to bind to |
ch | channel to be bound |
dest | peer that establishes the connection |
port | port number |
options | options |
Definition at line 291 of file gnunet-service-cadet.c.
References GNUNET_CADET_LocalChannelCreateMessage::ccn, ch, GNUNET_CADET_ClientChannelNumber::channel_of_client, client_get_next_ccn(), warningfilter::dest, env, GCCH_2s(), GCP_2s(), GCP_get_id(), GNUNET_assert, GNUNET_CONTAINER_multihashmap32_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE, GNUNET_MQ_msg, GNUNET_YES, GSC_send_to_client(), LOG, GNUNET_CADET_LocalChannelCreateMessage::opt, options, GNUNET_CADET_LocalChannelCreateMessage::peer, GNUNET_CADET_LocalChannelCreateMessage::port, and port.
Referenced by GCCH_bind().
const char * GSC_2s | ( | struct CadetClient * | c | ) |
Return identifier for a client as a string.
c | client to identify |
Definition at line 222 of file gnunet-service-cadet.c.
References GNUNET_snprintf(), and CadetClient::id.
Referenced by channel_destroy_iterator(), client_connect_cb(), client_disconnect_cb(), client_release_ports(), GCCH_bind(), GCCH_channel_local_destroy(), GCCH_channel_local_new(), GCCH_debug(), GCCH_handle_channel_plaintext_data(), GCCH_handle_local_ack(), handle_channel_create(), handle_channel_destroy(), handle_local_ack(), handle_local_data(), handle_port_close(), handle_port_open(), and send_ack_to_client().
|
extern |
Handle to our configuration.
Handle to our configuration.
Definition at line 165 of file gnunet-namestore.c.
Referenced by id_connect_cb(), libgnunet_plugin_rest_pabc_init(), process_command_stdin(), and run().
|
extern |
Handle to the statistics service.
Definition at line 462 of file gnunet-service-rps.c.
Referenced by adapt_sizes(), add_valid_peer(), check_peer_online(), check_peer_pull_reply(), client_connect_cb(), client_disconnect_cb(), create_peer_ctx(), destroy_peer(), do_round(), got_peer(), handle_local_data(), handle_peer_check(), handle_peer_pull_reply(), handle_peer_pull_request(), handle_peer_push(), insert_in_sampler(), insert_in_view(), mq_notify_sent_cb(), new_sub(), run(), send_pull_reply(), send_pull_request(), send_push(), shutdown_rest(), and shutdown_task().
|
extern |
Handle to Transport service.
Definition at line 123 of file gnunet-service-cadet.c.
Referenced by attempt_connect(), cleaning_task(), consider_peer_activate(), GCP_set_hello(), print_info(), run(), and shutdown_rest().
|
extern |
Local peer own ID.
Definition at line 128 of file gnunet-service-cadet.c.
Referenced by handle_port_open(), and run().
|
extern |
Own private key.
Definition at line 133 of file gnunet-service-cadet.c.
Referenced by run(), and shutdown_rest().
|
extern |
All ports clients of this peer have opened.
Maps from a hashed port to a struct OpenPort
.
Definition at line 159 of file gnunet-service-cadet.c.
Referenced by client_release_ports(), GCCH_channel_incoming_new(), GCCH_channel_local_new(), handle_port_close(), handle_port_open(), run(), and shutdown_rest().
|
extern |
Map from struct GNUNET_CADET_ConnectionTunnelIdentifier
hash codes to struct CadetConnection
objects.
Definition at line 177 of file gnunet-service-cadet.c.
Referenced by connection_create(), GCC_destroy(), GCC_lookup(), run(), and shutdown_rest().
|
extern |
Map from ports to channels where the ports were closed at the time we got the inbound connection.
Indexed by h_port, contains struct CadetChannel
.
Definition at line 166 of file gnunet-service-cadet.c.
Referenced by bind_loose_channel(), GCCH_channel_incoming_new(), GCCH_channel_local_new(), GSC_drop_loose_channel(), handle_port_open(), run(), and shutdown_rest().
|
extern |
Map from PIDs to struct CadetPeer
entries.
Definition at line 171 of file gnunet-service-cadet.c.
Referenced by check_n_peers_ready(), clients_notify_stream_peer(), collect_peers_cb(), collect_peers_info_cb(), destroy_peer(), GCP_destroy_all_peers(), GCP_get(), GCP_iterate_all(), GNUNET_CONSENSUS_create(), GNUNET_SECRETSHARING_create_session(), handle_client_seed(), handle_peer_pull_reply(), handle_view_update(), load_debug(), peer_info_ready_cb(), peers_ready_cb(), run(), send_stream_peers(), shutdown_rest(), test_master(), and test_run().
|
extern |
How many messages are needed to trigger an AXOLOTL ratchet advance.
Definition at line 182 of file gnunet-service-cadet.c.
Referenced by run().
|
extern |
How long until we trigger a ratched advance due to time.
Definition at line 187 of file gnunet-service-cadet.c.
Referenced by run(), t_ax_encrypt(), and update_ax_by_kx().
|
extern |
How frequently do we send KEEPALIVE messages on idle connections?
Definition at line 192 of file gnunet-service-cadet.c.
Referenced by GCC_handle_connection_create_ack(), handle_connection_create(), keepalive_done(), manage_first_hop_mq(), run(), send_create_ack(), send_keepalive(), and timeout_cb().
|
extern |
Signal that shutdown is happening: prevent recovery measures.
Definition at line 138 of file gnunet-service-cadet.c.
Referenced by client_disconnect_cb(), GCT_destroy_tunnel_now(), and shutdown_task().
|
extern |
Set to non-zero values to create random drops to test retransmissions.
Definition at line 197 of file gnunet-service-cadet.c.
Referenced by get_channel_weight(), run(), and should_I_drop().