diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-31 14:52:41 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-31 14:52:41 +0000 |
commit | f941bca886b577fd14235686c3100accc2beb03c (patch) | |
tree | 7e6d2916ee51deeb14106f56df1d22d4f91efe50 /src/testbed/testbed_api.h | |
parent | 7e2e6f55d1bf7ab87c9df180bfa6841480f99ab8 (diff) | |
download | gnunet-f941bca886b577fd14235686c3100accc2beb03c.tar.gz gnunet-f941bca886b577fd14235686c3100accc2beb03c.zip |
peer create with new operations handling
Diffstat (limited to 'src/testbed/testbed_api.h')
-rw-r--r-- | src/testbed/testbed_api.h | 62 |
1 files changed, 59 insertions, 3 deletions
diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h index 642fc4ccb..9d0d8076d 100644 --- a/src/testbed/testbed_api.h +++ b/src/testbed/testbed_api.h | |||
@@ -108,12 +108,53 @@ struct GNUNET_TESTBED_Operation | |||
108 | */ | 108 | */ |
109 | struct MessageQueue; | 109 | struct MessageQueue; |
110 | 110 | ||
111 | |||
112 | /** | 111 | /** |
113 | * Structure for a controller link | 112 | * Structure for a controller link |
114 | */ | 113 | */ |
115 | struct ControllerLink; | 114 | struct ControllerLink; |
116 | 115 | ||
116 | /** | ||
117 | * Context information for GNUNET_TESTBED_Operation | ||
118 | */ | ||
119 | struct OperationContext | ||
120 | { | ||
121 | /** | ||
122 | * next ptr for DLL | ||
123 | */ | ||
124 | struct OperationContext *next; | ||
125 | |||
126 | /** | ||
127 | * prev ptr for DLL | ||
128 | */ | ||
129 | struct OperationContext *prev; | ||
130 | |||
131 | /** | ||
132 | * The controller to which this operation context belongs to | ||
133 | */ | ||
134 | struct GNUNET_TESTBED_Controller *c; | ||
135 | |||
136 | /** | ||
137 | * The operation | ||
138 | */ | ||
139 | struct GNUNET_TESTBED_Operation *op; | ||
140 | |||
141 | /** | ||
142 | * Data relevant to the operation | ||
143 | */ | ||
144 | void *data; | ||
145 | |||
146 | /** | ||
147 | * The id of the opearation | ||
148 | */ | ||
149 | uint64_t id; | ||
150 | |||
151 | /** | ||
152 | * The type of operation | ||
153 | */ | ||
154 | enum OperationType type; | ||
155 | |||
156 | }; | ||
157 | |||
117 | 158 | ||
118 | /** | 159 | /** |
119 | * Handle to interact with a GNUnet testbed controller. Each | 160 | * Handle to interact with a GNUnet testbed controller. Each |
@@ -184,16 +225,31 @@ struct GNUNET_TESTBED_Controller | |||
184 | struct GNUNET_TESTBED_HostRegistrationHandle *rh; | 225 | struct GNUNET_TESTBED_HostRegistrationHandle *rh; |
185 | 226 | ||
186 | /** | 227 | /** |
187 | * The head of the operation queue | 228 | * The head of the operation queue (FIXME: Remove, use ocq) |
188 | */ | 229 | */ |
189 | struct GNUNET_TESTBED_Operation *op_head; | 230 | struct GNUNET_TESTBED_Operation *op_head; |
190 | 231 | ||
191 | /** | 232 | /** |
192 | * The tail of the operation queue | 233 | * The tail of the operation queue (FIXME: Remove, use ocq) |
193 | */ | 234 | */ |
194 | struct GNUNET_TESTBED_Operation *op_tail; | 235 | struct GNUNET_TESTBED_Operation *op_tail; |
195 | 236 | ||
196 | /** | 237 | /** |
238 | * The head of the opeartion context queue | ||
239 | */ | ||
240 | struct OperationContext *ocq_head; | ||
241 | |||
242 | /** | ||
243 | * The tail of the operation context queue | ||
244 | */ | ||
245 | struct OperationContext *ocq_tail; | ||
246 | |||
247 | /** | ||
248 | * Operation queue for simultaneous peer creations | ||
249 | */ | ||
250 | struct OperationQueue *opq_peer_create; | ||
251 | |||
252 | /** | ||
197 | * The operation id counter. use current value and increment | 253 | * The operation id counter. use current value and increment |
198 | */ | 254 | */ |
199 | uint64_t operation_counter; | 255 | uint64_t operation_counter; |