]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - send.h
vss: unify calls to the FEC layer
[paraslash.git] / send.h
diff --git a/send.h b/send.h
index 72c7a6c6c6313e15d8cd64ceb0997624ef0be52e..f831cbc4839b1eb304a8869e234923f375716e88 100644 (file)
--- a/send.h
+++ b/send.h
@@ -20,6 +20,7 @@ enum {SENDER_ADD, SENDER_DELETE, SENDER_ALLOW, SENDER_DENY, SENDER_ON, SENDER_OF
  * vss_del_fec_client().
  */
 struct fec_client;
+struct sender_client;
 
 /** FEC parameters requested by FEC clients. */
 struct fec_client_parms {
@@ -29,6 +30,20 @@ struct fec_client_parms {
        uint8_t data_slices_per_group;
        /** Maximal number of bytes per slice, initially zero. */
        uint16_t max_slice_bytes;
+       /**
+        * Transport-layer initialisation for FEC support.
+        *
+        * This optional function serves (a) to make the transport layer
+        * ready to send FEC slices and (b) to determine the Maximum
+        * Packet Size (MPS) supported by the connection. The MPS value
+        * determines the largest payload size. This value is used to
+        * send FEC slices that are not larger than the path MTU, to avoid
+        * fragmentation and to maximize packet utilization. The user can
+        * alternatively specify a slice size of up to this value.
+        */
+       int (*init_fec)(struct sender_client *sc);
+       /** Push out FEC-encoded packets */
+       int (*send_fec)(struct sender_client *sc, char *buf, size_t len);
 };
 
 /**