inet6_rth_segments()--Return the Number of Segments in the IPv6 Routing Header
Syntax
#include <netinet/in.h> int inet6_rth_segments(const void *routing_buffer)
Service Program Name: QSOSRV1IP6
Default Public Authority: *USE
Threadsafe: Yes
The inet6_rth_segments() function returns the number of segments (addresses) in the routing extension header.
Parameters
- routing_buffer
- (Input) Pointer to a buffer that contains the routing extension header.
Authorities
No authorization is required.
Return Value
inet6_rth_segments() returns an integer. Possible values are:
- -1 (unsuccessful)
- n (successful), where n is the number of segments in the routing extension header
Error Conditions
When inet6_rth_segments() fails, errno can be set to one of the following:
| [EFAULT] | Bad address.
The system detected an address that was not valid while attempting to access the buffer pointed to by the routing_buffer parameter. |
Related Information
- inet6_rth_add()--Add an IPv6 Address to the IPv6 Routing Header
- inet6_rth_getaddr()--Retrieve an Address from the IPv6 Routing Header
- inet6_rth_init()--Initialize Buffer Data for the IPv6 Routing Header
- inet6_rth_reverse()--Reverse the Order of Addresses in the IPv6 Routing Header
- inet6_rth_space()--Return the Number of Bytes Required for the IPv6 Routing Header
API introduced: V6R1