IPPROTO_IPV6(2const)

IPPROTO_IPV62const

Linux ipv6 protocol socket options

Usage

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

Library

Standard C library (libc, -lc)

Overview

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.

Errors

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

ENOPROTOOPT

opt is invalid.

History

IPPROTO_IPV6

POSIX.1-2001.

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