GNUnet  0.20.0
peerstore_common.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2013-2016 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  */
20 
26 #include "platform.h"
27 #include "peerstore.h"
28 
33 void
34 PEERSTORE_hash_key (const char *sub_system,
35  const struct GNUNET_PeerIdentity *peer,
36  const char *key,
37  struct GNUNET_HashCode *ret);
38 
39 
53 struct GNUNET_MQ_Envelope *
54 PEERSTORE_create_record_mq_envelope (const char *sub_system,
55  const struct GNUNET_PeerIdentity *peer,
56  const char *key,
57  const void *value,
58  size_t value_size,
59  struct GNUNET_TIME_Absolute expiry,
61  uint16_t msg_type);
62 
63 
72 
73 
79 void
81 
82 /* end of peerstore_common.h */
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
static void record(void *cls, size_t data_size, const void *data)
Process recorded audio data.
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
GNUNET_PEERSTORE_StoreOption
Options for storing values in PEERSTORE.
IPC messages.
void PEERSTORE_hash_key(const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, struct GNUNET_HashCode *ret)
Creates a hash of the given key combination.
struct GNUNET_MQ_Envelope * PEERSTORE_create_record_mq_envelope(const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t value_size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, uint16_t msg_type)
Creates a MQ envelope for a single record.
struct GNUNET_PEERSTORE_Record * PEERSTORE_parse_record_message(const struct StoreRecordMessage *srm)
Parses a message carrying a record.
void PEERSTORE_destroy_record(struct GNUNET_PEERSTORE_Record *record)
Free any memory allocated for this record.
A 512-bit hashcode.
Single PEERSTORE record.
The identity of the host (wraps the signing key of the peer).
Time for absolute times used by GNUnet, in microseconds.
Message carrying a PEERSTORE record message.
Definition: peerstore.h:37
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.