summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.statd
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-07-15 18:51:57 +0000
committeralfred <alfred@FreeBSD.org>2002-07-15 18:51:57 +0000
commit83a53d0868085db818fddd8cb38eecc0c39cad8d (patch)
treea7c706e5ad9f636ce740a033b0fa75319465add7 /usr.sbin/rpc.statd
parent08255d70df400237c666515b55e2726296ded480 (diff)
downloadFreeBSD-src-83a53d0868085db818fddd8cb38eecc0c39cad8d.zip
FreeBSD-src-83a53d0868085db818fddd8cb38eecc0c39cad8d.tar.gz
Port to TI/RPC and/or IPV6.
Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
Diffstat (limited to 'usr.sbin/rpc.statd')
-rw-r--r--usr.sbin/rpc.statd/statd.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c
index b49a428..1a85514 100644
--- a/usr.sbin/rpc.statd/statd.c
+++ b/usr.sbin/rpc.statd/statd.c
@@ -44,7 +44,6 @@ static const char rcsid[] =
#include <stdio.h>
#include <stdlib.h>
#include <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
#include <string.h>
#include <syslog.h>
#include <sys/types.h>
@@ -71,19 +70,12 @@ main(int argc, char **argv)
debug = 1;
}
- (void)pmap_unset(SM_PROG, SM_VERS);
+ (void)rpcb_unset(SM_PROG, SM_VERS, NULL);
- transp = svcudp_create(RPC_ANYSOCK);
- if (transp == NULL)
+ if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "udp"))
errx(1, "cannot create udp service");
- if (!svc_register(transp, SM_PROG, SM_VERS, sm_prog_1, IPPROTO_UDP))
- errx(1, "unable to register (SM_PROG, SM_VERS, udp)");
-
- transp = svctcp_create(RPC_ANYSOCK, 0, 0);
- if (transp == NULL)
+ if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "tcp"))
errx(1, "cannot create tcp service");
- if (!svc_register(transp, SM_PROG, SM_VERS, sm_prog_1, IPPROTO_TCP))
- errx(1, "unable to register (SM_PROG, SM_VERS, tcp)");
init_file("/var/db/statd.status");
/* Note that it is NOT sensible to run this program from inetd - the */
OpenPOWER on IntegriCloud