Debian Codegraph @

upstream/debian-unstable/man2/IPV6_RTHDR.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_RTHDR 2const 2025-12-02 "Linux man-pages 6.18"
6 .SH NAME
7 IPV6_RTHDR,
8 IPV6_AUTHHDR,
9 IPV6_DSTOPTS,
10 IPV6_HOPOPTS,
11 IPV6_FLOWINFO,
12 IPV6_HOPLIMIT
13 \-
14 set the delivery of control messages
15 for incoming datagrams containing extension headers
16 .SH LIBRARY
17 Standard C library
18 .RI ( libc ,\~ \-lc )
19 .SH SYNOPSIS
20 .nf
21 .BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */"
22 .B #include <sys/socket.h>
23 .P
24 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_RTHDR,
25 .BI " const\~int\~*" enable ,\~sizeof(int));
26 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_AUTHHDR,
27 .BI " const\~int\~*" enable ,\~sizeof(int));
28 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_DSTOPTS,
29 .BI " const\~int\~*" enable ,\~sizeof(int));
30 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_HOPOPTS,
31 .BI " const\~int\~*" enable ,\~sizeof(int));
32 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_FLOWINFO,
33 .BI " const\~int\~*" enable ,\~sizeof(int));
34 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_HOPLIMIT,
35 .BI " const\~int\~*" enable ,\~sizeof(int));
36 .fi
37 .SH DESCRIPTION
38 Set delivery of control messages for incoming datagrams
39 containing extension headers from the received packet.
40 .TP
41 .B IPV6_RTHDR
42 delivers the routing header.
43 .TP
44 .B IPV6_AUTHHDR
45 delivers the authentication header.
46 .TP
47 .B IPV6_DSTOPTS
48 delivers the destination options.
49 .TP
50 .B IPV6_HOPOPTS
51 delivers the hop options.
52 .TP
53 .B IPV6_FLOWINFO
54 delivers an integer containing the flow ID.
55 .TP
56 .B IPV6_HOPLIMIT
57 delivers an integer containing the hop count of the packet.
58 .P
59 The control messages have the same type as the socket option.
60 .P
61 All these header options can also be set for outgoing packets
62 by putting the appropriate control message into the control buffer of
63 .BR sendmsg (2).
64 .P
65 Allowed only for
66 .B SOCK_DGRAM
67 or
68 .B SOCK_RAW
69 sockets.
70 .SH ERRORS
71 See
72 .BR IPPROTO_IPV6 (2const).
73 See
74 .BR setsockopt (2).
75 See
76 .BR ipv6 (7).
77 .SH SEE ALSO
78 .BR IPPROTO_IPV6 (2const),
79 .BR setsockopt (2),
80 .BR cmsg (3),
81 .BR ipv6 (7)