From 5ddfd844d9731a135dd265cdcb76a0c93d98e72a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 15 Mar 2009 14:16:19 +0100 Subject: [PATCH] bindings/perl: Add the `get_recv_ttl' method. --- bindings/perl/Oping.xs | 22 ++++++++++++++++++++ bindings/perl/lib/Net/Oping.pm | 38 ++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/bindings/perl/Oping.xs b/bindings/perl/Oping.xs index c42374f..135733d 100644 --- a/bindings/perl/Oping.xs +++ b/bindings/perl/Oping.xs @@ -188,6 +188,28 @@ _ping_iterator_get_dropped (iter) OUTPUT: RETVAL +int +_ping_iterator_get_recv_ttl (iter) + pingobj_iter_t *iter + CODE: +#if defined(PING_INFO_RECV_TTL) + int tmp; + size_t tmp_size; + int status; + + RETVAL = -1; + + tmp_size = sizeof (tmp); + status = ping_iterator_get_info (iter, PING_INFO_RECV_TTL, + (void *) &tmp, &tmp_size); + if (status == 0) + RETVAL = tmp; +#else + RETVAL = -1; +#endif + OUTPUT: + RETVAL + const char * _ping_get_error (obj) pingobj_t *obj diff --git a/bindings/perl/lib/Net/Oping.pm b/bindings/perl/lib/Net/Oping.pm index b14cc52..92709e4 100644 --- a/bindings/perl/lib/Net/Oping.pm +++ b/bindings/perl/lib/Net/Oping.pm @@ -314,6 +314,44 @@ sub get_dropped return ($data); } # get_dropped +=item my I<$dropped> = I<$obj>-EB () + +Returns a hash reference holding the I