2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include "afs/param.h"
11 #include <sys/types.h>
12 #include <netinet/in.h>
18 #include "rx_globals.h"
22 static short stats = 0;
24 void SigInt(int ignore) {
26 rx_PrintStats(rx_debugFile);
29 if (stats) rx_PrintStats(stdout);
34 static ParseCmd(argc, argv)
39 if (!strcmp(argv[i],"-port")) {
40 port = atoi(argv[i+1]);
44 else if (!strcmp(argv[i],"-log")) {
45 rx_debugFile = fopen("kstest.log", "w");
46 if (rx_debugFile == NULL) printf("Couldn't open rx_stest.db");
47 signal(SIGINT, SigInt);
49 else if (!strcmp(argv[i], "-stats")) stats = 1;
51 printf("unrecognized switch '%s'\n", argv[i]);
59 static rxk_erproc (acall)
60 struct rx_call *acall; {
64 xdrrx_create(&xdr, acall, XDR_DECODE);
65 xdr_long(&xdr, &temp);
67 xdr.x_op = XDR_ENCODE;
68 xdr_long(&xdr, &temp);
76 static struct rx_securityClass *sc[3]; /* so other kernel procs can reference it */
77 register struct rx_service *tservice;
80 if (ParseCmd(argc, argv) != 0) {
81 printf("erorr parsing commands\n");
86 printf("init failed code %d\n", code);
89 signal(SIGINT, SigInt);
90 printf("back from rx server init\n");
91 sc[0] = rxnull_NewServerSecurityObject();
93 printf("new secobj created\n");
94 tservice = rx_NewService(0, 1, "test", sc, 1 /* 3 */, rxk_erproc);
95 printf("service is %x\n", tservice);
97 printf("failed to create service\n");
100 rx_StartServer(1); /* donate self */