VirtualBox

Ignore:
Timestamp:
Apr 19, 2010 4:25:07 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60275
Message:

NAT: nuke dead code.

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp

    • Property svn:ignore set to
      .slirp.c.swp
      .svn-commit.2.tmp.swp
      .svn-commit.tmp.swp
  • trunk/src/VBox/Devices/Network/slirp/libalias

    • Property svn:ignore set to
      .alias_db.c.swp
  • trunk/src/VBox/Devices/Network/slirp/slirp.h

    r28449 r28480  
    337337int tcp_attach (PNATState, struct socket *);
    338338u_int8_t tcp_tos (struct socket *);
    339 int tcp_emu (PNATState, struct socket *, struct mbuf *);
    340339int tcp_ctl (PNATState, struct socket *);
    341340struct tcpcb *tcp_drop(PNATState, struct tcpcb *tp, int err);
  • trunk/src/VBox/Devices/Network/slirp/tcp_input.c

    r28449 r28480  
    266266            m_freem(pData, q->tqe_m);
    267267        else
    268         {
    269             if (so->so_emu)
    270             {
    271                 if (tcp_emu(pData, so, q->tqe_m))
    272                     sbappend(pData, so, q->tqe_m);
    273             }
    274             else
    275                 sbappend(pData, so, q->tqe_m);
    276         }
     268            sbappend(pData, so, q->tqe_m);
    277269        RTMemFree(q);
    278270        tp->t_segqlen--;
     
    705697             * Add data to socket buffer.
    706698             */
    707             if (so->so_emu)
    708             {
    709                 if (tcp_emu(pData, so, m))
    710                     sbappend(pData, so, m);
    711             }
    712             else
    713                 sbappend(pData, so, m);
     699            sbappend(pData, so, m);
    714700
    715701            /*
     
    15571543                m_freem(pData, m);
    15581544            else
    1559             {
    1560                 if (so->so_emu)
    1561                 {
    1562                     if (tcp_emu(pData, so, m))
    1563                         sbappend(pData, so, m);
    1564                 }
    1565                 else
    1566                     sbappend(pData, so, m);
    1567             }
     1545                sbappend(pData, so, m);
    15681546        }
    15691547        else
  • trunk/src/VBox/Devices/Network/slirp/tcp_subr.c

    r28449 r28480  
    654654    return 0;
    655655}
    656 
    657 /*
    658  * Emulate programs that try and connect to us. This includes ftp (the data
    659  * connection is initiated by the server) and IRC (DCC CHAT and DCC SEND)
    660  * for now
    661  *
    662  * NOTE: It's possible to crash SLiRP by sending it unstandard strings to
    663  * emulate... if this is a problem, more checks are needed here.
    664  *
    665  * XXX Assumes the whole command cames in one packet
    666  *
    667  * XXX Some ftp clients will have their TOS set to LOWDELAY and so Nagel will
    668  * kick in.  Because of this, we'll get the first letter, followed by the
    669  * rest, so we simply scan for ORT instead of PORT... DCC doesn't have this
    670  * problem because there's other stuff in the packet before the DCC command.
    671  *
    672  * Return 1 if the mbuf m is still valid and should be sbappend()ed
    673  *
    674  * NOTE: if you return 0 you MUST m_free() the mbuf!
    675  */
    676 int
    677 tcp_emu(PNATState pData, struct socket *so, struct mbuf *m)
    678 {
    679     /*XXX: libalias should care about it */
    680     so->so_emu = 0;
    681     return 1;
    682 }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette