 #define IP 192,168,1,150
 #define SUBNET 255,255,255,0
 static const uint8_t mac[6] __PROGMEM = { MAC };
-static const char hostname[] __PROGMEM = "CosaICMPping";
 
 // W5100 Ethernet Controller
 W5100 ethernet(mac);
 
+// ICMP header (section from /usr/include/netinet/ip_icmp.h)
+// All message type and codes included (not really needed)
 struct icmphdr
 {
   uint8_t type;			/* message type */

  if (INET::checksum(&reply, sizeof(reply)) != 0) goto error;

  // Calculate the time for the ping roundtrip
  roundtrip -= reply.timestamp;
  INFO("Roundtrip: %ul us", roundtrip);

 error:
  sock->close();

  int res = sock->send(&req, sizeof(req), dest, 0);
  if (res < 0) goto error;

  // Wait for the reply
  const static uint8_t RETRY_MAX = 16;
  uint32_t stop;
  icmphdr reply;
  uint8_t src[4];
  uint16_t port;
  for (uint8_t retry = 0; retry < RETRY_MAX; retry++) {
    if ((res = sock->available()) > 0) break;
    delay(1);
  }

  // Check size of reply before actually recieving
  if (res != sizeof(reply) + sizeof(IPRAW_HEADER)) goto error;
  res = sock->recv(&reply, sizeof(reply), src, port);
  stop = RTC::micros();
  INFO("Receive the reply", 0);

  // Sanity check the reply; right size, type, id, seq nr, and checksum
  if (res != sizeof(reply)) goto error;
