spec->set = set;
spec->result_mode = ntohl (msg->result_mode);
spec->client_request_id = ntohl (msg->request_id);
+ spec->byzantine = msg->byzantine;
+ spec->byzantine_lower_bound = msg->byzantine_lower_bound;
+ spec->force_full = msg->force_full;
+ spec->force_delta = msg->force_delta;
context = GNUNET_MQ_extract_nested_mh (msg);
op->spec = spec;
op);
op->spec->client_request_id = ntohl (msg->request_id);
op->spec->result_mode = ntohl (msg->result_mode);
+ op->spec->byzantine = msg->byzantine;
+ op->spec->byzantine_lower_bound = msg->byzantine_lower_bound;
+ op->spec->force_full = msg->force_full;
+ op->spec->force_delta = msg->force_delta;
// Advance generation values, so that
// mutations won't interfer with the running operation.
* When are elements sent to the client, and which elements are sent?
*/
enum GNUNET_SET_ResultMode result_mode;
+
+ /**
+ * Always use delta operation instead of sending full sets,
+ * even it it's less efficient.
+ */
+ int force_delta;
+
+ /**
+ * Always send full sets, even if delta operations would
+ * be more efficient.
+ */
+ int force_full;
+
+ /**
+ * #GNUNET_YES to fail operations where Byzantine faults
+ * are suspected
+ */
+ int byzantine;
+
+ /**
+ * Lower bound for the set size, used only when
+ * byzantine mode is enabled.
+ */
+ int byzantine_lower_bound;
};
* See `enum GNUNET_SET_ResultMode`.
*/
uint32_t result_mode GNUNET_PACKED;
+
+ /**
+ * Always use delta operation instead of sending full sets,
+ * even it it's less efficient.
+ */
+ uint8_t force_delta;
+
+ /**
+ * Always send full sets, even if delta operations would
+ * be more efficient.
+ */
+ uint8_t force_full;
+
+ /**
+ * #GNUNET_YES to fail operations where Byzantine faults
+ * are suspected
+ */
+ uint8_t byzantine;
+
+ /**
+ * Lower bound for the set size, used only when
+ * byzantine mode is enabled.
+ */
+ uint8_t byzantine_lower_bound;
};
*/
uint32_t request_id GNUNET_PACKED;
+ /**
+ * Always use delta operation instead of sending full sets,
+ * even it it's less efficient.
+ */
+ uint8_t force_delta;
+
+ /**
+ * Always send full sets, even if delta operations would
+ * be more efficient.
+ */
+ uint8_t force_full;
+
+ /**
+ * #GNUNET_YES to fail operations where Byzantine faults
+ * are suspected
+ */
+ uint8_t byzantine;
+
+ /**
+ * Lower bound for the set size, used only when
+ * byzantine mode is enabled.
+ */
+ uint8_t byzantine_lower_bound;
+
/* rest: context message, that is, application-specific
message to convince listener to pick up */
};
struct GNUNET_MQ_Envelope *mqm;
struct GNUNET_SET_OperationHandle *oh;
struct GNUNET_SET_EvaluateMessage *msg;
+ struct GNUNET_SET_Option *opt;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Client prepares set operation (%d)\n",
msg->app_id = *app_id;
msg->result_mode = htonl (result_mode);
msg->target_peer = *other_peer;
+ for (opt = options; opt->type != 0; opt++)
+ {
+ switch (opt->type)
+ {
+ case GNUNET_SET_OPTION_BYZANTINE:
+ msg->byzantine = GNUNET_YES;
+ msg->byzantine_lower_bound = opt->v.num;
+ break;
+ case GNUNET_SET_OPTION_FORCE_FULL:
+ msg->force_full = GNUNET_YES;
+ break;
+ case GNUNET_SET_OPTION_FORCE_DELTA:
+ msg->force_delta = GNUNET_YES;
+ break;
+ default:
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Option with type %d not recognized\n", (int) opt->type);
+ }
+ }
oh->conclude_mqm = mqm;
oh->request_id_addr = &msg->request_id;