aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-08-30 14:55:13 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-08-30 14:55:13 +0000
commit5e1efe185cf484018f53dd33d64e546ac042fdee (patch)
treee1369e8e1a239426d4ba2d81bb31571bbd4f82eb /src/testbed/testbed.h
parent7d8d536bbaa0f72587552af517f643e3c05e7a6f (diff)
downloadgnunet-5e1efe185cf484018f53dd33d64e546ac042fdee.tar.gz
gnunet-5e1efe185cf484018f53dd33d64e546ac042fdee.zip
- towards testbed barriers
Diffstat (limited to 'src/testbed/testbed.h')
-rw-r--r--src/testbed/testbed.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/testbed/testbed.h b/src/testbed/testbed.h
index 66f8ddb17..3b159591d 100644
--- a/src/testbed/testbed.h
+++ b/src/testbed/testbed.h
@@ -768,6 +768,84 @@ struct GNUNET_TESTBED_ManagePeerServiceMessage
768}; 768};
769 769
770 770
771/**
772 * Message to initialise a barrier
773 */
774struct GNUNET_TESTBED_BarrierInit
775{
776 /**
777 * Type is GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT
778 */
779 struct GNUNET_MessageHeader header;
780
781 /**
782 * Unused. Only of alignment.
783 */
784 uint32_t unused;
785
786 /**
787 * The operation id
788 */
789 uint64_t op_id;
790
791 /**
792 * The quorum percentage needed for crossing the barrier
793 */
794 uint8_t quorum;
795
796 /**
797 * name of the barrier. Non NULL-terminated.
798 */
799 char name[0];
800};
801
802
803/**
804 * Message for signalling status changes of a barrier
805 */
806struct GNUNET_TESTBED_BarrierStatus
807{
808 /**
809 * Type is GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS
810 */
811 struct GNUNET_MessageHeader header;
812
813 /**
814 * status. 0 to signal success (barrier is crossed). 1 for error.
815 */
816 uint16_t status;
817
818 /**
819 * strlen of the barrier name
820 */
821 uint16_t name_len;
822
823 /**
824 * the barrier name (NULL terminated) concatenated with an error message (NULL
825 * terminated) if the status were to indicate an error
826 */
827 char data[0];
828};
829
830
831/**
832 * Message sent from peers to the testbed-barrier service to indicate that they
833 * have reached a barrier and are waiting for it to be crossed
834 */
835struct GNUNET_TESTBED_BarrierWait
836{
837 /**
838 * Type is GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_WAIT
839 */
840 struct GNUNET_MessageHeader header;
841
842 /**
843 * The name of the barrier they have reached. Non-NULL terminated.
844 */
845 char name[0];
846};
847
848
771GNUNET_NETWORK_STRUCT_END 849GNUNET_NETWORK_STRUCT_END
772#endif 850#endif
773/* end of testbed.h */ 851/* end of testbed.h */