aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_plugin.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-02-13 16:36:32 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-02-13 16:36:32 +0000
commit6be522885e1ad907c00a293b928fc37973f0d331 (patch)
treec913621a9c27f3552ea622a62db5882862492162 /src/include/gnunet_transport_plugin.h
parent92798aff74042af1df7c5296f364b81e535fa1aa (diff)
downloadgnunet-6be522885e1ad907c00a293b928fc37973f0d331.tar.gz
gnunet-6be522885e1ad907c00a293b928fc37973f0d331.zip
changes in includes
Diffstat (limited to 'src/include/gnunet_transport_plugin.h')
-rw-r--r--src/include/gnunet_transport_plugin.h64
1 files changed, 1 insertions, 63 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h
index 9418e6b09..0dbe6548e 100644
--- a/src/include/gnunet_transport_plugin.h
+++ b/src/include/gnunet_transport_plugin.h
@@ -279,61 +279,6 @@ typedef void (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls,
279 GNUNET_PeerIdentity * 279 GNUNET_PeerIdentity *
280 target, int result); 280 target, int result);
281 281
282
283/**
284 * Function that can be used by the transport service to transmit
285 * a message using the plugin. Note that in the case of a
286 * peer disconnecting, the continuation MUST be called
287 * prior to the disconnect notification itself. This function
288 * will be called with this peer's HELLO message to initiate
289 * a fresh connection to another peer.
290 *
291 * @param cls closure
292 * @param target who should receive this message
293 * @param msgbuf the message to transmit
294 * @param msgbuf_size number of bytes in 'msgbuf'
295 * @param priority how important is the message (most plugins will
296 * ignore message priority and just FIFO)
297 * @param timeout how long to wait at most for the transmission (does not
298 * require plugins to discard the message after the timeout,
299 * just advisory for the desired delay; most plugins will ignore
300 * this as well)
301 * @param session which session must be used (or NULL for "any")
302 * @param addr the address to use (can be NULL if the plugin
303 * is "on its own" (i.e. re-use existing TCP connection))
304 * @param addrlen length of the address in bytes
305 * @param force_address GNUNET_YES if the plugin MUST use the given address,
306 * GNUNET_NO means the plugin may use any other address and
307 * GNUNET_SYSERR means that only reliable existing
308 * bi-directional connections should be used (regardless
309 * of address)
310 * @param cont continuation to call once the message has
311 * been transmitted (or if the transport is ready
312 * for the next transmission call; or if the
313 * peer disconnected...); can be NULL
314 * @param cont_cls closure for cont
315 * @return number of bytes used (on the physical network, with overheads);
316 * -1 on hard errors (i.e. address invalid); 0 is a legal value
317 * and does NOT mean that the message was not transmitted (DV)
318 */
319typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
320 const struct
321 GNUNET_PeerIdentity *
322 target,
323 const char *msgbuf,
324 size_t msgbuf_size,
325 uint32_t priority,
326 struct
327 GNUNET_TIME_Relative
328 timeout,
329 struct Session * session,
330 const void *addr,
331 size_t addrlen,
332 int force_address,
333 GNUNET_TRANSPORT_TransmitContinuation
334 cont, void *cont_cls);
335
336
337/** 282/**
338 * The new send function with just the session and no address 283 * The new send function with just the session and no address
339 * 284 *
@@ -372,7 +317,7 @@ typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
372 * -1 on hard errors (i.e. address invalid); 0 is a legal value 317 * -1 on hard errors (i.e. address invalid); 0 is a legal value
373 * and does NOT mean that the message was not transmitted (DV) 318 * and does NOT mean that the message was not transmitted (DV)
374 */ 319 */
375typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunctionWithSession) (void *cls, 320typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
376 struct Session *session, 321 struct Session *session,
377 const char *msgbuf, size_t msgbuf_size, 322 const char *msgbuf, size_t msgbuf_size,
378 unsigned int priority, 323 unsigned int priority,
@@ -510,13 +455,6 @@ struct GNUNET_TRANSPORT_PluginFunctions
510 GNUNET_TRANSPORT_TransmitFunction send; 455 GNUNET_TRANSPORT_TransmitFunction send;
511 456
512 /** 457 /**
513 * New send function
514 * Will be renamed to "send" when implementation is done
515 */
516
517 GNUNET_TRANSPORT_TransmitFunctionWithSession send_with_session;
518
519 /**
520 * Function that can be used to force the plugin to disconnect from 458 * Function that can be used to force the plugin to disconnect from
521 * the given peer and cancel all previous transmissions (and their 459 * the given peer and cancel all previous transmissions (and their
522 * continuations). 460 * continuations).