GNUnet 0.22.2
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
52};
53
54
59{
64
69};
70
71
76{
81
86
87 /* followed by encrypted block data */
88};
89
90
95{
100
105
106 /* followed by encrypted block data */
107};
108
109
114{
119
124};
125
126
128
129
130/* end of namecache.h */
131#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:95
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE.
Definition: namecache.h:99
struct GNUNET_TIME_AbsoluteNBO expire
Expiration time.
Definition: namecache.h:104
Response to a request to cache a block.
Definition: namecache.h:114
int32_t op_result
GNUNET_OK on success, GNUNET_SYSERR error
Definition: namecache.h:123
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE.
Definition: namecache.h:118
A 512-bit hashcode.
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_TIME_AbsoluteNBO expire
Expiration time.
Definition: namecache.h:85
struct GNUNET_NAMECACHE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE.
Definition: namecache.h:80