VMS Help  —  TCPIP Services, Programming Interfaces, Socket API Functions, inet6_opt_get_val()
    Extracts data items from the data portion of an IPv6 option.
    Format
      #include  <in6.h>
      int inet6_opt_get_val  ( void *databuf, size_t offset, void
                             *val, int vallen );

1  –  Arguments

 databuf
    Points to a buffer that contains an extension header. This is
    a pointer returned by a call to inet6_opt_find() or inet6_opt_
    next().
 offset
    Specifies the location in the data portion of the option from
    which to extract the data. You can access the first byte after
    the option type and length by specifying the offset of 0.
 val
    Points to a destination for the extracted data.
 vallen
    Specifies the length of the data, in bytes, to be extracted.

2  –  Description

    This function copies data items from data buffer databuf
    beginning at offset to the location val. In addition, it returns
    the offset for the next data field to assist you in extracting
    option content that has multiple fields.
    Make sure that each field is aligned on its natural boundaries.

3  –  Return Values

    x                  Upon successful completion, the inet6_opt_get_
                       val() function returns the offset for the next
                       field in the data buffer.
    -1                 Failure
Close Help