GNUnet  0.10.x
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 
38 struct GSC_Client;
39 
40 
47 {
48 
54 
60 
65 
70 
75 
80 
85 
90 
94  uint16_t msize;
95 
99  uint16_t smr_id;
100 };
101 
102 
110 void
112 
113 
126 void
128  int drop_client);
129 
130 
141 void
143  struct GSC_Client *client,
144  const struct GNUNET_PeerIdentity *neighbour,
145  const struct GSC_TypeMap *tmap_old,
146  const struct GSC_TypeMap *tmap_new);
147 
148 
160 void
162  const struct GNUNET_MessageHeader *msg,
163  uint16_t msize,
164  uint32_t options);
165 
166 
176 void
178  const struct GNUNET_PeerIdentity *neighbour,
179  const struct GSC_TypeMap *tmap_old,
180  const struct GSC_TypeMap *tmap_new);
181 
182 
186 extern const struct GNUNET_CONFIGURATION_Handle *GSC_cfg;
187 
191 extern struct GNUNET_STATISTICS_Handle *GSC_stats;
192 
197 
198 
199 #endif
struct GNUNET_TIME_Absolute deadline
By what time would the client want to see this message out?
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
struct GSC_ClientActiveRequest * next
Active requests are kept in a doubly-linked list of the respective target peer.
const struct GNUNET_CONFIGURATION_Handle * GSC_cfg
Our configuration.
int was_solicited
Has this request been solicited yet?
common internal definitions for core service
GNUNET_MQ_PriorityPreferences
Per envelope preferences and priorities.
uint16_t smr_id
Unique request ID (in big endian).
Handle for the service.
management of map that specifies which message types this peer supports
Data structure for each client connected to the CORE service.
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).
enum GNUNET_MQ_PriorityPreferences priority
How important is this request.
Record kept for each request for transmission issued by a client that is still pending.
struct GNUNET_PeerIdentity GSC_my_identity
Our identity.
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.
struct GSC_ClientActiveRequest * prev
Active requests are kept in a doubly-linked list of the respective target peer.
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.
struct GNUNET_STATISTICS_Handle * GSC_stats
For creating statistics.
The identity of the host (wraps the signing key of the peer).
struct GSC_Client * client_handle
Handle to the client.
configuration data
Definition: configuration.c:85
void GSC_CLIENTS_solicit_request(struct GSC_ClientActiveRequest *car)
Tell a client that we are ready to receive the message.
A type map describing which messages a given neighbour is able to process.
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...
Header for all communications.
Time for absolute times used by GNUnet, in microseconds.
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?
uint16_t msize
How many bytes does the client intend to send?