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