- Merge aicom-network-branch (still without the NDIS stuff)
[reactos.git] / reactos / lib / drivers / oskittcp / oskittcp / tcp_output.c
index 5f51c92..1e9e431 100644 (file)
@@ -86,9 +86,6 @@ tcp_output(tp)
        int idle, sendalot;
        struct rmxp_tao *taop;
        struct rmxp_tao tao_noncached;
-#ifdef __REACTOS__
-       struct mbuf *n;
-#endif
 
        OS_DbgPrint(OSK_MID_TRACE,("Called\n"));
 
@@ -411,7 +408,6 @@ send:
                 * CC or CC.new.
                 */
                case TH_SYN:
-#if 0
                        opt[optlen++] = TCPOPT_NOP;
                        opt[optlen++] = TCPOPT_NOP;
                        opt[optlen++] = tp->t_flags & TF_SENDCCNEW ?
@@ -419,7 +415,6 @@ send:
                        opt[optlen++] = TCPOLEN_CC;
                        *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);
                        optlen += 4;
-#endif
                        break;
 
                /*
@@ -712,40 +707,9 @@ send:
            && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
                ((struct ip *)ti)->ip_off |= IP_DF;
        }
-#endif
-        /*
-         * XXX: It seems that osktittcp expects that packets are
-         * synchronously processed. The current implementation feeds
-         * oskittcp with the packets asynchronously. That's not a
-         * problem normally when the packets are transfered over
-         * network, but it starts to be a problem when it comes to
-         * loopback packets.
-         * The ACK bits are set in tcp_input which calls tcp_output and
-         * expects them to be cleared before further processing.
-         * Instead tcp_output calls ip_output which produces a packet
-         * and ends up in tcp_input and we're stuck in infinite loop.
-         * Normally the flags are masked out at the end of this function
-         * and the incomming packets are processed then, but since
-         * currently the loopback packet is delivered during the
-         * ip_output call, the function end is never reached...
-         */
-#ifdef __REACTOS__
-       tp->t_flags &= ~(TF_ACKNOW|TF_DELACK);
 #endif
        error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route,
                          so->so_options & SO_DONTROUTE, 0);
-#ifdef __REACTOS__
-       /* We allocated m, so we are responsible for freeing it. If the mbuf
-           contains a pointer to an external datablock, we (or rather, m_copy)
-           didn't allocate it but pointed it to the data to send. So we have
-           to cheat a little bit and keep M_FREE from freeing the external
-           data block */
-       while (NULL != m) {
-           m->m_flags &= ~M_EXT;
-           MFREE(m, n);
-           m = n;
-       }
-#endif
     }
        if (error) {
 out: