Lines Matching refs:peer_tep
1736 tl_endpt_t *peer_tep = tep->te_conp; in tl_close_ser() local
1739 if ((peer_tep != NULL) && !peer_tep->te_closing) in tl_close_ser()
1740 peer_tep->te_wq->q_next = NULL; in tl_close_ser()
2013 tl_endpt_t *peer_tep = tep->te_conp; in tl_wput_data_ser() local
2019 IMPLY(peer_tep, tep->te_serializer == peer_tep->te_serializer); in tl_wput_data_ser()
2024 if ((peer_tep != NULL) && in tl_wput_data_ser()
2025 !peer_tep->te_closing && in tl_wput_data_ser()
2030 (peer_tep->te_state == TS_DATA_XFER || in tl_wput_data_ser()
2031 peer_tep->te_state == TS_WIND_ORDREL || in tl_wput_data_ser()
2032 peer_tep->te_state == TS_WREQ_ORDREL) && in tl_wput_data_ser()
2033 ((peer_rq = peer_tep->te_rq) != NULL) && in tl_wput_data_ser()
2164 tl_endpt_t *peer_tep; in tl_rsrv_ser() local
2170 ((peer_tep = tep->te_conp) != NULL) && in tl_rsrv_ser()
2171 !peer_tep->te_closing && in tl_rsrv_ser()
2175 TL_QENABLE(peer_tep); in tl_rsrv_ser()
2898 tl_endpt_t *peer_tep = NULL; in tl_conn_req() local
3054 peer_tep = (IS_SOCKET(tep) ? in tl_conn_req()
3058 if (peer_tep == NULL) { in tl_conn_req()
3062 } else if (peer_tep->te_nicon >= peer_tep->te_qlen) { in tl_conn_req()
3076 if (peer_tep != NULL) in tl_conn_req()
3077 tl_refrele(peer_tep); in tl_conn_req()
3100 ASSERT(IS_COTS(peer_tep)); in tl_conn_req()
3107 tl_serializer_refhold(peer_tep->te_ser); in tl_conn_req()
3109 tep->te_ser = peer_tep->te_ser; in tl_conn_req()
3111 tep->te_oconp = peer_tep; in tl_conn_req()
3136 tl_endpt_t *peer_tep = tep->te_oconp; in tl_conn_req_ser() local
3171 if (peer_tep->te_closing || in tl_conn_req_ser()
3172 !((peer_tep->te_state == TS_IDLE) || in tl_conn_req_ser()
3173 (peer_tep->te_state == TS_WRES_CIND))) { in tl_conn_req_ser()
3176 peer_tep->te_state)); in tl_conn_req_ser()
3191 if (peer_tep->te_flag & (TL_SETCRED | TL_SETUCRED)) { in tl_conn_req_ser()
3194 if (peer_tep->te_flag & TL_SETCRED) { in tl_conn_req_ser()
3302 if (peer_tep != NULL && peer_tep->te_credp != NULL && in tl_conn_req_ser()
3304 mblk_setcred(confmp, peer_tep->te_credp, peer_tep->te_cpid); in tl_conn_req_ser()
3341 if (peer_tep->te_flag & (TL_SETCRED|TL_SETUCRED)) { in tl_conn_req_ser()
3348 peer_tep->te_flag, peer_tep->te_credp); in tl_conn_req_ser()
3371 list_insert_tail(&peer_tep->te_iconp, tip); in tl_conn_req_ser()
3372 peer_tep->te_nicon++; in tl_conn_req_ser()
3374 peer_tep->te_state = nextstate[TE_CONN_IND][peer_tep->te_state]; in tl_conn_req_ser()
3378 putnext(peer_tep->te_rq, cimp); in tl_conn_req_ser()
3396 ASSERT(peer_tep->te_refcnt >= 2); in tl_conn_req_ser()
3951 tl_endpt_t *peer_tep = tep->te_conp; in tl_discon_req() local
3964 if ((peer_tep != NULL) && peer_tep->te_closing) { in tl_discon_req()
3966 peer_tep = NULL; in tl_discon_req()
4050 peer_tep = tip->ti_tep; in tl_discon_req()
4092 if (peer_tep != NULL && !peer_tep->te_closing) { in tl_discon_req()
4106 save_state = peer_tep->te_state; in tl_discon_req()
4107 peer_tep->te_state = TS_IDLE; in tl_discon_req()
4109 TL_REMOVE_PEER(peer_tep->te_oconp); in tl_discon_req()
4110 enableok(peer_tep->te_wq); in tl_discon_req()
4111 TL_QENABLE(peer_tep); in tl_discon_req()
4122 } else if ((peer_tep = tep->te_oconp) != NULL) { /* client */ in tl_discon_req()
4155 tl_icon_queuemsg(peer_tep, tep->te_seqno, dimp); in tl_discon_req()
4156 peer_tep = NULL; in tl_discon_req()
4167 tip = tl_icon_find(peer_tep, tep->te_seqno); in tl_discon_req()
4170 save_state = peer_tep->te_state; in tl_discon_req()
4171 if (peer_tep->te_nicon == 1) in tl_discon_req()
4172 peer_tep->te_state = in tl_discon_req()
4174 [peer_tep->te_state]; in tl_discon_req()
4176 peer_tep->te_state = in tl_discon_req()
4178 [peer_tep->te_state]; in tl_discon_req()
4179 tl_freetip(peer_tep, tip); in tl_discon_req()
4184 } else if ((peer_tep = tep->te_conp) != NULL) { /* connected! */ in tl_discon_req()
4196 save_state = peer_tep->te_state; in tl_discon_req()
4197 peer_tep->te_state = TS_IDLE; in tl_discon_req()
4208 if (peer_tep == NULL) { in tl_discon_req()
4220 (void) putnextctl1(peer_tep->te_rq, M_FLUSH, FLUSHRW); in tl_discon_req()
4233 putnext(peer_tep->te_rq, dimp); in tl_discon_req()
4236 ASSERT(!peer_tep->te_closing); in tl_discon_req()
4248 TL_QENABLE(peer_tep); in tl_discon_req()
4249 ASSERT(peer_tep != NULL && peer_tep->te_conp != NULL); in tl_discon_req()
4250 TL_UNCONNECT(peer_tep->te_conp); in tl_discon_req()
4256 peer_tep->te_wq->q_next = NULL; in tl_discon_req()
4347 tl_endpt_t *peer_tep = tep->te_conp; in tl_connected_cots_addr_req() local
4358 if (peer_tep == NULL || peer_tep->te_closing) { in tl_connected_cots_addr_req()
4367 ack_sz += peer_tep->te_alen; in tl_connected_cots_addr_req()
4388 taa->REMADDR_length = peer_tep->te_alen; in tl_connected_cots_addr_req()
4392 bcopy(peer_tep->te_abuf, addr_startp, in tl_connected_cots_addr_req()
4393 peer_tep->te_alen); in tl_connected_cots_addr_req()
4395 taa->REMADDR_offset + peer_tep->te_alen; in tl_connected_cots_addr_req()
4507 tl_endpt_t *peer_tep; in tl_data() local
4648 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_data()
4656 ASSERT(tep->te_serializer == peer_tep->te_serializer); in tl_data()
4657 peer_rq = peer_tep->te_rq; in tl_data()
4672 switch (peer_tep->te_state) { in tl_data()
4680 tl_merror(peer_tep->te_wq, mp, EPROTO); in tl_data()
4708 tl_endpt_t *peer_tep; in tl_exdata() local
4815 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_exdata()
4823 peer_rq = peer_tep->te_rq; in tl_exdata()
4838 switch (peer_tep->te_state) { in tl_exdata()
4846 tl_merror(peer_tep->te_wq, mp, EPROTO); in tl_exdata()
4872 tl_endpt_t *peer_tep; in tl_ordrel() local
4939 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_ordrel()
4947 peer_rq = peer_tep->te_rq; in tl_ordrel()
4962 switch (peer_tep->te_state) { in tl_ordrel()
4970 tl_merror(peer_tep->te_wq, mp, EPROTO); in tl_ordrel()
4973 peer_tep->te_state = nextstate[TE_ORDREL_IND][peer_tep->te_state]; in tl_ordrel()
5093 tl_endpt_t *peer_tep; in tl_unitdata() local
5210 peer_tep = tep->te_lastep; in tl_unitdata()
5212 if ((peer_tep == NULL) || peer_tep->te_closing || in tl_unitdata()
5213 (peer_tep->te_state != TS_IDLE) || in tl_unitdata()
5214 !tl_eqaddr(&destaddr, &peer_tep->te_ap)) { in tl_unitdata()
5219 peer_tep = (IS_SOCKET(tep) ? in tl_unitdata()
5223 if (peer_tep == NULL) { in tl_unitdata()
5237 tep->te_lastep = peer_tep; in tl_unitdata()
5240 if (peer_tep->te_state != TS_IDLE) { in tl_unitdata()
5247 ASSERT(peer_tep->te_rq != NULL); in tl_unitdata()
5254 if (!canputnext(peer_tep->te_rq) && !(tep->te_closing)) { in tl_unitdata()
5259 list_insert_head(&peer_tep->te_flowlist, tep); in tl_unitdata()
5260 tep->te_flowq = peer_tep; in tl_unitdata()
5271 if (peer_tep->te_flag & (TL_SETCRED | TL_SETUCRED | TL_SOCKUCRED)) { in tl_unitdata()
5275 if (peer_tep->te_flag & TL_SETCRED) { in tl_unitdata()
5280 } else if (peer_tep->te_flag & TL_SETUCRED) { in tl_unitdata()
5313 !(peer_tep->te_flag & (TL_SETCRED | TL_SETUCRED | TL_SOCKUCRED))) { in tl_unitdata()
5341 if (peer_tep->te_flag & in tl_unitdata()
5349 cr, cpid, peer_tep->te_flag, peer_tep->te_credp); in tl_unitdata()
5389 if (peer_tep->te_flag & in tl_unitdata()
5402 peer_tep->te_flag, peer_tep->te_credp); in tl_unitdata()
5419 peer_tep->te_state = nextstate[TE_UNITDATA_IND][peer_tep->te_state]; in tl_unitdata()
5420 putnext(peer_tep->te_rq, mp); in tl_unitdata()
5434 tl_endpt_t *peer_tep = NULL; in tl_find_peer() local
5436 (mod_hash_val_t *)&peer_tep, tl_find_callback); in tl_find_peer()
5443 EQUIV(rc == 0, peer_tep != NULL); in tl_find_peer()
5445 (tep->te_zoneid == peer_tep->te_zoneid) && in tl_find_peer()
5446 (tep->te_transport == peer_tep->te_transport)); in tl_find_peer()
5448 if ((rc == 0) && (peer_tep->te_closing)) { in tl_find_peer()
5449 tl_refrele(peer_tep); in tl_find_peer()
5450 peer_tep = NULL; in tl_find_peer()
5453 return (peer_tep); in tl_find_peer()
5464 tl_endpt_t *peer_tep = NULL; in tl_sock_find_peer() local
5468 (mod_hash_val_t *)&peer_tep, tl_find_callback); in tl_sock_find_peer()
5471 EQUIV(rc == 0, peer_tep != NULL); in tl_sock_find_peer()
5472 IMPLY(rc == 0, (tep->te_transport == peer_tep->te_transport)); in tl_sock_find_peer()
5474 if (peer_tep != NULL) { in tl_sock_find_peer()
5476 if (peer_tep->te_closing) in tl_sock_find_peer()
5484 if ((peer_tep->te_zoneid != tep->te_zoneid) && in tl_sock_find_peer()
5486 (peer_tep->te_zoneid != GLOBAL_ZONEID)) in tl_sock_find_peer()
5490 return (peer_tep); in tl_sock_find_peer()
5493 tl_refrele(peer_tep); in tl_sock_find_peer()
5627 tl_endpt_t *peer_tep = tep->te_conp; in tl_co_unconnect() local
5638 if ((peer_tep != NULL) && peer_tep->te_closing) { in tl_co_unconnect()
5640 peer_tep = NULL; in tl_co_unconnect()
5756 } else if (peer_tep != NULL) { in tl_co_unconnect()
5764 ASSERT(tep->te_ser == peer_tep->te_ser); in tl_co_unconnect()
5765 if (IS_COTSORD(peer_tep) && in tl_co_unconnect()
5766 (peer_tep->te_state == TS_WIND_ORDREL || in tl_co_unconnect()
5767 peer_tep->te_state == TS_DATA_XFER)) { in tl_co_unconnect()
5773 peer_tep->te_state, in tl_co_unconnect()
5774 nextstate[TE_ORDREL_IND][peer_tep->te_state])); in tl_co_unconnect()
5785 TL_QENABLE(peer_tep); in tl_co_unconnect()
5788 peer_tep->te_state = in tl_co_unconnect()
5789 nextstate[TE_ORDREL_IND][peer_tep->te_state]; in tl_co_unconnect()
5791 putnext(peer_tep->te_rq, d_mp); in tl_co_unconnect()
5797 TL_QENABLE(peer_tep); in tl_co_unconnect()
5798 } else if (IS_COTSORD(peer_tep) && in tl_co_unconnect()
5799 peer_tep->te_state == TS_WREQ_ORDREL) { in tl_co_unconnect()
5808 tl_discon_ind(peer_tep, 0); in tl_co_unconnect()
5813 tl_discon_ind(peer_tep, ECONNRESET); in tl_co_unconnect()
5821 peer_tep = tep->te_conp; in tl_co_unconnect()
5822 TL_REMOVE_PEER(peer_tep->te_conp); in tl_co_unconnect()