diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-03-17 14:55:46 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-03-19 10:29:21 +0100 |
commit | 4230103ff633904c69cc18d861bf42781f57bb64 (patch) | |
tree | 9b21ca4a648456863af30e21ea4c7b55ba3ddf77 /include | |
parent | c9747304271f63064687178938bf2a4060ef0180 (diff) | |
download | ouroboros-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 'include')
-rw-r--r-- | include/ouroboros/fccntl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ouroboros/fccntl.h b/include/ouroboros/fccntl.h index 8940e6ef..5c3fc064 100644 --- a/include/ouroboros/fccntl.h +++ b/include/ouroboros/fccntl.h @@ -38,6 +38,7 @@ #define FLOWFRNOBLOCK 00001000 /* Non-blocking read */ #define FLOWFWNOBLOCK 00002000 /* Non-blocking write */ #define FLOWFNONBLOCK (FLOWFRNOBLOCK | FLOWFWNOBLOCK) +#define FLOWFRNOPART 00004000 /* Disable partial reads */ #define FLOWFDEFAULT FLOWFRDWR |