Changeset 30045 in vbox for trunk/src/VBox/Devices/Network/slirp/tcp_output.c
- Timestamp:
- Jun 4, 2010 8:38:56 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62400
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tcp_output.c
r30016 r30045 155 155 * itself. 156 156 */ 157 if (off < so->so_snd.sb_cc)157 if (off < SBUF_LEN(&so->so_snd)) 158 158 flags &= ~TH_FIN; 159 159 win = 1; … … 166 166 } 167 167 168 len = min( so->so_snd.sb_cc, win) - off;168 len = min(SBUF_LEN(&so->so_snd), win) - off; 169 169 if (len < 0) 170 170 { … … 191 191 sendalot = 1; 192 192 } 193 if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))193 if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + SBUF_LEN(&so->so_snd))) 194 194 flags &= ~TH_FIN; 195 195 … … 211 211 goto send; 212 212 if ((1 || idle || tp->t_flags & TF_NODELAY) && 213 len + off >= so->so_snd.sb_cc)213 len + off >= SBUF_LEN(&so->so_snd)) 214 214 goto send; 215 215 if (tp->t_force) … … 241 241 if (adv >= (long) (2 * tp->t_maxseg)) 242 242 goto send; 243 if (2 * adv >= (long) so->so_rcv.sb_datalen)243 if (2 * adv >= (long) SBUF_SIZE(&so->so_rcv)) 244 244 goto send; 245 245 } … … 285 285 * otherwise force out a byte. 286 286 */ 287 if ( so->so_snd.sb_cc287 if ( SBUF_LEN(&so->so_snd) 288 288 && tp->t_timer[TCPT_REXMT] == 0 289 289 && tp->t_timer[TCPT_PERSIST] == 0) … … 421 421 { 422 422 #endif 423 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 423 424 sbcopy(&so->so_snd, off, (int) len, mtod(m, caddr_t) + hdrlen); 424 425 m->m_len += len; 426 #else 427 m_copyback(pData, m, hdrlen, len, sbuf_data(&so->so_snd) + off); 428 #endif 425 429 #if 0 426 430 } … … 438 442 * a PUSH comes in.) 439 443 */ 440 if (off + len == so->so_snd.sb_cc)444 if (off + len == SBUF_LEN(&so->so_snd)) 441 445 flags |= TH_PUSH; 442 446 } … … 525 529 * but avoid silly window syndrome. 526 530 */ 527 if (win < (long)( so->so_rcv.sb_datalen/ 4) && win < (long)tp->t_maxseg)531 if (win < (long)(SBUF_SIZE(&so->so_rcv) / 4) && win < (long)tp->t_maxseg) 528 532 win = 0; 529 533 if (win > (long)TCP_MAXWIN << tp->rcv_scale)
Note:
See TracChangeset
for help on using the changeset viewer.