src: for every AGPL3.0 file, add SPDX identifier.
[oweals/gnunet.git] / src / testbed / testbed_helper.h
1 /*
2       This file is part of GNUnet
3       Copyright (C) 2008--2013 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 testbed/testbed_helper.h
23  * @brief Message formats for communication between testbed api and
24  *          gnunet-helper-testbed process
25  * @author Sree Harsha Totakura <sreeharsha@totakura.in>
26  */
27
28 #ifndef TESTBED_HELPER_H
29 #define TESTBED_HELPER_H
30
31 GNUNET_NETWORK_STRUCT_BEGIN
32 /**
33  * Initialization message for gnunet-helper-testbed to start testbed service
34  */
35     struct GNUNET_TESTBED_HelperInit
36 {
37   /**
38    * Type is GNUNET_MESSAGE_TYPE_TESTBED_HELPER_INIT
39    */
40   struct GNUNET_MessageHeader header;
41
42   /**
43    * The controller hostname size excluding the NULL termination character -
44    * strlen (hostname); cannot be zero
45    */
46   uint16_t trusted_ip_size GNUNET_PACKED;
47
48   /**
49    * The hostname size excluding the NULL termination character - strlen
50    * (hostname); cannot be zero
51    */
52   uint16_t hostname_size GNUNET_PACKED;
53
54   /**
55    * The size of the uncompressed configuration
56    */
57   uint16_t config_size GNUNET_PACKED;
58
59   /* Followed by NULL terminated trusted ip */
60
61   /* Followed by hostname of the machine on which helper runs. This is not NULL
62    * terminated */
63
64   /* Followed by serialized and compressed configuration which should be
65    * config_size long when un-compressed */
66 };
67
68 /**
69  * Reply message from helper process
70  */
71 struct GNUNET_TESTBED_HelperReply
72 {
73   /**
74    * Type is GNUNET_MESSAGE_TYPE_TESTBED_HELPER_REPLY
75    */
76   struct GNUNET_MessageHeader header;
77
78   /**
79    * Size of the uncompressed configuration
80    */
81   uint16_t config_size GNUNET_PACKED;
82
83   /* Followed by compressed configuration which should be config_size long when
84    * un-compressed */
85 };
86
87 GNUNET_NETWORK_STRUCT_END
88 #endif
89 /* end of testbed_helper.h */