亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rpcgen.ms

?? RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
?? MS
?? 第 1 頁 / 共 3 頁
字號:
.I FOO_svc.c ..LPNow we're ready to have some fun.  First, copy the server to aremote machine and run it.  For this  example,  themachine is called \*Qmoon\*U.  Server processes are run in thebackground, because they never exit..ie t .DS.el .DS L.ft CWmoon% \fBmsg_server &\fP	       .DEThen on our local machine (\*Qsun\*U) we can print a message on \*Qmoon\*Usconsole..ie t .DS.el .DS L.ft CWsun% \fBprintmsg moon "Hello, moon."\fP.DEThe message will get printed to \*Qmoon\*Us console.  You can print amessage on anybody's console (including your own) with this program ifyou are able to copy the server to their machine and run it..NH 1\&Generating XDR Routines.IX RPC "generating XDR routines".LPThe previous example  only demonstrated  the  automatic generation ofclient  and server RPC  code. .I rpcgen may also  be used to generate XDR routines, that  is,  the routinesnecessary to  convert   local  datastructures into network format and vice-versa.  This example presentsa complete RPC service\(ema remote directory listing service, which uses.I rpcgennot  only  to generate stub routines, but also to  generate  the XDRroutines.  Here is the protocol description file:.ie t .DS.el .DS L.ft I/* * dir.x: Remote directory listing protocol */.ft CWconst MAXNAMELEN = 255;		/* \fImaximum length of a directory entry\fP */typedef string nametype<MAXNAMELEN>;	/* \fIa directory entry\fP */typedef struct namenode *namelist;		/* \fIa link in the listing\fP */.ft I/* * A node in the directory listing */.ft CWstruct namenode {	nametype name;		/* \fIname of directory entry\fP */	namelist next;		/* \fInext entry\fP */};.ft I/* * The result of a READDIR operation. */.ft CWunion readdir_res switch (int errno) {case 0:	namelist list;	/* \fIno error: return directory listing\fP */default:	void;		/* \fIerror occurred: nothing else to return\fP */};.ft I/* * The directory program definition */.ft CWprogram DIRPROG {	version DIRVERS {		readdir_res		READDIR(nametype) = 1;	} = 1;} = 76;.DE.SHNote:.ITypes (like.I readdir_res in the example above) can be defined usingthe \*Qstruct\*U, \*Qunion\*U and \*Qenum\*U keywords, but those keywordsshould not be used in subsequent declarations of variables of those types.For example, if you define a union \*Qfoo\*U, you should declare usingonly \*Qfoo\*U and not \*Qunion foo\*U.  In fact,.I rpcgen compilesRPC unions into C structures and it is an error to declare them using the\*Qunion\*U keyword..LPRunning .I rpcgen on .I dir.x creates four output files.  Three are the same as before: header file,client stub routines and server skeleton.  The fourth are the XDR routinesnecessary for converting the data types we declared into XDR format andvice-versa.  These are output in the file.I dir_xdr.c ..LPHere is the implementation of the.I READDIR procedure..ie t .DS.el .DS L.vs 11.ft I/* * dir_proc.c: remote readdir implementation */.ft CW#include <rpc/rpc.h>#include <sys/dir.h>#include "dir.h"extern int errno;extern char *malloc();extern char *strdup();readdir_res *readdir_1(dirname)	nametype *dirname;{	DIR *dirp;	struct direct *d;	namelist nl;	namelist *nlp;	static readdir_res res; /* \fImust be static\fP! */.ft I	/*	 * Open directory	 */.ft CW	dirp = opendir(*dirname);	if (dirp == NULL) {		res.errno = errno;		return (&res);	}.ft I	/*	 * Free previous result	 */.ft CW	xdr_free(xdr_readdir_res, &res);.ft I	/*	 * Collect directory entries.	 * Memory allocated here will be freed by \fIxdr_free\fP	 * next time \fIreaddir_1\fP is called	 */.ft CW	nlp = &res.readdir_res_u.list;	while (d = readdir(dirp)) {		nl = *nlp = (namenode *) malloc(sizeof(namenode));		nl->name = strdup(d->d_name);		nlp = &nl->next;	}	*nlp = NULL;.ft I	/*	 * Return the result	 */.ft CW	res.errno = 0;	closedir(dirp);	return (&res);}.vs.DEFinally, there is the client side program to call the server:.ie t .DS.el .DS L.ft I/* * rls.c: Remote directory listing client */.ft CW#include <stdio.h>#include <rpc/rpc.h>	/* \fIalways need this\fP */#include "dir.h"		/* \fIwill be generated by rpcgen\fI */extern int errno;main(argc, argv)	int argc;	char *argv[];{	CLIENT *cl;	char *server;	char *dir;	readdir_res *result;	namelist nl;	if (argc != 3) {		fprintf(stderr, "usage: %s host directory\en", 		  argv[0]);		exit(1);	}.ft I	/*	 * Remember what our command line arguments refer to	 */.ft CW	server = argv[1];	dir = argv[2];.ft I	/*	 * Create client "handle" used for calling \fIMESSAGEPROG\fP on the	 * server designated on the command line. We tell the RPC package	 * to use the "tcp" protocol when contacting the server.	 */.ft CW	cl = clnt_create(server, DIRPROG, DIRVERS, "tcp");	if (cl == NULL) {.ft I		/*		 * Couldn't establish connection with server.		 * Print error message and die.		 */.ft CW		clnt_pcreateerror(server);		exit(1);	}.ft I	/*	 * Call the remote procedure \fIreaddir\fP on the server	 */.ft CW	result = readdir_1(&dir, cl);	if (result == NULL) {.ft I		/*		 * An error occurred while calling the server. 	 	 * Print error message and die.		 */.ft CW		clnt_perror(cl, server);		exit(1);	}.ft I	/*	 * Okay, we successfully called the remote procedure.	 */.ft CW	if (result->errno != 0) {.ft I		/*		 * A remote system error occurred.		 * Print error message and die.		 */.ft CW		errno = result->errno;		perror(dir);		exit(1);	}.ft I	/*	 * Successfully got a directory listing.	 * Print it out.	 */.ft CW	for (nl = result->readdir_res_u.list; nl != NULL; 	  nl = nl->next) {		printf("%s\en", nl->name);	}	exit(0);}.DECompile everything, and run..DS.ft CWsun%  \fBrpcgen dir.x\fPsun%  \fBcc rls.c dir_clnt.c dir_xdr.c -o rls\fPsun%  \fBcc dir_svc.c dir_proc.c dir_xdr.c -o dir_svc\fPsun%  \fBdir_svc &\fPmoon%  \fBrls sun /usr/pub\fP\&.\&..asciieqnchargreekkbdmarg8tabclrtabstabs4moon%.DE.LP.IX "debugging with rpcgen" "" "debugging with \fIrpcgen\fP"A final note about .I rpcgen :The client program and the server procedure can be tested together as a single program by simply linking them with each other rather than with the client and server stubs.  The procedure calls will beexecuted as ordinary local procedure calls and the program can be debugged with a local debugger such as .I dbx .When the program is working, the client program can be linked to the client stub produced by .I rpcgen and the server procedures can be linked to the server stub producedby .I rpcgen ..SH.I NOTE :\fIIf you do this, you may want to comment out calls to RPC libraryroutines, and have client-side routines call server routinesdirectly.\fP.LP.NH 1\&The C-Preprocessor.IX rpcgen "C-preprocessor" \fIrpcgen\fP.LPThe C-preprocessor is  run on all input  files before they arecompiled, so all the preprocessor directives are legal within a \*Q.x\*Ufile. Four symbols may be defined, depending upon which output file isgetting generated. The symbols are:.TSbox tab (&);lfI lfIlfL l .Symbol&Usage_RPC_HDR&for header-file outputRPC_XDR&for XDR routine outputRPC_SVC&for server-skeleton outputRPC_CLNT&for client stub output.TE.LPAlso, .I rpcgen does  a little preprocessing   of its own. Any  line thatbegins  with  a percent sign is passed  directly into the output file,without any interpretation of the line.  Here is a simple example thatdemonstrates the preprocessing features..ie t .DS.el .DS L.ft I/* * time.x: Remote time protocol */.ft CWprogram TIMEPROG {        version TIMEVERS {                unsigned int TIMEGET(void) = 1;        } = 1;} = 44;#ifdef RPC_SVC%int *%timeget_1()%{%        static int thetime;%%        thetime = time(0);%        return (&thetime);%}#endif.DEThe '%' feature is not generally recommended, as there is no guaranteethat the compiler will stick the output where you intended..NH 1\&\fBrpcgen\fP Programming Notes.IX rpcgen "other operations" \fIrpcgen\fP.sp .NH 2\&Timeout Changes.IX rpcgen "timeout changes" \fIrpcgen\fP.LPRPC sets a default timeout of 25 seconds for RPC calls when.I clnt_create()is used.  This timeout may be changed using.I clnt_control()Here is a small code fragment to demonstrate use of.I clnt_control ():.IDstruct timeval tv;CLIENT *cl;.sp .5cl = clnt_create("somehost", SOMEPROG, SOMEVERS, "tcp");if (cl == NULL) {	exit(1);}tv.tv_sec = 60;	/* \fIchange timeout to 1 minute\fP */tv.tv_usec = 0;clnt_control(cl, CLSET_TIMEOUT, &tv);	.DE.NH 2\&Handling Broadcast on the Server Side.IX "broadcast RPC".IX rpcgen "broadcast RPC" \fIrpcgen\fP.LPWhen a procedure is known to be called via broadcast RPC,it is usually wise for the server to not reply unless it can providesome useful information to the client.  This prevents the networkfrom getting flooded by useless replies..LPTo prevent the server from replying, a remote procedure canreturn NULL as its result, and the server code generated by.I rpcgen will detect this and not send out a reply..LPHere is an example of a procedure that replies only if itthinks it is an NFS server:.IDvoid *reply_if_nfsserver(){	char notnull;	/* \fIjust here so we can use its address\fP */.sp .5	if (access("/etc/exports", F_OK) < 0) {		return (NULL);	/* \fIprevent RPC from replying\fP */	}.ft I

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合欧美亚洲日本| 国产精品每日更新在线播放网址| 亚洲自拍欧美精品| 1024精品合集| 一区二区三区在线视频免费观看| 久久久久久久综合狠狠综合| 日韩欧美不卡在线观看视频| 欧美一区二区三区的| 欧美一区二区久久久| 日韩一区二区电影| 日韩欧美一区在线观看| 欧美刺激脚交jootjob| 日韩欧美在线观看一区二区三区| 精品少妇一区二区三区在线播放 | 日韩欧美一级二级三级| 欧美高清激情brazzers| 欧美一区二区福利在线| 精品日产卡一卡二卡麻豆| 久久一日本道色综合| 国产精品人成在线观看免费| 日韩美女久久久| 亚洲一区二区精品视频| 蜜乳av一区二区三区| 国产a级毛片一区| 91在线免费播放| 欧美日本在线看| 国产喂奶挤奶一区二区三区| 亚洲嫩草精品久久| 日本女优在线视频一区二区| 国产精品资源在线| 色偷偷久久一区二区三区| 91精品视频网| 国产精品久久久久影院老司| 亚洲午夜免费电影| 精品午夜一区二区三区在线观看| 成人国产精品视频| 日韩一区二区不卡| 亚洲欧美另类久久久精品| 蜜臂av日日欢夜夜爽一区| 91免费版pro下载短视频| 制服丝袜亚洲精品中文字幕| 国产欧美一区二区三区鸳鸯浴| 亚洲午夜久久久久中文字幕久| 国产精品一级黄| 7777精品伊人久久久大香线蕉经典版下载 | 欧美日韩免费不卡视频一区二区三区| 91精品在线免费| 亚洲码国产岛国毛片在线| 老司机午夜精品| 色综合色狠狠天天综合色| 依依成人精品视频| 美日韩黄色大片| 在线观看视频一区| 国产婷婷色一区二区三区四区 | 亚洲少妇30p| 韩国成人在线视频| 欧美日韩精品三区| 中文字幕一区二区5566日韩| 另类欧美日韩国产在线| 欧美精品免费视频| 综合欧美一区二区三区| 成人av资源网站| 久久精品视频一区二区三区| 毛片av中文字幕一区二区| 欧美午夜精品理论片a级按摩| 国产精品国产a级| 国产一区亚洲一区| 337p粉嫩大胆色噜噜噜噜亚洲 | 国产精品亚洲专一区二区三区 | 天天操天天综合网| 在线观看视频欧美| 一区二区日韩av| 在线亚洲一区二区| 亚洲综合一区二区三区| 在线区一区二视频| 亚洲国产婷婷综合在线精品| av午夜一区麻豆| 亚洲精品大片www| 欧美丝袜自拍制服另类| 亚洲一区二区在线视频| 欧美性色欧美a在线播放| 亚洲资源中文字幕| 6080yy午夜一二三区久久| 天天色天天操综合| 日韩欧美的一区| 韩国v欧美v亚洲v日本v| 久久精品夜夜夜夜久久| 成人国产精品视频| 亚洲愉拍自拍另类高清精品| 在线观看不卡一区| 日韩国产欧美视频| 久久综合久久综合亚洲| 国产成人在线视频网址| 国产精品福利影院| 欧美视频中文字幕| 国内精品自线一区二区三区视频| 久久久www免费人成精品| 成人av在线网站| 亚洲一级二级在线| 日韩一级免费一区| 国产·精品毛片| 亚洲一区二区三区视频在线播放| 91精品国产综合久久精品app| 美女国产一区二区三区| 中文字幕乱码亚洲精品一区| 色婷婷综合久久| 久久99国产精品久久99 | 亚洲精品国产视频| 在线电影院国产精品| 国产麻豆视频一区二区| 亚洲女子a中天字幕| 精品日韩在线一区| 色综合久久综合网97色综合| 青椒成人免费视频| 中文字幕第一区| 日韩一卡二卡三卡| 91年精品国产| 国产一区二区影院| 亚洲一区二区三区小说| 久久久久久久av麻豆果冻| 在线国产电影不卡| 成人激情视频网站| 久久se这里有精品| 亚洲国产欧美在线| 久久精品在线观看| 欧美一区二区三区免费观看视频| www.亚洲人| 韩国午夜理伦三级不卡影院| 亚洲高清视频中文字幕| 国产精品国产精品国产专区不片| 欧美一区二区精品久久911| 91九色02白丝porn| 成人精品鲁一区一区二区| 美日韩一区二区三区| 亚洲成人av一区| 亚洲色图丝袜美腿| 国产精品青草久久| 国产欧美日韩精品一区| 欧美变态凌虐bdsm| 日韩一区二区在线观看| 欧美日韩中文另类| 色综合久久综合| a美女胸又www黄视频久久| 国产自产高清不卡| 久久精品久久综合| 日韩精品视频网| 日韩成人dvd| 日韩福利电影在线| 日本最新不卡在线| 日韩国产欧美在线观看| 日韩成人一级片| 日韩黄色片在线观看| 婷婷综合另类小说色区| 香蕉成人啪国产精品视频综合网| 亚洲综合色区另类av| 一区二区三区电影在线播| 亚洲男同性视频| 亚洲国产成人精品视频| 亚洲国产成人av| 日韩在线卡一卡二| 美女性感视频久久| 国内偷窥港台综合视频在线播放| 国产一区啦啦啦在线观看| 韩国一区二区视频| 成人av网在线| 欧美性videosxxxxx| 欧美久久久久久久久| 日韩欧美国产综合一区| ww久久中文字幕| 中文字幕精品一区二区精品绿巨人 | 国产校园另类小说区| 久久精品水蜜桃av综合天堂| 国产精品理伦片| 一区二区三区免费观看| 亚洲国产精品嫩草影院| 久久精品国产免费| 粉嫩绯色av一区二区在线观看| 成人av网站大全| 91精品蜜臀在线一区尤物| 欧美精品一区在线观看| 国产女主播在线一区二区| 最近日韩中文字幕| 爽爽淫人综合网网站| 国产精品一区一区三区| 色屁屁一区二区| 精品国产乱子伦一区| 亚洲免费观看高清在线观看| 免费看精品久久片| 成人app网站| 日韩一区二区在线看片| 国产精品传媒在线| 日韩精品一区第一页| 9l国产精品久久久久麻豆| 欧美丰满美乳xxx高潮www| 日本一区二区成人| 日韩激情在线观看| 色噜噜狠狠成人中文综合| 精品国产精品一区二区夜夜嗨| 亚洲乱码国产乱码精品精小说 | 成人白浆超碰人人人人|