Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths and ports. More...
Data Fields | |
char * | tmppath |
Prefix (e.g. More... | |
char * | trusted_ip |
The trusted ip. More... | |
char * | hostname |
our hostname More... | |
char * | hostkeys_data |
Hostkeys data, contains "GNUNET_TESTING_HOSTKEYFILESIZE * total_hostkeys" bytes. More... | |
struct GNUNET_DISK_MapHandle * | map |
memory map for hostkeys_data. More... | |
struct SharedService * | shared_services |
unsigned int | n_shared_services |
uint32_t | reserved_ports [65536/32] |
Bitmap where each port that has already been reserved for some GNUnet peer is recorded. More... | |
uint32_t | path_counter |
Counter we use to make service home paths unique on this system; the full path consists of the tmppath and this number. More... | |
uint32_t | total_hostkeys |
The number of hostkeys. More... | |
uint16_t | lowport |
Lowest port we are allowed to use. More... | |
uint16_t | highport |
Highest port we are allowed to use. More... | |
Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths and ports.
char* GNUNET_TESTING_System::tmppath |
Prefix (e.g.
"/tmp/gnunet-testing/") we prepend to each GNUNET_HOME.
Definition at line 127 of file testing.c.
Referenced by associate_shared_service(), GNUNET_TESTING_configuration_create_(), GNUNET_TESTING_system_create_with_portrange(), and GNUNET_TESTING_system_destroy().
char* GNUNET_TESTING_System::trusted_ip |
The trusted ip.
Can either be a single ip address or a network address in CIDR notation.
Definition at line 133 of file testing.c.
Referenced by GNUNET_TESTING_system_create(), GNUNET_TESTING_system_create_with_portrange(), and GNUNET_TESTING_system_destroy().
char* GNUNET_TESTING_System::hostname |
our hostname
Definition at line 138 of file testing.c.
Referenced by GNUNET_TESTING_system_create_with_portrange(), and GNUNET_TESTING_system_destroy().
char* GNUNET_TESTING_System::hostkeys_data |
Hostkeys data, contains "GNUNET_TESTING_HOSTKEYFILESIZE * total_hostkeys" bytes.
Definition at line 143 of file testing.c.
Referenced by GNUNET_TESTING_hostkey_get(), GNUNET_TESTING_peer_configure(), GNUNET_TESTING_system_destroy(), and hostkeys_unload().
struct GNUNET_DISK_MapHandle* GNUNET_TESTING_System::map |
memory map for hostkeys_data.
Definition at line 148 of file testing.c.
Referenced by hostkeys_unload().
struct SharedService* GNUNET_TESTING_System::shared_services |
Definition at line 150 of file testing.c.
Referenced by GNUNET_TESTING_peer_configure(), GNUNET_TESTING_system_create(), GNUNET_TESTING_system_create_with_portrange(), and GNUNET_TESTING_system_destroy().
unsigned int GNUNET_TESTING_System::n_shared_services |
Definition at line 152 of file testing.c.
Referenced by GNUNET_TESTING_peer_configure(), GNUNET_TESTING_system_create_with_portrange(), and GNUNET_TESTING_system_destroy().
uint32_t GNUNET_TESTING_System::reserved_ports[65536/32] |
Bitmap where each port that has already been reserved for some GNUnet peer is recorded.
Note that we make no distinction between TCP and UDP ports and test if a port is already in use before assigning it to a peer/service. If we detect that a port is already in use, we also mark it in this bitmap. So all the bits that are zero merely indicate ports that MIGHT be available for peers.
Definition at line 162 of file testing.c.
Referenced by GNUNET_TESTING_release_port(), and GNUNET_TESTING_reserve_port().
uint32_t GNUNET_TESTING_System::path_counter |
Counter we use to make service home paths unique on this system; the full path consists of the tmppath and this number.
Each UNIXPATH for a peer is also modified to include the respective path counter to ensure uniqueness. This field is incremented by one for each configured peer. Even if peers are destroyed, we never re-use path counters.
Definition at line 172 of file testing.c.
Referenced by GNUNET_TESTING_configuration_create_().
uint32_t GNUNET_TESTING_System::total_hostkeys |
The number of hostkeys.
Definition at line 177 of file testing.c.
Referenced by GNUNET_TESTING_hostkey_get(), GNUNET_TESTING_peer_configure(), and hostkeys_unload().
uint16_t GNUNET_TESTING_System::lowport |
Lowest port we are allowed to use.
Definition at line 182 of file testing.c.
Referenced by GNUNET_TESTING_reserve_port(), and GNUNET_TESTING_system_create_with_portrange().
uint16_t GNUNET_TESTING_System::highport |
Highest port we are allowed to use.
Definition at line 187 of file testing.c.
Referenced by GNUNET_TESTING_reserve_port(), and GNUNET_TESTING_system_create_with_portrange().