IP_MULTICAST_LOOP(2const) IP_MULTICAST_LOOP(2const)

IP_MULTICAST_LOOP - loop back sent multicast packets to local sockets

Standard C library (libc-lc)

#include <netinet/in.h>  /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_MULTICAST_LOOP,
               const int *enable, sizeof(int));
int getsockopt(int sockfd, IPPROTO_IP, IP_MULTICAST_LOOP,
               int *enabled, sizeof(int));

Set or read a boolean integer argument that determines whether sent multicast packets should be looped back to the local sockets.

See IPPROTO_IP(2const). See setsockopt(2). See ip(7).

Linux 1.2.

IPPROTO_IP(2const), setsockopt(2), ip(7)

2025-11-25 Linux man-pages 6.17