inet6_rth_reverse(3) — Subroutines
NAME
inet6_rth_reverse − Reverse the order of addresses in an IPv6 Routing header
SYNOPSIS
#include <netinet/ip6.h>
int inet6_rth_reverse(
const void ∗in,
void ∗out );
LIBRARY
Standard C Library (libc)
PARAMETERS
inPoints to a buffer that contains an IPv6 Routing header.
outPoints to a buffer that is to contain the Routing header with the reversed addresses. This parameter can point to the same buffer specified by in.
DESCRIPTION
The inet6_rth_reverse() function reads an IPv6 Routing header and writes a new Routing header, reversing the order of addresses in the new header. The in and out parameters can point to the same buffer.
The function sets the ip60r_segleft member in the ip6_rthdr0 structure to the number of segments (addresses) in the new header. The ip6_rthdr0 structure is defined in netinet/ip6.h.
RETURN VALUES
Upon successful completion, the inet6_rth_reverse() function returns 0 (zero). Upon failure, it returns a -1.
SEE ALSO
Functions: inet6_rth_add(3), inet6_rth_getaddr(3), inet6_rth_init(3), inet6_rth_segments(3), inet6_rth_space(3).
Network Programmer’s Guide