GNUnet  0.10.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 
41 
46 
52 
57 
62 
68 
74 
79  uint32_t /* enum GNUNET_PEERSTORE_StoreOption */ options GNUNET_PACKED;
80 
81  /* Followed by key and value */
82 };
83 
84 
93 
98 
102  struct GNUNET_HashCode keyhash;
103 };
104 
106 #endif
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:40
uint16_t sub_system_size
Size of the sub_system string Allocated at position 0 after this struct.
Definition: peerstore.h:51
struct GNUNET_PeerIdentity peer
Peer Identity.
Definition: peerstore.h:56
uint16_t value_size
Size of value blob Allocated at position 2 after this struct.
Definition: peerstore.h:73
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:45
uint16_t key_size
Size of the key string Allocated at position 1 after this struct.
Definition: peerstore.h:67
struct GNUNET_TIME_AbsoluteNBO expiry
Expiry time of entry.
Definition: peerstore.h:61
A 512-bit hashcode.
uint32_t options
Options, needed only in case of a store operation.
Definition: peerstore.h:79
#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:88
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?