ICMPPing error message help

I have an Arduino Uno with an Ethernet shield. I have installed the ICMPPing library and trying to use the included example. Changed my IP address, etc.

/*
  Ping Example
 
 This example sends an ICMP pings every 500 milliseconds, sends the human-readable
 result over the serial port. 

 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 
 created 30 Sep 2010
 by Blake Foster
 
 */

#include <SPI.h>         
#include <Ethernet.h>
#include <ICMPPing.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; // max address for ethernet shield
byte ip[] = {10,1,1,177}; // ip address for ethernet shield
IPAddress pingAddr(10,1,1,101); // ip address to ping

SOCKET pingSocket = 0;

char buffer [256];
ICMPPing ping(pingSocket, (uint16_t)random(0, 255));

void setup() 
{
  // start Ethernet
  Ethernet.begin(mac, ip);
  Serial.begin(9600);
}

void loop()
{
  ICMPEchoReply echoReply = ping(pingAddr, 4);
  if (echoReply.status == SUCCESS)
  {
    sprintf(buffer,
            "Reply[%d] from: %d.%d.%d.%d: bytes=%d time=%ldms TTL=%d",
            echoReply.data.seq,
            echoReply.addr[0],
            echoReply.addr[1],
            echoReply.addr[2],
            echoReply.addr[3],
            REQ_DATASIZE,
            millis() - echoReply.data.time,
            echoReply.ttl);
  }
  else
  {
    sprintf(buffer, "Echo request failed; %d", echoReply.status);
  }
  Serial.println(buffer);
  delay(500);
}

When I try to load the sketch I get the following error message.

Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Uno"

E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp: In member function 'void ICMPEcho::serialize(uint8_t*) const':
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp:71: error: 'htons' was not declared in this scope
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp:74: error: 'htonl' was not declared in this scope
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp: In member function 'void ICMPEcho::deserialize(const uint8_t*)':
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp:84: error: 'ntohs' was not declared in this scope
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp:90: error: 'ntohl' was not declared in this scope
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp: In member function 'void ICMPPing::receiveEchoReply(const ICMPEcho&, const IPAddress&, ICMPEchoReply&)':
E:\Program Files (x86)\Arduino\libraries\ICMPPing\ICMPPing.cpp:219: error: 'ntohs' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Fairly new at this. Any suggestions?

thanks

I have installed the ICMPPing library

From WalMart?

I have an Arduino Uno

So, you should be using 1.0.5.

I downloaded the library from here, version 2: Arduino Playground - HomePage

The error was from using 1.5.6-r2-windows. I receive the following error using 1.0.5-r2-windows.

E:\Program Files (x86)\Arduino Uno\libraries\ICMPPing\ICMPPing.cpp: In member function 'void ICMPPing::receiveEchoReply(const ICMPEcho&, const IPAddress&, ICMPEchoReply&)':
E:\Program Files (x86)\Arduino Uno\libraries\ICMPPing\ICMPPing.cpp:177: error: invalid conversion from 'uint16_t' to 'volatile uint8_t*'
E:\Program Files (x86)\Arduino Uno\libraries\ICMPPing\ICMPPing.cpp:177: error: initializing argument 2 of 'void W5100Class::read_data(SOCKET, volatile uint8_t*, volatile uint8_t*, uint16_t)'
E:\Program Files (x86)\Arduino Uno\libraries\ICMPPing\ICMPPing.cpp:185: error: invalid conversion from 'uint16_t' to 'volatile uint8_t*'
E:\Program Files (x86)\Arduino Uno\libraries\ICMPPing\ICMPPing.cpp:185: error: initializing argument 2 of 'void W5100Class::read_data(SOCKET, volatile uint8_t*, volatile uint8_t*, uint16_t)'

I just downloaded Version 2, and the Ping.ino examples compiles and links just fine for me.

and me > tanks alot.
i nedd ping ver 2 not worked .

please help me >>>>>>>>>>>>>>

this is going to sound strange,

try closing the arduino software, copying the code into a new project and try loading that. i find this will work for me sometimes, im not sure why but it dose.

i tired i need ping ver 2 this not work .pleas tell to me how to fixed . i change my windos i change my arduino software ...

downloaded every library icmp ping and test example .

so == NOT WORK