Lines Matching refs:tep

1139 tl_refhold(tl_endpt_t *tep)  in tl_refhold()  argument
1141 atomic_inc_32(&tep->te_refcnt); in tl_refhold()
1145 tl_refrele(tl_endpt_t *tep) in tl_refrele() argument
1147 ASSERT(tep->te_refcnt != 0); in tl_refrele()
1149 if (atomic_dec_32_nv(&tep->te_refcnt) == 0) in tl_refrele()
1150 tl_free(tep); in tl_refrele()
1157 tl_endpt_t *tep = buf; in tl_constructor() local
1159 bzero(tep, sizeof (tl_endpt_t)); in tl_constructor()
1160 mutex_init(&tep->te_closelock, NULL, MUTEX_DEFAULT, NULL); in tl_constructor()
1161 cv_init(&tep->te_closecv, NULL, CV_DEFAULT, NULL); in tl_constructor()
1162 mutex_init(&tep->te_srv_lock, NULL, MUTEX_DEFAULT, NULL); in tl_constructor()
1163 cv_init(&tep->te_srv_cv, NULL, CV_DEFAULT, NULL); in tl_constructor()
1164 mutex_init(&tep->te_ser_lock, NULL, MUTEX_DEFAULT, NULL); in tl_constructor()
1173 tl_endpt_t *tep = buf; in tl_destructor() local
1175 mutex_destroy(&tep->te_closelock); in tl_destructor()
1176 cv_destroy(&tep->te_closecv); in tl_destructor()
1177 mutex_destroy(&tep->te_srv_lock); in tl_destructor()
1178 cv_destroy(&tep->te_srv_cv); in tl_destructor()
1179 mutex_destroy(&tep->te_ser_lock); in tl_destructor()
1183 tl_free(tl_endpt_t *tep) in tl_free() argument
1185 ASSERT(tep->te_refcnt == 0); in tl_free()
1186 ASSERT(tep->te_transport != NULL); in tl_free()
1187 ASSERT(tep->te_rq == NULL); in tl_free()
1188 ASSERT(tep->te_wq == NULL); in tl_free()
1189 ASSERT(tep->te_ser != NULL); in tl_free()
1190 ASSERT(tep->te_ser_count == 0); in tl_free()
1191 ASSERT(! (tep->te_flag & TL_ADDRHASHED)); in tl_free()
1193 if (IS_SOCKET(tep)) { in tl_free()
1194 ASSERT(tep->te_alen == TL_SOUX_ADDRLEN); in tl_free()
1195 ASSERT(tep->te_abuf == &tep->te_uxaddr); in tl_free()
1196 ASSERT(tep->te_vp == (void *)(uintptr_t)tep->te_minor); in tl_free()
1197 ASSERT(tep->te_magic == SOU_MAGIC_IMPLICIT); in tl_free()
1198 } else if (tep->te_abuf != NULL) { in tl_free()
1199 kmem_free(tep->te_abuf, tep->te_alen); in tl_free()
1200 tep->te_alen = -1; /* uninitialized */ in tl_free()
1201 tep->te_abuf = NULL; in tl_free()
1203 ASSERT(tep->te_alen == -1); in tl_free()
1206 id_free(tl_minors, tep->te_minor); in tl_free()
1207 ASSERT(tep->te_credp == NULL); in tl_free()
1209 if (tep->te_hash_hndl != NULL) in tl_free()
1210 mod_hash_cancel(tep->te_addrhash, &tep->te_hash_hndl); in tl_free()
1212 if (IS_COTS(tep)) { in tl_free()
1213 TL_REMOVE_PEER(tep->te_conp); in tl_free()
1214 TL_REMOVE_PEER(tep->te_oconp); in tl_free()
1215 tl_serializer_refrele(tep->te_ser); in tl_free()
1216 tep->te_ser = NULL; in tl_free()
1217 ASSERT(tep->te_nicon == 0); in tl_free()
1218 ASSERT(list_head(&tep->te_iconp) == NULL); in tl_free()
1220 ASSERT(tep->te_lastep == NULL); in tl_free()
1221 ASSERT(list_head(&tep->te_flowlist) == NULL); in tl_free()
1222 ASSERT(tep->te_flowq == NULL); in tl_free()
1225 ASSERT(tep->te_bufcid == 0); in tl_free()
1226 ASSERT(tep->te_timoutid == 0); in tl_free()
1227 bzero(&tep->te_ap, sizeof (tep->te_ap)); in tl_free()
1228 tep->te_acceptor_id = 0; in tl_free()
1230 ASSERT(tep->te_closewait == 0); in tl_free()
1231 ASSERT(!tep->te_rsrv_active); in tl_free()
1232 ASSERT(!tep->te_wsrv_active); in tl_free()
1233 tep->te_closing = 0; in tl_free()
1234 tep->te_nowsrv = B_FALSE; in tl_free()
1235 tep->te_flag = 0; in tl_free()
1237 kmem_cache_free(tl_cache, tep); in tl_free()
1284 tl_serializer_enter(tl_endpt_t *tep, tlproc_t tlproc, mblk_t *mp) in tl_serializer_enter() argument
1286 if (IS_COTS(tep)) { in tl_serializer_enter()
1287 mutex_enter(&tep->te_ser_lock); in tl_serializer_enter()
1288 tep->te_ser_count++; in tl_serializer_enter()
1289 mutex_exit(&tep->te_ser_lock); in tl_serializer_enter()
1291 serializer_enter(tep->te_serializer, (srproc_t *)tlproc, mp, tep); in tl_serializer_enter()
1299 tl_serializer_exit(tl_endpt_t *tep) in tl_serializer_exit() argument
1301 if (IS_COTS(tep)) { in tl_serializer_exit()
1302 mutex_enter(&tep->te_ser_lock); in tl_serializer_exit()
1303 ASSERT(tep->te_ser_count != 0); in tl_serializer_exit()
1304 tep->te_ser_count--; in tl_serializer_exit()
1305 mutex_exit(&tep->te_ser_lock); in tl_serializer_exit()
1386 tl_noclose(tl_endpt_t *tep) in tl_noclose() argument
1390 mutex_enter(&tep->te_closelock); in tl_noclose()
1391 if (! tep->te_closing) { in tl_noclose()
1392 ASSERT(tep->te_closewait == 0); in tl_noclose()
1393 tep->te_closewait++; in tl_noclose()
1396 mutex_exit(&tep->te_closelock); in tl_noclose()
1404 tl_closeok(tl_endpt_t *tep) in tl_closeok() argument
1406 ASSERT(tep->te_closewait > 0); in tl_closeok()
1407 mutex_enter(&tep->te_closelock); in tl_closeok()
1408 ASSERT(tep->te_closewait == 1); in tl_closeok()
1409 tep->te_closewait--; in tl_closeok()
1410 cv_signal(&tep->te_closecv); in tl_closeok()
1411 mutex_exit(&tep->te_closelock); in tl_closeok()
1421 tl_endpt_t *tep; in tl_open() local
1442 tep = kmem_cache_alloc(tl_cache, KM_SLEEP); in tl_open()
1443 tep->te_refcnt = 1; in tl_open()
1444 tep->te_cpid = curproc->p_pid; in tl_open()
1445 rq->q_ptr = WR(rq)->q_ptr = tep; in tl_open()
1446 tep->te_state = TS_UNBND; in tl_open()
1447 tep->te_credp = credp; in tl_open()
1449 tep->te_zoneid = getzoneid(); in tl_open()
1451 tep->te_flag = minor & TL_MINOR_MASK; in tl_open()
1452 tep->te_transport = &tl_transports[minor]; in tl_open()
1455 tep->te_minor = (minor_t)id_alloc(tl_minors); in tl_open()
1458 (void) mod_hash_reserve(tep->te_addrhash, &tep->te_hash_hndl); in tl_open()
1461 if (IS_COTS(tep)) { in tl_open()
1463 tep->te_ser = tl_serializer_alloc(KM_SLEEP); in tl_open()
1466 list_create(&tep->te_iconp, sizeof (tl_icon_t), in tl_open()
1468 tep->te_qlen = 0; in tl_open()
1469 tep->te_nicon = 0; in tl_open()
1470 tep->te_oconp = NULL; in tl_open()
1471 tep->te_conp = NULL; in tl_open()
1474 tep->te_ser = tep->te_transport->tr_serializer; in tl_open()
1475 bzero(&tep->te_flows, sizeof (list_node_t)); in tl_open()
1477 list_create(&tep->te_flowlist, sizeof (tl_endpt_t), in tl_open()
1479 tep->te_flowq = NULL; in tl_open()
1480 tep->te_lastep = NULL; in tl_open()
1485 if (IS_SOCKET(tep)) { in tl_open()
1487 tep->te_alen = TL_SOUX_ADDRLEN; in tl_open()
1488 tep->te_abuf = &tep->te_uxaddr; in tl_open()
1489 tep->te_vp = (void *)(uintptr_t)tep->te_minor; in tl_open()
1490 tep->te_magic = SOU_MAGIC_IMPLICIT; in tl_open()
1492 tep->te_alen = -1; in tl_open()
1493 tep->te_abuf = NULL; in tl_open()
1497 *devp = makedevice(getmajor(*devp), tep->te_minor); in tl_open()
1499 tep->te_rq = rq; in tl_open()
1500 tep->te_wq = WR(rq); in tl_open()
1503 if (IS_SOCKET(tep)) in tl_open()
1504 tep->te_acceptor_id = tep->te_minor; in tl_open()
1506 tep->te_acceptor_id = (t_uscalar_t)rq; in tl_open()
1508 tep->te_acceptor_id = tep->te_minor; in tl_open()
1518 (void) mod_hash_insert(tep->te_transport->tr_ai_hash, in tl_open()
1519 (mod_hash_key_t)(uintptr_t)tep->te_acceptor_id, in tl_open()
1520 (mod_hash_val_t)tep); in tl_open()
1529 tl_endpt_t *tep = (tl_endpt_t *)rq->q_ptr; in tl_close() local
1531 queue_t *wq = tep->te_wq; in tl_close()
1539 rc = mod_hash_remove(tep->te_transport->tr_ai_hash, in tl_close()
1540 (mod_hash_key_t)(uintptr_t)tep->te_acceptor_id, in tl_close()
1542 ASSERT(rc == 0 && tep == elp); in tl_close()
1543 if ((rc != 0) || (tep != elp)) { in tl_close()
1544 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_close()
1552 mutex_enter(&tep->te_closelock); in tl_close()
1553 while (tep->te_closewait) in tl_close()
1554 cv_wait(&tep->te_closecv, &tep->te_closelock); in tl_close()
1555 tep->te_closing = B_TRUE; in tl_close()
1560 tep->te_closewait = 1; in tl_close()
1561 tep->te_nowsrv = B_FALSE; in tl_close()
1562 mutex_exit(&tep->te_closelock); in tl_close()
1568 tl_serializer_enter(tep, tl_close_ser, &tep->te_closemp); in tl_close()
1573 mutex_enter(&tep->te_closelock); in tl_close()
1574 while (tep->te_closewait) in tl_close()
1575 cv_wait(&tep->te_closecv, &tep->te_closelock); in tl_close()
1576 mutex_exit(&tep->te_closelock); in tl_close()
1580 if (tep->te_bufcid) { in tl_close()
1581 qunbufcall(rq, tep->te_bufcid); in tl_close()
1582 tep->te_bufcid = 0; in tl_close()
1584 if (tep->te_timoutid) { in tl_close()
1585 (void) quntimeout(rq, tep->te_timoutid); in tl_close()
1586 tep->te_timoutid = 0; in tl_close()
1600 ASSERT(tep->te_closewait == 0); in tl_close()
1601 if (IS_COTS(tep)) in tl_close()
1602 tep->te_closewait = 1; in tl_close()
1604 tl_refhold(tep); in tl_close()
1606 tl_serializer_enter(tep, tl_close_finish_ser, &tep->te_closemp); in tl_close()
1612 if (IS_COTS(tep)) { in tl_close()
1613 mutex_enter(&tep->te_closelock); in tl_close()
1614 while (tep->te_closewait) in tl_close()
1615 cv_wait(&tep->te_closecv, &tep->te_closelock); in tl_close()
1616 mutex_exit(&tep->te_closelock); in tl_close()
1619 crfree(tep->te_credp); in tl_close()
1620 tep->te_credp = NULL; in tl_close()
1621 tep->te_wq = NULL; in tl_close()
1622 tl_refrele(tep); in tl_close()
1639 tl_close_ser(mblk_t *mp, tl_endpt_t *tep) in tl_close_ser() argument
1641 ASSERT(tep->te_closing); in tl_close_ser()
1642 ASSERT(tep->te_closewait == 1); in tl_close_ser()
1643 ASSERT(!(tep->te_flag & TL_CLOSE_SER)); in tl_close_ser()
1645 tep->te_flag |= TL_CLOSE_SER; in tl_close_ser()
1651 if (tep->te_wq->q_first && (IS_CLTS(tep) || IS_COTSORD(tep))) { in tl_close_ser()
1652 tl_wsrv_ser(NULL, tep); in tl_close_ser()
1656 tl_addr_unbind(tep); in tl_close_ser()
1662 if (IS_COTS(tep) && !IS_SOCKET(tep)) { in tl_close_ser()
1663 tl_endpt_t *peer_tep = tep->te_conp; in tl_close_ser()
1665 tep->te_wq->q_next = NULL; in tl_close_ser()
1670 tep->te_rq = NULL; in tl_close_ser()
1673 tl_closeok(tep); in tl_close_ser()
1674 tl_serializer_exit(tep); in tl_close_ser()
1685 tl_close_finish_ser(mblk_t *mp, tl_endpt_t *tep) in tl_close_finish_ser() argument
1687 ASSERT(tep->te_closing); in tl_close_finish_ser()
1688 IMPLY(IS_CLTS(tep), tep->te_closewait == 0); in tl_close_finish_ser()
1689 IMPLY(IS_COTS(tep), tep->te_closewait == 1); in tl_close_finish_ser()
1691 tep->te_state = -1; /* Uninitialized */ in tl_close_finish_ser()
1692 if (IS_COTS(tep)) { in tl_close_finish_ser()
1693 tl_co_unconnect(tep); in tl_close_finish_ser()
1696 TL_REMOVE_PEER(tep->te_lastep); in tl_close_finish_ser()
1701 tl_cl_backenable(tep); in tl_close_finish_ser()
1702 if (tep->te_flowq != NULL) { in tl_close_finish_ser()
1703 list_remove(&(tep->te_flowq->te_flowlist), tep); in tl_close_finish_ser()
1704 tep->te_flowq = NULL; in tl_close_finish_ser()
1708 tl_serializer_exit(tep); in tl_close_finish_ser()
1709 if (IS_COTS(tep)) in tl_close_finish_ser()
1710 tl_closeok(tep); in tl_close_finish_ser()
1712 tl_refrele(tep); in tl_close_finish_ser()
1724 tl_endpt_t *tep = (tl_endpt_t *)wq->q_ptr; in tl_wput() local
1732 if (IS_CLTS(tep)) { in tl_wput()
1733 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_wput()
1777 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_wput()
1804 if (IS_CLTS(tep)) { in tl_wput()
1817 if (IS_COTS(tep) || in tl_wput()
1822 if ((tep->te_state == TS_IDLE) && !wq->q_first) { in tl_wput()
1848 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_wput()
1856 tl_capability_req(mp, tep); in tl_wput()
1866 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_wput()
1874 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_wput()
1884 tl_refhold(tep); in tl_wput()
1885 tl_serializer_enter(tep, tl_proc, mp); in tl_wput()
1892 tl_putq_ser(mblk_t *mp, tl_endpt_t *tep) in tl_putq_ser() argument
1894 if (tep->te_closing) { in tl_putq_ser()
1895 tl_wput_ser(mp, tep); in tl_putq_ser()
1897 TL_PUTQ(tep, mp); in tl_putq_ser()
1898 tl_serializer_exit(tep); in tl_putq_ser()
1899 tl_refrele(tep); in tl_putq_ser()
1905 tl_wput_common_ser(mblk_t *mp, tl_endpt_t *tep) in tl_wput_common_ser() argument
1911 tl_data(mp, tep); in tl_wput_common_ser()
1914 tl_do_proto(mp, tep); in tl_wput_common_ser()
1926 tl_wput_ser(mblk_t *mp, tl_endpt_t *tep) in tl_wput_ser() argument
1928 tl_wput_common_ser(mp, tep); in tl_wput_ser()
1929 tl_serializer_exit(tep); in tl_wput_ser()
1930 tl_refrele(tep); in tl_wput_ser()
1937 tl_wput_data_ser(mblk_t *mp, tl_endpt_t *tep) in tl_wput_data_ser() argument
1939 tl_endpt_t *peer_tep = tep->te_conp; in tl_wput_data_ser()
1943 ASSERT(IS_COTS(tep)); in tl_wput_data_ser()
1945 IMPLY(peer_tep, tep->te_serializer == peer_tep->te_serializer); in tl_wput_data_ser()
1952 ((tep->te_state == TS_DATA_XFER) || in tl_wput_data_ser()
1953 (tep->te_state == TS_WREQ_ORDREL)) && in tl_wput_data_ser()
1954 (tep->te_wq != NULL) && in tl_wput_data_ser()
1955 (tep->te_wq->q_first == NULL) && in tl_wput_data_ser()
1959 (canputnext(peer_rq) || tep->te_closing)) { in tl_wput_data_ser()
1961 } else if (tep->te_closing) { in tl_wput_data_ser()
1968 if ((tep->te_wq != NULL) && in tl_wput_data_ser()
1969 ((tep->te_state == TS_DATA_XFER) || in tl_wput_data_ser()
1970 (tep->te_state == TS_WREQ_ORDREL))) { in tl_wput_data_ser()
1971 TL_PUTQ(tep, mp); in tl_wput_data_ser()
1976 TL_PUTQ(tep, mp); in tl_wput_data_ser()
1979 tl_serializer_exit(tep); in tl_wput_data_ser()
1980 tl_refrele(tep); in tl_wput_data_ser()
1994 tl_endpt_t *tep = (tl_endpt_t *)wq->q_ptr; in tl_wsrv() local
1996 while ((wq->q_first != NULL) && !tep->te_nowsrv) { in tl_wsrv()
1997 mutex_enter(&tep->te_srv_lock); in tl_wsrv()
1998 ASSERT(tep->te_wsrv_active == B_FALSE); in tl_wsrv()
1999 tep->te_wsrv_active = B_TRUE; in tl_wsrv()
2000 mutex_exit(&tep->te_srv_lock); in tl_wsrv()
2002 tl_serializer_enter(tep, tl_wsrv_ser, &tep->te_wsrvmp); in tl_wsrv()
2007 mutex_enter(&tep->te_srv_lock); in tl_wsrv()
2008 while (tep->te_wsrv_active) { in tl_wsrv()
2009 cv_wait(&tep->te_srv_cv, &tep->te_srv_lock); in tl_wsrv()
2011 cv_signal(&tep->te_srv_cv); in tl_wsrv()
2012 mutex_exit(&tep->te_srv_lock); in tl_wsrv()
2022 tl_wsrv_ser(mblk_t *ser_mp, tl_endpt_t *tep) in tl_wsrv_ser() argument
2025 queue_t *wq = tep->te_wq; in tl_wsrv_ser()
2028 while (!tep->te_nowsrv && (mp = getq(wq)) != NULL) { in tl_wsrv_ser()
2029 tl_wput_common_ser(mp, tep); in tl_wsrv_ser()
2045 mutex_enter(&tep->te_srv_lock); in tl_wsrv_ser()
2046 ASSERT(tep->te_wsrv_active); in tl_wsrv_ser()
2047 tep->te_wsrv_active = B_FALSE; in tl_wsrv_ser()
2048 cv_signal(&tep->te_srv_cv); in tl_wsrv_ser()
2049 mutex_exit(&tep->te_srv_lock); in tl_wsrv_ser()
2050 tl_serializer_exit(tep); in tl_wsrv_ser()
2065 tl_endpt_t *tep = (tl_endpt_t *)rq->q_ptr; in tl_rsrv() local
2068 ASSERT(tep->te_rsrv_active == 0); in tl_rsrv()
2070 tep->te_rsrv_active = B_TRUE; in tl_rsrv()
2071 tl_serializer_enter(tep, tl_rsrv_ser, &tep->te_rsrvmp); in tl_rsrv()
2075 mutex_enter(&tep->te_srv_lock); in tl_rsrv()
2076 while (tep->te_rsrv_active) { in tl_rsrv()
2077 cv_wait(&tep->te_srv_cv, &tep->te_srv_lock); in tl_rsrv()
2079 cv_signal(&tep->te_srv_cv); in tl_rsrv()
2080 mutex_exit(&tep->te_srv_lock); in tl_rsrv()
2085 tl_rsrv_ser(mblk_t *mp, tl_endpt_t *tep) in tl_rsrv_ser() argument
2089 if (IS_CLTS(tep) && tep->te_state == TS_IDLE) { in tl_rsrv_ser()
2090 tl_cl_backenable(tep); in tl_rsrv_ser()
2092 IS_COTS(tep) && in tl_rsrv_ser()
2093 ((peer_tep = tep->te_conp) != NULL) && in tl_rsrv_ser()
2095 ((tep->te_state == TS_DATA_XFER) || in tl_rsrv_ser()
2096 (tep->te_state == TS_WIND_ORDREL)|| in tl_rsrv_ser()
2097 (tep->te_state == TS_WREQ_ORDREL))) { in tl_rsrv_ser()
2104 mutex_enter(&tep->te_srv_lock); in tl_rsrv_ser()
2105 ASSERT(tep->te_rsrv_active); in tl_rsrv_ser()
2106 tep->te_rsrv_active = B_FALSE; in tl_rsrv_ser()
2107 cv_signal(&tep->te_srv_cv); in tl_rsrv_ser()
2108 mutex_exit(&tep->te_srv_lock); in tl_rsrv_ser()
2109 tl_serializer_exit(tep); in tl_rsrv_ser()
2116 tl_do_proto(mblk_t *mp, tl_endpt_t *tep) in tl_do_proto() argument
2126 tl_unbind(mp, tep); in tl_do_proto()
2130 tl_addr_req(mp, tep); in tl_do_proto()
2135 if (IS_CLTS(tep)) { in tl_do_proto()
2136 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2139 tl_conn_res(mp, tep); in tl_do_proto()
2143 if (IS_CLTS(tep)) { in tl_do_proto()
2144 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2147 tl_discon_req(mp, tep); in tl_do_proto()
2151 if (IS_CLTS(tep)) { in tl_do_proto()
2152 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2155 tl_data(mp, tep); in tl_do_proto()
2159 if (IS_CLTS(tep)) { in tl_do_proto()
2160 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2163 tl_data(mp, tep); in tl_do_proto()
2167 if (IS_CLTS(tep)) { in tl_do_proto()
2168 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2171 tl_exdata(mp, tep); in tl_do_proto()
2175 if (! IS_COTSORD(tep)) { in tl_do_proto()
2176 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2179 tl_ordrel(mp, tep); in tl_do_proto()
2183 if (IS_COTS(tep)) { in tl_do_proto()
2184 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2187 tl_unitdata(mp, tep); in tl_do_proto()
2191 tl_merror(tep->te_wq, mp, EPROTO); in tl_do_proto()
2201 tl_do_ioctl_ser(mblk_t *mp, tl_endpt_t *tep) in tl_do_ioctl_ser() argument
2203 if (! tep->te_closing) in tl_do_ioctl_ser()
2204 tl_do_ioctl(mp, tep); in tl_do_ioctl_ser()
2208 tl_serializer_exit(tep); in tl_do_ioctl_ser()
2209 tl_refrele(tep); in tl_do_ioctl_ser()
2213 tl_do_ioctl(mblk_t *mp, tl_endpt_t *tep) in tl_do_ioctl() argument
2217 queue_t *wq = tep->te_wq; in tl_do_ioctl()
2238 if (IS_SOCKET(tep) || (tep->te_flag & otheropt)) { in tl_do_ioctl()
2258 tep->te_flag |= thisopt; in tl_do_ioctl()
2260 tep->te_flag &= ~thisopt; in tl_do_ioctl()
2334 tl_bind_ser(mblk_t *mp, tl_endpt_t *tep) in tl_bind_ser() argument
2336 if (! tep->te_closing) in tl_bind_ser()
2337 tl_bind(mp, tep); in tl_bind_ser()
2341 tl_serializer_exit(tep); in tl_bind_ser()
2342 tl_refrele(tep); in tl_bind_ser()
2350 tl_bind(mblk_t *mp, tl_endpt_t *tep) in tl_bind() argument
2352 queue_t *wq = tep->te_wq; in tl_bind()
2364 t_scalar_t save_state = tep->te_state; in tl_bind()
2366 if (tep->te_state != TS_UNBND) { in tl_bind()
2367 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_bind()
2370 tep->te_state)); in tl_bind()
2380 tep->te_state = NEXTSTATE(TE_BIND_REQ, tep->te_state); in tl_bind()
2389 if (IS_COTS(tep)) { in tl_bind()
2399 if ((tep->te_hash_hndl == NULL) && in tl_bind()
2400 ((tep->te_flag & TL_ADDRHASHED) == 0) && in tl_bind()
2401 mod_hash_reserve_nosleep(tep->te_addrhash, in tl_bind()
2402 &tep->te_hash_hndl) != 0) { in tl_bind()
2410 if (IS_SOCKET(tep)) { in tl_bind()
2416 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2419 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2430 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2433 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2439 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2442 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2448 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2451 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2459 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2462 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2467 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2470 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2482 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2493 if (IS_SOCKET(tep)) { in tl_bind()
2503 if (tep->te_flag & TL_ADDRHASHED) { in tl_bind()
2504 ASSERT(IS_COTS(tep) && tep->te_qlen == 0); in tl_bind()
2505 if (tep->te_vp == ux_addr.soua_vp) in tl_bind()
2508 tl_addr_unbind(tep); in tl_bind()
2515 rc = mod_hash_insert_reserve(tep->te_addrhash, in tl_bind()
2517 (mod_hash_val_t)tep, tep->te_hash_hndl); in tl_bind()
2526 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_bind()
2533 tep->te_uxaddr = ux_addr; in tl_bind()
2534 tep->te_flag |= TL_ADDRHASHED; in tl_bind()
2535 tep->te_hash_hndl = NULL; in tl_bind()
2541 if (! tl_get_any_addr(tep, NULL)) { in tl_bind()
2542 (void) (STRLOG(TL_ID, tep->te_minor, in tl_bind()
2552 addr_req.ta_zoneid = tep->te_zoneid; in tl_bind()
2554 tep->te_abuf = kmem_zalloc((size_t)alen, KM_NOSLEEP); in tl_bind()
2555 if (tep->te_abuf == NULL) { in tl_bind()
2559 bcopy(addr_req.ta_abuf, tep->te_abuf, addr_req.ta_alen); in tl_bind()
2560 tep->te_alen = alen; in tl_bind()
2562 if (mod_hash_insert_reserve(tep->te_addrhash, in tl_bind()
2563 (mod_hash_key_t)&tep->te_ap, (mod_hash_val_t)tep, in tl_bind()
2564 tep->te_hash_hndl) != 0) { in tl_bind()
2571 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_bind()
2582 if (! tl_get_any_addr(tep, &addr_req)) { in tl_bind()
2583 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_bind()
2590 tep->te_flag |= TL_ADDRHASHED; in tl_bind()
2591 tep->te_hash_hndl = NULL; in tl_bind()
2595 ASSERT(tep->te_alen >= 0); in tl_bind()
2601 basize = sizeof (struct T_bind_ack) + tep->te_alen; in tl_bind()
2604 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_bind()
2609 tl_addr_unbind(tep); in tl_bind()
2610 tep->te_state = TS_UNBND; in tl_bind()
2620 b_ack->ADDR_length = tep->te_alen; in tl_bind()
2623 bcopy(tep->te_abuf, addr_startp, tep->te_alen); in tl_bind()
2625 if (IS_COTS(tep)) { in tl_bind()
2626 tep->te_qlen = qlen; in tl_bind()
2628 tep->te_flag |= TL_LISTENER; in tl_bind()
2631 tep->te_state = NEXTSTATE(TE_BIND_ACK, tep->te_state); in tl_bind()
2644 tep->te_state = save_state; in tl_bind()
2648 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_bind()
2657 tl_unbind(mblk_t *mp, tl_endpt_t *tep) in tl_unbind() argument
2662 if (tep->te_closing) { in tl_unbind()
2667 wq = tep->te_wq; in tl_unbind()
2686 if (tep->te_state != TS_IDLE) { in tl_unbind()
2687 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_unbind()
2690 tep->te_state)); in tl_unbind()
2694 tep->te_state = NEXTSTATE(TE_UNBIND_REQ, tep->te_state); in tl_unbind()
2703 if (! IS_SOCKET(tep) || !IS_CLTS(tep) || tep->te_qlen != 0 || in tl_unbind()
2704 tep->te_magic != SOU_MAGIC_EXPLICIT) { in tl_unbind()
2711 tl_addr_unbind(tep); in tl_unbind()
2714 tep->te_state = NEXTSTATE(TE_OK_ACK1, tep->te_state); in tl_unbind()
2736 tl_endpt_t *tep; in tl_optmgmt() local
2741 tep = (tl_endpt_t *)wq->q_ptr; in tl_optmgmt()
2759 if (!IS_SOCKET(tep) && tep->te_state != TS_IDLE && in tl_optmgmt()
2766 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_optmgmt()
2769 tep->te_state)); in tl_optmgmt()
2805 tl_endpt_t *tep = (tl_endpt_t *)wq->q_ptr; in tl_conn_req() local
2816 ASSERT(IS_COTS(tep)); in tl_conn_req()
2818 if (tep->te_closing) { in tl_conn_req()
2839 if (tep->te_state != TS_IDLE) { in tl_conn_req()
2840 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_conn_req()
2843 tep->te_state)); in tl_conn_req()
2855 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_conn_req()
2868 if (IS_SOCKET(tep)) { in tl_conn_req()
2873 (void) (STRLOG(TL_ID, tep->te_minor, in tl_conn_req()
2883 (void) (STRLOG(TL_ID, tep->te_minor, in tl_conn_req()
2895 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_conn_req()
2905 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_conn_req()
2921 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_conn_req()
2931 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_conn_req()
2944 if (! tl_noclose(tep)) { in tl_conn_req()
2945 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_conn_req()
2952 tep->te_state = NEXTSTATE(TE_CONN_REQ, tep->te_state); in tl_conn_req()
2960 dst.ta_zoneid = tep->te_zoneid; in tl_conn_req()
2965 peer_tep = (IS_SOCKET(tep) ? in tl_conn_req()
2966 tl_sock_find_peer(tep, &ux_addr) : in tl_conn_req()
2967 tl_find_peer(tep, &dst)); in tl_conn_req()
2970 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_conn_req()
2978 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE, in tl_conn_req()
2990 tep->te_state = NEXTSTATE(TE_OK_ACK1, tep->te_state); in tl_conn_req()
2991 tl_ok_ack(tep->te_wq, ackmp, T_CONN_REQ); in tl_conn_req()
2992 tl_closeok(tep); in tl_conn_req()
3003 tep->te_state = TS_IDLE; in tl_conn_req()
3007 putnext(tep->te_rq, dimp); in tl_conn_req()
3019 tl_serializer_refrele(tep->te_ser); in tl_conn_req()
3020 tep->te_ser = peer_tep->te_ser; in tl_conn_req()
3021 ASSERT(tep->te_oconp == NULL); in tl_conn_req()
3022 tep->te_oconp = peer_tep; in tl_conn_req()
3027 tl_closeok(tep); in tl_conn_req()
3036 tl_refhold(tep); in tl_conn_req()
3037 tl_serializer_enter(tep, tl_conn_req_ser, mp); in tl_conn_req()
3044 tl_conn_req_ser(mblk_t *mp, tl_endpt_t *tep) in tl_conn_req_ser() argument
3047 tl_endpt_t *peer_tep = tep->te_oconp; in tl_conn_req_ser()
3062 if (tep->te_closing) { in tl_conn_req_ser()
3063 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3064 tl_serializer_exit(tep); in tl_conn_req_ser()
3065 tl_refrele(tep); in tl_conn_req_ser()
3070 wq = tep->te_wq; in tl_conn_req_ser()
3071 tep->te_flag |= TL_EAGER; in tl_conn_req_ser()
3085 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE | SL_ERROR, in tl_conn_req_ser()
3088 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3091 tl_serializer_exit(tep); in tl_conn_req_ser()
3092 tl_refrele(tep); in tl_conn_req_ser()
3117 ci_msz = sizeof (struct T_conn_ind) + tep->te_alen; in tl_conn_req_ser()
3130 tep->te_state = TS_IDLE; in tl_conn_req_ser()
3133 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3134 tl_serializer_exit(tep); in tl_conn_req_ser()
3135 tl_refrele(tep); in tl_conn_req_ser()
3142 if (IS_SOCKET(tep) && !tl_disable_early_connect) { in tl_conn_req_ser()
3154 tep->te_state = TS_IDLE; in tl_conn_req_ser()
3159 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3160 tl_serializer_exit(tep); in tl_conn_req_ser()
3161 tl_refrele(tep); in tl_conn_req_ser()
3173 tep->te_state = TS_IDLE; in tl_conn_req_ser()
3179 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3180 tl_serializer_exit(tep); in tl_conn_req_ser()
3181 tl_refrele(tep); in tl_conn_req_ser()
3190 tep->te_state = TS_IDLE; in tl_conn_req_ser()
3196 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3197 tl_serializer_exit(tep); in tl_conn_req_ser()
3198 tl_refrele(tep); in tl_conn_req_ser()
3211 tep->te_state = NEXTSTATE(TE_OK_ACK1, tep->te_state); in tl_conn_req_ser()
3229 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_conn_req_ser()
3232 TL_UNCONNECT(tep->te_oconp); in tl_conn_req_ser()
3233 tl_serializer_exit(tep); in tl_conn_req_ser()
3234 tl_refrele(tep); in tl_conn_req_ser()
3247 ci->SRC_length = tep->te_alen; in tl_conn_req_ser()
3248 ci->SEQ_number = tep->te_seqno; in tl_conn_req_ser()
3251 bcopy(tep->te_abuf, addr_startp, tep->te_alen); in tl_conn_req_ser()
3280 tip->ti_tep = tep; in tl_conn_req_ser()
3281 tip->ti_seqno = tep->te_seqno; in tl_conn_req_ser()
3296 tep->te_state = NEXTSTATE(TE_CONN_CON, tep->te_state); in tl_conn_req_ser()
3298 putnext(tep->te_rq, confmp); in tl_conn_req_ser()
3306 ASSERT(tep->te_refcnt >= 2); in tl_conn_req_ser()
3308 tl_serializer_exit(tep); in tl_conn_req_ser()
3324 tl_conn_res(mblk_t *mp, tl_endpt_t *tep) in tl_conn_res() argument
3342 ASSERT(IS_COTS(tep)); in tl_conn_res()
3344 if (tep->te_closing) { in tl_conn_res()
3349 wq = tep->te_wq; in tl_conn_res()
3373 if (tep->te_state != TS_WRES_CIND) { in tl_conn_res()
3374 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_conn_res()
3377 tep->te_state)); in tl_conn_res()
3389 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_conn_res()
3398 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_conn_res()
3409 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_conn_res()
3416 tep->te_state = NEXTSTATE(TE_CONN_RES, tep->te_state); in tl_conn_res()
3417 ASSERT(tep->te_state == TS_WACK_CRES); in tl_conn_res()
3421 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE|SL_ERROR, in tl_conn_res()
3423 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_conn_res()
3432 if (mod_hash_find_cb(tep->te_transport->tr_ai_hash, in tl_conn_res()
3435 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE|SL_ERROR, in tl_conn_res()
3437 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_conn_res()
3447 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE|SL_ERROR, in tl_conn_res()
3449 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_conn_res()
3463 if ((tep != acc_ep) && (acc_ep->te_state != TS_IDLE)) { in tl_conn_res()
3464 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE|SL_ERROR, in tl_conn_res()
3467 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_conn_res()
3480 if ((tep == acc_ep) && (tep->te_nicon > 1)) { in tl_conn_res()
3481 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_conn_res()
3483 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_conn_res()
3497 tip = tl_icon_find(tep, cres->SEQ_number); in tl_conn_res()
3499 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE|SL_ERROR, in tl_conn_res()
3501 tep->te_state = NEXTSTATE(TE_ERROR_ACK, tep->te_state); in tl_conn_res()
3572 (void) (STRLOG(TL_ID, tep->te_minor, 2, SL_TRACE, in tl_conn_res()
3602 tep->te_state = TS_WRES_CIND; in tl_conn_res()
3617 if (tep->te_nicon == 1) { in tl_conn_res()
3618 if (tep == acc_ep) in tl_conn_res()
3619 tep->te_state = NEXTSTATE(TE_OK_ACK2, tep->te_state); in tl_conn_res()
3621 tep->te_state = NEXTSTATE(TE_OK_ACK3, tep->te_state); in tl_conn_res()
3623 tep->te_state = NEXTSTATE(TE_OK_ACK4, tep->te_state); in tl_conn_res()
3637 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_conn_res()
3659 tep->te_state = TS_IDLE; in tl_conn_res()
3674 if (tep != acc_ep) in tl_conn_res()
3689 tl_freetip(tep, tip); in tl_conn_res()
3717 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_conn_res()
3772 ASSERT(cl_ep->te_ser == tep->te_ser); in tl_conn_res()
3807 tl_freetip(tep, tip); in tl_conn_res()
3817 if (! IS_SOCKET(tep)) { in tl_conn_res()
3856 tl_discon_req(mblk_t *mp, tl_endpt_t *tep) in tl_discon_req() argument
3861 tl_endpt_t *peer_tep = tep->te_conp; in tl_discon_req()
3862 tl_endpt_t *srv_tep = tep->te_oconp; in tl_discon_req()
3869 if (tep->te_closing) { in tl_discon_req()
3875 TL_UNCONNECT(tep->te_conp); in tl_discon_req()
3879 TL_UNCONNECT(tep->te_oconp); in tl_discon_req()
3883 wq = tep->te_wq; in tl_discon_req()
3907 save_state = new_state = tep->te_state; in tl_discon_req()
3910 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_discon_req()
3913 tep->te_state)); in tl_discon_req()
3922 new_state = NEXTSTATE(TE_DISCON_REQ, tep->te_state); in tl_discon_req()
3926 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_discon_req()
3928 tep->te_state = NEXTSTATE(TE_ERROR_ACK, new_state); in tl_discon_req()
3938 if (tep->te_nicon > 0) { /* server */ in tl_discon_req()
3943 tip = tl_icon_find(tep, dr->SEQ_number); in tl_discon_req()
3945 (void) (STRLOG(TL_ID, tep->te_minor, 2, in tl_discon_req()
3948 tep->te_state = NEXTSTATE(TE_ERROR_ACK, new_state); in tl_discon_req()
3977 if (tep->te_nicon == 0) in tl_discon_req()
3980 if (tep->te_nicon == 1) in tl_discon_req()
3988 if ((tep->te_nicon <= 1) && in tl_discon_req()
4000 if (tep->te_nicon > 0) { /* listener */ in tl_discon_req()
4006 (void) (STRLOG(TL_ID, tep->te_minor, 2, in tl_discon_req()
4009 tep->te_state = new_state; in tl_discon_req()
4030 tl_freetip(tep, tip); in tl_discon_req()
4031 } else if ((peer_tep = tep->te_oconp) != NULL) { /* client */ in tl_discon_req()
4037 (void) (STRLOG(TL_ID, tep->te_minor, 2, in tl_discon_req()
4040 tep->te_state = new_state; in tl_discon_req()
4048 di->SEQ_number = tep->te_seqno; in tl_discon_req()
4057 if (IS_SOCKET(tep) && !tl_disable_early_connect) { in tl_discon_req()
4064 tl_icon_queuemsg(peer_tep, tep->te_seqno, dimp); in tl_discon_req()
4073 new_state = tep->te_state; in tl_discon_req()
4076 tip = tl_icon_find(peer_tep, tep->te_seqno); in tl_discon_req()
4078 ASSERT(tep == tip->ti_tep); in tl_discon_req()
4090 ASSERT(tep->te_oconp != NULL); in tl_discon_req()
4091 TL_UNCONNECT(tep->te_oconp); in tl_discon_req()
4093 } else if ((peer_tep = tep->te_conp) != NULL) { /* connected! */ in tl_discon_req()
4095 (void) (STRLOG(TL_ID, tep->te_minor, 2, in tl_discon_req()
4098 tep->te_state = new_state; in tl_discon_req()
4109 tep->te_state = new_state; in tl_discon_req()
4115 tep->te_state = new_state; in tl_discon_req()
4144 if (tep->te_conp) { /* disconnect pointers if connected */ in tl_discon_req()
4160 if (! IS_SOCKET(tep)) { in tl_discon_req()
4164 tep->te_wq->q_next = NULL; in tl_discon_req()
4167 TL_UNCONNECT(tep->te_conp); in tl_discon_req()
4172 tl_addr_req_ser(mblk_t *mp, tl_endpt_t *tep) in tl_addr_req_ser() argument
4174 if (!tep->te_closing) in tl_addr_req_ser()
4175 tl_addr_req(mp, tep); in tl_addr_req_ser()
4179 tl_serializer_exit(tep); in tl_addr_req_ser()
4180 tl_refrele(tep); in tl_addr_req_ser()
4184 tl_addr_req(mblk_t *mp, tl_endpt_t *tep) in tl_addr_req() argument
4191 if (tep->te_closing) { in tl_addr_req()
4196 wq = tep->te_wq; in tl_addr_req()
4203 if (IS_CLTS(tep) || in tl_addr_req()
4204 (tep->te_state > TS_WREQ_ORDREL) || in tl_addr_req()
4205 (tep->te_state < TS_DATA_XFER)) { in tl_addr_req()
4211 if (tep->te_state >= TS_IDLE) in tl_addr_req()
4213 ack_sz += tep->te_alen; in tl_addr_req()
4216 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_addr_req()
4231 if (tep->te_state >= TS_IDLE) { in tl_addr_req()
4233 taa->LOCADDR_length = tep->te_alen; in tl_addr_req()
4236 bcopy(tep->te_abuf, ackmp->b_wptr, in tl_addr_req()
4237 tep->te_alen); in tl_addr_req()
4238 ackmp->b_wptr += tep->te_alen; in tl_addr_req()
4244 ASSERT(tep->te_state == TS_DATA_XFER || in tl_addr_req()
4245 tep->te_state == TS_WIND_ORDREL || in tl_addr_req()
4246 tep->te_state == TS_WREQ_ORDREL); in tl_addr_req()
4248 tl_connected_cots_addr_req(mp, tep); in tl_addr_req()
4254 tl_connected_cots_addr_req(mblk_t *mp, tl_endpt_t *tep) in tl_connected_cots_addr_req() argument
4256 tl_endpt_t *peer_tep = tep->te_conp; in tl_connected_cots_addr_req()
4262 if (tep->te_closing) { in tl_connected_cots_addr_req()
4268 tl_error_ack(tep->te_wq, mp, TSYSERR, ECONNRESET, T_ADDR_REQ); in tl_connected_cots_addr_req()
4272 ASSERT(tep->te_state >= TS_IDLE); in tl_connected_cots_addr_req()
4275 ack_sz += T_ALIGN(tep->te_alen); in tl_connected_cots_addr_req()
4280 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_connected_cots_addr_req()
4282 tl_memrecover(tep->te_wq, mp, ack_sz); in tl_connected_cots_addr_req()
4289 taa->LOCADDR_length = tep->te_alen; in tl_connected_cots_addr_req()
4294 bcopy(tep->te_abuf, addr_startp, in tl_connected_cots_addr_req()
4295 tep->te_alen); in tl_connected_cots_addr_req()
4307 putnext(tep->te_rq, ackmp); in tl_connected_cots_addr_req()
4311 tl_copy_info(struct T_info_ack *ia, tl_endpt_t *tep) in tl_copy_info() argument
4313 if (IS_CLTS(tep)) { in tl_copy_info()
4318 if (IS_COTSORD(tep)) in tl_copy_info()
4322 ia->CURRENT_state = tep->te_state; in tl_copy_info()
4330 tl_capability_req(mblk_t *mp, tl_endpt_t *tep) in tl_capability_req() argument
4336 if (tep->te_closing) { in tl_capability_req()
4346 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_capability_req()
4348 tl_memrecover(tep->te_wq, mp, in tl_capability_req()
4357 tl_copy_info(&tcap->INFO_ack, tep); in tl_capability_req()
4362 tcap->ACCEPTOR_id = tep->te_acceptor_id; in tl_capability_req()
4366 putnext(tep->te_rq, ackmp); in tl_capability_req()
4370 tl_info_req_ser(mblk_t *mp, tl_endpt_t *tep) in tl_info_req_ser() argument
4372 if (! tep->te_closing) in tl_info_req_ser()
4373 tl_info_req(mp, tep); in tl_info_req_ser()
4377 tl_serializer_exit(tep); in tl_info_req_ser()
4378 tl_refrele(tep); in tl_info_req_ser()
4382 tl_info_req(mblk_t *mp, tl_endpt_t *tep) in tl_info_req() argument
4389 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_info_req()
4391 tl_memrecover(tep->te_wq, mp, sizeof (struct T_info_ack)); in tl_info_req()
4398 tl_copy_info((struct T_info_ack *)ackmp->b_rptr, tep); in tl_info_req()
4403 putnext(tep->te_rq, ackmp); in tl_info_req()
4411 tl_data(mblk_t *mp, tl_endpt_t *tep) in tl_data() argument
4413 queue_t *wq = tep->te_wq; in tl_data()
4418 boolean_t closing = tep->te_closing; in tl_data()
4420 if (IS_CLTS(tep)) { in tl_data()
4421 (void) (STRLOG(TL_ID, tep->te_minor, 2, in tl_data()
4438 (tep->te_state != TS_DATA_XFER) && in tl_data()
4439 (tep->te_state != TS_WREQ_ORDREL)) { in tl_data()
4447 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_data()
4457 (msz < sizeof (struct T_optdata_req) || !IS_SOCKET(tep))) { in tl_data()
4458 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_data()
4473 switch (tep->te_state) { in tl_data()
4479 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_data()
4485 if (tep->te_conp != NULL) in tl_data()
4488 if (tep->te_oconp == NULL) { in tl_data()
4506 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_data()
4509 TL_PUTBQ(tep, mp); in tl_data()
4523 tl_icon_queuemsg(tep->te_oconp, tep->te_seqno, mp); in tl_data()
4527 if (tep->te_conp == NULL) { in tl_data()
4534 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_data()
4537 tl_discon_ind(tep, 0); in tl_data()
4544 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_data()
4557 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_data()
4560 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE, in tl_data()
4565 ASSERT(tep->te_serializer == peer_tep->te_serializer); in tl_data()
4574 TL_PUTBQ(tep, mp); in tl_data()
4587 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_data()
4612 tl_exdata(mblk_t *mp, tl_endpt_t *tep) in tl_exdata() argument
4614 queue_t *wq = tep->te_wq; in tl_exdata()
4619 boolean_t closing = tep->te_closing; in tl_exdata()
4622 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_exdata()
4638 (tep->te_state != TS_DATA_XFER) && in tl_exdata()
4639 (tep->te_state != TS_WREQ_ORDREL)) { in tl_exdata()
4647 switch (tep->te_state) { in tl_exdata()
4653 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_exdata()
4659 if (tep->te_conp != NULL) in tl_exdata()
4662 if (tep->te_oconp == NULL) { in tl_exdata()
4680 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_exdata()
4683 TL_PUTBQ(tep, mp); in tl_exdata()
4686 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_exdata()
4689 tl_icon_queuemsg(tep->te_oconp, tep->te_seqno, mp); in tl_exdata()
4693 if (tep->te_conp == NULL) { in tl_exdata()
4700 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_exdata()
4703 tl_discon_ind(tep, 0); in tl_exdata()
4709 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_exdata()
4712 tep->te_state)); in tl_exdata()
4724 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_exdata()
4727 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE, in tl_exdata()
4740 TL_PUTBQ(tep, mp); in tl_exdata()
4753 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_exdata()
4776 tl_ordrel(mblk_t *mp, tl_endpt_t *tep) in tl_ordrel() argument
4778 queue_t *wq = tep->te_wq; in tl_ordrel()
4783 boolean_t closing = tep->te_closing; in tl_ordrel()
4786 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_ordrel()
4799 switch (tep->te_state) { in tl_ordrel()
4803 if (tep->te_conp != NULL) in tl_ordrel()
4806 if (tep->te_oconp == NULL) in tl_ordrel()
4819 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_ordrel()
4822 TL_PUTBQ(tep, mp); in tl_ordrel()
4825 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_ordrel()
4828 (void) tl_icon_queuemsg(tep->te_oconp, tep->te_seqno, mp); in tl_ordrel()
4832 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_ordrel()
4835 tep->te_state)); in tl_ordrel()
4843 tep->te_state = NEXTSTATE(TE_ORDREL_REQ, tep->te_state); in tl_ordrel()
4848 if (((peer_tep = tep->te_conp) == NULL) || peer_tep->te_closing) { in tl_ordrel()
4850 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE, in tl_ordrel()
4864 TL_PUTBQ(tep, mp); in tl_ordrel()
4877 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_ordrel()
4888 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE, in tl_ordrel()
4905 tl_endpt_t *tep; in tl_uderr() local
4914 tep = (tl_endpt_t *)wq->q_ptr; in tl_uderr()
4926 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_uderr()
4967 tep->te_state = NEXTSTATE(TE_UDERROR_IND, tep->te_state); in tl_uderr()
4973 tl_unitdata_ser(mblk_t *mp, tl_endpt_t *tep) in tl_unitdata_ser() argument
4975 queue_t *wq = tep->te_wq; in tl_unitdata_ser()
4977 if (!tep->te_closing && (wq->q_first != NULL)) { in tl_unitdata_ser()
4978 TL_PUTQ(tep, mp); in tl_unitdata_ser()
4979 } else if (tep->te_rq != NULL) in tl_unitdata_ser()
4980 tl_unitdata(mp, tep); in tl_unitdata_ser()
4984 tl_serializer_exit(tep); in tl_unitdata_ser()
4985 tl_refrele(tep); in tl_unitdata_ser()
4994 tl_unitdata(mblk_t *mp, tl_endpt_t *tep) in tl_unitdata() argument
4996 queue_t *wq = tep->te_wq; in tl_unitdata()
5015 if (tep->te_state != TS_IDLE) { in tl_unitdata()
5016 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_unitdata()
5033 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_unitdata()
5045 if (IS_SOCKET(tep)) { in tl_unitdata()
5051 (void) (STRLOG(TL_ID, tep->te_minor, in tl_unitdata()
5063 (void) (STRLOG(TL_ID, tep->te_minor, in tl_unitdata()
5079 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_unitdata()
5088 if (alen == 0 || (olen != 0 && !IS_SOCKET(tep))) { in tl_unitdata()
5089 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_unitdata()
5101 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_unitdata()
5110 destaddr.ta_zoneid = tep->te_zoneid; in tl_unitdata()
5117 peer_tep = tep->te_lastep; in tl_unitdata()
5126 peer_tep = (IS_SOCKET(tep) ? in tl_unitdata()
5127 tl_sock_find_peer(tep, &ux_addr) : in tl_unitdata()
5128 tl_find_peer(tep, &destaddr)); in tl_unitdata()
5131 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_unitdata()
5141 if (tep->te_lastep != NULL) in tl_unitdata()
5142 tl_refrele(tep->te_lastep); in tl_unitdata()
5144 tep->te_lastep = peer_tep; in tl_unitdata()
5148 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_unitdata()
5161 if (!canputnext(peer_tep->te_rq) && !(tep->te_closing)) { in tl_unitdata()
5163 if (tep->te_flowq != NULL) { in tl_unitdata()
5164 list_remove(&tep->te_flowq->te_flowlist, tep); in tl_unitdata()
5166 list_insert_head(&peer_tep->te_flowlist, tep); in tl_unitdata()
5167 tep->te_flowq = peer_tep; in tl_unitdata()
5168 TL_PUTBQ(tep, mp); in tl_unitdata()
5199 ui_sz = T_ALIGN(sizeof (struct T_unitdata_ind) + tep->te_alen) + in tl_unitdata()
5205 if (msz >= ui_sz && alen >= tep->te_alen && in tl_unitdata()
5212 udind->SRC_length = tep->te_alen; in tl_unitdata()
5214 bcopy(tep->te_abuf, addr_startp, tep->te_alen); in tl_unitdata()
5221 (void) (STRLOG(TL_ID, tep->te_minor, 4, SL_TRACE, in tl_unitdata()
5235 udind->SRC_length = tep->te_alen; in tl_unitdata()
5237 bcopy(tep->te_abuf, addr_startp, tep->te_alen); in tl_unitdata()
5283 tl_find_peer(tl_endpt_t *tep, tl_addr_t *ap) in tl_find_peer() argument
5286 int rc = mod_hash_find_cb(tep->te_addrhash, (mod_hash_key_t)ap, in tl_find_peer()
5289 ASSERT(! IS_SOCKET(tep)); in tl_find_peer()
5292 ASSERT(ap->ta_zoneid == tep->te_zoneid); 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()
5313 tl_sock_find_peer(tl_endpt_t *tep, soux_addr_t *ux_addr) in tl_sock_find_peer() argument
5317 tep->te_aihash : tep->te_addrhash; in tl_sock_find_peer()
5321 ASSERT(IS_SOCKET(tep)); in tl_sock_find_peer()
5323 IMPLY(rc == 0, (tep->te_transport == peer_tep->te_transport)); in tl_sock_find_peer()
5335 if ((peer_tep->te_zoneid != tep->te_zoneid) && in tl_sock_find_peer()
5363 tl_get_any_addr(tl_endpt_t *tep, tl_addr_t *req) in tl_get_any_addr() argument
5368 ASSERT(tep->te_hash_hndl != NULL); in tl_get_any_addr()
5369 ASSERT(! IS_SOCKET(tep)); in tl_get_any_addr()
5371 if (tep->te_hash_hndl == NULL) in tl_get_any_addr()
5382 ASSERT(tep->te_zoneid == req->ta_zoneid); in tl_get_any_addr()
5385 if (tep->te_alen < alen) { in tl_get_any_addr()
5395 if (tep->te_alen > 0) in tl_get_any_addr()
5396 kmem_free(tep->te_abuf, tep->te_alen); in tl_get_any_addr()
5398 tep->te_alen = alen; in tl_get_any_addr()
5399 tep->te_abuf = abuf; in tl_get_any_addr()
5405 bcopy(req->ta_abuf, tep->te_abuf, (size_t)req->ta_alen); in tl_get_any_addr()
5411 bcopy(&tep->te_minor, tep->te_abuf, sizeof (uint32_t)); in tl_get_any_addr()
5414 if (mod_hash_insert_reserve(tep->te_addrhash, in tl_get_any_addr()
5415 (mod_hash_key_t)&tep->te_ap, (mod_hash_val_t)tep, in tl_get_any_addr()
5416 tep->te_hash_hndl) == 0) { in tl_get_any_addr()
5420 tep->te_flag |= TL_ADDRHASHED; in tl_get_any_addr()
5421 tep->te_hash_hndl = NULL; in tl_get_any_addr()
5428 bcopy(&tep->te_defaddr, tep->te_abuf, sizeof (uint32_t)); in tl_get_any_addr()
5429 atomic_inc_32(&tep->te_defaddr); in tl_get_any_addr()
5455 tl_cl_backenable(tl_endpt_t *tep) in tl_cl_backenable() argument
5457 list_t *l = &tep->te_flowlist; in tl_cl_backenable()
5460 ASSERT(IS_CLTS(tep)); in tl_cl_backenable()
5463 ASSERT(tep->te_ser == elp->te_ser); in tl_cl_backenable()
5464 ASSERT(elp->te_flowq == tep); in tl_cl_backenable()
5476 tl_co_unconnect(tl_endpt_t *tep) in tl_co_unconnect() argument
5478 tl_endpt_t *peer_tep = tep->te_conp; in tl_co_unconnect()
5479 tl_endpt_t *srv_tep = tep->te_oconp; in tl_co_unconnect()
5485 ASSERT(IS_COTS(tep)); in tl_co_unconnect()
5490 TL_UNCONNECT(tep->te_conp); in tl_co_unconnect()
5494 TL_UNCONNECT(tep->te_oconp); in tl_co_unconnect()
5498 if (tep->te_nicon > 0) { in tl_co_unconnect()
5499 l = &tep->te_iconp; in tl_co_unconnect()
5507 while (tep->te_nicon > 0) { in tl_co_unconnect()
5512 tl_freetip(tep, tip); in tl_co_unconnect()
5522 tl_freetip(tep, tip); in tl_co_unconnect()
5533 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_co_unconnect()
5538 tl_freetip(tep, tip); in tl_co_unconnect()
5546 if (IS_SOCKET(tep) && !tl_disable_early_connect && in tl_co_unconnect()
5548 !tl_icon_hasprim(srv_tep, tep->te_seqno, T_ORDREL_IND)) { in tl_co_unconnect()
5558 d_mp = tl_discon_ind_alloc(ECONNRESET, tep->te_seqno); in tl_co_unconnect()
5561 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_co_unconnect()
5564 TL_UNCONNECT(tep->te_oconp); in tl_co_unconnect()
5575 if (IS_SOCKET(tep) && !tl_disable_early_connect) { in tl_co_unconnect()
5579 tl_icon_queuemsg(srv_tep, tep->te_seqno, d_mp); in tl_co_unconnect()
5581 tip = tl_icon_find(srv_tep, tep->te_seqno); in tl_co_unconnect()
5585 ASSERT(tep == tip->ti_tep); in tl_co_unconnect()
5586 ASSERT(tep->te_ser == srv_tep->te_ser); in tl_co_unconnect()
5604 TL_UNCONNECT(tep->te_oconp); in tl_co_unconnect()
5615 ASSERT(tep->te_ser == peer_tep->te_ser); in tl_co_unconnect()
5622 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE, in tl_co_unconnect()
5628 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_co_unconnect()
5655 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_co_unconnect()
5658 tep->te_state)); in tl_co_unconnect()
5661 (void) (STRLOG(TL_ID, tep->te_minor, 3, in tl_co_unconnect()
5663 "tl_co_unconnect: state %d", tep->te_state)); in tl_co_unconnect()
5671 if (tep->te_closing) { in tl_co_unconnect()
5672 peer_tep = tep->te_conp; in tl_co_unconnect()
5674 TL_REMOVE_PEER(tep->te_conp); in tl_co_unconnect()
5685 tl_discon_ind(tl_endpt_t *tep, uint32_t reason) in tl_discon_ind() argument
5689 if (tep->te_closing) in tl_discon_ind()
5695 flushq(tep->te_rq, FLUSHDATA); in tl_discon_ind()
5696 (void) putnextctl1(tep->te_rq, M_FLUSH, FLUSHRW); in tl_discon_ind()
5701 d_mp = tl_discon_ind_alloc(reason, tep->te_seqno); in tl_discon_ind()
5703 (void) (STRLOG(TL_ID, tep->te_minor, 3, SL_TRACE|SL_ERROR, in tl_discon_ind()
5707 tep->te_state = TS_IDLE; in tl_discon_ind()
5708 putnext(tep->te_rq, d_mp); in tl_discon_ind()
5758 tl_icon_find(tl_endpt_t *tep, t_scalar_t seqno) in tl_icon_find() argument
5760 list_t *l = &tep->te_iconp; in tl_icon_find()
5777 tl_icon_queuemsg(tl_endpt_t *tep, t_scalar_t seqno, mblk_t *nmp) in tl_icon_queuemsg() argument
5788 tip = tl_icon_find(tep, seqno); in tl_icon_queuemsg()
5829 tl_icon_hasprim(tl_endpt_t *tep, t_scalar_t seqno, t_scalar_t prim) in tl_icon_hasprim() argument
5831 tl_icon_t *tip = tl_icon_find(tep, seqno); in tl_icon_hasprim()
5849 tl_icon_sendmsgs(tl_endpt_t *tep, mblk_t **mpp) in tl_icon_sendmsgs() argument
5854 if (tep->te_closing) { in tl_icon_sendmsgs()
5859 ASSERT(tep->te_state == TS_DATA_XFER); in tl_icon_sendmsgs()
5860 ASSERT(tep->te_rq->q_first == NULL); in tl_icon_sendmsgs()
5872 putnext(tep->te_rq, mp); in tl_icon_sendmsgs()
5881 putnext(tep->te_rq, mp); in tl_icon_sendmsgs()
5884 tep->te_state = NEXTSTATE(TE_ORDREL_IND, in tl_icon_sendmsgs()
5885 tep->te_state); in tl_icon_sendmsgs()
5886 putnext(tep->te_rq, mp); in tl_icon_sendmsgs()
5889 tep->te_state = TS_IDLE; in tl_icon_sendmsgs()
5890 putnext(tep->te_rq, mp); in tl_icon_sendmsgs()
5931 tl_endpt_t *tep = (tl_endpt_t *)wq->q_ptr; in tl_merror() local
5933 if (tep->te_closing) { in tl_merror()
5938 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_merror()
5940 "tl_merror: tep=%p, err=%d", (void *)tep, error)); in tl_merror()
5947 if (IS_COTS(tep)) { in tl_merror()
5949 tl_co_unconnect(tep); in tl_merror()
5960 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_merror()
5973 (void) putnextctl1(tep->te_rq, M_ERROR, error); in tl_merror()
6031 tl_endpt_t *tep; in tl_get_opt() local
6034 tep = (tl_endpt_t *)wq->q_ptr; in tl_get_opt()
6044 if (! IS_SOCKET(tep)) in tl_get_opt()
6050 *valp = (tep->te_flag & TL_SOCKUCRED) != 0; in tl_get_opt()
6088 tl_endpt_t *tep; in tl_set_opt() local
6090 tep = (tl_endpt_t *)wq->q_ptr; in tl_set_opt()
6100 if (! IS_SOCKET(tep)) { in tl_set_opt()
6115 if (! IS_CLTS(tep)) { in tl_set_opt()
6120 tep->te_flag &= ~TL_SOCKUCRED; in tl_set_opt()
6122 tep->te_flag |= TL_SOCKUCRED; in tl_set_opt()
6140 (void) (STRLOG(TL_ID, tep->te_minor, 1, in tl_set_opt()
6155 tl_endpt_t *tep = (tl_endpt_t *)wq->q_ptr; in tl_timer() local
6157 ASSERT(tep); in tl_timer()
6159 tep->te_timoutid = 0; in tl_timer()
6173 tl_endpt_t *tep = (tl_endpt_t *)wq->q_ptr; in tl_buffer() local
6175 ASSERT(tep); in tl_buffer()
6177 tep->te_bufcid = 0; in tl_buffer()
6178 tep->te_nowsrv = B_FALSE; in tl_buffer()
6191 tl_endpt_t *tep; in tl_memrecover() local
6193 tep = (tl_endpt_t *)wq->q_ptr; in tl_memrecover()
6195 if (tep->te_closing) { in tl_memrecover()
6203 if (tep->te_bufcid || tep->te_timoutid) { in tl_memrecover()
6204 (void) (STRLOG(TL_ID, tep->te_minor, 1, SL_TRACE|SL_ERROR, in tl_memrecover()
6209 if (!(tep->te_bufcid = qbufcall(wq, size, BPRI_MED, tl_buffer, wq))) { in tl_memrecover()
6210 tep->te_timoutid = qtimeout(wq, tl_timer, wq, in tl_memrecover()
6216 tl_freetip(tl_endpt_t *tep, tl_icon_t *tip) in tl_freetip() argument
6228 list_remove(&tep->te_iconp, tip); in tl_freetip()
6230 tep->te_nicon--; in tl_freetip()
6237 tl_addr_unbind(tl_endpt_t *tep) in tl_addr_unbind() argument
6241 if (tep->te_flag & TL_ADDRHASHED) { in tl_addr_unbind()
6242 if (IS_SOCKET(tep)) { in tl_addr_unbind()
6243 (void) mod_hash_remove(tep->te_addrhash, in tl_addr_unbind()
6244 (mod_hash_key_t)tep->te_vp, in tl_addr_unbind()
6246 tep->te_vp = (void *)(uintptr_t)tep->te_minor; in tl_addr_unbind()
6247 tep->te_magic = SOU_MAGIC_IMPLICIT; in tl_addr_unbind()
6249 (void) mod_hash_remove(tep->te_addrhash, in tl_addr_unbind()
6250 (mod_hash_key_t)&tep->te_ap, in tl_addr_unbind()
6252 (void) kmem_free(tep->te_abuf, tep->te_alen); in tl_addr_unbind()
6253 tep->te_alen = -1; in tl_addr_unbind()
6254 tep->te_abuf = NULL; in tl_addr_unbind()
6256 tep->te_flag &= ~TL_ADDRHASHED; in tl_addr_unbind()