GNUnet  0.10.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 
41 
49 
55 
56  /* Followed by 0-terminated hostname of the controller */
57 };
58 
59 
68 
73 
77  uint16_t ssh_port GNUNET_PACKED;
78 
84  uint16_t username_length GNUNET_PACKED;
85 
90  uint16_t hostname_length GNUNET_PACKED;
91 
95  uint16_t config_size GNUNET_PACKED;
96 
97  /* followed by non 0-terminated user name */
98 
99  /* followed by non 0-terminated host name */
100 
101  /* followed by gzip compressed configuration to start or connect to a
102  controller on this host. While starting the controller this configuration
103  is used as a template */
104 };
105 
106 
117 
122 
123  /* followed by the 0-terminated error message (on failure)
124  * (typical errors include host-id already in use) */
125 };
126 
127 
138 
142  uint32_t delegated_host_id GNUNET_PACKED;
143 
147  uint64_t operation_id GNUNET_PACKED;
148 
152  uint32_t slave_host_id GNUNET_PACKED;
153 
158  uint8_t is_subordinate;
159 };
160 
161 
170 
175  uint16_t config_size GNUNET_PACKED;
176 
180  uint16_t success GNUNET_PACKED;
181 
185  uint64_t operation_id GNUNET_PACKED;
186 
187  /* If controller linking is successful and configuration is present, then here
188  * comes the serialized gzip configuration with which the controller is
189  * running at the delegate host */
190 
191  /* In case of failure, here comes the error message (without \0 termination)*/
192 };
193 
194 
204 
209 
213  uint64_t operation_id GNUNET_PACKED;
214 
219 
223  uint16_t config_size GNUNET_PACKED;
224 
225  /* followed by serialized peer configuration;
226  * gzip'ed configuration file in INI format */
227 };
228 
229 
239 
244 
248  uint64_t operation_id GNUNET_PACKED;
249 
253  uint16_t config_size GNUNET_PACKED;
254 
255  /* followed by serialized peer configuration;
256  * gzip'ed configuration file in INI format */
257 };
258 
259 
269 
274 
278  uint64_t operation_id GNUNET_PACKED;
279 };
280 
281 
291 
296 
300  uint64_t operation_id GNUNET_PACKED;
301 };
302 
303 
313 
318 
322  uint64_t operation_id GNUNET_PACKED;
323 };
324 
325 
335 
339  int32_t connect_option GNUNET_PACKED;
340 
344  uint32_t peer1 GNUNET_PACKED;
345 
349  uint32_t peer2 GNUNET_PACKED;
350 
354  uint64_t operation_id GNUNET_PACKED;
355 
356  /* followed by option-dependent variable-size values */
357 };
358 
359 
369 
373  uint32_t peer1 GNUNET_PACKED;
374 
378  uint64_t operation_id GNUNET_PACKED;
379 
383  uint32_t peer2 GNUNET_PACKED;
384 
388  uint32_t peer2_host_id GNUNET_PACKED;
389 };
390 
391 
401 
405  uint32_t peer GNUNET_PACKED;
406 
410  uint64_t operation_id GNUNET_PACKED;
411 
415  struct GNUNET_PeerIdentity peer_identity;
416 
420  struct GNUNET_MessageHeader hello[0];
421  // FIXME: we usually do not use this gcc-hack as some
422  // compilers / tools really get messed up by it...
423 };
424 
425 
434 
439  int32_t event_type GNUNET_PACKED;
440 
445 
450 
454  uint64_t operation_id GNUNET_PACKED;
455 };
456 
457 
466 
471  int32_t event_type GNUNET_PACKED;
472 
476  uint32_t peer1 GNUNET_PACKED;
477 
481  uint32_t peer2 GNUNET_PACKED;
482 
486  uint64_t operation_id GNUNET_PACKED;
487 };
488 
489 
498 
503  int32_t event_type GNUNET_PACKED;
504 
508  uint64_t operation_id GNUNET_PACKED;
509 
510  /* followed by 0-terminated error message */
511 };
512 
513 
522 
527 
531  uint64_t operation_id GNUNET_PACKED;
532 };
533 
534 
545 
550  int32_t event_type GNUNET_PACKED;
551 
555  uint64_t operation_id GNUNET_PACKED;
556 };
557 
558 
568 
573 
577  uint64_t operation_id GNUNET_PACKED;
578 };
579 
580 
589 
594 
598  uint64_t operation_id GNUNET_PACKED;
599 
603  struct GNUNET_PeerIdentity peer_identity;
604 
608  uint16_t config_size GNUNET_PACKED;
609 
610  /* followed by gzip-compressed configuration of the peer */
611 };
612 
613 
622 
626  uint32_t slave_id GNUNET_PACKED;
627 
631  uint64_t operation_id GNUNET_PACKED;
632 };
633 
634 
643 
647  uint32_t slave_id GNUNET_PACKED;
648 
652  uint64_t operation_id GNUNET_PACKED;
653 
657  uint16_t config_size GNUNET_PACKED;
658 
659  /* followed by gzip-compressed configuration of the peer */
660 };
661 
662 
671 
675  uint64_t operation_id GNUNET_PACKED;
676 };
677 
678 
687 
692 
696  uint64_t operation_id GNUNET_PACKED;
697 
701  uint8_t start;
702 
706 };
707 
708 
718 
722  uint32_t nentries GNUNET_PACKED;
723 
727  uint32_t nprops GNUNET_PACKED;
728 
739 };
740 
741 
742 /**************************************/
743 /* Barriers IPC messages and protocol */
744 /**************************************/
745 
746 
751 #define ENV_TESTBED_CONFIG "GNUNET_TESTBED_CONTROLLER_CONFIG"
752 
753 
762 
766  uint8_t quorum;
767 
771  char name[0];
772 };
773 
774 
783 
787  char name[0];
788 };
789 
790 
799 
804 
808  uint16_t name_len GNUNET_PACKED;
809 
814  char data[0];
815 };
816 
817 
827 
831  char name[0];
832 };
833 
834 
836 #endif
837 /* end of testbed.h */
Event notification from a controller to a client.
Definition: testbed.h:517
Confirmation from the service that adding a host worked (or failed).
Definition: testbed.h:112
Message to request configuration of a slave controller.
Definition: testbed.h:617
Event notification from a controller to a client.
Definition: testbed.h:461
Message sent from host controller of a peer(A) to the host controller of another peer(B) to request B...
Definition: testbed.h:396
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_INIT.
Definition: testbed.h:40
Message sent from client to testing service to reconfigure a (stopped) a peer.
Definition: testbed.h:234
Message to cancel a barrier.
Definition: testbed.h:778
Message sent from client to testing service to stop a peer.
Definition: testbed.h:286
Message sent from client to testing service to obtain the configuration of a peer.
Definition: testbed.h:563
Shutdown peers message.
Definition: testbed.h:666
Message sent from client to testing service to destroy a (stopped) peer.
Definition: testbed.h:308
Notify the service about a host that we intend to use.
Definition: testbed.h:63
Peer configuration and identity reply from controller to a client.
Definition: testbed.h:584
Event notification from a controller to a client.
Definition: testbed.h:429
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
Event notification from a controller to a client.
Definition: testbed.h:493
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:822
Response message for ControllerLinkRequest message.
Definition: testbed.h:165
Message sent from client to testing service to start a peer.
Definition: testbed.h:264
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:199
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
Reply to GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION message.
Definition: testbed.h:638
const char * name
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:48
uint8_t start
set this to 1 to start the service; 0 to stop the service
Definition: testbed.h:701
Message sent from client to testing service to connect two peers.
Definition: testbed.h:364
#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.
Message to start/stop services of a peer.
Definition: testbed.h:682
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:158
uint8_t quorum
The quorum percentage needed for crossing the barrier.
Definition: testbed.h:766
uint64_t event_mask
Event mask that specifies which events this client is interested in.
Definition: testbed.h:54
Message sent from client to testing service to (re)configure a "physical" link between two peers...
Definition: testbed.h:330
Header for all communications.
Event notification from a controller to a client for a generic operational success where the operatio...
Definition: testbed.h:540
Message for signalling status changes of a barrier.
Definition: testbed.h:794
Message to initialise a barrier.
Definition: testbed.h:757
uint32_t data
The data value.
Message to send underlay link model of a peer.
Definition: testbed.h:713
Client notifies controller that it should delegate requests for a particular client to a particular s...
Definition: testbed.h:133