=head1 NAME ping_host_add - Add a host to a liboping object =head1 SYNOPSIS #include int ping_host_add (pingobj_t *obj, const char *host); int ping_host_remove (pingobj_t *obj, const char *host); =head1 DESCRIPTION The B method tries to resolve the I argument, open a socket and associate everything with the liboping object I. The I argument is a pointer to an liboping object, as returned by L. The I parameter is a '\0' terminated string which is interpreted as a hostname or an IP address. Depending on the address family setting, set with L, the hostname is resolved to an IPv4 or IPv6 address. The B method looks for I within I and remove it if found. It will close the socket and deallocate the memory, too. The names passed to B and B must match. This name can be queried using L. =head1 RETURN VALUE If B succeeds it returns zero. If an error occurs a value less than zero is returned and the last error is saved internally. You can receive the error message using L. B returns zero upon success and less than zero if it failed. Currently the only reason for failure is that the host isn't found, but this is subject to change. Use L to receive the error message. =head1 SEE ALSO L, L, L, L =head1 AUTHOR liboping is written by Florian "octo" Forster Eff at octo.itE. Its homepage can be found at L. Copyright (c) 2006-2017 by Florian "octo" Forster.