23680d2955986bb43427ea591f333709105e5103
[liboping.git] / src / mans / ping_iterator_get_context.pod
1 =head1 NAME
2
3 ping_iterator_get_context, ping_iterator_set_context - Store host-dependent data
4
5 =head1 SYNOPSIS
6
7   #include <oping.h>
8
9   void *ping_iterator_get_context (pingobj_iter_t *iter);
10   void  ping_iterator_set_context (pingobj_iter_t *iter, void *context);
11
12 =head1 DESCRIPTION
13
14 B<ping_iterator_set_context> can be used to store host-specific data within the
15 liboping structures. This data can be received again by calling
16 B<ping_iterator_get_context>. The data itself is never touched by liboping. If
17 you call ping_host_remove (see L<ping_host_add(3)>) or ping_destroy (see
18 L<ping_construct(3)>) and the context is not NULL liboping will assume you know
19 what you're doing and simply ignore the fact this might be a memory leak.
20
21 The I<iter> argument is an iterator object as returned by
22 L<ping_iterator_get(3)> and ping_iterator_next.
23
24 The I<context> argument of B<ping_iterator_set_context> is a pointer to
25 anything and may be NULL.
26
27 =head1 RETURN VALUE
28
29 B<ping_iterator_get_context> returns the same pointer previously passed to
30 B<ping_iterator_set_context> or NULL if B<ping_iterator_set_context> has never
31 been called before.
32
33 =head1 SEE ALSO
34
35 L<ping_iterator_get(3)>,
36 L<ping_construct(3)>,
37 L<ping_host_add(3)>,
38 L<liboping(3)>
39
40 =head1 AUTHOR
41
42 liboping is written by Florian "octo" Forster E<lt>octo at verplant.orgE<gt>.
43 Its homepage can be found at L<http://verplant.org/liboping/>.
44
45 Copyright (c) 2005-2011 by Florian "octo" Forster.