| IP_MULTICAST_TTL(2const) | IP_MULTICAST_TTL(2const) |
NAME¶
IP_MULTICAST_TTL - time-to-live value of outgoing multicast packets
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_MULTICAST_TTL,
const int *ttl, sizeof(int));
int getsockopt(int sockfd, IPPROTO_IP, IP_MULTICAST_TTL,
int *ttl, sizeof(int));
DESCRIPTION¶
Set or read the time-to-live value of outgoing multicast packets for this socket.
The default is 1 which means that multicast packets don't leave the local network unless the user program explicitly requests it.
ERRORS¶
See IPPROTO_IP(2const). See setsockopt(2). See ip(7).
HISTORY¶
Linux 1.2.
CAVEATS¶
It is very important for multicast packets to set the smallest TTL possible.
SEE ALSO¶
IPPROTO_IP(2const), setsockopt(2), ip(7)
| 2025-11-25 | Linux man-pages (unreleased) |