FCCNTL(3)

NAME
fccntl - control commands for flows and FRCT connections

SYNOPSIS
#include <ouroboros/fccntl.h> int fccntl(int fd, int cmd, ...); Compile and link with -louroboros-dev.

DESCRIPTION
fccntl() is used to control the configuration of flows and connections. Supported commands are: FLOWSSNDTIMEO - set the sender timeout. Takes a struct timespec * timeo as third argument. Passing NULL for timeo disables the timeout. FLOWGSNDTIMEO - retrieve the current sender timeout. Takes a struct timespec * timeo as third argument. FLOWSRCVTIMEO - set the receiver timeout. Takes a struct timespec * timeo as third argument. Passing NULL for timeo disables the timeout. FLOWGRCVTIMEO - retrieve the current receiver timeout. Takes a struct timespec * timeo as third argument. FLOWGQOSSPEC - retrieve the current QoS specification of the flow. Takes a qosspec_t * qs as third argument. FLOWSFLAGS - set flow flags. Takes flow flags as third argument. Supported flags are:
    FLOWFRDONLY - set flow to read-only. FLOWFWRONLY - set flow_to write-only. FLOWFRDWR - set flow to read-write. FLOWFDOWN - mark flow as down. FLOWFRNOBLOCK - set read to non-blocking. FLOWFWNOBLOCK - set write to non-blocking. FLOWFNONBLOCK - set I/O to non-blocking read/write. FLOWFRNOPART - disable partial reading. FLOWFDEFAULT - set flow defaults (blocking, read-write).
FLOWGFLAGS - get the current flow flags. Takes an uint32_t flags as third argument. FLOWGRXQLEN - get the current number of packets in the receive buffer. Takes a size_t qlen as third argument. FLOWGTXQLEN - get the current number of packets in the transmit buffer. Takes a size_t qlen as third argument. FRCTSFLAGS - set FRCT flags. Takes FRCT flags as third argument. Supported flags are:
    FRCTFRESCNTRL - enable resource control. FRCTFRTX - enable retransmission. FRCTFERRCHCK - enable checksum (CRC32). FRCTFPARTIAL - enable partial delivery.
FRCTGFLAGS - get the current flow flags. Takes an uint16_t flags as third argument.

RETURN VALUE
On success, fccntl() returns 0.

ERRORS
fccntl() can return -EINVAL An invalid argument was passed. -EPERM Operation not permitted. This is returned when requesting the value of a timeout (FLOWGSNDTIMEO or FLOWGRCVTIMEO) when no such timeout was set. -EBADF Invalid flow descriptor passed. -ENOTALLOC Flow is not allocated. -ENOTSUP The specified command is not supported.

ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value
fccntl() | Thread safety | MT-Safe

TERMINOLOGY
Please see ouroboros-glossary(7).

SEE ALSO
flow_alloc(3), flow_read(3), fqueue(3), fset(3), ouroboros(8)

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/