GNUnet  0.11.x
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
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:41
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
uint16_t value_size
Size of value blob Allocated at position 2 after this struct.
Definition: peerstore.h:74
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
uint16_t peer_set
GNUNET_YES if peer id value set, GNUNET_NO otherwise
Definition: peerstore.h:46
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
A 512-bit hashcode.
uint32_t options
Options, needed only in case of a store operation.
Definition: peerstore.h:80
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
The identity of the host (wraps the signing key of the peer).
#define GNUNET_PACKED
gcc-ism to get packed structs.
Message carrying record key hash.
Definition: peerstore.h:89
Message carrying a PEERSTORE record message.
Definition: peerstore.h:36
Header for all communications.
static unsigned long long reserved
How much space have we currently reserved?