Index: /trunk/src/VBox/Devices/Network/DrvNAT.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvNAT.cpp	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/DrvNAT.cpp	(revision 53399)
@@ -833,7 +833,7 @@
         DWORD dwEvent = WSAWaitForMultipleEvents(nFDs, phEvents, FALSE,
                                                  slirp_get_timeout_ms(pThis->pNATState),
-                                                 FALSE);
+                                                 /* :fAlertable */ TRUE);
         if (   (dwEvent < WSA_WAIT_EVENT_0 || dwEvent > WSA_WAIT_EVENT_0 + nFDs - 1)
-            && dwEvent != WSA_WAIT_TIMEOUT)
+            && dwEvent != WSA_WAIT_TIMEOUT && dwEvent != WSA_WAIT_IO_COMPLETION)
         {
             int error = WSAGetLastError();
@@ -845,10 +845,10 @@
         {
             /* only check for slow/fast timers */
-            slirp_select_poll(pThis->pNATState, /* fTimeout=*/true, /*fIcmp=*/false);
+            slirp_select_poll(pThis->pNATState, /* fTimeout=*/true);
             continue;
         }
         /* poll the sockets in any case */
         Log2(("%s: poll\n", __FUNCTION__));
-        slirp_select_poll(pThis->pNATState, /* fTimeout=*/false, /* fIcmp=*/(dwEvent == WSA_WAIT_EVENT_0));
+        slirp_select_poll(pThis->pNATState, /* fTimeout=*/false);
         /* process _all_ outstanding requests but don't wait */
         RTReqQueueProcess(pThis->hSlirpReqQueue, 0);
Index: /trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 53399)
@@ -56,9 +56,4 @@
 #include "slirp.h"
 #include "ip_icmp.h"
-#ifdef RT_OS_WINDOWS
-# include <Icmpapi.h>
-# include <Iphlpapi.h>
-# include <iprt/ldr.h>
-#endif
 
 /* The message sent when emulating PING */
@@ -97,4 +92,6 @@
     pData->icmp_socket.so_type = IPPROTO_ICMP;
     pData->icmp_socket.so_state = SS_ISFCONNECTED;
+
+#ifndef RT_OS_WINDOWS
     if (iIcmpCacheLimit < 0)
     {
@@ -103,5 +100,4 @@
     }
     pData->iIcmpCacheLimit = iIcmpCacheLimit;
-#ifndef RT_OS_WINDOWS
 # ifndef RT_OS_DARWIN
     pData->icmp_socket.s = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
@@ -118,4 +114,6 @@
     NSOCK_INC();
 
+    LIST_INIT(&pData->icmp_msg_head);
+
 #else /* RT_OS_WINDOWS */
     if (icmpwin_init(pData) != 0)
@@ -123,5 +121,4 @@
 #endif /* RT_OS_WINDOWS */
 
-    LIST_INIT(&pData->icmp_msg_head);
     return 0;
 }
@@ -133,12 +130,13 @@
 icmp_finit(PNATState pData)
 {
-    icmp_cache_clean(pData, -1);
 #ifdef RT_OS_WINDOWS
     icmpwin_finit(pData);
 #else
+    icmp_cache_clean(pData, -1);
     closesocket(pData->icmp_socket.s);
 #endif
 }
 
+#if !defined(RT_OS_WINDOWS)
 /*
  * ip here is ip header + 64bytes readed from ICMP packet
@@ -339,4 +337,5 @@
     return 0;
 }
+#endif /* !RT_OS_WINDOWS */
 
 /*
@@ -350,9 +349,5 @@
     uint8_t icmp_type;
     void *icp_buf = NULL;
-    int status;
     uint32_t dst;
-#if !defined(RT_OS_WINDOWS)
-    int ttl;
-#endif
 
     /* int code; */
@@ -409,12 +404,16 @@
                 goto done;
             }
-            else
+
+#ifdef RT_OS_WINDOWS
+            {
+                icmpwin_ping(pData, m, hlen);
+                break;          /* free mbuf */
+            }
+#else
             {
                 struct icmp *icp;
                 struct sockaddr_in addr;
-#ifdef RT_OS_WINDOWS
-                IP_OPTION_INFORMATION ipopt;
-                int error;
-#endif
+
+                /* XXX: FIXME: this is bogus, see CTL_CHECKs above */
                 addr.sin_family = AF_INET;
                 if ((ip->ip_dst.s_addr & RT_H2N_U32(pData->netmask)) == pData->special_addr.s_addr)
@@ -447,9 +446,11 @@
                     icp = (struct icmp *)(mtod(m, char *) + hlen);
 
-#ifndef RT_OS_WINDOWS
                 if (pData->icmp_socket.s != -1)
                 {
+                    static bool fIcmpSocketErrorReported;
+                    int ttl;
+                    int status;
                     ssize_t rc;
-                    static bool fIcmpSocketErrorReported;
+
                     ttl = ip->ip_ttl;
                     Log(("NAT/ICMP: try to set TTL(%d)\n", ttl));
@@ -478,52 +479,6 @@
                     icmp_error(pData, m, ICMP_UNREACH, ICMP_UNREACH_NET, 0, strerror(errno));
                 }
-#else /* RT_OS_WINDOWS */
-                pData->icmp_socket.so_laddr.s_addr = ip->ip_src.s_addr; /* XXX: hack*/
-                pData->icmp_socket.so_icmp_id = icp->icmp_id;
-                pData->icmp_socket.so_icmp_seq = icp->icmp_seq;
-                memset(&ipopt, 0, sizeof(IP_OPTION_INFORMATION));
-                ipopt.Ttl = ip->ip_ttl;
-                status = IcmpSendEcho2(pData->icmp_socket.sh /*=handle*/,
-                                       pData->phEvents[VBOX_ICMP_EVENT_INDEX] /*=Event*/,
-                                       NULL /*=ApcRoutine*/,
-                                       NULL /*=ApcContext*/,
-                                       addr.sin_addr.s_addr /*=DestinationAddress*/,
-                                       icp->icmp_data /*=RequestData*/,
-                                       icmplen - ICMP_MINLEN /*=RequestSize*/,
-                                       &ipopt /*=RequestOptions*/,
-                                       pData->pvIcmpBuffer /*=ReplyBuffer*/,
-                                       pData->cbIcmpBuffer /*=ReplySize*/,
-                                       1 /*=Timeout in ms*/);
-                error = GetLastError();
-                if (   status != 0
-                    || error == ERROR_IO_PENDING)
-                {
-                    /* no error! */
-                    m->m_so = &pData->icmp_socket;
-                    icmp_attach(pData, m);
-                    /* don't let m_freem at the end free atached buffer */
-                    goto done;
-                }
-                Log(("NAT: Error (%d) occurred while sending ICMP (", error));
-                switch (error)
-                {
-                    case ERROR_INVALID_PARAMETER:
-                        Log(("icmp_socket:%lx is invalid)\n", pData->icmp_socket.s));
-                        break;
-                    case ERROR_NOT_SUPPORTED:
-                        Log(("operation is unsupported)\n"));
-                        break;
-                    case ERROR_NOT_ENOUGH_MEMORY:
-                        Log(("OOM!!!)\n"));
-                        break;
-                    case IP_BUF_TOO_SMALL:
-                        Log(("Buffer too small)\n"));
-                        break;
-                    default:
-                        Log(("Other error!!!)\n"));
-                        break;
-                }
-#endif /* RT_OS_WINDOWS */
-            } /* if ip->ip_dst.s_addr == alias_addr.s_addr */
+            }
+#endif  /* !RT_OS_WINDOWS */
             break;
         case ICMP_UNREACH:
Index: /trunk/src/VBox/Devices/Network/slirp/ip_icmp.h
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/ip_icmp.h	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/ip_icmp.h	(revision 53399)
@@ -208,4 +208,5 @@
 void icmpwin_finit (PNATState);
 void icmpwin_ping(PNATState, struct mbuf *, int);
+void icmpwin_process(PNATState);
 #endif
 
Index: /trunk/src/VBox/Devices/Network/slirp/ip_icmpwin.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/ip_icmpwin.c	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/ip_icmpwin.c	(revision 53399)
@@ -41,4 +41,6 @@
     PNATState pData;
 
+    TAILQ_ENTRY(pong) queue_entry;
+
     struct ip reqiph;
     struct icmp_echo reqicmph;
@@ -53,4 +55,5 @@
 
 static void icmpwin_callback(struct pong *pong);
+static void icmpwin_pong(struct pong *pong);
 
 static struct mbuf *icmpwin_get_error(struct pong *pong, int type, int code);
@@ -91,8 +94,9 @@
     }
 
+    TAILQ_INIT(&pData->pongs_expected);
+    TAILQ_INIT(&pData->pongs_received);
+
     pData->icmp_socket.sh = IcmpCreateFile();
     pData->phEvents[VBOX_ICMP_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
-    pData->cbIcmpBuffer = sizeof(ICMP_ECHO_REPLY) * 10;
-    pData->pvIcmpBuffer = RTMemAlloc(pData->cbIcmpBuffer);
 
     return 0;
@@ -104,5 +108,17 @@
 {
     IcmpCloseHandle(pData->icmp_socket.sh);
-    RTMemFree(pData->pvIcmpBuffer);
+
+    while (!TAILQ_EMPTY(&pData->pongs_received)) {
+        struct pong *pong = TAILQ_FIRST(&pData->pongs_received);
+        TAILQ_REMOVE(&pData->pongs_received, pong, queue_entry);
+        RTMemFree(pong);
+    }
+ 
+    /* this should be empty */
+    while (!TAILQ_EMPTY(&pData->pongs_expected)) {
+        struct pong *pong = TAILQ_FIRST(&pData->pongs_expected);
+        TAILQ_REMOVE(&pData->pongs_expected, pong, queue_entry);
+        pong->pData = NULL;
+    }
 }
 
@@ -115,5 +131,5 @@
 {
     struct ip *ip = mtod(m, struct ip *);
-    size_t reqsize;
+    size_t reqsize, pongsize;
     uint8_t ttl;
     size_t bufsize;
@@ -137,5 +153,9 @@
     bufsize += 16; /* whatever that is; empirically at least XP needs it */
 
-    pong = RTMemAlloc(RT_OFFSETOF(struct pong, buf) + bufsize);
+    pongsize = RT_OFFSETOF(struct pong, buf) + bufsize;
+    if (pData->cbIcmpPending + pongsize > 1024 * 1024)
+        return;
+
+    pong = RTMemAlloc(pongsize);
     if (RT_UNLIKELY(pong == NULL))
         return;
@@ -209,9 +229,12 @@
     else /* success */
     {
-        Log2(("NAT: pong %p for ping %RTnaipv4 id 0x%04x seq %d len %d\n",
+        Log2(("NAT: pong %p for ping %RTnaipv4 id 0x%04x seq %d len %zu (%zu)\n",
               pong, dst,
               RT_N2H_U16(pong->reqicmph.icmp_echo_id),
               RT_N2H_U16(pong->reqicmph.icmp_echo_seq),
-              reqsize));
+              pongsize, reqsize));
+
+        pData->cbIcmpPending += pongsize;
+        TAILQ_INSERT_TAIL(&pData->pongs_expected, pong, queue_entry);
         pong = NULL;            /* callback owns it now */
     }
@@ -226,10 +249,6 @@
 {
     struct pong *pong = (struct pong *)ctx;
-
     if (pong != NULL)
-    {
         icmpwin_callback(pong);
-        RTMemFree(pong);
-    }
 }
 
@@ -239,10 +258,6 @@
 {
     struct pong *pong = (struct pong *)ctx;
-
     if (pong != NULL)
-    {
         icmpwin_callback(pong);
-        RTMemFree(pong);
-    }
 }
 
@@ -251,7 +266,76 @@
  * Actual callback code for IcmpSendEcho2().  OS version specific
  * trampoline will free "pong" argument for us.
+ *
+ * Since async callback can be called anytime the thread is alertable,
+ * it's not safe to do any processing here.  Instead queue it and
+ * notify the main loop.
  */
 static void
 icmpwin_callback(struct pong *pong)
+{
+    PNATState pData = pong->pData;
+
+    if (pData == NULL)
+    {
+        RTMemFree(pong);
+        return;
+    }
+
+#ifdef DEBUG
+    {
+        struct pong *expected, *already;
+
+        TAILQ_FOREACH(expected, &pData->pongs_expected, queue_entry)
+        {
+            if (expected == pong)
+                break;
+        }
+        Assert(expected);
+
+        TAILQ_FOREACH(already, &pData->pongs_received, queue_entry)
+        {
+            if (already == pong)
+                break;
+        }
+        Assert(!already);
+    }
+#endif
+
+    TAILQ_REMOVE(&pData->pongs_expected, pong, queue_entry);
+    TAILQ_INSERT_TAIL(&pData->pongs_received, pong, queue_entry);
+
+    WSASetEvent(pData->phEvents[VBOX_ICMP_EVENT_INDEX]);
+}
+
+
+void
+icmpwin_process(PNATState pData)
+{
+    struct pong_tailq pongs;
+
+    if (TAILQ_EMPTY(&pData->pongs_received))
+        return;
+
+    TAILQ_INIT(&pongs);
+    TAILQ_CONCAT(&pongs, &pData->pongs_received, queue_entry);
+
+    while (!TAILQ_EMPTY(&pongs)) {
+        struct pong *pong = TAILQ_FIRST(&pongs);
+        size_t sz;
+
+        sz = RT_OFFSETOF(struct pong, buf) + pong->bufsize;
+        Assert(pData->cbIcmpPending >= sz);
+        pData->cbIcmpPending -= sz;
+
+        icmpwin_pong(pong);
+
+        TAILQ_REMOVE(&pongs, pong, queue_entry);
+        RTMemFree(pong);
+    }
+}
+
+
+void
+icmpwin_pong(struct pong *pong)
 {
     PNATState pData;
Index: /trunk/src/VBox/Devices/Network/slirp/libslirp.h
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/libslirp.h	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/libslirp.h	(revision 53399)
@@ -56,5 +56,5 @@
 void slirp_select_fill(PNATState pData, int *pndfs);
 
-void slirp_select_poll(PNATState pData, int fTimeout, int fIcmp);
+void slirp_select_poll(PNATState pData, int fTimeout);
 #else /* RT_OS_WINDOWS */
 void slirp_select_fill(PNATState pData, int *pnfds, struct pollfd *polls);
Index: /trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 53399)
@@ -892,5 +892,5 @@
 
 #if defined(RT_OS_WINDOWS)
-void slirp_select_poll(PNATState pData, int fTimeout, int fIcmp)
+void slirp_select_poll(PNATState pData, int fTimeout)
 #else /* RT_OS_WINDOWS */
 void slirp_select_poll(PNATState pData, struct pollfd *polls, int ndfs)
@@ -942,9 +942,5 @@
         goto done;
 #if defined(RT_OS_WINDOWS)
-    /*XXX: before renaming please make see define
-     * fIcmp in slirp_state.h
-     */
-    if (fIcmp)
-        sorecvfrom(pData, &pData->icmp_socket);
+    icmpwin_process(pData);
 #else
     if (   (pData->icmp_socket.s != -1)
Index: /trunk/src/VBox/Devices/Network/slirp/slirp_state.h
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 53399)
@@ -96,4 +96,8 @@
 
 
+#ifdef RT_OS_WINDOWS
+struct pong;
+TAILQ_HEAD(pong_tailq, pong);
+#endif
 
 /* forward declaration */
@@ -199,11 +203,14 @@
 
     struct socket icmp_socket;
+# if !defined(RT_OS_WINDOWS)
     struct icmp_storage icmp_msg_head;
     int cIcmpCacheSize;
     int iIcmpCacheLimit;
-# ifdef RT_OS_WINDOWS
-    void *pvIcmpBuffer;
-    uint32_t cbIcmpBuffer;
+# else
+    struct pong_tailq pongs_expected;
+    struct pong_tailq pongs_received;
+    size_t cbIcmpPending;
 # endif
+
 #if defined(RT_OS_WINDOWS)
 # define VBOX_SOCKET_EVENT (pData->phEvents[VBOX_SOCKET_EVENT_INDEX])
Index: /trunk/src/VBox/Devices/Network/slirp/socket.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/socket.c	(revision 53398)
+++ /trunk/src/VBox/Devices/Network/slirp/socket.c	(revision 53399)
@@ -128,8 +128,7 @@
 }
 #endif /* !VBOX_WITH_NAT_SEND2HOME */
+
+#if !defined(RT_OS_WINDOWS)
 static void send_icmp_to_guest(PNATState, char *, size_t, const struct sockaddr_in *);
-#ifdef RT_OS_WINDOWS
-static void sorecvfrom_icmp_win(PNATState, struct socket *);
-#else /* RT_OS_WINDOWS */
 static void sorecvfrom_icmp_unix(PNATState, struct socket *);
 #endif /* !RT_OS_WINDOWS */
@@ -811,16 +810,17 @@
 {
     LogFlowFunc(("sorecvfrom: so = %lx\n", (long)so));
-
+ 
+#ifdef RT_OS_WINDOWS
+    /* ping is handled with ICMP API in ip_icmpwin.c */
+    Assert(so->so_type == IPPROTO_UDP);
+#else
     if (so->so_type == IPPROTO_ICMP)
     {
         /* This is a "ping" reply */
-#ifdef RT_OS_WINDOWS
-        sorecvfrom_icmp_win(pData, so);
-#else /* RT_OS_WINDOWS */
         sorecvfrom_icmp_unix(pData, so);
+        udp_detach(pData, so);
+    }
+    else
 #endif /* !RT_OS_WINDOWS */
-        udp_detach(pData, so);
-    }
-    else
     {
         static uint8_t au8Buf[64 * 1024];
@@ -1272,4 +1272,5 @@
 }
 
+#if !defined(RT_OS_WINDOWS)
 static void
 send_icmp_to_guest(PNATState pData, char *buff, size_t len, const struct sockaddr_in *addr)
@@ -1442,153 +1443,4 @@
 }
 
-#ifdef RT_OS_WINDOWS
-static void
-sorecvfrom_icmp_win(PNATState pData, struct socket *so)
-{
-    int len;
-    int i;
-    struct ip *ip;
-    struct mbuf *m;
-    struct icmp *icp;
-    struct icmp_msg *icm;
-    struct ip *ip_broken; /* ICMP returns header + 64 bit of packet */
-    uint32_t src;
-    ICMP_ECHO_REPLY *icr;
-    int hlen = 0;
-    int nbytes = 0;
-    u_char code = ~0;
-    int out_len;
-    int size;
-
-    len = IcmpParseReplies(pData->pvIcmpBuffer, pData->cbIcmpBuffer);
-    if (len < 0)
-    {
-        LogRel(("NAT: Error (%d) occurred on ICMP receiving\n", GetLastError()));
-        return;
-    }
-    if (len == 0)
-        return; /* no error */
-
-    icr = (ICMP_ECHO_REPLY *)pData->pvIcmpBuffer;
-    for (i = 0; i < len; ++i)
-    {
-        LogFunc(("icr[%d] Data:%p, DataSize:%d\n",
-                 i, icr[i].Data, icr[i].DataSize));
-        switch(icr[i].Status)
-        {
-            case IP_DEST_HOST_UNREACHABLE:
-                code = (code != ~0 ? code : ICMP_UNREACH_HOST);
-            case IP_DEST_NET_UNREACHABLE:
-                code = (code != ~0 ? code : ICMP_UNREACH_NET);
-            case IP_DEST_PROT_UNREACHABLE:
-                code = (code != ~0 ? code : ICMP_UNREACH_PROTOCOL);
-                /* UNREACH error inject here */
-            case IP_DEST_PORT_UNREACHABLE:
-                code = (code != ~0 ? code : ICMP_UNREACH_PORT);
-                icmp_error(pData, so->so_m, ICMP_UNREACH, code, 0, "Error occurred!!!");
-                so->so_m = NULL;
-                break;
-            case IP_SUCCESS: /* echo replied */
-                out_len = ETH_HLEN + sizeof(struct ip) +  8;
-                size;
-                size = MCLBYTES;
-                if (out_len < MSIZE)
-                    size = MCLBYTES;
-                else if (out_len < MCLBYTES)
-                    size = MCLBYTES;
-                else if (out_len < MJUM9BYTES)
-                    size = MJUM9BYTES;
-                else if (out_len < MJUM16BYTES)
-                    size = MJUM16BYTES;
-                else
-                    AssertMsgFailed(("Unsupported size"));
-
-                m = m_getjcl(pData, M_NOWAIT, MT_HEADER, M_PKTHDR, size);
-                LogFunc(("m_getjcl returns m: %p\n", m));
-                if (m == NULL)
-                    return;
-                m->m_len = 0;
-                m->m_data += if_maxlinkhdr;
-                m->m_pkthdr.header = mtod(m, void *);
-
-                ip = mtod(m, struct ip *);
-                ip->ip_src.s_addr = icr[i].Address;
-                ip->ip_p = IPPROTO_ICMP;
-                ip->ip_dst.s_addr = so->so_laddr.s_addr; /*XXX: still the hack*/
-                ip->ip_hl =  sizeof(struct ip) >> 2; /* requiered for icmp_reflect, no IP options */
-                ip->ip_ttl = icr[i].Options.Ttl;
-
-                icp = (struct icmp *)&ip[1]; /* no options */
-                icp->icmp_type = ICMP_ECHOREPLY;
-                icp->icmp_code = 0;
-                icp->icmp_id = so->so_icmp_id;
-                icp->icmp_seq = so->so_icmp_seq;
-
-                icm = icmp_find_original_mbuf(pData, ip);
-                if (icm)
-                {
-                    /* on this branch we don't need stored variant */
-                    m_freem(pData, icm->im_m);
-                    LIST_REMOVE(icm, im_list);
-                    pData->cIcmpCacheSize--;
-                    RTMemFree(icm);
-                }
-
-
-                hlen = (ip->ip_hl << 2);
-                Assert((hlen >= sizeof(struct ip)));
-
-                m->m_data += hlen + ICMP_MINLEN;
-                if (!RT_VALID_PTR(icr[i].Data))
-                {
-                    m_freem(pData, m);
-                    break;
-                }
-                m_copyback(pData, m, 0, icr[i].DataSize, icr[i].Data);
-                m->m_data -= hlen + ICMP_MINLEN;
-                m->m_len += hlen + ICMP_MINLEN;
-
-
-                ip->ip_len = m_length(m, NULL);
-                Assert((ip->ip_len == hlen + ICMP_MINLEN + icr[i].DataSize));
-
-                icmp_reflect(pData, m);
-                break;
-            case IP_TTL_EXPIRED_TRANSIT: /* TTL expired */
-
-                ip_broken = icr[i].Data;
-                icm = icmp_find_original_mbuf(pData, ip_broken);
-                if (icm == NULL) {
-                    Log(("ICMP: can't find original package (first double word %x)\n", *(uint32_t *)ip_broken));
-                    return;
-                }
-                m = icm->im_m;
-                ip = mtod(m, struct ip *);
-                Assert(((ip_broken->ip_hl >> 2) >= sizeof(struct ip)));
-                ip->ip_ttl = icr[i].Options.Ttl;
-                src = ip->ip_src.s_addr;
-                ip->ip_dst.s_addr = src;
-                ip->ip_dst.s_addr = icr[i].Address;
-
-                hlen = (ip->ip_hl << 2);
-                icp = (struct icmp *)((char *)ip + hlen);
-                ip_broken->ip_src.s_addr = src; /*it packet sent from host not from guest*/
-
-                m->m_len = (ip_broken->ip_hl << 2) + 64;
-                m->m_pkthdr.header = mtod(m, void *);
-                m_copyback(pData, m, ip->ip_hl >> 2, icr[i].DataSize, icr[i].Data);
-                icmp_reflect(pData, m);
-                /* Here is different situation from Unix world, where we can receive icmp in response on TCP/UDP */
-                LIST_REMOVE(icm, im_list);
-                pData->cIcmpCacheSize--;
-                RTMemFree(icm);
-                break;
-            default:
-                Log(("ICMP(default): message with Status: %x was received from %x\n", icr[i].Status, icr[i].Address));
-                break;
-        }
-    }
-}
-#else /* !RT_OS_WINDOWS */
 static void sorecvfrom_icmp_unix(PNATState pData, struct socket *so)
 {
