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 <afsconfig.h>
11 #include "afs/param.h"
14 #include <sys/types.h>
15 #include <netinet/in.h>
21 #include "rx_globals.h"
25 static short stats
= 0;
31 rx_PrintStats(rx_debugFile
);
35 rx_PrintStats(stdout
);
46 for (i
= 1; i
< argc
; i
++) {
47 if (!strcmp(argv
[i
], "-port")) {
48 port
= atoi(argv
[i
+ 1]);
51 } else if (!strcmp(argv
[i
], "-log")) {
52 rx_debugFile
= fopen("kstest.log", "w");
53 if (rx_debugFile
== NULL
)
54 printf("Couldn't open rx_stest.db");
55 signal(SIGINT
, SigInt
);
56 } else if (!strcmp(argv
[i
], "-stats"))
59 printf("unrecognized switch '%s'\n", argv
[i
]);
69 struct rx_call
*acall
;
74 xdrrx_create(&xdr
, acall
, XDR_DECODE
);
75 xdr_long(&xdr
, &temp
);
77 xdr
.x_op
= XDR_ENCODE
;
78 xdr_long(&xdr
, &temp
);
87 static struct rx_securityClass
*sc
[3]; /* so other kernel procs can reference it */
88 struct rx_service
*tservice
;
91 if (ParseCmd(argc
, argv
) != 0) {
92 printf("erorr parsing commands\n");
97 printf("init failed code %d\n", code
);
100 signal(SIGINT
, SigInt
);
101 printf("back from rx server init\n");
102 sc
[0] = rxnull_NewServerSecurityObject();
104 printf("new secobj created\n");
105 tservice
= rx_NewService(0, 1, "test", sc
, 1 /* 3 */ , rxk_erproc
);
106 printf("service is %x\n", tservice
);
108 printf("failed to create service\n");
111 rx_StartServer(1); /* donate self */