INET6OPTIONSPACE(3) BSD Library Functions Manual INET6OPTIONSPACE(3)
NAME
inet6optionspace, inet6optioninit, inet6optionappend,
inet6optionalloc, inet6optionnext, inet6optionfind -- IPv6 Hop-by-
Hop and Destination Options manipulation
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
##include <>
##include <>
int
inet6optionspace(int nbytes);
int
inet6optioninit(void *bp, struct cmsghdr **cmsgp, int type);
int
inet6optionappend(struct cmsghdr *cmsg, const uint8t *typep,
int multx, int plusy);
uint8t *
inet6optionalloc(struct cmsghdr *cmsg, int datalen, int multx,
int plusy);
int
inet6optionnext(const struct cmsghdr *cmsg, uint8t **tptrp);
int
inet6optionfind(const struct cmsghdr *cmsg, uint8t **tptrp,
int type);
DESCRIPTION
Building and parsing the Hop-by-Hop and Destination options is compli-
cated due to alignment constranints, padding and ancillary data manipula-
tion. RFC2292 defines a set of functions to help the application. The
function prototypes for these functions are all in the
header.
The full description of these functions is available in RFC2292.
DIAGNOSTICS
inet6optioninit() and inet6optionappend() return 0 on success or -1
on an error.
inet6optionalloc() returns NUL on an error.
On errors, inet6optionnext() and inet6optionfind() return -1 setting
*tptrp to non NUL value.
EXAMPLES
RFC2292 gives comprehensive examples in chapter 6.
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
BSD December 10, 1999 BSD
|