NAME

  tst_recv_dstopt - Receive Destination Options when the IPV6_RECVDSTOPTS socket option is enabled


PURPOSE

  To check that if enable the IPV6_RECVDSTOPTS socket option, the
  application can receive destination options header.


SYNOPSIS

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


TEST PROCEDURE

  1. Create an IPv6 socket
  2. Enable socket to receive destination options
  3. Set Destination options header of socket
  4. Bind socket to address
  5. Send message to itself
  6. Receive message on socket
  7. Check A: Destination Option can be received


NOTE

  None


REFERENCE

  RFC 3542
  9.1.  Receiving Destination Options
    To receive Destination options header the application must enable the
    IPV6_RECVDSTOPTS socket option:
      int  on = 1;
      setsockopt(fd, IPPROTO_IPV6, IPV6_RECVDSTOPTS, &on, sizeof(on));
    Each Destination options header is returned as one ancillary data
    object described by a cmsghdr structure with cmsg_level set to
    IPPROTO_IPV6 and cmsg_type set to IPV6_DSTOPTS.
    These options are then processed by calling the inet6_opt_next(),
    inet6_opt_find(), and inet6_opt_get_value() functions.