diff options
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 92 |
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 | */ | ||
69 | enum 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 | |||
82 | struct 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 | |||
100 | struct GNUNET_TESTING_NetjailNode; | ||
101 | |||
102 | /** | ||
103 | * Connection to another node. | ||
104 | */ | ||
105 | struct 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 | ||