Lines Matching refs:peer_tep
1663 tl_endpt_t *peer_tep = tep->te_conp; in tl_close_ser() local
1666 if ((peer_tep != NULL) && !peer_tep->te_closing) in tl_close_ser()
1667 peer_tep->te_wq->q_next = NULL; in tl_close_ser()
1939 tl_endpt_t *peer_tep = tep->te_conp; in tl_wput_data_ser() local
1945 IMPLY(peer_tep, tep->te_serializer == peer_tep->te_serializer); in tl_wput_data_ser()
1950 if ((peer_tep != NULL) && in tl_wput_data_ser()
1951 !peer_tep->te_closing && in tl_wput_data_ser()
1956 ((peer_tep->te_state == TS_DATA_XFER) || in tl_wput_data_ser()
1957 (peer_tep->te_state == TS_WREQ_ORDREL)) && in tl_wput_data_ser()
1958 ((peer_rq = peer_tep->te_rq) != NULL) && in tl_wput_data_ser()
2087 tl_endpt_t *peer_tep; in tl_rsrv_ser() local
2093 ((peer_tep = tep->te_conp) != NULL) && in tl_rsrv_ser()
2094 !peer_tep->te_closing && in tl_rsrv_ser()
2098 TL_QENABLE(peer_tep); in tl_rsrv_ser()
2809 tl_endpt_t *peer_tep = NULL; in tl_conn_req() local
2965 peer_tep = (IS_SOCKET(tep) ? in tl_conn_req()
2969 if (peer_tep == NULL) { in tl_conn_req()
2973 } else if (peer_tep->te_nicon >= peer_tep->te_qlen) { in tl_conn_req()
2987 if (peer_tep != NULL) in tl_conn_req()
2988 tl_refrele(peer_tep); in tl_conn_req()
3011 ASSERT(IS_COTS(peer_tep)); in tl_conn_req()
3018 tl_serializer_refhold(peer_tep->te_ser); in tl_conn_req()
3020 tep->te_ser = peer_tep->te_ser; in tl_conn_req()
3022 tep->te_oconp = peer_tep; in tl_conn_req()
3047 tl_endpt_t *peer_tep = tep->te_oconp; in tl_conn_req_ser() local
3082 if (peer_tep->te_closing || in tl_conn_req_ser()
3083 !((peer_tep->te_state == TS_IDLE) || in tl_conn_req_ser()
3084 (peer_tep->te_state == TS_WRES_CIND))) { in tl_conn_req_ser()
3087 peer_tep->te_state)); in tl_conn_req_ser()
3102 if (peer_tep->te_flag & (TL_SETCRED|TL_SETUCRED)) { in tl_conn_req_ser()
3105 if (peer_tep->te_flag & TL_SETCRED) { in tl_conn_req_ser()
3213 if (peer_tep != NULL && peer_tep->te_credp != NULL && in tl_conn_req_ser()
3215 mblk_setcred(confmp, peer_tep->te_credp, peer_tep->te_cpid); in tl_conn_req_ser()
3252 if (peer_tep->te_flag & (TL_SETCRED|TL_SETUCRED)) { in tl_conn_req_ser()
3259 peer_tep->te_flag, peer_tep->te_credp); in tl_conn_req_ser()
3282 list_insert_tail(&peer_tep->te_iconp, tip); in tl_conn_req_ser()
3283 peer_tep->te_nicon++; in tl_conn_req_ser()
3285 peer_tep->te_state = NEXTSTATE(TE_CONN_IND, peer_tep->te_state); in tl_conn_req_ser()
3289 putnext(peer_tep->te_rq, cimp); in tl_conn_req_ser()
3307 ASSERT(peer_tep->te_refcnt >= 2); in tl_conn_req_ser()
3861 tl_endpt_t *peer_tep = tep->te_conp; in tl_discon_req() local
3874 if ((peer_tep != NULL) && peer_tep->te_closing) { in tl_discon_req()
3876 peer_tep = NULL; in tl_discon_req()
3960 peer_tep = tip->ti_tep; in tl_discon_req()
4001 if (peer_tep != NULL && !peer_tep->te_closing) { in tl_discon_req()
4015 save_state = peer_tep->te_state; in tl_discon_req()
4016 peer_tep->te_state = TS_IDLE; in tl_discon_req()
4018 TL_REMOVE_PEER(peer_tep->te_oconp); in tl_discon_req()
4019 enableok(peer_tep->te_wq); in tl_discon_req()
4020 TL_QENABLE(peer_tep); in tl_discon_req()
4031 } else if ((peer_tep = tep->te_oconp) != NULL) { /* client */ in tl_discon_req()
4064 tl_icon_queuemsg(peer_tep, tep->te_seqno, dimp); in tl_discon_req()
4065 peer_tep = NULL; in tl_discon_req()
4076 tip = tl_icon_find(peer_tep, tep->te_seqno); in tl_discon_req()
4079 save_state = peer_tep->te_state; in tl_discon_req()
4080 if (peer_tep->te_nicon == 1) in tl_discon_req()
4081 peer_tep->te_state = in tl_discon_req()
4083 peer_tep->te_state); in tl_discon_req()
4085 peer_tep->te_state = in tl_discon_req()
4087 peer_tep->te_state); in tl_discon_req()
4088 tl_freetip(peer_tep, tip); in tl_discon_req()
4093 } else if ((peer_tep = tep->te_conp) != NULL) { /* connected! */ in tl_discon_req()
4105 save_state = peer_tep->te_state; in tl_discon_req()
4106 peer_tep->te_state = TS_IDLE; in tl_discon_req()
4117 if (peer_tep == NULL) { in tl_discon_req()
4129 (void) putnextctl1(peer_tep->te_rq, M_FLUSH, FLUSHRW); in tl_discon_req()
4142 putnext(peer_tep->te_rq, dimp); in tl_discon_req()
4145 ASSERT(! peer_tep->te_closing); in tl_discon_req()
4157 TL_QENABLE(peer_tep); in tl_discon_req()
4158 ASSERT(peer_tep != NULL && peer_tep->te_conp != NULL); in tl_discon_req()
4159 TL_UNCONNECT(peer_tep->te_conp); in tl_discon_req()
4165 peer_tep->te_wq->q_next = NULL; in tl_discon_req()
4256 tl_endpt_t *peer_tep = tep->te_conp; in tl_connected_cots_addr_req() local
4267 if (peer_tep == NULL || peer_tep->te_closing) { in tl_connected_cots_addr_req()
4276 ack_sz += peer_tep->te_alen; in tl_connected_cots_addr_req()
4297 taa->REMADDR_length = peer_tep->te_alen; in tl_connected_cots_addr_req()
4301 bcopy(peer_tep->te_abuf, addr_startp, in tl_connected_cots_addr_req()
4302 peer_tep->te_alen); in tl_connected_cots_addr_req()
4304 taa->REMADDR_offset + peer_tep->te_alen; in tl_connected_cots_addr_req()
4416 tl_endpt_t *peer_tep; in tl_data() local
4557 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_data()
4565 ASSERT(tep->te_serializer == peer_tep->te_serializer); in tl_data()
4566 peer_rq = peer_tep->te_rq; in tl_data()
4581 switch (peer_tep->te_state) { in tl_data()
4589 tl_merror(peer_tep->te_wq, mp, EPROTO); in tl_data()
4617 tl_endpt_t *peer_tep; in tl_exdata() local
4724 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_exdata()
4732 peer_rq = peer_tep->te_rq; in tl_exdata()
4747 switch (peer_tep->te_state) { in tl_exdata()
4755 tl_merror(peer_tep->te_wq, mp, EPROTO); in tl_exdata()
4781 tl_endpt_t *peer_tep; in tl_ordrel() local
4848 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_ordrel()
4856 peer_rq = peer_tep->te_rq; in tl_ordrel()
4871 switch (peer_tep->te_state) { in tl_ordrel()
4879 tl_merror(peer_tep->te_wq, mp, EPROTO); in tl_ordrel()
4882 peer_tep->te_state = NEXTSTATE(TE_ORDREL_IND, peer_tep->te_state); in tl_ordrel()
5000 tl_endpt_t *peer_tep; in tl_unitdata() local
5117 peer_tep = tep->te_lastep; in tl_unitdata()
5119 if ((peer_tep == NULL) || peer_tep->te_closing || in tl_unitdata()
5120 (peer_tep->te_state != TS_IDLE) || in tl_unitdata()
5121 !tl_eqaddr(&destaddr, &peer_tep->te_ap)) { in tl_unitdata()
5126 peer_tep = (IS_SOCKET(tep) ? in tl_unitdata()
5130 if (peer_tep == NULL) { in tl_unitdata()
5144 tep->te_lastep = peer_tep; in tl_unitdata()
5147 if (peer_tep->te_state != TS_IDLE) { in tl_unitdata()
5154 ASSERT(peer_tep->te_rq != NULL); in tl_unitdata()
5161 if (!canputnext(peer_tep->te_rq) && !(tep->te_closing)) { in tl_unitdata()
5166 list_insert_head(&peer_tep->te_flowlist, tep); in tl_unitdata()
5167 tep->te_flowq = peer_tep; in tl_unitdata()
5178 if (peer_tep->te_flag & (TL_SETCRED|TL_SETUCRED|TL_SOCKUCRED)) { in tl_unitdata()
5182 if (peer_tep->te_flag & TL_SETCRED) { in tl_unitdata()
5187 } else if (peer_tep->te_flag & TL_SETUCRED) { in tl_unitdata()
5206 !(peer_tep->te_flag & (TL_SETCRED|TL_SETUCRED|TL_SOCKUCRED))) { in tl_unitdata()
5241 if (peer_tep->te_flag & (TL_SETCRED|TL_SETUCRED|TL_SOCKUCRED)) { in tl_unitdata()
5253 peer_tep->te_flag, peer_tep->te_credp); in tl_unitdata()
5270 peer_tep->te_state = NEXTSTATE(TE_UNITDATA_IND, peer_tep->te_state); in tl_unitdata()
5271 putnext(peer_tep->te_rq, mp); in tl_unitdata()
5285 tl_endpt_t *peer_tep = NULL; in tl_find_peer() local
5287 (mod_hash_val_t *)&peer_tep, tl_find_callback); in tl_find_peer()
5294 EQUIV(rc == 0, peer_tep != NULL); in tl_find_peer()
5296 (tep->te_zoneid == peer_tep->te_zoneid) && in tl_find_peer()
5297 (tep->te_transport == peer_tep->te_transport)); in tl_find_peer()
5299 if ((rc == 0) && (peer_tep->te_closing)) { in tl_find_peer()
5300 tl_refrele(peer_tep); in tl_find_peer()
5301 peer_tep = NULL; in tl_find_peer()
5304 return (peer_tep); in tl_find_peer()
5315 tl_endpt_t *peer_tep = NULL; in tl_sock_find_peer() local
5319 (mod_hash_val_t *)&peer_tep, tl_find_callback); in tl_sock_find_peer()
5322 EQUIV(rc == 0, peer_tep != NULL); in tl_sock_find_peer()
5323 IMPLY(rc == 0, (tep->te_transport == peer_tep->te_transport)); in tl_sock_find_peer()
5325 if (peer_tep != NULL) { in tl_sock_find_peer()
5327 if (peer_tep->te_closing) in tl_sock_find_peer()
5335 if ((peer_tep->te_zoneid != tep->te_zoneid) && in tl_sock_find_peer()
5337 (peer_tep->te_zoneid != GLOBAL_ZONEID)) in tl_sock_find_peer()
5341 return (peer_tep); in tl_sock_find_peer()
5344 tl_refrele(peer_tep); in tl_sock_find_peer()
5478 tl_endpt_t *peer_tep = tep->te_conp; in tl_co_unconnect() local
5489 if ((peer_tep != NULL) && peer_tep->te_closing) { in tl_co_unconnect()
5491 peer_tep = NULL; in tl_co_unconnect()
5607 } else if (peer_tep != NULL) { in tl_co_unconnect()
5615 ASSERT(tep->te_ser == peer_tep->te_ser); in tl_co_unconnect()
5616 if (IS_COTSORD(peer_tep) && in tl_co_unconnect()
5617 (peer_tep->te_state == TS_WIND_ORDREL || in tl_co_unconnect()
5618 peer_tep->te_state == TS_DATA_XFER)) { in tl_co_unconnect()
5624 peer_tep->te_state, in tl_co_unconnect()
5625 NEXTSTATE(TE_ORDREL_IND, peer_tep->te_state))); in tl_co_unconnect()
5636 TL_QENABLE(peer_tep); in tl_co_unconnect()
5639 peer_tep->te_state = in tl_co_unconnect()
5640 NEXTSTATE(TE_ORDREL_IND, peer_tep->te_state); in tl_co_unconnect()
5642 putnext(peer_tep->te_rq, d_mp); in tl_co_unconnect()
5648 TL_QENABLE(peer_tep); in tl_co_unconnect()
5649 } else if (IS_COTSORD(peer_tep) && in tl_co_unconnect()
5650 peer_tep->te_state == TS_WREQ_ORDREL) { in tl_co_unconnect()
5659 tl_discon_ind(peer_tep, 0); in tl_co_unconnect()
5664 tl_discon_ind(peer_tep, ECONNRESET); in tl_co_unconnect()
5672 peer_tep = tep->te_conp; in tl_co_unconnect()
5673 TL_REMOVE_PEER(peer_tep->te_conp); in tl_co_unconnect()