IP_TTL(2const) IP_TTL(2const) NAME IP_TTL - time to live LIBRARY Standard C library (libc, -lc) SYNOPSIS #include /* Definition of IP* constants */ #include 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) Linux man-pages 6.17 2025-11-25 IP_TTL(2const)