.\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .TH IPV6_RECVPKTINFO 2const 2025-12-02 "Linux man-pages 6.17" .SH NAME IPV6_RECVPKTINFO \- set delivery of the IPV6_PKTINFO control message on incoming datagrams .SH LIBRARY Standard C library .RI ( libc ,\~ \-lc ) .SH SYNOPSIS .nf .BR "#include " " /* Definition of " IP* " constants */" .B #include .P .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_RECVPKTINFO, .BI " const\~int\~*" enable ,\~sizeof(int)); .fi .SH DESCRIPTION Set delivery of the .B IPV6_PKTINFO control message on incoming datagrams. Such control messages contain a .IR "struct in6_pktinfo" , as per RFC 3542. .P Allowed only for .B SOCK_DGRAM or .B SOCK_RAW sockets. .SH ERRORS See .BR IPPROTO_IPV6 (2const). See .BR setsockopt (2). See .BR ipv6 (7). .SH HISTORY Linux 2.6.14. .SH SEE ALSO .BR IPPROTO_IPV6 (2const), .BR setsockopt (2), .BR cmsg (3), .BR ipv6 (7)