Debian Codegraph @

upstream/debian-unstable/man2/IP_TTL.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_TTL 2const 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 IP_TTL
8 \-
9 time to live
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,\~IP_TTL,
19 .BI " const\~int\~*" ttl ,\~sizeof(int));
20 .BI int\~getsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_TTL,
21 .BI " int\~*" ttl ,\~sizeof(int));
22 .fi
23 .SH DESCRIPTION
24 Set or retrieve the current time-to-live field that is used in every packet
25 sent from this socket.
26 .SH ERRORS
27 See
28 .BR IPPROTO_IP (2const).
29 See
30 .BR setsockopt (2).
31 See
32 .BR ip (7).
33 .SH HISTORY
34 Linux 1.0.
35 .SH SEE ALSO
36 .BR IPPROTO_IP (2const),
37 .BR setsockopt (2),
38 .BR ip (7)