-
-
-/*
- * Register services.
- */
-void do_regist(u_long prog, void (*sm_prog_1)())
-{
- SVCXPRT *transp;
-
- if ((transp = svcudp_create(RPC_ANYSOCK)) == NULL)
- die("cannot create udp service.");
-
- if (!svc_register(transp, prog, SM_VERS, sm_prog_1, IPPROTO_UDP))
- die("unable to register (SM_PROG, SM_VERS, udp).");
-
- if ((transp = svctcp_create(RPC_ANYSOCK, 0, 0)) == NULL)
- die("cannot create tcp service.");
-
- if (!svc_register(transp, prog, SM_VERS, sm_prog_1, IPPROTO_TCP))
- die("unable to register (SM_PROG, SM_VERS, tcp).");
-}