*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> inet6_opt_append (3)              
Title
Content
Arch
Section
 

inet6_opt_append(3)

Contents


NAME    [Toc]    [Back]

       inet6_opt_append  - Return the length of an IPv6 extension
       header with a new option and append the option

SYNOPSIS    [Toc]    [Back]

       #include <netinet/ip6.h>

       int inet6_opt_append(
               void *extbuf,
               size_t extlen,
               int prevlen,
               uint8_t type,
               size_t len,
               uint_t align,
               void **databufp );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Points to a buffer that contains an extension header. This
       is  either  a  valid pointer or a NULL pointer.  Specifies
       the length of the extension header  to  initialize.  Valid
       values  are  0  if  extbufequals  0,  a  value returned by
       inet6_opt_finish(), or any number that is a multiple of 8.
       Specifies  the  length  of  the existing extension header.
       Obtain this value from a prior call to inet6_opt_init() or
       inet6_opt_append().   Specifies  the type of option. Valid
       values range from 2  to  255,  inclusive,  excluding  194.
       Specifies  the  length  of  the option data, excluding the
       option type and option length fields. Valid  values  range
       from  0 to 255, inclusive.  Specifies the alignment of the
       option. Valid values are 1, 2, 4,  and  8.   Points  to  a
       buffer that contains the option data.

DESCRIPTION    [Toc]    [Back]

       The inet6_opt_append() function when called with extbuf as
       a NULL pointer and extlen as 0, returns the updated number
       of bytes in an extension header.

       If you specify extbuf as a valid pointer and valid len and
       align parameters, the function returns the  same  information
  as  in  the  previous case, but also inserts the pad
       option,  initializes  the  type  and  length  fields,  and
       returns  a pointer to the location for the option content.

       After you call inet6_opt_append(), you can  then  use  the
       databuf  directly  or  call inet6_opt_set_val() to specify
       the option contents.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the  inet6_opt_append()  function
  returns  the updated number of bytes in an extension
       header. Upon failure, it returns a -1.








SEE ALSO    [Toc]    [Back]

      
      
       Functions:     inet6_opt_find(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_append(3)
[ Back ]
 Similar pages
Name OS Title
inet6_opt_finish Tru64 Return the total length of an IPv6 extension header, including padding, and initialize the option
inet6_opt_init Tru64 Return the length of an IPv6 extension header with no options and initialize the header
inet6_opt_find Tru64 Find a specific option in an extension header
inet6_opt_next Tru64 Parse received option extension headers
getoption IRIX retrieve an option from the option database
inet6_opt_get_val Tru64 Extract data items from the data portion of an IPv6 option
inet6_opt_set_val Tru64 Insert data items into the data portion of the IPv6 option
inet6_rth_space Tru64 Return the number of bytes required for an IPv6 Routing header
inet6_rth_segments Tru64 Return the number of segments (addresses) in an IPv6 Routing header
openpam_set_option FreeBSD sets the value of a module option
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service