inet6_rth_getaddr Subroutine

Purpose

Returns a pointer to a specific IPv6 address in a Routing header.

Syntax

struct in6_addr *inet6_rth_getaddr(const void *bp, int index);

Description

The inet6_rth_getaddr subroutine returns a pointer to the IPv6 address specified by index in the Routing header described by bp. An application should first call inet6_rth_segments() to obtain the number of segments in the Routing header.

Parameters

Item Description
bp Points to the Routing header.
index Specifies the index of the IPv6 address that must be returned. The value of index must be between 0 and one less than the value returned by inet6_rth_segments().

Return Values

Item Description
NULL The inet6_rth_getaddr subroutine failed.
Valid pointer Pointer to the address indexed by index.