Lines Matching refs:ncu

97 	nwamd_ncu_t *ncu;  in nwamd_propogate_link_up_down_to_ip()  local
105 ncu = ip_ncu->nwamd_object_data; in nwamd_propogate_link_up_down_to_ip()
107 if (ncu->ncu_enabled) { in nwamd_propogate_link_up_down_to_ip()
223 nwamd_add_default_routes(nwamd_ncu_t *ncu) in nwamd_add_default_routes() argument
225 nwamd_if_t *nif = &ncu->ncu_if; in nwamd_add_default_routes()
244 ncu->ncu_name); in nwamd_add_default_routes()
263 ncu->ncu_name); in nwamd_add_default_routes()
272 find_static_address(const struct sockaddr_storage *addr, const nwamd_ncu_t *ncu) in find_static_address() argument
274 struct nwamd_if_address *nifap, *nifa = ncu->ncu_if.nwamd_if_list; in find_static_address()
299 find_nonstatic_address(const nwamd_ncu_t *ncu, sa_family_t family) in find_nonstatic_address() argument
301 struct nwamd_if_address *nifap, *nifa = ncu->ncu_if.nwamd_if_list; in find_nonstatic_address()
302 const nwamd_if_t *u_if = &ncu->ncu_if; in find_nonstatic_address()
305 (family == AF_INET ? "IPv4" : "IPv6"), ncu->ncu_name); in find_nonstatic_address()
330 const nwamd_ncu_t *ncu) in find_configured_address() argument
332 struct nwamd_if_address *nifap, *nifa = ncu->ncu_if.nwamd_if_list; in find_configured_address()
349 nwamd_static_addresses_configured(nwamd_ncu_t *ncu, sa_family_t family) in nwamd_static_addresses_configured() argument
353 for (n = ncu->ncu_if.nwamd_if_list; n != NULL; n = n->next) { in nwamd_static_addresses_configured()
360 nlog(LOG_DEBUG, "no static addresses configured for %s", ncu->ncu_name); in nwamd_static_addresses_configured()
372 nwamd_dhcp_managing(int protocol, nwamd_ncu_t *ncu) in nwamd_dhcp_managing() argument
380 if ((ipstatus = ipadm_addr_info(ipadm_handle, ncu->ncu_name, &addrinfo, in nwamd_dhcp_managing()
384 ncu->ncu_name, ipadm_status2str(ipstatus)); in nwamd_dhcp_managing()
401 if (find_static_address(&addr, ncu) != NULL) in nwamd_dhcp_managing()
440 nwamd_v4_requested(nwamd_ncu_t *ncu) in nwamd_v4_requested() argument
446 u_if = &ncu->ncu_if; in nwamd_v4_requested()
468 nwamd_v6_requested(nwamd_ncu_t *ncu) in nwamd_v6_requested() argument
474 u_if = &ncu->ncu_if; in nwamd_v6_requested()
499 interface_ncu_up_down(nwamd_ncu_t *ncu, boolean_t up) in interface_ncu_up_down() argument
504 assert(ncu->ncu_type == NWAM_NCU_TYPE_INTERFACE); in interface_ncu_up_down()
512 if (nwamd_v4_requested(ncu)) { in interface_ncu_up_down()
513 if (nwamd_dhcp_managing(AF_INET, ncu) || in interface_ncu_up_down()
514 nwamd_static_addresses_configured(ncu, AF_INET)) in interface_ncu_up_down()
516 } else if (nwamd_v6_requested(ncu)) { in interface_ncu_up_down()
517 if ((nwamd_dhcp_managing(AF_INET6, ncu) || in interface_ncu_up_down()
518 stateless_running(ncu) || in interface_ncu_up_down()
519 nwamd_static_addresses_configured(ncu, AF_INET6))) in interface_ncu_up_down()
523 if (nwam_ncu_name_to_typed_name(ncu->ncu_name, ncu->ncu_type, &name) != in interface_ncu_up_down()
546 interface_ncu_up(nwamd_ncu_t *ncu) in interface_ncu_up() argument
548 interface_ncu_up_down(ncu, B_TRUE); in interface_ncu_up()
552 interface_ncu_down(nwamd_ncu_t *ncu) in interface_ncu_down() argument
554 interface_ncu_up_down(ncu, B_FALSE); in interface_ncu_down()
558 stateless_running(const nwamd_ncu_t *ncu) in stateless_running() argument
565 if ((ipstatus = ipadm_addr_info(ipadm_handle, ncu->ncu_name, &ainfo, in stateless_running()
569 ncu->ncu_name, ipadm_status2str(ipstatus)); in stateless_running()
781 nwamd_configure_interface_addresses(nwamd_ncu_t *ncu) in nwamd_configure_interface_addresses() argument
783 struct nwamd_if_address *nifap, *nifa = ncu->ncu_if.nwamd_if_list; in nwamd_configure_interface_addresses()
787 do_inform = !ncu->ncu_if.nwamd_if_dhcp_requested; in nwamd_configure_interface_addresses()
790 ncu->ncu_name); in nwamd_configure_interface_addresses()
796 nifap->configured = add_ip_address(ncu->ncu_name, nifap, in nwamd_configure_interface_addresses()
810 nwamd_ncu_t *ncu; in nwamd_ncu_handle_if_state_event() local
822 ncu = ncu_obj->nwamd_object_data; in nwamd_ncu_handle_if_state_event()
877 u_if = &ncu->ncu_if; in nwamd_ncu_handle_if_state_event()
901 if (!addrinfo_for_addr(addr, ncu->ncu_name, &ai)) { in nwamd_ncu_handle_if_state_event()
916 nifa = find_nonstatic_address(ncu, family); in nwamd_ncu_handle_if_state_event()
918 nifa = find_static_address(addr, ncu); in nwamd_ncu_handle_if_state_event()
930 addrinfo->ia_atype, ncu->ncu_name); in nwamd_ncu_handle_if_state_event()
960 nifa = find_configured_address(addr, ncu); in nwamd_ncu_handle_if_state_event()
970 if (addrinfo_for_ipaddr(nifa->ipaddr, ncu->ncu_name, in nwamd_ncu_handle_if_state_event()
1039 ncu->ncu_name); in nwamd_ncu_handle_if_state_event()
1042 IPADM_ADDR_DHCP, ncu->ncu_name); in nwamd_ncu_handle_if_state_event()
1057 addrstr, ncu->ncu_name, flags); in nwamd_ncu_handle_if_state_event()
1075 addrstr, ncu->ncu_name); in nwamd_ncu_handle_if_state_event()
1108 addrinfo->ia_atype, ncu->ncu_name); in nwamd_ncu_handle_if_state_event()
1121 interface_ncu_up(ncu); in nwamd_ncu_handle_if_state_event()
1175 ncu->ncu_name); in nwamd_ncu_handle_if_state_event()
1181 interface_ncu_down(ncu); in nwamd_ncu_handle_if_state_event()
1230 unconfigure_addresses(nwamd_ncu_t *ncu, sa_family_t af) in unconfigure_addresses() argument
1232 struct nwamd_if_address *nifap, *nifa = ncu->ncu_if.nwamd_if_list; in unconfigure_addresses()
1257 nwamd_plumb_unplumb_interface(nwamd_ncu_t *ncu, sa_family_t af, boolean_t plumb) in nwamd_plumb_unplumb_interface() argument
1259 char *ifname = ncu->ncu_name; in nwamd_plumb_unplumb_interface()
1260 nwamd_if_t *u_if = &ncu->ncu_if; in nwamd_plumb_unplumb_interface()
1291 unconfigure_addresses(ncu, af); in nwamd_plumb_unplumb_interface()
1305 nwamd_plumb_interface(nwamd_ncu_t *ncu, sa_family_t af) in nwamd_plumb_interface() argument
1313 nwamd_plumb_unplumb_interface(ncu, af, B_TRUE); in nwamd_plumb_interface()
1318 nwamd_unplumb_interface(nwamd_ncu_t *ncu, sa_family_t af) in nwamd_unplumb_interface() argument
1320 nwamd_plumb_unplumb_interface(ncu, af, B_FALSE); in nwamd_unplumb_interface()