.\" Ouroboros man pages CC-BY 2017 - 2018 .\" Dimitri Staessens <dimitri.staessens@ugent.be> .\" Sander Vrijders <sander.vrijders@ugent.be> .TH FCCNTL 3 2018-02-28 Ouroboros "Ouroboros Programmer's Manual" .SH NAME fccntl \- control commands for flows and FRCT connections .SH SYNOPSIS .B #include <ouroboros/fccntl.h> \fBint fccntl(int \fIfd\fB, int \fIcmd\fB, ...); Compile and link with \fI-louroboros-dev\fR. .SH DESCRIPTION \fBfccntl\fR() is used to control the configuration of flows and connections. Supported commands are: \fBFLOWSSNDTIMEO\fR - set the sender timeout. Takes a \fBstruct timespec * \fItimeo\fR as third argument. Passing NULL for \fItimeo\fR disables the timeout. \fBFLOWGSNDTIMEO\fR - retrieve the current sender timeout. Takes a \fBstruct timespec * \fItimeo\fR as third argument. \fBFLOWSRCVTIMEO\fR - set the receiver timeout. Takes a \fBstruct timespec * \fItimeo\fR as third argument. Passing NULL for \fItimeo\fR disables the timeout. \fBFLOWGRCVTIMEO\fR - retrieve the current receiver timeout. Takes a \fBstruct timespec * \fItimeo\fR as third argument. \fBFLOWGQOSSPEC\fR - retrieve the current QoS specification of the flow. Takes a \fBqosspec_t * \fIqs\fR as third argument. \fBFLOWSFLAGS\fR - set flow flags. Takes flow flags as third argument. Supported flags are: .RS 8 \fIFLOWFRDONLY\fR - set flow to read-only. \fIFLOWFWRONLY\fR - set flow_to write-only. \fIFLOWFRDWR\fR - set flow to read-write. \fIFLOWFDOWN\fR - mark flow as down. \fIFLOWFRNOBLOCK\fR - set read to non-blocking. \fIFLOWFWNOBLOCK\fR - set write to non-blocking. \fIFLOWFNONBLOCK\fR - set I/O to non-blocking read/write. \fIFLOWFRNOPART\fR - disable partial reading. \fIFLOWFDEFAULT\fR - set flow defaults (blocking, read-write). .RE \fBFLOWGFLAGS\fR - get the current flow flags. Takes an \fBuint32_t \fIflags\fR as third argument. \fBFLOWGRXQLEN\fR - get the current number of packets in the receive buffer. Takes a \fBsize_t \fIqlen\fR as third argument. \fBFLOWGTXQLEN\fR - get the current number of packets in the transmit buffer. Takes a \fBsize_t \fIqlen\fR as third argument. \fBFRCTSFLAGS\fR - set FRCT flags. Takes FRCT flags as third argument. Supported flags are: .RS 8 \fIFRCTFRESCNTRL\fR - enable resource control. \fIFRCTFRTX\fR - enable retransmission. \fIFRCTFERRCHCK\fR - enable checksum (CRC32). \fIFRCTFORDERING\fR - enable packet in-order delivery. \fIFRCTFPARTIAL\fR - enable partial delivery. .RE \fBFRCTGFLAGS\fR - get the current flow flags. Takes an \fBuint16_t \fIflags\fR as third argument. .SH RETURN VALUE On success, \fBfccntl\fR() returns 0. .SH ERRORS \fBfccntl\fR() can return .B -EINVAL An invalid argument was passed. .B -EPERM Operation not permitted. This is returned when requesting the value of a timeout (FLOWGSNDTIMEO or FLOWGRCVTIMEO) when no such timeout was set. .B -EBADF Invalid flow descriptor passed. .B -ENOTALLOC Flow is not allocated. .B -ENOTSUP The specified command is not supported. .SH ATTRIBUTES For an explanation of the terms used in this section, see \fBattributes\fR(7). .TS box, tab(&); LB|LB|LB L|L|L. Interface & Attribute & Value _ \fBfccntl\fR() & Thread safety & MT-Safe .TE .SH TERMINOLOGY Please see \fBouroboros-glossary\fR(7). .SH SEE ALSO .BR flow_alloc "(3), " flow_read "(3), " fqueue "(3), " fset "(3), " \ ouroboros (8) .SH COLOPHON This page is part of the Ouroboros project, found at http://ouroboros.ilabt.imec.be These man pages are licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/