inet6_opt_find(3)inet6_opt_find(3)NAMEinet6_opt_find - Find a specific option in an extension header
SYNOPSIS
#include <netinet/ip6.h>
int inet6_opt_find(
void *extbuf,
size_t extlen,
int prevlen,
uint8_t type,
size_t *lenp,
void **databufp );
LIBRARY
Standard C Library (libc)
PARAMETERS
Points to a buffer that contains an extension header. Specifies the
length, in bytes, of the extension header. Specifies the location in
the extension header of an option. Valid values are either 0 (zero) for
the first option or the length returned from a previous call to either
inet6_opt_next() or inet6_opt_find(). Specifies the type of option to
find. Points to the length of the option found. Points to the option
data.
DESCRIPTION
The inet6_opt_find() function searches a received option extension
header for an option specified by type. If it finds the specified
option, it returns the option length and a pointer to the option data.
In addition, it returns an offset to the next option that you specify
in the prevlen parameter to subsequent calls to inet6_opt_next() in
order to search for additional occurrences of the same option type.
RETURN VALUES
Upon successful completion, the inet6_opt_find() function returns an
offset from which you can begin the next search in the data buffer.
Upon failure, it returns a -1.
SEE ALSO
Functions: inet6_opt_append(3), inet6_opt_finish(3),
inet6_opt_get_val(3), inet6_opt_init(3), inet6_opt_next(3),
inet6_opt_set_val(3).
Network Programmer's Guide
inet6_opt_find(3)