GNUnet 0.21.1
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
41extern "C"
42{
43#if 0 /* keep Emacsens' auto-indent happy */
44}
45#endif
46#endif
47
48
49#include "gnunet_util_lib.h"
51
52
56#define GNUNET_TRANSPORT_MONITOR_VERSION 0x00000000
57
58
63{
67 const char *address;
68
73
78
83
88
93
98
103
108};
109
110
127typedef 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
179void
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 struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:109
static struct GNUNET_TESTBED_Controller * mc
Handle to the master controller.
API of the transport service towards the communicator processes.
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.
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_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:44
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.
struct GNUNET_PeerIdentity peer
Peer we monitor, all zeros for "all".
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.