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 
37 {
38 
43 
51 
57 
58  /* Followed by 0-terminated hostname of the controller */
59 };
60 
61 
66 {
67 
72 
77 
81  uint16_t ssh_port GNUNET_PACKED;
82 
88  uint16_t username_length GNUNET_PACKED;
89 
94  uint16_t hostname_length GNUNET_PACKED;
95 
99  uint16_t config_size GNUNET_PACKED;
100 
101  /* followed by non 0-terminated user name */
102 
103  /* followed by non 0-terminated host name */
104 
105  /* followed by gzip compressed configuration to start or connect to a
106  controller on this host. While starting the controller this configuration
107  is used as a template */
108 
109 };
110 
111 
118 {
119 
124 
129 
130  /* followed by the 0-terminated error message (on failure)
131  * (typical errors include host-id already in use) */
132 
133 };
134 
135 
142 {
143 
148 
152  uint32_t delegated_host_id GNUNET_PACKED;
153 
157  uint64_t operation_id GNUNET_PACKED;
158 
162  uint32_t slave_host_id GNUNET_PACKED;
163 
168  uint8_t is_subordinate;
169 
170 };
171 
172 
177 {
178 
183 
188  uint16_t config_size GNUNET_PACKED;
189 
193  uint16_t success GNUNET_PACKED;
194 
198  uint64_t operation_id GNUNET_PACKED;
199 
200  /* If controller linking is successful and configuration is present, then here
201  * comes the serialized gzip configuration with which the controller is
202  * running at the delegate host */
203 
204  /* In case of failure, here comes the error message (without \0 termination)*/
205 
206 };
207 
208 
214 {
215 
220 
225 
229  uint64_t operation_id GNUNET_PACKED;
230 
235 
239  uint16_t config_size GNUNET_PACKED;
240 
241  /* followed by serialized peer configuration;
242  * gzip'ed configuration file in INI format */
243 
244 };
245 
246 
252 {
253 
258 
263 
267  uint64_t operation_id GNUNET_PACKED;
268 
272  uint16_t config_size GNUNET_PACKED;
273 
274  /* followed by serialized peer configuration;
275  * gzip'ed configuration file in INI format */
276 
277 };
278 
279 
285 {
286 
291 
296 
300  uint64_t operation_id GNUNET_PACKED;
301 
302 };
303 
304 
310 {
311 
316 
321 
325  uint64_t operation_id GNUNET_PACKED;
326 
327 };
328 
329 
335 {
336 
341 
346 
350  uint64_t operation_id GNUNET_PACKED;
351 
352 };
353 
354 
360 {
361 
366 
370  int32_t connect_option GNUNET_PACKED;
371 
375  uint32_t peer1 GNUNET_PACKED;
376 
380  uint32_t peer2 GNUNET_PACKED;
381 
385  uint64_t operation_id GNUNET_PACKED;
386 
387  /* followed by option-dependent variable-size values */
388 
389 };
390 
391 
397 {
398 
403 
407  uint32_t peer1 GNUNET_PACKED;
408 
412  uint64_t operation_id GNUNET_PACKED;
413 
417  uint32_t peer2 GNUNET_PACKED;
418 
422  uint32_t peer2_host_id GNUNET_PACKED;
423 
424 };
425 
426 
432 {
437 
441  uint32_t peer GNUNET_PACKED;
442 
446  uint64_t operation_id GNUNET_PACKED;
447 
451  struct GNUNET_PeerIdentity peer_identity;
452 
456  struct GNUNET_MessageHeader hello[0];
457  // FIXME: we usually do not use this gcc-hack as some
458  // compilers / tools really get messed up by it...
459 
460 };
461 
462 
467 {
468 
473 
478  int32_t event_type GNUNET_PACKED;
479 
484 
489 
493  uint64_t operation_id GNUNET_PACKED;
494 
495 };
496 
497 
502 {
503 
508 
513  int32_t event_type GNUNET_PACKED;
514 
518  uint32_t peer1 GNUNET_PACKED;
519 
523  uint32_t peer2 GNUNET_PACKED;
524 
528  uint64_t operation_id GNUNET_PACKED;
529 
530 };
531 
532 
537 {
538 
543 
548  int32_t event_type GNUNET_PACKED;
549 
553  uint64_t operation_id GNUNET_PACKED;
554 
555  /* followed by 0-terminated error message */
556 
557 };
558 
559 
564 {
565 
570 
575 
579  uint64_t operation_id GNUNET_PACKED;
580 
581 };
582 
583 
590 {
591 
596 
601  int32_t event_type GNUNET_PACKED;
602 
606  uint64_t operation_id GNUNET_PACKED;
607 
608 };
609 
610 
616 {
617 
622 
627 
631  uint64_t operation_id GNUNET_PACKED;
632 
633 };
634 
635 
640 {
641 
646 
651 
655  uint64_t operation_id GNUNET_PACKED;
656 
660  struct GNUNET_PeerIdentity peer_identity;
661 
665  uint16_t config_size GNUNET_PACKED;
666 
667  /* followed by gzip-compressed configuration of the peer */
668 
669 };
670 
671 
676 {
681 
685  uint32_t slave_id GNUNET_PACKED;
686 
690  uint64_t operation_id GNUNET_PACKED;
691 
692 };
693 
694 
699 {
704 
708  uint32_t slave_id GNUNET_PACKED;
709 
713  uint64_t operation_id GNUNET_PACKED;
714 
718  uint16_t config_size GNUNET_PACKED;
719 
720  /* followed by gzip-compressed configuration of the peer */
721 
722 };
723 
724 
729 {
734 
738  uint64_t operation_id GNUNET_PACKED;
739 };
740 
741 
746 {
751 
756 
760  uint64_t operation_id GNUNET_PACKED;
761 
765  uint8_t start;
766 
770 };
771 
772 
778 {
783 
787  uint32_t nentries GNUNET_PACKED;
788 
792  uint32_t nprops GNUNET_PACKED;
793 
805 };
806 
807 
808 /**************************************/
809 /* Barriers IPC messages and protocol */
810 /**************************************/
811 
812 
817 #define ENV_TESTBED_CONFIG "GNUNET_TESTBED_CONTROLLER_CONFIG"
818 
819 
824 {
829 
833  uint8_t quorum;
834 
838  char name[0];
839 };
840 
841 
846 {
851 
855  char name[0];
856 };
857 
858 
863 {
868 
873 
877  uint16_t name_len GNUNET_PACKED;
878 
883  char data[0];
884 };
885 
886 
892 {
897 
901  char name[0];
902 };
903 
904 
906 #endif
907 /* end of testbed.h */
Event notification from a controller to a client.
Definition: testbed.h:563
Confirmation from the service that adding a host worked (or failed).
Definition: testbed.h:117
Message to request configuration of a slave controller.
Definition: testbed.h:675
Event notification from a controller to a client.
Definition: testbed.h:501
Message sent from host controller of a peer(A) to the host controller of another peer(B) to request B...
Definition: testbed.h:431
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_INIT.
Definition: testbed.h:42
Message sent from client to testing service to reconfigure a (stopped) a peer.
Definition: testbed.h:251
Message to cancel a barrier.
Definition: testbed.h:845
Message sent from client to testing service to stop a peer.
Definition: testbed.h:309
Message sent from client to testing service to obtain the configuration of a peer.
Definition: testbed.h:615
Shutdown peers message.
Definition: testbed.h:728
Message sent from client to testing service to destroy a (stopped) peer.
Definition: testbed.h:334
Notify the service about a host that we intend to use.
Definition: testbed.h:65
Peer configuration and identity reply from controller to a client.
Definition: testbed.h:639
Event notification from a controller to a client.
Definition: testbed.h:466
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
Event notification from a controller to a client.
Definition: testbed.h:536
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:891
Response message for ControllerLinkRequest message.
Definition: testbed.h:176
Message sent from client to testing service to start a peer.
Definition: testbed.h:284
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:213
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
Reply to GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION message.
Definition: testbed.h:698
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:50
uint8_t start
set this to 1 to start the service; 0 to stop the service
Definition: testbed.h:765
Message sent from client to testing service to connect two peers.
Definition: testbed.h:396
#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:745
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:168
uint8_t quorum
The quorum percentage needed for crossing the barrier.
Definition: testbed.h:833
uint64_t event_mask
Event mask that specifies which events this client is interested in.
Definition: testbed.h:56
Message sent from client to testing service to (re)configure a "physical" link between two peers...
Definition: testbed.h:359
Header for all communications.
Event notification from a controller to a client for a generic operational success where the operatio...
Definition: testbed.h:589
Message for signalling status changes of a barrier.
Definition: testbed.h:862
Message to initialise a barrier.
Definition: testbed.h:823
uint32_t data
The data value.
Message to send underlay link model of a peer.
Definition: testbed.h:777
Client notifies controller that it should delegate requests for a particular client to a particular s...
Definition: testbed.h:141