]> git.meshlink.io Git - meshlink/blob - test/blackbox/common/common_types.h
Update the blackbox test infrastructure.
[meshlink] / test / blackbox / common / common_types.h
1 /*
2     common_types.h -- Declarations of common types used in Black Box Testing
3     Copyright (C) 2018  Guus Sliepen <guus@meshlink.io>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License along
16     with this program; if not, write to the Free Software Foundation, Inc.,
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef COMMON_TYPES_H
21 #define COMMON_TYPES_H
22
23 #include <stdbool.h>
24 #include "../../../src/meshlink.h"
25
26 #define NUT_NODE_NAME "nut"
27
28 #define LXC_UTIL_REL_PATH "test/blackbox/util"
29 #define LXC_RENAME_SCRIPT "lxc_rename.sh"
30 #define LXC_RUN_SCRIPT "lxc_run.sh"
31 #define LXC_COPY_SCRIPT "lxc_copy_file.sh"
32 #define LXC_BUILD_SCRIPT "build_container.sh"
33 #define LXC_NAT_BUILD "nat.sh"
34 #define LXC_NAT_FULL_CONE "full_cone.sh"
35 #define LXC_NAT_DESTROY "nat_destroy.sh"
36
37 typedef struct black_box_state {
38         char *test_case_name;
39         char **node_names;
40         int num_nodes;
41         bool test_result;
42 } black_box_state_t;
43
44 extern char *lxc_bridge;
45
46 extern char *eth_if_name;
47
48 extern black_box_state_t *state_ptr;
49
50 extern char *meshlink_root_path;
51
52 /* Meshlink Mesh Handle */
53 extern meshlink_handle_t *mesh_handle;
54
55 /* Flag to indicate if Mesh is running */
56 extern bool mesh_started;
57
58 #endif // COMMON_TYPES_H