GNUnet  0.19.5
core.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009-2014 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 #ifndef CORE_H
27 #define CORE_H
28 
30 #include "gnunet_util_lib.h"
31 #include "gnunet_time_lib.h"
32 
36 #define DEBUG_CORE GNUNET_EXTRA_LOGGING
37 
44 #define GNUNET_CORE_OPTION_NOTHING 0
45 
49 #define GNUNET_CORE_OPTION_SEND_STATUS_CHANGE 4
50 
54 #define GNUNET_CORE_OPTION_SEND_FULL_INBOUND 8
55 
60 #define GNUNET_CORE_OPTION_SEND_HDR_INBOUND 16
61 
65 #define GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND 32
66 
71 #define GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND 64
72 
73 
75 
83 {
88 
93 };
94 
95 
101 {
106 
111 
116 };
117 
118 
124 {
129 
134 
138  struct GNUNET_PeerIdentity peer;
139 };
140 
141 
147 {
152 
157 
161  struct GNUNET_PeerIdentity peer;
162 };
163 
164 
175 {
181 
185  struct GNUNET_PeerIdentity peer;
186 
187  /* Followed by payload (message or just header), variable size */
188 };
189 
190 
196 {
201 
206 
212 
216  struct GNUNET_PeerIdentity peer;
217 
222 
226  uint16_t size GNUNET_PACKED;
227 
232 };
233 
234 
241 {
246 
253  uint16_t size GNUNET_PACKED;
254 
259 
263  struct GNUNET_PeerIdentity peer;
264 };
265 
266 
272 {
277 
283 
289 
293  struct GNUNET_PeerIdentity peer;
294 };
295 
296 
302 {
307 
312 
316  struct GNUNET_PeerIdentity peer;
317 
322 };
323 
324 
326 #endif
327 /* end of core.h */
Functions related to time.
#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.
Message sent by the service to clients to notify them about a peer connecting.
Definition: core.h:124
struct GNUNET_PeerIdentity peer
Identity of the connecting peer.
Definition: core.h:138
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT.
Definition: core.h:128
uint32_t reserved
Always zero.
Definition: core.h:133
Message sent by the service to clients to notify them about a peer disconnecting.
Definition: core.h:147
uint32_t reserved
Always zero.
Definition: core.h:156
struct GNUNET_PeerIdentity peer
Identity of the connecting peer.
Definition: core.h:161
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT.
Definition: core.h:151
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Message transmitted core clients to gnunet-service-core to start the interaction.
Definition: core.h:83
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_INIT.
Definition: core.h:87
uint32_t options
Options, see GNUNET_CORE_OPTION_ values.
Definition: core.h:92
Message transmitted by the gnunet-service-core process to its clients in response to an INIT message.
Definition: core.h:101
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY.
Definition: core.h:105
struct GNUNET_PeerIdentity my_identity
Public key of the local peer.
Definition: core.h:115
uint32_t reserved
Always zero.
Definition: core.h:110
Message sent by the service to monitor clients to notify them about a peer changing status.
Definition: core.h:302
struct GNUNET_PeerIdentity peer
Identity of the peer.
Definition: core.h:316
uint32_t state
New peer state, an enum GNUNET_CORE_KxState in NBO.
Definition: core.h:311
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY.
Definition: core.h:306
struct GNUNET_TIME_AbsoluteNBO timeout
How long will we stay in this state (if nothing else happens)?
Definition: core.h:321
Message sent by the service to clients to notify them about messages being received or transmitted.
Definition: core.h:175
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND or GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND.
Definition: core.h:180
struct GNUNET_PeerIdentity peer
Identity of the receiver or sender.
Definition: core.h:185
Core notifying client that it is allowed to now transmit a message to the given target (response to G...
Definition: core.h:241
uint16_t smr_id
smr_id from the request.
Definition: core.h:258
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_SEND_READY.
Definition: core.h:245
struct GNUNET_PeerIdentity peer
Identity of the intended target.
Definition: core.h:263
uint16_t size
How many bytes are allowed for transmission? Guaranteed to be at least as big as the requested size,...
Definition: core.h:253
Client notifying core about the maximum-priority message it has in the queue for a particular target.
Definition: core.h:196
uint32_t priority
How important is this message?
Definition: core.h:205
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST.
Definition: core.h:200
struct GNUNET_PeerIdentity peer
Identity of the intended target.
Definition: core.h:216
uint16_t size
How large is the message?
Definition: core.h:226
uint16_t smr_id
Counter for this peer to match SMRs to replies.
Definition: core.h:231
uint32_t reserved
Always zero.
Definition: core.h:221
struct GNUNET_TIME_AbsoluteNBO deadline
By what time would the sender really like to see this message transmitted?
Definition: core.h:211
Client asking core to transmit a particular message to a particular target (response to GNUNET_MESSAG...
Definition: core.h:272
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_CORE_SEND.
Definition: core.h:276
struct GNUNET_TIME_AbsoluteNBO deadline
By what time would the sender really like to see this message transmitted?
Definition: core.h:288
uint32_t priority
How important is this message? Contains a enum GNUNET_MQ_PriorityPreferences in NBO.
Definition: core.h:282
struct GNUNET_PeerIdentity peer
Identity of the intended receiver.
Definition: core.h:293