aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_ng_lib.h
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-09-20 09:00:09 +0200
committert3sserakt <t3ss@posteo.de>2021-09-20 09:00:09 +0200
commitd5df403e64bbde52c5436165eee5231a1b2f876b (patch)
tree3a4efc07dc5d2576a9f6656de58764aa9840d856 /src/include/gnunet_testing_ng_lib.h
parent9bdaa1f9b21b324963fe0f41311ae6d9c0948946 (diff)
downloadgnunet-d5df403e64bbde52c5436165eee5231a1b2f876b.tar.gz
gnunet-d5df403e64bbde52c5436165eee5231a1b2f876b.zip
- added new udp backchannel testcase, changed netjail script to have port forwarding into subnets, master loop is no configured completely by topology config file, connect cmd reads topology file to connect to configured nodes
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r--src/include/gnunet_testing_ng_lib.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index 9ef42a3aa..31665f8f7 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -63,6 +63,88 @@ struct GNUNET_TESTING_NetjailRouter
63 unsigned int udp_port; 63 unsigned int udp_port;
64}; 64};
65 65
66/**
67 * Enum for the different types of nodes.
68 */
69enum GNUNET_TESTING_NODE_TYPE
70{
71 /**
72 * Node in a subnet.
73 */
74 GNUNET_TESTING_SUBNET_NODE,
75
76 /**
77 * Global known node.
78 */
79 GNUNET_TESTING_GLOBAL_NODE
80};
81
82struct GNUNET_TESTING_ADDRESS_PREFIX
83{
84 /**
85 * Pointer to the previous prefix in the DLL.
86 */
87 struct GNUNET_TESTING_ADDRESS_PREFIX *prev;
88
89 /**
90 * Pointer to the next prefix in the DLL.
91 */
92 struct GNUNET_TESTING_ADDRESS_PREFIX *next;
93
94 /**
95 * The address prefix.
96 */
97 char *address_prefix;
98};
99
100struct GNUNET_TESTING_NetjailNode;
101
102/**
103 * Connection to another node.
104 */
105struct GNUNET_TESTING_NodeConnection
106{
107 /**
108 * Pointer to the previous connection in the DLL.
109 */
110 struct GNUNET_TESTING_NodeConnection *prev;
111
112 /**
113 * Pointer to the next connection in the DLL.
114 */
115 struct GNUNET_TESTING_NodeConnection *next;
116
117 /**
118 * The number of the subnet of the node this connection points to. This is 0,
119 * if the node is a global known node.
120 */
121 unsigned int namespace_n;
122
123 /**
124 * The number of the node this connection points to.
125 */
126 unsigned int node_n;
127
128 /**
129 * The type of the node this connection points to.
130 */
131 enum GNUNET_TESTING_NODE_TYPE node_type;
132
133 /**
134 * The node which establish the connection
135 */
136 struct GNUNET_TESTING_NetjailNode *node;
137
138 /**
139 * Head of the DLL with the address prefixes for the protocolls this node is reachable.
140 */
141 struct GNUNET_TESTING_ADDRESS_PREFIX *address_prefixes_head;
142
143 /**
144 * Tail of the DLL with the address prefixes for the protocolls this node is reachable.
145 */
146 struct GNUNET_TESTING_ADDRESS_PREFIX *address_prefixes_tail;
147};
66 148
67/** 149/**
68 * Node in the netjail topology. 150 * Node in the netjail topology.
@@ -88,6 +170,16 @@ struct GNUNET_TESTING_NetjailNode
88 * The number of this node in the namespace. 170 * The number of this node in the namespace.
89 */ 171 */
90 unsigned int node_n; 172 unsigned int node_n;
173
174 /**
175 * Head of the DLL with the connections which shall be established to other nodes.
176 */
177 struct GNUNET_TESTING_NodeConnection *node_connections_head;
178
179 /**
180 * Tail of the DLL with the connections which shall be established to other nodes.
181 */
182 struct GNUNET_TESTING_NodeConnection *node_connections_tail;
91}; 183};
92 184
93 185