… | |
… | |
91 | range C<interval> is the minimum time in seconds between pings to the |
91 | range C<interval> is the minimum time in seconds between pings to the |
92 | given range. If omitted, defaults to C<$send_interval>. |
92 | given range. If omitted, defaults to C<$send_interval>. |
93 | |
93 | |
94 | The C<$send_interval> is the minimum interval between sending any two |
94 | The C<$send_interval> is the minimum interval between sending any two |
95 | packets and is a way to make an overall rate limit. If omitted, pings will |
95 | packets and is a way to make an overall rate limit. If omitted, pings will |
96 | be send as fast as possible. |
96 | be sent as fast as possible. |
97 | |
97 | |
98 | The C<$payload> is a 32 bit unsigned integer given as the ICMP ECHO |
98 | The C<$payload> is a 32 bit unsigned integer given as the ICMP ECHO |
99 | REQUEST ident and sequence numbers (in unspecified order :). |
99 | REQUEST ident and sequence numbers (in unspecified order :). |
100 | |
100 | |
101 | The request will be queued and all requests will be served by a background |
101 | The request will be queued and all requests will be served by a background |
… | |
… | |
156 | Register a callback that is called for every received ping reply |
156 | Register a callback that is called for every received ping reply |
157 | (regardless of whether a ping is still in process or not and regardless of |
157 | (regardless of whether a ping is still in process or not and regardless of |
158 | whether the reply is actually a reply to a ping sent earlier). |
158 | whether the reply is actually a reply to a ping sent earlier). |
159 | |
159 | |
160 | The code reference gets a single parameter - an arrayref with an |
160 | The code reference gets a single parameter - an arrayref with an |
161 | entry for each received packet (replies are beign batched for greater |
161 | entry for each received packet (replies are being batched for greater |
162 | efficiency). Each packet is represented by an arrayref with three members: |
162 | efficiency). Each packet is represented by an arrayref with three members: |
163 | the source address (an octet string of either 4 (IPv4) or 16 (IPv6) octets |
163 | the source address (an octet string of either 4 (IPv4) or 16 (IPv6) octets |
164 | length), the payload as passed to C<icmp_ping> and the round trip time in |
164 | length), the payload as passed to C<icmp_ping> and the round trip time in |
165 | seconds. |
165 | seconds. |
166 | |
166 | |
… | |
… | |
210 | |
210 | |
211 | =back |
211 | =back |
212 | |
212 | |
213 | =head1 AUTHOR |
213 | =head1 AUTHOR |
214 | |
214 | |
215 | Marc Lehmann <schmorp@schmorp.de> |
215 | Marc Lehmann <schmorp@schmorp.de> |
216 | http://home.schmorp.de/ |
216 | http://home.schmorp.de/ |
217 | |
217 | |
218 | =head1 AUTHOR |
218 | =head1 LICENSE |
219 | |
219 | |
220 | This software is distributed under the GENERAL PUBLIC LICENSE, version 2 |
220 | This software is distributed under the GENERAL PUBLIC LICENSE, version 2 |
221 | or any later version or, at your option, the Artistic License. |
221 | or any later version or, at your option, the Artistic License. |
222 | |
222 | |
223 | =cut |
223 | =cut |
224 | |
224 | |