at the time of start up of solaris operating system my application is using ping command to known whether GPS device is available or not. PING cmd some times its not working properly. so i need any command or c++ code to find whether GPS device is available or not
Ping is fairly well tested. I'm pretty sure that is 'works'. What about it doesn't seem to be working for you? If there are major problems with your version maybe think about getting a new version and installing it again.
In either case, if all you are doing is using ping to test connectivity to a well known address you can do that purely in sockets code.
I'm not familiar with Solaris so you'll have to google for insight on how to use sockets on Solaris.