IPV6_UNICAST_HOPS(2const) IPV6_UNICAST_HOPS(2const)

IPV6_UNICAST_HOPS - unicast hop limit

Standard C library (libc-lc)

#include <netinet/in.h>  /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
               const int *hops, sizeof(int));

Set the unicast hop limit for the socket.

A value of -1 means use the route default; otherwise it should be in the range [0, 255].

See IPPROTO_IPV6(2const). See setsockopt(2). See ipv6(7).

POSIX.1-2001.

IPPROTO_IPV6(2const), setsockopt(2), ipv6(7)

2026-01-05 Linux man-pages 6.17