NAME

  tst_send_hhopt_data - Send Hop-by-Hop options header by specifies it as ancillary data in a call to sendmsg()


PURPOSE

  To check that send a Hop-by-Hop options header, the application 
  can specifies the header as ancillary data in a call to sendmsg().


SYNOPSIS

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


TEST PROCEDURE

  1. Create an IPv6/UDP socket
  2. Enable socket to receive hop by hop options
  3. Bind socket to address
  4. Send message with the hop by hop option specifying as ancillary data
  5. Receive message on socket
  6. Check A: the hop by hop option is received
  7. Check B: the length and value of hop by hop option is correct


NOTE

  None


REFERENCE

  RFC 3542
  8.2.  Sending Hop-by-Hop Options
    To send a Hop-by-Hop options header, the application specifies the
    header either as ancillary data in a call to sendmsg() or using
    setsockopt().
    The application can remove any sticky Hop-by-Hop options header by
    calling setsockopt() for IPV6_HOPOPTS with a zero option length.
    All the Hop-by-Hop options must be specified by a single ancillary
    data object.  The cmsg_level member is set to IPPROTO_IPV6 and the
    cmsg_type member is set to IPV6_HOPOPTS.  The option is normally
    constructed using the inet6_opt_init(), inet6_opt_append(),
    inet6_opt_finish(), and inet6_opt_set_val() functions, described in
    Section 10.
    Additional errors may be possible from sendmsg() and setsockopt() if
    the specified option is in error.