Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ping_construct(3) [debian man page]

ping_construct(3)						     liboping							 ping_construct(3)

NAME
ping_construct - Constructor for the liboping class SYNOPSIS
#include <oping.h> pingobj_t *ping_construct (void); void ping_destroy (pingobj_t *obj); DESCRIPTION
The ping_construct constructor allocates the memory necessary for a liboping object, initializes that memory and returns a pointer to it. The ping_destroy iterates over all hosts associated with the liboping object obj, closes the sockets, removes the hosts and frees obj's memory. RETURN VALUE
The ping_construct constructor returns a pointer to the allocated memory or NULL if no memory could be allocated. SEE ALSO
ping_setopt(3), ping_send(3), ping_host_add(3), ping_get_error(3), ping_iterator_get(3), liboping(3) AUTHOR
liboping is written by Florian "octo" Forster <octo at verplant.org>. Its homepage can be found at <http://verplant.org/liboping/>. Copyright (c) 2005-2011 by Florian "octo" Forster. 1.6.2 2012-01-31 ping_construct(3)

Check Out this Related Man Page

ping_iterator_get(3)						     liboping						      ping_iterator_get(3)

NAME
ping_iterator_get, ping_iterator_next - Iterate over all hosts of a liboping object SYNOPSIS
#include <oping.h> pingobj_iter_t *ping_iterator_get (pingobj_t *obj); pingobj_iter_t *ping_iterator_next (pingobj_iter_t *iter) DESCRIPTION
These two functions can be used to iterate over all hosts associated with a liboping object. You can use these methods as follows: pingobj_iter_t *iter; for (iter = ping_iterator_get (obj); iter != NULL; iter = ping_iterator_next (iter)) { ...; } To get usable information from an iterator object (which is also an opaque data type, just like the liboping object itself) use ping_iterator_get_info(3) and ping_iterator_get_context(3). RETURN VALUE
The ping_iterator_get returns an iterator for obj or NULL if no host is associated with obj. The ping_iterator_next returns an iterator for the host following iter or NULL if the last host has been reached. SEE ALSO
ping_host_add(3), ping_iterator_get_info(3), ping_iterator_get_context(3), liboping(3) AUTHOR
liboping is written by Florian "octo" Forster <octo at verplant.org>. Its homepage can be found at <http://verplant.org/liboping/>. Copyright (c) 2005-2011 by Florian "octo" Forster. 1.6.2 2012-01-31 ping_iterator_get(3)
Man Page