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