* @author Christian Grothoff
* @author Matthias Wachs
*/
+#ifndef GNUNET_DAEMON_EXPERIMENTATION_H
+#define GNUNET_DAEMON_EXPERIMENTATION_H
#include "platform.h"
#include "gnunet_getopt_lib.h"
#include "gnunet_util_lib.h"
/* Header */
/* ----------------- */
char *name;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
- struct GNUNET_CRYPTO_EccPublicSignKey issuer;
-
+ struct GNUNET_CRYPTO_EddsaPublicKey issuer;
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_Absolute version;
-
+
/**
- * Description
+ * Description
*/
char *description;
-
+
/**
- * Required capabilities
+ * Required capabilities
*/
uint32_t required_capabilities;
-
+
/* Experiment timing */
/* ----------------- */
-
+
/**
- * When to start experiment
+ * When to start experiment
*/
struct GNUNET_TIME_Absolute start;
-
+
/**
- * When to end experiment
+ * When to end experiment
*/
struct GNUNET_TIME_Absolute stop;
-
+
/**
- * How often to run experiment
+ * How often to run experiment
*/
struct GNUNET_TIME_Relative frequency;
-
+
/**
- * How long to run each execution
+ * How long to run each execution
*/
struct GNUNET_TIME_Relative duration;
-
-
+
+
/* Experiment itself */
/* ----------------- */
-
+
/* TBD */
};
* Peer id
*/
struct GNUNET_PeerIdentity id;
-
+
/**
* Task for response timeout
*/
GNUNET_SCHEDULER_TaskIdentifier timeout_task;
-
+
/**
* Core transmission handle
*/
struct GNUNET_CORE_TransmitHandle *cth;
-
+
/**
* Node capabilities
*/
uint32_t capabilities;
-
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_Absolute version;
-
+
struct NodeComCtx *e_req_head;
struct NodeComCtx *e_req_tail;
+
+ /**
+ * Array of issuers accepted by this neighbor.
+ */
+ struct GNUNET_CRYPTO_EddsaPublicKey *issuer_id;
+
+ unsigned int issuer_count;
+
};
* Used to detect experimentation capability
*
* This struct is followed by issuer identities:
- * (issuer_count * struct GNUNET_CRYPTO_EccPublicSignKey)
+ * (issuer_count * struct GNUNET_CRYPTO_EddsaPublicKey)
*
*/
struct Experimentation_Request
{
struct GNUNET_MessageHeader msg;
-
+
uint32_t capabilities GNUNET_PACKED;
-
+
uint32_t issuer_count GNUNET_PACKED;
};
* Sent if peer is running the daemon
*
* This struct is followed by issuer identities:
- * (issuer_count * struct GNUNET_CRYPTO_EccPublicSignKey)
+ * (issuer_count * struct GNUNET_CRYPTO_EddsaPublicKey)
*/
struct Experimentation_Response
{
struct GNUNET_MessageHeader msg;
-
+
uint32_t capabilities GNUNET_PACKED;
-
+
uint32_t issuer_count GNUNET_PACKED;
};
*/
struct Issuer
{
- struct GNUNET_CRYPTO_EccPublicSignKey pubkey;
+ struct GNUNET_CRYPTO_EddsaPublicKey pubkey;
};
/**
* Hashmap containing valid experiment issuers
- * (the key is the hash of the respective public key,
+ * (the key is the hash of the respective public key,
* the values are of type `struct Issuer').
*/
struct GNUNET_CONTAINER_MultiHashMap *valid_issuers;
struct GED_start_message
{
struct GNUNET_MessageHeader header;
-
+
/**
* String length of experiment name following the struct
*/
uint32_t len_name GNUNET_PACKED;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
- struct GNUNET_CRYPTO_EccPublicSignKey issuer;
-
+ struct GNUNET_CRYPTO_EddsaPublicKey issuer;
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_AbsoluteNBO version_nbo;
};
struct GED_start_ack_message
{
struct GNUNET_MessageHeader header;
-
+
/**
* String length of experiment name following the struct
*/
uint32_t len_name GNUNET_PACKED;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
- struct GNUNET_CRYPTO_EccPublicSignKey issuer;
+ struct GNUNET_CRYPTO_EddsaPublicKey issuer;
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_AbsoluteNBO version_nbo;
};
struct GED_stop_message
{
struct GNUNET_MessageHeader header;
-
+
/**
* String length of experiment name following the struct
*/
uint32_t len_name GNUNET_PACKED;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
- struct GNUNET_CRYPTO_EccPublicSignKey issuer;
-
+ struct GNUNET_CRYPTO_EddsaPublicKey issuer;
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_AbsoluteNBO version_nbo;
};
* @return #GNUNET_YES or #GNUNET_NO
*/
int
-GED_experiments_issuer_accepted (const struct GNUNET_CRYPTO_EccPublicSignKey *issuer_ID);
+GED_experiments_issuer_accepted (const struct GNUNET_CRYPTO_EddsaPublicKey *issuer_ID);
/*
* @return the experiment or NULL if not found
*/
struct Experiment *
-GED_experiments_find (const struct GNUNET_CRYPTO_EccPublicSignKey *issuer,
+GED_experiments_find (const struct GNUNET_CRYPTO_EddsaPublicKey *issuer,
const char *name,
const struct GNUNET_TIME_Absolute version);
-typedef void (*GNUNET_EXPERIMENTATION_experiments_get_cb) (struct Node *n,
+typedef void (*GNUNET_EXPERIMENTATION_experiments_get_cb) (struct Node *n,
struct Experiment *e);
void
GED_experiments_get (struct Node *n,
- struct GNUNET_CRYPTO_EccPublicSignKey *issuer,
+ struct GNUNET_CRYPTO_EddsaPublicKey *issuer,
GNUNET_EXPERIMENTATION_experiments_get_cb get_cb);
*/
void
GED_scheduler_add (struct Node *n,
- struct Experiment *e,
+ struct Experiment *e,
int outbound);
GED_storage_stop (void);
+#endif /* #ifndef GNUNET_DAEMON_EXPERIMENTATION_H */
/* end of gnunet-daemon-experimentation.h */