Host availability in udp
Show older comments
Hi all, I am working in udp based project in matlab.
There is 'Status' command to verify udp link creation. But Before creating udp i want to check whether the given host(ip) is available or not. Because whatever ip I give,udp link created for that. But I want to create link for available IP.
Anyone have idea?
Thanks in advance.
Answers (1)
Walter Roberson
on 2 Feb 2012
0 votes
The design of IP services (including UDP and TCP and ICMP) is such that it is not possible to prove that a host is down. You can ask a host for a reply, but if you do not get a reply then you do not know whether the host is down, or if the network failed to deliver the packets (equipment failure or overload), or there are security filters in the way, or if the host is simply deciding not to answer you.
The easier methods of asking a host for a reply involve creating and binding a TCP or UDP socket before you know whether the host is available -- exactly what you did not want to do.
I do not know if the more difficult ways of asking a host for a reply are supported. Are you using the Instrument Control Toolbox, or are you using the File Exchange Contribution "tcpudpip", or are you using a Simulink blockset?
Categories
Find more on Instrument Control Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!