1ping_iterator_get_context(3)       liboping       ping_iterator_get_context(3)
2
3
4

NAME

6       ping_iterator_get_context, ping_iterator_set_context - Store
7       host-dependent data
8

SYNOPSIS

10         #include <oping.h>
11
12         void *ping_iterator_get_context (pingobj_iter_t *iter);
13         void  ping_iterator_set_context (pingobj_iter_t *iter, void *context);
14

DESCRIPTION

16       ping_iterator_set_context can be used to store host-specific data
17       within the liboping structures. This data can be received again by
18       calling ping_iterator_get_context. The data itself is never touched by
19       liboping. If you call ping_host_remove (see ping_host_add(3)) or
20       ping_destroy (see ping_construct(3)) and the context is not NULL
21       liboping will assume you know what you're doing and simply ignore the
22       fact this might be a memory leak.
23
24       The iter argument is an iterator object as returned by
25       ping_iterator_get(3) and ping_iterator_next.
26
27       The context argument of ping_iterator_set_context is a pointer to
28       anything and may be NULL.
29

RETURN VALUE

31       ping_iterator_get_context returns the same pointer previously passed to
32       ping_iterator_set_context or NULL if ping_iterator_set_context has
33       never been called before.
34

SEE ALSO

36       ping_iterator_get(3), ping_construct(3), ping_host_add(3), liboping(3)
37

AUTHOR

39       liboping is written by Florian octo Forster <octo at verplant.org>.
40       It's homepage can be found at <http://verplant.org/liboping/>.
41
42       (c) 2005-2009 by Florian octo Forster.
43
44
45
461.3.4                             2009-12-20      ping_iterator_get_context(3)
Impressum