Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ping_send(3) [debian man page]

ping_send(3)							     liboping							      ping_send(3)

NAME
ping_send - Send ICMP echo requests to all associated hosts and wait for ICMP echo responses to arrive SYNOPSIS
#include <oping.h> int ping_send (pingobj_t *obj); DESCRIPTION
The ping_send method is the actual workhorse of this library. It crafts ICMP packets for the hosts associated with obj and sends them via the corresponding sockets. It then waits for echo responses and receives them, writing latency information for each host. The method returns after all echo replies have been read or the timeout (set with ping_setopt(3)) is reached. After this function returns you will most likely iterate over all hosts using ping_iterator_get(3) and ping_iterator_next (described in the same manual page) and call ping_iterator_get_info(3) on each host. RETURN VALUE
ping_send returns the number of echo replies received or a value less than zero if an error occurred. Use ping_get_error(3) to receive an error message. SEE ALSO
ping_construct(3), ping_setopt(3), ping_iterator_get(3), ping_iterator_get_info(3), ping_get_error(3), liboping(3) AUTHOR
liboping is written by Florian "octo" Forster <octo at verplant.org>. Its homepage can be found at <http://verplant.org/liboping/>. Copyright (c) 2005-2011 by Florian "octo" Forster. 1.6.2 2012-01-31 ping_send(3)

Check Out this Related Man Page

ping_host_add(3)						     liboping							  ping_host_add(3)

NAME
ping_host_add - Add a host to a liboping object SYNOPSIS
#include <oping.h> int ping_host_add (pingobj_t *obj, const char *host); int ping_host_remove (pingobj_t *obj, const char *host); DESCRIPTION
The ping_host_add method tries to resolve the host argument, open a socket and associate everything with the liboping object obj. The obj argument is a pointer to an liboping object, as returned by ping_construct(3). The host parameter is a '' terminated string which is interpreted as a hostname or an IP address. Depending on the address family setting, set with ping_setopt(3), the hostname is resolved to an IPv4 or IPv6 address. The ping_host_remove method looks for host within obj and remove it if found. It will close the socket and deallocate the memory, too. The names passed to ping_host_add and ping_host_remove must match. This name can be queried using ping_iterator_get_info(3). RETURN VALUE
If ping_host_add succeeds it returns zero. If an error occurs a value less than zero is returned and the last error is saved internally. You can receive the error message using ping_get_error(3). ping_host_remove returns zero upon success and less than zero if it failed. Currently the only reason for failure is that the host isn't found, but this is subject to change. Use ping_get_error(3) to receive the error message. SEE ALSO
ping_construct(3), ping_setopt(3), ping_get_error(3), liboping(3) AUTHOR
liboping is written by Florian "octo" Forster <octo at verplant.org>. Its homepage can be found at <http://verplant.org/liboping/>. Copyright (c) 2005-2011 by Florian "octo" Forster. 1.6.2 2012-01-31 ping_host_add(3)
Man Page

7 More Discussions You Might Find Interesting

1. Linux

Linux and ICMP timestamp requests.

Hi There, I am looking to disable ICMP timestamp requests and ICMP timestamp replies on my Linux server version 8. Can someone please tell me the simplest way to do this? I know a command to disable all ICMP traffic but this I have been told will cause many network problems which I... (2 Replies)
Discussion started by: gerwhelan
2 Replies

2. UNIX for Advanced & Expert Users

Cannot read in variable using read on first try

Hi, My problem is : echo Division read vDivision variable1=`cut -c **something****' echo Do you want to proceed ? read ans I cant seem to read in ans on the first try and have to repeatedly enter the return key. If i remove the ` ` statement its ok but i need that line for... (1 Reply)
Discussion started by: normie
1 Replies

3. UNIX for Advanced & Expert Users

ICMP Echo-Request

Hello! I'm in extra urgent need to have a program that sends a series of ICMP echo requests over the network to a specified host and waits until the last echo reply is received. I know little about socket-programming (in particular I've never dealt with icmp sockets) that's why i'm desperate!! :)... (5 Replies)
Discussion started by: ilmora
5 Replies

4. Post Here to Contact Site Administrators and Moderators

How to see replies for my post !!!!!

Hi, I had post my queries regarding shared objects (.so) in this forum. But i cant able to see the replies. I doubt whether i had received any replies or not. Kindly help me, to know the procedure to see the replies for my queries. Thankyou. Regards, Senthil. (1 Reply)
Discussion started by: senthilvnr
1 Replies

5. UNIX for Dummies Questions & Answers

What does it mean and how do I do it: exit 0 fi ??

I use a Mac and need to 'echo' a code in >> /etc/hosts Where is: /etc/hosts? And how do I do : exit 0 Does : 'fi' mean something too? :confused:Thanks for any help, Jacqrav:confused: (1 Reply)
Discussion started by: jacqrav
1 Replies

6. IP Networking

Routing ICMP echo requests

I have an application where I need to configure a router to pass through ping requests (ICMP type http://www.dd-wrt.com/phpBB2/images/smiles/icon_cool.gif through to the LAN port. I have a Linksys WRT54GS with tiny DD-WRT V24 SP2 installed. I am adding the following iptables rules: iptables -t... (0 Replies)
Discussion started by: dschlic1
0 Replies

7. UNIX for Beginners Questions & Answers

Need to save output of echo and awk to a file

Hi, I am generating a YAML file from a hosts file, but am having trouble saving it to a new file. hosts file 127.0.0.1 localhost 192.168.1.2 host1 192.168.1.3 host2 192.168.1.4 host3 192.168.1.5 host4 YAML file $ echo 'host_entries:' && awk '{printf " %s:\n ip:... (3 Replies)
Discussion started by: sand1234
3 Replies