aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_fragmentation_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_fragmentation_lib.h')
-rw-r--r--src/include/gnunet_fragmentation_lib.h64
1 files changed, 26 insertions, 38 deletions
diff --git a/src/include/gnunet_fragmentation_lib.h b/src/include/gnunet_fragmentation_lib.h
index 1f1f85321..06022e093 100644
--- a/src/include/gnunet_fragmentation_lib.h
+++ b/src/include/gnunet_fragmentation_lib.h
@@ -80,22 +80,14 @@ typedef void (*GNUNET_FRAGMENT_MessageProcessor) (void *cls,
80 * @param proc_cls closure for proc 80 * @param proc_cls closure for proc
81 * @return the fragmentation context 81 * @return the fragmentation context
82 */ 82 */
83struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct 83struct GNUNET_FRAGMENT_Context *
84 GNUNET_STATISTICS_Handle 84GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
85 *stats, 85 uint16_t mtu,
86 uint16_t mtu, 86 struct GNUNET_BANDWIDTH_Tracker *tracker,
87 struct 87 struct GNUNET_TIME_Relative delay,
88 GNUNET_BANDWIDTH_Tracker 88 const struct GNUNET_MessageHeader *msg,
89 *tracker, 89 GNUNET_FRAGMENT_MessageProcessor proc,
90 struct 90 void *proc_cls);
91 GNUNET_TIME_Relative
92 delay,
93 const struct
94 GNUNET_MessageHeader
95 *msg,
96 GNUNET_FRAGMENT_MessageProcessor
97 proc,
98 void *proc_cls);
99 91
100 92
101/** 93/**
@@ -105,8 +97,8 @@ struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct
105 * 97 *
106 * @param fc fragmentation context 98 * @param fc fragmentation context
107 */ 99 */
108void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context 100void
109 *fc); 101GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context *fc);
110 102
111 103
112/** 104/**
@@ -120,8 +112,9 @@ void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context
120 * GNUNET_NO if more messages are pending 112 * GNUNET_NO if more messages are pending
121 * GNUNET_SYSERR if this ack is not valid for this fc 113 * GNUNET_SYSERR if this ack is not valid for this fc
122 */ 114 */
123int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc, 115int
124 const struct GNUNET_MessageHeader *msg); 116GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
117 const struct GNUNET_MessageHeader *msg);
125 118
126 119
127/** 120/**
@@ -132,9 +125,8 @@ int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
132 * @return average delay between transmission and ACK for the 125 * @return average delay between transmission and ACK for the
133 * last message, FOREVER if the message was not fully transmitted 126 * last message, FOREVER if the message was not fully transmitted
134 */ 127 */
135struct GNUNET_TIME_Relative GNUNET_FRAGMENT_context_destroy (struct 128struct GNUNET_TIME_Relative
136 GNUNET_FRAGMENT_Context 129GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc);
137 *fc);
138 130
139 131
140/** 132/**
@@ -171,18 +163,12 @@ typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id,
171 * back to the other side) 163 * back to the other side)
172 * @return the defragmentation context 164 * @return the defragmentation context
173 */ 165 */
174struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct 166struct GNUNET_DEFRAGMENT_Context *
175 GNUNET_STATISTICS_Handle 167GNUNET_DEFRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
176 *stats, 168 uint16_t mtu, unsigned int num_msgs,
177 uint16_t 169 void *cls,
178 mtu, 170 GNUNET_FRAGMENT_MessageProcessor proc,
179 unsigned int 171 GNUNET_DEFRAGMENT_AckProcessor ackp);
180 num_msgs,
181 void *cls,
182 GNUNET_FRAGMENT_MessageProcessor
183 proc,
184 GNUNET_DEFRAGMENT_AckProcessor
185 ackp);
186 172
187 173
188/** 174/**
@@ -190,7 +176,8 @@ struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct
190 * 176 *
191 * @param dc defragmentation context 177 * @param dc defragmentation context
192 */ 178 */
193void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc); 179void
180GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
194 181
195 182
196/** 183/**
@@ -200,8 +187,9 @@ void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
200 * @param msg the message that was received 187 * @param msg the message that was received
201 * @return GNUNET_OK on success, GNUNET_NO if this was a duplicate, GNUNET_SYSERR on error 188 * @return GNUNET_OK on success, GNUNET_NO if this was a duplicate, GNUNET_SYSERR on error
202 */ 189 */
203int GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, 190int
204 const struct GNUNET_MessageHeader *msg); 191GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
192 const struct GNUNET_MessageHeader *msg);
205 193
206 194
207#if 0 /* keep Emacsens' auto-indent happy */ 195#if 0 /* keep Emacsens' auto-indent happy */