Returns the required number of bytes to hold a Routing header.
The inet6_rth_space subroutine returns the number of bytes required to hold a Routing header of the specified type containing the specified number of segments (addresses). For an IPv6 Type 0 Routing header, the number of segments must be between 0 and 127, inclusive. For an IPv6 Type 2 Routing Header, the number of segments must be 1. The return value is simply the space for the Routing header. When the application uses ancillary data, the application must pass the returned length to CMSG_SPACE() in order to determine how much memory is needed for the ancillary data object (including the cmsghdr structure).
Item | Description |
---|---|
type | Specifies the type of Routing header to be held. |
segments | Specifies the number of addresses within the Routing header. |
Item | Description |
---|---|
0 | Either the type of the Routing header is not supported by this implementation or the number of segments is invalid for this type of Routing header. |
length | Determines how much memory is needed for the ancillary data object. |