inet6_opt_init Subroutine

Purpose

Returns the number of bytes needed for an empty extension header.

Syntax

int inet6_opt_init(void *extbuf, socklen_t extlen);

Description

The inet6_opt_init subroutine returns the number of bytes needed for the empty extension header (that is, a header without any options).

Parameters

Item Description
extbuf Specifies NULL for an empty header. If extbuf is not NULL, it initializes the extension header to have the correct length field.
extlen Specifies the size of the extension header. The value of extlen must be a positive value that is a multiple of 8.

Return Values

Item Description
-1 The value of extlen is not a positive (non-zero) multiple of 8.
integer value Number of bytes needed for an empty extension header.