Lines Matching refs:ncph

162 nwam_ncp_get_name(nwam_ncp_handle_t ncph, char **namep)  in nwam_ncp_get_name()  argument
164 return (nwam_get_name(ncph, namep)); in nwam_ncp_get_name()
342 nwam_ncp_handle_t ncph; in nwam_ncp_copy() local
349 if (nwam_ncp_read(newname, 0, &ncph) == NWAM_SUCCESS) { in nwam_ncp_copy()
350 nwam_ncp_free(ncph); in nwam_ncp_copy()
432 nwam_ncp_enable(nwam_ncp_handle_t ncph) in nwam_ncp_enable() argument
437 assert(ncph != NULL); in nwam_ncp_enable()
439 err = nwam_enable(NULL, ncph); in nwam_ncp_enable()
446 if ((err = nwam_ncp_get_name(ncph, &name)) != NWAM_SUCCESS) in nwam_ncp_enable()
470 nwam_ncp_handle_t ncph; in nwam_walk_ncps() local
512 &ncph)) != NWAM_SUCCESS) { in nwam_walk_ncps()
516 ret = cb(ncph, data); in nwam_walk_ncps()
517 free(ncph); in nwam_walk_ncps()
537 nwam_ncp_get_read_only(nwam_ncp_handle_t ncph, boolean_t *readp) in nwam_ncp_get_read_only() argument
542 assert(ncph != NULL && readp != NULL); in nwam_ncp_get_read_only()
544 if ((err = nwam_ncp_get_name(ncph, &name)) != NWAM_SUCCESS) in nwam_ncp_get_read_only()
561 nwam_ncp_handle_t ncph; in nwam_ncu_get_read_only() local
565 if ((err = nwam_ncu_get_ncp(ncuh, &ncph)) != NWAM_SUCCESS) in nwam_ncu_get_read_only()
568 err = nwam_ncp_get_read_only(ncph, readp); in nwam_ncu_get_read_only()
569 nwam_ncp_free(ncph); in nwam_ncu_get_read_only()
575 nwam_ncp_is_active(nwam_ncp_handle_t ncph) in nwam_ncp_is_active() argument
580 assert(ncph != NULL); in nwam_ncp_is_active()
587 if (nwam_ncp_get_name(ncph, &name) != NWAM_SUCCESS || in nwam_ncp_is_active()
601 nwam_ncp_destroy(nwam_ncp_handle_t ncph, uint64_t flags) in nwam_ncp_destroy() argument
607 assert(ncph != NULL); in nwam_ncp_destroy()
609 if ((err = nwam_ncp_get_read_only(ncph, &read_only)) != NWAM_SUCCESS) in nwam_ncp_destroy()
614 if (nwam_ncp_is_active(ncph)) in nwam_ncp_destroy()
617 if ((err = nwam_ncp_name_to_file(ncph->nwh_name, &filename)) in nwam_ncp_destroy()
621 err = nwam_destroy(filename, ncph, flags); in nwam_ncp_destroy()
690 nwam_ncp_walk_ncus(nwam_ncp_handle_t ncph, in nwam_ncp_walk_ncus() argument
696 assert(ncph != NULL && cb != NULL); in nwam_ncp_walk_ncus()
702 if ((err = nwam_ncp_name_to_file(ncph->nwh_name, &ncpfile)) in nwam_ncp_walk_ncus()
714 nwam_ncp_free(nwam_ncp_handle_t ncph) in nwam_ncp_free() argument
716 nwam_free(ncph); in nwam_ncp_free()
755 nwam_ncu_create(nwam_ncp_handle_t ncph, const char *name, in nwam_ncu_create() argument
765 assert(ncph != NULL && name != NULL && ncuhp != NULL); in nwam_ncu_create()
770 if ((err = nwam_ncp_get_read_only(ncph, &read_only)) != NWAM_SUCCESS) in nwam_ncu_create()
775 if (nwam_ncu_read(ncph, name, type, 0, &ncuh) == NWAM_SUCCESS) { in nwam_ncu_create()
805 (err = nwam_value_create_string(ncph->nwh_name, &parentval)) in nwam_ncu_create()
873 nwam_ncu_read(nwam_ncp_handle_t ncph, const char *name, in nwam_ncu_read() argument
880 assert(ncph != NULL && name != NULL && ncuhp != NULL); in nwam_ncu_read()
882 if ((err = nwam_ncp_name_to_file(ncph->nwh_name, &ncpfile)) in nwam_ncu_read()
896 err_ip = nwam_ncu_read(ncph, name, NWAM_NCU_TYPE_INTERFACE, in nwam_ncu_read()
898 err_link = nwam_ncu_read(ncph, name, NWAM_NCU_TYPE_LINK, in nwam_ncu_read()
994 nwam_ncp_handle_t ncph; in nwam_ncu_copy() local
1014 if ((err = nwam_ncu_get_ncp(oldncuh, &ncph)) != NWAM_SUCCESS) in nwam_ncu_copy()
1016 if (nwam_ncu_read(ncph, newname, type, 0, &ncuh) == NWAM_SUCCESS) { in nwam_ncu_copy()
1018 nwam_ncp_free(ncph); in nwam_ncu_copy()
1021 nwam_ncp_free(ncph); in nwam_ncu_copy()
1085 nwam_ncp_handle_t ncph; in nwam_ncu_set_prop_value() local
1095 err = nwam_ncu_get_ncp(ncuh, &ncph); in nwam_ncu_set_prop_value()
1103 nwam_ncp_free(ncph); in nwam_ncu_set_prop_value()
1681 nwam_ncp_get_state(nwam_ncp_handle_t ncph, nwam_state_t *statep, in nwam_ncp_get_state() argument
1684 return (nwam_get_state(ncph->nwh_name, ncph, statep, auxp)); in nwam_ncp_get_state()
1691 nwam_ncp_handle_t ncph; in nwam_ncu_get_state() local
1697 if ((err = nwam_ncu_get_ncp(ncuh, &ncph)) != NWAM_SUCCESS) in nwam_ncu_get_state()
1699 if (!nwam_ncp_is_active(ncph)) { in nwam_ncu_get_state()
1700 nwam_ncp_free(ncph); in nwam_ncu_get_state()
1703 nwam_ncp_free(ncph); in nwam_ncu_get_state()