This is a discussion on ping program to probe a remote system within the Linux Networking forums, part of the Linux Forums category; hi experts, i have a ping program written in c on linux platform. it is working fine but it has ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
answered in comp.unix.programmer
-- Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html Dept. of Physics, Univ. of Padova, Italy ROT13: ybergv@cq.vasa.vg |
|
|||
|
"xoinki" <xoinki@gmail.com> 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 |