Index: trunk/src/VBox/Devices/Network/slirp/ip.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip.h	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/ip.h	(revision 15453)
@@ -38,7 +38,5 @@
 #define _IP_H_
 
-#ifdef VBOX_WITH_BSD_REASS
-# include "queue.h"
-#endif
+#include "queue.h"
 
 #ifdef WORDS_BIGENDIAN
@@ -173,13 +171,5 @@
 # include <sys/types32.h>
 #else
-# if SIZEOF_CHAR_P == 4
 typedef caddr_t caddr32_t;
-# else
-#  if !defined(VBOX_WITH_BSD_REASS)
-typedef u_int32_t caddr32_t;
-#  else /* VBOX_WITH_BSD_REASS */
-typedef caddr_t caddr32_t;
-#  endif /* VBOX_WITH_BSD_REASS */
-# endif
 #endif
 
@@ -197,11 +187,5 @@
 struct ipovly
 {
-#if !defined(VBOX_WITH_BSD_REASS)
-    caddr32_t       ih_next;
-    caddr32_t       ih_prev;          /* for protocol sequence q's */
-    u_int8_t        ih_x1;            /* (unused) */
-#else /* VBOX_WITH_BSD_REASS */
     u_int8_t        ih_x1[9];         /* (unused) */
-#endif /* VBOX_WITH_BSD_REASS */
     u_int8_t        ih_pr;            /* protocol */
     u_int16_t       ih_len;           /* protocol length */
@@ -219,25 +203,14 @@
 struct ipq_t
 {
-#ifndef VBOX_WITH_BSD_REASS
-    ipqp_32         next;
-    ipqp_32         prev;            /* to other reass headers */
-#else  /* VBOX_WITH_BSD_REASS */
     TAILQ_ENTRY(ipq_t) ipq_list;
-#endif /* VBOX_WITH_BSD_REASS */
     u_int8_t        ipq_ttl;         /* time for reass q to live */
     u_int8_t        ipq_p;           /* protocol of this fragment */
     u_int16_t       ipq_id;          /* sequence id for reassembly */
-#ifndef VBOX_WITH_BSD_REASS
-    ipasfragp_32    ipq_next;
-    ipasfragp_32    ipq_prev;        /* to ip headers of fragments */
-#else  /* VBOX_WITH_BSD_REASS */
     struct mbuf     *ipq_frags;      /* to ip headers of fragments */
     uint8_t         ipq_nfrags;      /* # of fragments in this packet */
-#endif /* VBOX_WITH_BSD_REASS */
     struct in_addr  ipq_src;
     struct in_addr  ipq_dst;
 };
 
-#ifdef VBOX_WITH_BSD_REASS
 
 /*
@@ -250,46 +223,4 @@
 (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK)
 TAILQ_HEAD(ipqhead,ipq_t);
-
-#else /* !VBOX_WITH_BSD_REASS */
-
-/*
- * Ip header, when holding a fragment.
- *
- * Note: ipf_next must be at same offset as ipq_next above
- */
-struct  ipasfrag
-{
-#ifdef WORDS_BIGENDIAN
-# ifdef _MSC_VER
-    uint8_t      ip_v:4;
-    uint8_t      ip_hl:4;
-# else
-    unsigned     ip_v:4;
-    unsigned     ip_hl:4;
-# endif
-#else
-# ifdef _MSC_VER
-    uint8_t      ip_hl:4;
-    uint8_t      ip_v:4;
-# else
-    unsigned     ip_hl:4;
-    unsigned     ip_v:4;
-# endif
-#endif
-    u_int8_t     ipf_mff;           /* XXX overlays ip_tos: use low bit
-                                     * to avoid destroying tos (PPPDTRuu);
-                                     * copied from (ip_off & IP_MF) */
-    u_int16_t    ip_len;
-    u_int16_t    ip_id;
-    u_int16_t    ip_off;
-    u_int8_t     ip_ttl;
-    u_int8_t     ip_p;
-    u_int16_t    ip_sum;
-    ipasfragp_32 ipf_next;          /* next fragment */
-    ipasfragp_32 ipf_prev;          /* previous fragment */
-};
-AssertCompileSize(struct ipasfrag, 20);
-
-#endif /* !VBOX_WITH_BSD_REASS */
 
 /*
Index: trunk/src/VBox/Devices/Network/slirp/ip_input.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_input.c	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/ip_input.c	(revision 15453)
@@ -54,7 +54,4 @@
 ip_init(PNATState pData)
 {
-#ifndef VBOX_WITH_BSD_REASS
-    ipq.next = ipq.prev = ptr_to_u32(pData, &ipq);
-#else /* !VBOX_WITH_BSD_REASS */
     int i = 0;
     for (i = 0; i < IPREASS_NHASH; ++i)
@@ -63,5 +60,4 @@
     maxfragsperpacket = 16;
     nipq = 0;
-#endif /* VBOX_WITH_BSD_REASS */
     ip_currid = tt.tv_sec & 0xffff;
     udp_init(pData);
@@ -163,58 +159,4 @@
      * XXX This should fail, don't fragment yet
      */
-#ifndef VBOX_WITH_BSD_REASS
-    if (ip->ip_off &~ IP_DF)
-    {
-        register struct ipq_t *fp;
-        /*
-         * Look for queue of fragments
-         * of this datagram.
-         */
-        for (fp = u32_to_ptr(pData, ipq.next, struct ipq_t *);
-                fp != &ipq;
-                fp = u32_to_ptr(pData, fp->next, struct ipq_t *))
-            if (   ip->ip_id == fp->ipq_id
-                && ip->ip_src.s_addr == fp->ipq_src.s_addr
-                && ip->ip_dst.s_addr == fp->ipq_dst.s_addr
-                && ip->ip_p == fp->ipq_p)
-                goto found;
-        fp = 0;
-found:
-
-        /*
-         * Adjust ip_len to not reflect header,
-         * set ip_mff if more fragments are expected,
-         * convert offset of this to bytes.
-         */
-        ip->ip_len -= hlen;
-        if (ip->ip_off & IP_MF)
-            ((struct ipasfrag *)ip)->ipf_mff |= 1;
-        else
-            ((struct ipasfrag *)ip)->ipf_mff &= ~1;
-
-        ip->ip_off <<= 3;
-
-        /*
-         * If datagram marked as having more fragments
-         * or if this is not the first fragment,
-         * attempt reassembly; if it succeeds, proceed.
-         */
-        if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off)
-        {
-            ipstat.ips_fragments++;
-            ip = ip_reass(pData, (struct ipasfrag *)ip, fp);
-            if (ip == 0)
-                return;
-            ipstat.ips_reassembled++;
-            m = dtom(pData, ip);
-        }
-        else
-            if (fp)
-                ip_freef(pData, fp);
-
-    }
-    else
-        ip->ip_len -= hlen;
-#else /* !VBOX_WITH_BSD_REASS */
     if (ip->ip_off & (IP_MF | IP_OFFMASK))
     {
@@ -227,5 +169,4 @@
     else
         ip->ip_len -= hlen;
-#endif /* VBOX_WITH_BSD_REASS */
 
     /*
@@ -253,196 +194,4 @@
     return;
 }
-
-#ifndef VBOX_WITH_BSD_REASS
-/*
- * Take incoming datagram fragment and try to
- * reassemble it into whole datagram.  If a chain for
- * reassembly of this datagram already exists, then it
- * is given as fp; otherwise have to make a chain.
- */
-struct ip *
-ip_reass(PNATState pData, register struct ipasfrag *ip, register struct ipq_t *fp)
-{
-    register struct mbuf *m = dtom(pData, ip);
-    register struct ipasfrag *q;
-    int hlen = ip->ip_hl << 2;
-    int i, next;
-
-    DEBUG_CALL("ip_reass");
-    DEBUG_ARG("ip = %lx", (long)ip);
-    DEBUG_ARG("fp = %lx", (long)fp);
-    DEBUG_ARG("m = %lx", (long)m);
-
-    /*
-     * Presence of header sizes in mbufs
-     * would confuse code below.
-     * Fragment m_data is concatenated.
-     */
-    m->m_data += hlen;
-    m->m_len -= hlen;
-
-    /*
-     * If first fragment to arrive, create a reassembly queue.
-     */
-    if (fp == 0)
-    {
-        struct mbuf *t;
-        if ((t = m_get(pData)) == NULL) goto dropfrag;
-        fp = mtod(t, struct ipq_t *);
-        insque_32(pData, fp, &ipq);
-        fp->ipq_ttl = IPFRAGTTL;
-        fp->ipq_p = ip->ip_p;
-        fp->ipq_id = ip->ip_id;
-        fp->ipq_next = fp->ipq_prev = ptr_to_u32(pData, (struct ipasfrag *)fp);
-        fp->ipq_src = ((struct ip *)ip)->ip_src;
-        fp->ipq_dst = ((struct ip *)ip)->ip_dst;
-        q = (struct ipasfrag *)fp;
-        goto insert;
-    }
-
-    /*
-     * Find a segment which begins after this one does.
-     */
-    for (q = u32_to_ptr(pData, fp->ipq_next, struct ipasfrag *);
-         q != (struct ipasfrag *)fp;
-         q = u32_to_ptr(pData, q->ipf_next, struct ipasfrag *))
-        if (q->ip_off > ip->ip_off)
-            break;
-
-    /*
-     * If there is a preceding segment, it may provide some of
-     * our data already.  If so, drop the data from the incoming
-     * segment.  If it provides all of our data, drop us.
-     */
-    if (u32_to_ptr(pData, q->ipf_prev, struct ipq_t *) != fp)
-    {
-        i = (u32_to_ptr(pData, q->ipf_prev, struct ipasfrag *))->ip_off +
-            (u32_to_ptr(pData, q->ipf_prev, struct ipasfrag *))->ip_len - ip->ip_off;
-        if (i > 0)
-        {
-            if (i >= ip->ip_len)
-                goto dropfrag;
-            m_adj(dtom(pData, ip), i);
-            ip->ip_off += i;
-            ip->ip_len -= i;
-        }
-    }
-
-    /*
-     * While we overlap succeeding segments trim them or,
-     * if they are completely covered, dequeue them.
-     */
-    while (q != (struct ipasfrag *)fp && ip->ip_off + ip->ip_len > q->ip_off)
-    {
-        i = (ip->ip_off + ip->ip_len) - q->ip_off;
-        if (i < q->ip_len) {
-            q->ip_len -= i;
-            q->ip_off += i;
-            m_adj(dtom(pData, q), i);
-            break;
-        }
-        q = u32_to_ptr(pData, q->ipf_next, struct ipasfrag *);
-        m_freem(pData, dtom(pData, u32_to_ptr(pData, q->ipf_prev, struct ipasfrag *)));
-        ip_deq(pData, u32_to_ptr(pData, q->ipf_prev, struct ipasfrag *));
-    }
-
-insert:
-    /*
-     * Stick new segment in its place;
-     * check for complete reassembly.
-     */
-    ip_enq(pData, ip, u32_to_ptr(pData, q->ipf_prev, struct ipasfrag *));
-    next = 0;
-    for (q = u32_to_ptr(pData, fp->ipq_next, struct ipasfrag *);
-         q != (struct ipasfrag *)fp;
-         q = u32_to_ptr(pData, q->ipf_next, struct ipasfrag *))
-    {
-        if (q->ip_off != next)
-            return (0);
-        next += q->ip_len;
-    }
-    if (u32_to_ptr(pData, q->ipf_prev, struct ipasfrag *)->ipf_mff & 1)
-        return (0);
-
-    /*
-     * Reassembly is complete; concatenate fragments.
-     */
-    q = u32_to_ptr(pData, fp->ipq_next, struct ipasfrag *);
-    m = dtom(pData, q);
-
-    q = u32_to_ptr(pData, q->ipf_next, struct ipasfrag *);
-    while (q != (struct ipasfrag *)fp)
-    {
-        struct mbuf *t;
-        t = dtom(pData, q);
-        q = u32_to_ptr(pData, q->ipf_next, struct ipasfrag *);
-        m_cat(pData, m, t);
-    }
-
-    /*
-     * Create header for new ip packet by
-     * modifying header of first packet;
-     * dequeue and discard fragment reassembly header.
-     * Make header visible.
-     */
-    ip = u32_to_ptr(pData, fp->ipq_next, struct ipasfrag *);
-
-    /*
-     * If the fragments concatenated to an mbuf that's
-     * bigger than the total size of the fragment, then and
-     * m_ext buffer was alloced. But fp->ipq_next points to
-     * the old buffer (in the mbuf), so we must point ip
-     * into the new buffer.
-     */
-    if (m->m_flags & M_EXT)
-    {
-        int delta;
-        delta = (char *)ip - m->m_dat;
-        ip = (struct ipasfrag *)(m->m_ext + delta);
-    }
-
-    /* DEBUG_ARG("ip = %lx", (long)ip);
-     * ip=(struct ipasfrag *)m->m_data; */
-
-    ip->ip_len = next;
-    ip->ipf_mff &= ~1;
-    ((struct ip *)ip)->ip_src = fp->ipq_src;
-    ((struct ip *)ip)->ip_dst = fp->ipq_dst;
-    remque_32(pData, fp);
-    (void) m_free(pData, dtom(pData, fp));
-    m = dtom(pData, ip);
-    m->m_len += (ip->ip_hl << 2);
-    m->m_data -= (ip->ip_hl << 2);
-
-    return ((struct ip *)ip);
-
-dropfrag:
-    ipstat.ips_fragdropped++;
-    m_freem(pData, m);
-    return (0);
-}
-
-/*
- * Free a fragment reassembly header and all
- * associated datagrams.
- */
-void
-ip_freef(PNATState pData, struct ipq_t *fp)
-{
-    register struct ipasfrag *q, *p;
-
-    for (q = u32_to_ptr(pData, fp->ipq_next, struct ipasfrag *);
-         q != (struct ipasfrag *)fp;
-         q = p)
-    {
-        p = u32_to_ptr(pData, q->ipf_next, struct ipasfrag *);
-        ip_deq(pData, q);
-        m_freem(pData, dtom(pData, q));
-    }
-    remque_32(pData, fp);
-    (void) m_free(pData, dtom(pData, fp));
-}
-
-#else /* VBOX_WITH_BSD_REASS */
 
 struct mbuf *
@@ -760,35 +509,4 @@
     nipq--;
 }
-#endif /* VBOX_WITH_BSD_REASS */
-
-#ifndef VBOX_WITH_BSD_REASS
-/*
- * Put an ip fragment on a reassembly chain.
- * Like insque, but pointers in middle of structure.
- */
-void
-ip_enq(PNATState pData, register struct ipasfrag *p, register struct ipasfrag *prev)
-{
-    DEBUG_CALL("ip_enq");
-    DEBUG_ARG("prev = %lx", (long)prev);
-    p->ipf_prev = ptr_to_u32(pData, prev);
-    p->ipf_next = prev->ipf_next;
-    u32_to_ptr(pData, prev->ipf_next, struct ipasfrag *)->ipf_prev = ptr_to_u32(pData, p);
-    prev->ipf_next = ptr_to_u32(pData, p);
-}
-
-/*
- * To ip_enq as remque is to insque.
- */
-void
-ip_deq(PNATState pData, register struct ipasfrag *p)
-{
-    struct ipasfrag *prev = u32_to_ptr(pData, p->ipf_prev, struct ipasfrag *);
-    struct ipasfrag *next = u32_to_ptr(pData, p->ipf_next, struct ipasfrag *);
-    u32ptr_done(pData, prev->ipf_next, p);
-    prev->ipf_next = p->ipf_next;
-    next->ipf_prev = p->ipf_prev;
-}
-#endif /* !VBOX_WITH_BSD_REASS */
 
 /*
@@ -802,22 +520,4 @@
     register struct ipq_t *fp;
 
-#ifndef VBOX_WITH_BSD_REASS
-    DEBUG_CALL("ip_slowtimo");
-
-    fp = u32_to_ptr(pData, ipq.next, struct ipq_t *);
-    if (fp == 0)
-        return;
-
-    while (fp != &ipq)
-    {
-        --fp->ipq_ttl;
-        fp = u32_to_ptr(pData, fp->next, struct ipq_t *);
-        if (u32_to_ptr(pData, fp->prev, struct ipq_t *)->ipq_ttl == 0)
-        {
-            ipstat.ips_fragtimeout++;
-            ip_freef(pData, u32_to_ptr(pData, fp->prev, struct ipq_t *));
-        }
-        }
-#else /* VBOX_WITH_BSD_REASS */
     /* XXX: the fragment expiration is the same but requier
      * additional loop see (see ip_input.c in FreeBSD tree)
@@ -855,5 +555,4 @@
         }
     }
-#endif /* VBOX_WITH_BSD_REASS */
 }
 
Index: trunk/src/VBox/Devices/Network/slirp/mbuf.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/mbuf.c	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/mbuf.c	(revision 15453)
@@ -110,5 +110,4 @@
         if (m->m_flags & M_DOFREE)
         {
-            u32ptr_done(pData, ptr_to_u32(pData, m), m);
             free(m);
             mbuf_alloced--;
Index: trunk/src/VBox/Devices/Network/slirp/mbuf.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/mbuf.h	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/mbuf.h	(revision 15453)
@@ -74,7 +74,5 @@
     caddr_t mh_data;           /* Location of data */
     int     mh_len;            /* Amount of data in this mbuf */
-#ifdef VBOX_WITH_BSD_REASS
-    void *header;              /*XXX: in real BSD sources this field lays in pkthdr structure*/
-#endif
+    void    *header;           /*XXX: in real BSD sources this field lays in pkthdr structure*/
 };
 
@@ -126,9 +124,7 @@
 #define M_DOFREE                0x08    /* when m_free is called on the mbuf, free()
                                          * it rather than putting it on the free list */
-#ifdef VBOX_WITH_BSD_REASS
-#define M_FRAG                  0x0800  /* packet is a fragment of a larger packet */
-#define M_FIRSTFRAG             0x1000  /* paket is first fragment */
-#define M_LASTFRAG              0x2000  /* paket is last fragment */
-#endif /* VBOX_WITH_BSD_REASS */
+#define M_FRAG                0x0800    /* packet is a fragment of a larger packet */
+#define M_FIRSTFRAG           0x1000    /* paket is first fragment */
+#define M_LASTFRAG            0x2000    /* paket is last fragment */
 
 extern int mbuf_alloced;
Index: trunk/src/VBox/Devices/Network/slirp/misc.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 15453)
@@ -29,40 +29,4 @@
     our_addr.s_addr = loopback_addr.s_addr;
 }
-
-#if SIZEOF_CHAR_P == 8 && !defined(VBOX_WITH_BSD_REASS)
-
-struct quehead_32
-{
-    u_int32_t qh_link;
-    u_int32_t qh_rlink;
-};
-
-void
-insque_32(PNATState pData, void *a, void *b)
-{
-    register struct quehead_32 *element = (struct quehead_32 *) a;
-    register struct quehead_32 *head = (struct quehead_32 *) b;
-    struct quehead_32 *link = u32_to_ptr(pData, head->qh_link, struct quehead_32 *);
-
-    element->qh_link = head->qh_link;
-    element->qh_rlink = ptr_to_u32(pData, head);
-    Assert(link->qh_rlink == element->qh_rlink);
-    link->qh_rlink = head->qh_link = ptr_to_u32(pData, element);
-}
-
-void
-remque_32(PNATState pData, void *a)
-{
-    register struct quehead_32 *element = (struct quehead_32 *) a;
-    struct quehead_32 *link = u32_to_ptr(pData, element->qh_link, struct quehead_32 *);
-    struct quehead_32 *rlink = u32_to_ptr(pData, element->qh_rlink, struct quehead_32 *);
-
-    u32ptr_done(pData, link->qh_rlink, element);
-    link->qh_rlink = element->qh_rlink;
-    rlink->qh_link = element->qh_link;
-    element->qh_rlink = 0;
-}
-
-#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 15450)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 15453)
@@ -342,7 +342,4 @@
     pData->fPassDomain = fPassDomain;
     pData->pvUser = pvUser;
-#if ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS)
-    pData->cpvHashUsed = 1;
-#endif
     tftp_prefix = pszTFTPPrefix;
     bootp_filename = pszBootFile;
@@ -446,9 +443,4 @@
         RTStrFree((char *)(void *)pData->pszDomain);
 
-#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));
-#endif
-
 #ifdef VBOX_WITH_SLIRP_ICMP
 # ifdef RT_OS_WINDOWS
@@ -522,7 +514,5 @@
     int error;
 #endif
-#ifdef VBOX_WITH_BSD_REASS
     int i;
-#endif /* VBOX_WITH_BSD_REASS */
 
     STAM_REL_PROFILE_START(&pData->StatFill, a);
@@ -540,8 +530,4 @@
          * 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 *)));
-#else /* !VBOX_WITH_BSD_REASS */
         /* XXX:
          * triggering of fragment expiration should be the same but use new macroses
@@ -559,5 +545,4 @@
             }
         }
-#endif /* VBOX_WITH_BSD_REASS */
         ICMP_ENGAGE_EVENT(&pData->icmp_socket, readfds);
 
Index: trunk/src/VBox/Devices/Network/slirp/slirp.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 15453)
@@ -295,13 +295,6 @@
 void ip_init _P((PNATState));
 void ip_input _P((PNATState, struct mbuf *));
-#ifndef VBOX_WITH_BSD_REASS
-struct ip * ip_reass _P((PNATState, register struct ipasfrag *, register struct ipq_t *));
-void ip_freef _P((PNATState, struct ipq_t *));
-void ip_enq _P((PNATState, register struct ipasfrag *, register struct ipasfrag *));
-void ip_deq _P((PNATState, register struct ipasfrag *));
-#else /* !VBOX_WITH_BSD_REASS */
 struct mbuf * ip_reass _P((PNATState, register struct mbuf *));
 void ip_freef _P((PNATState, struct ipqhead *, struct ipq_t *));
-#endif  /* VBOX_WITH_BSD_REASS */
 void ip_slowtimo _P((PNATState));
 void ip_stripoptions _P((register struct mbuf *, struct mbuf *));
@@ -311,9 +304,5 @@
 
 /* tcp_input.c */
-#ifndef VBOX_WITH_BSD_REASS
-int tcp_reass _P((PNATState, register struct tcpcb *, register struct tcpiphdr *, struct mbuf *));
-#else /* !VBOX_WITH_BSD_REASS */
 int tcp_reass _P((PNATState, struct tcpcb *, struct tcphdr *, int *, struct mbuf *));
-#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 15450)
+++ trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 15453)
@@ -74,12 +74,8 @@
     /* Stuff from ip_input.c */
     struct ipstat_t ipstat;
-#ifndef VBOX_WITH_BSD_REASS
-    struct ipq_t ipq;
-#else /* !VBOX_WITH_BSD_REASS */
     struct ipqhead ipq[IPREASS_NHASH];
     int maxnipq;    /* Administrative limit on # of reass queues*/
     int maxfragsperpacket; /* Maximum number of IPv4 fragments allowed per packet */
     int nipq; /* total number of reass queues */
-#endif /* VBOX_WITH_BSD_REASS */
     uint16_t ip_currid;
     /* Stuff from mbuf.c */
@@ -110,21 +106,11 @@
     struct socket *tcp_last_so;
     tcp_seq tcp_iss;
-#if ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS)
-    /* Stuff from tcp_subr.c */
-    void *apvHash[16384];
-    uint32_t cpvHashUsed;
-    uint32_t cpvHashCollisions;
-    uint64_t cpvHashInserts;
-    uint64_t cpvHashDone;
-#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_REASS
     int tcp_reass_qsize;
     int tcp_reass_maxqlen;
     int tcp_reass_maxseg;
     int tcp_reass_overflows;
-#endif /* VBOX_WITH_BSD_REASS */
     /* Stuff from tftp.c */
     struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX];
@@ -256,6 +242,4 @@
 #define udp_last_so pData->udp_last_so
 
-#ifdef VBOX_WITH_BSD_REASS
-
 #define maxfragsperpacket pData->maxfragsperpacket
 #define maxnipq pData->maxnipq
@@ -267,30 +251,3 @@
 #define tcp_reass_overflows pData->tcp_reass_overflows
 
-#else /* ! VBOX_WITH_BSD_REASS */
-
-#if SIZEOF_CHAR_P != 4
-    extern void     VBoxU32PtrDone(PNATState pData, void *pv, uint32_t iHint);
-    extern uint32_t VBoxU32PtrHashSlow(PNATState pData, void *pv);
-
-    /** Hash the pointer, inserting it if need be. */
-    DECLINLINE(uint32_t) VBoxU32PtrHash(PNATState pData, void *pv)
-    {
-        uint32_t i = ((uintptr_t)pv >> 3) % RT_ELEMENTS(pData->apvHash);
-        if (RT_LIKELY(pData->apvHash[i] == pv && pv))
-            return i;
-        return VBoxU32PtrHashSlow(pData, pv);
-    }
-    /** Lookup the hash value. */
-    DECLINLINE(void *) VBoxU32PtrLookup(PNATState pData, uint32_t i)
-    {
-        void *pv;
-        Assert(i < RT_ELEMENTS(pData->apvHash));
-        pv = pData->apvHash[i];
-        Assert(pv || !i);
-        return pv;
-    }
-#endif
-
-#endif
-
 #endif /* !_slirp_state_h_ */
Index: trunk/src/VBox/Devices/Network/slirp/tcp_input.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_input.c	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_input.c	(revision 15453)
@@ -53,174 +53,4 @@
 #define TSTMP_GEQ(a,b)  ((int)((a)-(b)) >= 0)
 
-#ifndef VBOX_WITH_BSD_REASS
-/*
- * Insert segment ti into reassembly queue of tcp with
- * control block tp.  Return TH_FIN if reassembly now includes
- * a segment with FIN.  The macro form does the common case inline
- * (segment is the next to be received on an established connection,
- * and the queue is empty), avoiding linkage into and removal
- * from the queue and repetition of various conversions.
- * Set DELACK for segments received in order, but ack immediately
- * when segments are out of order (so fast retransmit can work).
- */
-#ifdef TCP_ACK_HACK
-#define TCP_REASS(pData, tp, ti, m, so, flags) {\
-       if ((ti)->ti_seq == (tp)->rcv_nxt && \
-           u32_to_ptr((pData), (tp)->seg_next, struct tcpcb *) == (tp) && \
-           (tp)->t_state == TCPS_ESTABLISHED) {\
-               if (ti->ti_flags & TH_PUSH) \
-                       tp->t_flags |= TF_ACKNOW; \
-               else \
-                       tp->t_flags |= TF_DELACK; \
-               (tp)->rcv_nxt += (ti)->ti_len; \
-               flags = (ti)->ti_flags & TH_FIN; \
-               tcpstat.tcps_rcvpack++;\
-               tcpstat.tcps_rcvbyte += (ti)->ti_len;\
-               if (so->so_emu) { \
-                       if (tcp_emu((pData), (so),(m))) sbappend((pData), (so), (m)); \
-               } else \
-                       sbappend((pData), (so), (m)); \
-/*               sorwakeup(so); */ \
-        } else {\
-               (flags) = tcp_reass((pData), (tp), (ti), (m)); \
-               tp->t_flags |= TF_ACKNOW; \
-       } \
-}
-#else
-#define TCP_REASS(pData, tp, ti, m, so, flags) { \
-        if ((ti)->ti_seq == (tp)->rcv_nxt && \
-            u32_to_ptr((pData), (tp)->seg_next, struct tcpcb *) == (tp) && \
-            (tp)->t_state == TCPS_ESTABLISHED) { \
-                tp->t_flags |= TF_DELACK; \
-                (tp)->rcv_nxt += (ti)->ti_len; \
-                flags = (ti)->ti_flags & TH_FIN; \
-                tcpstat.tcps_rcvpack++;\
-                tcpstat.tcps_rcvbyte += (ti)->ti_len;\
-                if (so->so_emu) { \
-                        if (tcp_emu((pData), (so),(m))) sbappend((pData), (so), (m)); \
-                } else \
-                        sbappend((pData), (so), (m)); \
-/*              sorwakeup(so); */ \
-        } else { \
-                (flags) = tcp_reass((pData), (tp), (ti), (m)); \
-                tp->t_flags |= TF_ACKNOW; \
-        } \
-}
-#endif
-
-int
-tcp_reass(PNATState pData, register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf *m)
-{
-        register struct tcpiphdr *q;
-        struct socket *so = tp->t_socket;
-        int flags;
-
-        /*
-         * Call with ti==0 after become established to
-         * force pre-ESTABLISHED data up to user socket.
-         */
-        if (ti == 0)
-                goto present;
-
-        /*
-         * Find a segment which begins after this one does.
-         */
-        for (q = u32_to_ptr(pData, tp->seg_next, struct tcpiphdr *); q != (struct tcpiphdr *)tp;
-            q = u32_to_ptr(pData, q->ti_next, struct tcpiphdr *))
-                if (SEQ_GT(q->ti_seq, ti->ti_seq))
-                        break;
-
-        /*
-         * If there is a preceding segment, it may provide some of
-         * our data already.  If so, drop the data from the incoming
-         * segment.  If it provides all of our data, drop us.
-         */
-        if (u32_to_ptr(pData, q->ti_prev, struct tcpiphdr *) != (struct tcpiphdr *)tp) {
-                register int i;
-                q = u32_to_ptr(pData, q->ti_prev, struct tcpiphdr *);
-                /* conversion to int (in i) handles seq wraparound */
-                i = q->ti_seq + q->ti_len - ti->ti_seq;
-                if (i > 0) {
-                        if (i >= ti->ti_len) {
-                                tcpstat.tcps_rcvduppack++;
-                                tcpstat.tcps_rcvdupbyte += ti->ti_len;
-                                m_freem(pData, m);
-                                /*
-                                 * Try to present any queued data
-                                 * at the left window edge to the user.
-                                 * This is needed after the 3-WHS
-                                 * completes.
-                                 */
-                                goto present;   /* ??? */
-                        }
-                        m_adj(m, i);
-                        ti->ti_len -= i;
-                        ti->ti_seq += i;
-                }
-                q = u32_to_ptr(pData, q->ti_next, struct tcpiphdr *);
-        }
-        tcpstat.tcps_rcvoopack++;
-        tcpstat.tcps_rcvoobyte += ti->ti_len;
-        REASS_MBUF_SET(ti, m); /* XXX */
-
-        /*
-         * While we overlap succeeding segments trim them or,
-         * if they are completely covered, dequeue them.
-         */
-        while (q != (struct tcpiphdr *)tp) {
-                register int i = (ti->ti_seq + ti->ti_len) - q->ti_seq;
-                if (i <= 0)
-                        break;
-                if (i < q->ti_len) {
-                        q->ti_seq += i;
-                        q->ti_len -= i;
-                        m_adj(REASS_MBUF_GET(q), i);
-                        break;
-                }
-                q = u32_to_ptr(pData, q->ti_next, struct tcpiphdr *);
-                m = REASS_MBUF_GET(u32_to_ptr(pData, q->ti_prev, struct tcpiphdr *));
-                remque_32(pData, u32_to_ptr(pData, q->ti_prev, struct tcpiphdr *));
-                m_freem(pData, m);
-        }
-
-        /*
-         * Stick new segment in its place.
-         */
-        insque_32(pData, ti, u32_to_ptr(pData, q->ti_prev, struct tcpiphdr *));
-
-present:
-        /*
-         * Present data to user, advancing rcv_nxt through
-         * completed sequence space.
-         */
-        if (!TCPS_HAVEESTABLISHED(tp->t_state))
-                return (0);
-        ti = u32_to_ptr(pData, tp->seg_next, struct tcpiphdr *);
-        if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt)
-                return (0);
-        if (tp->t_state == TCPS_SYN_RECEIVED && ti->ti_len)
-                return (0);
-        do {
-                tp->rcv_nxt += ti->ti_len;
-                flags = ti->ti_flags & TH_FIN;
-                remque_32(pData, ti);
-                m = REASS_MBUF_GET(ti); /* XXX */
-                ti = u32_to_ptr(pData, ti->ti_next, struct tcpiphdr *);
-/*              if (so->so_state & SS_FCANTRCVMORE) */
-                if (so->so_state & SS_FCANTSENDMORE)
-                        m_freem(pData, m);
-                else {
-                        if (so->so_emu) {
-                                if (tcp_emu(pData, so,m)) sbappend(pData, so, m);
-                        } else
-                                sbappend(pData, so, m);
-                }
-        } while (ti != (struct tcpiphdr *)tp && ti->ti_seq == tp->rcv_nxt);
-/*      sorwakeup(so); */
-        return (flags);
-}
-
-#else /* VBOX_WITH_BSD_REASS */
-
 #ifndef TCP_ACK_HACK
 #define DELAY_ACK(tp, ti)                           \
@@ -400,5 +230,4 @@
         return (flags);
 }
-#endif /* VBOX_WITH_BSD_REASS */
 
 /*
@@ -470,10 +299,5 @@
          */
         tlen = ((struct ip *)ti)->ip_len;
-#if !defined(VBOX_WITH_BSD_REASS)
-        ti->ti_next = ti->ti_prev = 0;
-        ti->ti_x1 = 0;
-#else
         memset(ti->ti_x1, 0, 9);
-#endif
         ti->ti_len = htons((u_int16_t)tlen);
         len = sizeof(struct ip ) + tlen;
@@ -723,9 +547,5 @@
                         }
                 } else if (ti->ti_ack == tp->snd_una &&
-#ifndef VBOX_WITH_BSD_REASS
-                    u32_to_ptr(pData, tp->seg_next, struct tcpcb *) == tp &&
-#else  /* VBOX_WITH_BSD_REASS */
                     LIST_FIRST(&tp->t_segq) &&
-#endif /* VBOX_WITH_BSD_REASS */
                     ti->ti_len <= sbspace(&so->so_rcv)) {
                         /*
@@ -927,10 +747,5 @@
  *                      }
  */
-#ifndef VBOX_WITH_BSD_REASS
-                        (void) tcp_reass(pData, tp, (struct tcpiphdr *)0,
-                                (struct mbuf *)0);
-#else  /* VBOX_WITH_BSD_REASS */
                         (void) tcp_reass(pData, tp, (struct tcphdr *)0, NULL, (struct mbuf *)0);
-#endif /* VBOX_WITH_BSD_REASS */
                         /*
                          * if we didn't have to retransmit the SYN,
@@ -1187,9 +1002,5 @@
  *              }
  */
-#ifndef VBOX_WITH_BSD_REASS
-                (void) tcp_reass(pData, tp, (struct tcpiphdr *)0, (struct mbuf *)0);
-#else  /* VBOX_WITH_BSD_REASS */
                 (void) tcp_reass(pData, tp, (struct tcphdr *)0, (int *)0, (struct mbuf *)0);
-#endif /*VBOX_WITH_BSD_REASS*/
                 tp->snd_wl1 = ti->ti_seq - 1;
                 /* Avoid ack processing; snd_una==ti_ack  =>  dup ack */
@@ -1505,7 +1316,4 @@
         if ((ti->ti_len || (tiflags&TH_FIN)) &&
             TCPS_HAVERCVDFIN(tp->t_state) == 0) {
-#ifndef VBOX_WITH_BSD_REASS
-                TCP_REASS(pData, tp, ti, m, so, tiflags);
-#else  /* VBOX_WITH_BSD_REASS */
                 if (ti->ti_seq == tp->rcv_nxt
                 && LIST_EMPTY(&tp->t_segq)
@@ -1525,5 +1333,4 @@
                     tiflags |= TF_ACKNOW;
                 }
-#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 15450)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 15453)
@@ -56,8 +56,6 @@
     tcb.so_next = tcb.so_prev = &tcb;
     tcp_last_so = &tcb;
-#ifdef VBOX_WITH_BSD_REASS
     tcp_reass_maxqlen = 48;
     tcp_reass_maxseg  = 256;
-#endif /* VBOX_WITH_BSD_REASS */
 }
 
@@ -75,10 +73,5 @@
     register struct tcpiphdr *n = &tp->t_template;
 
-#if !defined(VBOX_WITH_BSD_REASS)
-    n->ti_next = n->ti_prev = 0;
-    n->ti_x1 = 0;
-#else
     memset(n->ti_x1, 0, 9);
-#endif
     n->ti_pr = IPPROTO_TCP;
     n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip));
@@ -160,10 +153,5 @@
     m->m_len = tlen;
 
-#if !defined(VBOX_WITH_BSD_REASS)
-    ti->ti_next = ti->ti_prev = 0;
-    ti->ti_x1 = 0;
-#else
     memset(ti->ti_x1, 0, 9);
-#endif
     ti->ti_seq = htonl(seq);
     ti->ti_ack = htonl(ack);
@@ -203,7 +191,4 @@
 
     memset((char *) tp, 0, sizeof(struct tcpcb));
-#ifndef VBOX_WITH_BSD_REASS
-    tp->seg_next = tp->seg_prev = ptr_to_u32(pData, (struct tcpiphdr *)tp);
-#endif /* !VBOX_WITH_BSD_REASS */
     tp->t_maxseg = tcp_mssdflt;
 
@@ -279,19 +264,4 @@
     register struct mbuf *m;
 
-#ifndef VBOX_WITH_BSD_REASS
-    DEBUG_CALL("tcp_close");
-    DEBUG_ARG("tp = %lx", (long )tp);
-
-    /* free the reassembly queue, if any */
-    t = u32_to_ptr(pData, tp->seg_next, struct tcpiphdr *);
-    while (t != (struct tcpiphdr *)tp)
-    {
-        t = u32_to_ptr(pData, t->ti_next, struct tcpiphdr *);
-        m = REASS_MBUF_GET(u32_to_ptr(pData, t->ti_prev, struct tcpiphdr *));
-        remque_32(pData, u32_to_ptr(pData, t->ti_prev, struct tcpiphdr *));
-        m_freem(pData, m);
-    }
-    u32ptr_done(pData, ptr_to_u32(pData, tp), tp);
-#else  /* VBOX_WITH_BSD_REASS */
     struct tseg_qent *te;
     DEBUG_CALL("tcp_close");
@@ -305,5 +275,4 @@
         tcp_reass_qsize--;
     }
-#endif /* VBOX_WITH_BSD_REASS */
     free(tp);
     so->so_tcpcb = 0;
@@ -972,124 +941,2 @@
     }
 }
-
-#if SIZEOF_CHAR_P != 4 && !defined(VBOX_WITH_BSD_REASS)
-/**
- * Slow pointer hashing that deals with automatic inserting and collisions.
- */
-uint32_t VBoxU32PtrHashSlow(PNATState pData, void *pv)
-{
-    uint32_t i;
-    if (pv == NULL)
-        i = 0;
-    else
-    {
-        const uint32_t i1 = ((uintptr_t)pv >> 3) % RT_ELEMENTS(pData->apvHash);
-        if (pData->apvHash[i1] == pv)
-            i = i1;
-        else
-        {
-            /*
-             * Try up to 10 times then assume it's an insertion.
-             * If we didn't find a free entry by then, try another 100 times.
-             * If that fails, give up.
-             */
-            const uint32_t  i2 = ((uintptr_t)pv >> 2) % 7867;
-            uint32_t        i1stFree = pData->apvHash[i1] ? 0 : i1;
-            int             cTries = 10;
-            int             cTries2 = 100;
-
-            i = i1;
-            for (;;)
-            {
-                /* check if we should give in.*/
-                if (--cTries > 0)
-                {
-                    if (i1stFree != 0)
-                    {
-                        i = i1stFree;
-                        pData->apvHash[i] = pv;
-                        pData->cpvHashUsed++;
-                        if (i != i1)
-                            pData->cpvHashCollisions++;
-                        pData->cpvHashInserts++;
-                        break;
-                    }
-                    if (!cTries2)
-                    {
-                        AssertReleaseMsgFailed(("NAT pointer hash error. pv=%p cpvHashUsed=%d cpvHashCollisions=%u\n",
-                                                pv, pData->cpvHashUsed, pData->cpvHashCollisions));
-                        i = 0;
-                        break;
-                    }
-                    cTries = cTries2;
-                    cTries2 = 0;
-                }
-
-                /* advance to the next hash entry and test it. */
-                i = (i + i2) % RT_ELEMENTS(pData->apvHash);
-                while (RT_UNLIKELY(!i))
-                    i = (i + i2) % RT_ELEMENTS(pData->apvHash);
-                if (pData->apvHash[i] == pv)
-                    break;
-                if (RT_UNLIKELY(!i1stFree && !pData->apvHash[i]))
-                    i1stFree = i;
-            }
-        }
-    }
-    return i;
-}
-
-
-/**
- * Removes the pointer from the hash table.
- */
-void VBoxU32PtrDone(PNATState pData, void *pv, uint32_t iHint)
-{
-    /* We don't count NULL pointers. */
-    if (pv == NULL)
-        return;
-    pData->cpvHashDone++;
-
-    /* try the hint */
-    if (    iHint
-        &&  iHint < RT_ELEMENTS(pData->apvHash)
-        &&  pData->apvHash[iHint] == pv)
-    {
-        pData->apvHash[iHint] = NULL;
-        pData->cpvHashUsed--;
-        return;
-    }
-
-    iHint = ((uintptr_t)pv >> 3) % RT_ELEMENTS(pData->apvHash);
-    if (RT_UNLIKELY(pData->apvHash[iHint] != pv))
-    {
-        /*
-         * Try up to 120 times then assert.
-         */
-        const uint32_t  i2 = ((uintptr_t)pv >> 2) % 7867;
-        int             cTries = 120;
-        for (;;)
-        {
-            /* advance to the next hash entry and test it. */
-            iHint = (iHint + i2) % RT_ELEMENTS(pData->apvHash);
-            while (RT_UNLIKELY(!iHint))
-                iHint = (iHint + i2) % RT_ELEMENTS(pData->apvHash);
-            if (pData->apvHash[iHint] == pv)
-                break;
-
-            /* check if we should give in.*/
-            if (--cTries > 0)
-            {
-                AssertReleaseMsgFailed(("NAT pointer hash error. pv=%p cpvHashUsed=%u cpvHashCollisions=%u\n",
-                                        pv, pData->cpvHashUsed, pData->cpvHashCollisions));
-                return;
-            }
-        }
-    }
-
-    /* found it */
-    pData->apvHash[iHint] = NULL;
-    pData->cpvHashUsed--;
-}
-
-#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 15450)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_var.h	(revision 15453)
@@ -38,34 +38,8 @@
 #define _TCP_VAR_H_
 
-#ifdef VBOX_WITH_BSD_REASS
 #include "queue.h"
-#endif /* VBOX_WITH_BSD_REASS */
-
 #include "tcpip.h"
 #include "tcp_timer.h"
 
-#if SIZEOF_CHAR_P == 4
- typedef struct tcpiphdr *tcpiphdrp_32;
-# 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
- typedef u_int32_t tcpiphdrp_32;
-# include <iprt/types.h>
-# include <iprt/assert.h>
-
-#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 */
-# 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 */
-
-#endif
-
-#ifdef VBOX_WITH_BSD_REASS
 /* TCP segment queue entry */
 struct tseg_qent
@@ -77,5 +51,4 @@
 };
 LIST_HEAD(tsegqe_head, tseg_qent);
-#endif
 
 /*
@@ -84,12 +57,7 @@
 struct tcpcb
 {
-#ifndef VBOX_WITH_BSD_REASS
-    tcpiphdrp_32 seg_next;           /* sequencing queue */
-    tcpiphdrp_32 seg_prev;
-#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_REASS */
     int16_t   t_state;               /* state of this connection */
     int16_t   t_timer[TCPT_NTIMERS]; /* tcp timers */
@@ -177,7 +145,5 @@
 };
 
-#ifdef VBOX_WITH_BSD_REASS
 LIST_HEAD(tcpcbhead, tcpcb);
-#endif /* VBOX_WITH_BSD_REASS */
 
 #define sototcpcb(so)   ((so)->so_tcpcb)
@@ -212,24 +178,4 @@
 #define TCP_REXMTVAL(tp) \
         (((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar)
-
-/* XXX
- * We want to avoid doing m_pullup on incoming packets but that
- * means avoiding dtom on the tcp reassembly code.  That in turn means
- * keeping an mbuf pointer in the reassembly queue (since we might
- * have a cluster).  As a quick hack, the source & destination
- * port numbers (which are no longer needed once we've located the
- * tcpcb) are overlayed with an mbuf pointer.
- */
-#if SIZEOF_CHAR_P == 4
-typedef struct mbuf *mbufp_32;
-/* VBox change which is too much bother to #ifdef */
-# define REASS_MBUF_SET(ti, p) (*(mbufp_32 *)&((ti)->ti_t)) = (p)
-# define REASS_MBUF_GET(ti)    ((struct mbuf *)(*(mbufp_32 *)&((ti)->ti_t)))
-#else
-typedef u_int32_t mbufp_32;
-/* VBox change which is too much bother to #ifdef */
-# define REASS_MBUF_SET(ti, p) (*(mbufp_32 *)&((ti)->ti_t)) = ptr_to_u32(pData, p)
-# define REASS_MBUF_GET(ti)    u32_to_ptr(pData, (*(mbufp_32 *)&((ti)->ti_t)), struct mbuf *)
-#endif
 
 /*
@@ -293,9 +239,6 @@
     u_long  tcps_socachemiss;       /* tcp_last_so misses */
     u_long  tcps_didnuttin;         /* Times tcp_output didn't do anything XXX */
-#ifdef VBOX_WITH_BSD_REASS
-    u_long tcps_rcvmemdrop;
-#endif /* VBOX_WITH_BSD_REASS */
+    u_long  tcps_rcvmemdrop;
 };
 
-
 #endif
Index: trunk/src/VBox/Devices/Network/slirp/udp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/udp.c	(revision 15450)
+++ trunk/src/VBox/Devices/Network/slirp/udp.c	(revision 15453)
@@ -130,11 +130,5 @@
     if (udpcksum && uh->uh_sum)
     {
-#if !defined(VBOX_WITH_BSD_REASS)
-        ((struct ipovly *)ip)->ih_next = 0;
-        ((struct ipovly *)ip)->ih_prev = 0;
-        ((struct ipovly *)ip)->ih_x1 = 0;
-#else
         memset(((struct ipovly *)ip)->ih_x1, 0, 9);
-#endif
         ((struct ipovly *)ip)->ih_len = uh->uh_ulen;
 #if 0
@@ -300,10 +294,5 @@
      */
     ui = mtod(m, struct udpiphdr *);
-#if !defined(VBOX_WITH_BSD_REASS)
-    ui->ui_next = ui->ui_prev = 0;
-    ui->ui_x1 = 0;
-#else
     memset(ui->ui_x1, 0, 9);
-#endif
     ui->ui_pr = IPPROTO_UDP;
     ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */
