GNUnet  0.10.x
Data Structures | Functions | Variables
testbed_api_underlay.c File Reference

testbed underlay API implementation More...

#include "testbed_api_peers.h"
Include dependency graph for testbed_api_underlay.c:

Go to the source code of this file.

Data Structures

struct  LinkProperty
 An underlay link. More...
 
struct  ListEntry
 Container for holding a peer in whitelist/blacklist. More...
 
struct  GNUNET_TESTBED_UnderlayLinkModel
 Model for configuring underlay links of a peer. More...
 

Functions

struct GNUNET_TESTBED_UnderlayLinkModel free_entries (struct GNUNET_TESTBED_UnderlayLinkModel *model)
 Function to free resources of list entries. More...
 
static void free_link_properties (struct GNUNET_TESTBED_UnderlayLinkModel *model)
 Function to free resources of link properties added to the given model. More...
 
struct GNUNET_TESTBED_UnderlayLinkModelGNUNET_TESTBED_underlaylinkmodel_create (struct GNUNET_TESTBED_Peer *peer, enum GNUNET_TESTBED_UnderlayLinkModelType type)
 Create a GNUNET_TESTBED_UnderlayLinkModel for the given peer. More...
 
void GNUNET_TESTBED_underlaylinkmodel_add_peer (struct GNUNET_TESTBED_UnderlayLinkModel *model, struct GNUNET_TESTBED_Peer *peer)
 Add a peer to the given model. More...
 
void GNUNET_TESTBED_underlaylinkmodel_set_link (struct GNUNET_TESTBED_UnderlayLinkModel *model, struct GNUNET_TESTBED_Peer *peer, uint32_t latency, uint32_t loss, uint32_t bandwidth)
 Set the metrics for a link to the given peer in the underlay model. More...
 
void GNUNET_TESTBED_underlaylinkmodel_free (struct GNUNET_TESTBED_UnderlayLinkModel *model)
 Free the resources of the model. More...
 
void GNUNET_TESTBED_underlaylinkmodel_commit (struct GNUNET_TESTBED_UnderlayLinkModel *model)
 Commit the model. More...
 

Variables

struct GNUNET_TESTBED_Peerpeer
 The peer associated with this model. More...
 
struct ListEntryentries
 List of peers in the list. More...
 
struct LinkPropertyprops
 list of link properties More...
 
enum GNUNET_TESTBED_UnderlayLinkModelType type
 the type of this model More...
 

Detailed Description

testbed underlay API implementation

Author
Sree Harsha Totakura sreeh.nosp@m.arsh.nosp@m.a@tot.nosp@m.akur.nosp@m.a.in

Definition in file testbed_api_underlay.c.

Function Documentation

◆ free_entries()

struct GNUNET_TESTBED_UnderlayLinkModel free_entries ( struct GNUNET_TESTBED_UnderlayLinkModel model)

Function to free resources of list entries.

Parameters
modelthe model

Definition at line 113 of file testbed_api_underlay.c.

References e.

Referenced by GNUNET_TESTBED_underlaylinkmodel_commit(), and GNUNET_TESTBED_underlaylinkmodel_free().

114 {
115  struct ListEntry *e;
116 
117  while (NULL != (e = model->entries))
118  {
119  model->entries = e->next;
120  GNUNET_free (e);
121  }
122 }
struct ListEntry * next
the next pointer
static struct Experiment * e
Container for holding a peer in whitelist/blacklist.
struct ListEntry * entries
List of peers in the list.
#define GNUNET_free(ptr)
Wrapper around free.
Here is the caller graph for this function:

◆ free_link_properties()

static void free_link_properties ( struct GNUNET_TESTBED_UnderlayLinkModel model)
static

Function to free resources of link properties added to the given model.

Parameters
modelthe model

Definition at line 131 of file testbed_api_underlay.c.

References GNUNET_free, LinkProperty::next, p, and GNUNET_TESTBED_UnderlayLinkModel::props.

Referenced by GNUNET_TESTBED_underlaylinkmodel_commit(), and GNUNET_TESTBED_underlaylinkmodel_free().

132 {
133  struct LinkProperty *p;
134 
135  while (NULL != (p = model->props))
136  {
137  model->props = p->next;
138  GNUNET_free (p);
139  }
140 }
An underlay link.
static struct GNUNET_OS_Process * p
Helper process we started.
Definition: gnunet-qr.c:59
struct LinkProperty * props
list of link properties
struct LinkProperty * next
next pointer for list
#define GNUNET_free(ptr)
Wrapper around free.
Here is the caller graph for this function:

Variable Documentation

◆ peer

struct GNUNET_TESTBED_Peer* peer

The peer associated with this model.

Definition at line 111 of file testbed_api_underlay.c.

Referenced by agent_init(), allocate_cb(), announce_next_regex(), channel_cleaner(), check_peer_info_ready(), compose_address_iterate_response_message(), connect_handler(), conversation_string_to_value(), core_peer_connect_cb(), create_address(), create_ats_address(), create_peer_ctx(), create_peers(), create_session(), CustomPeerMap_put(), CustomPeerMap_remove_peer_by_index(), daemon_started(), database_setup(), dht_ca(), dht_connect_cb(), dht_da(), dht_get_id_handler(), disconn_status(), disconnect_handler(), do_collect_stats(), do_shutdown(), enforce_start_preference(), enforce_start_send(), forward_overlay_connect(), GAS_mlp_get_preferred_address(), GAS_scheduling_transmit_address_suggestion(), gen_topo_scale_free(), get_all_peers_iterator(), get_all_tunnels_iterator(), get_rand_peer_iterator(), GNUNET_ATS_application_suggest(), GNUNET_ATS_connectivity_suggest(), GNUNET_ATS_solver_generate_preferences_start(), GNUNET_ATS_solver_generate_property_start(), GNUNET_HELLO_address_allocate(), GNUNET_PEERSTORE_iterate(), GNUNET_PEERSTORE_store(), GNUNET_SCALARPRODUCT_start_computation(), GNUNET_TESTBED_cleanup_peers_(), GNUNET_TESTBED_peer_create(), GNUNET_TESTBED_peer_destroy(), GNUNET_TESTBED_peer_get_information(), GNUNET_TESTBED_peer_manage_service(), GNUNET_TESTBED_peer_start(), GNUNET_TESTBED_peer_stop(), GNUNET_TESTBED_peer_update_configuration(), GNUNET_TESTING_peer_configure(), GNUNET_TESTING_service_run(), GNUNET_TRANSPORT_application_suggest(), GNUNET_TRANSPORT_application_validate(), GNUNET_TRANSPORT_communicator_mq_add(), GNUNET_TRANSPORT_manipulation_set(), GNUNET_VPN_redirect_to_peer(), got_hello(), GSC_SESSIONS_create(), GSF_get_peer_performance_data_(), GSF_peer_connect_handler(), GSF_push_start_(), GST_blacklist_test_allowed(), GST_clients_broadcast_disconnect(), GST_process_next_focc(), handle_connection_broken(), handle_connection_create_ack(), handle_connection_destroy(), handle_core_connect(), handle_dht_p2p_get(), handle_dht_p2p_put(), handle_dht_p2p_result(), handle_estimate(), handle_find_peer(), handle_local_result(), handle_opsuccess(), handle_overlay_connect(), handle_p2p_put(), handle_peer_config(), handle_peer_create_success(), handle_peer_event(), handle_peer_push(), handle_remote_overlay_connect(), handle_tunnel_encrypted(), handle_tunnel_kx(), handle_tunnel_kx_auth(), incoming_channel(), iterator_cb(), mlp_create_problem_add_address_information(), mq_init(), my_nc(), new_peer_entry(), notify_all(), notify_client(), notify_client_about_neighbour(), notify_monitor(), oprelease_get_stats(), opstart_get_stats(), opstart_peer_destroy(), opstart_peer_start(), opstart_peer_stop(), peer_create_cb(), peerinfo_list_iteration(), PEERSTORE_create_record_mq_envelope(), peerstore_flat_delete_records(), peerstore_flat_iterate_records(), peerstore_flat_store_record(), ping(), pong_handler(), print_peer_info(), regex_found_handler(), rem_from_list(), reset_peers(), restore_valid_peers(), rps_disconnect_adapter(), s2i_full(), seed_peers(), select_random_peer(), set_peer_online(), setup_neighbour(), show_end_data(), start_peers_task(), stat_comp_cb(), stat_connect_adapter(), stat_disconnect_adapter(), stats_cb(), stats_connect_cb(), stats_da(), stats_iterator(), store_and_free_entries(), template_plugin_update_session_timeout(), test_connection_ok(), testing_main(), tmt_rdy_ping(), transmit_suggestion(), View_put(), warmup(), write_bw_gnuplot_script(), write_rtt_gnuplot_script(), and write_throughput_gnuplot_script().

◆ entries

struct ListEntry* entries

List of peers in the list.

Definition at line 116 of file testbed_api_underlay.c.

Referenced by credential_string_to_value(), GNUNET_FS_file_information_sync_(), and handle_reserve().

◆ props

struct LinkProperty* props

list of link properties

Definition at line 121 of file testbed_api_underlay.c.

Referenced by parse_preference_string().

◆ type

the type of this model

Definition at line 126 of file testbed_api_underlay.c.

Referenced by add_record(), add_setter_action(), add_to_meta_counter(), analyze_send_error(), attr_collect(), cadet_reply_proc(), check_p2p_put(), child_death_task(), client_schedule(), dns_string_to_value(), gnunet-chk::encode_data_to_string(), execute_get(), execute_select(), extract_result_cb(), getopt_set_metadata(), GNUNET_ATS_print_preference_type(), GNUNET_ATS_solver_generate_preferences_start(), GNUNET_ATS_solver_generate_property_start(), GNUNET_ATS_TEST_generate_preferences_start(), GNUNET_ATS_TEST_generate_traffic_start(), GNUNET_BLOCK_GROUP_bf_create(), GNUNET_DHT_get_start(), GNUNET_DHT_monitor_start(), GNUNET_NT_scanner_get_type(), GNUNET_RECLAIM_ATTRIBUTE_claim_new(), GNUNET_RPS_seed_ids(), GNUNET_SERVER_inject(), GNUNET_TESTBED_forward_operation_msg_(), GNUNET_TESTBED_operation_queue_create_(), GNUNET_TESTBED_queue_message_(), GNUNET_TESTBED_underlaylinkmodel_create(), GSF_pending_request_create_(), GST_receive_callback(), habitability_check(), handle_auto_result(), handle_client_start_search(), handle_dht_reply(), handle_get_zero_anonymity(), handle_local_data(), handle_p2p_put(), handle_result(), handle_results(), handle_tcp_data(), heap_plugin_get(), heap_plugin_get_closest(), heap_plugin_put(), insert_pending_message(), iter_finished(), load_episode(), load_op_start_set_preference(), load_op_start_set_property(), main(), maint_child_death(), message_sent_cont(), no_more_local_results(), pack(), parse_attr(), postgres_plugin_get_key(), postgres_plugin_get_random(), postgres_plugin_get_zero_anonymity(), process_local_reply(), resolve_and_cache(), run(), set_result_cb(), sqlite_plugin_get(), sqlite_plugin_get_closest(), sqlite_plugin_get_key(), sqlite_plugin_get_random(), sqlite_plugin_get_zero_anonymity(), sqlite_plugin_put(), stun_get_mapped(), submit_request(), try_handle_plaintext(), try_transmission(), union_accept(), wlan_plugin_send(), and work_test().