From 0d7bbcd3ab20cf6c259bc6fd3eb5b2c05e7f71d4 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Fri, 3 Dec 2021 18:22:15 +0100 Subject: DHT: Update wire formats. --- src/dht/gnunet-service-dht_neighbours.c | 47 ++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 6465d8d57..02dab849b 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c @@ -115,29 +115,29 @@ struct PeerPutMessage struct GNUNET_MessageHeader header; /** - * Processing options + * Content type. */ - uint32_t options GNUNET_PACKED; + uint32_t type GNUNET_PACKED; /** - * Content type. + * Processing options */ - uint32_t type GNUNET_PACKED; + uint16_t options GNUNET_PACKED; /** * Hop count */ - uint32_t hop_count GNUNET_PACKED; + uint16_t hop_count GNUNET_PACKED; /** * Replication level for this message */ - uint32_t desired_replication_level GNUNET_PACKED; + uint16_t desired_replication_level GNUNET_PACKED; /** * Length of the PUT path that follows (if tracked). */ - uint32_t put_path_length GNUNET_PACKED; + uint16_t put_path_length GNUNET_PACKED; /** * When does the content expire? @@ -175,15 +175,20 @@ struct PeerResultMessage */ uint32_t type GNUNET_PACKED; + /** + * Reserved. + */ + uint32_t reserved GNUNET_PACKED; + /** * Length of the PUT path that follows (if tracked). */ - uint32_t put_path_length GNUNET_PACKED; + uint16_t put_path_length GNUNET_PACKED; /** * Length of the GET path that follows (if tracked). */ - uint32_t get_path_length GNUNET_PACKED; + uint16_t get_path_length GNUNET_PACKED; /** * When does the content expire? @@ -214,34 +219,29 @@ struct PeerGetMessage struct GNUNET_MessageHeader header; /** - * Processing options + * Desired content type. */ - uint32_t options GNUNET_PACKED; + uint32_t type GNUNET_PACKED; /** - * Desired content type. + * Processing options */ - uint32_t type GNUNET_PACKED; + uint16_t options GNUNET_PACKED; /** * Hop count */ - uint32_t hop_count GNUNET_PACKED; + uint16_t hop_count GNUNET_PACKED; /** * Desired replication level for this request. */ - uint32_t desired_replication_level GNUNET_PACKED; + uint16_t desired_replication_level GNUNET_PACKED; /** * Size of the extended query. */ - uint32_t xquery_size; - - /** - * Bloomfilter mutator. - */ - uint32_t bf_mutator; + uint16_t xquery_size; /** * Bloomfilter (for peer identities) to stop circular routes @@ -253,6 +253,11 @@ struct PeerGetMessage */ struct GNUNET_HashCode key; + /** + * Bloomfilter mutator. + */ + uint32_t bf_mutator; + /* xquery */ /* result bloomfilter */ -- cgit v1.2.3