NAME

  tst_inet6_rth_reverse - Take a Routing header extension header and writes a new Routing header


PURPOSE

  To check that inet6_rth_reverse() can be used to take a Routing header
  extension header and writes a new Routing header.


SYNOPSIS

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


TEST PROCEDURE

  1. Initializes the buffer with segments set to zero
  2. Add the IPv6 address the end of the Routing header
  3. Add the IPv6 address the end of the Routing header
  4. Reverse order of the addresses
  5. Check A: the addresses is reversed, the segleft member is set correctly


NOTE

  None


REFERENCE

  RFC 3542
  7.4.  inet6_rth_reverse
      int inet6_rth_reverse(const void *in, void *out);
    This function 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).
    The return value of the function is 0 on success, or -1 upon an
    error.