---
name: "IP_MULTICAST_LOOP"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/IP_MULTICAST_LOOP"
---

# IP\_MULTICAST\_LOOP(2const)

loop back sent multicast packets to local sockets

## NAME

IP\_MULTICAST\_LOOP - loop back sent multicast packets to local sockets

## 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\_LOOP,**                **const int \****enable***, sizeof(int));** **int getsockopt(int** *sockfd***, IPPROTO\_IP, IP\_MULTICAST\_LOOP,**                **int \****enabled***, sizeof(int));**

## DESCRIPTION

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

## ERRORS

See [**IPPROTO\_IP**(2const)](/IPPROTO_IP/2const.md). See [**setsockopt**(2)](/setsockopt/2.md). See [**ip**(7)](/ip/7.md).

## HISTORY

Linux 1.2.

## SEE ALSO

[**IPPROTO\_IP**(2const)](/IPPROTO_IP/2const.md), [**setsockopt**(2)](/setsockopt/2.md), [**ip**(7)](/ip/7.md)
