GNUnet 0.22.1
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"
33
34
38struct GSC_Client;
39
40
47{
53
59
64
69
74
79
84
89
93 uint16_t msize;
94
98 uint16_t smr_id;
99};
100
101
109void
111
112
125void
127 int drop_client);
128
129
140void
142 struct GSC_Client *client,
143 const struct GNUNET_PeerIdentity *neighbour,
144 const struct GSC_TypeMap *tmap_old,
145 const struct GSC_TypeMap *tmap_new);
146
147
159void
161 const struct GNUNET_MessageHeader *msg,
162 uint16_t msize,
163 uint32_t options);
164
165
175void
177 const struct GNUNET_PeerIdentity *neighbour,
178 const struct GSC_TypeMap *tmap_old,
179 const struct GSC_TypeMap *tmap_new);
180
181
185extern const struct GNUNET_CONFIGURATION_Handle *GSC_cfg;
186
191
196
197
198#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_client_about_neighbour(struct GSC_Client *client, const struct GNUNET_PeerIdentity *neighbour, const struct GSC_TypeMap *tmap_old, const struct GSC_TypeMap *tmap_new)
Notify a particular client about a change to existing connection to one of our neighbours (check if t...
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.
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_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.
void GSC_CLIENTS_notify_clients_about_neighbour(const struct GNUNET_PeerIdentity *neighbour, const struct GSC_TypeMap *tmap_old, const struct GSC_TypeMap *tmap_new)
Notify all clients about a change to existing session.
management of map that specifies which message types this peer supports
Core service; the main API for encrypted P2P communications.
API to create, modify and access statistics.
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.
A type map describing which messages a given neighbour is able to process.