VMS Help  —  TCPIP Services, Programming Interfaces, Socket API Functions, inet6_opt_finish()
    Returns the total length of an IPv6 extension header, including
    padding, and initializes the option.
    Format
      #include  <in6.h>
      int inet6_opt_finish  ( void *extbuf, size_t extlen, int offset
                            );

1  –  Arguments

 extbuf
    Points to a buffer that contains an extension header. This is
    either a valid pointer or a NULL pointer.
 extlen
    Specifies the length of the extension header to finish
    initializing. A valid value is any number greater than or equal
    to 0.
 offset
    Specifies the length of the existing extension header. Obtain
    this value from a prior call to inet6_opt_init() or inet6_opt_
    append().

2  –  Description

    This function, when called with extbuf as a NULL pointer and
    extlen as 0, returns the total number of bytes in an extension
    header, including final padding.
    If you specify extbuf as a valid pointer and a valid extlen
    argument, the function returns the same information as in the
    previous case, increments the buffer pointer, and verifies that
    the buffer is large enough to hold the header.

3  –  Return Values

    x                  Upon successful completion, the inet6_opt_
                       finish() function returns the total number
                       of bytes in an extension header, including
                       padding.
    -1                 Failure
Close Help