Lines Matching defs:ncu

49  * ncu.c - handles various NCU tasks - intialization/refresh, state machine
58 * Find ncu of specified type for link/interface name.
139 nwamd_ncu_t *ncu;
154 ncu = object->nwamd_object_data;
155 link = &ncu->ncu_link;
159 if (ncu->ncu_type == NWAM_NCU_TYPE_LINK) {
181 nwamd_set_selected_connected(ncu,
195 (ncu->ncu_name);
223 nwamd_unplumb_interface(ncu, AF_INET);
224 nwamd_unplumb_interface(ncu, AF_INET6);
232 ncu);
245 if (ncu->ncu_if.nwamd_if_ipv4)
246 nwamd_plumb_interface(ncu, AF_INET);
248 if (ncu->ncu_if.nwamd_if_ipv6)
249 nwamd_plumb_interface(ncu, AF_INET6);
252 nwamd_configure_interface_addresses(ncu);
266 (void) strlcpy(linkname, ncu->ncu_name, sizeof (linkname));
275 (ncu->ncu_name, NWAM_EVENT_TYPE_WLAN_NEED_CHOICE, B_FALSE,
281 nwamd_set_selected_connected(ncu, B_FALSE, B_FALSE);
302 (ncu->ncu_name, NWAM_EVENT_TYPE_WLAN_NEED_KEY, B_FALSE,
310 (void) strlcpy(linkname, ncu->ncu_name, sizeof (linkname));
317 if (ncu->ncu_type == NWAM_NCU_TYPE_LINK) {
324 nwamd_set_selected_connected(ncu, B_TRUE, up);
335 (ncu->ncu_name,
350 if (!up && ncu->ncu_enabled) {
360 (ncu->ncu_name, B_FALSE);
370 (void) strlcpy(linkname, ncu->ncu_name,
388 if (ncu->ncu_type == NWAM_NCU_TYPE_INTERFACE) {
394 nwamd_add_default_routes(ncu);
427 if (ncu->ncu_type == NWAM_NCU_TYPE_LINK) {
432 nwamd_set_selected_connected(ncu, B_FALSE,
442 nwamd_unplumb_interface(ncu, AF_INET);
443 nwamd_unplumb_interface(ncu, AF_INET6);
454 ncu->ncu_enabled = B_FALSE;
462 if (ncu->ncu_type == NWAM_NCU_TYPE_LINK) {
467 nwamd_set_selected_connected(ncu, B_FALSE,
473 if (ncu->ncu_if.nwamd_if_ipv4) {
474 nwamd_unplumb_interface(ncu, AF_INET);
476 if (ncu->ncu_if.nwamd_if_ipv6) {
477 nwamd_unplumb_interface(ncu, AF_INET6);
490 ncu->ncu_enabled = B_FALSE;
1094 nwamd_ncu_free(nwamd_ncu_t *ncu)
1096 if (ncu != NULL) {
1097 assert(ncu->ncu_type == NWAM_NCU_TYPE_LINK ||
1098 ncu->ncu_type == NWAM_NCU_TYPE_INTERFACE);
1099 if (ncu->ncu_type == NWAM_NCU_TYPE_LINK) {
1100 struct nwamd_link *l = &ncu->ncu_link;
1107 } else if (ncu->ncu_type == NWAM_NCU_TYPE_INTERFACE) {
1110 nifa = ncu->ncu_if.nwamd_if_list;
1120 free(ncu->ncu_name);
1121 free(ncu);
1128 nwamd_ncu_t *ncu = (nwamd_ncu_t *)ncu_obj->nwamd_object_data;
1131 (void *)ncu, ncu_obj->nwamd_object_name,
1146 nwamd_ncu_action(const char *ncu, const char *parent, nwam_action_t action)
1149 (NWAM_OBJECT_TYPE_NCU, ncu, parent, action);
1177 nlog(LOG_ERR, "failed to create link ncu for %s: %s", name,
1186 nlog(LOG_DEBUG, "Retrying addition of phys ncu for %s",
1223 "failed to create automatic link ncu for %s: %s",
1236 nlog(LOG_ERR, "failed to create ip ncu for %s: %s", name,
1254 "failed to create ip ncu for %s: %s", name,
1267 nlog(LOG_ERR, "failed to read automatic ncu %s: %s", name,
1274 nlog(LOG_ERR, "failed to delete automatic ncu %s: %s", name,
1289 nwamd_ncu_t *ncu;
1294 ncu = ncu_obj->nwamd_object_data;
1306 if (ncu->ncu_enabled) {
1609 nwamd_ncu_t *ncu = NULL;
1662 ncu = nwamd_ncu_init(type, name);
1664 ncu = object->nwamd_object_data;
1667 populate_common_ncu_properties(ncuh, ncu);
1668 populate_link_ncu_properties(ncuh, ncu);
1675 ncu = nwamd_ncu_init(type, name);
1676 populate_common_ncu_properties(ncuh, ncu);
1677 populate_ip_ncu_properties(ncuh, ncu);
1680 nlog(LOG_ERR, "unknown ncu type %d", type);
1690 "ncu so create it %s", name);
1692 event->event_object, ncuh, ncu);
1695 "ncu %s", name);
1696 object->nwamd_object_data = ncu;
1730 if (!ncu->ncu_enabled) {
1740 nwamd_link_t *link = &ncu->ncu_link;
1749 if (!ncu->ncu_enabled) {
1791 if (ncu->ncu_link.nwamd_link_media == DL_WIFI) {
1797 (void) nwamd_wlan_scan(ncu->ncu_name);
1856 "ncu %s not found", event->event_object);
1885 "could not find ncu %s", event->event_object);
1891 "ncu %s already online, nothing to do",
1907 "could not find ncu %s", event->event_object);
1913 "ncu %s already disabled, nothing to do",
1945 nwamd_ncu_t *ncu;
1958 ncu = object->nwamd_object_data;
1972 (void) strlcpy(m->nwe_data.nwe_object_state.nwe_parent, ncu->ncu_parent,
2024 is_link = (ncu->ncu_type == NWAM_NCU_TYPE_LINK);
2026 (void) strlcpy(linkname, ncu->ncu_name, sizeof (linkname));
2027 prioritized = (ncu->ncu_type == NWAM_NCU_TYPE_LINK &&
2028 ncu->ncu_link.nwamd_link_activation_mode ==
2030 enabled = ncu->ncu_enabled;