439e2730c90a9a72af36a2230076c76479f9992d
[liboping.git] / src / mans / ping_send.pod
1 =head1 NAME
2
3 ping_send - Send ICMP echo requests to all associated hosts and wait for ICMP echo responses to arrive
4
5 =head1 SYNOPSIS
6
7   #include <oping.h>
8
9   int ping_send (pingobj_t *obj);
10
11 =head1 DESCRIPTION
12
13 The B<ping_send> method is the actual workhorse of this library. It crafts ICMP
14 packets for the hosts associated with I<obj> and sends them via the
15 corresponding sockets. It then waits for echo responses and receives them,
16 writing latency information for each host. The method returns after all echo
17 replies have been read or the timeout (set with L<ping_setopt(3)>) is reached.
18
19 After this function returns you will most likely iterate over all hosts using
20 L<ping_iterator_get(3)> and ping_iterator_next (described in the same manual
21 page) and call L<ping_iterator_get_info(3)> on each host.
22
23 =head1 RETURN VALUE
24
25 B<ping_send> returns the number of echo replies received or a value less than
26 zero if an error occurred. Use L<ping_get_error(3)> to receive an error message.
27
28 =head1 SEE ALSO
29
30 L<ping_construct(3)>,
31 L<ping_setopt(3)>,
32 L<ping_iterator_get(3)>,
33 L<ping_iterator_get_info(3)>,
34 L<ping_get_error(3)>,
35 L<liboping(3)>
36
37 =head1 AUTHOR
38
39 liboping is written by Florian "octo" Forster E<lt>octo at verplant.orgE<gt>.
40 Its homepage can be found at L<http://verplant.org/liboping/>.
41
42 Copyright (c) 2005-2011 by Florian "octo" Forster.