GNUnet 0.21.1
GNUNET_TESTING_System Struct Reference

Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths and ports. More...

Collaboration diagram for GNUNET_TESTING_System:
[legend]

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_MapHandlemap
 memory map for hostkeys_data. More...
 
struct SharedServiceshared_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...
 

Detailed Description

Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths and ports.

Definition at line 121 of file testing.c.

Field Documentation

◆ tmppath

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().

◆ trusted_ip

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().

◆ hostname

char* GNUNET_TESTING_System::hostname

◆ hostkeys_data

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(), hostkeys_load(), and hostkeys_unload().

◆ map

struct GNUNET_DISK_MapHandle* GNUNET_TESTING_System::map

memory map for hostkeys_data.

Definition at line 148 of file testing.c.

Referenced by hostkeys_load(), and hostkeys_unload().

◆ shared_services

◆ n_shared_services

◆ reserved_ports

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().

◆ path_counter

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_().

◆ total_hostkeys

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(), hostkeys_load(), and hostkeys_unload().

◆ lowport

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().

◆ highport

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().


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