Adds an IPv6 address to the routing header under construction. Format #include <in6.h> int inet6_rth_add ( void *bp, const struct in6_addr *addr );
1 – Arguments
bp Points to a buffer that is to contain an IPv6 routing header. addr Points to an IPv6 address to add to the routing header.
2 – Description
This function adds an IPv6 address to the end of the routing header under construction. The address pointed to by addr cannot be an IPv6 V4-mapped address or an IPv6 multicast address. The function increments the ip6r0_segleft member in the ip6_ rthdr0 structure. The ip6_rthdr0 structure is defined in the IP6.H header file. Only routing header type 0 is supported.
3 – Return Values
x Upon successful completion, the inet6_rth_ add() function returns 0 (zero). -1 Failure