Lines Matching refs:info
65 net_protocol_register(netid_t id, const net_protocol_t *info) in net_protocol_register() argument
70 ASSERT(info != NULL); in net_protocol_register()
79 new->netd_info = *info; in net_protocol_register()
84 n = net_find(info->netp_name, nts); in net_protocol_register()
103 net_protocol_unregister(net_handle_t info) in net_protocol_unregister() argument
107 ASSERT(info != NULL); in net_protocol_unregister()
109 nts = info->netd_stack; in net_protocol_unregister()
113 LIST_REMOVE(info, netd_list); in net_protocol_unregister()
114 info->netd_stack = NULL; in net_protocol_unregister()
117 (void) net_protocol_release(info); in net_protocol_unregister()
149 net_protocol_release(net_handle_t info) in net_protocol_release() argument
152 ASSERT(info->netd_refcnt > 0); in net_protocol_release()
160 if (atomic_dec_32_nv((uint_t *)&info->netd_refcnt) == 0) { in net_protocol_release()
161 ASSERT(info->netd_hooks == NULL); in net_protocol_release()
162 ASSERT(info->netd_stack == NULL); in net_protocol_release()
163 kmem_free(info, sizeof (struct net_data)); in net_protocol_release()
170 net_protocol_walk(netid_t netid, net_handle_t info) in net_protocol_walk() argument
179 if (info == NULL) in net_protocol_walk()
196 if (n == info) in net_protocol_walk()
200 if (info != NULL) in net_protocol_walk()
201 (void) net_protocol_release(info); in net_protocol_walk()
215 net_getifname(net_handle_t info, phy_if_t nic, char *buffer, in net_getifname() argument
219 ASSERT(info != NULL); in net_getifname()
221 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_getifname()
224 return (info->netd_info.netp_getifname(info, nic, buffer, buflen)); in net_getifname()
228 net_getmtu(net_handle_t info, phy_if_t nic, lif_if_t ifdata) in net_getmtu() argument
231 ASSERT(info != NULL); in net_getmtu()
233 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_getmtu()
236 return (info->netd_info.netp_getmtu(info, nic, ifdata)); in net_getmtu()
240 net_getpmtuenabled(net_handle_t info) in net_getpmtuenabled() argument
243 ASSERT(info != NULL); in net_getpmtuenabled()
245 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_getpmtuenabled()
248 return (info->netd_info.netp_getpmtuenabled(info)); in net_getpmtuenabled()
252 net_getlifaddr(net_handle_t info, phy_if_t nic, lif_if_t ifdata, in net_getlifaddr() argument
256 ASSERT(info != NULL); in net_getlifaddr()
258 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_getlifaddr()
261 return (info->netd_info.netp_getlifaddr(info, nic, ifdata, in net_getlifaddr()
266 net_getlifzone(net_handle_t info, phy_if_t phy_ifdata, lif_if_t ifdata, in net_getlifzone() argument
269 ASSERT(info != NULL); in net_getlifzone()
271 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_getlifzone()
274 return (info->netd_info.neti_getlifzone(info, phy_ifdata, ifdata, in net_getlifzone()
279 net_getlifflags(net_handle_t info, phy_if_t phy_ifdata, lif_if_t ifdata, in net_getlifflags() argument
282 ASSERT(info != NULL); in net_getlifflags()
284 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_getlifflags()
287 return (info->netd_info.neti_getlifflags(info, phy_ifdata, ifdata, in net_getlifflags()
292 net_phygetnext(net_handle_t info, phy_if_t nic) in net_phygetnext() argument
295 ASSERT(info != NULL); in net_phygetnext()
297 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_phygetnext()
300 return (info->netd_info.netp_phygetnext(info, nic)); in net_phygetnext()
304 net_phylookup(net_handle_t info, const char *name) in net_phylookup() argument
307 ASSERT(info != NULL); in net_phylookup()
309 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_phylookup()
312 return (info->netd_info.netp_phylookup(info, name)); in net_phylookup()
316 net_lifgetnext(net_handle_t info, phy_if_t ifidx, lif_if_t ifdata) in net_lifgetnext() argument
319 ASSERT(info != NULL); in net_lifgetnext()
321 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_lifgetnext()
324 return (info->netd_info.netp_lifgetnext(info, ifidx, ifdata)); in net_lifgetnext()
328 net_inject(net_handle_t info, inject_t style, net_inject_t *packet) in net_inject() argument
331 ASSERT(info != NULL); in net_inject()
333 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_inject()
336 return (info->netd_info.netp_inject(info, style, packet)); in net_inject()
340 net_routeto(net_handle_t info, struct sockaddr *address, struct sockaddr *next) in net_routeto() argument
343 ASSERT(info != NULL); in net_routeto()
345 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_routeto()
348 return (info->netd_info.netp_routeto(info, address, next)); in net_routeto()
352 net_ispartialchecksum(net_handle_t info, mblk_t *mp) in net_ispartialchecksum() argument
355 ASSERT(info != NULL); in net_ispartialchecksum()
358 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_ispartialchecksum()
361 return (info->netd_info.netp_ispartialchecksum(info, mp)); in net_ispartialchecksum()
365 net_isvalidchecksum(net_handle_t info, mblk_t *mp) in net_isvalidchecksum() argument
368 ASSERT(info != NULL); in net_isvalidchecksum()
371 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_isvalidchecksum()
374 return (info->netd_info.netp_isvalidchecksum(info, mp)); in net_isvalidchecksum()
402 net_family_register(net_handle_t info, hook_family_t *hf) in net_family_register() argument
406 ASSERT(info != NULL); in net_family_register()
409 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_family_register()
412 if (info->netd_hooks != NULL) in net_family_register()
415 ns = info->netd_stack->nts_netstack; in net_family_register()
418 (void **)&info->netd_hooks) == NULL) in net_family_register()
433 net_family_unregister(net_handle_t info, hook_family_t *hf) in net_family_unregister() argument
437 ASSERT(info != NULL); in net_family_unregister()
440 if (info->netd_hooks == NULL) in net_family_unregister()
443 if (strcmp(info->netd_hooks->hfi_family.hf_name, in net_family_unregister()
447 ret = hook_family_remove(info->netd_hooks); in net_family_unregister()
449 info->netd_hooks = NULL; in net_family_unregister()
455 net_family_shutdown(net_handle_t info, hook_family_t *hf) in net_family_shutdown() argument
458 ASSERT(info != NULL); in net_family_shutdown()
461 if (info->netd_hooks == NULL) in net_family_shutdown()
464 if (strcmp(info->netd_hooks->hfi_family.hf_name, in net_family_shutdown()
468 return (hook_family_shutdown(info->netd_hooks)); in net_family_shutdown()
482 net_event_register(net_handle_t info, hook_event_t *he) in net_event_register() argument
486 ASSERT(info != NULL); in net_event_register()
489 if (info->netd_hooks == NULL || info->netd_condemned != 0 || in net_event_register()
490 info->netd_stack == NULL) in net_event_register()
493 hei = hook_event_add(info->netd_hooks, he); in net_event_register()
506 net_event_unregister(net_handle_t info, hook_event_t *he) in net_event_unregister() argument
509 ASSERT(info != NULL); in net_event_unregister()
512 if (info->netd_hooks == NULL) in net_event_unregister()
515 return (hook_event_remove(info->netd_hooks, he)); in net_event_unregister()
519 net_event_shutdown(net_handle_t info, hook_event_t *he) in net_event_shutdown() argument
522 ASSERT(info != NULL); in net_event_shutdown()
525 if (info->netd_hooks == NULL) in net_event_shutdown()
528 return (hook_event_shutdown(info->netd_hooks, he)); in net_event_shutdown()
541 net_hook_register(net_handle_t info, char *event, hook_t *h) in net_hook_register() argument
544 ASSERT(info != NULL); in net_hook_register()
548 if (info->netd_condemned != 0 || info->netd_stack == NULL) in net_hook_register()
551 if (info->netd_hooks == NULL) in net_hook_register()
554 return (hook_register(info->netd_hooks, event, h)); in net_hook_register()
567 net_hook_unregister(net_handle_t info, char *event, hook_t *h) in net_hook_unregister() argument
570 ASSERT(info != NULL); in net_hook_unregister()
574 if (info->netd_hooks == NULL) in net_hook_unregister()
577 return (hook_unregister(info->netd_hooks, event, h)); in net_hook_unregister()