Networking Forums

Networking Forums > Computer Networking > Linux Networking > ping program to probe a remote system

Reply
Thread Tools Display Modes

ping program to probe a remote system

 
 
xoinki
Guest
Posts: n/a

 
      05-15-2006, 12:18 PM
hi experts,
i have a ping program written in c on linux platform. it is working
fine but it has a bug.lets say i am probing a remote system with IP
192.168.15.1. every second ICMP datagram is sent. now if i deactivate
the NIC then the ping just stops and does not return any error message.
It works fine if i use unicast address and select works fine .. but if
i use a broadcast IP (192.168.15.255) then the ping just hangs up if
the destination system is suddenly shutdown or NIC is deactivated.
although ethereal flags an error message that the network is down, my
program is not able handle this condition. the code is too large to
post here (400+ lines).
please help me..
waitin for u r replies.
Xoinki

 
Reply With Quote
 
 
 
 
Maurizio Loreti
Guest
Posts: n/a

 
      05-15-2006, 01:34 PM
answered in comp.unix.programmer

--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Dept. of Physics, Univ. of Padova, Italy ROT13: (E-Mail Removed)
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      05-15-2006, 04:04 PM
"xoinki" <(E-Mail Removed)> writes:

>hi experts,
>i have a ping program written in c on linux platform. it is working
>fine but it has a bug.lets say i am probing a remote system with IP
>192.168.15.1. every second ICMP datagram is sent. now if i deactivate
>the NIC then the ping just stops and does not return any error message.
>It works fine if i use unicast address and select works fine .. but if
>i use a broadcast IP (192.168.15.255) then the ping just hangs up if
>the destination system is suddenly shutdown or NIC is deactivated.
>although ethereal flags an error message that the network is down, my
>program is not able handle this condition. the code is too large to
>post here (400+ lines).
>please help me..


Why should we? There has been a ping program, free, for what must be
centuries now. You want to write yet another one. Why?
Also, what do you mean by "stop". Does the program return or does it just
stop displaying return messages. The latter is what you would expect.

>waitin for u r replies.
>Xoinki


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote System Does Not See the SSID rabbithutch Wireless Networks 1 09-03-2007 03:50 AM
i want to detect termination of a program in different system.. xoinki Linux Networking 0 05-07-2006 04:50 PM
Ping from C/C++ doesn't work properly using either System() or popen() Neel Linux Networking 8 02-20-2006 09:34 PM
Cannot Ping an IP Only from One System =?Utf-8?B?Q2hhcGxhaW4gRG91Zw==?= Windows Networking 6 04-27-2005 09:50 AM
How to run a program on a remote networked peer Fernando Ronci Windows Networking 3 09-18-2004 02:53 PM



1 2 3 4 5 6 7 8 9 10 11