ICMPPing.cpp, help needed to get the correct TTL value from the IP Header

Hi all,

I have been using the Arduino-Ping library written by Blake Foster. I have come across two issues with the library, 1 being the initial TTL (Time To Live) value was set to low (128 instead of 255).

The second issue is a tad more tricky. The library is returning the initial TTL value, rather than pulling the correct value from the packet header when processing the response. Line 192 is where the code goes wrong.

This is kinda where the library goes over my header a little (never really got my head around pointers). The W5100.read_data on line 177 doesn't seem to pull enough of the header through. I've looked at the datasheet for the W5100 but it doesn't mean a lot to me.

If anyone can offer any guidance I would be most grateful.