=head1 NAME ping_setopt - Set options for a liboping object =head1 SYNOPSIS #include int ping_setopt (pingobj_t *obj, int opt, void *val); =head1 DESCRIPTION The B method sets options that effect all hosts associated with the object I and hosts that are yet to be added to the object. The I argument is a pointer to an liboping object, as returned by L. The I argument specifies the option to set. Use one of the following constants: =over 4 =item B The time to wait for a "echo reply" to be received; in seconds. In this case the memory pointed to by I is interpreted as a double value and must be greater than zero. The default is B. =item B The value written into the time-to-live (= TTL) field of generated ICMP packets. The memory pointed to by I is interpreted as an integer. Valid values are 1 through 255. Default is B. =item B The address family to use. The memory pointed to by I is interpreted as an integer and must be either B, B, or B. This option only effects hosts that are being added B this option has been set. Default is B. If you change this option, and a source address is set (see B) that setting will be reset. =item B Set the data to send. The value passed must be a char-pointer to a null-terminated string. By default a 56 byte long string is used so that the packet size of an ICMPv4 packet is exactly 64 bytes. That's the behavior of the L command. =item B Set the source address to use. The value passed must be a char-pointer to a null-terminated string. This option will ignore the address family setting (as set with B) and will set the object's address family according to the source address assigned. =back The I argument is a pointer to the new value. It must not be NULL. It is dereferences depending on the value of the I argument, see above. The memory pointed to by I is not changed. =head1 RETURN VALUE B returns zero upon success or less than zero upon failure. =head1 SEE ALSO L, L =head1 AUTHOR liboping is written by Florian octo Forster Eocto at verplant.orgE. It's homepage can be found at L. (c) 2005, 2006 by Florian octo Forster.