Debian Codegraph @

upstream/debian-unstable/man2/IP_RECVTTL.2const

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH IP_RECVTTL 2const 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 IP_RECVTTL
8 \-
9 enable IP_TTL control message
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */"
16 .B #include <sys/socket.h>
17 .P
18 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IP,\~int\~ opt ,
19 .BI " const\~int\~*" enable ,\~sizeof(int));
20 .fi
21 .SH DESCRIPTION
22 When this flag is set,
23 pass a
24 .BR IP_TTL (2const)
25 control message
26 with the time-to-live field
27 of the received packet as a 32 bit integer.
28 .P
29 Not supported for
30 .B SOCK_STREAM
31 sockets.
32 .SH ERRORS
33 See
34 .BR IPPROTO_IP (2const).
35 See
36 .BR setsockopt (2).
37 See
38 .BR ip (7).
39 .SH VERSIONS
40 Some BSD sockets implementations also provide an
41 .B IP_RECVTTL
42 option, but an ancillary message with type
43 .B IP_RECVTTL
44 is passed with the incoming packet.
45 This is different from the
46 .BR IP_TTL (2const)
47 option used in Linux.
48 .SH HISTORY
49 Linux 2.2.
50 .\" Precisely: since Linux 2.1.68
51 .SH SEE ALSO
52 .BR IPPROTO_IP (2const),
53 .BR setsockopt (2),
54 .BR ip (7)