Active LAN connection check

Hello,

I'm trying to write a small section of code that will indicate on my LCD panel if my ethernet shield has an active LAN connection. This shield is acting as a server, not a client. I stumbled across a prior thread Arduino Forum - Ping Library with some information, however I cannot figure out how to get the ping library that was offered to work. Just as an FYI, I'm not a programming guru, and am still learning. So I do appreciate any guidance on how to achieve this check. My current code that isn't working as it isn't pinging, but making a new connection via the gateway is as follows.

if(test.connect(gateway,80)) { Online = true; Tft.drawString("ONLINE",130,130,2,GREEN); } else { Online = false; Tft.drawString("OFFLINE",130,130,2,RED); }

I prefer not to make a new connection but rather test by pinging against the gateway.

Thanks

however I cannot figure out how to get the ping library that was offered to work

Step 1: Post what you tried. Step 2: Describe the problems. What did the code do that you didn't want? What did the code not do that you did want? Step 3: Use the Insert a link icon when posting URLs until the new forum software gets fixed to automatically make them links (if it ever does; spam bots can't press the icon).

Use the Insert a link icon when posting URLs until the new forum software gets fixed to automatically make them links (if it ever does; spam bots can’t press the icon).

Spam bots are smart enough to use [url=some spam link] whatever [/url]