Scroll to navigation

IPV6_ADD_MEMBERSHIP(2const) IPV6_ADD_MEMBERSHIP(2const)

NAME

IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP - join or leave a multicast group

LIBRARY

Standard C library (libc-lc)

SYNOPSIS

#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));

DESCRIPTION

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).

SEE ALSO

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

2025-12-02 Linux man-pages (unreleased)