aboutsummaryrefslogtreecommitdiff
path: root/src/peerstore/peerstore.h
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-05-13 22:08:22 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-05-13 22:08:22 +0000
commitdb2ee15ca4302b0e7fa78e318833cd136265b746 (patch)
tree118bf881b689d5f2f42353611e9e132ea128eadb /src/peerstore/peerstore.h
parent748449cc89a8ef631b8c3c5c3b9168634fc355a5 (diff)
downloadgnunet-db2ee15ca4302b0e7fa78e318833cd136265b746.tar.gz
gnunet-db2ee15ca4302b0e7fa78e318833cd136265b746.zip
PEERSTORE api overhaul
Diffstat (limited to 'src/peerstore/peerstore.h')
-rw-r--r--src/peerstore/peerstore.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/peerstore/peerstore.h b/src/peerstore/peerstore.h
index 0acc3ec4b..29e2ed866 100644
--- a/src/peerstore/peerstore.h
+++ b/src/peerstore/peerstore.h
@@ -40,48 +40,33 @@ struct StoreRequestMessage
40 struct GNUNET_MessageHeader header; 40 struct GNUNET_MessageHeader header;
41 41
42 /** 42 /**
43 * Peer Identity
44 */
45 struct GNUNET_PeerIdentity peer;
46
47 /**
48 * Size of the sub_system string 43 * Size of the sub_system string
49 * Allocated at position 0 after this struct 44 * Allocated at position 0 after this struct
50 */ 45 */
51 size_t sub_system_size; 46 size_t sub_system_size;
52 47
53 /** 48 /**
54 * Size of value blob 49 * Peer Identity
55 * Allocated at position 1 after this struct
56 */ 50 */
57 size_t value_size; 51 struct GNUNET_PeerIdentity peer;
58 52
59 /** 53 /**
60 * Lifetime of entry 54 * Size of the key string
55 * Allocated at position 1 after this struct
61 */ 56 */
62 struct GNUNET_TIME_Relative lifetime; 57 size_t key_size;
63 58
64};
65
66/**
67 * Message carrying a PEERSTORE store response
68 */
69struct StoreResponseMessage
70{
71 /** 59 /**
72 * GNUnet message header 60 * Size of value blob
61 * Allocated at position 2 after this struct
73 */ 62 */
74 struct GNUNET_MessageHeader header; 63 size_t value_size;
75 64
76 /** 65 /**
77 * Was the store operation successful (#GNUNET_YES / #GNUNET_NO) 66 * Lifetime of entry
78 */ 67 */
79 uint16_t success GNUNET_PACKED; 68 struct GNUNET_TIME_Relative lifetime;
80 69
81 /**
82 * Size of the following error message (0 if no error)
83 */
84 size_t emsg_size GNUNET_PACKED;
85}; 70};
86 71
87GNUNET_NETWORK_STRUCT_END 72GNUNET_NETWORK_STRUCT_END