IPV6_RECVPKTINFO(2const)

IPV6_RECVPKTINFO2const

Set delivery of the ipv6_pktinfo control message on incoming datagrams

Usage

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

int setsockopt(int sockfd, IPPROTO_IPV6, IPV6_RECVPKTINFO, const int *enable, sizeof(int));

Library

Standard C library (libc, -lc)

Overview

Set delivery of the IPV6_PKTINFO control message on incoming datagrams. Such control messages contain a struct in6_pktinfo, as per RFC 3542.

Allowed only for SOCK_DGRAM or SOCK_RAW sockets.

Errors

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

History

Linux 2.6.14.

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