Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_find.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_find.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_find.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_find.html on line 8
Search for IPv6 hop-by-hop and destination options
#include <netinet/in.h>
int inet6_option_find(const struct cmsghdr *cmsg,
u_int8_t **tptrp,
int type);
- cmsg
- A pointer to the cmsghdr
structure that must have been initialized by inet6_option_init().
- type
- The type of option to search for. Either IPV6_HOPOPTS or IPV6_DSTOPTS.
This type is stored in the cmsg_type member of the
cmsghdr structure pointed to by *cmsgp.
- tptrp
- A pointer to a pointer to an
8-bit byte.
libsocket
Use the -l socket option to
qcc
to link against this library.
This inet6_option_find() function is similar to inet6_option_next(). It however,
lets the caller specify the option type to be searched for, instead of always
returning the next option in the ancillary data object.
The cmsg is a pointer to the cmsghdr
structure of which cmsg_level
equals IPPROTO_IPV6 and cmsg_type equals
either IPV6_HOPOPTS or IPV6_DSTOPTS.
The tptrp is a pointer to a pointer to an 8-bit byte that
the function uses to remember its place in the
ancillary data object each time the function is called.
The first time you call
this function for a given ancillary data object, you must set *tptrp
must be set to NULL. This function starts searching for an option of the
specified type beginning after the value of *tptrp pointer.
- 0 with *tptrp pointing to the 8-bit option
- The option was found.
- -1 with *tptrp pointing to NULL
- The option wasn't found.
- -1 with *tptrp pointing to non-NULL
- An error has occurred.
RFC 2292
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
inet6_option_alloc(),
inet6_option_append(),
inet6_option_init(),
inet6_option_next(),
inet6_option_space()
Based on:
- W. Stevens and M. Thomas, Advanced Sockets API for IPv6,
RFC 2292, February 1998. Contains examples.
- S. Deering and R. Hinden, Internet Protocol, Version 6
(IPv6) Specification, RFC 2460, December 1998.
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_find.html on line 183
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/inet6_option_find.html on line 183