Index: src/usr.bin/rpcgen/rpc_clntout.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_clntout.c,v retrieving revision 1.6 diff -u -r1.6 rpc_clntout.c --- src/usr.bin/rpcgen/rpc_clntout.c 22 Mar 2002 01:33:22 -0000 1.6 +++ src/usr.bin/rpcgen/rpc_clntout.c 14 Jul 2002 17:04:23 -0000 @@ -32,7 +32,9 @@ #ident "@(#)rpc_clntout.c 1.15 94/04/25 SMI" #ifndef lint +#if 0 static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI"; +#endif #endif /* Index: src/usr.bin/rpcgen/rpc_cout.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_cout.c,v retrieving revision 1.8 diff -u -r1.8 rpc_cout.c --- src/usr.bin/rpcgen/rpc_cout.c 22 Mar 2002 01:33:22 -0000 1.8 +++ src/usr.bin/rpcgen/rpc_cout.c 14 Jul 2002 17:04:23 -0000 @@ -99,6 +99,7 @@ break; /* DEF_CONST and DEF_PROGRAM have already been handled */ default: + break; } print_trailer(); } @@ -415,6 +416,7 @@ char ptemp[256]; int indent = 1; + cur = NULL; if (flag == PUT) f_print(fout, "\n\tif (xdrs->x_op == XDR_ENCODE) {\n"); else @@ -523,7 +525,7 @@ } } - if (i > 0) + if (i > 0) { if (sizestr == NULL && size < inline){ /* don't expand into inline code if size < inline */ while (cur != dl){ @@ -560,6 +562,7 @@ } f_print(fout, "\t\t}\n"); } + } } static void @@ -691,7 +694,9 @@ f_print(fout, "}\n"); tabify(fout, indent); f_print(fout, "}\n"); + break; default: + break; } } Index: src/usr.bin/rpcgen/rpc_hout.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_hout.c,v retrieving revision 1.6 diff -u -r1.6 rpc_hout.c --- src/usr.bin/rpcgen/rpc_hout.c 22 Mar 2002 01:33:22 -0000 1.6 +++ src/usr.bin/rpcgen/rpc_hout.c 14 Jul 2002 17:04:23 -0000 @@ -31,8 +31,10 @@ #ident "@(#)rpc_hout.c 1.16 94/04/25 SMI" #ifndef lint +#if 0 static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI"; #endif +#endif /* * rpc_hout.c, Header file outputter for the RPC protocol compiler @@ -113,6 +115,7 @@ pprogramdef(def); break; default: + break; } } Index: src/usr.bin/rpcgen/rpc_main.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_main.c,v retrieving revision 1.17 diff -u -r1.17 rpc_main.c --- src/usr.bin/rpcgen/rpc_main.c 22 Mar 2002 01:33:23 -0000 1.17 +++ src/usr.bin/rpcgen/rpc_main.c 14 Jul 2002 17:04:23 -0000 @@ -84,11 +84,7 @@ #define DONT_EXTEND 0 /* alias for FALSE */ #define SVR4_CPP "/usr/ccs/lib/cpp" -#if defined(__FreeBSD__) || defined(__NetBSD__) #define SUNOS_CPP "/usr/bin/cpp" -#else -#define SUNOS_CPP "/usr/lib/cpp" -#endif static int cppDefined = 0; /* explicit path for C preprocessor */ @@ -123,20 +119,14 @@ int nonfatalerrors; /* errors */ -#if defined(__FreeBSD__) || defined(__NetBSD__) -int inetdflag = 0; /* Support for inetd is now the default */ -#else -int inetdflag; /* Support for inetd is now the default */ -#endif -int pmflag; /* Support for port monitors */ +int inetdflag = 0; /* Support for inetd is disabled by default, use -I */ +int pmflag = 0; /* Support for port monitors is disabled by default */ +int tirpc_socket = 1; /* TI-RPC on socket, no TLI library */ int logflag; /* Use syslog instead of fprintf for errors */ int tblflag; /* Support for dispatch table file */ int mtflag = 0; /* Support for MT */ -#if defined(__FreeBSD__) || defined(__NetBSD__) + #define INLINE 0 -#else -#define INLINE 5 -#endif /* length at which to start doing an inline */ int inline = INLINE; @@ -152,11 +142,7 @@ int Cflag = 0; /* ANSI C syntax */ int CCflag = 0; /* C++ files */ static int allfiles; /* generate all files */ -#if defined(__FreeBSD__) || defined(__NetBSD__) -int tirpcflag = 0; /* generating code for tirpc, by default */ -#else int tirpcflag = 1; /* generating code for tirpc, by default */ -#endif xdrfunc *xdrfunc_head = NULL; /* xdr function list */ xdrfunc *xdrfunc_tail = NULL; /* xdr function list */ pid_t childpid; @@ -246,25 +232,18 @@ * add extension to filename */ static char * -#if defined(__FreeBSD__) || defined(__NetBSD__) extendfile(path, ext) char *path; -#else -extendfile(file, ext) - char *file; -#endif char *ext; { char *res; char *p; -#if defined(__FreeBSD__) || defined(__NetBSD__) char *file; if ((file = rindex(path, '/')) == NULL) file = path; else file++; -#endif res = alloc(strlen(file) + strlen(ext) + 1); if (res == NULL) { abort(); @@ -545,14 +524,8 @@ f_print(fout, "#include \n"); - if (mtflag) { -#if !defined(__FreeBSD__) && !defined(__NetBSD__) - f_print(fout, "#include \n"); - f_print(fout, "#include \n"); -#else + if (mtflag) f_print(fout, "#include \n"); -#endif - }; /* put the C++ support */ if (Cflag && !CCflag){ @@ -684,18 +657,14 @@ f_print(fout, "#include /* getdtablesize, open */\n"); f_print(fout, "#endif /* __cplusplus */\n"); - if (tirpcflag) - f_print(fout, "#include /* setsid */\n"); } - if (tirpcflag) + if (tirpcflag) { + f_print(fout, "#include /* open */\n"); + f_print(fout, "#include /* fork / setsid */\n"); f_print(fout, "#include \n"); + } f_print(fout, "#include \n"); -#if defined(__FreeBSD__) || defined(__NetBSD__) -#else - if (tirpcflag) - f_print(fout, "#include \n"); -#endif if (inetdflag || !tirpcflag) { f_print(fout, "#include \n"); f_print(fout, "#include \n"); @@ -706,7 +675,7 @@ } if (tirpcflag) f_print(fout, "#include /* rlimit */\n"); - if (logflag || inetdflag || pmflag) + if (logflag || inetdflag || pmflag || tirpcflag) f_print(fout, "#include \n"); /* for ANSI-C */ @@ -945,13 +914,8 @@ f_print(fout, "\n# Compiler flags \n"); if (mtflag) - f_print(fout, "\nCPPFLAGS += -D_REENTRANT\nCFLAGS += -g \nLDLIBS += -lnsl -lthread\n"); - else -#if defined(__FreeBSD__) || defined(__NetBSD__) - f_print(fout, "\nCFLAGS += -g \nLDLIBS +=\n"); -#else - f_print(fout, "\nCFLAGS += -g \nLDLIBS += -lnsl\n"); -#endif + f_print(fout, "\nCFLAGS += -D_REENTRANT -D_THEAD_SAFE \nLDLIBS += -pthread\n"); + f_print(fout, "RPCGENFLAGS = \n"); f_print(fout, "\n# Targets \n\n"); @@ -965,23 +929,12 @@ f_print(fout, "$(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) \ $(TARGETS_SVC.c) \n\n"); f_print(fout, "$(CLIENT) : $(OBJECTS_CLNT) \n"); -#if defined(__FreeBSD__) || defined(__NetBSD__) f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \ $(LDLIBS) \n\n"); -#else - f_print(fout, "\t$(LINK.c) -o $(CLIENT) $(OBJECTS_CLNT) \ -$(LDLIBS) \n\n"); -#endif f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n"); -#if defined(__FreeBSD__) || defined(__NetBSD__) f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n "); f_print(fout, "clean:\n\t $(RM) -f core $(TARGETS) $(OBJECTS_CLNT) \ $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n"); -#else - f_print(fout, "\t$(LINK.c) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n "); - f_print(fout, "clean:\n\t $(RM) core $(TARGETS) $(OBJECTS_CLNT) \ -$(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n"); -#endif } @@ -1174,11 +1127,7 @@ * generating backward compatible * code */ -#if defined(__FreeBSD__) || defined(__NetBSD__) - tirpcflag = 1; -#else tirpcflag = 0; -#endif break; case 'I': @@ -1190,6 +1139,9 @@ case 'L': logflag = 1; break; + case 'P': + pmflag = 1; + break; case 'K': if (++i == argc) { return (0); @@ -1269,8 +1221,8 @@ cmd->makefileflag = flag['M']; if (tirpcflag) { - pmflag = inetdflag ? 0 : 1; - /* pmflag or inetdflag is always TRUE */ + if (inetdflag) + pmflag = 0; if ((inetdflag && cmd->nflag)) { /* netid not allowed with inetdflag */ warnx("cannot use netid flag with inetd flag"); @@ -1278,9 +1230,6 @@ } } else { /* 4.1 mode */ pmflag = 0; /* set pmflag only in tirpcmode */ -#if !defined(__FreeBSD__) && !defined(__NetBSD__) - inetdflag = 1; /* inetdflag is TRUE by default */ -#endif if (cmd->nflag) { /* netid needs TIRPC */ warnx("cannot use netid flag without TIRPC"); return (0); @@ -1318,7 +1267,7 @@ f_print(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: rpcgen infile", " rpcgen [-abCLNTM] [-Dname[=value]] [-i size]\ -[-I [-K seconds]] [-Y path] infile", +[-I -P [-K seconds]] [-Y path] infile", " rpcgen [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm]\ [-o outfile] [infile]", " rpcgen [-s nettype]* [-o outfile] [infile]", @@ -1332,16 +1281,15 @@ { f_print(stderr, "options:\n"); f_print(stderr, "-a\t\tgenerate all files, including samples\n"); - f_print(stderr, "-b\t\tbackward compatibility mode (generates code\ -for SunOS 4.X)\n"); + f_print(stderr, "-b\t\tbackward compatibility mode (generates code \ +for FreeBSD 4.X)\n"); f_print(stderr, "-c\t\tgenerate XDR routines\n"); f_print(stderr, "-C\t\tANSI C mode\n"); f_print(stderr, "-Dname[=value]\tdefine a symbol (same as #define)\n"); f_print(stderr, "-h\t\tgenerate header file\n"); f_print(stderr, "-i size\t\tsize at which to start generating\ inline code\n"); - f_print(stderr, "-I\t\tgenerate code for inetd support in server\ -(for SunOS 4.X)\n"); + f_print(stderr, "-I\t\tgenerate code for inetd support in server\n"); f_print(stderr, "-K seconds\tserver exits after K seconds of\ inactivity\n"); f_print(stderr, "-l\t\tgenerate client side stubs\n"); @@ -1353,6 +1301,7 @@ f_print(stderr, "-N\t\tsupports multiple arguments and\ call-by-value\n"); f_print(stderr, "-o outfile\tname of the output file\n"); + f_print(stderr, "-P\t\tgenerate code for port monitoring support in server\n"); f_print(stderr, "-s nettype\tgenerate server code that supports named\ nettype\n"); f_print(stderr, "-Sc\t\tgenerate sample client code that uses remote\ @@ -1366,19 +1315,3 @@ f_print(stderr, "-Y path\t\tpath where cpp is found\n"); exit(1); } - -#if !defined(__FreeBSD__) && !defined(__NetBSD__) -char * -rindex(sp, c) - register char *sp, c; -{ - register char *r; - - r = NULL; - do { - if (*sp == c) - r = sp; - } while (*sp++); - return (r); -} -#endif Index: src/usr.bin/rpcgen/rpc_parse.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_parse.c,v retrieving revision 1.8 diff -u -r1.8 rpc_parse.c --- src/usr.bin/rpcgen/rpc_parse.c 22 Mar 2002 01:33:23 -0000 1.8 +++ src/usr.bin/rpcgen/rpc_parse.c 14 Jul 2002 17:04:24 -0000 @@ -31,8 +31,10 @@ #ident "@(#)rpc_parse.c 1.12 93/07/05 SMI" #ifndef lint +#if 0 static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI"; #endif +#endif /* * rpc_parse.c, Parser for the RPC protocol compiler @@ -60,10 +62,6 @@ static void get_type( char **, char **, defkind ); static void unsigned_dec( char ** ); -#ifndef __FreeBSD__ -extern char *strdup(); -#endif - /* * return the next definition you see */ @@ -594,11 +592,7 @@ (void) peekscan(TOK_INT, &tok); break; case TOK_HYPER: -#ifdef __FreeBSD__ *typep = "int64_t"; -#else - *typep = "longlong_t"; -#endif (void) peekscan(TOK_INT, &tok); break; @@ -647,11 +641,7 @@ break; case TOK_HYPER: get_token(&tok); -#ifdef __FreeBSD__ *typep = "u_int64_t"; -#else - *typep = "longlong_t"; -#endif (void) peekscan(TOK_INT, &tok); break; Index: src/usr.bin/rpcgen/rpc_parse.h =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_parse.h,v retrieving revision 1.3 diff -u -r1.3 rpc_parse.h --- src/usr.bin/rpcgen/rpc_parse.h 13 Dec 1995 03:30:54 -0000 1.3 +++ src/usr.bin/rpcgen/rpc_parse.h 14 Jul 2002 17:04:24 -0000 @@ -26,7 +26,7 @@ * 2550 Garcia Avenue * Mountain View, California 94043 */ -#pragma ident "@(#)rpc_parse.h 1.10 94/05/15 SMI" +/* #pragma ident "@(#)rpc_parse.h 1.10 94/05/15 SMI" */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ Index: src/usr.bin/rpcgen/rpc_sample.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_sample.c,v retrieving revision 1.4 diff -u -r1.4 rpc_sample.c --- src/usr.bin/rpcgen/rpc_sample.c 22 Mar 2002 01:33:23 -0000 1.4 +++ src/usr.bin/rpcgen/rpc_sample.c 14 Jul 2002 17:04:24 -0000 @@ -29,7 +29,7 @@ * $FreeBSD: src/usr.bin/rpcgen/rpc_sample.c,v 1.4 2002/03/22 01:33:23 imp Exp $ */ -#pragma ident "@(#)rpc_sample.c 1.9 94/04/25 SMI" +/* #pragma ident "@(#)rpc_sample.c 1.9 94/04/25 SMI" */ /* * rpc_sample.c, Sample client-server code outputter for the RPC protocol compiler Index: src/usr.bin/rpcgen/rpc_scan.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_scan.c,v retrieving revision 1.6 diff -u -r1.6 rpc_scan.c --- src/usr.bin/rpcgen/rpc_scan.c 22 Mar 2002 01:33:23 -0000 1.6 +++ src/usr.bin/rpcgen/rpc_scan.c 14 Jul 2002 17:04:24 -0000 @@ -32,7 +32,9 @@ #ident "@(#)rpc_scan.c 1.13 93/07/05 SMI" #ifndef lint +#if 0 static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI"; +#endif #endif /* Index: src/usr.bin/rpcgen/rpc_scan.h =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_scan.h,v retrieving revision 1.3 diff -u -r1.3 rpc_scan.h --- src/usr.bin/rpcgen/rpc_scan.h 13 Dec 1995 03:30:58 -0000 1.3 +++ src/usr.bin/rpcgen/rpc_scan.h 14 Jul 2002 17:04:24 -0000 @@ -26,7 +26,7 @@ * 2550 Garcia Avenue * Mountain View, California 94043 */ -#pragma ident "@(#)rpc_scan.h 1.11 94/05/15 SMI" +/* #pragma ident "@(#)rpc_scan.h 1.11 94/05/15 SMI" */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ Index: src/usr.bin/rpcgen/rpc_svcout.c =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_svcout.c,v retrieving revision 1.12 diff -u -r1.12 rpc_svcout.c --- src/usr.bin/rpcgen/rpc_svcout.c 9 May 2002 11:24:58 -0000 1.12 +++ src/usr.bin/rpcgen/rpc_svcout.c 14 Jul 2002 17:04:24 -0000 @@ -46,6 +46,8 @@ #include "rpc_parse.h" #include "rpc_util.h" +extern int tirpc_socket; + static char RQSTP[] = "rqstp"; static char TRANSP[] = "transp"; static char ARG[] = "argument"; @@ -109,7 +111,7 @@ var_type = (nomain? "extern" : "static"); f_print(fout, "%s int _rpcpmstart;", var_type); f_print(fout, "\t\t/* Started by a port monitor ? */\n"); - if (!tirpcflag) { + if (!tirpcflag || tirpc_socket) { f_print(fout, "%s int _rpcfdtype;", var_type); f_print(fout, "\n\t\t /* Whether Stream or \ Datagram ? */\n"); @@ -141,7 +143,8 @@ if (nomain) return; - f_print(fout, "\nmain()\n"); + f_print(fout, "\nint\n"); + f_print(fout, "main()\n"); f_print(fout, "{\n"); if (inetdflag) { write_inetmost(infile); @@ -156,15 +159,24 @@ } f_print(fout, "\tpid_t pid;\n"); f_print(fout, "\tint i;\n"); - f_print(fout, "\tchar mname[FMNAMESZ + 1];\n\n"); + if (pmflag) { + if (tirpc_socket) { + f_print(fout, "\tstruct sockaddr_storage saddr;\n"); + f_print(fout, "\tint asize = sizeof (saddr);\n\n"); + } else + f_print(fout, "\tchar mname[FMNAMESZ + 1];\n\n"); + } if (mtflag & timerflag) f_print(fout, "\tmutex_init(&_svcstate_lock, USYNC_THREAD, NULL);\n"); + if (pmflag) { + write_pm_most(infile, netflag); + f_print(fout, "\telse {\n"); + write_rpc_svc_fg(infile, "\t\t"); + f_print(fout, "\t}\n"); + } else + write_rpc_svc_fg(infile, "\t\t"); - write_pm_most(infile, netflag); - f_print(fout, "\telse {\n"); - write_rpc_svc_fg(infile, "\t\t"); - f_print(fout, "\t}\n"); } else { f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); f_print(fout, "\n"); @@ -858,8 +870,15 @@ definition *def; version_list *vp; - f_print(fout, "\tif (!ioctl(0, I_LOOK, mname) &&\n"); - f_print(fout, "\t\t(!strcmp(mname, \"sockmod\") ||"); + if (tirpc_socket) { + f_print(fout, + "\tif (getsockname(0, (struct sockaddr *)&saddr, &asize) == 0) {\n"); + f_print(fout, "\t\tint ssize = sizeof (int);\n"); + } else { + f_print(fout, "\tif (!ioctl(0, I_LOOK, mname) &&\n"); + f_print(fout, "\t\t(!strcmp(mname, \"sockmod\") ||"); + f_print(fout, " !strcmp(mname, \"timod\"))) {\n"); + } f_print(fout, " !strcmp(mname, \"timod\"))) {\n"); f_print(fout, "\t\tchar *netid;\n"); if (!netflag) { /* Not included by -n option */ @@ -873,6 +892,14 @@ * f_print(fout, "\t\textern char *getenv();\n"); */ f_print(fout, "\n"); + if (tirpc_socket) { + f_print(fout, "\t\tif (saddr.ss_family != AF_INET &&\n"); + f_print(fout, "\t\t saddr.ss_family != AF_INET6)\n"); + f_print(fout, "\t\t\texit(1);\n"); + f_print(fout, "\t\tif (getsockopt(0, SOL_SOCKET, SO_TYPE,\n"); + f_print(fout, "\t\t\t\t(char *)&_rpcfdtype, &ssize) == -1)\n"); + f_print(fout, "\t\t\texit(1);\n"); + } f_print(fout, "\t\t_rpcpmstart = 1;\n"); open_log_file(infile, "\t\t"); f_print(fout, "\n\t\tif ((netid = \ @@ -887,23 +914,28 @@ f_print(fout, "\t\t\tif ((nconf = getnetconfigent(netid)) == NULL)\n"); sprintf(_errbuf, "cannot get transport info"); print_err_message("\t\t\t\t"); - if (timerflag) - f_print(fout, "\n\t\t\tpmclose = \ -(t_getstate(0) != T_DATAXFER);\n"); + if (timerflag) { + if (tirpc_socket) + f_print(fout, "\n\t\t\tpmclose = 1;\t/* XXX */\n"); + else + f_print(fout, + "\n\t\t\tpmclose = (t_getstate(0) != T_DATAXFER);\n"); + } f_print(fout, "\t\t}\n"); /* * A kludgy support for inetd services. Inetd only works with * sockmod, and RPC works only with timod, hence all this jugglery */ - f_print(fout, "\t\tif (strcmp(mname, \"sockmod\") == 0) {\n"); - f_print(fout, - "\t\t\tif (ioctl(0, I_POP, 0) || \ -ioctl(0, I_PUSH, \"timod\")) {\n"); - sprintf(_errbuf, "could not get the right module"); - print_err_message("\t\t\t\t"); - f_print(fout, "\t\t\t\texit(1);\n"); - f_print(fout, "\t\t\t}\n"); - f_print(fout, "\t\t}\n"); + if (!tirpc_socket) { + f_print(fout, "\t\tif (strcmp(mname, \"sockmod\") == 0) {\n"); + f_print(fout, "\t\t\tif (ioctl(0, I_POP, 0) || "); + f_print(fout, "ioctl(0, I_PUSH, \"timod\")) {\n"); + sprintf(_errbuf, "could not get the right module"); + print_err_message("\t\t\t\t"); + f_print(fout, "\t\t\t\texit(1);\n"); + f_print(fout, "\t\t\t}\n"); + f_print(fout, "\t\t}\n"); + } f_print(fout, "\t\tif ((%s = svc_tli_create(0, nconf, NULL, 0, 0)) \ == NULL) {\n", Index: src/usr.bin/rpcgen/rpc_util.h =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpc_util.h,v retrieving revision 1.4 diff -u -r1.4 rpc_util.h --- src/usr.bin/rpcgen/rpc_util.h 12 Jul 1996 19:06:00 -0000 1.4 +++ src/usr.bin/rpcgen/rpc_util.h 14 Jul 2002 17:04:24 -0000 @@ -26,7 +26,7 @@ * 2550 Garcia Avenue * Mountain View, California 94043 */ -#pragma ident "@(#)rpc_util.h 1.16 94/05/15 SMI" +/* #pragma ident "@(#)rpc_util.h 1.16 94/05/15 SMI" */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ Index: src/usr.bin/rpcgen/rpcgen.1 =================================================================== RCS file: /home/ncvs/src/usr.bin/rpcgen/rpcgen.1,v retrieving revision 1.17 diff -u -r1.17 rpcgen.1 --- src/usr.bin/rpcgen/rpcgen.1 20 Apr 2002 12:16:37 -0000 1.17 +++ src/usr.bin/rpcgen/rpcgen.1 14 Jul 2002 17:04:24 -0000 @@ -19,7 +19,7 @@ .Fl D Ns Ar name Ns Op Ar =value .Oc .Op Fl i Ar size -.Op Fl I Op Fl K Ar seconds +.Op Fl I Fl P Op Fl K Ar seconds .Op Fl L .Op Fl M .Op Fl N @@ -112,6 +112,9 @@ and the sample makefile to .Pa makefile.proto . .Pp +If option +.Fl I +is set, The server created can be started both by the port monitors (for example, .Xr inetd 8 ) @@ -121,9 +124,9 @@ the file descriptor .Em 0 was passed. -The name of the transport must be specified +The name of the transport may be specified by setting up the environment variable -.Ev PM_TRANSPORT . +.Ev NLSPROVIDER . When the server generated by .Nm is executed, @@ -250,15 +253,6 @@ .Tn RPC code for older versions of the operating system. -.Pp -Note: in -.Fx , -this compatibility flag is turned on by -default since -.Fx -supports only the older -.Tn ONC RPC -library. .It Fl c Compile into .Tn XDR @@ -328,12 +322,12 @@ servers are always logged with .Xr syslog 3 . -.\" .IP -.\" Note: -.\" this option is supported for backward compatibility only. -.\" By default, -.\" .B rpcgen -.\" generates servers that can be invoked through portmonitors. +.Pp +Note: +Contrary to some systems, in +.Fx +this option is needed to generate +servers that can be invoked through portmonitors and inetd. .Pp .It Fl K Ar seconds By default, services created using @@ -422,6 +416,23 @@ and .Fl t modes only). +.It Fl P +Compile support for +port monitors +in the server side stubs. +.Pp +Note: +Contrary to some systems, in +.Fx +this option is needed to generate +servers that can be monitored. +.Pp +If the +.Fl I +option has been specified, +.Fl P +is turned off automatically. +.Pp .It Fl s Ar nettype Compile into server-side stubs for all the transports belonging to the class