GNUnet  0.11.x
testbed.h
Go to the documentation of this file.
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 
27 #ifndef TESTBED_H
28 #define TESTBED_H
29 
30 #include "gnunet_util_lib.h"
31 
37 {
42 
50 
56 
57  /* Followed by 0-terminated hostname of the controller */
58 };
59 
60 
65 {
70 
75 
79  uint16_t ssh_port GNUNET_PACKED;
80 
86  uint16_t username_length GNUNET_PACKED;
87 
92  uint16_t hostname_length GNUNET_PACKED;
93 
97  uint16_t config_size GNUNET_PACKED;
98 
99  /* followed by non 0-terminated user name */
100 
101  /* followed by non 0-terminated host name */
102 
103  /* followed by gzip compressed configuration to start or connect to a
104  controller on this host. While starting the controller this configuration
105  is used as a template */
106 };
107 
108 
115 {
120 
125 
126  /* followed by the 0-terminated error message (on failure)
127  * (typical errors include host-id already in use) */
128 };
129 
130 
137 {
142 
146  uint32_t delegated_host_id GNUNET_PACKED;
147 
151  uint64_t operation_id GNUNET_PACKED;
152 
156  uint32_t slave_host_id GNUNET_PACKED;
157 
162  uint8_t is_subordinate;
163 };
164 
165 
170 {
175 
180  uint16_t config_size GNUNET_PACKED;
181 
185  uint16_t success GNUNET_PACKED;
186 
190  uint64_t operation_id GNUNET_PACKED;
191 
192  /* If controller linking is successful and configuration is present, then here
193  * comes the serialized gzip configuration with which the controller is
194  * running at the delegate host */
195 
196  /* In case of failure, here comes the error message (without \0 termination)*/
197 };
198 
199 
205 {
210 
215 
219  uint64_t operation_id GNUNET_PACKED;
220 
225 
229  uint16_t config_size GNUNET_PACKED;
230 
231  /* followed by serialized peer configuration;
232  * gzip'ed configuration file in INI format */
233 };
234 
235 
241 {
246 
251 
255  uint64_t operation_id GNUNET_PACKED;
256 
260  uint16_t config_size GNUNET_PACKED;
261 
262  /* followed by serialized peer configuration;
263  * gzip'ed configuration file in INI format */
264 };
265 
266 
272 {
277 
282 
286  uint64_t operation_id GNUNET_PACKED;
287 };
288 
289 
295 {
300 
305 
309  uint64_t operation_id GNUNET_PACKED;
310 };
311 
312 
318 {
323 
328 
332  uint64_t operation_id GNUNET_PACKED;
333 };
334 
335 
341 {
346 
350  int32_t connect_option GNUNET_PACKED;
351 
355  uint32_t peer1 GNUNET_PACKED;
356 
360  uint32_t peer2 GNUNET_PACKED;
361 
365  uint64_t operation_id GNUNET_PACKED;
366 
367  /* followed by option-dependent variable-size values */
368 };
369 
370 
376 {
381 
385  uint32_t peer1 GNUNET_PACKED;
386 
390  uint64_t operation_id GNUNET_PACKED;
391 
395  uint32_t peer2 GNUNET_PACKED;
396 
400  uint32_t peer2_host_id GNUNET_PACKED;
401 };
402 
403 
409 {
414 
418  uint32_t peer GNUNET_PACKED;
419 
423  uint64_t operation_id GNUNET_PACKED;
424 
428  struct GNUNET_PeerIdentity peer_identity;
429 
433  struct GNUNET_MessageHeader hello[0];
434  // FIXME: we usually do not use this gcc-hack as some
435  // compilers / tools really get messed up by it...
436 };
437 
438 
443 {
448 
453  int32_t event_type GNUNET_PACKED;
454 
459 
464 
468  uint64_t operation_id GNUNET_PACKED;
469 };
470 
471 
476 {
481 
486  int32_t event_type GNUNET_PACKED;
487 
491  uint32_t peer1 GNUNET_PACKED;
492 
496  uint32_t peer2 GNUNET_PACKED;
497 
501  uint64_t operation_id GNUNET_PACKED;
502 };
503 
504 
509 {
514 
519  int32_t event_type GNUNET_PACKED;
520 
524  uint64_t operation_id GNUNET_PACKED;
525 
526  /* followed by 0-terminated error message */
527 };
528 
529 
534 {
539 
544 
548  uint64_t operation_id GNUNET_PACKED;
549 };
550 
551 
558 {
563 
568  int32_t event_type GNUNET_PACKED;
569 
573  uint64_t operation_id GNUNET_PACKED;
574 };
575 
576 
582 {
587 
592 
596  uint64_t operation_id GNUNET_PACKED;
597 };
598 
599 
604 {
609 
614 
618  uint64_t operation_id GNUNET_PACKED;
619 
623  struct GNUNET_PeerIdentity peer_identity;
624 
628  uint16_t config_size GNUNET_PACKED;
629 
630  /* followed by gzip-compressed configuration of the peer */
631 };
632 
633 
638 {
643 
647  uint32_t slave_id GNUNET_PACKED;
648 
652  uint64_t operation_id GNUNET_PACKED;
653 };
654 
655 
660 {
665 
669  uint32_t slave_id GNUNET_PACKED;
670 
674  uint64_t operation_id GNUNET_PACKED;
675 
679  uint16_t config_size GNUNET_PACKED;
680 
681  /* followed by gzip-compressed configuration of the peer */
682 };
683 
684 
689 {
694 
698  uint64_t operation_id GNUNET_PACKED;
699 };
700 
701 
706 {
711 
716 
720  uint64_t operation_id GNUNET_PACKED;
721 
725  uint8_t start;
726 
730 };
731 
732 
738 {
743 
747  uint32_t nentries GNUNET_PACKED;
748 
752  uint32_t nprops GNUNET_PACKED;
753 
764 };
765 
766 
767 /**************************************/
768 /* Barriers IPC messages and protocol */
769 /**************************************/
770 
771 
776 #define ENV_TESTBED_CONFIG "GNUNET_TESTBED_CONTROLLER_CONFIG"
777 
778 
783 {
788 
792  uint8_t quorum;
793 
797  char name[0];
798 };
799 
800 
805 {
810 
814  char name[0];
815 };
816 
817 
822 {
827 
832 
836  uint16_t name_len GNUNET_PACKED;
837 
842  char data[0];
843 };
844 
845 
851 {
856 
860  char name[0];
861 };
862 
863 
865 #endif
866 /* end of testbed.h */
Event notification from a controller to a client.
Definition: testbed.h:533
Confirmation from the service that adding a host worked (or failed).
Definition: testbed.h:114
Message to request configuration of a slave controller.
Definition: testbed.h:637
Event notification from a controller to a client.
Definition: testbed.h:475
Message sent from host controller of a peer(A) to the host controller of another peer(B) to request B...
Definition: testbed.h:408
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_INIT.
Definition: testbed.h:41
Message sent from client to testing service to reconfigure a (stopped) a peer.
Definition: testbed.h:240
Message to cancel a barrier.
Definition: testbed.h:804
Message sent from client to testing service to stop a peer.
Definition: testbed.h:294
Message sent from client to testing service to obtain the configuration of a peer.
Definition: testbed.h:581
Shutdown peers message.
Definition: testbed.h:688
Message sent from client to testing service to destroy a (stopped) peer.
Definition: testbed.h:317
Notify the service about a host that we intend to use.
Definition: testbed.h:64
Peer configuration and identity reply from controller to a client.
Definition: testbed.h:603
Event notification from a controller to a client.
Definition: testbed.h:442
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
Event notification from a controller to a client.
Definition: testbed.h:508
Initial message from a client to a testing control service.
Definition: testbed.h:36
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
Message sent from peers to the testbed-barrier service to indicate that they have reached a barrier a...
Definition: testbed.h:850
Response message for ControllerLinkRequest message.
Definition: testbed.h:169
Message sent from client to testing service to start a peer.
Definition: testbed.h:271
uint16_t status
See PRISM_STATUS_*-constants.
Message sent from client to testing service to create (configure, but not start) a peer...
Definition: testbed.h:204
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
Reply to GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION message.
Definition: testbed.h:659
uint32_t host_id
Host ID that the controller is either given (if this is the dominating client) or assumed to have (fo...
Definition: testbed.h:49
uint8_t start
set this to 1 to start the service; 0 to stop the service
Definition: testbed.h:725
Message sent from client to testing service to connect two peers.
Definition: testbed.h:375
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
The identity of the host (wraps the signing key of the peer).
#define GNUNET_PACKED
gcc-ism to get packed structs.
const char * name
Message to start/stop services of a peer.
Definition: testbed.h:705
uint8_t is_subordinate
Set to 1 if the receiving controller is the master controller for the slave host (and thus responsibl...
Definition: testbed.h:162
uint8_t quorum
The quorum percentage needed for crossing the barrier.
Definition: testbed.h:792
uint64_t event_mask
Event mask that specifies which events this client is interested in.
Definition: testbed.h:55
Message sent from client to testing service to (re)configure a "physical" link between two peers...
Definition: testbed.h:340
Header for all communications.
Event notification from a controller to a client for a generic operational success where the operatio...
Definition: testbed.h:557
Message for signalling status changes of a barrier.
Definition: testbed.h:821
Message to initialise a barrier.
Definition: testbed.h:782
uint32_t data
The data value.
Message to send underlay link model of a peer.
Definition: testbed.h:737
Client notifies controller that it should delegate requests for a particular client to a particular s...
Definition: testbed.h:136