NAME
iinneett66rrtthhddrrssppaaccee, iinneett66rrtthhddrriinniitt, iinneett66rrtthhddrraadddd, iinneett66rrtthhddrrllaasstthhoopp, iinneett66rrtthhddrrrreevveerrssee, iinneett66rrtthhddrrsseeggmmeennttss,iinneett66rrtthhddrrggeettaaddddrr, iinneett66rrtthhddrrggeettffllaaggss - IPv6 Routing Header Options
manipulation LLIIBBRRAARRYYStandard C Library (libc, -lc)
SYNOPSIS
##iinncclluuddee <
> ##iinncclluuddee <
sizet iinneett66rrtthhddrrssppaaccee(int type, int segments); struct cmsghdr * iinneett66rrtthhddrriinniitt(void *bp, int type); int iinneett66rrtthhddrraadddd(struct cmsghdr *cmsg, const struct in6addr *addr, unsigned int flags); int iinneett66rrtthhddrrllaasstthhoopp(struct cmsghdr *cmsg, unsigned int flags); int iinneett66rrtthhddrrrreevveerrssee(const struct cmsghdr *in, struct cmsghdr *out); int iinneett66rrtthhddrrsseeggmmeennttss(const struct cmsghdr *cmsg); struct in6addr * iinneett66rrtthhddrrggeettaaddddrr(struct cmsghdr *cmsg, int index); int iinneett66rrtthhddrrggeettffllaaggss(const struct cmsghdr *cmsg, int index);> DESCRIPTION
RFC2292 IPv6 advanced API defines eight functions that the application calls to build and examine a Routing header. Four functions build a Routing header:iinneett66rrtthhddrrssppaaccee() return #bytes required for ancillary data
iinneett66rrtthhddrriinniitt() initialize ancillary data for Routing header iinneett66rrtthhddrraadddd() add IPv6 address & flags to Routing header iinneett66rrtthhddrrllaasstthhoopp() specify the flags for the final hop Four functions deal with a returned Routing header: iinneett66rrtthhddrrrreevveerrssee() reverse a Routing headeriinneett66rrtthhddrrsseeggmmeennttss() return #segments in a Routing header
iinneett66rrtthhddrrggeettaaddddrr() fetch one address from a Routing header iinneett66rrtthhddrrggeettffllaaggss() fetch one flag from a Routing header The function prototypes for these functions are all in theheader. The full description of these functions is available in RFC2292. DIAGNOSTICS iinneett66rrtthhddrrssppaaccee() returns 0 on errors. iinneett66rrtthhddrraadddd(), iinneett66rrtthhddrrllaasstthhoopp() and iinneett66rrtthhddrrrreevveerrssee() return 0 on success, and returns -1 on error.
iinneett66rrtthhddrriinniitt() and iinneett66rrtthhddrrggeettaaddddrr() return NULL on error.iinneett66rrtthhddrrsseeggmmeennttss() and iinneett66rrtthhddrrggeettffllaaggss() return -1 on error.
EEXXAAMMPPLLEESS RFC2292 gives comprehensive examples in chapter 8.SEE ALSO
W. Stevens and M. Thomas, Advanced Sockets API for IPv6, RFC2292, February 1998. S. Deering and R. Hinden, Internet Protocol, Version 6 (IPv6) Specification, RFC2460, December 1998. HISTORY The implementation first appeared in KAME advanced networking kit. STANDARDS The functions are documented in ``Advanced Sockets API for IPv6'' (RFC2292).BUGS
The text was shamelessly copied from RFC2292. iinneett66rrtthhddrrrreevveerrssee() is not implemented yet. BSD December 10, 1999 BSD