INET6RTHDRSPACE(3) BSD Library Functions Manual INET6RTHDRSPACE(3)
NAME
inet6rthdrspace, inet6rthdrinit, inet6rthdradd,
inet6rthdrlasthop, inet6rthdrreverse, inet6rthdrsegments,
inet6rthdrgetaddr, inet6rthdrgetflags -- IPv6 Routing Header Options
manipulation
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
##include <>
##include <>
sizet
inet6rthdrspace(int type, int segments);
struct cmsghdr *
inet6rthdrinit(void *bp, int type);
int
inet6rthdradd(struct cmsghdr *cmsg, const struct in6addr *addr,
unsigned int flags);
int
inet6rthdrlasthop(struct cmsghdr *cmsg, unsigned int flags);
int
inet6rthdrreverse(const struct cmsghdr *in, struct cmsghdr *out);
int
inet6rthdrsegments(const struct cmsghdr *cmsg);
struct in6addr *
inet6rthdrgetaddr(struct cmsghdr *cmsg, int index);
int
inet6rthdrgetflags(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:
inet6rthdrspace() return #bytes required for ancillary data
inet6rthdrinit() initialize ancillary data for Routing header
inet6rthdradd() add IPv6 address & flags to Routing header
inet6rthdrlasthop() specify the flags for the final hop
Four functions deal with a returned Routing header:
inet6rthdrreverse() reverse a Routing header
inet6rthdrsegments() return #segments in a Routing header
inet6rthdrgetaddr() fetch one address from a Routing header
inet6rthdrgetflags() fetch one flag from a Routing header
The function prototypes for these functions are all in the
header.
The full description of these functions is available in RFC2292.
DIAGNOSTICS
inet6rthdrspace() returns 0 on errors.
inet6rthdradd(), inet6rthdrlasthop() and inet6rthdrreverse() return
0 on success, and returns -1 on error.
inet6rthdrinit() and inet6rthdrgetaddr() return NUL on error.
inet6rthdrsegments() and inet6rthdrgetflags() return -1 on error.
EXAMPLES
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.
inet6rthdrreverse() is not implemented yet.
BSD December 10, 1999 BSD
|