2 * Copyright (C) 1995, 1997-1999 Jeffrey A. Uphoff
11 #include <arpa/inet.h>
17 extern void my_svc_exit (void);
21 * Services SM_SIMU_CRASH requests.
24 sm_simu_crash_1_svc (void *argp, struct svc_req *rqstp)
26 struct sockaddr_in *sin = nfs_getrpccaller_in(rqstp->rq_xprt);
27 static char *result = NULL;
28 struct in_addr caller;
30 xlog(D_CALL, "Received SM_SIMU_CRASH");
32 if (sin->sin_family != AF_INET) {
33 xlog_warn("Call to statd from non-AF_INET address");
37 caller = sin->sin_addr;
38 if (caller.s_addr != htonl(INADDR_LOOPBACK)) {
39 xlog_warn("Call to statd from non-local host %s",
44 if (ntohs(sin->sin_port) >= 1024) {
45 xlog_warn("Call to statd-simu-crash from unprivileged port");
49 xlog_warn("*** SIMULATING CRASH! ***");
56 return ((void *)&result);