GNUnet  0.20.0
testbed_api_topology.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2008--2013 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 
27 #ifndef TESTBED_API_TOPOLOGY_H
28 #define TESTBED_API_TOPOLOGY_H
29 
42 unsigned int
43 GNUNET_TESTBED_2dtorus_calc_links (unsigned int num_peers, unsigned int *rows,
44  unsigned int **rows_len);
45 
46 
56 int
58  const char *topology_string);
59 
60 
68 char *
70 
71 
83 typedef int (*underlay_link_processor) (void *cls,
84  unsigned int A,
85  unsigned int B,
86  unsigned int bandwidth,
87  unsigned int latency,
88  unsigned int loss);
89 
90 
108 int
111  void *cls,
112  ...);
113 
114 #endif
115 /* end of testbed_api_topology.h */
enum GNUNET_TESTBED_TopologyOption topology
The topology to generate.
static unsigned int num_peers
GNUNET_TESTBED_TopologyOption
Topologies and topology options supported for testbeds.
int GNUNET_TESTBED_underlay_construct_(int num_peers, underlay_link_processor proc, void *cls,...)
Function to construct an underlay topology.
int GNUNET_TESTBED_topology_get_(enum GNUNET_TESTBED_TopologyOption *topology, const char *topology_string)
Get a topology from a string input.
unsigned int GNUNET_TESTBED_2dtorus_calc_links(unsigned int num_peers, unsigned int *rows, unsigned int **rows_len)
Returns the number of links that are required to generate a 2d torus for the given number of peers.
char * GNUNET_TESTBED_topology_to_str_(enum GNUNET_TESTBED_TopologyOption topology)
Returns the string corresponding to the given topology.
int(* underlay_link_processor)(void *cls, unsigned int A, unsigned int B, unsigned int bandwidth, unsigned int latency, unsigned int loss)
Functions of this type are called to process underlay link.