ping_iterator_get_context(3)

ping_iterator_get_context3

Store host-dependent data

Usage

  #include <oping.h>
  void *ping_iterator_get_context (pingobj_iter_t *iter);
  void  ping_iterator_set_context (pingobj_iter_t *iter, void *context);

Overview

ping_iterator_set_context can be used to store host-specific data within the liboping structures. This data can be received again by calling ping_iterator_get_context. The data itself is never touched by liboping. If you call ping_host_remove (see ping_host_add(3)) or ping_destroy (see ping_construct(3)) and the context is not NULL liboping will assume you know what you're doing and simply ignore the fact this might be a memory leak.

The iter argument is an iterator object as returned by ping_iterator_get(3) and ping_iterator_next.

The context argument of ping_iterator_set_context is a pointer to anything and may be NULL.

Return value

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

Releases

10 releases since Debian 4.0 (Etch); the text changed 8 times.

  1. 4.0–5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13

Author

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

Copyright (c) 2006-2017 by Florian "octo" Forster.

From liboping-dev 1.10.0-5+b5 in Debian 13 (Trixie). Parsed by carta from the page's man source.