NAME

  tst_inet6_rth_getaddr - Return a pointer to the IPv6 address specified by index in the Routing header


PURPOSE

  To check that inet6_rth_getaddr() can used to return a pointer to the
  IPv6 address specified by index in the Routing header.


SYNOPSIS

  ./tst_inet6_rth_getaddr [-tooloption ...]
    -tooloption : v6api tool option


TEST PROCEDURE

  1. Initializes the buffer with segments set to 1
  2. Add the IPv6 address the end of the Routing header
  3. Get an IPv6 address from the Routing header
  4. Check A: The IPv6 address is correct


NOTE

  None


REFERENCE

  RFC 3542
  7.6.  inet6_rth_getaddr
      struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
    This function returns a pointer to the IPv6 address specified by
    index (which must have a value between 0 and one less than the value
    returned by inet6_rth_segments()) 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.
    Upon an error the return value of the function is NULL.