---
name: "IPV6_ROUTER_ALERT"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/IPV6_ROUTER_ALERT"
---

# IPV6\_ROUTER\_ALERT(2const)

pass forwarded packets containing a router alert hop-by-hop to this socket

## NAME

IPV6\_ROUTER\_ALERT - pass forwarded packets containing a router alert hop-by-hop to this socket

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <netinet/in.h>  /* Definition of IP* constants */
#include <sys/socket.h>
```

**int setsockopt(int** *sockfd***, IPPROTO\_IPV6, IPV6\_ROUTER\_ALERT,**                **const int \****val***, sizeof(int));**

## DESCRIPTION

Pass forwarded packets containing a router alert hop-by-hop option to this socket.

Allowed only for **SOCK\_RAW** sockets.

The tapped packets are not forwarded by the kernel, it is the user's responsibility to send them out again.

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.

## ERRORS

See [**IPPROTO\_IPV6**(2const)](/IPPROTO_IPV6/2const.md). See [**setsockopt**(2)](/setsockopt/2.md). See [**ipv6**(7)](/ipv6/7.md).

## SEE ALSO

[**IPPROTO\_IPV6**(2const)](/IPPROTO_IPV6/2const.md), [**setsockopt**(2)](/setsockopt/2.md), [**cmsg**(3)](/cmsg/3.md), [**ipv6**(7)](/ipv6/7.md)
