diff options
| author | Alejandro Colomar <alx@kernel.org> | 2025-11-25 00:32:05 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-11-25 01:10:35 +0100 |
| commit | 582fce4c02b32ecfc75351c3494cbf4f307f5b6b (patch) | |
| tree | 65621bce4517dfb0392efbeeb2bb68ac26a88c49 /man/man2const/IP_TOS.2const | |
| parent | e11a82a6f7098b94bcd00fb767a1db269e3a83db (diff) | |
| parent | 869bbbf4705313f690e85ad09b9b300b9f846165 (diff) | |
| download | man-pages-master.tar.gz | |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man2const/IP_TOS.2const')
| -rw-r--r-- | man/man2const/IP_TOS.2const | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/man/man2const/IP_TOS.2const b/man/man2const/IP_TOS.2const new file mode 100644 index 0000000000..b5def16716 --- /dev/null +++ b/man/man2const/IP_TOS.2const @@ -0,0 +1,70 @@ +.\" Copyright, the authors of the Linux man-pages project +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH IP_TOS 2const (date) "Linux man-pages (unreleased)" +.SH NAME +IP_TOS +\- +type of service +.SH LIBRARY +Standard C library +.RI ( libc ,\~ \-lc ) +.SH SYNOPSIS +.nf +.BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */" +.B #include <sys/socket.h> +.P +.BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_TOS, +.BI " const\~int\~*" tos ,\~sizeof(int)); +.BI int\~getsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_TOS, +.BI " int\~*" tos ,\~sizeof(int)); +.fi +.SH DESCRIPTION +Set or receive the Type-Of-Service (TOS) field that is sent +with every IP packet originating from this socket. +It is used to prioritize packets on the network. +.P +There are some standard TOS flags defined: +.TP +.B IPTOS_LOWDELAY +to minimize delays for interactive traffic, +.TP +.B IPTOS_THROUGHPUT +to optimize throughput, +.TP +.B IPTOS_RELIABILITY +to optimize for reliability, +.TP +.B IPTOS_MINCOST +should be used for "filler data" where slow transmission doesn't matter. +.P +At most one of these TOS values can be specified. +Other bits are invalid and shall be cleared. +.P +Linux sends +.B IPTOS_LOWDELAY +datagrams first by default, +but the exact behavior depends on the configured queueing discipline. +.\" FIXME elaborate on this +.P +Some high-priority levels may require superuser privileges (the +.B CAP_NET_ADMIN +capability). +.\" The priority can also be set in a protocol-independent way by the +.\" .RB ( SOL_SOCKET ", " SO_PRIORITY ) +.\" socket option (see +.\" .BR socket (7)). +.SH ERRORS +See +.BR IPPROTO_IP (2const). +See +.BR setsockopt (2). +See +.BR ip (7). +.SH HISTORY +Linux 1.0. +.SH SEE ALSO +.BR IPPROTO_IP (2const), +.BR setsockopt (2), +.BR ip (7) |
