Lines Matching defs:so

184 	struct socket *so = tp->t_inpcb->inp_socket;
325 SOCKBUF_LOCK(&so->so_snd);
350 if (off < so->so_snd.sb_cc)
376 len = ((long)ulmin(so->so_snd.sb_cc, sendwin) - off);
385 len = ((long)ulmin(so->so_snd.sb_cc, tp->snd_wnd)
466 (off < (int) so->so_snd.sb_cc)) {
490 * 2. send buffer is filled to 7/8th with data (so we actually
513 if (V_tcp_do_autosndbuf && so->so_snd.sb_flags & SB_AUTOSIZE) {
514 if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat &&
515 so->so_snd.sb_cc >= (so->so_snd.sb_hiwat / 8 * 7) &&
516 so->so_snd.sb_cc < V_tcp_autosndbuf_max &&
517 sendwin >= (so->so_snd.sb_cc - (tp->snd_nxt - tp->snd_una))) {
518 if (!sbreserve_locked(&so->so_snd,
519 min(so->so_snd.sb_hiwat + V_tcp_autosndbuf_inc,
520 V_tcp_autosndbuf_max), so, curthread))
521 so->so_snd.sb_flags &= ~SB_AUTOSIZE;
554 if (SEQ_LT(p->rxmit + len, tp->snd_una + so->so_snd.sb_cc))
557 if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))
561 recwin = sbspace(&so->so_rcv);
587 len + off >= so->so_snd.sb_cc &&
656 (adv >= (long)(so->so_rcv.sb_hiwat / 4) ||
657 recwin <= (long)(so->so_rcv.sb_hiwat / 8) ||
658 so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg))
676 * and we have not yet done so, then we need to send.
715 if (so->so_snd.sb_cc && !tcp_timer_active(tp, TT_REXMT) &&
725 SOCKBUF_UNLOCK(&so->so_snd);
729 SOCKBUF_LOCK_ASSERT(&so->so_snd);
797 (so->so_rcv.sb_flags & SB_AUTOSIZE))
898 mb = sbsndmbuf(&so->so_snd, off, &moff);
946 if ((off + len) < so->so_snd.sb_cc) {
1026 SOCKBUF_UNLOCK(&so->so_snd);
1039 mb = sbsndptr(&so->so_snd, off, len, &moff);
1048 SOCKBUF_UNLOCK(&so->so_snd);
1062 if ((off + len == so->so_snd.sb_cc) && !(flags & TH_SYN))
1064 SOCKBUF_UNLOCK(&so->so_snd);
1066 SOCKBUF_UNLOCK(&so->so_snd);
1091 SOCKBUF_UNLOCK_ASSERT(&so->so_snd);
1170 * right edge of the window, so use snd_nxt in that
1195 if (recwin < (long)(so->so_rcv.sb_hiwat / 4) &&
1211 (min(sbspace(&so->so_rcv), TCP_MAXWIN)));
1235 * so that it doesn't drift into the send window on sequence
1309 if (so->so_options & SO_DEBUG) {
1368 ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0),
1393 * so it affects only the first tcp connection with a host.
1410 ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0,
1472 } else if (len == 0 && so->so_snd.sb_cc &&
1516 * We know that the packet was lost, so back out the
1540 SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */