From: Florian Forster Date: Sun, 15 Mar 2009 13:16:19 +0000 (+0100) Subject: bindings/perl: Add the `get_recv_ttl' method. X-Git-Tag: Net-Oping-1.10~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ddfd844d9731a135dd265cdcb76a0c93d98e72a;p=liboping.git bindings/perl: Add the `get_recv_ttl' method. --- 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