Lines Matching refs:so_rcv

592 	so->so_rcv.sb_flags |= SB_RECV;  in socreate_internal()
593 so->so_rcv.sb_so = so->so_snd.sb_so = so; in socreate_internal()
1015 selthreadclear(&so->so_rcv.sb_sel); in sofreelastref()
1016 so->so_rcv.sb_flags &= ~(SB_SEL | SB_UPCALL); in sofreelastref()
1053 selthreadclear(&so->so_rcv.sb_sel); in sofreelastref()
1054 so->so_rcv.sb_flags &= ~(SB_SEL | SB_UPCALL); in sofreelastref()
1070 so->so_rcv.sb_flags &= ~SB_UPCALL; in sofreelastref()
1098 so->so_rcv.sb_flags &= ~SB_UPCALL; in soclose_wait_locked()
2837 sbfree(&so->so_rcv, m); in soreceive_addr()
2841 so->so_rcv.sb_mb = nextrecord; in soreceive_addr()
2842 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive_addr()
2843 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1a"); in soreceive_addr()
2844 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1a"); in soreceive_addr()
2864 sbunlock(&so->so_rcv, TRUE); /* stay locked */ in soreceive_addr()
2883 sballoc(&so->so_rcv, m); in soreceive_addr()
2885 sballoc(&so->so_rcv, m); in soreceive_addr()
2886 if (so->so_rcv.sb_mb == NULL) { in soreceive_addr()
2887 so->so_rcv.sb_lastrecord = m0; in soreceive_addr()
2888 so->so_rcv.sb_mbtail = m; in soreceive_addr()
2891 nextrecord = m->m_nextpkt = so->so_rcv.sb_mb; in soreceive_addr()
2892 so->so_rcv.sb_mb = m; in soreceive_addr()
2893 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1b"); in soreceive_addr()
2894 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1b"); in soreceive_addr()
2909 sbfree(&so->so_rcv, m); in soreceive_addr()
2910 if (m->m_next == NULL && so->so_rcv.sb_cc != 0) { in soreceive_addr()
2916 MFREE(m, so->so_rcv.sb_mb); in soreceive_addr()
2918 so->so_rcv.sb_mb = m->m_next; in soreceive_addr()
2921 m = so->so_rcv.sb_mb; in soreceive_addr()
2925 so->so_rcv.sb_mb = nextrecord; in soreceive_addr()
2926 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive_addr()
2964 struct sockbuf *sb_rcv = &so->so_rcv; in soreceive_ctl()
3030 SBLASTRECORDCHK(&so->so_rcv, "soreceive ctl"); in soreceive_ctl()
3031 SBLASTMBUFCHK(&so->so_rcv, "soreceive ctl"); in soreceive_ctl()
3114 if ((flags & MSG_DONTWAIT) == 0 && so->so_rcv.sb_cc < uio_resid(uio) && in so_should_wait()
3120 if (so->so_rcv.sb_cc < so->so_rcv.sb_lowat) { in so_should_wait()
3129 if ((flags & MSG_WAITALL) && uio_resid(uio) <= so->so_rcv.sb_hiwat) { in so_should_wait()
3201 uio_resid(uio), so->so_rcv.sb_cc, so->so_rcv.sb_lowat, in soreceive()
3202 so->so_rcv.sb_hiwat); in soreceive()
3233 struct sockbuf *sb = &so->so_rcv; in soreceive()
3383 error = sblock(&so->so_rcv, SBLOCKWAIT(flags)); in soreceive()
3396 m = so->so_rcv.sb_mb; in soreceive()
3405 SB_MB_CHECK(&so->so_rcv); in soreceive()
3423 cfil_sock_data_pending(&so->so_rcv) != 0) { in soreceive()
3437 m = so->so_rcv.sb_mb; in soreceive()
3455 SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive()
3456 SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive()
3457 sbunlock(&so->so_rcv, TRUE); /* keep socket locked */ in soreceive()
3478 if (so_should_wait(so, uio, so->so_rcv.sb_mb, flags)) { in soreceive()
3479 error = sbwait(&so->so_rcv); in soreceive()
3507 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1"); in soreceive()
3508 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1"); in soreceive()
3546 if (m != so->so_rcv.sb_mb || in soreceive()
3554 so->so_rcv.sb_lastrecord = m; in soreceive()
3563 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive()
3566 SBLASTRECORDCHK(&so->so_rcv, "soreceive 2"); in soreceive()
3567 SBLASTMBUFCHK(&so->so_rcv, "soreceive 2"); in soreceive()
3617 SBLASTRECORDCHK(&so->so_rcv, "soreceive uiomove"); in soreceive()
3618 SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove"); in soreceive()
3651 if (m != so->so_rcv.sb_mb) { in soreceive()
3676 sbfree(&so->so_rcv, m); in soreceive()
3682 so->so_rcv.sb_mb = m = m->m_next; in soreceive()
3691 so->so_rcv.sb_mb = m = m->m_next; in soreceive()
3697 so->so_rcv.sb_lastrecord = m; in soreceive()
3700 so->so_rcv.sb_mb = nextrecord; in soreceive()
3701 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive()
3703 SBLASTRECORDCHK(&so->so_rcv, "soreceive 3"); in soreceive()
3704 SBLASTMBUFCHK(&so->so_rcv, "soreceive 3"); in soreceive()
3733 so->so_rcv.sb_cc -= len; in soreceive()
3766 && cfil_sock_data_pending(&so->so_rcv) == 0 in soreceive()
3785 SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 2"); in soreceive()
3786 SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 2"); in soreceive()
3788 if (so->so_rcv.sb_mb == NULL && sbwait(&so->so_rcv)) { in soreceive()
3811 (delayed_copy_len > (so->so_rcv.sb_hiwat / 2))) { in soreceive()
3819 m = so->so_rcv.sb_mb; in soreceive()
3823 SB_MB_CHECK(&so->so_rcv); in soreceive()
3840 (void) sbdroprecord(&so->so_rcv); in soreceive()
3853 if ((so->so_options & SO_WANTMORE) && so->so_rcv.sb_cc > 0) { in soreceive()
3859 so->so_rcv.sb_mb = nextrecord; in soreceive()
3865 if (so->so_rcv.sb_mb == NULL) { in soreceive()
3866 so->so_rcv.sb_mbtail = NULL; in soreceive()
3867 so->so_rcv.sb_lastrecord = NULL; in soreceive()
3869 so->so_rcv.sb_lastrecord = nextrecord; in soreceive()
3871 SB_MB_CHECK(&so->so_rcv); in soreceive()
3873 SBLASTRECORDCHK(&so->so_rcv, "soreceive 4"); in soreceive()
3874 SBLASTMBUFCHK(&so->so_rcv, "soreceive 4"); in soreceive()
3893 sbunlock(&so->so_rcv, TRUE); /* keep socket locked */ in soreceive()
3916 sbunlock(&so->so_rcv, FALSE); /* will unlock socket */ in soreceive()
3925 so->so_rcv.sb_cc, 0, error); in soreceive()
3998 *pktcntp, so->so_rcv.sb_cc, so->so_rcv.sb_lowat, in soreceive_m_list()
3999 so->so_rcv.sb_hiwat); in soreceive_m_list()
4015 struct sockbuf *sb = &so->so_rcv; in soreceive_m_list()
4054 error = sblock(&so->so_rcv, SBLOCKWAIT(flags)); in soreceive_m_list()
4060 m = so->so_rcv.sb_mb; in soreceive_m_list()
4065 so->so_rcv.sb_cc < so->so_rcv.sb_lowat)) { in soreceive_m_list()
4073 SB_MB_CHECK(&so->so_rcv); in soreceive_m_list()
4094 m = so->so_rcv.sb_mb; in soreceive_m_list()
4108 SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive_m_list()
4109 SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive_m_list()
4111 sbunlock(&so->so_rcv, TRUE); /* keep socket locked */ in soreceive_m_list()
4114 error = sbwait(&so->so_rcv); in soreceive_m_list()
4121 m = so->so_rcv.sb_mb; in soreceive_m_list()
4127 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1"); in soreceive_m_list()
4128 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1"); in soreceive_m_list()
4192 sbfree(&so->so_rcv, m); in soreceive_m_list()
4197 so->so_rcv.sb_mb = nextrecord; in soreceive_m_list()
4203 if (so->so_rcv.sb_mb == NULL) { in soreceive_m_list()
4204 so->so_rcv.sb_mbtail = NULL; in soreceive_m_list()
4205 so->so_rcv.sb_lastrecord = NULL; in soreceive_m_list()
4207 so->so_rcv.sb_lastrecord = nextrecord; in soreceive_m_list()
4209 SB_MB_CHECK(&so->so_rcv); in soreceive_m_list()
4211 SBLASTRECORDCHK(&so->so_rcv, "soreceive 4"); in soreceive_m_list()
4212 SBLASTMBUFCHK(&so->so_rcv, "soreceive 4"); in soreceive_m_list()
4221 if (so->so_rcv.sb_mb != NULL) { in soreceive_m_list()
4240 if ((so->so_options & SO_WANTMORE) && so->so_rcv.sb_cc > 0) { in soreceive_m_list()
4249 sbunlock(&so->so_rcv, FALSE); /* will unlock socket */ in soreceive_m_list()
4427 struct sockbuf *sb = &so->so_rcv; in sorflush()
4861 &so->so_snd : &so->so_rcv; in sosetoptlock()
4886 space = sbspace(&so2->so_rcv); in sosetoptlock()
4901 so->so_rcv.sb_lowat = in sosetoptlock()
4902 (optval > so->so_rcv.sb_hiwat) ? in sosetoptlock()
4903 so->so_rcv.sb_hiwat : optval; in sosetoptlock()
4904 if (so->so_rcv.sb_flags & SB_UNIX) { in sosetoptlock()
4913 data_len = so->so_rcv.sb_cc in sosetoptlock()
4914 - so->so_rcv.sb_ctl; in sosetoptlock()
4917 data_len = so->so_rcv.sb_cc in sosetoptlock()
4918 - so->so_rcv.sb_ctl; in sosetoptlock()
4921 if (data_len >= so->so_rcv.sb_lowat) { in sosetoptlock()
4941 so->so_rcv.sb_timeo = tv; in sosetoptlock()
5903 m1 = so->so_rcv.sb_mb; in sogetoptlock()
5912 optval = so->so_rcv.sb_cc - so->so_rcv.sb_ctl; in sogetoptlock()
5921 m1 = so->so_rcv.sb_mb; in sogetoptlock()
5957 optval = so->so_rcv.sb_hiwat; in sogetoptlock()
5965 optval = so->so_rcv.sb_lowat; in sogetoptlock()
5971 so->so_snd.sb_timeo : so->so_rcv.sb_timeo); in sogetoptlock()
6420 selwakeup(&so->so_rcv.sb_sel); in sohasoutofband()
6421 if (so->so_rcv.sb_flags & SB_KNOTE) { in sohasoutofband()
6422 KNOTE(&so->so_rcv.sb_sel.si_note, in sohasoutofband()
6462 so->so_rcv.sb_flags |= SB_SEL; in sopoll()
6463 selrecord(p, &so->so_rcv.sb_sel, wql); in sopoll()
6544 data = so->so_rcv.sb_cc - so->so_rcv.sb_ctl; in filt_soread_common()
6557 && cfil_sock_data_pending(&so->so_rcv) == 0 in filt_soread_common()
6571 int64_t lowwat = so->so_rcv.sb_lowat; in filt_soread_common()
6578 if (kn->kn_sdata > so->so_rcv.sb_hiwat) { in filt_soread_common()
6579 lowwat = so->so_rcv.sb_hiwat; in filt_soread_common()
6590 retval = (so->so_rcv.sb_cc >= lowwat); in filt_soread_common()
6618 if (KNOTE_ATTACH(&so->so_rcv.sb_sel.si_note, kn)) { in filt_sorattach()
6619 so->so_rcv.sb_flags |= SB_KNOTE; in filt_sorattach()
6632 if (so->so_rcv.sb_flags & SB_KNOTE) { in filt_sordetach()
6633 if (KNOTE_DETACH(&so->so_rcv.sb_sel.si_note, kn)) { in filt_sordetach()
6634 so->so_rcv.sb_flags &= ~SB_KNOTE; in filt_sordetach()
6770 data = MIN(data, sbspace(&so2->so_rcv)); in filt_sowrite_common()
6954 && cfil_sock_data_pending(&so->so_rcv) == 0 in filt_sockev_common()
7368 rcv = &so->so_rcv; in sosetdefunct()
7485 rcv = &so->so_rcv; in sodefunct()
7712 if (so->so_rcv.sb_cc || so->so_snd.sb_cc) { in so_drain_extended_bk_idle()