ping_iterator_get(3)
π ping_iterator_get(3) β a liboping moment π
okay bestie, so this page lives in the liboping manual (section 3, the library-girlies section) and it's all about iterating over hosts. two little functions, one big slay. π¦
β¨ NAME β¨
ping_iterator_get, ping_iterator_next β Iterate over all hosts of a liboping object
πΈ SYNOPSIS πΈ
#include <oping.h>
pingobj_iter_t *ping_iterator_get (pingobj_t *obj);
pingobj_iter_t *ping_iterator_next (pingobj_iter_t *iter)
no cap, that's the whole vibe. π
π DESCRIPTION π
so these two functions? they let you iterate over every host that's chillin' inside a liboping object. the way you use them is literally this:
pingobj_iter_t *iter;
for (iter = ping_iterator_get (obj);
iter != NULL;
iter = ping_iterator_next (iter))
{
...;
}
look at that for-loop. it's giving main character energy fr fr. π
now, here's the tea: the iterator object is an opaque data type, just like the liboping object itself (yes, both of them are mysterious like that π). so you can't just peek inside and grab stuff directly. if you want usable info out of an iterator, you gotta go through ping_iterator_get_info(3) and ping_iterator_get_context(3). those are your besties for that. π
β RETURN VALUE β
ping_iterator_getβ returns an iterator for obj, orNULLif there's no host associated with obj. π (empty vibes, literally)ping_iterator_nextβ returns an iterator for the host following iter, orNULLif you've hit the last host and there's nowhere left to go. π end of the line, bestie.
π«Ά SEE ALSO π«Ά
π 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.
and that's the whole page, bestie!! this one's from liboping version 1.10.0, dated 2017-05-11, and it's been serving ping_iterator_get(3) realness ever since. slay, iterate responsibly, and remember: if the iterator is NULL, the loop is done. periodt. πβ¨π
π¦ where this page comes from
- alpine 3.24: liboping-doc 1.10.0-r2 Β· LGPL-2.0-or-later
- epel 10: liboping-devel 1.10.0-33.el10_0 Β· GPL-2.0-only
- epel 9: liboping-devel 1.10.0-19.el9 Β· GPLv2
- fedora 43: liboping-devel 1.10.0-35.fc43 Β· GPL-2.0-only
- fedora 43: liboping-devel 1.10.0-35.fc43 Β· GPL-2.0-only
- fedora 44: liboping-devel 1.10.0-36.fc44 Β· GPL-2.0-only
- fedora 44: liboping-devel 1.10.0-36.fc44 Β· GPL-2.0-only
- nixos 26.05: liboping 1.10.0
- nixpkgs unstable: liboping 1.10.0
- opensuse-leap 16.0: liboping-devel 1.10.0-bp160.1.14 Β· LGPL-2.1-only
- opensuse-leap 16.0: liboping-devel 1.10.0-bp160.1.14 Β· LGPL-2.1-only
- opensuse-leap 16.0: liboping-devel 1.10.0-bp160.1.14 Β· LGPL-2.1-only
- opensuse-leap 16.0: liboping-devel 1.10.0-bp160.1.14 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms