1ping_iterator_get(3)               liboping               ping_iterator_get(3)
2
3
4

NAME

6       ping_iterator_get, ping_iterator_next - Iterate over all hosts of a
7       liboping object
8

SYNOPSIS

10         #include <oping.h>
11
12         pingobj_iter_t *ping_iterator_get (pingobj_t *obj);
13         pingobj_iter_t *ping_iterator_next (pingobj_iter_t *iter)
14

DESCRIPTION

16       These two functions can be used to iterate over all hosts associated
17       with a liboping object. You can use these methods as follows:
18
19         pingobj_iter_t *iter;
20
21         for (iter = ping_iterator_get (obj);
22              iter != NULL;
23              iter = ping_iterator_next (iter))
24         {
25           ...;
26         }
27
28       To get usable information from an iterator object (which is also an
29       opaque data type, just like the liboping object itself) use
30       ping_iterator_get_info(3) and ping_iterator_get_context(3).
31

RETURN VALUE

33       The ping_iterator_get returns an iterator for obj or NULL if no host is
34       associated with obj.
35
36       The ping_iterator_next returns an iterator for the host following iter
37       or NULL if the last host has been reached.
38

SEE ALSO

40       ping_host_add(3), ping_iterator_get_info(3),
41       ping_iterator_get_context(3), liboping(3)
42

AUTHOR

44       liboping is written by Florian "octo" Forster <ff at octo.it>.  Its
45       homepage can be found at <http://noping.cc/>.
46
47       Copyright (c) 2006-2017 by Florian "octo" Forster.
48
49
50
511.10.0                            2017-05-11              ping_iterator_get(3)
Impressum