GNUnet 0.28.1-dev.4-24-g0cf3356dd
 
Loading...
Searching...
No Matches
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, 2026 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 "gnunet_pils_service.h"
32#include "core.h"
33
34
38struct GSC_Client;
39
40
100
101
109void
111
112
125void
127 int drop_client);
128
129
141void
143 struct GSC_Client *client,
144 const struct GNUNET_PeerIdentity *neighbour,
145 enum GNUNET_CORE_PeerClass class,
146 enum GNUNET_GenericReturnValue is_connect);
147
148
160void
162 const struct GNUNET_MessageHeader *msg,
163 uint16_t msize,
164 uint32_t options);
165
166
177void
179 const struct GNUNET_PeerIdentity *neighbour,
180 enum GNUNET_CORE_PeerClass class,
181 enum GNUNET_GenericReturnValue is_connect);
182
183
189void
191
192
196extern const struct GNUNET_CONFIGURATION_Handle *GSC_cfg;
197
202
206extern struct GNUNET_PILS_Handle *GSC_pils;
207
212
213
214#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_CLIENTS_notify_clients_about_neighbour(const struct GNUNET_PeerIdentity *neighbour, enum GNUNET_CORE_PeerClass class, enum GNUNET_GenericReturnValue is_connect)
Notify all clients about a change to existing session.
void GSC_complete_initialization_cb(void)
This function is called from GSC_KX_init() once it got its peer id from pils.
void GSC_CLIENTS_notify_client_about_neighbour(struct GSC_Client *client, const struct GNUNET_PeerIdentity *neighbour, enum GNUNET_CORE_PeerClass class, enum GNUNET_GenericReturnValue is_connect)
Notify a particular client about a change to existing connection to one of our neighbours (check if t...
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_reject_request(struct GSC_ClientActiveRequest *car, int drop_client)
We will never be ready to transmit the given message in (disconnect or invalid request).
struct GNUNET_PILS_Handle * GSC_pils
Our Pils service.
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_GenericReturnValue
Named constants for return values.
GNUNET_MQ_PriorityPreferences
Per envelope preferences and priorities.
Header for all communications.
A handle for the PILS service.
Definition pils_api.c:86
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.