NAME

  tst_recv_no_dstopt - Can not receive Destination Options when the IPV6_RECVDSTOPTS socket option is disabled


PURPOSE

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


SYNOPSIS

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


TEST PROCEDURE

  1. Create an IPv6 socket
  2. Disabled 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 not 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.