484#define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op, prefix) \
485 op (prefix, topology, const struct GNUNET_TESTING_NetjailTopology) \
486 op (prefix, topology_string, const char) \
487 op (prefix, async_context, struct GNUNET_TESTING_AsyncContext) \
488 op (prefix, helper_handles, const struct GNUNET_HELPER_Handle *)
struct GNUNET_TESTING_NetjailTopology * njt
The loaded topology.
static const char * my_node_id
static int prefix
If printing the value of PREFIX has been requested.
static char * data
The data to insert into the dht.
Internal representation of the hash map.
Protocol address prefix für a connection between nodes.
struct GNUNET_TESTING_AddressPrefix * next
Pointer to the next prefix in the DLL.
char * address_prefix
The address prefix.
struct GNUNET_TESTING_AddressPrefix * prev
Pointer to the previous prefix in the DLL.
unsigned int number
Unique identifier this part of the topology can be identified.
unsigned int number
Unique identifier this part of the topology can be identified.
unsigned int number_peers
Number of carrier peers.
struct GNUNET_CONTAINER_MultiShortmap * subnets
Hash map containing subnets.
unsigned int number_subnets
Number of carrier subnets.
unsigned int index
Of all carriers this has index.
unsigned int number
Unique identifier this part of the topology can be identified.
struct GNUNET_CONTAINER_MultiShortmap * peers
Hash map containing peers.
unsigned int namespace_n
The number of the subnet.
struct GNUNET_CONTAINER_MultiShortmap * nodes
Hash map containing the nodes in this subnet.
struct GNUNET_TESTING_NetjailRouter * router
Router of the subnet.
Node in the netjail topology.
unsigned int namespace_n
The number of the subnet this node is running in.
unsigned int node_number
The overall number of the node in the whole test system.
struct GNUNET_TESTING_NodeConnection * node_connections_head
Head of the DLL with the connections which shall be established to other nodes.
unsigned int additional_connects
The number of unintentional additional connections this node waits for.
unsigned int is_global
Flag indicating if this node is a global known node.
char * plugin
Plugin for the test case to be run on this node.
unsigned int expected_reaches
The number of cmds waiting for a specific barrier.
unsigned int node_n
The number of this node in the subnet.
struct GNUNET_TESTING_NodeConnection * node_connections_tail
Tail of the DLL with the connections which shall be established to other nodes.
API for writing an interpreter to test GNUnet components.
unsigned int tcp_port
Will tcp be forwarded?
unsigned int udp_port
Will udp be forwarded?
unsigned int number
Unique identifier this part of the topology can be identified.
unsigned int number_peers
Number of subnet peers.
unsigned int number
Unique identifier this part of the topology can be identified.
struct GNUNET_CONTAINER_MultiShortmap * peers
Hash map containing peers.
unsigned int index
Of all subnets this has index.
Toplogy of our netjail setup.
unsigned long long default_subnets
Default number of subnets per carrier.
struct GNUNET_CONTAINER_MultiShortmap * map_globals
Hash map containing the global known nodes which are not natted.
struct GNUNET_CONTAINER_MultiShortmap * carriers
Hash map containing the carriers.
unsigned long long default_subnet_peers
Default number of peers per subnet.
char * plugin
Default plugin for the test case to be run on nodes.
unsigned int nodes_m
Number of nodes per subnet.
unsigned int nodes_x
Number of global known nodes.
unsigned long long num_carriers
Number of carriers.
unsigned int namespaces_n
Number of subnets.
unsigned long long default_carrier_peers
Default number of peers per carrier.
unsigned int total
Total number of namespaces in the topology.
struct GNUNET_CONTAINER_MultiShortmap * backbone_peers
Hash map containing the carriers.
struct GNUNET_CONTAINER_MultiShortmap * map_namespaces
Hash map containing the subnets (for natted nodes) of the topology.
unsigned int additional_connects
Additional connects we do expect, beside the connects which are configured in the topology.
unsigned long long num_backbone_peers
Default number of backbone peers.
Connection to another node.
struct GNUNET_TESTING_NodeConnection * prev
Pointer to the previous connection in the DLL.
struct GNUNET_TESTING_AddressPrefix * address_prefixes_tail
Tail of the DLL with the address prefixes for the protocols this node is reachable.
struct GNUNET_TESTING_NodeConnection * next
Pointer to the next connection in the DLL.
unsigned int node_n
The number of the node this connection points to.
struct GNUNET_TESTING_NetjailNode * node
The node which establish the connection.
unsigned int namespace_n
The number of the subnet of the node this connection points to.
struct GNUNET_TESTING_AddressPrefix * address_prefixes_head
Head of the DLL with the address prefixes for the protocols this node is reachable.
enum GNUNET_TESTING_NodeType node_type
The type of the node this connection points to.
GNUNET_TESTING_NodeType
Enum for the different types of nodes.
@ GNUNET_TESTING_SUBNET_NODE
Node in a subnet.
@ GNUNET_TESTING_GLOBAL_NODE
Global known node.
unsigned int GNUNET_TESTING_get_additional_connects(unsigned int num, struct GNUNET_TESTING_NetjailTopology *topology)
Get the number of unintentional additional connections the node waits for.
struct GNUNET_TESTING_NodeConnection * GNUNET_TESTING_get_connections(unsigned int num, const struct GNUNET_TESTING_NetjailTopology *topology)
Get the connections to other nodes for a specific node.
char * GNUNET_TESTING_get_plugin_from_topo(struct GNUNET_TESTING_NetjailTopology *njt, const char *my_node_id)
Get the global plugin name form the topology file.
struct GNUNET_TESTING_NetjailTopology * GNUNET_TESTING_get_topo_from_string_(const char *data)
Parse the topology data.
GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT(GNUNET_TESTING, topology, const struct GNUNET_TESTING_NetjailTopology) GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT(GNUNET_TESTING
struct GNUNET_TESTING_NetjailNode * GNUNET_TESTING_get_node(unsigned int num, struct GNUNET_TESTING_NetjailTopology *topology)
Get a node from the topology.
unsigned int GNUNET_TESTING_calculate_num(struct GNUNET_TESTING_NodeConnection *node_connection, struct GNUNET_TESTING_NetjailTopology *topology)
Calculate the unique id identifying a node from a given connection.
void GNUNET_TESTING_free_topology(struct GNUNET_TESTING_NetjailTopology *topology)
Deallocate memory of the struct GNUNET_TESTING_NetjailTopology.
char * GNUNET_TESTING_get_address(struct GNUNET_TESTING_NodeConnection *connection, const char *prefix)
Get the address for a specific communicator from a connection.
#define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op, prefix)
Call op on all simple traits.