aboutsummaryrefslogtreecommitdiff
path: root/internals.h
diff options
context:
space:
mode:
Diffstat (limited to 'internals.h')
-rw-r--r--internals.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/internals.h b/internals.h
index acb4845..fa2ea87 100644
--- a/internals.h
+++ b/internals.h
@@ -55,12 +55,20 @@ enum outcome_type {
GNUNET_NETWORK_STRUCT_BEGIN
/**
- * This struct describes an auction and has to be followed by #description_len
- * bytes of arbitrary data where the description of the item to be sold is
- * stored. All fields are stored in network byte order.
+ * This struct describes an auction and is always linked to a description buffer
+ * of #description_len bytes of arbitrary data where the description of the item
+ * to be sold is stored. This buffer should also contain information linking the
+ * auction to the payment system (which exact prices do the k possibilities
+ * refer to, payment system seller identity, …). All fields are stored in
+ * network byte order.
*
- * \todo: align to a multiple of 64bit */
+ * \todo: align to a multiple of 64bit
+ * \todo: versionsnummer */
struct BRANDT_DescrP {
+ /** Hash code over the remaining elements of this struct followed by the
+ * description buffer of #description_len bytes */
+ struct GNUNET_HashCode hash GNUNET_PACKED;
+
/** Starting time of the auction. Bidders have to join the auction via
* BRANDT_join until this time */
struct GNUNET_TIME_AbsoluteNBO time_start;
@@ -68,9 +76,12 @@ struct BRANDT_DescrP {
/** The maximum duration the participants have to complete each round. */
struct GNUNET_TIME_RelativeNBO time_round;
- /** The length of the description in bytes directly following this struct */
+ /** The length of the description in bytes */
uint32_t description_len GNUNET_PACKED;
+ /** reserved for future use */
+ uint32_t reserved1 GNUNET_PACKED;
+
/** The amount of possible prices */
uint16_t k GNUNET_PACKED;
@@ -81,6 +92,9 @@ struct BRANDT_DescrP {
/** Outcome type. 0 means private outcome, everything else means public
* outcome. */
uint16_t outcome_public GNUNET_PACKED;
+
+ /** reserved for future use */
+ uint16_t reserved2 GNUNET_PACKED;
};
GNUNET_NETWORK_STRUCT_END
@@ -102,6 +116,9 @@ struct BRANDT_Auction {
* outcome. */
uint16_t outcome_public;
+ /** Link to the next delayed task (auction start trigger, round trigger) */
+ struct GNUNET_SCHEDULER_Task *task;
+
void *closure; /** auction closure given by the user */
BRANDT_CbBroadcast bcast; /** broadcast callback */