diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-06 22:41:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-06 22:41:30 +0000 |
commit | 9d487bb2fe029b369f362bdbe4697005061a4e5e (patch) | |
tree | 5c2eb6849a5dd7a813a07e29a7f2be60af9b9792 /src/scalarproduct/scalarproduct.h | |
parent | 6cd1fc3aa29926ce0326d07ba684e1b65a1a0db7 (diff) | |
download | gnunet-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.h | 56 |
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 | ||
33 | extern "C" | ||
34 | { | ||
35 | #endif | ||
36 | |||
37 | GNUNET_NETWORK_STRUCT_BEGIN | 28 | GNUNET_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 | */ |
51 | struct ComputationMessage | 42 | struct 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 | */ | ||
85 | struct 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 | */ |
92 | struct ComputationMultipartMessage | 122 | struct ComputationMultipartMessage |
@@ -140,9 +170,5 @@ struct ClientResponseMessage | |||
140 | 170 | ||
141 | GNUNET_NETWORK_STRUCT_END | 171 | GNUNET_NETWORK_STRUCT_END |
142 | 172 | ||
143 | #ifdef __cplusplus | ||
144 | } | ||
145 | #endif | ||
146 | |||
147 | #endif /* SCALARPRODUCT_H */ | 173 | #endif /* SCALARPRODUCT_H */ |
148 | 174 | ||