Returns the final length of an extension header.
The inet6_opt_finish subroutine returns the final length of an extension header, taking into account the final padding of the extension header to make it a multiple of 8 bytes.
| Item | Description |
|---|---|
| extbuf | If NULL, inet6_opt_finish will only return the final length. If extbuf is not NULL, in addition to returning the length, the function initializes the option by inserting a Pad1 or PadN option of the proper length. |
| extlen | Size of the buffer pointed to by extbuf. |
| offset | The length returned by inet6_opt_init() or a previous inet6_opt_append(). |
| Item | Description |
|---|---|
| -1 | The necessary pad does not fit in the extension header buffer. |
| integer value | Final length of the extension header. |