hello.. I am trying to write a code which can ping multiple ip addresses and depending on the reply print whether the server is on. My approach is to save the addresses in an array, then ping them using a for loop.
I am not sure about the data type i must use for ip addresses and how to use the system ping command after the array is created.
pls help..
Aish_14
0
Newbie Poster
Recommended Answers
Jump to PostWell, ping is a UDP protocol. There is a message format. You need to format a ping message, open a reply port, and send the message (with reply port) to the IP address using UDP, and then wait for the reply (usually using the select() function). You will need a …
Jump to Postsame as any other, except you get it out of the array first.
If you don't know how to, learn about arrays...
All 5 Replies
Aish_14
0
Newbie Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Aish_14
0
Newbie Poster
jwenting
1,889
duckman
Team Colleague
Aish_14
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.