aboutsummaryrefslogtreecommitdiff
path: root/src/peerstore/peerstore.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-18 16:22:14 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-18 16:22:14 +0000
commitfb12af8319a84389a536ab2f3735daf3b24f11bd (patch)
tree53e1424149fe8e7d5673e783868fcaa8a6bdbb55 /src/peerstore/peerstore.h
parentd19064a18f3fcf35c94d7f56485e41fb3425d066 (diff)
downloadgnunet-fb12af8319a84389a536ab2f3735daf3b24f11bd.tar.gz
gnunet-fb12af8319a84389a536ab2f3735daf3b24f11bd.zip
-use const in peerstore callback
Diffstat (limited to 'src/peerstore/peerstore.h')
-rw-r--r--src/peerstore/peerstore.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/peerstore/peerstore.h b/src/peerstore/peerstore.h
index ef134feef..6644464ec 100644
--- a/src/peerstore/peerstore.h
+++ b/src/peerstore/peerstore.h
@@ -30,10 +30,11 @@
30 30
31 31
32GNUNET_NETWORK_STRUCT_BEGIN 32GNUNET_NETWORK_STRUCT_BEGIN
33
33/** 34/**
34 * Message carrying a PEERSTORE record message 35 * Message carrying a PEERSTORE record message
35 */ 36 */
36 struct StoreRecordMessage 37struct StoreRecordMessage
37{ 38{
38 39
39 /** 40 /**
@@ -47,15 +48,20 @@ GNUNET_NETWORK_STRUCT_BEGIN
47 uint16_t peer_set GNUNET_PACKED; 48 uint16_t peer_set GNUNET_PACKED;
48 49
49 /** 50 /**
51 * Size of the sub_system string
52 * Allocated at position 0 after this struct
53 */
54 uint16_t sub_system_size GNUNET_PACKED;
55
56 /**
50 * Peer Identity 57 * Peer Identity
51 */ 58 */
52 struct GNUNET_PeerIdentity peer; 59 struct GNUNET_PeerIdentity peer;
53 60
54 /** 61 /**
55 * Size of the sub_system string 62 * Expiry time of entry
56 * Allocated at position 0 after this struct
57 */ 63 */
58 uint16_t sub_system_size GNUNET_PACKED; 64 struct GNUNET_TIME_Absolute expiry GNUNET_PACKED;
59 65
60 /** 66 /**
61 * Size of the key string 67 * Size of the key string
@@ -70,18 +76,14 @@ GNUNET_NETWORK_STRUCT_BEGIN
70 uint16_t value_size GNUNET_PACKED; 76 uint16_t value_size GNUNET_PACKED;
71 77
72 /** 78 /**
73 * Expiry time of entry
74 */
75 struct GNUNET_TIME_Absolute expiry GNUNET_PACKED;
76
77 /**
78 * Options, needed only in case of a 79 * Options, needed only in case of a
79 * store operation 80 * store operation
80 */ 81 */
81 enum GNUNET_PEERSTORE_StoreOption options GNUNET_PACKED; 82 uint32_t /* enum GNUNET_PEERSTORE_StoreOption */ options GNUNET_PACKED;
82 83
83}; 84};
84 85
86
85/** 87/**
86 * Message carrying record key hash 88 * Message carrying record key hash
87 */ 89 */
@@ -94,6 +96,11 @@ struct StoreKeyHashMessage
94 struct GNUNET_MessageHeader header; 96 struct GNUNET_MessageHeader header;
95 97
96 /** 98 /**
99 * Always 0, for alignment.
100 */
101 uint32_t reserved GNUNET_PACKED;
102
103 /**
97 * Hash of a record key 104 * Hash of a record key
98 */ 105 */
99 struct GNUNET_HashCode keyhash; 106 struct GNUNET_HashCode keyhash;