.\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .TH IPV6_ROUTER_ALERT 2const 2025-12-02 "Linux man-pages 6.17" .SH NAME IPV6_ROUTER_ALERT \- pass forwarded packets containing a router alert hop-by-hop to this socket .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_ROUTER_ALERT, .BI " const\~int\~*" val ,\~sizeof(int)); .fi .SH DESCRIPTION Pass forwarded packets containing a router alert hop-by-hop option to this socket. .P Allowed only for .B SOCK_RAW sockets. .P The tapped packets are not forwarded by the kernel, it is the user's responsibility to send them out again. .P A positive integer indicates a router alert option value to intercept. Packets carrying a router alert option with a value field containing this integer will be delivered to the socket. A negative integer disables delivery of packets with router alert options to this socket. .SH ERRORS See .BR IPPROTO_IPV6 (2const). See .BR setsockopt (2). See .BR ipv6 (7). .SH SEE ALSO .BR IPPROTO_IPV6 (2const), .BR setsockopt (2), .BR cmsg (3), .BR ipv6 (7)