ping_iterator_get man page

ping_iterator_get, ping_iterator_next — Iterate over all hosts of a liboping object


#include <oping.h>
pingobj_iter_t *ping_iterator_get (pingobj_t *obj);
pingobj_iter_t *ping_iterator_next (pingobj_iter_t *iter)


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)


liboping is written by Florian "octo" Forster <ff at octo.it>. Its homepage can be found at <http://noping.cc/>.

Copyright (c) 2005-2016 by Florian "octo" Forster.

Referenced By

liboping(3), ping_construct(3), ping_iterator_get_context(3), ping_iterator_get_info(3), ping_send(3).

Explore man page connections for ping_iterator_get(3).

liboping 1.9.0 2016-06-27