Debian Codegraph @

upstream/debian-unstable/man2/IPV6_RECVPKTINFO.2const

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH IPV6_RECVPKTINFO 2const 2025-12-02 "Linux man-pages 6.18"
6 .SH NAME
7 IPV6_RECVPKTINFO
8 \-
9 set delivery of the IPV6_PKTINFO control message on incoming datagrams
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */"
16 .B #include <sys/socket.h>
17 .P
18 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_RECVPKTINFO,
19 .BI " const\~int\~*" enable ,\~sizeof(int));
20 .fi
21 .SH DESCRIPTION
22 Set delivery of the
23 .B IPV6_PKTINFO
24 control message on incoming datagrams.
25 Such control messages contain a
26 .IR "struct in6_pktinfo" ,
27 as per RFC 3542.
28 .P
29 Allowed only for
30 .B SOCK_DGRAM
31 or
32 .B SOCK_RAW
33 sockets.
34 .SH ERRORS
35 See
36 .BR IPPROTO_IPV6 (2const).
37 See
38 .BR setsockopt (2).
39 See
40 .BR ipv6 (7).
41 .SH HISTORY
42 Linux 2.6.14.
43 .SH SEE ALSO
44 .BR IPPROTO_IPV6 (2const),
45 .BR setsockopt (2),
46 .BR cmsg (3),
47 .BR ipv6 (7)