aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-25 09:22:15 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-25 09:22:15 +0000
commitb7033e01b3afcf20828e2c5cb9e8ec15a9f760c4 (patch)
tree771ece2b66a4c8a2e1e35c6aff3d4fd791734b99 /src
parentcc00a944fc56e23f02788f951ca3f3b7b6e0b50c (diff)
downloadgnunet-b7033e01b3afcf20828e2c5cb9e8ec15a9f760c4.tar.gz
gnunet-b7033e01b3afcf20828e2c5cb9e8ec15a9f760c4.zip
Diffstat (limited to 'src')
-rw-r--r--src/transport/transport_selection.h65
1 files changed, 43 insertions, 22 deletions
diff --git a/src/transport/transport_selection.h b/src/transport/transport_selection.h
index 951734b41..b1ebe7f15 100644
--- a/src/transport/transport_selection.h
+++ b/src/transport/transport_selection.h
@@ -25,8 +25,10 @@
25 */ 25 */
26 26
27/** 27/**
28 * The structs defined here are used by the transport plugin to tell ATS about the transport's properties like cost and quality 28 * The structs defined here are used by the transport plugin to tell ATS about
29 * and on the other side the structs are used by highlevel components to communicate the constraints they have for a transport to ATS 29 * the transport's properties like cost and quality and on the other side
30 * the structs are used by highlevel components to communicate the constraints
31 * they have for a transport to ATS
30 * 32 *
31 * +---+ 33 * +---+
32 * +-----------+ Constraints | | Plugin properties +---------+ 34 * +-----------+ Constraints | | Plugin properties +---------+
@@ -42,7 +44,10 @@
42/** 44/**
43 * Enum defining all known property types for ATS 45 * Enum defining all known property types for ATS
44 * Enum values are used in the GNUNET_ATS_Information struct as (key,value)-pair 46 * Enum values are used in the GNUNET_ATS_Information struct as (key,value)-pair
45 * Cost are always stored in uint32_t, so all units used to define costs have to be normalized to fit in uint32_t [0 .. 4.294.967.295] 47 *
48 * Cost are always stored in uint32_t, so all units used to define costs
49 * have to be normalized to fit in uint32_t [0 .. 4.294.967.295]
50 *
46 * To keep the elements ordered 51 * To keep the elements ordered
47 * 1..1024 : Values with a relation to cost 52 * 1..1024 : Values with a relation to cost
48 * 1025..2048 : Values with a relation to quality 53 * 1025..2048 : Values with a relation to quality
@@ -58,8 +63,10 @@ enum GNUNET_ATS_Property
58 /** 63 /**
59 * Volume based cost in financial units to transmit data 64 * Volume based cost in financial units to transmit data
60 * 65 *
61 * Note: This value is not bound to a specific currency or unit and only used locally 66 * Note: This value is not bound to a specific currency or unit and only
62 * "cent" just refers the smallest amount of money in the respective currency 67 * used locally.
68 * "cent" just refers the smallest amount of money in the respective
69 * currency.
63 * 70 *
64 * Unit: [cent/MB] 71 * Unit: [cent/MB]
65 * 72 *
@@ -74,8 +81,10 @@ enum GNUNET_ATS_Property
74 /** 81 /**
75 * Time based cost in financial units to transmit data 82 * Time based cost in financial units to transmit data
76 * 83 *
77 * Note: This value is not bound to a specific currency or unit and only used locally 84 * Note: This value is not bound to a specific currency or unit and only
78 * "cent" just refers the smallest amount of money in the respective currency 85 * used locally.
86 * "cent" just refers the smallest amount of money in the respective
87 * currency.
79 * 88 *
80 * Unit: [cent/h] 89 * Unit: [cent/h]
81 * 90 *
@@ -110,8 +119,8 @@ enum GNUNET_ATS_Property
110 /** 119 /**
111 * Energy consumption 120 * Energy consumption
112 * 121 *
113 * Energy consumption using this transport when sending with a certain power at a certain bitrate 122 * Energy consumption using this transport when sending with a certain
114 * This is only an approximation based on: 123 * power at a certain bitrate. This is only an approximation based on:
115 * Energy consumption E = P / D 124 * Energy consumption E = P / D
116 * 125 *
117 * with: 126 * with:
@@ -138,7 +147,8 @@ enum GNUNET_ATS_Property
138 147
139 /** 148 /**
140 * Connect cost 149 * Connect cost
141 * How many bytes are transmitted to initiate a new connection using this transport? 150 * How many bytes are transmitted to initiate a new connection using
151 * this transport?
142 * 152 *
143 * Unit: [bytes] 153 * Unit: [bytes]
144 * 154 *
@@ -146,10 +156,14 @@ enum GNUNET_ATS_Property
146 * 156 *
147 * Examples: 157 * Examples:
148 * 158 *
149 * UDP (No connection) : 0 bytes 159 * UDP (No connection) :
150 * TCP (TCP 3-Way handshake): 220 bytes Ethernet, 172 bytes TCP/IP, 122 bytes TCP 160 * 0 bytes
151 * HTTP (TCP + Header) : 477 bytes Ethernet, 429 bytes TCP/IP, 374 bytes TCP, 278 bytes HTTP 161 * TCP (TCP 3-Way handshake):
152 * HTTPS HTTP+TLS Handshake: 2129 bytes Ethernet, 1975 bytes TCP/IP, 1755 bytes TCP, 1403 bytes HTTPS 162 * 220 bytes Ethernet, 172 bytes TCP/IP, 122 bytes TCP
163 * HTTP (TCP + Header) :
164 * 477 bytes Ethernet, 429 bytes TCP/IP, 374 bytes TCP, 278 bytes HTTP
165 * HTTPS HTTP+TLS Handshake:
166 * 2129 bytes Ethernet, 1975 bytes TCP/IP, 1755 bytes TCP, 1403 bytes HTTPS
153 * 167 *
154 * */ 168 * */
155 GNUNET_ATS_COST_CONNECT = 5, 169 GNUNET_ATS_COST_CONNECT = 5,
@@ -175,8 +189,10 @@ enum GNUNET_ATS_Property
175 /** 189 /**
176 * Network overhead 190 * Network overhead
177 * 191 *
178 * How many bytes are sent over the wire when 1 kilobyte (1024 bytes) of application data is transmitted? 192 * How many bytes are sent over the wire when 1 kilobyte (1024 bytes)
179 * A factor used with connect cost, bandwidth cost and energy cost to describe the overhead produced by the transport protocol 193 * of application data is transmitted?
194 * A factor used with connect cost, bandwidth cost and energy cost
195 * to describe the overhead produced by the transport protocol
180 * 196 *
181 * Unit: [bytes/kb] 197 * Unit: [bytes/kb]
182 * 198 *
@@ -253,7 +269,8 @@ enum GNUNET_ATS_Property
253 * LAN : 0 269 * LAN : 0
254 * WLAN : 400 270 * WLAN : 400
255 * Bluetooth : 100 271 * Bluetooth : 100
256 * Note: This numbers are just assumptions as an example, not measured or somehow determined 272 * Note: This numbers are just assumptions as an example, not
273 * measured or somehow determined
257 */ 274 */
258 GNUNET_ATS_QUALITY_NET_ERRORRATE = 1030, 275 GNUNET_ATS_QUALITY_NET_ERRORRATE = 1030,
259 276
@@ -269,7 +286,8 @@ enum GNUNET_ATS_Property
269 * LAN : 0 286 * LAN : 0
270 * WLAN : 400 287 * WLAN : 400
271 * Bluetooth : 100 288 * Bluetooth : 100
272 * Note: This numbers are just assumptions as an example, not measured or somehow determined 289 * Note: This numbers are just assumptions as an example, not
290 * measured or somehow determined
273 */ 291 */
274 GNUNET_ATS_QUALITY_NET_DROPRATE = 1031, 292 GNUNET_ATS_QUALITY_NET_DROPRATE = 1031,
275 293
@@ -285,7 +303,8 @@ enum GNUNET_ATS_Property
285 * LAN : 0 303 * LAN : 0
286 * WLAN : 40 304 * WLAN : 40
287 * Bluetooth : 10 305 * Bluetooth : 10
288 * Note: This numbers are just assumptions as an example, not measured or somehow determined 306 * Note: This numbers are just assumptions as an example, not measured
307 * or somehow determined
289 */ 308 */
290 GNUNET_ATS_QUALITY_NET_LOSSRATE = 1032, 309 GNUNET_ATS_QUALITY_NET_LOSSRATE = 1032,
291 310
@@ -318,9 +337,11 @@ enum GNUNET_ATS_Property
318}; 337};
319 338
320/** 339/**
321 * This structure will be used by plugins to communicate costs to ATS or by higher level components to tell ATS their constraints 340 * This structure will be used by plugins to communicate costs to ATS or by
322 * Always a pair of (GNUNET_ATS_Property, uint32_t value) 341 * higher level components to tell ATS their constraints.
323 * Value is always uint32_t, so all units used to define costs have to be normalized to fit uint32_t 342 * Always a pair of (GNUNET_ATS_Property, uint32_t value).
343 * Value is always uint32_t, so all units used to define costs have to
344 * be normalized to fit uint32_t.
324 */ 345 */
325struct GNUNET_ATS_Information 346struct GNUNET_ATS_Information
326{ 347{