Debian Codegraph @

upstream/debian-unstable/man2/IPV6_MULTICAST_IF.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_MULTICAST_IF 2const 2026-01-05 "Linux man-pages 6.18"
6 .SH NAME
7 IPV6_MULTICAST_IF
8 \-
9 local device for a multicast socket
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_MULTICAST_IF,
19 .BI " const\~int\~*" ifindex ,\~sizeof(int));
20 .BI int\~getsockopt(int\~ sockfd ,\~IPPROTO_IPV6,\~IPV6_MULTICAST_IF,
21 .BI " int\~*" ifindex ,\~sizeof(int));
22 .fi
23 .SH DESCRIPTION
24 Set the device for outgoing multicast packets on the socket.
25 .P
26 This is allowed only for
27 .B SOCK_DGRAM
28 and
29 .B SOCK_RAW
30 socket.
31 .P
32 The argument is a pointer to an interface index
33 (see
34 .BR netdevice (7))
35 in an integer.
36 .SH ERRORS
37 See
38 .BR IPPROTO_IPV6 (2const).
39 See
40 .BR setsockopt (2).
41 See
42 .BR ipv6 (7).
43 .SH HISTORY
44 .TP
45 .B IPV6_MULTICAST_IF
46 POSIX.1-2001.
47 .SH SEE ALSO
48 .BR IPPROTO_IPV6 (2const),
49 .BR setsockopt (2),
50 .BR ipv6 (7)