diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-03-05 20:31:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-03-05 20:31:58 +0000 |
commit | cb4610c2c23191e0977738402d87e7b6bd0808c9 (patch) | |
tree | bb6f7ad28dd92895680c909adbe3d54a3cce62b6 /src/transport/transport.h | |
parent | 78a3d311f2c3c82affe6003b9bd3c17c0b2d200b (diff) | |
download | gnunet-cb4610c2c23191e0977738402d87e7b6bd0808c9.tar.gz gnunet-cb4610c2c23191e0977738402d87e7b6bd0808c9.zip |
trying to fix bandwidth calculations
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r-- | src/transport/transport.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h index 993efac7c..d66b87b35 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -30,15 +30,15 @@ | |||
30 | #include "gnunet_time_lib.h" | 30 | #include "gnunet_time_lib.h" |
31 | #include "gnunet_transport_service.h" | 31 | #include "gnunet_transport_service.h" |
32 | 32 | ||
33 | #define DEBUG_TRANSPORT GNUNET_NO | 33 | #define DEBUG_TRANSPORT GNUNET_YES |
34 | #define DEBUG_TRANSPORT_TIMEOUT GNUNET_NO | 34 | #define DEBUG_TRANSPORT_TIMEOUT GNUNET_YES |
35 | #define DEBUG_TRANSPORT_DISCONNECT GNUNET_NO | 35 | #define DEBUG_TRANSPORT_DISCONNECT GNUNET_YES |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * For how long do we allow unused bandwidth | 38 | * For how long do we allow unused bandwidth |
39 | * from the past to carry over into the future? (in ms) | 39 | * from the past to carry over into the future? (in seconds) |
40 | */ | 40 | */ |
41 | #define MAX_BANDWIDTH_CARRY 5000 | 41 | #define MAX_BANDWIDTH_CARRY_S 5 |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * How often do we (at most) do a full quota | 44 | * How often do we (at most) do a full quota |
@@ -102,9 +102,9 @@ struct DisconnectInfoMessage | |||
102 | 102 | ||
103 | 103 | ||
104 | /** | 104 | /** |
105 | * Message used to set a particular bandwidth quota. Send | 105 | * Message used to set a particular bandwidth quota. Send TO the |
106 | * TO the service to set an incoming quota, send FROM the | 106 | * service to set an incoming quota, send FROM the service to update |
107 | * service to update an outgoing quota. | 107 | * an outgoing quota. |
108 | */ | 108 | */ |
109 | struct QuotaSetMessage | 109 | struct QuotaSetMessage |
110 | { | 110 | { |
@@ -115,10 +115,9 @@ struct QuotaSetMessage | |||
115 | struct GNUNET_MessageHeader header; | 115 | struct GNUNET_MessageHeader header; |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * Quota in bytes per ms, 0 to drop everything; | 118 | * Quota. |
119 | * in network byte order. | ||
120 | */ | 119 | */ |
121 | uint32_t quota_in GNUNET_PACKED; | 120 | struct GNUNET_BANDWIDTH_Value32NBO quota; |
122 | 121 | ||
123 | /** | 122 | /** |
124 | * About which peer are we talking here? | 123 | * About which peer are we talking here? |