Lines Matching refs:tcp

242 	tcp_t	*tcp = connp->conn_tcp;  in tcp_listen()  local
264 (uintptr_t)(tcp->tcp_conn_req_max + in tcp_listen()
265 tcp->tcp_tcps->tcps_conn_req_max_q0)); in tcp_listen()
353 tcp_t *tcp = connp->conn_tcp; in tcp_getpeername() local
358 ASSERT(tcp != NULL); in tcp_getpeername()
359 if (tcp->tcp_state < TCPS_SYN_RCVD) in tcp_getpeername()
491 tcp_t *tcp; in tcp_sendmsg() local
509 tcp = connp->conn_tcp; in tcp_sendmsg()
510 ASSERT(tcp != NULL); in tcp_sendmsg()
512 tcpstate = tcp->tcp_state; in tcp_sendmsg()
522 ((tcp->tcp_connid > 0) ? EPIPE : ENOTCONN)); in tcp_sendmsg()
530 mutex_enter(&tcp->tcp_non_sq_lock); in tcp_sendmsg()
531 tcp->tcp_squeue_bytes += msize; in tcp_sendmsg()
535 if (TCP_UNSENT_BYTES(tcp) > connp->conn_sndbuf) { in tcp_sendmsg()
536 tcp_setqfull(tcp); in tcp_sendmsg()
538 mutex_exit(&tcp->tcp_non_sq_lock); in tcp_sendmsg()
574 tcp_t *tcp = connp->conn_tcp; in tcp_shutdown() local
584 if (tcp->tcp_state < TCPS_SYN_SENT) in tcp_shutdown()
612 tcp_t *tcp = connp->conn_tcp; in tcp_clr_flowctrl() local
622 mutex_enter(&tcp->tcp_rsrv_mp_lock); in tcp_clr_flowctrl()
623 if ((mp = tcp->tcp_rsrv_mp) == NULL) { in tcp_clr_flowctrl()
624 mutex_exit(&tcp->tcp_rsrv_mp_lock); in tcp_clr_flowctrl()
627 tcp->tcp_rsrv_mp = NULL; in tcp_clr_flowctrl()
628 mutex_exit(&tcp->tcp_rsrv_mp_lock); in tcp_clr_flowctrl()
633 mutex_enter(&tcp->tcp_rsrv_mp_lock); in tcp_clr_flowctrl()
634 tcp->tcp_rsrv_mp = mp; in tcp_clr_flowctrl()
635 mutex_exit(&tcp->tcp_rsrv_mp_lock); in tcp_clr_flowctrl()
637 if (tcp->tcp_fused) { in tcp_clr_flowctrl()
638 tcp_fuse_backenable(tcp); in tcp_clr_flowctrl()
640 tcp->tcp_rwnd = connp->conn_rcvbuf; in tcp_clr_flowctrl()
647 if (tcp->tcp_state >= TCPS_ESTABLISHED && in tcp_clr_flowctrl()
648 tcp_rwnd_reopen(tcp) == TH_ACK_NEEDED) { in tcp_clr_flowctrl()
649 tcp_xmit_ctl(NULL, tcp, in tcp_clr_flowctrl()
650 (tcp->tcp_swnd == 0) ? tcp->tcp_suna : in tcp_clr_flowctrl()
651 tcp->tcp_snxt, tcp->tcp_rnxt, TH_ACK); in tcp_clr_flowctrl()
820 tcp_fallback_noneager(tcp_t *tcp, mblk_t *stropt_mp, queue_t *q, in tcp_fallback_noneager() argument
824 conn_t *connp = tcp->tcp_connp; in tcp_fallback_noneager()
844 tcp_use_pure_tpi(tcp); in tcp_fallback_noneager()
859 stropt->so_wroff = connp->conn_ht_iphc_len + (tcp->tcp_loopback ? 0 : in tcp_fallback_noneager()
860 tcp->tcp_tcps->tcps_wroff_xtra); in tcp_fallback_noneager()
861 if (tcp->tcp_snd_sack_ok) in tcp_fallback_noneager()
864 stropt->so_maxblk = tcp_maxpsz_set(tcp, B_FALSE); in tcp_fallback_noneager()
871 tcp_do_capability_ack(tcp, &tca, TC1_INFO|TC1_ACCEPTOR_ID); in tcp_fallback_noneager()
898 tcp->tcp_rcv_list = mp->b_next; in tcp_fallback_noneager()
903 ASSERT(tcp->tcp_rcv_last_head == NULL); in tcp_fallback_noneager()
904 ASSERT(tcp->tcp_rcv_last_tail == NULL); in tcp_fallback_noneager()
905 ASSERT(tcp->tcp_rcv_cnt == 0); in tcp_fallback_noneager()
913 if (tcp->tcp_conn_req_cnt_q0 != 0) in tcp_fallback_noneager()
914 tcp_eager_cleanup(tcp, B_TRUE); in tcp_fallback_noneager()
1001 tcp_t *tcp; in tcp_fallback() local
1007 tcp = connp->conn_tcp; in tcp_fallback()
1013 ASSERT(tcp->tcp_ordrel_mp == NULL); in tcp_fallback()
1036 if (tcp->tcp_fused) in tcp_fallback()
1037 tcp_unfuse(tcp); in tcp_fallback()
1039 if (tcp->tcp_listener != NULL) { in tcp_fallback()
1042 tcp_fallback_eager(tcp, direct_sockfs, quiesced_cb, arg); in tcp_fallback()
1044 tcp_fallback_noneager(tcp, stropt_mp, q, direct_sockfs, in tcp_fallback()
1055 tcp->tcp_ordrel_mp = ordrel_mp; in tcp_fallback()
1077 tcp_newconn_notify(tcp_t *tcp, ip_recv_attr_t *ira) in tcp_newconn_notify() argument
1079 tcp_t *listener = tcp->tcp_listener; in tcp_newconn_notify()
1081 conn_t *econnp = tcp->tcp_connp; in tcp_newconn_notify()
1092 MAKE_UNDROPPABLE(tcp); in tcp_newconn_notify()
1103 tcp->tcp_eager_next_q0->tcp_eager_prev_q0 = tcp->tcp_eager_prev_q0; in tcp_newconn_notify()
1104 tcp->tcp_eager_prev_q0->tcp_eager_next_q0 = tcp->tcp_eager_next_q0; in tcp_newconn_notify()
1105 tcp->tcp_eager_prev_q0 = NULL; in tcp_newconn_notify()
1106 tcp->tcp_eager_next_q0 = NULL; in tcp_newconn_notify()
1115 tail->tcp_eager_next_q = tcp; in tcp_newconn_notify()
1117 listener->tcp_eager_next_q = tcp; in tcp_newconn_notify()
1118 listener->tcp_eager_last_q = tcp; in tcp_newconn_notify()
1119 tcp->tcp_eager_next_q = NULL; in tcp_newconn_notify()
1122 if (tcp->tcp_syn_rcvd_timeout != 0) { in tcp_newconn_notify()
1123 tcp->tcp_syn_rcvd_timeout = 0; in tcp_newconn_notify()
1149 addr_cache[IP_ADDR_CACHE_HASH(tcp->tcp_connp->conn_faddr_v4)] = in tcp_newconn_notify()
1150 tcp->tcp_connp->conn_faddr_v4; in tcp_newconn_notify()
1167 tcp->tcp_detached = B_FALSE; in tcp_newconn_notify()
1168 tcp->tcp_hard_binding = B_FALSE; in tcp_newconn_notify()
1169 tcp->tcp_tconnind_started = B_TRUE; in tcp_newconn_notify()
1172 tcp->tcp_ka_last_intrvl = 0; in tcp_newconn_notify()
1173 tcp->tcp_ka_tid = TCP_TIMER(tcp, tcp_keepalive_timer, in tcp_newconn_notify()
1174 tcp->tcp_ka_interval); in tcp_newconn_notify()
1178 tcp_get_proto_props(tcp, &sopp); in tcp_newconn_notify()