GNUnet 0.22.2
GNUNET_TESTBED_System Struct Reference

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...
 
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...
 
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 53 of file testbed.c.

Field Documentation

◆ tmppath

char* GNUNET_TESTBED_System::tmppath

Prefix (e.g.

"/tmp/gnunet-testing/") we prepend to each GNUNET_HOME.

Definition at line 59 of file testbed.c.

Referenced by GNUNET_TESTBED_configuration_create(), GNUNET_TESTBED_system_create_with_portrange(), and GNUNET_TESTBED_system_destroy().

◆ trusted_ip

char* GNUNET_TESTBED_System::trusted_ip

The trusted ip.

Can either be a single ip address or a network address in CIDR notation.

Definition at line 65 of file testbed.c.

Referenced by GNUNET_TESTBED_system_create(), GNUNET_TESTBED_system_create_with_portrange(), and GNUNET_TESTBED_system_destroy().

◆ hostname

char* GNUNET_TESTBED_System::hostname

◆ reserved_ports

uint32_t GNUNET_TESTBED_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 80 of file testbed.c.

Referenced by GNUNET_TESTBED_release_port(), and GNUNET_TESTBED_reserve_port().

◆ path_counter

uint32_t GNUNET_TESTBED_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 reuse path counters.

Definition at line 90 of file testbed.c.

Referenced by GNUNET_TESTBED_configuration_create().

◆ lowport

uint16_t GNUNET_TESTBED_System::lowport

Lowest port we are allowed to use.

Definition at line 95 of file testbed.c.

Referenced by GNUNET_TESTBED_reserve_port(), and GNUNET_TESTBED_system_create_with_portrange().

◆ highport

uint16_t GNUNET_TESTBED_System::highport

Highest port we are allowed to use.

Definition at line 100 of file testbed.c.

Referenced by GNUNET_TESTBED_reserve_port(), and GNUNET_TESTBED_system_create_with_portrange().


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