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()
2846 sbfree(&so->so_rcv, m); in soreceive_addr()
2850 so->so_rcv.sb_mb = nextrecord; in soreceive_addr()
2851 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive_addr()
2852 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1a"); in soreceive_addr()
2853 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1a"); in soreceive_addr()
2873 sbunlock(&so->so_rcv, TRUE); /* stay locked */ in soreceive_addr()
2892 sballoc(&so->so_rcv, m); in soreceive_addr()
2894 sballoc(&so->so_rcv, m); in soreceive_addr()
2895 if (so->so_rcv.sb_mb == NULL) { in soreceive_addr()
2896 so->so_rcv.sb_lastrecord = m0; in soreceive_addr()
2897 so->so_rcv.sb_mbtail = m; in soreceive_addr()
2900 nextrecord = m->m_nextpkt = so->so_rcv.sb_mb; in soreceive_addr()
2901 so->so_rcv.sb_mb = m; in soreceive_addr()
2902 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1b"); in soreceive_addr()
2903 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1b"); in soreceive_addr()
2918 sbfree(&so->so_rcv, m); in soreceive_addr()
2919 if (m->m_next == NULL && so->so_rcv.sb_cc != 0) { in soreceive_addr()
2925 MFREE(m, so->so_rcv.sb_mb); in soreceive_addr()
2927 so->so_rcv.sb_mb = m->m_next; in soreceive_addr()
2930 m = so->so_rcv.sb_mb; in soreceive_addr()
2934 so->so_rcv.sb_mb = nextrecord; in soreceive_addr()
2935 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive_addr()
2973 struct sockbuf *sb_rcv = &so->so_rcv; in soreceive_ctl()
3039 SBLASTRECORDCHK(&so->so_rcv, "soreceive ctl"); in soreceive_ctl()
3040 SBLASTMBUFCHK(&so->so_rcv, "soreceive ctl"); in soreceive_ctl()
3123 if ((flags & MSG_DONTWAIT) == 0 && so->so_rcv.sb_cc < uio_resid(uio) && in so_should_wait()
3129 if (so->so_rcv.sb_cc < so->so_rcv.sb_lowat) { in so_should_wait()
3138 if ((flags & MSG_WAITALL) && uio_resid(uio) <= so->so_rcv.sb_hiwat) { in so_should_wait()
3210 uio_resid(uio), so->so_rcv.sb_cc, so->so_rcv.sb_lowat, in soreceive()
3211 so->so_rcv.sb_hiwat); in soreceive()
3242 struct sockbuf *sb = &so->so_rcv; in soreceive()
3392 error = sblock(&so->so_rcv, SBLOCKWAIT(flags)); in soreceive()
3405 m = so->so_rcv.sb_mb; in soreceive()
3414 SB_MB_CHECK(&so->so_rcv); in soreceive()
3432 cfil_sock_data_pending(&so->so_rcv) != 0) { in soreceive()
3446 m = so->so_rcv.sb_mb; in soreceive()
3464 SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive()
3465 SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive()
3466 sbunlock(&so->so_rcv, TRUE); /* keep socket locked */ in soreceive()
3487 if (so_should_wait(so, uio, so->so_rcv.sb_mb, flags)) { in soreceive()
3488 error = sbwait(&so->so_rcv); in soreceive()
3516 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1"); in soreceive()
3517 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1"); in soreceive()
3555 if (m != so->so_rcv.sb_mb || in soreceive()
3563 so->so_rcv.sb_lastrecord = m; in soreceive()
3572 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive()
3575 SBLASTRECORDCHK(&so->so_rcv, "soreceive 2"); in soreceive()
3576 SBLASTMBUFCHK(&so->so_rcv, "soreceive 2"); in soreceive()
3626 SBLASTRECORDCHK(&so->so_rcv, "soreceive uiomove"); in soreceive()
3627 SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove"); in soreceive()
3660 if (m != so->so_rcv.sb_mb) { in soreceive()
3685 sbfree(&so->so_rcv, m); in soreceive()
3691 so->so_rcv.sb_mb = m = m->m_next; in soreceive()
3700 so->so_rcv.sb_mb = m = m->m_next; in soreceive()
3706 so->so_rcv.sb_lastrecord = m; in soreceive()
3709 so->so_rcv.sb_mb = nextrecord; in soreceive()
3710 SB_EMPTY_FIXUP(&so->so_rcv); in soreceive()
3712 SBLASTRECORDCHK(&so->so_rcv, "soreceive 3"); in soreceive()
3713 SBLASTMBUFCHK(&so->so_rcv, "soreceive 3"); in soreceive()
3742 so->so_rcv.sb_cc -= len; in soreceive()
3775 && cfil_sock_data_pending(&so->so_rcv) == 0 in soreceive()
3794 SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 2"); in soreceive()
3795 SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 2"); in soreceive()
3797 if (so->so_rcv.sb_mb == NULL && sbwait(&so->so_rcv)) { in soreceive()
3820 (delayed_copy_len > (so->so_rcv.sb_hiwat / 2))) { in soreceive()
3828 m = so->so_rcv.sb_mb; in soreceive()
3832 SB_MB_CHECK(&so->so_rcv); in soreceive()
3849 (void) sbdroprecord(&so->so_rcv); in soreceive()
3862 if ((so->so_options & SO_WANTMORE) && so->so_rcv.sb_cc > 0) { in soreceive()
3868 so->so_rcv.sb_mb = nextrecord; in soreceive()
3874 if (so->so_rcv.sb_mb == NULL) { in soreceive()
3875 so->so_rcv.sb_mbtail = NULL; in soreceive()
3876 so->so_rcv.sb_lastrecord = NULL; in soreceive()
3878 so->so_rcv.sb_lastrecord = nextrecord; in soreceive()
3880 SB_MB_CHECK(&so->so_rcv); in soreceive()
3882 SBLASTRECORDCHK(&so->so_rcv, "soreceive 4"); in soreceive()
3883 SBLASTMBUFCHK(&so->so_rcv, "soreceive 4"); in soreceive()
3902 sbunlock(&so->so_rcv, TRUE); /* keep socket locked */ in soreceive()
3925 sbunlock(&so->so_rcv, FALSE); /* will unlock socket */ in soreceive()
3934 so->so_rcv.sb_cc, 0, error); in soreceive()
4007 *pktcntp, so->so_rcv.sb_cc, so->so_rcv.sb_lowat, in soreceive_m_list()
4008 so->so_rcv.sb_hiwat); in soreceive_m_list()
4024 struct sockbuf *sb = &so->so_rcv; in soreceive_m_list()
4063 error = sblock(&so->so_rcv, SBLOCKWAIT(flags)); in soreceive_m_list()
4069 m = so->so_rcv.sb_mb; in soreceive_m_list()
4074 so->so_rcv.sb_cc < so->so_rcv.sb_lowat)) { in soreceive_m_list()
4082 SB_MB_CHECK(&so->so_rcv); in soreceive_m_list()
4103 m = so->so_rcv.sb_mb; in soreceive_m_list()
4117 SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive_m_list()
4118 SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 1"); in soreceive_m_list()
4120 sbunlock(&so->so_rcv, TRUE); /* keep socket locked */ in soreceive_m_list()
4123 error = sbwait(&so->so_rcv); in soreceive_m_list()
4130 m = so->so_rcv.sb_mb; in soreceive_m_list()
4136 SBLASTRECORDCHK(&so->so_rcv, "soreceive 1"); in soreceive_m_list()
4137 SBLASTMBUFCHK(&so->so_rcv, "soreceive 1"); in soreceive_m_list()
4201 sbfree(&so->so_rcv, m); in soreceive_m_list()
4206 so->so_rcv.sb_mb = nextrecord; in soreceive_m_list()
4212 if (so->so_rcv.sb_mb == NULL) { in soreceive_m_list()
4213 so->so_rcv.sb_mbtail = NULL; in soreceive_m_list()
4214 so->so_rcv.sb_lastrecord = NULL; in soreceive_m_list()
4216 so->so_rcv.sb_lastrecord = nextrecord; in soreceive_m_list()
4218 SB_MB_CHECK(&so->so_rcv); in soreceive_m_list()
4220 SBLASTRECORDCHK(&so->so_rcv, "soreceive 4"); in soreceive_m_list()
4221 SBLASTMBUFCHK(&so->so_rcv, "soreceive 4"); in soreceive_m_list()
4230 if (so->so_rcv.sb_mb != NULL) { in soreceive_m_list()
4249 if ((so->so_options & SO_WANTMORE) && so->so_rcv.sb_cc > 0) { in soreceive_m_list()
4258 sbunlock(&so->so_rcv, FALSE); /* will unlock socket */ in soreceive_m_list()
4436 struct sockbuf *sb = &so->so_rcv; in sorflush()
4870 &so->so_snd : &so->so_rcv; in sosetoptlock()
4895 space = sbspace(&so2->so_rcv); in sosetoptlock()
4910 so->so_rcv.sb_lowat = in sosetoptlock()
4911 (optval > so->so_rcv.sb_hiwat) ? in sosetoptlock()
4912 so->so_rcv.sb_hiwat : optval; in sosetoptlock()
4913 if (so->so_rcv.sb_flags & SB_UNIX) { in sosetoptlock()
4922 data_len = so->so_rcv.sb_cc in sosetoptlock()
4923 - so->so_rcv.sb_ctl; in sosetoptlock()
4926 data_len = so->so_rcv.sb_cc in sosetoptlock()
4927 - so->so_rcv.sb_ctl; in sosetoptlock()
4930 if (data_len >= so->so_rcv.sb_lowat) { in sosetoptlock()
4950 so->so_rcv.sb_timeo = tv; in sosetoptlock()
5912 m1 = so->so_rcv.sb_mb; in sogetoptlock()
5921 optval = so->so_rcv.sb_cc - so->so_rcv.sb_ctl; in sogetoptlock()
5930 m1 = so->so_rcv.sb_mb; in sogetoptlock()
5966 optval = so->so_rcv.sb_hiwat; in sogetoptlock()
5974 optval = so->so_rcv.sb_lowat; in sogetoptlock()
5980 so->so_snd.sb_timeo : so->so_rcv.sb_timeo); in sogetoptlock()
6429 selwakeup(&so->so_rcv.sb_sel); in sohasoutofband()
6430 if (so->so_rcv.sb_flags & SB_KNOTE) { in sohasoutofband()
6431 KNOTE(&so->so_rcv.sb_sel.si_note, in sohasoutofband()
6471 so->so_rcv.sb_flags |= SB_SEL; in sopoll()
6472 selrecord(p, &so->so_rcv.sb_sel, wql); in sopoll()
6553 data = so->so_rcv.sb_cc - so->so_rcv.sb_ctl; in filt_soread_common()
6566 && cfil_sock_data_pending(&so->so_rcv) == 0 in filt_soread_common()
6580 int64_t lowwat = so->so_rcv.sb_lowat; in filt_soread_common()
6587 if (kn->kn_sdata > so->so_rcv.sb_hiwat) { in filt_soread_common()
6588 lowwat = so->so_rcv.sb_hiwat; in filt_soread_common()
6599 retval = (so->so_rcv.sb_cc >= lowwat); in filt_soread_common()
6627 if (KNOTE_ATTACH(&so->so_rcv.sb_sel.si_note, kn)) { in filt_sorattach()
6628 so->so_rcv.sb_flags |= SB_KNOTE; in filt_sorattach()
6641 if (so->so_rcv.sb_flags & SB_KNOTE) { in filt_sordetach()
6642 if (KNOTE_DETACH(&so->so_rcv.sb_sel.si_note, kn)) { in filt_sordetach()
6643 so->so_rcv.sb_flags &= ~SB_KNOTE; in filt_sordetach()
6779 data = MIN(data, sbspace(&so2->so_rcv)); in filt_sowrite_common()
6963 && cfil_sock_data_pending(&so->so_rcv) == 0 in filt_sockev_common()
7377 rcv = &so->so_rcv; in sosetdefunct()
7494 rcv = &so->so_rcv; in sodefunct()
7721 if (so->so_rcv.sb_cc || so->so_snd.sb_cc) { in so_drain_extended_bk_idle()