3 ping_setopt - Set options for a liboping object
9 int ping_setopt (pingobj_t *obj, int opt, void *val);
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
19 The I<opt> argument specifies the option to set. Use one of the following
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>.
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>.
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>.
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.
51 B<ping_setopt> returns zero upon success or less than zero upon failure.
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.