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 {
64 
69 };
70 
71 
76 {
81 
86 
91 
96 
97  /* followed by encrypted block data */
98 };
99 
100 
105 {
110 
115 
120 
125 
126  /* followed by encrypted block data */
127 };
128 
129 
134 {
139 
144 };
145 
146 
148 
149 
150 /* end of namecache.h */
151 #endif
#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.
Cache a record in the namecache.
Definition: namecache.h:105
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE.
Definition: namecache.h:109
struct GNUNET_CRYPTO_EcdsaSignature signature
Signature.
Definition: namecache.h:119
struct GNUNET_IDENTITY_PublicKey derived_key
Derived public key.
Definition: namecache.h:124
struct GNUNET_TIME_AbsoluteNBO expire
Expiration time.
Definition: namecache.h:114
Response to a request to cache a block.
Definition: namecache.h:134
int32_t op_result
GNUNET_OK on success, GNUNET_SYSERR error
Definition: namecache.h:143
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE.
Definition: namecache.h:138
an ECC signature using ECDSA
A 512-bit hashcode.
An identity key as per LSD0001.
Header for all communications.
Generic namecache message with op id.
Definition: namecache.h:41
uint32_t r_id
Request ID in NBO.
Definition: namecache.h:51
struct GNUNET_MessageHeader header
header.type will be GNUNET_MESSAGE_TYPE_NAMECACHE_* header.size will be message size
Definition: namecache.h:46
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Lookup a block in the namecache.
Definition: namecache.h:59
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK.
Definition: namecache.h:63
struct GNUNET_HashCode query
The query.
Definition: namecache.h:68
Lookup response.
Definition: namecache.h:76
struct GNUNET_IDENTITY_PublicKey derived_key
Derived public key.
Definition: namecache.h:95
struct GNUNET_TIME_AbsoluteNBO expire
Expiration time.
Definition: namecache.h:85
struct GNUNET_CRYPTO_EcdsaSignature signature
Signature.
Definition: namecache.h:90
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE.
Definition: namecache.h:80