GNUnet  0.20.0
peerstore.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2012-2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
26 #ifndef PEERSTORE_H_
27 #define PEERSTORE_H_
28 
30 
31 
37 {
42 
47 
53 
58 
63 
69 
75 
80  uint32_t /* enum GNUNET_PEERSTORE_StoreOption */ options GNUNET_PACKED;
81 
82  /* Followed by key and value */
83 };
84 
85 
90 {
95 
100 
104  struct GNUNET_HashCode keyhash;
105 };
106 
108 #endif
API to the peerstore service.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
A 512-bit hashcode.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Message carrying record key hash.
Definition: peerstore.h:90
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:94
uint32_t reserved
Always 0, for alignment.
Definition: peerstore.h:99
struct GNUNET_HashCode keyhash
Hash of a record key.
Definition: peerstore.h:104
Message carrying a PEERSTORE record message.
Definition: peerstore.h:37
uint32_t options
Options, needed only in case of a store operation.
Definition: peerstore.h:80
uint16_t key_size
Size of the key string Allocated at position 1 after this struct.
Definition: peerstore.h:68
struct GNUNET_TIME_AbsoluteNBO expiry
Expiry time of entry.
Definition: peerstore.h:62
uint16_t value_size
Size of value blob Allocated at position 2 after this struct.
Definition: peerstore.h:74
uint16_t peer_set
GNUNET_YES if peer id value set, GNUNET_NO otherwise
Definition: peerstore.h:46
uint16_t sub_system_size
Size of the sub_system string Allocated at position 0 after this struct.
Definition: peerstore.h:52
struct GNUNET_PeerIdentity peer
Peer Identity.
Definition: peerstore.h:57
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:41