2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user or with the express written consent of
8 * Sun Microsystems, Inc.
10 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
12 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 * Sun RPC is provided with no support and without any obligation on the
15 * part of Sun Microsystems, Inc. to assist in its use, correction,
16 * modification or enhancement.
18 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20 * OR ANY PART THEREOF.
22 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23 * or profits or other special, indirect and consequential damages, even if
24 * Sun has been advised of the possibility of such damages.
26 * Sun Microsystems, Inc.
28 * Mountain View, California 94043
32 static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
36 * rpc_main.c, Top level of the RPC protocol compiler.
39 #include <sys/types.h>
40 #include <sys/param.h>
49 #include "rpc_parse.h"
54 int cflag; /* xdr C routines */
55 int hflag; /* header file */
56 int lflag; /* client side stubs */
57 int mflag; /* server side stubs */
58 int nflag; /* netid flag */
59 int sflag; /* server stubs for the given transport */
60 int tflag; /* dispatch Table file */
61 int Ssflag; /* produce server sample code */
62 int Scflag; /* produce client sample code */
63 char *infile; /* input module name */
64 char *outfile; /* output module name */
67 static char * extendfile(char *file, char *ext);
68 static void open_output(char *infile, char *outfile);
69 static void add_warning(void);
70 static void clear_args(void);
71 static void open_input(char *infile, char *define);
72 static int check_nettype(char *name, char **list_to_check);
73 static void c_output(char *infile, char *define, int extend, char *outfile);
74 static void c_initialize(void);
75 static char * generate_guard(char *pathname);
76 static void h_output(char *infile, char *define, int extend, char *outfile);
77 static void s_output(int argc, char **argv, char *infile,
78 char *define, int extend, char *outfile,
79 int nomain, int netflag);
80 static void l_output(char *infile, char *define, int extend, char *outfile);
81 static void t_output(char *infile, char *define, int extend, char *outfile);
82 static void svc_output(char *, char *, int, char *);
83 static void clnt_output(char *, char *, int, char *);
84 static int do_registers(int argc, char **argv);
85 static void addarg(char *cp);
86 static void putarg(int where, char *cp);
87 static void checkfiles(char *infile, char *outfile);
88 static int parseargs(int argc, char **argv, struct commandline *cmd);
89 static void usage(void);
90 static void options_usage(void);
93 extern void write_sample_svc();
94 int write_sample_clnt();
95 void write_sample_clnt_main();
100 #define EXTEND 1 /* alias for TRUE */
101 #define DONT_EXTEND 0 /* alias for FALSE */
103 #define SVR4_CPP "/usr/ccs/lib/cpp"
104 #define SUNOS_CPP "/lib/cpp"
105 static int cppDefined = 0; /* explicit path for C preprocessor */
108 static char *cmdname;
110 static char *svcclosetime = "120";
111 static char *CPP = SVR4_CPP;
112 static char CPPFLAGS[] = "-C";
113 static char pathbuf[MAXPATHLEN + 1];
114 static char *allv[] = {
115 "rpcgen", "-s", "udp", "-s", "tcp",
117 static int allc = sizeof(allv)/sizeof(allv[0]);
118 static char *allnv[] = {
119 "rpcgen", "-s", "netpath",
121 static int allnc = sizeof(allnv)/sizeof(allnv[0]);
124 * machinations for handling expanding argument list
127 static void addarg(); /* add another argument to the list */
128 static void putarg(); /* put argument at specified location */
129 static void clear_args(); /* clear argument list */
130 static void checkfiles(); /* check if out file already exists */
135 #define ARGLISTLEN 20
138 static char *arglist[ARGLISTLEN];
139 static int argcount = FIXEDARGS;
142 int nonfatalerrors; /* errors */
143 int inetdflag/* = 1*/; /* Support for inetd */ /* is now the default */
144 int pmflag; /* Support for port monitors */
145 int logflag; /* Use syslog instead of fprintf for errors */
146 int tblflag; /* Support for dispatch table file */
148 /* length at which to start doing an inline */
151 int Inline = INLINE; /* length at which to start doing an inline. 3 = default
152 * if 0, no xdr_inline code */
154 int indefinitewait; /* If started by port monitors, hang till it wants */
155 int exitnow; /* If started by port monitors, exit after the call */
156 int timerflag; /* TRUE if !indefinite && !exitnow */
157 int newstyle; /* newstyle of passing arguments (by value) */
158 int Cflag = 0 ; /* ANSI C syntax */
159 static int allfiles; /* generate all files */
161 int tirpcflag = 0; /* no tirpc by default */
163 int tirpcflag = 1; /* generating code for tirpc, by default */
167 main(int argc, char **argv)
169 struct commandline cmd;
171 (void) memset((char *) &cmd, 0, sizeof(struct commandline));
173 if (!parseargs(argc, argv, &cmd))
176 if (cmd.cflag || cmd.hflag || cmd.lflag || cmd.tflag || cmd.sflag ||
177 cmd.mflag || cmd.nflag || cmd.Ssflag || cmd.Scflag) {
178 checkfiles(cmd.infile, cmd.outfile);
180 checkfiles(cmd.infile, NULL);
183 c_output(cmd.infile, "-DRPC_XDR", DONT_EXTEND, cmd.outfile);
184 } else if (cmd.hflag) {
185 h_output(cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile);
186 } else if (cmd.lflag) {
187 l_output(cmd.infile, "-DRPC_CLNT", DONT_EXTEND, cmd.outfile);
188 } else if (cmd.sflag || cmd.mflag || (cmd.nflag)) {
189 s_output(argc, argv, cmd.infile, "-DRPC_SVC", DONT_EXTEND,
190 cmd.outfile, cmd.mflag, cmd.nflag);
191 } else if (cmd.tflag) {
192 t_output(cmd.infile, "-DRPC_TBL", DONT_EXTEND, cmd.outfile);
193 } else if (cmd.Ssflag) {
194 svc_output(cmd.infile, "-DRPC_SERVER", DONT_EXTEND, cmd.outfile);
195 } else if (cmd.Scflag) {
196 clnt_output(cmd.infile, "-DRPC_CLIENT", DONT_EXTEND, cmd.outfile);
198 /* the rescans are required, since cpp may effect input */
199 c_output(cmd.infile, "-DRPC_XDR", EXTEND, "_xdr.c");
201 h_output(cmd.infile, "-DRPC_HDR", EXTEND, ".h");
203 l_output(cmd.infile, "-DRPC_CLNT", EXTEND, "_clnt.c");
205 if (inetdflag || !tirpcflag)
206 s_output(allc, allv, cmd.infile, "-DRPC_SVC", EXTEND,
207 "_svc.c", cmd.mflag, cmd.nflag);
209 s_output(allnc, allnv, cmd.infile, "-DRPC_SVC",
210 EXTEND, "_svc.c", cmd.mflag, cmd.nflag);
213 t_output(cmd.infile, "-DRPC_TBL", EXTEND, "_tbl.i");
217 svc_output(cmd.infile, "-DRPC_SERVER", EXTEND, "_server.c");
221 clnt_output(cmd.infile, "-DRPC_CLIENT", EXTEND, "_client.c");
224 exit(nonfatalerrors);
229 * add extension to filename
232 extendfile(char *file, char *ext)
237 res = alloc(strlen(file) + strlen(ext) + 1);
241 p = strrchr(file, '.');
243 p = file + strlen(file);
245 (void) strcpy(res, file);
246 (void) strcpy(res + (p - file), ext);
251 * Open output file with given extension
254 open_output(char *infile, char *outfile)
257 if (outfile == NULL) {
262 if (infile != NULL && streq(outfile, infile)) {
263 f_print(stderr, "%s: output would overwrite %s\n", cmdname,
267 fout = fopen(outfile, "w");
269 f_print(stderr, "%s: unable to open ", cmdname);
273 record_open(outfile);
280 f_print(fout, "/*\n");
281 f_print(fout, " * Please do not edit this file.\n");
282 f_print(fout, " * It was generated using rpcgen.\n");
283 f_print(fout, " */\n\n");
286 /* clear list of arguments */
291 for( i=FIXEDARGS; i<ARGLISTLEN; i++ )
293 argcount = FIXEDARGS;
297 * Open input file with given define for C-preprocessor
300 open_input(char *infile, char *define)
304 infilename = (infile == NULL) ? "<stdin>" : infile;
312 addarg((char *)NULL);
314 (void) dup2(pd[1], 1);
319 execvp("cpp", arglist);
321 execvp(SVR4_CPP, arglist);
323 execvp(SUNOS_CPP, arglist);
332 fin = fdopen(pd[0], "r");
334 f_print(stderr, "%s: ", cmdname);
340 /* valid tirpc nettypes */
341 static char* valid_ti_nettypes[] =
355 /* valid inetd nettypes */
356 static char* valid_i_nettypes[] =
364 check_nettype(char *name, char **list_to_check)
367 for( i = 0; list_to_check[i] != NULL; i++ ) {
368 if( strcmp( name, list_to_check[i] ) == 0 ) {
372 f_print( stderr, "illegal nettype :\'%s\'\n", name );
377 * Compile into an XDR routine output file
381 c_output(char *infile, char *define, int extend, char *outfile)
389 open_input(infile, define);
390 outfilename = extend ? extendfile(infile, outfile) : outfile;
391 open_output(infile, outfilename);
393 if (infile && (include = extendfile(infile, ".h"))) {
394 f_print(fout, "#include \"%s\"\n", include);
396 /* .h file already contains rpc/rpc.h */
398 f_print(fout, "#include <rpc/rpc.h>\n");
400 while ((def = get_definition()) != NULL) {
403 if (extend && tell == ftell(fout)) {
404 (void) unlink(outfilename);
413 /* add all the starting basic types */
416 add_type(1,"int32_t");
421 add_type(1,"u_int32_t");
422 add_type(1,"u_short");
426 char rpcgen_table_dcl[] = "struct rpcgen_table {\n\
428 xdrproc_t xdr_arg;\n\
430 xdrproc_t xdr_res;\n\
436 generate_guard(char *pathname)
438 char* filename, *guard, *tmp;
440 filename = strrchr(pathname, '/' ); /* find last component */
441 filename = ((filename == 0) ? pathname : filename+1);
442 guard = strdup(filename);
443 /* convert to upper case */
447 *tmp = toupper(*tmp);
451 guard = extendfile(guard, "_H_RPCGEN");
456 * Compile into an XDR header file
459 h_output(char *infile, char *define, int extend, char *outfile)
467 open_input(infile, define);
468 outfilename = extend ? extendfile(infile, outfile) : outfile;
469 open_output(infile, outfilename);
471 guard = generate_guard( outfilename ? outfilename: infile );
473 f_print(fout,"#ifndef _%s\n#define _%s\n\n", guard,
476 f_print(fout, "#include <rpc/rpc.h>\n\n");
478 f_print(fout, "#ifndef IXDR_GET_INT32\n");
479 f_print(fout, "#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))\n");
480 f_print(fout, "#endif\n");
481 f_print(fout, "#ifndef IXDR_PUT_INT32\n");
482 f_print(fout, "#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))\n");
483 f_print(fout, "#endif\n");
484 f_print(fout, "#ifndef IXDR_GET_U_INT32\n");
485 f_print(fout, "#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))\n");
486 f_print(fout, "#endif\n");
487 f_print(fout, "#ifndef IXDR_PUT_U_INT32\n");
488 f_print(fout, "#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))\n");
489 f_print(fout, "#endif\n");
492 /* print data definitions */
493 while ((def = get_definition()) != NULL) {
497 /* print function declarations.
498 Do this after data definitions because they might be used as
499 arguments for functions */
500 for (l = defined; l != NULL; l = l->next) {
501 print_funcdef(l->val);
503 if (extend && tell == ftell(fout)) {
504 (void) unlink(outfilename);
505 } else if (tblflag) {
506 f_print(fout, rpcgen_table_dcl);
508 f_print(fout, "\n#endif /* !_%s */\n", guard);
512 * Compile into an RPC service
515 s_output(int argc, char **argv, char *infile, char *define, int extend,
516 char *outfile, int nomain, int netflag)
520 int foundprogram = 0;
523 open_input(infile, define);
524 outfilename = extend ? extendfile(infile, outfile) : outfile;
525 open_output(infile, outfilename);
527 if (infile && (include = extendfile(infile, ".h"))) {
528 f_print(fout, "#include \"%s\"\n", include);
531 f_print(fout, "#include <rpc/rpc.h>\n");
533 f_print(fout, "#include <stdio.h>\n");
534 f_print(fout, "#include <stdlib.h>/* getenv, exit */\n");
536 f_print (fout, "#include <rpc/pmap_clnt.h> /* for pmap_unset */\n");
537 f_print (fout, "#include <string.h> /* strcmp */ \n");
539 if (strcmp(svcclosetime, "-1") == 0)
541 else if (strcmp(svcclosetime, "0") == 0)
543 else if (inetdflag || pmflag) {
544 f_print(fout, "#include <signal.h>\n");
549 if( !tirpcflag && inetdflag )
550 f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
552 if( Cflag && (inetdflag || pmflag ) ) {
553 f_print(fout, "#ifdef __cplusplus\n");
554 f_print(fout, "#include <sysent.h> /* getdtablesize, open */\n");
555 f_print(fout, "#endif /* __cplusplus */\n");
558 f_print(fout, "#include <unistd.h> /* setsid */\n");
561 f_print(fout, "#include <sys/types.h>\n");
563 f_print(fout, "#include <memory.h>\n");
565 f_print(fout, "#include <stropts.h>\n");
567 if (inetdflag || !tirpcflag ) {
568 f_print(fout, "#include <sys/socket.h>\n");
569 f_print(fout, "#include <netinet/in.h>\n");
572 if ( (netflag || pmflag) && tirpcflag ) {
573 f_print(fout, "#include <netconfig.h>\n");
575 if (/*timerflag &&*/ tirpcflag)
576 f_print(fout, "#include <sys/resource.h> /* rlimit */\n");
577 if (logflag || inetdflag || pmflag) {
579 f_print(fout, "#include <syslog.h>\n");
581 f_print(fout, "#ifdef SYSLOG\n");
582 f_print(fout, "#include <syslog.h>\n");
583 f_print(fout, "#else\n");
584 f_print(fout, "#define LOG_ERR 1\n");
585 f_print(fout, "#define openlog(a, b, c)\n");
586 f_print(fout, "#endif\n");
591 f_print(fout, "\n#ifdef __STDC__\n#define SIG_PF void(*)(int)\n#endif\n");
593 f_print(fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n");
595 f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", svcclosetime);
596 while ((def = get_definition()) != NULL) {
597 foundprogram |= (def->def_kind == DEF_PROGRAM);
599 if (extend && !foundprogram) {
600 (void) unlink(outfilename);
603 write_most(infile, netflag, nomain);
605 if( !do_registers(argc, argv) ) {
607 (void) unlink(outfilename);
615 * generate client side stubs
618 l_output(char *infile, char *define, int extend, char *outfile)
622 int foundprogram = 0;
625 open_input(infile, define);
626 outfilename = extend ? extendfile(infile, outfile) : outfile;
627 open_output(infile, outfilename);
630 f_print (fout, "#include <memory.h> /* for memset */\n");
631 if (infile && (include = extendfile(infile, ".h"))) {
632 f_print(fout, "#include \"%s\"\n", include);
635 f_print(fout, "#include <rpc/rpc.h>\n");
636 while ((def = get_definition()) != NULL) {
637 foundprogram |= (def->def_kind == DEF_PROGRAM);
639 if (extend && !foundprogram) {
640 (void) unlink(outfilename);
647 * generate the dispatch table
650 t_output(char *infile, char *define, int extend, char *outfile)
653 int foundprogram = 0;
656 open_input(infile, define);
657 outfilename = extend ? extendfile(infile, outfile) : outfile;
658 open_output(infile, outfilename);
660 while ((def = get_definition()) != NULL) {
661 foundprogram |= (def->def_kind == DEF_PROGRAM);
663 if (extend && !foundprogram) {
664 (void) unlink(outfilename);
670 /* sample routine for the server template */
672 svc_output(char *infile, char *define, int extend, char *outfile)
679 open_input(infile, define);
680 outfilename = extend ? extendfile(infile, outfile) : outfile;
681 checkfiles(infile,outfilename); /*check if outfile already exists.
682 if so, print an error message and exit*/
683 open_output(infile, outfilename);
686 if (infile && (include = extendfile(infile, ".h"))) {
687 f_print(fout, "#include \"%s\"\n", include);
690 f_print(fout, "#include <rpc/rpc.h>\n");
693 while ((def = get_definition()) != NULL) {
694 write_sample_svc(def);
696 if (extend && tell == ftell(fout)) {
697 (void) unlink(outfilename);
702 /* sample main routine for client */
704 clnt_output(char *infile, char *define, int extend, char *outfile)
712 open_input(infile, define);
713 outfilename = extend ? extendfile(infile, outfile) : outfile;
714 checkfiles(infile, outfilename); /*check if outfile already exists.
715 if so, print an error message and exit*/
717 open_output(infile, outfilename);
719 if (infile && (include = extendfile(infile, ".h"))) {
720 f_print(fout, "#include \"%s\"\n", include);
723 f_print(fout, "#include <rpc/rpc.h>\n");
725 while ((def = get_definition()) != NULL) {
726 has_program += write_sample_clnt(def);
730 write_sample_clnt_main();
732 if (extend && tell == ftell(fout)) {
733 (void) unlink(outfilename);
738 * Perform registrations for service output
739 * Return 0 if failed; 1 otherwise.
742 do_registers(int argc, char **argv)
746 if (inetdflag || !tirpcflag) {
747 for (i = 1; i < argc; i++) {
748 if (streq(argv[i], "-s")) {
749 if (!check_nettype(argv[i + 1], valid_i_nettypes))
751 write_inetd_register(argv[i + 1]);
756 for (i = 1; i < argc; i++)
757 if (streq(argv[i], "-s")) {
758 if (!check_nettype(argv[i + 1], valid_ti_nettypes))
760 write_nettype_register(argv[i + 1]);
762 } else if (streq(argv[i], "-n")) {
763 write_netid_register(argv[i + 1]);
771 * Add another argument to the arg list
776 if (argcount >= ARGLISTLEN) {
777 f_print(stderr, "rpcgen: too many defines\n");
781 arglist[argcount++] = cp;
786 putarg(int where, char *cp)
788 if (where >= ARGLISTLEN) {
789 f_print(stderr, "rpcgen: arglist coding error\n");
798 * if input file is stdin and an output file is specified then complain
799 * if the file already exists. Otherwise the file may get overwritten
800 * If input file does not exist, exit with an error
804 checkfiles(char *infile, char *outfile)
809 if(infile) /* infile ! = NULL */
810 if(stat(infile,&buf) < 0)
816 if (stat(outfile, &buf) < 0)
817 return; /* file does not exist */
820 "file '%s' already exists and may be overwritten\n", outfile);
827 * Parse command line arguments
830 parseargs(int argc, char **argv, struct commandline *cmd)
835 char flag[(1 << 8 * sizeof(char))];
839 cmd->infile = cmd->outfile = NULL;
854 for (i = 1; i < argc; i++) {
855 if (argv[i][0] != '-') {
857 f_print( stderr, "Cannot specify more than one input file!\n");
861 cmd->infile = argv[i];
863 for (j = 1; argv[i][j] != 0; j++) {
880 /* sample flag: Ss or Sc.
881 Ss means set flag['S'];
882 Sc means set flag['C']; */
883 c = argv[i][++j]; /* get next char */
896 case 'C': /* ANSI C syntax */
900 case 'b': /* turn TIRPC flag off for
901 generating backward compatible
919 svcclosetime = argv[i];
928 Inline = atoi(argv[i]);
933 if (argv[i][j - 1] != '-' ||
934 argv[i][j + 1] != 0) {
942 if (!streq(argv[i], "udp") &&
943 !streq(argv[i], "tcp")) {
946 } else if (c == 'o') {
950 cmd->outfile = argv[i];
954 if (argv[i][j - 1] != '-') {
957 (void) addarg(argv[i]);
963 (void) strcpy(pathbuf, argv[i]);
964 (void) strcat(pathbuf, "/cpp");
980 cmd->cflag = flag['c'];
981 cmd->hflag = flag['h'];
982 cmd->lflag = flag['l'];
983 cmd->mflag = flag['m'];
984 cmd->nflag = flag['n'];
985 cmd->sflag = flag['s'];
986 cmd->tflag = flag['t'];
987 cmd->Ssflag = flag['S'];
988 cmd->Scflag = flag['C'];
991 pmflag = inetdflag ? 0 : 1; /* pmflag or inetdflag is always TRUE */
992 if( (inetdflag && cmd->nflag)) { /* netid not allowed with inetdflag */
993 f_print(stderr, "Cannot use netid flag with inetd flag!\n");
996 } else { /* 4.1 mode */
997 pmflag = 0; /* set pmflag only in tirpcmode */
998 inetdflag = 1; /* inetdflag is TRUE by default */
999 if( cmd->nflag ) { /* netid needs TIRPC */
1000 f_print( stderr, "Cannot use netid flag without TIRPC!\n");
1005 if( newstyle && ( tblflag || cmd->tflag) ) {
1006 f_print( stderr, "Cannot use table flags with newstyle!\n");
1010 /* check no conflicts with file generation flags */
1011 nflags = cmd->cflag + cmd->hflag + cmd->lflag + cmd->mflag +
1012 cmd->sflag + cmd->nflag + cmd->tflag + cmd->Ssflag + cmd->Scflag;
1015 if (cmd->outfile != NULL || cmd->infile == NULL) {
1018 } else if (nflags > 1) {
1019 f_print( stderr, "Cannot have more than one file generation flag!\n");
1028 f_print(stderr, "usage: %s infile\n", cmdname);
1029 f_print(stderr, "\t%s [-a][-b][-C][-Dname[=value]] -i size [-I [-K seconds]] [-L][-N][-T] infile\n",
1031 f_print(stderr, "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss] [-o outfile] [infile]\n",
1033 f_print(stderr, "\t%s [-s nettype]* [-o outfile] [infile]\n", cmdname);
1034 f_print(stderr, "\t%s [-n netid]* [-o outfile] [infile]\n", cmdname);
1042 f_print(stderr, "options:\n");
1043 f_print(stderr, "-a\t\tgenerate all files, including samples\n");
1044 f_print(stderr, "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n");
1045 f_print(stderr, "-c\t\tgenerate XDR routines\n");
1046 f_print(stderr, "-C\t\tANSI C mode\n");
1047 f_print(stderr, "-Dname[=value]\tdefine a symbol (same as #define)\n");
1048 f_print(stderr, "-h\t\tgenerate header file\n");
1049 f_print(stderr, "-i size\t\tsize at which to start generating inline code\n");
1050 f_print(stderr, "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n");
1051 f_print(stderr, "-K seconds\tserver exits after K seconds of inactivity\n");
1052 f_print(stderr, "-l\t\tgenerate client side stubs\n");
1053 f_print(stderr, "-L\t\tserver errors will be printed to syslog\n");
1054 f_print(stderr, "-m\t\tgenerate server side stubs\n");
1055 f_print(stderr, "-n netid\tgenerate server code that supports named netid\n");
1056 f_print(stderr, "-N\t\tsupports multiple arguments and call-by-value\n");
1057 f_print(stderr, "-o outfile\tname of the output file\n");
1058 f_print(stderr, "-s nettype\tgenerate server code that supports named nettype\n");
1059 f_print(stderr, "-Sc\t\tgenerate sample client code that uses remote procedures\n");
1060 f_print(stderr, "-Ss\t\tgenerate sample server code that defines remote procedures\n");
1061 f_print(stderr, "-t\t\tgenerate RPC dispatch table\n");
1062 f_print(stderr, "-T\t\tgenerate code to support RPC dispatch tables\n");
1063 f_print(stderr, "-Y path\t\tdirectory name to find C preprocessor (cpp)\n");