I'm trying to set up a way to ping a whole subnet's worth of IP addresses, using ICMPPing (attached), and then later on display the results on an LCD. I know I'm going to need an array of some kind, but I'm wondering what would work best. A few modifiers:

I'm using an Arduino Mega, so I have some room to work.

I don't know exactly how many IP addresses will be in the array. I'm willing to hard-code it to a max of 256 if need be.

The address lengths can vary from as small as 7 to as large as 15 characters.

I'm passing a 4-position byte array for the IP address (one for each octet). If I can still use that, that's great, but if I need to convert it to another type, that's fine as well.

I don't have any code yet, because I'm trying to wrap my brain around the whole array thing. What would be best way to do this?

If I get it right,You only need to convert the IP addresses at the moment that you intend to display them. So, you may store the numbers in 4 byte format (what about IPV6?). So theoretically there is no real limit.4 bytes with 256 addresses would generate 1K size array max.once you start to display it on an LCD, you can convert it send it to the display and use the same storage for the next IP address. Once it is transferred to the LCD, the variables used to generate the text version of the IP address can be reused again.

If I get it right,You only need to convert the IP addresses at the moment that you intend to display them. So, you may store the numbers in 4 byte format (what about IPV6?). So theoretically there is no real limit.4 bytes with 256 addresses would generate 1K size array max.once you start to display it on an LCD, you can convert it send it to the display and use the same storage for the next IP address. Once it is transferred to the LCD, the variables used to generate the text version of the IP address can be reused again.

Answers:IPv6: I'm just happy that the reason I'm building this are actually using IP. If ICMPPing and the W5100 would support v6, I'll add it. But that's for the future.For the display & use same storage: I found a function that will scroll through an array, and display array and array [i+1] until you press a button, and then it will increment i and display array and array[i+1] until it's completed. Because of that, I need to keep however many IP addresses it finds.

They are contiguous in the sense that the ones you are pinging are all in the 192.168.100.xxx set. There are only 356 possibilities in that range. Using 32 bytes, and bitSet (0 means not answering; 1 means yes, I'm here), you can store all the data in just 32 bytes.