diff options
Diffstat (limited to 'src/testing/testing_cmds.h')
-rw-r--r-- | src/testing/testing_cmds.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/testing/testing_cmds.h b/src/testing/testing_cmds.h new file mode 100644 index 000000000..7a5860aea --- /dev/null +++ b/src/testing/testing_cmds.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2021 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file testing/testing_cmds.h | ||
23 | * @brief Message formats for communication between testing cmds helper and testcase plugins. | ||
24 | * @author t3sserakt | ||
25 | */ | ||
26 | |||
27 | #ifndef TESTING_CMDS_H | ||
28 | #define TESTING_CMDS_H | ||
29 | |||
30 | #define HELPER_CMDS_BINARY "gnunet-cmds-helper" | ||
31 | |||
32 | GNUNET_NETWORK_STRUCT_BEGIN | ||
33 | |||
34 | /** | ||
35 | * Initialization message for gnunet-cmds-testbed to start cmd binary. | ||
36 | */ | ||
37 | struct GNUNET_CMDS_HelperInit | ||
38 | { | ||
39 | /** | ||
40 | * Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT | ||
41 | */ | ||
42 | struct GNUNET_MessageHeader header; | ||
43 | |||
44 | /** | ||
45 | * | ||
46 | */ | ||
47 | uint16_t plugin_name_size GNUNET_PACKED; | ||
48 | |||
49 | /* Followed by plugin name of the plugin running the test case. This is not NULL | ||
50 | * terminated */ | ||
51 | }; | ||
52 | |||
53 | /** | ||
54 | * Reply message from cmds helper process | ||
55 | */ | ||
56 | struct GNUNET_CMDS_HelperReply | ||
57 | { | ||
58 | /** | ||
59 | * Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_REPLY | ||
60 | */ | ||
61 | struct GNUNET_MessageHeader header; | ||
62 | }; | ||
63 | |||
64 | struct GNUNET_CMDS_PEER_STARTED | ||
65 | { | ||
66 | /** | ||
67 | * Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_PEER_STARTED | ||
68 | */ | ||
69 | struct GNUNET_MessageHeader header; | ||
70 | }; | ||
71 | |||
72 | struct GNUNET_CMDS_ALL_PEERS_STARTED | ||
73 | { | ||
74 | /** | ||
75 | * Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED | ||
76 | */ | ||
77 | struct GNUNET_MessageHeader header; | ||
78 | }; | ||
79 | |||
80 | struct GNUNET_CMDS_LOCAL_FINISHED | ||
81 | { | ||
82 | /** | ||
83 | * Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED | ||
84 | */ | ||
85 | struct GNUNET_MessageHeader header; | ||
86 | }; | ||
87 | |||
88 | GNUNET_NETWORK_STRUCT_END | ||
89 | #endif | ||
90 | /* end of testing_cmds.h */ | ||