GNUnet  0.11.x
namecache.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2011-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  */
20 
27 #ifndef NAMECACHE_H
28 #define NAMECACHE_H
29 
33 #define MAX_NAME_LEN 256
34 
36 
41 {
47 
51  uint32_t r_id GNUNET_PACKED;
52 };
53 
54 
59 {
63  struct GNUNET_NAMECACHE_Header gns_header;
64 
69 };
70 
71 
76 {
80  struct GNUNET_NAMECACHE_Header gns_header;
81 
86 
90  struct GNUNET_CRYPTO_EcdsaSignature signature;
91 
95  struct GNUNET_CRYPTO_EcdsaPublicKey derived_key;
96 
97  /* follwed by encrypted block data */
98 };
99 
100 
105 {
109  struct GNUNET_NAMECACHE_Header gns_header;
110 
115 
120 
124  struct GNUNET_CRYPTO_EcdsaPublicKey derived_key;
125 
126  /* follwed by encrypted block data */
127 };
128 
129 
134 {
138  struct GNUNET_NAMECACHE_Header gns_header;
139 
144 };
145 
146 
148 
149 
150 /* end of namecache.h */
151 #endif
Lookup a block in the namecache.
Definition: namecache.h:58
Lookup response.
Definition: namecache.h:75
Response to a request to cache a block.
Definition: namecache.h:133
struct GNUNET_MessageHeader header
header.type will be GNUNET_MESSAGE_TYPE_NAMECACHE_* header.size will be message size ...
Definition: namecache.h:46
static void expire(void *cls)
Expire a PooledConnection object.
static int op_result(struct GNUNET_OP_Handle *h, uint64_t op_id, int64_t result_code, const void *data, uint16_t data_size, void **ctx, uint8_t cancel)
Remove an operation, and call its result callback (unless it was cancelled).
Definition: op.c:245
Generic namecache message with op id.
Definition: namecache.h:40
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.
Cache a record in the namecache.
Definition: namecache.h:104
an ECC signature using ECDSA
A 512-bit hashcode.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
uint32_t r_id
Request ID in NBO.
Definition: namecache.h:51
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
Header for all communications.