aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct/scalarproduct.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-06 22:41:30 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-06 22:41:30 +0000
commit9d487bb2fe029b369f362bdbe4697005061a4e5e (patch)
tree5c2eb6849a5dd7a813a07e29a7f2be60af9b9792 /src/scalarproduct/scalarproduct.h
parent6cd1fc3aa29926ce0326d07ba684e1b65a1a0db7 (diff)
downloadgnunet-9d487bb2fe029b369f362bdbe4697005061a4e5e.tar.gz
gnunet-9d487bb2fe029b369f362bdbe4697005061a4e5e.zip
massive rework of scalarproduct service, splitting into Alice and Bob
Diffstat (limited to 'src/scalarproduct/scalarproduct.h')
-rw-r--r--src/scalarproduct/scalarproduct.h56
1 files changed, 41 insertions, 15 deletions
diff --git a/src/scalarproduct/scalarproduct.h b/src/scalarproduct/scalarproduct.h
index 4bafb18fb..bcd2d6821 100644
--- a/src/scalarproduct/scalarproduct.h
+++ b/src/scalarproduct/scalarproduct.h
@@ -17,23 +17,14 @@
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20
21/** 20/**
22 * @file scalarproduct.h 21 * @file scalarproduct.h
23 * @brief Scalar Product Message Types 22 * @brief Scalar Product Message Types
24 * @author Christian M. Fuchs 23 * @author Christian M. Fuchs
25 *
26 * Created on September 2, 2013, 3:43 PM
27 */ 24 */
28
29#ifndef SCALARPRODUCT_H 25#ifndef SCALARPRODUCT_H
30#define SCALARPRODUCT_H 26#define SCALARPRODUCT_H
31 27
32#ifdef __cplusplus
33extern "C"
34{
35#endif
36
37GNUNET_NETWORK_STRUCT_BEGIN 28GNUNET_NETWORK_STRUCT_BEGIN
38 29
39/** 30/**
@@ -48,10 +39,11 @@ GNUNET_NETWORK_STRUCT_BEGIN
48 * Message type passed from client to service 39 * Message type passed from client to service
49 * to initiate a request or responder role 40 * to initiate a request or responder role
50 */ 41 */
51struct ComputationMessage 42struct AliceComputationMessage
52{ 43{
53 /** 44 /**
54 * GNUNET message header 45 * GNUNET message header with type
46 * #GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_TO_ALICE
55 */ 47 */
56 struct GNUNET_MessageHeader header; 48 struct GNUNET_MessageHeader header;
57 49
@@ -87,6 +79,44 @@ struct ComputationMessage
87 79
88 80
89/** 81/**
82 * Message type passed from client to service
83 * to initiate a request or responder role
84 */
85struct BobComputationMessage
86{
87 /**
88 * GNUNET message header with type
89 * #GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_TO_BOB
90 */
91 struct GNUNET_MessageHeader header;
92
93 /**
94 * how many elements the vector in payload contains
95 */
96 uint32_t element_count_total GNUNET_PACKED;
97
98 /**
99 * contained elements the vector in payload contains
100 */
101 uint32_t element_count_contained GNUNET_PACKED;
102
103 /**
104 * Always zero.
105 */
106 uint32_t reserved GNUNET_PACKED;
107
108 /**
109 * the transaction/session key used to identify a session
110 */
111 struct GNUNET_HashCode session_key;
112
113 /**
114 * followed by struct GNUNET_SCALARPRODUCT_Element[]
115 */
116};
117
118
119/**
90 * multipart messages following `struct ComputationMessage` 120 * multipart messages following `struct ComputationMessage`
91 */ 121 */
92struct ComputationMultipartMessage 122struct ComputationMultipartMessage
@@ -140,9 +170,5 @@ struct ClientResponseMessage
140 170
141GNUNET_NETWORK_STRUCT_END 171GNUNET_NETWORK_STRUCT_END
142 172
143#ifdef __cplusplus
144}
145#endif
146
147#endif /* SCALARPRODUCT_H */ 173#endif /* SCALARPRODUCT_H */
148 174