Changeset 28480 in vbox for trunk/src/VBox/Devices/Network/slirp
- Timestamp:
- Apr 19, 2010 4:25:07 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60275
- 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
-
Property svn:ignore
set to
-
trunk/src/VBox/Devices/Network/slirp/libalias
-
Property svn:ignore
set to
.alias_db.c.swp
-
Property svn:ignore
set to
-
trunk/src/VBox/Devices/Network/slirp/slirp.h
r28449 r28480 337 337 int tcp_attach (PNATState, struct socket *); 338 338 u_int8_t tcp_tos (struct socket *); 339 int tcp_emu (PNATState, struct socket *, struct mbuf *);340 339 int tcp_ctl (PNATState, struct socket *); 341 340 struct tcpcb *tcp_drop(PNATState, struct tcpcb *tp, int err); -
trunk/src/VBox/Devices/Network/slirp/tcp_input.c
r28449 r28480 266 266 m_freem(pData, q->tqe_m); 267 267 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); 277 269 RTMemFree(q); 278 270 tp->t_segqlen--; … … 705 697 * Add data to socket buffer. 706 698 */ 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); 714 700 715 701 /* … … 1557 1543 m_freem(pData, m); 1558 1544 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); 1568 1546 } 1569 1547 else -
trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
r28449 r28480 654 654 return 0; 655 655 } 656 657 /*658 * Emulate programs that try and connect to us. This includes ftp (the data659 * connection is initiated by the server) and IRC (DCC CHAT and DCC SEND)660 * for now661 *662 * NOTE: It's possible to crash SLiRP by sending it unstandard strings to663 * emulate... if this is a problem, more checks are needed here.664 *665 * XXX Assumes the whole command cames in one packet666 *667 * XXX Some ftp clients will have their TOS set to LOWDELAY and so Nagel will668 * kick in. Because of this, we'll get the first letter, followed by the669 * rest, so we simply scan for ORT instead of PORT... DCC doesn't have this670 * 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()ed673 *674 * NOTE: if you return 0 you MUST m_free() the mbuf!675 */676 int677 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.