GNUnet  0.10.x
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 
34 #ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H
35 #define GNUNET_TRANSPORT_MONITOR_SERVICE_H
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #if 0 /* keep Emacsens' auto-indent happy */
41 }
42 #endif
43 #endif
44 
45 #include "gnunet_util_lib.h"
48 
49 
53 #define GNUNET_TRANSPORT_MONITOR_VERSION 0x00000000
54 
55 
60 {
61 
65  const char *address;
66 
71 
76 
80  uint32_t num_msg_pending;
81 
86 
91 
96 
101 
106 
107 };
108 
109 
126 typedef void
128  const struct GNUNET_PeerIdentity *peer,
129  const struct GNUNET_TRANSPORT_MonitorInformation *mi);
130 
131 
136 
137 
166  const struct GNUNET_PeerIdentity *peer,
167  int one_shot,
169  void *cb_cls);
170 
171 
177 void
179 
180 
181 #if 0 /* keep Emacsens' auto-indent happy */
182 {
183 #endif
184 #ifdef __cplusplus
185 }
186 #endif
187 
188 /* ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H */
189 #endif
190  /* end of group */
192 
193 /* end of gnunet_transport_monitor_service.h */
Information about another peer&#39;s address.
uint32_t num_bytes_pending
Number of bytes pending transmission for this address.
uint32_t num_msg_pending
Number of messages pending transmission for this address.
struct GNUNET_TIME_Absolute valid_until
When does this address expire.
struct GNUNET_TIME_Absolute last_validation
When was this address last validated.
enum GNUNET_TRANSPORT_ConnectionStatus cs
Connection status.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:35
const char * address
Address we have for the peer, human-readable, 0-terminated, in UTF-8.
Opaque handle to the transport service for monitors.
int one_shot
GNUNET_YES to return the current state and then end.
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_TIME_Absolute next_validation
Time of the next validation operation.
static struct GNUNET_TESTBED_Controller * mc
Handle to the master controller.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
struct GNUNET_TIME_Relative rtt
Current estimate of the RTT.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
GNUNET_TRANSPORT_MonitorCallback cb
Function to call with monitor data.
enum GNUNET_NetworkType nt
Network type of the address.
The identity of the host (wraps the signing key of the peer).
configuration data
Definition: configuration.c:85
void GNUNET_TRANSPORT_monitor_cancel(struct GNUNET_TRANSPORT_MonitorContext *mc)
Cancel request to monitor peers.
Time for absolute times used by GNUnet, in microseconds.
GNUNET_TRANSPORT_ConnectionStatus
Possible states of a connection.
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...
Time for relative time used by GNUnet, in microseconds.
Bandwidth allocation API for the transport service.