Index: trunk/src/VBox/Devices/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/Makefile.kmk	(revision 18874)
+++ trunk/src/VBox/Devices/Makefile.kmk	(revision 18902)
@@ -667,5 +667,4 @@
 
 # some day will be deleted
-VBOX_WITH_SIMPLIFIED_SLIRP_SYNC=1
 VBOX_WITH_MULTI_DNS=1
 
@@ -673,5 +672,4 @@
 define def_vbox_slirp_cflags
   $(file)_DEFS += \
-      $(if $(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC), VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) \
       $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
       $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,)	\
Index: trunk/src/VBox/Devices/Network/DrvNAT.cpp
===================================================================
--- trunk/src/VBox/Devices/Network/DrvNAT.cpp	(revision 18874)
+++ trunk/src/VBox/Devices/Network/DrvNAT.cpp	(revision 18902)
@@ -40,14 +40,12 @@
 #include "Builtins.h"
 
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-# ifndef RT_OS_WINDOWS
-#  include <unistd.h>
-#  include <fcntl.h>
-#  include <poll.h>
-# endif
-# include <errno.h>
-# include <iprt/semaphore.h>
-# include <iprt/req.h>
-#endif
+#ifndef RT_OS_WINDOWS
+# include <unistd.h>
+# include <fcntl.h>
+# include <poll.h>
+#endif
+#include <errno.h>
+#include <iprt/semaphore.h>
+#include <iprt/req.h>
 
 /**
@@ -74,8 +72,4 @@
     /** Pointer to the driver instance. */
     PPDMDRVINS              pDrvIns;
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    /** Slirp critical section. */
-    RTCRITSECT              CritSect;
-#endif
     /** Link state */
     PDMNETWORKLINKSTATE     enmLinkState;
@@ -88,5 +82,4 @@
     /** tftp server name to provide in the DHCP server response. */
     char                    *pszNextServer;
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
     /* polling thread */
     PPDMTHREAD              pThread;
@@ -95,16 +88,15 @@
     /* Send queue */
     PPDMQUEUE               pSendQueue;
-# ifdef VBOX_WITH_SLIRP_MT
+#ifdef VBOX_WITH_SLIRP_MT
     PPDMTHREAD              pGuestThread;
-# endif
-# ifndef RT_OS_WINDOWS
+#endif
+#ifndef RT_OS_WINDOWS
     /** The write end of the control pipe. */
     RTFILE                  PipeWrite;
     /** The read end of the control pipe. */
     RTFILE                  PipeRead;
-# else
+#else
     /** for external notification */
     HANDLE                  hWakeupEvent;
-# endif
 #endif
 } DRVNAT, *PDRVNAT;
@@ -152,6 +144,4 @@
     Log2(("drvNATSend: pvBuf=%p cb=%#x\n%.*Rhxd\n", pvBuf, cb, cb, pvBuf));
 
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-
     PRTREQ pReq = NULL;
     int rc;
@@ -160,9 +150,9 @@
     if (pThis->pThread->enmState != PDMTHREADSTATE_RUNNING)
         return VINF_SUCCESS;
-# ifndef VBOX_WITH_SLIRP_MT
+#ifndef VBOX_WITH_SLIRP_MT
     rc = RTReqAlloc(pThis->pReqQueue, &pReq, RTREQTYPE_INTERNAL);
-# else
+#else
     rc = RTReqAlloc((PRTREQQUEUE)slirp_get_queue(pThis->pNATState), &pReq, RTREQTYPE_INTERNAL);
-# endif
+#endif
     AssertReleaseRC(rc);
 
@@ -185,24 +175,13 @@
     rc = RTReqQueue(pReq, 0); /* don't wait, we have to wakeup the NAT thread fist */
     AssertReleaseRC(rc);
-# ifndef RT_OS_WINDOWS
+#ifndef RT_OS_WINDOWS
     /* kick select() */
     rc = RTFileWrite(pThis->PipeWrite, "", 1, NULL);
     AssertRC(rc);
-# else
+#else
     /* kick WSAWaitForMultipleEvents */
     rc = WSASetEvent(pThis->hWakeupEvent);
     AssertRelease(rc == TRUE);
-# endif
-
-#else /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    AssertReleaseRC(rc);
-
-    drvNATSendWorker(pThis, pvBuf, cb);
-
-    RTCritSectLeave(&pThis->CritSect);
-
-#endif /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif
 
     LogFlow(("drvNATSend: end\n"));
@@ -265,6 +244,4 @@
 
     LogFlow(("drvNATNotifyLinkChanged: enmLinkState=%d\n", enmLinkState));
-
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 
     PRTREQ pReq = NULL;
@@ -282,13 +259,13 @@
     if (RT_LIKELY(rc == VERR_TIMEOUT))
     {
-# ifndef RT_OS_WINDOWS
+#ifndef RT_OS_WINDOWS
         /* kick select() */
         rc = RTFileWrite(pThis->PipeWrite, "", 1, NULL);
         AssertRC(rc);
-# else
+#else
         /* kick WSAWaitForMultipleEvents() */
         rc = WSASetEvent(pThis->hWakeupEvent);
         AssertRelease(rc == TRUE);
-# endif
+#endif
         rc = RTReqWait(pReq, RT_INDEFINITE_WAIT);
         AssertReleaseRC(rc);
@@ -297,46 +274,6 @@
         AssertReleaseRC(rc);
     RTReqFree(pReq);
-
-#else /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    AssertReleaseRC(rc);
-    drvNATNotifyLinkChangedWorker(pThis, enmLinkState);
-    RTCritSectLeave(&pThis->CritSect);
-
-#endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-}
-
-
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-
-/**
- * Poller callback.
- */
-static DECLCALLBACK(void) drvNATPoller(PPDMDRVINS pDrvIns)
-{
-    PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
-    fd_set  ReadFDs;
-    fd_set  WriteFDs;
-    fd_set  XcptFDs;
-    int     nFDs = -1;
-    FD_ZERO(&ReadFDs);
-    FD_ZERO(&WriteFDs);
-    FD_ZERO(&XcptFDs);
-
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    AssertReleaseRC(rc);
-
-    slirp_select_fill(pThis->pNATState, &nFDs, &ReadFDs, &WriteFDs, &XcptFDs);
-
-    struct timeval tv = {0, 0}; /* no wait */
-    int cChangedFDs = select(nFDs + 1, &ReadFDs, &WriteFDs, &XcptFDs, &tv);
-    if (cChangedFDs >= 0)
-        slirp_select_poll(pThis->pNATState, &nFDs, &ReadFDs, &WriteFDs, &XcptFDs);
-
-    RTCritSectLeave(&pThis->CritSect);
-}
-
-#else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+}
+
 
 static DECLCALLBACK(int) drvNATAsyncIoThread(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
@@ -345,12 +282,12 @@
     int     nFDs = -1;
     unsigned int ms;
-# ifdef RT_OS_WINDOWS
+#ifdef RT_OS_WINDOWS
     DWORD   event;
     HANDLE  *phEvents;
     unsigned int cBreak = 0;
-# else /* RT_OS_WINDOWS */
+#else /* RT_OS_WINDOWS */
     struct pollfd *polls = NULL;
-    unsigned int cPollNegRet;
-# endif /* !RT_OS_WINDOWS */
+    unsigned int cPollNegRet = 0;
+#endif /* !RT_OS_WINDOWS */
 
     LogFlow(("drvNATAsyncIoThread: pThis=%p\n", pThis));
@@ -359,7 +296,7 @@
         return VINF_SUCCESS;
 
-# ifdef RT_OS_WINDOWS
+#ifdef RT_OS_WINDOWS
     phEvents = slirp_get_events(pThis->pNATState);
-# endif /* RT_OS_WINDOWS */
+#endif /* RT_OS_WINDOWS */
 
     /*
@@ -373,5 +310,5 @@
          * To prevent concurent execution of sending/receving threads
          */
-# ifndef RT_OS_WINDOWS
+#ifndef RT_OS_WINDOWS
         nFDs = slirp_get_nsock(pThis->pNATState);
         polls = NULL;
@@ -423,5 +360,5 @@
         }
         RTMemFree(polls);
-# else /* RT_OS_WINDOWS */
+#else /* RT_OS_WINDOWS */
         slirp_select_fill(pThis->pNATState, &nFDs);
         ms = slirp_get_timeout_ms(pThis->pNATState);
@@ -449,5 +386,5 @@
         /* process _all_ outstanding requests but don't wait */
         RTReqProcess(pThis->pReqQueue, 0);
-#  ifdef VBOX_NAT_DELAY_HACK
+# ifdef VBOX_NAT_DELAY_HACK
         if (cBreak++ > 128)
         {
@@ -455,6 +392,6 @@
             RTThreadSleep(2);
         }
-#  endif
-# endif /* RT_OS_WINDOWS */
+# endif
+#endif /* RT_OS_WINDOWS */
     }
 
@@ -473,17 +410,17 @@
     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
 
-# ifndef RT_OS_WINDOWS
+#ifndef RT_OS_WINDOWS
     /* kick select() */
     int rc = RTFileWrite(pThis->PipeWrite, "", 1, NULL);
     AssertRC(rc);
-# else /* !RT_OS_WINDOWS */
+#else /* !RT_OS_WINDOWS */
     /* kick WSAWaitForMultipleEvents() */
     WSASetEvent(pThis->hWakeupEvent);
-# endif /* RT_OS_WINDOWS */
+#endif /* RT_OS_WINDOWS */
 
     return VINF_SUCCESS;
 }
 
-# ifdef VBOX_WITH_SLIRP_MT
+#ifdef VBOX_WITH_SLIRP_MT
 static DECLCALLBACK(int) drvNATAsyncIoGuest(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
 {
@@ -504,7 +441,5 @@
     return VINF_SUCCESS;
 }
-# endif /* VBOX_WITH_SLIRP_MT */
-
-#endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif /* VBOX_WITH_SLIRP_MT */
 
 
@@ -519,15 +454,5 @@
 
     Assert(pThis);
-
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    /** Happens during termination */
-    if (!RTCritSectIsOwner(&pThis->CritSect))
-        return 0;
-
-    int rc =  pThis->pPort->pfnWaitReceiveAvail(pThis->pPort, 0);
-    return RT_SUCCESS(rc);
-#else
     return 1;
-#endif
 }
 
@@ -536,9 +461,5 @@
  * Function called by slirp to feed incoming data to the network port.
  */
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 void slirp_output(void *pvUser, void *pvArg, const uint8_t *pu8Buf, int cb)
-#else
-void slirp_output(void *pvUser, const uint8_t *pu8Buf, int cb)
-#endif
 {
     PDRVNAT pThis = (PDRVNAT)pvUser;
@@ -548,14 +469,4 @@
 
     Assert(pThis);
-
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    /** Happens during termination */
-    if (!RTCritSectIsOwner(&pThis->CritSect))
-        return;
-
-    int rc = pThis->pPort->pfnReceive(pThis->pPort, pu8Buf, cb);
-    AssertRC(rc);
-    LogFlow(("slirp_output END %x %d\n", pu8Buf, cb));
-#else
 
     PDRVNATQUEUITEM pItem = (PDRVNATQUEUITEM)PDMQueueAlloc(pThis->pSendQueue);
@@ -580,8 +491,6 @@
     }
     RTMemFree((void *)pu8Buf);
-#endif
-}
-
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
+}
+
 /**
  * Queue callback for processing a queued item.
@@ -620,5 +529,4 @@
     return RT_SUCCESS(rc);
 }
-#endif
 
 /**
@@ -661,14 +569,6 @@
     LogFlow(("drvNATDestruct:\n"));
 
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    int rc = RTCritSectEnter(&pThis->CritSect);
-    AssertReleaseRC(rc);
-#endif
     slirp_term(pThis->pNATState);
     pThis->pNATState = NULL;
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    RTCritSectLeave(&pThis->CritSect);
-    RTCritSectDelete(&pThis->CritSect);
-#endif
 }
 
@@ -888,12 +788,4 @@
 
     /*
-     * The slirp lock..
-     */
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    rc = RTCritSectInit(&pThis->CritSect);
-    if (RT_FAILURE(rc))
-        return rc;
-#endif
-    /*
      * Initialize slirp.
      */
@@ -920,7 +812,4 @@
                                        NULL, NULL, NULL, NULL, NULL, drvNATLoadDone);
             AssertRC(rc2);
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-            pDrvIns->pDrvHlp->pfnPDMPollerRegister(pDrvIns, drvNATPoller);
-#else
             rc = RTReqCreateQueue(&pThis->pReqQueue);
             if (RT_FAILURE(rc))
@@ -937,5 +826,5 @@
             }
 
-# ifndef RT_OS_WINDOWS
+#ifndef RT_OS_WINDOWS
             /*
              * Create the control pipe.
@@ -950,8 +839,8 @@
             pThis->PipeRead = fds[0];
             pThis->PipeWrite = fds[1];
-# else
+#else
             pThis->hWakeupEvent = CreateEvent(NULL, FALSE, FALSE, NULL); /* auto-reset event */
             slirp_register_external_event(pThis->pNATState, pThis->hWakeupEvent, VBOX_WAKEUP_EVENT_INDEX);
-# endif
+#endif
 
             rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pThread, pThis, drvNATAsyncIoThread, drvNATAsyncIoWakeup, 128 * _1K, RTTHREADTYPE_IO, "NAT");
@@ -961,5 +850,4 @@
             rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pGuestThread, pThis, drvNATAsyncIoGuest, drvNATAsyncIoGuestWakeup, 128 * _1K, RTTHREADTYPE_IO, "NATGUEST");
             AssertReleaseRC(rc);
-#endif
 #endif
 
@@ -980,8 +868,4 @@
     }
 
-
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    RTCritSectDelete(&pThis->CritSect);
-#endif
     return rc;
 }
Index: trunk/src/VBox/Devices/Network/slirp/bootp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 18902)
@@ -180,7 +180,4 @@
     rbp = mtod(m, struct bootp_t *);
     memset(rbp, 0, sizeof(struct bootp_t));
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    m->m_data += sizeof(struct udpiphdr);
-#endif
 
     if (dhcp_msg_type == DHCPDISCOVER)
@@ -341,8 +338,6 @@
              - sizeof(struct ip)
              - sizeof(struct udphdr);
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
     m->m_data += sizeof(struct udphdr)
-             + sizeof(struct ip);
-#endif
+               + sizeof(struct ip);
     /* Reply to the broadcast address, as some clients perform paranoid checks. */
     daddr.sin_addr.s_addr = INADDR_BROADCAST;
Index: trunk/src/VBox/Devices/Network/slirp/if.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/if.c	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/if.c	(revision 18902)
@@ -28,11 +28,6 @@
 if_init(PNATState pData)
 {
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
     /* 14 for ethernet */
-    if_maxlinkhdr =  14;
-#else
-    /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */
-    if_maxlinkhdr =  2 + 14 + 40;
-#endif
+    if_maxlinkhdr = 14;
     if_queued = 0;
     if_thresh = 10;
@@ -229,10 +224,5 @@
         }
 
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
         if_encap(pData, ETH_P_IP, ifm);
-#else
-        if_encap(pData,  mtod(ifm, uint8_t *), ifm->m_len);
-        m_free(pData, ifm);
-#endif
 
         if (!if_queued)
Index: trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 18902)
@@ -43,14 +43,7 @@
 
 #ifdef RT_OS_WINDOWS
-# ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 # define ICMP_SEND_ECHO(event, routine, addr, data, datasize, ipopt)                                        \
                 IcmpSendEcho2(pData->icmp_socket.sh, (event), NULL, NULL, (addr), (data), (datasize),       \
                                (ipopt), pData->pvIcmpBuffer, pData->szIcmpBuffer, 1)
-# else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-# define ICMP_SEND_ECHO(event, routine, addr, data, datasize, ipopt)                                                        \
-                IcmpSendEcho2(pData->icmp_socket.sh, NULL, (FARPROC)(routine), (void *)pData, (addr), (data), (datasize),   \
-                             (ipopt), pData->pvIcmpBuffer, pData->szIcmpBuffer, 1)
-static void WINAPI notify_slirp(void *);
-# endif /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
 #endif /* RT_OS_WINDOWS */
 
@@ -152,7 +145,5 @@
     }
     pData->icmp_socket.sh = IcmpCreateFile();
-# ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
     pData->phEvents[VBOX_ICMP_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
-# endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
     pData->szIcmpBuffer = sizeof(ICMP_ECHO_REPLY) * 10;
     pData->pvIcmpBuffer = RTMemAlloc(pData->szIcmpBuffer);
@@ -657,11 +648,2 @@
     icmpstat.icps_reflect++;
 }
-#if defined(RT_OS_WINDOWS) && !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC)
-static void WINAPI
-notify_slirp(void *ctx)
-{
-    /* pData name is important see slirp_state.h */
-    PNATState pData = (PNATState)ctx;
-    fIcmp = 1;
-}
-#endif
Index: trunk/src/VBox/Devices/Network/slirp/libslirp.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libslirp.h	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/libslirp.h	(revision 18902)
@@ -34,20 +34,12 @@
 void slirp_link_down(PNATState);
 
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC)
-# if defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
 void slirp_select_fill(PNATState pData, int *pndfs);
 
 void slirp_select_poll(PNATState pData, int fTimeout, int fIcmp);
-# else /* RT_OS_WINDOWS */
+#else /* RT_OS_WINDOWS */
 void slirp_select_fill(PNATState pData, int *pnfds, struct pollfd *polls);
 void slirp_select_poll(PNATState pData, struct pollfd *polls, int ndfs);
-# endif /* !RT_OS_WINDOWS */
-#else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-void slirp_select_fill(PNATState pData, int *pnfds,
-                       fd_set *readfds, fd_set *writefds, fd_set *xfds);
-
-void slirp_select_poll(PNATState pData, int *pnfds,
-                       fd_set *readfds, fd_set *writefds, fd_set *xfds);
-#endif /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif /* !RT_OS_WINDOWS */
 
 void slirp_input(PNATState pData, const uint8_t *pkt, int pkt_len);
@@ -56,10 +48,6 @@
 /* you must provide the following functions: */
 int slirp_can_output(void * pvUser);
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 void slirp_output(void * pvUser, void *pvArg, const uint8_t *pkt, int pkt_len);
 void slirp_post_sent(PNATState pData, void *pvArg);
-#else
-void slirp_output(void * pvUser, const uint8_t *pkt, int pkt_len);
-#endif
 
 int slirp_redir(PNATState pData, int is_udp, int host_port,
@@ -74,5 +62,6 @@
 void slirp_set_dhcp_dns_proxy(PNATState pData, bool fDNSProxy);
 #endif
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+
+#if defined(RT_OS_WINDOWS)
 
 
@@ -103,5 +92,6 @@
 HANDLE *slirp_get_events(PNATState pData);
 void slirp_register_external_event(PNATState pData, HANDLE hEvent, int index);
-#endif
+#endif /* RT_OS_WINDOWS */
+
 #ifdef VBOX_WITH_SLIRP_MT
 void slirp_process_queue(PNATState pData);
Index: trunk/src/VBox/Devices/Network/slirp/main.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/main.h	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/main.h	(revision 18902)
@@ -10,7 +10,3 @@
 #endif
 
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 void if_encap(PNATState pData, uint16_t eth_proto, struct mbuf *m);
-#else
-void if_encap(PNATState pData, const uint8_t *ip_data, int ip_data_len);
-#endif
Index: trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 18902)
@@ -19,26 +19,6 @@
 #endif
 
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-
-# ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-#  define DO_ENGAGE_EVENT1(so, fdset, label)          \
-    do {                                             \
-        FD_SET((so)->s, (fdset));                    \
-        UPD_NFDS((so)->s);                           \
-    } while(0)
-
-
-#  define DO_ENGAGE_EVENT2(so, fdset1, fdset2, label) \
-    do {                                             \
-        FD_SET((so)->s, (fdset1));                   \
-        FD_SET((so)->s, (fdset2));                   \
-        UPD_NFDS((so)->s);                           \
-    } while(0)
-
-#  define DO_POLL_EVENTS(rc, error, so, events, label) do {} while (0)
-
-#  define DO_CHECK_FD_SET(so, events, fdset) (FD_ISSET((so)->s, fdset))
-#  define DO_UNIX_CHECK_FD_SET(so, events, fdset )  0 /*specific for Unix API */
-# else /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#if !defined(RT_OS_WINDOWS)
+
 #  define DO_ENGAGE_EVENT1(so, fdset, label)                        \
     do {                                                            \
@@ -82,5 +62,4 @@
 #  define DO_UNIX_CHECK_FD_SET(so, events, fdset ) DO_CHECK_FD_SET((so), (events), fdset) /*specific for Unix API */
 #  define DO_WIN_CHECK_FD_SET(so, events, fdset ) 0 /* specific for Windows Winsock API */
-# endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
 
 # ifndef RT_OS_WINDOWS
@@ -105,13 +84,9 @@
     } while (0)
 # else /* !RT_OS_WINDOWS */
-#  ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-#   define DO_WIN_CHECK_FD_SET(so, events, fdset ) DO_CHECK_FD_SET((so), (events), fdset)
-#  else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-#   define DO_WIN_CHECK_FD_SET(so, events, fdset ) 0
-#  endif /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#  define DO_WIN_CHECK_FD_SET(so, events, fdset ) DO_CHECK_FD_SET((so), (events), fdset)
 #  define ICMP_ENGAGE_EVENT(so, fdset) do {} while(0)
 #endif /* RT_OS_WINDOWS */
 
-#else /* defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) */
+#else /* defined(RT_OS_WINDOWS) */
 
 /*
@@ -164,5 +139,5 @@
 # define DO_UNIX_CHECK_FD_SET(so, events, fdset ) 1 /*specific for Unix API */
 
-#endif /* defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) */
+#endif /* defined(RT_OS_WINDOWS) */
 
 #define TCP_ENGAGE_EVENT1(so, fdset) \
@@ -193,31 +168,21 @@
  */
 #if VBOX_WITH_DEBUG_NAT_SOCKETS
-# if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC)
-#  if defined(RT_OS_WINDOWS)
-#   define  DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset)             \
-    do {                                                                                \
-        LogRel(("  " #proto " %R[natsock] %R[natwinnetevents]\n", (so), (winevent)));   \
-    } while (0)
-#  else /* RT_OS_WINDOWS */
-#   define  DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset)         \
-    do {                                                                            \
-            LogRel(("  " #proto " %R[natsock] %s %s %s er: %s, %s, %s\n", (so),     \
-                     CHECK_FD_SET(so, ign ,r_fdset) ? "READ":"",                    \
-                     CHECK_FD_SET(so, ign, w_fdset) ? "WRITE":"",                   \
-                     CHECK_FD_SET(so, ign, x_fdset) ? "OOB":"",                     \
-                     CHECK_FD_SET(so, ign, rderr) ? "RDERR":"",                     \
-                     CHECK_FD_SET(so, ign, rdhup) ? "RDHUP":"",                     \
-                     CHECK_FD_SET(so, ign, nval) ? "RDNVAL":""));                   \
-    } while (0)
-#  endif /* !RT_OS_WINDOWS */
-# else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-#  define  DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset)  \
-    do {                                                                    \
-            LogRel(("  " #proto " %R[natsock] %s %s %s\n", (so),            \
-                FD_ISSET((so)->s, (r_fdset))?"READ":"",                     \
-                FD_ISSET((so)->s, (w_fdset))?"WRITE":"",                    \
-                FD_ISSET((so)->s, (x_fdset))?"OOB":""));                    \
-    } while (0)
-# endif
+# if defined(RT_OS_WINDOWS)
+#  define  DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset)             \
+   do {                                                                                \
+       LogRel(("  " #proto " %R[natsock] %R[natwinnetevents]\n", (so), (winevent)));   \
+   } while (0)
+# else /* RT_OS_WINDOWS */
+#  define  DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset)         \
+   do {                                                                            \
+           LogRel(("  " #proto " %R[natsock] %s %s %s er: %s, %s, %s\n", (so),     \
+                    CHECK_FD_SET(so, ign ,r_fdset) ? "READ":"",                    \
+                    CHECK_FD_SET(so, ign, w_fdset) ? "WRITE":"",                   \
+                    CHECK_FD_SET(so, ign, x_fdset) ? "OOB":"",                     \
+                    CHECK_FD_SET(so, ign, rderr) ? "RDERR":"",                     \
+                    CHECK_FD_SET(so, ign, rdhup) ? "RDHUP":"",                     \
+                    CHECK_FD_SET(so, ign, nval) ? "RDNVAL":""));                   \
+   } while (0)
+# endif /* !RT_OS_WINDOWS */
 #else /* VBOX_WITH_DEBUG_NAT_SOCKETS */
 # define DO_LOG_NAT_SOCK(so, proto, winevent, r_fdset, w_fdset, x_fdset) do {} while (0)
@@ -643,7 +608,5 @@
         WSAStartup(MAKEWORD(2, 0), &Data);
     }
-# if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC)
     pData->phEvents[VBOX_SOCKET_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
-# endif
 #endif
 #ifdef VBOX_WITH_SLIRP_MT
@@ -810,22 +773,16 @@
 }
 
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-void slirp_select_fill(PNATState pData, int *pnfds,
-                       fd_set *readfds, fd_set *writefds, fd_set *xfds)
-#else /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-# ifdef RT_OS_WINDOWS
+#ifdef RT_OS_WINDOWS
 void slirp_select_fill(PNATState pData, int *pnfds)
-# else /* RT_OS_WINDOWS */
+#else /* RT_OS_WINDOWS */
 void slirp_select_fill(PNATState pData, int *pnfds, struct pollfd *polls)
-# endif /* !RT_OS_WINDOWS */
-#endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif /* !RT_OS_WINDOWS */
 {
     struct socket *so, *so_next;
     int nfds;
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
     int rc;
     int error;
-#endif
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && !defined(RT_OS_WINDOWS)
+#else
     int poll_index = 0;
 #endif
@@ -868,5 +825,5 @@
         QSOCKET_FOREACH(so, so_next, tcp)
         /* { */
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && !defined(RT_OS_WINDOWS)
+#if !defined(RT_OS_WINDOWS)
             so->so_poll_index = -1;
 #endif
@@ -940,5 +897,5 @@
 
             STAM_COUNTER_INC(&pData->StatUDP);
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && !defined(RT_OS_WINDOWS)
+#if !defined(RT_OS_WINDOWS)
             so->so_poll_index = -1;
 #endif
@@ -989,36 +946,27 @@
     }
 
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC)
-# if defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
     *pnfds = VBOX_EVENT_COUNT;
-# else /* RT_OS_WINDOWS */
+#else /* RT_OS_WINDOWS */
     AssertRelease(poll_index <= *pnfds);
     *pnfds = poll_index;
-# endif /* !RT_OS_WINDOWS */
-#else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-    *pnfds = nfds;
-#endif /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif /* !RT_OS_WINDOWS */
 
     STAM_PROFILE_STOP(&pData->StatFill, a);
 }
 
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC)
-# if defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
 void slirp_select_poll(PNATState pData, int fTimeout, int fIcmp)
-# else /* RT_OS_WINDOWS */
+#else /* RT_OS_WINDOWS */
 void slirp_select_poll(PNATState pData, struct pollfd *polls, int ndfs)
-# endif /* !RT_OS_WINDOWS */
-#else /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
-void slirp_select_poll(PNATState pData, fd_set *readfds, fd_set *writefds, fd_set *xfds)
-#endif /* !VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif /* !RT_OS_WINDOWS */
 {
     struct socket *so, *so_next;
     int ret;
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
     WSANETWORKEVENTS NetworkEvents;
     int rc;
     int error;
-#endif
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && !defined(RT_OS_WINDOWS)
+#else
     int poll_index = 0;
 #endif
@@ -1050,5 +998,5 @@
         }
     }
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
     if (fTimeout)
         return; /* only timer update */
@@ -1143,5 +1091,5 @@
                 {
                     TCP_CONNECT(pData, so);
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
                     if (!(NetworkEvents.lNetworkEvents & FD_CLOSE))
 #endif
@@ -1155,5 +1103,5 @@
             }
 
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
             /*
              * Check for FD_CLOSE events.
@@ -1450,9 +1398,5 @@
 AssertCompileSize(struct arphdr, 28);
 
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 static void arp_input(PNATState pData, struct mbuf *m)
-#else
-static void arp_input(PNATState pData, const uint8_t *pkt, int pkt_len)
-#endif
 {
     struct ethhdr *eh;
@@ -1463,23 +1407,13 @@
     struct ex_list *ex_ptr;
     uint32_t htip;
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    uint8_t arp_reply[sizeof(struct arphdr) + ETH_HLEN];
-    eh = (struct ethhdr *)pkt;
-#else
     struct mbuf *mr;
     eh = mtod(m, struct ethhdr *);
-#endif
     ah = (struct arphdr *)&eh[1];
     htip = ntohl(*(uint32_t*)ah->ar_tip);
 
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
     mr = m_get(pData);
     mr->m_data += if_maxlinkhdr;
     mr->m_len = sizeof(struct arphdr);
     rah = mtod(mr, struct arphdr *);
-#else
-    reh = (struct ethhdr *)arp_reply;
-    rah = (struct arphdr *)&reh[1];
-#endif
 
     ar_op = ntohs(ah->ar_op);
@@ -1500,11 +1434,4 @@
                 return;
         arp_ok:
-
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-                memcpy(reh->h_dest, eh->h_source, ETH_ALEN);
-                memcpy(reh->h_source, &special_addr, ETH_ALEN);
-                reh->h_source[5] = ah->ar_tip[3];
-                reh->h_proto = htons(ETH_P_ARP);
-#endif
                 rah->ar_hrd = htons(1);
                 rah->ar_pro = htons(ETH_P_IP);
@@ -1526,10 +1453,6 @@
                 memcpy(rah->ar_tha, ah->ar_sha, ETH_ALEN);
                 memcpy(rah->ar_tip, ah->ar_sip, 4);
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
                 if_encap(pData, ETH_P_ARP, mr);
                 m_free(pData, m);
-#else
-                slirp_output(pData->pvUser, arp_reply, sizeof(arp_reply));
-#endif
             }
             break;
@@ -1570,10 +1493,5 @@
     {
         case ETH_P_ARP:
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
             arp_input(pData, m);
-#else
-            arp_input(pData, pkt, pkt_len);
-            m_free(pData, m);
-#endif
             break;
         case ETH_P_IP:
@@ -1602,26 +1520,12 @@
 
 /* output the IP packet to the ethernet device */
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
 void if_encap(PNATState pData, uint16_t eth_proto, struct mbuf *m)
-#else
-void if_encap(PNATState pData, uint8_t *ip_data, int ip_data_len)
-#endif
-{
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
+{
     struct ethhdr *eh;
     uint8_t *buf = RTMemAlloc(1600);
+
     m->m_data -= if_maxlinkhdr;
     m->m_len += ETH_HLEN;
     eh = mtod(m, struct ethhdr *);
-#else
-    uint8_t buf[1600];
-    struct ethhdr *eh = (struct ethhdr *)buf;
-
-    if (ip_data_len + ETH_HLEN > sizeof(buf))
-        return;
-
-    memcpy(buf + sizeof(struct ethhdr), ip_data, ip_data_len);
-#endif
-
 
     memcpy(eh->h_dest, client_ethaddr, ETH_ALEN);
@@ -1629,5 +1533,4 @@
     /* XXX: not correct */
     eh->h_source[5] = CTL_ALIAS;
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
     eh->h_proto = htons(eth_proto);
 #if 0
@@ -1638,8 +1541,4 @@
     m_free(pData, m);
 #endif
-#else
-    eh->h_proto = htons(ETH_P_IP);
-    slirp_output(pData->pvUser, buf, ip_data_len + ETH_HLEN);
-#endif
 }
 
@@ -1675,5 +1574,5 @@
 }
 
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
 HANDLE *slirp_get_events(PNATState pData)
 {
Index: trunk/src/VBox/Devices/Network/slirp/slirp_state.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 18902)
@@ -183,10 +183,7 @@
     HMODULE hmIcmpLibrary;
 # endif
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
 # define VBOX_SOCKET_EVENT (pData->phEvents[VBOX_SOCKET_EVENT_INDEX])
     HANDLE phEvents[VBOX_EVENT_COUNT];
-#endif
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-    int fIcmp;
 #endif
 #ifdef VBOX_WITH_SLIRP_DNS_PROXY
@@ -334,8 +331,4 @@
 #define tcp_reass_maxseg pData->tcp_reass_maxseg
 #define tcp_reass_overflows pData->tcp_reass_overflows
-
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-# define fIcmp pData->fIcmp
-#endif
 
 #define queue_tcp_label tcb
Index: trunk/src/VBox/Devices/Network/slirp/socket.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/socket.c	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/socket.c	(revision 18902)
@@ -65,5 +65,5 @@
         so->so_state = SS_NOFDREF;
         so->s = -1;
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && !defined(RT_OS_WINDOWS)
+#if !defined(RT_OS_WINDOWS)
         so->so_poll_index = -1;
 #endif
@@ -198,5 +198,5 @@
     if (nn <= 0)
     {
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
         /*
          * Special case for WSAEnumNetworkEvents: If we receive 0 bytes that
@@ -513,8 +513,6 @@
         }
         m->m_data += if_maxlinkhdr;
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
         m->m_data += sizeof(struct udphdr)
-                    + sizeof(struct ip); /*XXX: no options atm*/
-#endif
+                   + sizeof(struct ip); /*XXX: no options atm*/
 
         /*
@@ -1002,7 +1000,4 @@
 
     len = pData->pfIcmpParseReplies(pData->pvIcmpBuffer, pData->szIcmpBuffer);
-#ifndef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-    fIcmp = 0;  /* reply processed */
-#endif
     if (len < 0)
     {
Index: trunk/src/VBox/Devices/Network/slirp/socket.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/socket.h	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/socket.h	(revision 18902)
@@ -71,14 +71,12 @@
     int             so_deleted;
 #endif
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
-# ifndef RT_OS_WINDOWS
+#ifndef RT_OS_WINDOWS
     int so_poll_index;
-# else /* !RT_OS_WINDOWS */
+#else /* !RT_OS_WINDOWS */
     /*
      * FD_CLOSE event has been occured on socket 
      */
     int so_close; 
-# endif /* RT_OS_WINDOWS */
-#endif /* VBOX_WITH_SIMPLIFIED_SLIRP_SYNC */
+#endif /* RT_OS_WINDOWS */
 #ifdef VBOX_WITH_SLIRP_DNS_PROXY
     void (* so_timeout)(PNATState pData, struct socket *so, void *arg);
Index: trunk/src/VBox/Devices/Network/slirp/tcp_output.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_output.c	(revision 18874)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_output.c	(revision 18902)
@@ -428,8 +428,6 @@
         }
         m->m_data += if_maxlinkhdr;
-#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
         m->m_data += sizeof(struct ip) 
-            + sizeof(struct tcphdr);
-#endif
+                   + sizeof(struct tcphdr);
         m->m_len = hdrlen;
     }
