Index: trunk/src/VBox/Devices/Network/slirp/ip.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip.h	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/ip.h	(revision 14638)
@@ -208,9 +208,9 @@
 typedef caddr_t caddr32_t;
 # else
-#  if !defined(VBOX_WITH_BSD_REASS) && !defined(VBOX_WITH_BSD_TCP_REASS)
+#  if !defined(VBOX_WITH_BSD_REASS)
 typedef u_int32_t caddr32_t;
-#  else /* !VBOX_WITH_BSD_REASS && !VBOX_WITH_BSD_TCP_REASS*/
+#  else /* VBOX_WITH_BSD_REASS */
 typedef caddr_t caddr32_t;
-#  endif /* VBOX_WITH_BSD_REASS || VBOX_WITH_BSD_TCP_REASS*/
+#  endif /* VBOX_WITH_BSD_REASS */
 # endif
 #endif
@@ -228,10 +228,10 @@
  */
 struct ipovly {
-#if !defined(VBOX_WITH_BSD_REASS) && !defined(VBOX_WITH_BSD_TCP_REASS)
+#if !defined(VBOX_WITH_BSD_REASS)
         caddr32_t       ih_next, ih_prev;       /* for protocol sequence q's */
         u_int8_t        ih_x1;                  /* (unused) */
-#else /* !VBOX_WITH_BSD_REASS && !VBOX_WITH_BSD_TCP_REASS */
+#else /* VBOX_WITH_BSD_REASS */
         u_int8_t        ih_x1[9];                  /* (unused) */
-#endif /* VBOX_WITH_BSD_REASS || VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
         u_int8_t        ih_pr;                  /* protocol */
         u_int16_t       ih_len;                 /* protocol length */
Index: trunk/src/VBox/Devices/Network/slirp/misc.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 14638)
@@ -32,6 +32,5 @@
 }
 
-#if !defined(VBOX_WITH_BSD_REASS) && !defined(VBOX_WITH_BSD_TCP_REASS)
-#if SIZEOF_CHAR_P == 8
+#if SIZEOF_CHAR_P == 8 && !defined(VBOX_WITH_BSD_REASS)
 
 struct quehead_32 {
@@ -66,6 +65,5 @@
 }
 
-#endif /* SIZEOF_CHAR_P == 8 */
-#endif /* !VBOX_WITH_BSD_REASS && !VBOX_WITH_BSD_TCP_REASS*/
+#endif /* SIZEOF_CHAR_P == 8 && !VBOX_WITH_BSD_REASS */
 
 struct quehead {
Index: trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 14638)
@@ -21,8 +21,8 @@
                                const char **ppszDomain)
 {
-    int rc = 0;
-    FIXED_INFO *FixedInfo=NULL;
-    ULONG    BufLen;
-    DWORD    ret;
+    int  rc = 0;
+    FIXED_INFO *FixedInfo = NULL;
+    ULONG BufLen;
+    DWORD ret;
     IP_ADDR_STRING *pIPAddr;
     struct in_addr tmp_addr;
@@ -34,6 +34,8 @@
      * corresponding network adapter is disabled or not. Maybe replace
      * this by GetAdapterAddresses(), which is XP/Vista only though. */
-    if (ERROR_BUFFER_OVERFLOW == GetNetworkParams(FixedInfo, &BufLen)) {
-        if (FixedInfo) {
+    if (ERROR_BUFFER_OVERFLOW == GetNetworkParams(FixedInfo, &BufLen))
+    {
+        if (FixedInfo)
+        {
             GlobalFree(FixedInfo);
             FixedInfo = NULL;
@@ -42,7 +44,9 @@
     }
 
-    if ((ret = GetNetworkParams(FixedInfo, &BufLen)) != ERROR_SUCCESS) {
+    if ((ret = GetNetworkParams(FixedInfo, &BufLen)) != ERROR_SUCCESS)
+    {
         Log(("GetNetworkParams failed. ret = %08x\n", (u_int)ret ));
-        if (FixedInfo) {
+        if (FixedInfo)
+        {
             GlobalFree(FixedInfo);
             FixedInfo = NULL;
@@ -60,5 +64,5 @@
 
     pIPAddr = FixedInfo -> DnsServerList.Next;
-    while ( pIPAddr )
+    while (pIPAddr)
     {
         if (fVerbose)
@@ -66,5 +70,6 @@
         pIPAddr = pIPAddr ->Next;
     }
-    if (FixedInfo) {
+    if (FixedInfo)
+    {
         GlobalFree(FixedInfo);
         FixedInfo = NULL;
@@ -126,9 +131,11 @@
         f = fopen(buff, "rt");
     }
-    if (!f) {
+    if (!f)
+    {
         snprintf(buff, sizeof(buff), "%s/RESOLV2", _PATH_ETC);
         f = fopen(buff, "rt");
     }
-    if (!f) {
+    if (!f)
+    {
         snprintf(buff, sizeof(buff), "%s/resolv.conf", _PATH_ETC);
         f = fopen(buff, "rt");
@@ -143,6 +150,8 @@
         *ppszDomain = NULL;
     Log(("nat: DNS Servers:\n"));
-    while (fgets(buff, 512, f) != NULL) {
-        if (sscanf(buff, "nameserver%*[ \t]%256s", buff2) == 1) {
+    while (fgets(buff, 512, f) != NULL)
+    {
+        if (sscanf(buff, "nameserver%*[ \t]%256s", buff2) == 1)
+        {
             if (!inet_aton(buff2, &tmp_addr))
                 continue;
@@ -227,5 +236,5 @@
     }
 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-        pData->phEvents[VBOX_SOCKET_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
+    pData->phEvents[VBOX_SOCKET_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
 #endif
 #endif
@@ -315,5 +324,5 @@
         RTStrFree((char *)(void *)pData->pszDomain);
 
-#if ARCH_BITS == 64
+#if ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS)
     LogRel(("NAT: cpvHashUsed=%RU32 cpvHashCollisions=%RU32 cpvHashInserts=%RU64 cpvHashDone=%RU64\n",
             pData->cpvHashUsed, pData->cpvHashCollisions, pData->cpvHashInserts, pData->cpvHashDone));
@@ -344,6 +353,6 @@
 
 #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED)
-#define CONN_CANFRCV(so) (((so)->so_state & (SS_FCANTRCVMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED)
-#define UPD_NFDS(x) if (nfds < (x)) nfds = (x)
+#define CONN_CANFRCV(so)  (((so)->so_state & (SS_FCANTRCVMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED)
+#define UPD_NFDS(x)       if (nfds < (x)) nfds = (x)
 
 /*
@@ -388,186 +397,200 @@
 
     nfds = *pnfds;
+
+    /*
+     * First, TCP sockets
+     */
+    do_slowtimo = 0;
+    if (link_up)
+    {
         /*
-         * First, TCP sockets
+         * *_slowtimo needs calling if there are IP fragments
+         * in the fragment queue, or there are TCP connections active
          */
-        do_slowtimo = 0;
-        if (link_up) {
-                /*
-                 * *_slowtimo needs calling if there are IP fragments
-                 * in the fragment queue, or there are TCP connections active
-                 */
 #ifndef VBOX_WITH_BSD_REASS
-                do_slowtimo = ((tcb.so_next != &tcb) ||
-                               ((struct ipasfrag *)&ipq != u32_to_ptr(pData, ipq.next, struct ipasfrag *)));
+        do_slowtimo =    ((tcb.so_next != &tcb)
+                      || ((struct ipasfrag *)&ipq != u32_to_ptr(pData, ipq.next, struct ipasfrag *)));
 #else /* !VBOX_WITH_BSD_REASS */
-    /* XXX: triggering of fragment expiration should be the same but use
-     * new macroses
-     */
-                for (i = 0; i < IPREASS_NHASH; i++) {
-                        if (!TAILQ_EMPTY(&ipq[i])) {
-                            do_slowtimo = 1;
-                            break;
-                        }
+        /* XXX:
+         * triggering of fragment expiration should be the same but use new macroses
+         */
+        for (i = 0; i < IPREASS_NHASH; i++)
+        {
+            if (!TAILQ_EMPTY(&ipq[i]))
+            {
+                do_slowtimo = 1;
+                break;
+            }
+        }
+        do_slowtimo |= (tcb.so_next != &tcb);
+#endif /* VBOX_WITH_BSD_REASS */
+
+        STAM_REL_COUNTER_RESET(&pData->StatTCP);
+        STAM_REL_COUNTER_RESET(&pData->StatTCPHot);
+
+        for (so = tcb.so_next; so != &tcb; so = so_next)
+        {
+            so_next = so->so_next;
+
+            STAM_REL_COUNTER_INC(&pData->StatTCP);
+
+            /*
+             * See if we need a tcp_fasttimo
+             */
+            if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK)
+                time_fasttimo = curtime; /* Flag when we want a fasttimo */
+
+            /*
+             * NOFDREF can include still connecting to local-host,
+             * newly socreated() sockets etc. Don't want to select these.
+             */
+            if (so->so_state & SS_NOFDREF || so->s == -1)
+                continue;
+
+            /*
+             * Set for reading sockets which are accepting
+             */
+            if (so->so_state & SS_FACCEPTCONN)
+            {
+                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
+#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
+                FD_SET(so->s, readfds);
+                UPD_NFDS(so->s);
+#else
+                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_OOB);
+                if (rc == SOCKET_ERROR)
+                {
+socket_error:
+                    error = WSAGetLastError();
+                    LogRel(("WSAEventSelector error %d (so=%x, socket=%s, event=%x)\n", error, so, so->s, VBOX_SOCKET_EVENT));
                 }
-                do_slowtimo |= (tcb.so_next != &tcb);
-#endif /* VBOX_WITH_BSD_REASS */
-
-                STAM_REL_COUNTER_RESET(&pData->StatTCP);
-                STAM_REL_COUNTER_RESET(&pData->StatTCPHot);
-
-                for (so = tcb.so_next; so != &tcb; so = so_next) {
-                        so_next = so->so_next;
-
-                        STAM_REL_COUNTER_INC(&pData->StatTCP);
-
-                        /*
-                         * See if we need a tcp_fasttimo
-                         */
-                        if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK)
-                           time_fasttimo = curtime; /* Flag when we want a fasttimo */
-
-                        /*
-                         * NOFDREF can include still connecting to local-host,
-                         * newly socreated() sockets etc. Don't want to select these.
-                         */
-                        if (so->so_state & SS_NOFDREF || so->s == -1)
-                           continue;
-
-                        /*
-                         * Set for reading sockets which are accepting
-                         */
-                        if (so->so_state & SS_FACCEPTCONN) {
-                                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
+#endif
+                continue;
+            }
+
+            /*
+             * Set for writing sockets which are connecting
+             */
+            if (so->so_state & SS_ISFCONNECTING)
+            {
+                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                                FD_SET(so->s, readfds);
-                                UPD_NFDS(so->s);
-#else
-                                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_OOB);
-                                if (rc == SOCKET_ERROR)
-                                {
-socket_error:
-                                    error = WSAGetLastError();
-                                    LogRel(("WSAEventSelector error %d (so=%x, socket=%s, event=%x)\n", error, so, so->s, VBOX_SOCKET_EVENT));
-                                }
-#endif
-                                continue;
-                        }
-
-                        /*
-                         * Set for writing sockets which are connecting
-                         */
-                        if (so->so_state & SS_ISFCONNECTING) {
-                                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
+                FD_SET(so->s, writefds);
+                UPD_NFDS(so->s);
+#else
+                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_OOB);
+                if (rc == SOCKET_ERROR)
+                    goto socket_error;
+#endif
+                continue;
+            }
+
+            /*
+             * Set for writing if we are connected, can send more, and
+             * we have something to send
+             */
+            if (CONN_CANFSEND(so) && so->so_rcv.sb_cc)
+            {
+                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                                FD_SET(so->s, writefds);
-                                UPD_NFDS(so->s);
-#else
-                                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_OOB);
-                                if (rc == SOCKET_ERROR)
-                                    goto socket_error;
-#endif
-                                continue;
-                        }
-
-                        /*
-                         * Set for writing if we are connected, can send more, and
-                         * we have something to send
-                         */
-                        if (CONN_CANFSEND(so) && so->so_rcv.sb_cc) {
-                                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
+                FD_SET(so->s, writefds);
+                UPD_NFDS(so->s);
+#else
+                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_OOB);
+                if (rc == SOCKET_ERROR)
+                    goto socket_error;
+                continue; /* we're using the widest mask for event */
+#endif
+            }
+
+            /*
+             * Set for reading (and urgent data) if we are connected, can
+             * receive more, and we have room for it XXX /2 ?
+             */
+            if (CONN_CANFRCV(so) && (so->so_snd.sb_cc < (so->so_snd.sb_datalen/2)))
+            {
+                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                                FD_SET(so->s, writefds);
-                                UPD_NFDS(so->s);
-#else
-                                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_OOB);
-                                if (rc == SOCKET_ERROR)
-                                    goto socket_error;
-                                continue; /*XXX: we're using the widest mask for event*/
-#endif
-                        }
-
-                        /*
-                         * Set for reading (and urgent data) if we are connected, can
-                         * receive more, and we have room for it XXX /2 ?
-                         */
-                        if (CONN_CANFRCV(so) && (so->so_snd.sb_cc < (so->so_snd.sb_datalen/2))) {
-                                STAM_REL_COUNTER_INC(&pData->StatTCPHot);
+                FD_SET(so->s, readfds);
+                FD_SET(so->s, xfds);
+                UPD_NFDS(so->s);
+#else
+                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_OOB|FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT);
+                if (rc == SOCKET_ERROR)
+                    goto socket_error;
+                continue; /* we're using the widest mask for event */
+#endif
+            }
+#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+            rc = WSAEventSelect(so->s, NULL, 0);
+            if (rc == SOCKET_ERROR)
+                goto socket_error;
+#endif
+        }
+
+        /*
+         * UDP sockets
+         */
+        STAM_REL_COUNTER_RESET(&pData->StatUDP);
+        STAM_REL_COUNTER_RESET(&pData->StatUDPHot);
+
+        for (so = udb.so_next; so != &udb; so = so_next)
+        {
+            so_next = so->so_next;
+
+            STAM_REL_COUNTER_INC(&pData->StatUDP);
+
+            /*
+             * See if it's timed out
+             */
+            if (so->so_expire)
+            {
+                if (so->so_expire <= curtime)
+                {
+                    udp_detach(pData, so);
+                    continue;
+                }
+                else
+                    do_slowtimo = 1; /* Let socket expire */
+            }
+
+            /*
+             * When UDP packets are received from over the link, they're
+             * sendto()'d straight away, so no need for setting for writing
+             * Limit the number of packets queued by this session to 4.
+             * Note that even though we try and limit this to 4 packets,
+             * the session could have more queued if the packets needed
+             * to be fragmented.
+             * 
+             * (XXX <= 4 ?)
+             */
+            if ((so->so_state & SS_ISFCONNECTED) && so->so_queued <= 4)
+            {
+                STAM_REL_COUNTER_INC(&pData->StatUDPHot);
 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                                FD_SET(so->s, readfds);
-                                FD_SET(so->s, xfds);
-                                UPD_NFDS(so->s);
-#else
-                                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_OOB|FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT);
-                                if (rc == SOCKET_ERROR)
-                                    goto socket_error;
-                                continue; /*XXX: we're using the widest mask for event*/
-#endif
-                        }
+                FD_SET(so->s, readfds);
+                UPD_NFDS(so->s);
+#else
+                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT);
+                if (rc == SOCKET_ERROR)
+                    goto socket_error;
+                continue;
+#endif
+            }
 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-                        rc = WSAEventSelect(so->s, NULL, 0);
-                        if (rc == SOCKET_ERROR)
-                            goto socket_error;
-#endif
-                }
-
-                /*
-                 * UDP sockets
-                 */
-                STAM_REL_COUNTER_RESET(&pData->StatUDP);
-                STAM_REL_COUNTER_RESET(&pData->StatUDPHot);
-
-                for (so = udb.so_next; so != &udb; so = so_next) {
-                        so_next = so->so_next;
-
-                        STAM_REL_COUNTER_INC(&pData->StatUDP);
-
-                        /*
-                         * See if it's timed out
-                         */
-                        if (so->so_expire) {
-                                if (so->so_expire <= curtime) {
-                                        udp_detach(pData, so);
-                                        continue;
-                                } else
-                                        do_slowtimo = 1; /* Let socket expire */
-                        }
-
-                        /*
-                         * When UDP packets are received from over the
-                         * link, they're sendto()'d straight away, so
-                         * no need for setting for writing
-                         * Limit the number of packets queued by this session
-                         * to 4.  Note that even though we try and limit this
-                         * to 4 packets, the session could have more queued
-                         * if the packets needed to be fragmented
-                         * (XXX <= 4 ?)
-                         */
-                        if ((so->so_state & SS_ISFCONNECTED) && so->so_queued <= 4) {
-                                STAM_REL_COUNTER_INC(&pData->StatUDPHot);
+            else
+            {
+                rc = WSAEventSelect(so->s, NULL, 0);
+                if (rc != SOCKET_ERROR)
+                    goto socket_error;
+            }
+#endif
+        }
+    }
+
 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                                FD_SET(so->s, readfds);
-                                UPD_NFDS(so->s);
-#else
-                                rc = WSAEventSelect(so->s, VBOX_SOCKET_EVENT, FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT);
-                                if (rc == SOCKET_ERROR)
-                                    goto socket_error;
-                                continue;
-#endif
-                        }
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-                        else
-                        {
-                            rc = WSAEventSelect(so->s, NULL, 0);
-                            if (rc != SOCKET_ERROR)
-                                goto socket_error;
-                        }
-#endif
-                }
-        }
-
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-        *pnfds = nfds;
-#else
-        *pnfds = VBOX_EVENT_COUNT;
+    *pnfds = nfds;
+#else
+    *pnfds = VBOX_EVENT_COUNT;
 #endif
 
@@ -580,219 +603,248 @@
     int ret;
 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-        WSANETWORKEVENTS NetworkEvents;
-        int rc;
-        int error;
-        int timer_update = (readfds == NULL && writefds == NULL && xfds == NULL);
-#endif
-        STAM_REL_PROFILE_START(&pData->StatPoll, a);
-
-        /* Update time */
-        updtime(pData);
-
+    WSANETWORKEVENTS NetworkEvents;
+    int rc;
+    int error;
+#endif
+    STAM_REL_PROFILE_START(&pData->StatPoll, a);
+
+    /* Update time */
+    updtime(pData);
+
+    /*
+     * See if anything has timed out
+     */
+    if (link_up)
+    {
+        if (time_fasttimo && ((curtime - time_fasttimo) >= 2))
+        {
+            STAM_REL_PROFILE_START(&pData->StatFastTimer, a);
+            tcp_fasttimo(pData);
+            time_fasttimo = 0;
+            STAM_REL_PROFILE_STOP(&pData->StatFastTimer, a);
+        }
+        if (do_slowtimo && ((curtime - last_slowtimo) >= 499))
+        {
+            STAM_REL_PROFILE_START(&pData->StatSlowTimer, a);
+            ip_slowtimo(pData);
+            tcp_slowtimo(pData);
+            last_slowtimo = curtime;
+            STAM_REL_PROFILE_STOP(&pData->StatSlowTimer, a);
+        }
+    }
+#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+    if (!readfds && !writefds && !xfds)
+        return; /* only timer update */
+#endif
+
+    /*
+     * Check sockets
+     */
+    if (link_up)
+    {
         /*
-         * See if anything has timed out
+         * Check TCP sockets
          */
-        if (link_up) {
-                if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) {
-                        STAM_REL_PROFILE_START(&pData->StatFastTimer, a);
-                        tcp_fasttimo(pData);
-                        time_fasttimo = 0;
-                        STAM_REL_PROFILE_STOP(&pData->StatFastTimer, a);
+        for (so = tcb.so_next; so != &tcb; so = so_next)
+        {
+            so_next = so->so_next;
+
+            /*
+             * FD_ISSET is meaningless on these sockets
+             * (and they can crash the program)
+             */
+            if (so->so_state & SS_NOFDREF || so->s == -1)
+                continue;
+
+#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+            rc = WSAEnumNetworkEvents(so->s, VBOX_SOCKET_EVENT, &NetworkEvents);
+            if (rc == SOCKET_ERROR)
+            {
+                error = WSAGetLastError();
+                LogRel(("WSAEnumNetworkEvents TCP error %d\n", error));
+                continue;
+            }
+#endif
+
+            /*
+             * Check for URG data
+             * This will soread as well, so no need to
+             * test for readfds below if this succeeds
+             */
+#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
+            if (FD_ISSET(so->s, xfds))
+#else
+            /* out-of-band data */
+            if ((NetworkEvents.lNetworkEvents & FD_OOB) && NetworkEvents.iErrorCode[FD_OOB_BIT] == 0)
+#endif
+            {
+                sorecvoob(pData, so);
+            }
+
+            /*
+             * Check sockets for reading
+             */
+#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
+            else if (FD_ISSET(so->s, readfds))
+#else
+            else if ((NetworkEvents.lNetworkEvents & FD_READ) && (NetworkEvents.iErrorCode[FD_READ_BIT] == 0))
+#endif
+            {
+                /*
+                 * Check for incoming connections
+                 */
+                if (so->so_state & SS_FACCEPTCONN)
+                {
+                    tcp_connect(pData, so);
+                    continue;
                 }
-                if (do_slowtimo && ((curtime - last_slowtimo) >= 499)) {
-                        STAM_REL_PROFILE_START(&pData->StatSlowTimer, a);
-                        ip_slowtimo(pData);
-                        tcp_slowtimo(pData);
-                        last_slowtimo = curtime;
-                        STAM_REL_PROFILE_STOP(&pData->StatSlowTimer, a);
+
+                ret = soread(pData, so);
+                /* Output it if we read something */
+                if (ret > 0)
+                    tcp_output(pData, sototcpcb(so));
+            }
+
+            /*
+             * Check sockets for writing
+             */
+#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
+            if (FD_ISSET(so->s, writefds))
+#else
+            if ((NetworkEvents.lNetworkEvents & FD_WRITE) && (NetworkEvents.iErrorCode[FD_WRITE_BIT] == 0))
+#endif
+            {
+                /*
+                 * Check for non-blocking, still-connecting sockets
+                 */
+                if (so->so_state & SS_ISFCONNECTING)
+                {
+                    /* Connected */
+                    so->so_state &= ~SS_ISFCONNECTING;
+
+                    /*
+                     * This should be probably guarded by PROBE_CONN too. Anyway,
+                     * we disable it on OS/2 because the below send call returns
+                     * EFAULT which causes the opened TCP socket to close right
+                     * after it has been opened and connected.
+                     */
+#ifndef RT_OS_OS2
+                    ret = send(so->s, (const char *)&ret, 0, 0);
+                    if (ret < 0)
+                    {
+                        /* XXXXX Must fix, zero bytes is a NOP */
+                        if (   errno == EAGAIN
+                            || errno == EWOULDBLOCK
+                            || errno == EINPROGRESS
+                            || errno == ENOTCONN)
+                            continue;
+
+                        /* else failed */
+                        so->so_state = SS_NOFDREF;
+                    }
+                    /* else so->so_state &= ~SS_ISFCONNECTING; */
+#endif
+
+                    /*
+                     * Continue tcp_input
+                     */
+                    tcp_input(pData, (struct mbuf *)NULL, sizeof(struct ip), so);
+                    /* continue; */
+                } else
+                    ret = sowrite(pData, so);
+                /*
+                 * XXXXX If we wrote something (a lot), there
+                 * could be a need for a window update.
+                 * In the worst case, the remote will send
+                 * a window probe to get things going again
+                 */
+            }
+
+            /*
+             * Probe a still-connecting, non-blocking socket
+             * to check if it's still alive
+             */
+#ifdef PROBE_CONN
+            if (so->so_state & SS_ISFCONNECTING)
+            {
+                ret = recv(so->s, (char *)&ret, 0, 0);
+
+                if (ret < 0)
+                {
+                    /* XXX */
+                    if (   errno == EAGAIN
+                        || errno == EWOULDBLOCK
+                        || errno == EINPROGRESS
+                        || errno == ENOTCONN)
+                    {
+                        continue; /* Still connecting, continue */
+                    }
+
+                    /* else failed */
+                    so->so_state = SS_NOFDREF;
+
+                    /* tcp_input will take care of it */
                 }
-        }
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-        if (timer_update) return;
-#endif
-
-        /*
-         * Check sockets
-         */
-        if (link_up) {
-                /*
-                 * Check TCP sockets
-                 */
-                for (so = tcb.so_next; so != &tcb; so = so_next) {
-                        so_next = so->so_next;
-
-                        /*
-                         * FD_ISSET is meaningless on these sockets
-                         * (and they can crash the program)
-                         */
-                        if (so->so_state & SS_NOFDREF || so->s == -1)
-                           continue;
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-                        rc = WSAEnumNetworkEvents(so->s, VBOX_SOCKET_EVENT, &NetworkEvents);
-                        if (rc == SOCKET_ERROR)
+                else
+                {
+                    ret = send(so->s, &ret, 0, 0);
+                    if (ret < 0)
+                    {
+                        /* XXX */
+                        if (   errno == EAGAIN
+                            || errno == EWOULDBLOCK
+                            || errno == EINPROGRESS
+                            || errno == ENOTCONN)
                         {
-                            error = WSAGetLastError();
-                            LogRel(("WSAEnumNetworkEvents TCP error %d\n", error));
                             continue;
                         }
-#endif
-
-                        /*
-                         * Check for URG data
-                         * This will soread as well, so no need to
-                         * test for readfds below if this succeeds
-                         */
+                        /* else failed */
+                        so->so_state = SS_NOFDREF;
+                    }
+                    else
+                        so->so_state &= ~SS_ISFCONNECTING;
+
+                }
+                tcp_input((struct mbuf *)NULL, sizeof(struct ip),so);
+            } /* SS_ISFCONNECTING */
+#endif
+        }
+
+        /*
+         * Now UDP sockets.
+         * Incoming packets are sent straight away, they're not buffered.
+         * Incoming UDP data isn't buffered either.
+         */
+        for (so = udb.so_next; so != &udb; so = so_next)
+        {
+            so_next = so->so_next;
+
+#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
+            rc = WSAEnumNetworkEvents(so->s, VBOX_SOCKET_EVENT, &NetworkEvents);
+            if (rc == SOCKET_ERROR)
+            {
+                error = WSAGetLastError();
+                LogRel(("WSAEnumNetworkEvents TCP error %d\n", error));
+                continue;
+            }
+#endif
 #if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                        if (FD_ISSET(so->s, xfds))
-#else
-                        /* out-of-band data */
-                        if ((NetworkEvents.lNetworkEvents & FD_OOB) && NetworkEvents.iErrorCode[FD_OOB_BIT] == 0)
-#endif
-                           sorecvoob(pData, so);
-                        /*
-                         * Check sockets for reading
-                         */
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                        else if (FD_ISSET(so->s, readfds)) {
-#else
-                        else if ((NetworkEvents.lNetworkEvents & FD_READ) && (NetworkEvents.iErrorCode[FD_READ_BIT] == 0)) {
-#endif
-                                /*
-                                 * Check for incoming connections
-                                 */
-                                if (so->so_state & SS_FACCEPTCONN) {
-                                        tcp_connect(pData, so);
-                                        continue;
-                                } /* else */
-                                ret = soread(pData, so);
-
-                                /* Output it if we read something */
-                                if (ret > 0)
-                                   tcp_output(pData, sototcpcb(so));
-                        }
-
-                        /*
-                         * Check sockets for writing
-                         */
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                        if (FD_ISSET(so->s, writefds)) {
-#else
-                        if ((NetworkEvents.lNetworkEvents & FD_WRITE) && (NetworkEvents.iErrorCode[FD_WRITE_BIT] == 0)) {
-#endif
-                          /*
-                           * Check for non-blocking, still-connecting sockets
-                           */
-                          if (so->so_state & SS_ISFCONNECTING) {
-                            /* Connected */
-                            so->so_state &= ~SS_ISFCONNECTING;
-
-                /*
-                 * This should be probably guarded by PROBE_CONN too. Anyway,
-                 * we disable it on OS/2 because the below send call returns
-                 * EFAULT which causes the opened TCP socket to close right
-                 * after it has been opened and connected.
-                 */
-#ifndef RT_OS_OS2
-                            ret = send(so->s, (const char *)&ret, 0, 0);
-                            if (ret < 0) {
-                              /* XXXXX Must fix, zero bytes is a NOP */
-                              if (errno == EAGAIN || errno == EWOULDBLOCK ||
-                                  errno == EINPROGRESS || errno == ENOTCONN) {
-                                continue;
-                              }
-
-                              /* else failed */
-                              so->so_state = SS_NOFDREF;
-                            }
-                            /* else so->so_state &= ~SS_ISFCONNECTING; */
-#endif
-
-                            /*
-                             * Continue tcp_input
-                             */
-                            tcp_input(pData, (struct mbuf *)NULL, sizeof(struct ip), so);
-                            /* continue; */
-                          } else
-                            ret = sowrite(pData, so);
-                          /*
-                           * XXXXX If we wrote something (a lot), there
-                           * could be a need for a window update.
-                           * In the worst case, the remote will send
-                           * a window probe to get things going again
-                           */
-                        }
-
-                        /*
-                         * Probe a still-connecting, non-blocking socket
-                         * to check if it's still alive
-                         */
-#ifdef PROBE_CONN
-                        if (so->so_state & SS_ISFCONNECTING) {
-                          ret = recv(so->s, (char *)&ret, 0,0);
-
-                          if (ret < 0) {
-                            /* XXX */
-                            if (errno == EAGAIN || errno == EWOULDBLOCK ||
-                                errno == EINPROGRESS || errno == ENOTCONN) {
-                              continue; /* Still connecting, continue */
-                            }
-
-                            /* else failed */
-                            so->so_state = SS_NOFDREF;
-
-                            /* tcp_input will take care of it */
-                          } else {
-                            ret = send(so->s, &ret, 0,0);
-                            if (ret < 0) {
-                              /* XXX */
-                              if (errno == EAGAIN || errno == EWOULDBLOCK ||
-                                  errno == EINPROGRESS || errno == ENOTCONN) {
-                                continue;
-                                }
-                              /* else failed */
-                              so->so_state = SS_NOFDREF;
-                            } else
-                              so->so_state &= ~SS_ISFCONNECTING;
-
-                          }
-                          tcp_input((struct mbuf *)NULL, sizeof(struct ip),so);
-                        } /* SS_ISFCONNECTING */
-#endif
-                }
-
-                /*
-                 * Now UDP sockets.
-                 * Incoming packets are sent straight away, they're not buffered.
-                 * Incoming UDP data isn't buffered either.
-                 */
-                for (so = udb.so_next; so != &udb; so = so_next) {
-                        so_next = so->so_next;
-
-#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
-                        rc = WSAEnumNetworkEvents(so->s, VBOX_SOCKET_EVENT, &NetworkEvents);
-                        if (rc == SOCKET_ERROR)
-                        {
-                            error = WSAGetLastError();
-                            LogRel(("WSAEnumNetworkEvents TCP error %d\n", error));
-                            continue;
-                        }
-#endif
-#if !defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) || !defined(RT_OS_WINDOWS)
-                        if (so->s != -1 && FD_ISSET(so->s, readfds)) {
-#else
-                        if ((NetworkEvents.lNetworkEvents & FD_READ) && (NetworkEvents.iErrorCode[FD_READ_BIT] == 0)) {
-#endif
-                            sorecvfrom(pData, so);
-                        }
-                }
-        }
-
-        /*
-         * See if we can start outputting
-         */
-        if (if_queued && link_up)
-           if_start(pData);
-
-        STAM_REL_PROFILE_STOP(&pData->StatPoll, a);
+            if (so->s != -1 && FD_ISSET(so->s, readfds))
+#else
+            if ((NetworkEvents.lNetworkEvents & FD_READ) && (NetworkEvents.iErrorCode[FD_READ_BIT] == 0))
+#endif
+            {
+                sorecvfrom(pData, so);
+            }
+        }
+    }
+
+    /*
+     * See if we can start outputting
+     */
+    if (if_queued && link_up)
+        if_start(pData);
+
+    STAM_REL_PROFILE_STOP(&pData->StatPoll, a);
 }
 
@@ -843,39 +895,42 @@
 
     ar_op = ntohs(ah->ar_op);
-    switch(ar_op) {
-    case ARPOP_REQUEST:
-        if ((htip & pData->netmask) == ntohl(special_addr.s_addr)) {
-            if (   (htip & ~pData->netmask) == CTL_DNS
-                || (htip & ~pData->netmask) == CTL_ALIAS)
-                goto arp_ok;
-            for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) {
-                if ((htip & ~pData->netmask) == ex_ptr->ex_addr)
+    switch(ar_op)
+    {
+        case ARPOP_REQUEST:
+            if ((htip & pData->netmask) == ntohl(special_addr.s_addr))
+            {
+                if (   (htip & ~pData->netmask) == CTL_DNS
+                    || (htip & ~pData->netmask) == CTL_ALIAS)
                     goto arp_ok;
-            }
-            return;
+                for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next)
+                {
+                    if ((htip & ~pData->netmask) == ex_ptr->ex_addr)
+                        goto arp_ok;
+                }
+                return;
         arp_ok:
-            /* XXX: make an ARP request to have the client address */
-            memcpy(client_ethaddr, eh->h_source, ETH_ALEN);
-
-            /* ARP request for alias/dns mac address */
-            memcpy(reh->h_dest, pkt + ETH_ALEN, ETH_ALEN);
-            memcpy(reh->h_source, special_ethaddr, ETH_ALEN - 1);
-            reh->h_source[5] = ah->ar_tip[3];
-            reh->h_proto = htons(ETH_P_ARP);
-
-            rah->ar_hrd = htons(1);
-            rah->ar_pro = htons(ETH_P_IP);
-            rah->ar_hln = ETH_ALEN;
-            rah->ar_pln = 4;
-            rah->ar_op = htons(ARPOP_REPLY);
-            memcpy(rah->ar_sha, reh->h_source, ETH_ALEN);
-            memcpy(rah->ar_sip, ah->ar_tip, 4);
-            memcpy(rah->ar_tha, ah->ar_sha, ETH_ALEN);
-            memcpy(rah->ar_tip, ah->ar_sip, 4);
-            slirp_output(pData->pvUser, arp_reply, sizeof(arp_reply));
-        }
-        break;
-    default:
-        break;
+                /* XXX: make an ARP request to have the client address */
+                memcpy(client_ethaddr, eh->h_source, ETH_ALEN);
+
+                /* ARP request for alias/dns mac address */
+                memcpy(reh->h_dest, pkt + ETH_ALEN, ETH_ALEN);
+                memcpy(reh->h_source, special_ethaddr, ETH_ALEN - 1);
+                reh->h_source[5] = ah->ar_tip[3];
+                reh->h_proto = htons(ETH_P_ARP);
+
+                rah->ar_hrd = htons(1);
+                rah->ar_pro = htons(ETH_P_IP);
+                rah->ar_hln = ETH_ALEN;
+                rah->ar_pln = 4;
+                rah->ar_op = htons(ARPOP_REPLY);
+                memcpy(rah->ar_sha, reh->h_source, ETH_ALEN);
+                memcpy(rah->ar_sip, ah->ar_tip, 4);
+                memcpy(rah->ar_tha, ah->ar_sha, ETH_ALEN);
+                memcpy(rah->ar_tip, ah->ar_sip, 4);
+                slirp_output(pData->pvUser, arp_reply, sizeof(arp_reply));
+            }
+            break;
+        default:
+            break;
     }
 }
@@ -890,30 +945,32 @@
 
     proto = ntohs(*(uint16_t *)(pkt + 12));
-    switch(proto) {
-    case ETH_P_ARP:
-        arp_input(pData, pkt, pkt_len);
-        break;
-    case ETH_P_IP:
-        /* Update time. Important if the network is very quiet, as otherwise
-         * the first outgoing connection gets an incorrect timestamp. */
-        updtime(pData);
-
-        m = m_get(pData);
-        if (!m)
-            return;
-        /* Note: we add to align the IP header */
-        if (M_FREEROOM(m) < pkt_len + 2) {
-            m_inc(m, pkt_len + 2);
-        }
-        m->m_len = pkt_len + 2;
-        memcpy(m->m_data + 2, pkt, pkt_len);
-
-        m->m_data += 2 + ETH_HLEN;
-        m->m_len -= 2 + ETH_HLEN;
-
-        ip_input(pData, m);
-        break;
-    default:
-        break;
+    switch(proto)
+    {
+        case ETH_P_ARP:
+            arp_input(pData, pkt, pkt_len);
+            break;
+        case ETH_P_IP:
+            /* Update time. Important if the network is very quiet, as otherwise
+             * the first outgoing connection gets an incorrect timestamp. */
+            updtime(pData);
+
+            m = m_get(pData);
+            if (!m)
+                return;
+            /* Note: we add to align the IP header */
+            if (M_FREEROOM(m) < pkt_len + 2)
+            {
+                m_inc(m, pkt_len + 2);
+            }
+            m->m_len = pkt_len + 2;
+            memcpy(m->m_data + 2, pkt, pkt_len);
+
+            m->m_data += 2 + ETH_HLEN;
+            m->m_len -= 2 + ETH_HLEN;
+
+            ip_input(pData, m);
+            break;
+        default:
+            break;
     }
 }
@@ -940,9 +997,12 @@
                 struct in_addr guest_addr, int guest_port)
 {
-    if (is_udp) {
+    if (is_udp)
+    {
         if (!udp_listen(pData, htons(host_port), guest_addr.s_addr,
                         htons(guest_port), 0))
             return -1;
-    } else {
+    }
+    else
+    {
         if (!solisten(pData, htons(host_port), guest_addr.s_addr,
                       htons(guest_port), 0))
Index: trunk/src/VBox/Devices/Network/slirp/slirp.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 14638)
@@ -352,9 +352,9 @@
 
 /* tcp_input.c */
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
 int tcp_reass _P((PNATState, register struct tcpcb *, register struct tcpiphdr *, struct mbuf *));
-#else /* !VBOX_WITH_BSD_TCP_REASS */
+#else /* !VBOX_WITH_BSD_REASS */
 int tcp_reass _P((PNATState, struct tcpcb *, struct tcphdr *, int *, struct mbuf *));
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
 void tcp_input _P((PNATState, register struct mbuf *, int, struct socket *));
 void tcp_dooptions _P((PNATState, struct tcpcb *, u_char *, int, struct tcpiphdr *));
Index: trunk/src/VBox/Devices/Network/slirp/slirp_state.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 14638)
@@ -105,5 +105,5 @@
     struct socket *tcp_last_so;
     tcp_seq tcp_iss;
-#if ARCH_BITS == 64
+#if ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS)
     /* Stuff from tcp_subr.c */
     void *apvHash[16384];
@@ -112,14 +112,14 @@
     uint64_t cpvHashInserts;
     uint64_t cpvHashDone;
-#endif
+#endif /* ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS) */
     /* Stuff from tcp_timer.c */
     struct tcpstat_t tcpstat;
     uint32_t tcp_now;
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
     int tcp_reass_qsize;
     int tcp_reass_maxqlen;
     int tcp_reass_maxseg;
     int tcp_reass_overflows;
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
     /* Stuff from tftp.c */
     struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX];
@@ -246,10 +246,10 @@
 #endif /* VBOX_WITH_BSD_REASS */
 
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
 #define tcp_reass_qsize pData->tcp_reass_qsize
 #define tcp_reass_maxqlen pData->tcp_reass_maxqlen
 #define tcp_reass_maxseg pData->tcp_reass_maxseg
 #define tcp_reass_overflows pData->tcp_reass_overflows
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
 
 #if SIZEOF_CHAR_P != 4
Index: trunk/src/VBox/Devices/Network/slirp/tcp_input.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_input.c	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_input.c	(revision 14638)
@@ -53,5 +53,5 @@
 #define TSTMP_GEQ(a,b)  ((int)((a)-(b)) >= 0)
 
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
 /*
  * Insert segment ti into reassembly queue of tcp with
@@ -221,5 +221,5 @@
 }
 
-#else /* VBOX_WITH_BSD_TCP_REASS */
+#else /* VBOX_WITH_BSD_REASS */
 
 #ifndef TCP_ACK_HACK
@@ -400,5 +400,5 @@
         return (flags);
 }
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
 
 /*
@@ -723,9 +723,9 @@
                         }
                 } else if (ti->ti_ack == tp->snd_una &&
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
                     u32_to_ptr(pData, tp->seg_next, struct tcpcb *) == tp &&
-#else  /* VBOX_WITH_BSD_TCP_REASS */
+#else  /* VBOX_WITH_BSD_REASS */
                     LIST_FIRST(&tp->t_segq) &&
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
                     ti->ti_len <= sbspace(&so->so_rcv)) {
                         /*
@@ -927,10 +927,10 @@
  *                      }
  */
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
                         (void) tcp_reass(pData, tp, (struct tcpiphdr *)0,
                                 (struct mbuf *)0);
-#else  /* VBOX_WITH_BSD_TCP_REASS */
+#else  /* VBOX_WITH_BSD_REASS */
                         (void) tcp_reass(pData, tp, (struct tcphdr *)0, NULL, (struct mbuf *)0);
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
                         /*
                          * if we didn't have to retransmit the SYN,
@@ -1187,9 +1187,9 @@
  *              }
  */
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
                 (void) tcp_reass(pData, tp, (struct tcpiphdr *)0, (struct mbuf *)0);
-#else  /* VBOX_WITH_BSD_TCP_REASS */
+#else  /* VBOX_WITH_BSD_REASS */
                 (void) tcp_reass(pData, tp, (struct tcphdr *)0, (int *)0, (struct mbuf *)0);
-#endif /*VBOX_WITH_BSD_TCP_REASS*/
+#endif /*VBOX_WITH_BSD_REASS*/
                 tp->snd_wl1 = ti->ti_seq - 1;
                 /* Avoid ack processing; snd_una==ti_ack  =>  dup ack */
@@ -1505,7 +1505,7 @@
         if ((ti->ti_len || (tiflags&TH_FIN)) &&
             TCPS_HAVERCVDFIN(tp->t_state) == 0) {
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
                 TCP_REASS(pData, tp, ti, m, so, tiflags);
-#else  /* VBOX_WITH_BSD_TCP_REASS */
+#else  /* VBOX_WITH_BSD_REASS */
                 if (ti->ti_seq == tp->rcv_nxt
                 && LIST_EMPTY(&tp->t_segq)
@@ -1525,5 +1525,5 @@
                     tiflags |= TF_ACKNOW;
                 }
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
                 /*
                  * Note the amount of data that peer has sent into
Index: trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 14638)
@@ -56,8 +56,8 @@
         tcb.so_next = tcb.so_prev = &tcb;
         tcp_last_so = &tcb;
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
         tcp_reass_maxqlen = 48;
         tcp_reass_maxseg  = 256;
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
 }
 
@@ -201,7 +201,7 @@
 
         memset((char *) tp, 0, sizeof(struct tcpcb));
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
         tp->seg_next = tp->seg_prev = ptr_to_u32(pData, (struct tcpiphdr *)tp);
-#endif /* !VBOX_WITH_BSD_TCP_REASS */
+#endif /* !VBOX_WITH_BSD_REASS */
         tp->t_maxseg = tcp_mssdflt;
 
@@ -274,5 +274,5 @@
         register struct mbuf *m;
 
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
         DEBUG_CALL("tcp_close");
         DEBUG_ARG("tp = %lx", (long )tp);
@@ -292,5 +292,5 @@
 /*      free(tp, M_PCB);  */
         u32ptr_done(pData, ptr_to_u32(pData, tp), tp);
-#else  /* VBOX_WITH_BSD_TCP_REASS */
+#else  /* VBOX_WITH_BSD_REASS */
         struct tseg_qent *te;
         DEBUG_CALL("tcp_close");
@@ -303,5 +303,5 @@
             tcp_reass_qsize--;
         }
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
         free(tp);
         so->so_tcpcb = 0;
@@ -943,5 +943,5 @@
 }
 
-#if SIZEOF_CHAR_P != 4
+#if SIZEOF_CHAR_P != 4 && !defined(VBOX_WITH_BSD_REASS)
 /**
  * Slow pointer hashing that deals with automatic inserting and collisions.
@@ -1063,3 +1063,3 @@
 }
 
-#endif
+#endif /* SIZEOF_CHAR_P != 4 && !defined(VBOX_WITH_BSD_REASS */
Index: trunk/src/VBox/Devices/Network/slirp/tcp_var.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_var.h	(revision 14633)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_var.h	(revision 14638)
@@ -38,7 +38,7 @@
 #define _TCP_VAR_H_
 
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
 #include "queue.h"
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
 
 #include "tcpip.h"
@@ -55,17 +55,17 @@
 # include <iprt/assert.h>
 
-#if defined(VBOX_WITH_BSD_TCP_REASS) && defined(VBOX_WITH_BSD_REASS)
+#if defined(VBOX_WITH_BSD_REASS)
 # define u32ptr_done(pData, u32, ptr)  do {} while (0)
 # define ptr_to_u32(pData, ptr)        (ptr)
 # define u32_to_ptr(pData, u32, type)  ((type)(u32))
-#else /* VBOX_WITH_BSD_REASS && VBOX_WITH_BSD_TCP_REASS */
+#else /* !VBOX_WITH_BSD_REASS */
 # define u32ptr_done(pData, u32, ptr) VBoxU32PtrDone((pData), (ptr), (u32))
 # define ptr_to_u32(pData, ptr)       VBoxU32PtrHash((pData), (ptr))
 # define u32_to_ptr(pData, u32, type) ((type)VBoxU32PtrLookup((pData), (u32)))
-#endif /* !VBOX_WITH_BSD_REASS || !VBOX_WITH_BSD_TCP_REASS*/
+#endif /* !VBOX_WITH_BSD_REASS */
 
 #endif
 
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
 /* TCP segment queue entry */
 struct tseg_qent {
@@ -82,12 +82,12 @@
  */
 struct tcpcb {
-#ifndef VBOX_WITH_BSD_TCP_REASS
+#ifndef VBOX_WITH_BSD_REASS
         tcpiphdrp_32 seg_next;  /* sequencing queue */
         tcpiphdrp_32 seg_prev;
-#else  /* VBOX_WITH_BSD_TCP_REASS */
+#else  /* VBOX_WITH_BSD_REASS */
         LIST_ENTRY(tcpcb) t_list;
         struct  tsegqe_head t_segq;     /* segment reassembly queue */
         int     t_segqlen;              /* segment reassembly queue length */
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
         short   t_state;                /* state of this connection */
         short   t_timer[TCPT_NTIMERS];  /* tcp timers */
@@ -176,7 +176,7 @@
 };
 
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
 LIST_HEAD(tcpcbhead, tcpcb);
-#endif /*VBOX_WITH_BSD_TCP_REASS*/
+#endif /* VBOX_WITH_BSD_REASS */
 
 #define sototcpcb(so)   ((so)->so_tcpcb)
@@ -292,7 +292,7 @@
         u_long  tcps_socachemiss;       /* tcp_last_so misses */
         u_long  tcps_didnuttin;         /* Times tcp_output didn't do anything XXX */
-#ifdef VBOX_WITH_BSD_TCP_REASS
+#ifdef VBOX_WITH_BSD_REASS
         u_long tcps_rcvmemdrop;
-#endif /* VBOX_WITH_BSD_TCP_REASS */
+#endif /* VBOX_WITH_BSD_REASS */
 };
 
