X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdht%2Fdht.h;h=772471a7c40a78c2a163f8716f0aeb6491bb6f69;hb=d0b4927e6ab7e8b9874dd7807055e77fb4c5163f;hp=a7126aed713cae4051782ac5c9c4eb95fd129bdd;hpb=90c9abc573f95de334a1f61faa089e79046d2f11;p=oweals%2Fgnunet.git diff --git a/src/dht/dht.h b/src/dht/dht.h index a7126aed7..772471a7c 100644 --- a/src/dht/dht.h +++ b/src/dht/dht.h @@ -60,7 +60,7 @@ struct GNUNET_DHT_ClientGetStopMessage /** * Key of this request */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; }; @@ -95,7 +95,7 @@ struct GNUNET_DHT_ClientGetMessage /** * The key to search for */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; /** * Unique ID identifying this request, if 0 then @@ -148,7 +148,7 @@ struct GNUNET_DHT_ClientResultMessage /** * The key that was searched for */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; /* put path, get path and actual data are copied to end of this dealy do */ @@ -180,6 +180,11 @@ struct GNUNET_DHT_ClientPutMessage */ uint32_t desired_replication_level GNUNET_PACKED; + /** + * Unique ID for the PUT message. + */ + uint64_t unique_id GNUNET_PACKED; + /** * How long should this data persist? */ @@ -188,7 +193,7 @@ struct GNUNET_DHT_ClientPutMessage /** * The key to store the value under. */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; /* DATA copied to end of this message */ @@ -196,7 +201,31 @@ struct GNUNET_DHT_ClientPutMessage /** - * Message to monitor put requests going through peer, DHT service --> clients. + * Message to confirming receipt of PUT, sent from DHT service to clients. + */ +struct GNUNET_DHT_ClientPutConfirmationMessage +{ + /** + * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK + */ + struct GNUNET_MessageHeader header; + + /** + * Always zero. + */ + uint32_t reserved GNUNET_PACKED; + + /** + * Unique ID from the PUT message that is being confirmed. + */ + uint64_t unique_id GNUNET_PACKED; + +}; + + + +/** + * Message to monitor put requests going through peer, DHT service -> clients. */ struct GNUNET_DHT_MonitorPutMessage { @@ -239,7 +268,7 @@ struct GNUNET_DHT_MonitorPutMessage /** * The key to store the value under. */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; /* put path (if tracked) */ @@ -249,12 +278,12 @@ struct GNUNET_DHT_MonitorPutMessage /** - * Message to request monitoring messages, clients --> DHT service. + * 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|STOP) */ struct GNUNET_MessageHeader header; @@ -284,14 +313,14 @@ struct GNUNET_DHT_MonitorStartMessage int16_t filter_key GNUNET_PACKED; /** - * The key to filter messages by.. + * The key to filter messages by. */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; }; /** - * Message to monitor get requests going through peer, DHT service --> clients. + * Message to monitor get requests going through peer, DHT service -> clients. */ struct GNUNET_DHT_MonitorGetMessage { @@ -329,14 +358,14 @@ struct GNUNET_DHT_MonitorGetMessage /** * The key to store the value under. */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; /* get path (if tracked) */ }; /** - * Message to monitor get results going through peer, DHT service --> clients. + * Message to monitor get results going through peer, DHT service -> clients. */ struct GNUNET_DHT_MonitorGetRespMessage { @@ -368,7 +397,7 @@ struct GNUNET_DHT_MonitorGetRespMessage /** * The key of the corresponding GET request. */ - GNUNET_HashCode key; + struct GNUNET_HashCode key; /* put path (if tracked) */