Code

Created standard subversion directories.
[liboping.git] / src / mans / ping_setopt.pod
1 =head1 NAME
3 ping_setopt - Set options for a liboping object
5 =head1 SYNOPSIS
7   #include <oping.h>
9   int ping_setopt (pingobj_t *obj, int opt, void *val);
11 =head1 DESCRIPTION
13 The B<ping_setopt> method sets options that effect all hosts associated with
14 the object I<obj> and hosts that are yet to be added to the object.
16 The I<obj> argument is a pointer to an liboping object, as returned by
17 L<ping_construct(3)>.
19 The I<opt> argument specifies the option to set. Use one of the following
20 constants:
22 =over 4
24 =item B<PING_OPT_TIMEOUT>
26 The time to wait for a "echo reply" to be received; in seconds. In this case
27 the memory pointed to by I<val> is interpreted as a double value and must be
28 greater than zero. The default is B<PING_DEF_TIMEOUT>.
30 =item B<PING_OPT_TTL>
32 The value written into the time-to-live (= TTL) field of generated ICMP
33 packets. The memory pointed to by I<val> is interpreted as an integer. Valid
34 values are 1 through 255. Default is B<PING_DEF_TTL>.
36 =item B<PING_OPT_AF>
38 The address family to use. The memory pointed to by I<val> is interpreted as an
39 integer and must be either B<AF_UNSPEC>, B<AF_INET>, or B<AF_INET6>. This
40 option only effects hosts that are being added B<after> this option has been
41 set. Default is B<PING_DEF_AF>.
43 =back
45 The I<val> argument is a pointer to the new value. It must not be NULL. It is
46 dereferences depending on the value of the I<opt> argument, see above. The
47 memory pointed to by I<val> is not changed.
49 =head1 RETURN VALUE
51 B<ping_setopt> returns zero upon success or less than zero upon failure.
53 =head1 SEE ALSO
55 L<ping_construct(3)>,
56 L<liboping(3)>
58 =head1 AUTHOR
60 liboping is written by Florian octo Forster E<lt>octo at verplant.orgE<gt>.
61 It's homepage can be found at L<http://verplant.org/liboping/>.
63 (c) 2005, 2006 by Florian octo Forster.