Lines Matching refs:nsm

639 		struct nlm_nsm nsm;  in nlm_resume_zone()  local
657 error = nlm_nsm_init(&nsm, &hostp->nh_knc, &hostp->nh_addr); in nlm_resume_zone()
665 stat = nlm_nsm_stat(&nsm, &sm_state); in nlm_resume_zone()
670 nlm_nsm_fini(&nsm); in nlm_resume_zone()
687 nlm_nsm_fini(&nsm); in nlm_resume_zone()
743 nlm_nsm_init_local(struct nlm_nsm *nsm) in nlm_nsm_init_local() argument
761 return (nlm_nsm_init(nsm, &knc, &nb)); in nlm_nsm_init_local()
768 nlm_nsm_init(struct nlm_nsm *nsm, struct knetconfig *knc, struct netbuf *nb) in nlm_nsm_init() argument
773 bzero(nsm, sizeof (*nsm)); in nlm_nsm_init()
774 nsm->ns_knc = *knc; in nlm_nsm_init()
775 nlm_copy_netbuf(&nsm->ns_addr, nb); in nlm_nsm_init()
784 stat = rpcbind_getaddr(&nsm->ns_knc, SM_PROG, in nlm_nsm_init()
785 SM_VERS, &nsm->ns_addr); in nlm_nsm_init()
807 error = clnt_tli_kcreate(&nsm->ns_knc, &nsm->ns_addr, SM_PROG, SM_VERS, in nlm_nsm_init()
808 0, NLM_RPC_RETRIES, kcred, &nsm->ns_handle); in nlm_nsm_init()
816 error = clnt_tli_kcreate(&nsm->ns_knc, &nsm->ns_addr, NSM_ADDR_PROGRAM, in nlm_nsm_init()
817 NSM_ADDR_V1, 0, NLM_RPC_RETRIES, kcred, &nsm->ns_addr_handle); in nlm_nsm_init()
821 sema_init(&nsm->ns_sem, 1, NULL, SEMA_DEFAULT, NULL); in nlm_nsm_init()
825 kmem_free(nsm->ns_addr.buf, nsm->ns_addr.maxlen); in nlm_nsm_init()
826 if (nsm->ns_handle) in nlm_nsm_init()
827 CLNT_DESTROY(nsm->ns_handle); in nlm_nsm_init()
833 nlm_nsm_fini(struct nlm_nsm *nsm) in nlm_nsm_fini() argument
835 kmem_free(nsm->ns_addr.buf, nsm->ns_addr.maxlen); in nlm_nsm_fini()
836 CLNT_DESTROY(nsm->ns_addr_handle); in nlm_nsm_fini()
837 nsm->ns_addr_handle = NULL; in nlm_nsm_fini()
838 CLNT_DESTROY(nsm->ns_handle); in nlm_nsm_fini()
839 nsm->ns_handle = NULL; in nlm_nsm_fini()
840 sema_destroy(&nsm->ns_sem); in nlm_nsm_fini()
844 nlm_nsm_simu_crash(struct nlm_nsm *nsm) in nlm_nsm_simu_crash() argument
848 sema_p(&nsm->ns_sem); in nlm_nsm_simu_crash()
849 nlm_nsm_clnt_init(nsm->ns_handle, nsm); in nlm_nsm_simu_crash()
850 stat = sm_simu_crash_1(NULL, NULL, nsm->ns_handle); in nlm_nsm_simu_crash()
851 sema_v(&nsm->ns_sem); in nlm_nsm_simu_crash()
857 nlm_nsm_stat(struct nlm_nsm *nsm, int32_t *out_stat) in nlm_nsm_stat() argument
866 sema_p(&nsm->ns_sem); in nlm_nsm_stat()
867 nlm_nsm_clnt_init(nsm->ns_handle, nsm); in nlm_nsm_stat()
868 stat = sm_stat_1(&args, &res, nsm->ns_handle); in nlm_nsm_stat()
869 sema_v(&nsm->ns_sem); in nlm_nsm_stat()
878 nlm_nsm_mon(struct nlm_nsm *nsm, char *hostname, uint16_t priv) in nlm_nsm_mon() argument
894 sema_p(&nsm->ns_sem); in nlm_nsm_mon()
895 nlm_nsm_clnt_init(nsm->ns_handle, nsm); in nlm_nsm_mon()
896 stat = sm_mon_1(&args, &res, nsm->ns_handle); in nlm_nsm_mon()
897 sema_v(&nsm->ns_sem); in nlm_nsm_mon()
903 nlm_nsm_unmon(struct nlm_nsm *nsm, char *hostname) in nlm_nsm_unmon() argument
918 sema_p(&nsm->ns_sem); in nlm_nsm_unmon()
919 nlm_nsm_clnt_init(nsm->ns_handle, nsm); in nlm_nsm_unmon()
920 stat = sm_unmon_1(&args, &res, nsm->ns_handle); in nlm_nsm_unmon()
921 sema_v(&nsm->ns_sem); in nlm_nsm_unmon()
927 nlm_nsmaddr_reg(struct nlm_nsm *nsm, char *name, int family, netobj *address) in nlm_nsmaddr_reg() argument
937 sema_p(&nsm->ns_sem); in nlm_nsmaddr_reg()
938 nlm_nsm_clnt_init(nsm->ns_addr_handle, nsm); in nlm_nsmaddr_reg()
939 stat = nsmaddrproc1_reg_1(&args, &res, nsm->ns_addr_handle); in nlm_nsmaddr_reg()
940 sema_v(&nsm->ns_sem); in nlm_nsmaddr_reg()
2711 nlm_nsm_clnt_init(CLIENT *clnt, struct nlm_nsm *nsm) in nlm_nsm_clnt_init() argument
2713 (void) clnt_tli_kinit(clnt, &nsm->ns_knc, &nsm->ns_addr, 0, in nlm_nsm_clnt_init()