diff options
Diffstat (limited to 'src/include/gnunet_ats_service.h')
-rw-r--r-- | src/include/gnunet_ats_service.h | 93 |
1 files changed, 1 insertions, 92 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index a9fd519d4..b25cf3ec0 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -36,48 +36,6 @@ | |||
36 | #include "gnunet_util_lib.h" | 36 | #include "gnunet_util_lib.h" |
37 | #include "gnunet_hello_lib.h" | 37 | #include "gnunet_hello_lib.h" |
38 | 38 | ||
39 | /** | ||
40 | * Types of networks (with separate quotas) we support. | ||
41 | */ | ||
42 | enum GNUNET_ATS_Network_Type | ||
43 | { | ||
44 | /** | ||
45 | * Category of last resort. | ||
46 | */ | ||
47 | GNUNET_ATS_NET_UNSPECIFIED = 0, | ||
48 | |||
49 | /** | ||
50 | * Loopback (same host). | ||
51 | */ | ||
52 | GNUNET_ATS_NET_LOOPBACK = 1, | ||
53 | |||
54 | /** | ||
55 | * Local area network. | ||
56 | */ | ||
57 | GNUNET_ATS_NET_LAN = 2, | ||
58 | |||
59 | /** | ||
60 | * Wide area network (i.e. Internet) | ||
61 | */ | ||
62 | GNUNET_ATS_NET_WAN = 3, | ||
63 | |||
64 | /** | ||
65 | * Wireless LAN (i.e. 802.11abgn) | ||
66 | */ | ||
67 | GNUNET_ATS_NET_WLAN = 4, | ||
68 | |||
69 | /** | ||
70 | * Bluetooth LAN | ||
71 | */ | ||
72 | GNUNET_ATS_NET_BT = 5, | ||
73 | |||
74 | /** | ||
75 | * Number of network types supported by ATS | ||
76 | */ | ||
77 | #define GNUNET_ATS_NetworkTypeCount 6 | ||
78 | |||
79 | }; | ||
80 | |||
81 | 39 | ||
82 | /** | 40 | /** |
83 | * Default bandwidth assigned to a network : 64 KB/s | 41 | * Default bandwidth assigned to a network : 64 KB/s |
@@ -143,7 +101,7 @@ struct GNUNET_ATS_Properties | |||
143 | * Which network scope does the respective address belong to? | 101 | * Which network scope does the respective address belong to? |
144 | * This property does not change. | 102 | * This property does not change. |
145 | */ | 103 | */ |
146 | enum GNUNET_ATS_Network_Type scope; | 104 | enum GNUNET_NetworkType scope; |
147 | 105 | ||
148 | }; | 106 | }; |
149 | 107 | ||
@@ -220,55 +178,6 @@ GNUNET_ATS_properties_ntoh (struct GNUNET_ATS_Properties *hbo, | |||
220 | 178 | ||
221 | 179 | ||
222 | 180 | ||
223 | /** | ||
224 | * Convert a `enum GNUNET_ATS_Network_Type` to a string | ||
225 | * | ||
226 | * @param net the network type | ||
227 | * @return a string or NULL if invalid | ||
228 | */ | ||
229 | const char * | ||
230 | GNUNET_ATS_print_network_type (enum GNUNET_ATS_Network_Type net); | ||
231 | |||
232 | |||
233 | /** | ||
234 | * Handle for the LAN Characterization library. | ||
235 | */ | ||
236 | struct GNUNET_ATS_InterfaceScanner; | ||
237 | |||
238 | |||
239 | /** | ||
240 | * Returns where the address is located: loopback, LAN or WAN. | ||
241 | * | ||
242 | * @param is handle from #GNUNET_ATS_interface_scanner_init() | ||
243 | * @param addr address | ||
244 | * @param addrlen address length | ||
245 | * @return type of the network the address belongs to | ||
246 | */ | ||
247 | enum GNUNET_ATS_Network_Type | ||
248 | GNUNET_ATS_scanner_address_get_type (struct GNUNET_ATS_InterfaceScanner *is, | ||
249 | const struct sockaddr *addr, | ||
250 | socklen_t addrlen); | ||
251 | |||
252 | |||
253 | /** | ||
254 | * Initialize the ATS address characterization client handle. | ||
255 | * | ||
256 | * @return scanner handle, NULL on error | ||
257 | */ | ||
258 | struct GNUNET_ATS_InterfaceScanner * | ||
259 | GNUNET_ATS_scanner_init (void); | ||
260 | |||
261 | |||
262 | /** | ||
263 | * Terminate interface scanner. | ||
264 | * | ||
265 | * @param is scanner we are done with | ||
266 | */ | ||
267 | void | ||
268 | GNUNET_ATS_scanner_done (struct GNUNET_ATS_InterfaceScanner *is); | ||
269 | |||
270 | |||
271 | |||
272 | /* ********************Connection Suggestion API ***************************** */ | 181 | /* ********************Connection Suggestion API ***************************** */ |
273 | 182 | ||
274 | /** | 183 | /** |