IP_TTL2const
Time to live
Usage
#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));
Library
Standard C library (libc, -lc)
Overview
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).