GNUnet  0.17.6
gnunet_transport_monitor_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009-2016 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 
37 #ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H
38 #define GNUNET_TRANSPORT_MONITOR_SERVICE_H
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #if 0 /* keep Emacsens' auto-indent happy */
44 }
45 #endif
46 #endif
47 
48 #include "gnunet_util_lib.h"
51 
52 
56 #define GNUNET_TRANSPORT_MONITOR_VERSION 0x00000000
57 
58 
63 {
67  const char *address;
68 
73 
78 
82  uint32_t num_msg_pending;
83 
88 
93 
98 
103 
107  struct GNUNET_TIME_Relative rtt;
108 };
109 
110 
127 typedef void
129  const struct GNUNET_PeerIdentity *peer,
130  const struct
132 
133 
138 
139 
168  const struct GNUNET_PeerIdentity *peer,
169  int one_shot,
171  void *cb_cls);
172 
173 
179 void
181 
182 
183 #if 0 /* keep Emacsens' auto-indent happy */
184 {
185 #endif
186 #ifdef __cplusplus
187 }
188 #endif
189 
190 /* ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H */
191 #endif
192  /* end of group */
194  /* end of group addition */
196 
197 /* end of gnunet_transport_monitor_service.h */
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
static struct GNUNET_TESTBED_Controller * mc
Handle to the master controller.
Bandwidth allocation API for the transport service.
API of the transport service towards the communicator processes.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:36
struct GNUNET_TRANSPORT_MonitorContext * GNUNET_TRANSPORT_monitor(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_PeerIdentity *peer, int one_shot, GNUNET_TRANSPORT_MonitorCallback cb, void *cb_cls)
Return information about a specific peer or all peers currently known to transport service once or in...
void(* GNUNET_TRANSPORT_MonitorCallback)(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TRANSPORT_MonitorInformation *mi)
Function to call with information about a peer.
void GNUNET_TRANSPORT_monitor_cancel(struct GNUNET_TRANSPORT_MonitorContext *mc)
Cancel request to monitor peers.
GNUNET_TRANSPORT_ConnectionStatus
Possible states of a connection.
The identity of the host (wraps the signing key of the peer).
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
Opaque handle to the transport service for monitors.
GNUNET_TRANSPORT_MonitorCallback cb
Function to call with monitor data.
int one_shot
GNUNET_YES to return the current state and then end.
Information about another peer's address.
struct GNUNET_TIME_Absolute next_validation
Time of the next validation operation.
struct GNUNET_TIME_Absolute last_validation
When was this address last validated.
uint32_t num_msg_pending
Number of messages pending transmission for this address.
enum GNUNET_NetworkType nt
Network type of the address.
const char * address
Address we have for the peer, human-readable, 0-terminated, in UTF-8.
uint32_t num_bytes_pending
Number of bytes pending transmission for this address.
struct GNUNET_TIME_Absolute valid_until
When does this address expire.
struct GNUNET_TIME_Relative rtt
Current estimate of the RTT.
enum GNUNET_TRANSPORT_ConnectionStatus cs
Connection status.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.