summaryrefslogtreecommitdiff
path: root/doc/man
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-03-17 14:55:46 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-03-19 10:29:21 +0100
commit4230103ff633904c69cc18d861bf42781f57bb64 (patch)
tree9b21ca4a648456863af30e21ea4c7b55ba3ddf77 /doc/man
parentc9747304271f63064687178938bf2a4060ef0180 (diff)
downloadouroboros-4230103ff633904c69cc18d861bf42781f57bb64.tar.gz
ouroboros-4230103ff633904c69cc18d861bf42781f57bb64.zip
lib: Allow disabling partial read
This allows disabling partial reads. It adds a flag FLOWFRNOPART that disables partial reads. Partial read is different from partial delivery (FRCTFPARTIAL), which allows delivery of fragments of an incomplete packet and thus potentially corrupted data. FLOWFRNOPART will never deliver corrupted data (unless FRCTFPARTIAL is also set). If FLOWFRNOPART is set and the buffer provided to flow_read is too small for the SDU, that SDU will be discarded and -EMSGSIZE is returned; Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'doc/man')
-rw-r--r--doc/man/fccntl.32
-rw-r--r--doc/man/flow_read.35
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/man/fccntl.3 b/doc/man/fccntl.3
index 34e63e7d..bec506ec 100644
--- a/doc/man/fccntl.3
+++ b/doc/man/fccntl.3
@@ -58,6 +58,8 @@ argument. Supported flags are:
\fIFLOWFNONBLOCK\fR - set I/O to non-blocking read/write.
+\fIFLOWFRNOPART\fR - disable partial reading.
+
\fIFLOWFDEFAULT\fR - set flow defaults (blocking, read-write).
.RE
diff --git a/doc/man/flow_read.3 b/doc/man/flow_read.3
index 0110d0a2..20f5b976 100644
--- a/doc/man/flow_read.3
+++ b/doc/man/flow_read.3
@@ -33,15 +33,14 @@ On success, \fBflow_read\fR() returns the number of bytes read. On
failure, a negative value indicating the error will be returned. If
the number of bytes read equals count, a subsequent call to
\fBflow_read\fR() should be performed to check if there were more
-bytes to read. This call to \fBflow_read\fR will return 0 if there
-was no more data and mark the end of the datagram.
+bytes to read. This call to \fBflow_read\fR will return 0 if there was
+no more data and mark the end of the datagram.
On success, \fBflow_write\fR() returns 0. On failure, a negative value
indicating the error will be returned. Passing a NULL pointer for
\fIbuf\fR returns 0 with no other effects.
.SH ERRORS
-
.B -EINVAL
An invalid argument was passed.