Lines Matching defs:nsm

677 		struct nlm_nsm nsm;
695 error = nlm_nsm_init(&nsm, &hostp->nh_knc, &hostp->nh_addr);
703 stat = nlm_nsm_stat(&nsm, &sm_state);
708 nlm_nsm_fini(&nsm);
725 nlm_nsm_fini(&nsm);
781 nlm_nsm_init_local(struct nlm_nsm *nsm)
799 return (nlm_nsm_init(nsm, &knc, &nb));
806 nlm_nsm_init(struct nlm_nsm *nsm, struct knetconfig *knc, struct netbuf *nb)
811 bzero(nsm, sizeof (*nsm));
812 nsm->ns_knc = *knc;
813 nlm_copy_netbuf(&nsm->ns_addr, nb);
822 stat = rpcbind_getaddr(&nsm->ns_knc, SM_PROG,
823 SM_VERS, &nsm->ns_addr);
845 error = clnt_tli_kcreate(&nsm->ns_knc, &nsm->ns_addr, SM_PROG, SM_VERS,
846 0, NLM_RPC_RETRIES, kcred, &nsm->ns_handle);
854 error = clnt_tli_kcreate(&nsm->ns_knc, &nsm->ns_addr, NSM_ADDR_PROGRAM,
855 NSM_ADDR_V1, 0, NLM_RPC_RETRIES, kcred, &nsm->ns_addr_handle);
859 sema_init(&nsm->ns_sem, 1, NULL, SEMA_DEFAULT, NULL);
863 kmem_free(nsm->ns_addr.buf, nsm->ns_addr.maxlen);
864 if (nsm->ns_handle)
865 CLNT_DESTROY(nsm->ns_handle);
871 nlm_nsm_fini(struct nlm_nsm *nsm)
873 kmem_free(nsm->ns_addr.buf, nsm->ns_addr.maxlen);
874 CLNT_DESTROY(nsm->ns_addr_handle);
875 nsm->ns_addr_handle = NULL;
876 CLNT_DESTROY(nsm->ns_handle);
877 nsm->ns_handle = NULL;
878 sema_destroy(&nsm->ns_sem);
882 nlm_nsm_simu_crash(struct nlm_nsm *nsm)
886 sema_p(&nsm->ns_sem);
887 nlm_nsm_clnt_init(nsm->ns_handle, nsm);
888 stat = sm_simu_crash_1(NULL, NULL, nsm->ns_handle);
889 sema_v(&nsm->ns_sem);
895 nlm_nsm_stat(struct nlm_nsm *nsm, int32_t *out_stat)
904 sema_p(&nsm->ns_sem);
905 nlm_nsm_clnt_init(nsm->ns_handle, nsm);
906 stat = sm_stat_1(&args, &res, nsm->ns_handle);
907 sema_v(&nsm->ns_sem);
916 nlm_nsm_mon(struct nlm_nsm *nsm, char *hostname, uint16_t priv)
932 sema_p(&nsm->ns_sem);
933 nlm_nsm_clnt_init(nsm->ns_handle, nsm);
934 stat = sm_mon_1(&args, &res, nsm->ns_handle);
935 sema_v(&nsm->ns_sem);
941 nlm_nsm_unmon(struct nlm_nsm *nsm, char *hostname)
956 sema_p(&nsm->ns_sem);
957 nlm_nsm_clnt_init(nsm->ns_handle, nsm);
958 stat = sm_unmon_1(&args, &res, nsm->ns_handle);
959 sema_v(&nsm->ns_sem);
965 nlm_nsmaddr_reg(struct nlm_nsm *nsm, char *name, int family, netobj *address)
975 sema_p(&nsm->ns_sem);
976 nlm_nsm_clnt_init(nsm->ns_addr_handle, nsm);
977 stat = nsmaddrproc1_reg_1(&args, &res, nsm->ns_addr_handle);
978 sema_v(&nsm->ns_sem);
2785 nlm_nsm_clnt_init(CLIENT *clnt, struct nlm_nsm *nsm)
2787 (void) clnt_tli_kinit(clnt, &nsm->ns_knc, &nsm->ns_addr, 0,