ICMP Echo-Request


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users ICMP Echo-Request
# 1  
Old 10-26-2005
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!! Smilie
thanx for any help
bye! andrea
# 2  
Old 10-26-2005
ping will not work?
# 3  
Old 10-26-2005
i have to structure it like this:

.....
clock_getsystemtime(..)
for(x times){
send(echo_request)
sleep(y)
}
receive(last echo_reply)
clock_getsystemtime(..)
....

Last edited by ilmora; 10-26-2005 at 04:50 PM..
# 4  
Old 10-27-2005
Smilie Smilie Smilie
Quote:
know little about socket-programming...
You're working on what OS ??
# 5  
Old 10-27-2005
i'm afraid to say that i have to do this on fedora, with the latest kernel rel.
# 6  
Old 10-27-2005
What you want is a customized version of ping that will send packets on the schedule you need:

Download ping source from the ping page:

http://www.ping127001.com/pingpage.htm

Start with ping.c, which already does a lot of what you want. There are header files you will also need, but they should already be on your system.

You will probably want to remove the 'portability' define statements so it's easier to read.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. IP Networking

iptables - formatting icmp rules

Hi, I am relatively new to firewalls and netfilter. I have a Debian Stretch router box running dnsmasq, connected to a VPN. Occasionally dnsmasq polls all of the desired DNS servers to select the fastest. When it does this it responds to replies of the non-selected DNS servers with a icmp type... (0 Replies)
Discussion started by: CrazyDave
0 Replies

2. 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

3. Shell Programming and Scripting

ICMP for limited time

Hi, I am using following command: tcpdump -i eth1 icmp =8 >output.txt i want this command to get execute for a minute only. How can we do this? Thanks. Please use code tags next time for your code and data. Thanks (2 Replies)
Discussion started by: Satyajeet@uh
2 Replies

4. UNIX for Dummies Questions & Answers

Log file for icmp requests

I'm not a unix expert so I need to ask what maybe a simple question to some. Is there a log file which records any icmp packets hitting the server? I ask, because I need to verify what the ip is from a server pinging mine. (3 Replies)
Discussion started by: numele
3 Replies

5. Solaris

ICMP Net Unreachable from gateway

Hi all, I cannot reach my SERVER from my NetBackup server connect through SERVER_prv ("cannot connect to client") My SERVER was Sun OS 5.8, below is the message i get when i ping my SERVER: # ping 192.168.X.X or # ping SERVER_prv ICMP Net Unreachable from gateway 172.16.102.XXX for... (3 Replies)
Discussion started by: beginningDBA
3 Replies

6. IP Networking

Ping ICMP

Hi All, How to disable ICMP time stamp request and time stamp reply of a machine? How to test this feature from remote machine? Please reply back Vasanth (2 Replies)
Discussion started by: vasanthan
2 Replies

7. Shell Programming and Scripting

Extracting ICMP Output for Plotting

Dear, I want to perform a plotting using xgraph, and the plotting data (ping.txt) is as below. For the graph I just want to plot the time for x-axis (line count) and the RTT for y-axis (time in ms). Below are script i write for that purpose but it seen did not work. Any guide for me because i... (1 Reply)
Discussion started by: Paris Heng
1 Replies

8. 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

9. IP Networking

icmp

how i can send the big icmp packets to the another ip for loose connection ....or how he can loose (1 Reply)
Discussion started by: seccom
1 Replies
Login or Register to Ask a Question