2 This file is part of GNUnet.
3 (C) 2010,2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
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 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file transport/gnunet-service-transport_clients.h
23 * @brief plugin management API
24 * @author Christian Grothoff
26 #ifndef GNUNET_SERVICE_TRANSPORT_CLIENTS_H
27 #define GNUNET_SERVICE_TRANSPORT_CLIENTS_H
29 #include "gnunet_statistics_service.h"
30 #include "gnunet_util_lib.h"
34 * Start handling requests from clients.
36 * @param server server used to accept clients from.
39 GST_clients_start (struct GNUNET_SERVER_Handle *server);
43 * Stop processing clients.
46 GST_clients_stop (void);
50 * Initialize a normal client. We got a start message from this
51 * client, add him to the list of clients for broadcasting of inbound
55 * @param client the client
56 * @param message the start message that was sent
59 GST_clients_handle_start (void *cls,
60 struct GNUNET_SERVER_Client *client,
61 const struct GNUNET_MessageHeader *message);
65 * Client sent us a HELLO. Process the request.
68 * @param client the client
69 * @param message the HELLO message
72 GST_clients_handle_hello (void *cls,
73 struct GNUNET_SERVER_Client *client,
74 const struct GNUNET_MessageHeader *message);
78 * Client asked for transmission to a peer. Process the request.
81 * @param client the client
82 * @param message the send message that was sent
85 GST_clients_handle_send (void *cls,
86 struct GNUNET_SERVER_Client *client,
87 const struct GNUNET_MessageHeader *message);
91 * Client asked for a quota change for a particular peer. Process the request.
94 * @param client the client
95 * @param message the quota changing message
98 GST_clients_handle_set_quota (void *cls,
99 struct GNUNET_SERVER_Client *client,
100 const struct GNUNET_MessageHeader *message);
104 * Client asked to resolve an address. Process the request.
107 * @param client the client
108 * @param message the resolution request
111 GST_clients_handle_address_lookup (void *cls,
112 struct GNUNET_SERVER_Client *client,
113 const struct GNUNET_MessageHeader *message);
117 * Client asked to obtain information about a peer's addresses.
118 * Process the request.
121 * @param client the client
122 * @param message the peer address information request
125 GST_clients_handle_peer_address_lookup (void *cls,
126 struct GNUNET_SERVER_Client *client,
127 const struct GNUNET_MessageHeader *message);
131 * Client asked to obtain information about all addresses.
132 * Process the request.
135 * @param client the client
136 * @param message the peer address information request
139 GST_clients_handle_address_iterate (void *cls,
140 struct GNUNET_SERVER_Client *client,
141 const struct GNUNET_MessageHeader *message);
145 * Broadcast the given message to all of our clients.
147 * @param msg message to broadcast
148 * @param may_drop GNUNET_YES if the message can be dropped
151 GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
156 * Send the given message to a particular client
158 * @param client target of the message
159 * @param msg message to transmit
160 * @param may_drop GNUNET_YES if the message can be dropped
163 GST_clients_unicast (struct GNUNET_SERVER_Client *client,
164 const struct GNUNET_MessageHeader *msg,
170 /* end of file gnunet-service-transport_clients.h */