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 if (sin->sin_family != AF_INET) {
31 note(N_WARNING, "Call to statd from non-AF_INET address");
35 caller = sin->sin_addr;
36 if (caller.s_addr != htonl(INADDR_LOOPBACK)) {
37 note(N_WARNING, "Call to statd from non-local host %s",
42 if (ntohs(sin->sin_port) >= 1024) {
43 note(N_WARNING, "Call to statd-simu-crash from unprivileged port");
47 note (N_WARNING, "*** SIMULATING CRASH! ***");
54 return ((void *)&result);