GNUnet  0.11.x
gnunet_nse_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2011 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 
21 #ifndef GNUNET_NSE_SERVICE_H_
22 #define GNUNET_NSE_SERVICE_H_
23 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #if 0 /* keep Emacsens' auto-indent happy */
46 }
47 #endif
48 #endif
49 
50 #include "gnunet_util_lib.h"
51 
55 #define GNUNET_NSE_VERSION 0x00000000
56 
60 struct GNUNET_NSE_Handle;
61 
71 typedef void (*GNUNET_NSE_Callback) (void *cls,
72  struct GNUNET_TIME_Absolute timestamp,
73  double logestimate, double std_dev);
74 
75 
83 #define GNUNET_NSE_log_estimate_to_n(loge) pow (2.0, (loge))
84 
85 
94 struct GNUNET_NSE_Handle *
96  GNUNET_NSE_Callback func, void *func_cls);
97 
98 
104 void
106 
107 
108 #if 0 /* keep Emacsens' auto-indent happy */
109 {
110 #endif
111 #ifdef __cplusplus
112 }
113 #endif
114  /* end of group nse */
116 
117 #endif /* GNUNET_NSE_SERVICE_H_ */
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
struct GNUNET_NSE_Handle * GNUNET_NSE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_NSE_Callback func, void *func_cls)
Connect to the network size estimation service.
Definition: nse_api.c:165
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:99
void(* GNUNET_NSE_Callback)(void *cls, struct GNUNET_TIME_Absolute timestamp, double logestimate, double std_dev)
Callback to call when network size estimate is updated.
void GNUNET_NSE_disconnect(struct GNUNET_NSE_Handle *h)
Disconnect from network size estimation service.
Definition: nse_api.c:193
Handle for talking with the NSE service.
Definition: nse_api.c:40
configuration data
Definition: configuration.c:85
Time for absolute times used by GNUnet, in microseconds.