GNUnet  0.20.0
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 
49 #include "gnunet_util_lib.h"
52 
53 
57 #define GNUNET_TRANSPORT_MONITOR_VERSION 0x00000000
58 
59 
64 {
68  const char *address;
69 
74 
79 
83  uint32_t num_msg_pending;
84 
89 
94 
99 
104 
108  struct GNUNET_TIME_Relative rtt;
109 };
110 
111 
128 typedef void
130  const struct GNUNET_PeerIdentity *peer,
131  const struct
133 
134 
139 
140 
169  const struct GNUNET_PeerIdentity *peer,
170  int one_shot,
172  void *cb_cls);
173 
174 
180 void
182 
183 
184 #if 0 /* keep Emacsens' auto-indent happy */
185 {
186 #endif
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 /* ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H */
192 #endif
193  /* end of group */
195  /* end of group addition */
197 
198 /* 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.
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.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:39
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.