]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2const/{IPPROTO_IP,IP_TOS}.2const: Split IP_TOS from IPPROTO_IP(2const)
authorAlejandro Colomar <alx@kernel.org>
Mon, 24 Nov 2025 21:01:40 +0000 (22:01 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 25 Nov 2025 00:10:29 +0000 (01:10 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2const/IPPROTO_IP.2const
man/man2const/IP_TOS.2const [new file with mode: 0644]

index e80d8606ace5ec7fdcc6d6caf5398305c932f5f4..5f38e47d6d064e4890fadd78ce8f9c99ddb559f9 100644 (file)
@@ -120,35 +120,8 @@ fail with the error
 .BR IP_RETOPTS (2const)
 .TQ
 .BR IP_ROUTER_ALERT (2const)
-.TP
-.BR IP_TOS " (since Linux 1.0)"
-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.
-TOS is a byte.
-There are some standard TOS flags defined:
-.B IPTOS_LOWDELAY
-to minimize delays for interactive traffic,
-.B IPTOS_THROUGHPUT
-to optimize throughput,
-.B IPTOS_RELIABILITY
-to optimize for reliability,
-.B IPTOS_MINCOST
-should be used for "filler data" where slow transmission doesn't matter.
-At most one of these TOS values can be specified.
-Other bits are invalid and shall be cleared.
-Linux sends
-.B IPTOS_LOWDELAY
-datagrams first by default,
-but the exact behavior depends on the configured queueing discipline.
-.\" FIXME elaborate on this
-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)).
+.TQ
+.BR IP_TOS (2const)
 .TP
 .BR IP_TRANSPARENT " (since Linux 2.6.24)"
 .\" commit f5715aea4564f233767ea1d944b2637a5fd7cd2e
diff --git a/man/man2const/IP_TOS.2const b/man/man2const/IP_TOS.2const
new file mode 100644 (file)
index 0000000..e291feb
--- /dev/null
@@ -0,0 +1,63 @@
+.\" 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
+.TP
+.BR IP_TOS " (since Linux 1.0)"
+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.
+TOS is a byte.
+There are some standard TOS flags defined:
+.B IPTOS_LOWDELAY
+to minimize delays for interactive traffic,
+.B IPTOS_THROUGHPUT
+to optimize throughput,
+.B IPTOS_RELIABILITY
+to optimize for reliability,
+.B IPTOS_MINCOST
+should be used for "filler data" where slow transmission doesn't matter.
+At most one of these TOS values can be specified.
+Other bits are invalid and shall be cleared.
+Linux sends
+.B IPTOS_LOWDELAY
+datagrams first by default,
+but the exact behavior depends on the configured queueing discipline.
+.\" FIXME elaborate on this
+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 SEE ALSO
+.BR IPPROTO_IP (2const),
+.BR setsockopt (2),
+.BR ip (7)