struct GNUNET_DHT_ClientGetStopMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_GET_STOP
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP
*/
struct GNUNET_MessageHeader header;
/**
* Key of this request
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
};
struct GNUNET_DHT_ClientGetMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET
*/
struct GNUNET_MessageHeader header;
* The type for the data for the GET request; actually an 'enum
* GNUNET_BLOCK_Type'.
*/
- uint32_t type;
+ uint32_t type GNUNET_PACKED;
/**
* The key to search for
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
/**
* Unique ID identifying this request, if 0 then
};
+/**
+ * DHT GET RESULTS KNOWN message sent from clients to service. Indicates that a GET
+ * request should exclude certain results which are already known.
+ */
+struct GNUNET_DHT_ClientGetResultSeenMessage
+{
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_RESULTS_KNOWN
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Reserved, always 0.
+ */
+ uint32_t reserved GNUNET_PACKED;
+
+ /**
+ * The key we are searching for (to make it easy to find the corresponding
+ * GET inside the service).
+ */
+ struct GNUNET_HashCode key GNUNET_PACKED;
+
+ /**
+ * Unique ID identifying this request.
+ */
+ uint64_t unique_id GNUNET_PACKED;
+
+ /* Followed by an array of the hash codes of known results */
+
+};
+
+
+
/**
* Reply to a GET send from the service to a client.
*/
struct GNUNET_DHT_ClientResultMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT
*/
struct GNUNET_MessageHeader header;
/**
* The type for the data.
*/
- uint32_t type;
+ uint32_t type GNUNET_PACKED;
/**
* Number of peers recorded in the outgoing path from source to the
/**
* The key that was searched for
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
/* put path, get path and actual data are copied to end of this dealy do */
struct GNUNET_DHT_ClientPutMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT
*/
struct GNUNET_MessageHeader header;
/**
* The key to store the value under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
/* DATA copied to end of this message */
struct GNUNET_DHT_ClientPutConfirmationMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK
*/
struct GNUNET_MessageHeader header;
struct GNUNET_DHT_MonitorPutMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT
*/
struct GNUNET_MessageHeader header;
* Hop count so far.
*/
uint32_t hop_count GNUNET_PACKED;
-
+
/**
* Replication level for this message
*/
/**
* The key to store the value under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
/* put path (if tracked) */
/**
* Message to request monitoring messages, clients -> DHT service.
*/
-struct GNUNET_DHT_MonitorStartMessage
+struct GNUNET_DHT_MonitorStartStopMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_MONITOR_START
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_MONITOR_START or
+ * #GNUNET_MESSAGE_TYPE_DHT_MONITOR_STOP
*/
struct GNUNET_MessageHeader header;
/**
* The key to filter messages by.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
};
struct GNUNET_DHT_MonitorGetMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET
*/
struct GNUNET_MessageHeader header;
* Hop count
*/
uint32_t hop_count GNUNET_PACKED;
-
+
/**
* Replication level for this message
*/
/**
* The key to store the value under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
/* get path (if tracked) */
struct GNUNET_DHT_MonitorGetRespMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT
+ * Type: #GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT
*/
struct GNUNET_MessageHeader header;
/**
* The key of the corresponding GET request.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key GNUNET_PACKED;
/* put path (if tracked) */
};
+#if ENABLE_MALICIOUS
+/**
+ * Message to turn the service malicious
+ */
+struct GNUNET_DHT_ActMaliciousMessage
+{
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_ACT_MALICIOUS
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Type of malicious behaviour expected; 0 turning peer benign
+ */
+ uint32_t action;
+};
+#endif
+
GNUNET_NETWORK_STRUCT_END
#endif