Retrieves an address for an index from an IPv6 routing header. Format #include <in6.h> struct in6_addr *inet6_rth_getaddr ( const void *bp, int index );
1 – Arguments
bp Points to a buffer that contains an IPv6 routing header. index Specifies a value that identifies a position in a routing header for a specific address. Valid values range from 0 to the return value from inet6_rth_segments() minus 1.
2 – Description
This function uses a specified index value and retrieves a pointer to an address in a routing header specified by bp. Call inet6_rth_segments() before calling this function in order to determine the number of segments (addresses) in the routing header.
3 – Return Values
x Upon successful completion, the inet6_rth_ getaddr() function returns a pointer to an address. NULL pointer Failure