IPPROTO_IPV6(2const)

NAME
IPPROTO_IPV6 - Linux IPv6 protocol socket options

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, int opt,
               const void val[size], size_t size);
int getsockopt(int sockfd, IPPROTO_IPV6, int opt,
               void val[size], size_t size);

DESCRIPTION
IPv6 supports some protocol-specific socket options that can be set with setsockopt(2) and read with getsockopt(2). The socket option level for IPv6 is IPPROTO_IPV6. A boolean integer flag is zero when it is false, otherwise true.

The following socket options are supported.

IPV6_ADDRFORM(2const)
IPV6_ADD_MEMBERSHIP(2const)
IPV6_DROP_MEMBERSHIP(2const)
IPV6_MTU(2const)
IPV6_MTU_DISCOVER(2const)
IPV6_MULTICAST_HOPS(2const)
IPV6_MULTICAST_IF(2const)
IPV6_MULTICAST_LOOP(2const)
IPV6_RECVPKTINFO(2const)
IPV6_RTHDR(2const)
IPV6_AUTHHDR(2const)
IPV6_DSTOPTS(2const)
IPV6_HOPOPTS(2const)
IPV6_FLOWINFO(2const)
IPV6_HOPLIMIT(2const)
IPV6_RECVERR(2const)
IPV6_ROUTER_ALERT(2const)
IPV6_UNICAST_HOPS(2const)
IPV6_V6ONLY(2const)

ERRORS
See setsockopt(2). See ipv6(7).

ENOPROTOOPT
    opt is invalid.

HISTORY

IPPROTO_IPV6
    POSIX.1-2001.

SEE ALSO
setsockopt(2), cmsg(3), ipv6(7)