Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_rthdr_space.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_rthdr_space.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_rthdr_space.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_rthdr_space.html on line 8

inet6_rthdr_space()

Determine the space required by an IPv6 routing header

Synopsis:

#include <netinet/in.h>

size_t inet6_rthdr_space(int type, 
                         int segments);

Arguments:

type
The type of IPv6 Routing header (e.g. Type 0 as defined in <netinet/in.h>).
segments
The number of segments (addresses) in the Routing header.

Library:

libsocket

Use the -l socket option to qcc to link against this library.

Description:

This function returns the number of bytes required to hold a Routing header of the specified type containing a specified number of segments (addresses). For an IPv6 Type 0 Routing header, the number of segments must be between 1 and 23, inclusive. The return value includes the size of the cmsghdr structure that precedes the Routing header, and any required padding.


Note: This function returns the size but doesn't allocate the space required for the ancillary data. This allows an application to allocate a larger buffer, if other ancillary data objects are desired. All the ancillary data objects must be specified to sendmsg() as a single msg_control buffer in the msghdr structure msg_control member.

Returns:

0, for either of the two situations: the type of the routing header isn't supported by this implementation or the number of segments is invalid for this type of routing header.

Classification:

RFC 2292

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

inet6_rthdr_add() inet6_rthdr_getaddr(), inet6_rthdr_getflags(), inet6_rthdr_init(), inet6_rthdr_lasthop(), inet6_rthdr_reverse(), inet6_rthdr_segments(), inet6_rthdr_space()

Based on:


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_rthdr_space.html on line 155

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_rthdr_space.html on line 155