inet6_rth_reverse Subroutine

Purpose

Writes a new Routing header that sends datagrams along the reverse route of a Routing header extension header.

Syntax

int inet6_rth_reverse(const void *in, void *out);

Description

The inet6_rth_reverse subroutine takes a Routing header extension header (pointed to by the first argument) and writes a new Routing header that sends datagrams along the reverse of that route. The function reverses the order of the addresses and sets the segleft member in the new Routing header to the number of segments. Both arguments are allowed to point to the same buffer (that is, the reversal can occur in place).

Parameters

Item Description
in Points to the original Routing header extension header.
out Points to the new Routing header route that reverses the route of in.

Return Values

Item Description
0 The reverse Routing header was successfully created.
–1 The reverse Routing header could not be created.