diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-04-03 14:18:39 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-04-03 14:18:39 +0000 |
commit | c2aa1e73ecc27f7a0d7eb4f119f3f2ea16542df2 (patch) | |
tree | ed305c2bc552b87f400cadb13481cee5afe64343 | |
parent | e82ddb1df77b55906949f158745866133e835acf (diff) | |
download | gnunet-c2aa1e73ecc27f7a0d7eb4f119f3f2ea16542df2.tar.gz gnunet-c2aa1e73ecc27f7a0d7eb4f119f3f2ea16542df2.zip |
docu
-rw-r--r-- | src/transport/gnunet-service-transport_manipulation.c | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index 5c26a8038..4543add00 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c | |||
@@ -87,14 +87,49 @@ struct TM_Peer; | |||
87 | */ | 87 | */ |
88 | struct DelayQueueEntry | 88 | struct DelayQueueEntry |
89 | { | 89 | { |
90 | /** | ||
91 | * Next in DLL | ||
92 | */ | ||
90 | struct DelayQueueEntry *prev; | 93 | struct DelayQueueEntry *prev; |
94 | |||
95 | /** | ||
96 | * Previous in DLL | ||
97 | */ | ||
91 | struct DelayQueueEntry *next; | 98 | struct DelayQueueEntry *next; |
99 | |||
100 | /** | ||
101 | * Peer this entry is belonging to | ||
102 | */ | ||
92 | struct TM_Peer *tmp; | 103 | struct TM_Peer *tmp; |
104 | |||
105 | /** | ||
106 | * Absolute time when to send | ||
107 | */ | ||
93 | struct GNUNET_TIME_Absolute sent_at; | 108 | struct GNUNET_TIME_Absolute sent_at; |
109 | |||
110 | /** | ||
111 | * The message | ||
112 | */ | ||
94 | void *msg; | 113 | void *msg; |
114 | |||
115 | /** | ||
116 | * The message size | ||
117 | */ | ||
95 | size_t msg_size; | 118 | size_t msg_size; |
119 | |||
120 | /** | ||
121 | * Message timeout | ||
122 | */ | ||
96 | struct GNUNET_TIME_Relative timeout; | 123 | struct GNUNET_TIME_Relative timeout; |
124 | |||
125 | /** | ||
126 | * Transports send continuation | ||
127 | */ | ||
97 | GST_NeighbourSendContinuation cont; | 128 | GST_NeighbourSendContinuation cont; |
129 | |||
130 | /** | ||
131 | * Transports send continuation cls | ||
132 | */ | ||
98 | void *cont_cls; | 133 | void *cont_cls; |
99 | }; | 134 | }; |
100 | 135 | ||
@@ -103,15 +138,33 @@ struct DelayQueueEntry | |||
103 | */ | 138 | */ |
104 | struct TM_Peer | 139 | struct TM_Peer |
105 | { | 140 | { |
141 | /** | ||
142 | * Peer ID | ||
143 | */ | ||
106 | struct GNUNET_PeerIdentity peer; | 144 | struct GNUNET_PeerIdentity peer; |
145 | |||
146 | /** | ||
147 | * Peer specific manipulation metrics | ||
148 | */ | ||
107 | uint32_t metrics [TM_BOTH][GNUNET_ATS_QualityPropertiesCount]; | 149 | uint32_t metrics [TM_BOTH][GNUNET_ATS_QualityPropertiesCount]; |
150 | |||
151 | /** | ||
152 | * Task to schedule delayed sendding | ||
153 | */ | ||
108 | GNUNET_SCHEDULER_TaskIdentifier send_delay_task; | 154 | GNUNET_SCHEDULER_TaskIdentifier send_delay_task; |
155 | |||
156 | /** | ||
157 | * Send queue DLL head | ||
158 | */ | ||
109 | struct DelayQueueEntry *send_head; | 159 | struct DelayQueueEntry *send_head; |
160 | |||
161 | /** | ||
162 | * Send queue DLL tail | ||
163 | */ | ||
110 | struct DelayQueueEntry *send_tail; | 164 | struct DelayQueueEntry *send_tail; |
111 | }; | 165 | }; |
112 | 166 | ||
113 | 167 | ||
114 | |||
115 | static void | 168 | static void |
116 | set_delay(struct TM_Peer *tmp, struct GNUNET_PeerIdentity *peer, int direction, uint32_t value) | 169 | set_delay(struct TM_Peer *tmp, struct GNUNET_PeerIdentity *peer, int direction, uint32_t value) |
117 | { | 170 | { |