* @author Omar Tarabai
*/
+#ifndef PEERSTORE_H_
+#define PEERSTORE_H_
+
#include "gnunet_peerstore_service.h"
GNUNET_NETWORK_STRUCT_BEGIN
/**
- * Message carrying a peerstore entry
+ * Message carrying a PEERSTORE record message
*/
-struct AddEntryMessage
+struct StoreRecordMessage
{
/**
- * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_GET
+ * GNUnet message header
*/
struct GNUNET_MessageHeader header;
+ /**
+ * #GNUNET_YES if peer id value set, #GNUNET_NO otherwise
+ */
+ uint16_t peer_set;
+
/**
* Peer Identity
*/
size_t sub_system_size;
/**
- * Size of value blob
+ * Size of the key string
* Allocated at position 1 after this struct
*/
+ size_t key_size;
+
+ /**
+ * Size of value blob
+ * Allocated at position 2 after this struct
+ */
size_t value_size;
/**
- * Lifetime of entry
+ * Expiry time of entry
+ */
+ struct GNUNET_TIME_Absolute expiry;
+
+ /**
+ * Options, needed only in case of a
+ * store operation
+ */
+ enum GNUNET_PEERSTORE_StoreOption options;
+
+};
+
+/**
+ * Message carrying record key hash
+ */
+struct StoreKeyHashMessage
+{
+
+ /**
+ * GNUnet message header
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Hash of a record key
*/
- struct GNUNET_TIME_Relative lifetime;
+ struct GNUNET_HashCode keyhash;
};
GNUNET_NETWORK_STRUCT_END
+
+#endif