diff options
Diffstat (limited to 'src/ats/test_ats_api_common.h')
-rw-r--r-- | src/ats/test_ats_api_common.h | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/src/ats/test_ats_api_common.h b/src/ats/test_ats_api_common.h deleted file mode 100644 index 091eb59b6..000000000 --- a/src/ats/test_ats_api_common.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2010,2011 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | 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 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | /** | ||
21 | * @file ats/test_ats_api_common.h | ||
22 | * @brief shared definitions for ats testcases | ||
23 | * @author Christian Grothoff | ||
24 | * @author Matthias Wachs | ||
25 | */ | ||
26 | |||
27 | #include "platform.h" | ||
28 | #include "gnunet_ats_service.h" | ||
29 | #include "gnunet-service-ats_addresses.h" | ||
30 | |||
31 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | ||
32 | |||
33 | struct Test_Address | ||
34 | { | ||
35 | char *plugin; | ||
36 | size_t plugin_len; | ||
37 | |||
38 | void *addr; | ||
39 | size_t addr_len; | ||
40 | |||
41 | struct GNUNET_ATS_Properties properties; | ||
42 | |||
43 | void *session; | ||
44 | }; | ||
45 | |||
46 | struct PeerContext | ||
47 | { | ||
48 | struct GNUNET_PeerIdentity id; | ||
49 | |||
50 | struct Test_Address *addr; | ||
51 | |||
52 | unsigned long long bw_out_assigned; | ||
53 | |||
54 | unsigned long long bw_in_assigned; | ||
55 | }; | ||
56 | |||
57 | void | ||
58 | free_test_address (struct Test_Address *dest); | ||
59 | |||
60 | void | ||
61 | create_test_address (struct Test_Address *dest, char * plugin, void *session, void *addr, size_t addrlen); | ||
62 | |||
63 | |||
64 | int | ||
65 | compare_addresses (const struct GNUNET_HELLO_Address *address1, void *session1, | ||
66 | const struct GNUNET_HELLO_Address *address2, void *session2); | ||
67 | |||
68 | |||
69 | struct ATS_Address * | ||
70 | create_address (const struct GNUNET_PeerIdentity *peer, | ||
71 | const char *plugin_name, | ||
72 | const void *plugin_addr, size_t plugin_addr_len, | ||
73 | uint32_t session_id); | ||
74 | |||
75 | /** | ||
76 | * Load quotas for networks from configuration | ||
77 | * | ||
78 | * @param cfg configuration handle | ||
79 | * @param out_dest where to write outbound quotas | ||
80 | * @param in_dest where to write inbound quotas | ||
81 | * @param dest_length length of inbound and outbound arrays | ||
82 | * @return number of networks loaded | ||
83 | */ | ||
84 | unsigned int | ||
85 | load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
86 | unsigned long long *out_dest, | ||
87 | unsigned long long *in_dest, | ||
88 | int dest_length); | ||
89 | |||
90 | /* end of file test_ats_api_common.h */ | ||