GNUnet debian-0.24.3-26-g2202bbd4d
gnunet-service-core.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2009, 2010, 2011 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 GNUNET_SERVICE_CORE_H
27#define GNUNET_SERVICE_CORE_H
28
30#include "gnunet_core_service.h"
31#include "core.h"
32
33
37struct GSC_Client;
38
39
46{
52
58
63
68
73
78
83
88
92 uint16_t msize;
93
97 uint16_t smr_id;
98};
99
100
108void
110
111
124void
126 int drop_client);
127
128
140void
142 struct GSC_Client *client,
143 const struct GNUNET_PeerIdentity *neighbour,
144 enum GNUNET_CORE_PeerClass class);
145
146
158void
160 const struct GNUNET_MessageHeader *msg,
161 uint16_t msize,
162 uint32_t options);
163
164
175void
177 const struct GNUNET_PeerIdentity *neighbour,
178 enum GNUNET_CORE_PeerClass class);
179
180
186void
188
189
193extern const struct GNUNET_CONFIGURATION_Handle *GSC_cfg;
194
199
204
209
210
211#endif
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
common internal definitions for core service
const struct GNUNET_CONFIGURATION_Handle * GSC_cfg
Our configuration.
void GSC_complete_initialization_cb(void)
This function is called from GSC_KX_init() once it got its peer id from pils.
struct GNUNET_PeerIdentity GSC_my_identity
Our identity.
void GSC_CLIENTS_deliver_message(const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *msg, uint16_t msize, uint32_t options)
Deliver P2P message to interested clients.
static enum GNUNET_CORE_PeerClass GSC_peer_class
Our peer class.
void GSC_CLIENTS_notify_client_about_neighbour(struct GSC_Client *client, const struct GNUNET_PeerIdentity *neighbour, enum GNUNET_CORE_PeerClass class)
Notify a particular client about a change to existing connection to one of our neighbours (check if t...
void GSC_CLIENTS_reject_request(struct GSC_ClientActiveRequest *car, int drop_client)
We will never be ready to transmit the given message in (disconnect or invalid request).
void GSC_CLIENTS_notify_clients_about_neighbour(const struct GNUNET_PeerIdentity *neighbour, enum GNUNET_CORE_PeerClass class)
Notify all clients about a change to existing session.
struct GNUNET_STATISTICS_Handle * GSC_stats
For creating statistics.
void GSC_CLIENTS_solicit_request(struct GSC_ClientActiveRequest *car)
Tell a client that we are ready to receive the message.
Core service; the main API for encrypted P2P communications.
API to create, modify and access statistics.
GNUNET_CORE_PeerClass
The peer class gives a hint about the capabilities of a peer.
GNUNET_MQ_PriorityPreferences
Per envelope preferences and priorities.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Handle for the service.
Time for absolute times used by GNUnet, in microseconds.
Record kept for each request for transmission issued by a client that is still pending.
struct GSC_ClientActiveRequest * prev
Active requests are kept in a doubly-linked list of the respective target peer.
uint16_t smr_id
Unique request ID (in big endian).
struct GSC_ClientActiveRequest * next
Active requests are kept in a doubly-linked list of the respective target peer.
struct GNUNET_TIME_Absolute deadline
By what time would the client want to see this message out?
struct GNUNET_TIME_Absolute received_time
At what time did we first see this request?
struct GNUNET_PeerIdentity target
Which peer is the message going to be for?
int was_solicited
Has this request been solicited yet?
uint16_t msize
How many bytes does the client intend to send?
struct GSC_Client * client_handle
Handle to the client.
enum GNUNET_MQ_PriorityPreferences priority
How important is this request.
Data structure for each client connected to the CORE service.