IPV6_ADD_MEMBERSHIP(2const)

IPV6_ADD_MEMBERSHIP2const

Join or leave a multicast group

Usage

#include <netinet/in.h>  /* Definition of IP* constants */
#include <sys/socket.h>

int setsockopt(int sockfd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, const struct ipv6_mreq *val, sizeof(struct ipv6_mreq)); int setsockopt(int sockfd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, const struct ipv6_mreq *val, sizeof(struct ipv6_mreq));

Library

Standard C library (libc, -lc)

Overview

Join or leave a multicast group.

See IP_ADD_MULTICAST(2const) and IP_DROP_MULTICAST(2const).

Errors

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

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.