Lines Matching refs:desc_blk
156 struct ether_desc_blk_str *desc_blk = in ether_del_proto() local
161 if (desc_blk == NULL) { in ether_del_proto()
165 for (current = desc_blk->n_max_used; current > 0; current--) { in ether_del_proto()
166 if (desc_blk->block_ptr[current - 1].protocol_family == in ether_del_proto()
169 desc_blk->block_ptr[current - 1].type = 0; in ether_del_proto()
170 desc_blk->n_used--; in ether_del_proto()
174 if (desc_blk->n_used == 0) { in ether_del_proto()
175 u_int32_t size = desc_blk->n_count * sizeof(struct en_desc) + in ether_del_proto()
181 for (; desc_blk->n_max_used > 0 && in ether_del_proto()
182 desc_blk->block_ptr[desc_blk->n_max_used - 1].type == 0; in ether_del_proto()
183 desc_blk->n_max_used--) { in ether_del_proto()
196 struct ether_desc_blk_str *desc_blk = in ether_add_proto_internal() local
226 if (desc_blk != NULL) { in ether_add_proto_internal()
229 for (i = 0; i < desc_blk->n_max_used; i++) { in ether_add_proto_internal()
230 if (desc_blk->block_ptr[i].type == in ether_add_proto_internal()
232 desc_blk->block_ptr[i].data[0] == in ether_add_proto_internal()
240 for (i = 0; i < desc_blk->n_max_used; i++) { in ether_add_proto_internal()
241 if (desc_blk->block_ptr[i].type == in ether_add_proto_internal()
243 bcmp(desc_blk->block_ptr[i].data, in ether_add_proto_internal()
253 if (desc_blk == NULL || desc_blk->n_used == desc_blk->n_count) { in ether_add_proto_internal()
261 if (desc_blk) { in ether_add_proto_internal()
262 new_count += desc_blk->n_count; in ether_add_proto_internal()
263 old_size = desc_blk->n_count * sizeof(struct en_desc) + in ether_add_proto_internal()
265 i = desc_blk->n_used; in ether_add_proto_internal()
280 if (desc_blk) { in ether_add_proto_internal()
281 bcopy(desc_blk, tmp, old_size); in ether_add_proto_internal()
282 kfree_data(desc_blk, old_size); in ether_add_proto_internal()
284 desc_blk = tmp; in ether_add_proto_internal()
285 ifp->if_family_cookie = (uintptr_t)desc_blk; in ether_add_proto_internal()
286 desc_blk->n_count = new_count; in ether_add_proto_internal()
289 for (i = 0; i < desc_blk->n_count; i++) { in ether_add_proto_internal()
290 if (desc_blk->block_ptr[i].type == 0) { in ether_add_proto_internal()
297 if (i + 1 > desc_blk->n_max_used) { in ether_add_proto_internal()
298 desc_blk->n_max_used = i + 1; in ether_add_proto_internal()
301 ed = &desc_blk->block_ptr[i]; in ether_add_proto_internal()
327 desc_blk->n_used++; in ether_add_proto_internal()
359 struct ether_desc_blk_str *desc_blk = in ether_demux() local
361 u_int32_t maxd = desc_blk ? desc_blk->n_max_used : 0; in ether_demux()
362 struct en_desc *ed = desc_blk ? desc_blk->block_ptr : NULL; in ether_demux()