Lines Matching refs:twp
98 tnrh_walk_t *twp; in tnrh_walk_init() local
100 twp = mdb_alloc(sizeof (*twp), UM_SLEEP); in tnrh_walk_init()
102 if (read_table("tnrhc_table", twp->tnrhc_table, in tnrh_walk_init()
104 mdb_free(twp, sizeof (*twp)); in tnrh_walk_init()
107 if (read_table("tnrhc_table_v6", twp->tnrhc_table_v6, in tnrh_walk_init()
109 free_table(twp->tnrhc_table, TSOL_MASK_TABLE_SIZE); in tnrh_walk_init()
110 mdb_free(twp, sizeof (*twp)); in tnrh_walk_init()
114 twp->hptr = twp->tnrhc_table; in tnrh_walk_init()
115 twp->idx = 0; in tnrh_walk_init()
117 wsp->walk_data = twp; in tnrh_walk_init()
125 tnrh_walk_t *twp = wsp->walk_data; in tnrh_walk_step() local
130 if (*twp->hptr == NULL || twp->idx >= TNRHC_SIZE) { in tnrh_walk_step()
131 twp->hptr++; in tnrh_walk_step()
132 if (twp->hptr == twp->tnrhc_table + in tnrh_walk_step()
134 twp->hptr = twp->tnrhc_table_v6; in tnrh_walk_step()
135 else if (twp->hptr == twp->tnrhc_table_v6 + in tnrh_walk_step()
138 twp->idx = 0; in tnrh_walk_step()
140 wsp->walk_addr = (uintptr_t)(*twp->hptr)[twp->idx++]. in tnrh_walk_step()
160 tnrh_walk_t *twp = wsp->walk_data; in tnrh_walk_fini() local
162 free_table(twp->tnrhc_table, TSOL_MASK_TABLE_SIZE); in tnrh_walk_fini()
163 free_table(twp->tnrhc_table_v6, TSOL_MASK_TABLE_SIZE_V6); in tnrh_walk_fini()
164 mdb_free(twp, sizeof (*twp)); in tnrh_walk_fini()