Code

Add perl binding and documentation for new ping_iterator_count function
authorHamish Coleman <hamish@zot.org>
Tue, 9 May 2017 01:32:04 +0000 (09:32 +0800)
committerHamish Coleman <hamish@zot.org>
Tue, 9 May 2017 01:32:04 +0000 (09:32 +0800)
bindings/perl/Oping.xs
src/mans/liboping.pod
src/mans/ping_iterator_count.pod [new file with mode: 0644]

index c88e3dca981710649212fac8a21ff97ad68c92bd..5d8fa40992cf07292eb83a8dfbaaacef75d21e2b 100644 (file)
@@ -134,6 +134,14 @@ _ping_iterator_next (iter)
        OUTPUT:
                RETVAL
 
+int
+_ping_iterator_count (obj)
+       pingobj_t *obj
+       CODE:
+               RETVAL = ping_iterator_count (obj);
+       OUTPUT:
+               RETVAL
+
 double
 _ping_iterator_get_latency (iter)
        pingobj_iter_t *iter
index c36a89c0e256122ccd2fe37b763a5e640605a2bf..7eb987efc9c2966fb44c7e4bfdfdcf304c32243c 100644 (file)
@@ -69,6 +69,7 @@ L<ping_setopt(3)>,
 L<ping_host_add(3)>,
 L<ping_send(3)>,
 L<ping_get_error(3)>,
+L<ping_iterator_count(3)>,
 L<ping_iterator_get(3)>,
 L<ping_iterator_get_info(3)>,
 L<ping_iterator_get_context(3)>
diff --git a/src/mans/ping_iterator_count.pod b/src/mans/ping_iterator_count.pod
new file mode 100644 (file)
index 0000000..ab6e3a1
--- /dev/null
@@ -0,0 +1,33 @@
+=head1 NAME
+
+ping_iterator_count - Count the number of hosts in a liboping object
+
+=head1 SYNOPSIS
+
+  #include <oping.h>
+
+  int ping_iterator_count (pingobj_t *obj);
+
+=head1 DESCRIPTION
+
+This functions is used to count the number of hosts currently associated
+with a liboping object.
+
+=head1 RETURN VALUE
+
+The B<ping_iterator_count> returns an integer number or zero if no host is
+associated with I<obj>.
+
+=head1 SEE ALSO
+
+L<ping_host_add(3)>,
+L<ping_iterator_get(3)>,
+L<ping_iterator_next(3)>,
+L<liboping(3)>
+
+=head1 AUTHOR
+
+liboping is written by Florian "octo" Forster E<lt>ff at octo.itE<gt>.
+Its homepage can be found at L<http://noping.cc/>.
+
+Copyright (c) 2005-2016 by Florian "octo" Forster.