Lines Matching refs:desc_blk
157 struct ether_desc_blk_str *desc_blk = in ether_del_proto() local
162 if (desc_blk == NULL) { in ether_del_proto()
166 for (current = desc_blk->n_max_used; current > 0; current--) { in ether_del_proto()
167 if (desc_blk->block_ptr[current - 1].protocol_family == in ether_del_proto()
170 desc_blk->block_ptr[current - 1].type = 0; in ether_del_proto()
171 desc_blk->n_used--; in ether_del_proto()
175 if (desc_blk->n_used == 0) { in ether_del_proto()
176 u_int32_t size = desc_blk->n_count * sizeof(struct en_desc) + in ether_del_proto()
182 for (; desc_blk->n_max_used > 0 && in ether_del_proto()
183 desc_blk->block_ptr[desc_blk->n_max_used - 1].type == 0; in ether_del_proto()
184 desc_blk->n_max_used--) { in ether_del_proto()
197 struct ether_desc_blk_str *desc_blk = in ether_add_proto_internal() local
227 if (desc_blk != NULL) { in ether_add_proto_internal()
230 for (i = 0; i < desc_blk->n_max_used; i++) { in ether_add_proto_internal()
231 if (desc_blk->block_ptr[i].type == in ether_add_proto_internal()
233 desc_blk->block_ptr[i].data[0] == in ether_add_proto_internal()
241 for (i = 0; i < desc_blk->n_max_used; i++) { in ether_add_proto_internal()
242 if (desc_blk->block_ptr[i].type == in ether_add_proto_internal()
244 bcmp(desc_blk->block_ptr[i].data, in ether_add_proto_internal()
254 if (desc_blk == NULL || desc_blk->n_used == desc_blk->n_count) { in ether_add_proto_internal()
262 if (desc_blk) { in ether_add_proto_internal()
263 new_count += desc_blk->n_count; in ether_add_proto_internal()
264 old_size = desc_blk->n_count * sizeof(struct en_desc) + in ether_add_proto_internal()
266 i = desc_blk->n_used; in ether_add_proto_internal()
281 if (desc_blk) { in ether_add_proto_internal()
282 bcopy(desc_blk, tmp, old_size); in ether_add_proto_internal()
283 kfree_data(desc_blk, old_size); in ether_add_proto_internal()
285 desc_blk = tmp; in ether_add_proto_internal()
286 ifp->if_family_cookie = (uintptr_t)desc_blk; in ether_add_proto_internal()
287 desc_blk->n_count = new_count; in ether_add_proto_internal()
290 for (i = 0; i < desc_blk->n_count; i++) { in ether_add_proto_internal()
291 if (desc_blk->block_ptr[i].type == 0) { in ether_add_proto_internal()
298 if (i + 1 > desc_blk->n_max_used) { in ether_add_proto_internal()
299 desc_blk->n_max_used = i + 1; in ether_add_proto_internal()
302 ed = &desc_blk->block_ptr[i]; in ether_add_proto_internal()
328 desc_blk->n_used++; in ether_add_proto_internal()
360 struct ether_desc_blk_str *desc_blk = in ether_demux() local
362 u_int32_t maxd = desc_blk ? desc_blk->n_max_used : 0; in ether_demux()
363 struct en_desc *ed = desc_blk ? desc_blk->block_ptr : NULL; in ether_demux()