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.
Jump to Post
Well, 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 …
All 5 Replies
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.