| IP_TTL(2const) | IP_TTL(2const) |
NAME¶
IP_TTL - time to live
LIBRARY¶
Standard C library (libc, -lc)
SYNOPSIS¶
#include <netinet/in.h> /* Definition of IP* constants */ #include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_TTL,
const int *ttl, sizeof(int));
int getsockopt(int sockfd, IPPROTO_IP, IP_TTL,
int *ttl, sizeof(int));
DESCRIPTION¶
Set or retrieve the current time-to-live field that is used in every packet sent from this socket.
ERRORS¶
See IPPROTO_IP(2const). See setsockopt(2). See ip(7).
HISTORY¶
Linux 1.0.
SEE ALSO¶
IPPROTO_IP(2const), setsockopt(2), ip(7)
| 2025-11-25 | Linux man-pages (unreleased) |