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

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

?? rpc.prog.ms

?? 早期freebsd實現
?? MS
?? 第 1 頁 / 共 5 頁
字號:
.\".\" Must use -- tbl and pic -- with this one.\".\" @(#)rpc.prog.ms	2.3 88/08/11 4.0 RPCSRC.de BT.if \\n%=1 .tl ''- % -''...IX "Network Programming" "" "" "" PAGE MAJOR.nr OF 0.ND.\" prevent excess underlining in nroff.if n .fp 2 R.OH 'Remote Procedure Call Programming Guide''Page %'.EH 'Page %''Remote Procedure Call Programming Guide'.SH\&Remote Procedure Call Programming Guide.nr OF 1.IX "RPC Programming Guide".LPThis document assumes a working knowledge of network theory.  It isintended for programmers who wish to write network applications usingremote procedure calls (explained below), and who want to understandthe RPC mechanisms usually hidden by the.I rpcgen(1) protocol compiler..I rpcgen is described in detail in the previous chapter, the.I "\fBrpcgen\fP \fIProgramming Guide\fP"..SHNote:.I.IX rpcgen "" \fIrpcgen\fPBefore attempting to write a network application, or to convert anexisting non-network application to run over the network, you may want tounderstand the material in this chapter.  However, for most applications,you can circumvent the need to cope with the details presented here by using.I rpcgen .The.I "Generating XDR Routines"section of that chapter contains the complete source for a working RPCservice\(ema remote directory listing service which uses.I rpcgen to generate XDR routines as well as client and server stubs..LP.LPWhat are remote procedure calls?  Simply put, they are the high-levelcommunications paradigm used in the operating system.RPC presumes the existence oflow-level networking mechanisms (such as TCP/IP and UDP/IP), and upon themit implements a logical client to server communications system designedspecifically for the support of network applications.  With RPC, the clientmakes a procedure call to send a data packet to the server.  When thepacket arrives, the server calls a dispatch routine, performs whateverservice is requested, sends back the reply, and the procedure call returnsto the client..NH 0\&Layers of RPC.IX "layers of RPC".IX "RPC" "layers".LPThe RPC interface can be seen as being divided into three layers.\**.FSFor a complete specification of the routines in the remote procedurecall Library, see the.I rpc(3N) manual page..FE.LP.I "The Highest Layer:".IX RPC "The Highest Layer"The highest layer is totally transparent to the operating system, machine and network upon which is is run.  It's probably best to think of this level as a way of.I usingRPC, rather than asa \fIpart of\fP RPC proper.  Programmers who write RPC routines should (almost) always make this layer available to others by way of a simple C front end that entirely hides the networking..LP To illustrate, at this level a program can simply make a call to.I rnusers (),a C routine which returns the number of users on a remote machine.The user is not explicitly aware of using RPC \(em they simply call a procedure, just as they would call.I malloc() ..LP.I "The Middle Layer:".IX RPC "The Middle Layer"The middle layer is really \*QRPC proper.\*U  Here, the user doesn'tneed to consider details about sockets, the UNIX system, or other low-level implementation mechanisms.  They simply make remote procedure callsto routines on other machines.  The selling point here is simplicity.  It's this layer that allows RPC to pass the \*Qhello world\*U test \(emsimple things should be simple.  The middle-layer routines are used for most applications..LPRPC calls are made with the system routines.I registerrpc().I callrpc()and.I svc_run ().The first two of these are the most fundamental:.I registerrpc() obtains a unique system-wide procedure-identification number, and.I callrpc() actually executes a remote procedure call.  At the middle level, a call to .I rnusers()is implemented by way of these two routines..LPThe middle layer is unfortunately rarely used in serious programming due to its inflexibility (simplicity).  It does not allow timeout specifications or the choice of transport.  It allows no UNIXprocess control or flexibility in case of errors.  It doesn't supportmultiple kinds of call authentication.  The programmer rarely needs all these kinds of control, but one or two of them is often necessary..LP.I "The Lowest Layer:".IX RPC "The Lowest Layer"The lowest layer does allow these details to be controlled by the programmer, and for that reason it is often necessary.  Programs written at this level are also most efficient, but this is rarely areal issue \(em since RPC clients and servers rarely generate heavy network loads..LPAlthough this document only discusses the interface to C,remote procedure calls can be made from any language.Even though this document discusses RPCwhen it is used to communicatebetween processes on different machines,it works just as well for communicationbetween different processes on the same machine..br.KS.NH 2\&The RPC Paradigm.IX RPC paradigm.LPHere is a diagram of the RPC paradigm:.LP\fBFigure 1-1\fI Network Communication with the Remote Reocedure Call\fR.LP.PSL1: arrow down 1i "client " rjust "program " rjustL2: line right 1.5i "\fIcallrpc\fP" "function"move up 1.5i; line dotted down 6i; move up 4.5iarrow right 1iL3: arrow down 1i "invoke " rjust "service " rjustL4: arrow right 1.5i "call" "service"L5: arrow down 1i " service" ljust " executes" ljustL6: arrow left 1.5i "\fIreturn\fP" "answer"L7: arrow down 1i "request " rjust "completed " rjustL8: line left 1iarrow left 1.5i "\fIreturn\fP" "reply"L9: arrow down 1i "program " rjust "continues " rjustline dashed down from L2 to L9line dashed down from L4 to L7line dashed up 1i from L3 "service " rjust "daemon " rjustarrow dashed down 1i from L8move right 1i from L3box invis "Machine B"move left 1.2i from L2; move downbox invis "Machine A".PE.KE.KS.NH 1\&Higher Layers of RPC.NH 2\&Highest Layer.IX "highest layer of RPC".IX RPC "highest layer".LPImagine you're writing a program that needs to knowhow many users are logged into a remote machine.You can do this by calling the RPC library routine.I rnusers()as illustrated below:.ie t .DS.el .DS L.ft CW#include <stdio.h>main(argc, argv)	int argc;	char **argv;{	int num;	if (argc != 2) {		fprintf(stderr, "usage: rnusers hostname\en");		exit(1);	}	if ((num = rnusers(argv[1])) < 0) {		fprintf(stderr, "error: rnusers\en");		exit(-1);	}	printf("%d users on %s\en", num, argv[1]);	exit(0);}.DE.KERPC library routines such as.I rnusers() are in the RPC services library.I librpcsvc.aThus, the program above should be compiled with.DS.ft CW% cc \fIprogram.c -lrpcsvc\fP.DE.I rnusers (),like the other RPC library routines, is documented in section 3R of the.I "System Interface Manual for the Sun Workstation" ,the same section which documents the standard Sun RPC services.  .IX "RPC Services"See the .I intro(3R) manual page for an explanation of the documentation strategy for these services and their RPC protocols..LPHere are some of the RPC service library routines available to the C programmer:.LP\fBTable 3-3\fI RPC Service Library Routines\RP.TSbox tab (&) ;cfI cfIlfL l .Routine&Description_.sp.5rnusers&Return number of users on remote machinerusers&Return information about users on remote machinehavedisk&Determine if remote machine has diskrstats&Get performance data from remote kernelrwall&Write to specified remote machinesyppasswd&Update user password in Yellow Pages.TE.LPOther RPC services \(em for example.I ether().I mount.I rquota()and.I spray\(em are not available to the C programmer as library routines.They do, however,have RPC program numbers so they can be invoked with.I callrpc()which will be discussed in the next section.  Most of them also have compilable .I rpcgen(1) protocol description files.  (The.I rpcgenprotocol compiler radically simplifies the process of developingnetwork applications.  See the \fBrpcgen\fI Programming Guide\fRfor detailed information about .I rpcgen and .I rpcgen protocol description files)..KS.NH 2\&Intermediate Layer.IX "intermediate layer of RPC".IX "RPC" "intermediate layer".LPThe simplest interface, which explicitly makes RPC calls, uses the functions.I callrpc()and.I registerrpc()Using this method, the number of remote users can be gotten as follows:.ie t .DS.el .DS L#include <stdio.h>#include <rpc/rpc.h>#include <utmp.h>#include <rpcsvc/rusers.h>main(argc, argv)	int argc;	char **argv;{	unsigned long nusers;	int stat;	if (argc != 2) {		fprintf(stderr, "usage: nusers hostname\en");		exit(-1);	}	if (stat = callrpc(argv[1],	  RUSERSPROG, RUSERSVERS, RUSERSPROC_NUM,	  xdr_void, 0, xdr_u_long, &nusers) != 0) {		clnt_perrno(stat);		exit(1);	}	printf("%d users on %s\en", nusers, argv[1]);	exit(0);}.DE.KEEach RPC procedure is uniquely defined by a program number, version number, and procedure number.  The program number specifies a group of related remote procedures, each of which has a different procedure number.  Each program also has a version number, so when a minor change is made to a remote service (adding a new procedure, for example), a new program number doesn't have to be assigned.  When you want to call a procedure to find the number of remote users, you look up the appropriate program, version and procedure numbersin a manual, just as you look up the name of a memory allocator when you want to allocate memory..LPThe simplest way of making remote procedure calls is with the the RPC library routine.I callrpc()It has eight parameters.  The first is the name of the remote server machine.  The next three parameters are the program, version, and procedure numbers\(emtogether they identify the procedure to be called.The fifth and sixth parameters are an XDR filter and an argument tobe encoded and passed to the remote procedure.  The final two parameters are a filter for decoding the results returned by the remote procedure and a pointer to the place where the procedure's results are to be stored.  Multiple arguments andresults are handled by embedding them in structures.  If .I callrpc() completes successfully, it returns zero; else it returns a nonzero value.  The return codes (of type.IX "enum clnt_stat (in RPC programming)" "" "\fIenum clnt_stat\fP (in RPC programming)"cast into an integer) are found in .I <rpc/clnt.h> ..LPSince data types may be represented differently on different machines,.I callrpc() needs both the type of the RPC argument, as well asa pointer to the argument itself (and similarly for the result).  For.I RUSERSPROC_NUM ,the return value is an.I "unsigned long"so.I callrpc() has.I xdr_u_long() as its first return parameter, which saysthat the result is of type.I "unsigned long"and.I &nusers as its second return parameter,which is a pointer to where the long result will be placed.  Since.I RUSERSPROC_NUM takes no argument, the argument parameter of.I callrpc() is.I xdr_void ()..LPAfter trying several times to deliver a message, if.I callrpc() gets no answer, it returns with an error code.The delivery mechanism is UDP,which stands for User Datagram Protocol.Methods for adjusting the number of retriesor for using a different protocol require you to use the lowerlayer of the RPC library, discussed later in this document.The remote server procedurecorresponding to the above might look like this:.ie t .DS.el .DS L.ft CW.ft CWchar *nuser(indata)	char *indata;{	unsigned long nusers;.ft I	/*	 * Code here to compute the number of users	 * and place result in variable \fInusers\fP.	 */.ft CW	return((char *)&nusers);}.DE.LPIt takes one argument, which is a pointer to the inputof the remote procedure call (ignored in our example),and it returns a pointer to the result.In the current version of C,character pointers are the generic pointers,so both the input argument and the return value are cast to.I "char *" ..LPNormally, a server registers all of the RPC calls it plansto handle, and then goes into an infinite loop waiting to service requests.In this example, there is only a single procedureto register, so the main body of the server would look like this:.ie t .DS.el .DS L.ft CW#include <stdio.h>#include <rpc/rpc.h>#include <utmp.h>#include <rpcsvc/rusers.h>char *nuser();main(){	registerrpc(RUSERSPROG, RUSERSVERS, RUSERSPROC_NUM,		nuser, xdr_void, xdr_u_long);	svc_run();		/* \fINever returns\fP */	fprintf(stderr, "Error: svc_run returned!\en");	exit(1);}.DE.LPThe.I registerrpc()routine registers a C procedure as corresponding to agiven RPC procedure number.  The first three parameters,.I RUSERPROG ,.I RUSERSVERS ,and.I RUSERSPROC_NUM are the program, version, and procedure numbersof the remote procedure to be registered;.I nuser() is the name of the local procedure that implements the remoteprocedure; and.I xdr_void() and.I xdr_u_long() are the XDR filters for the remote procedure's arguments andresults, respectively.  (Multiple arguments or multiple resultsare passed as structures)..LPOnly the UDP transport mechanism can use.I registerrpc()thus, it is always safe in conjunction with calls generated by.I callrpc() ..SH.IX "UDP 8K warning"Warning: the UDP transport mechanism can only deal witharguments and results less than 8K bytes in length..LP.LPAfter registering the local procedure, the server program'smain procedure calls.I svc_run (),the RPC library's remote procedure dispatcher.  It is this function that calls the remote procedures in response to RPCcall messages.  Note that the dispatcher takes care of decodingremote procedure arguments and encoding results, using the XDRfilters specified when the remote procedure was registered..NH 2\&Assigning Program Numbers.IX "program number assignment".IX "assigning program numbers".LPProgram numbers are assigned in groups of .I 0x20000000 according to the following chart:.DS.ft CW       0x0 - 0x1fffffff	\fRDefined by Sun\fP0x20000000 - 0x3fffffff	\fRDefined by user\fP0x40000000 - 0x5fffffff	\fRTransient\fP0x60000000 - 0x7fffffff	\fRReserved\fP0x80000000 - 0x9fffffff	\fRReserved\fP0xa0000000 - 0xbfffffff	\fRReserved\fP0xc0000000 - 0xdfffffff	\fRReserved\fP0xe0000000 - 0xffffffff	\fRReserved\fP.ft R.DESun Microsystems administers the first group of numbers, whichshould be identical for all Sun customers.  If a customerdevelops an application that might be of general interest, thatapplication should be given an assigned number in the firstrange.  The second group of numbers is reserved for specificcustomer applications.  This range is intended primarily fordebugging new programs.  The third group is reserved forapplications that generate program numbers dynamically.  Thefinal groups are reserved for future use, and should not beused..LPTo register a protocol specification, send a request by network mail to.I rpc@sunor write to:.DSRPC AdministratorSun Microsystems2550 Garcia Ave.Mountain View, CA 94043.DEPlease include a compilable .I rpcgen \*Q.x\*U file describing your protocol.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费福利片| 国产在线精品免费| 欧美中文字幕不卡| 亚洲精品国产一区二区精华液 | 亚洲成人一二三| 欧美羞羞免费网站| 日韩高清不卡一区| 日韩亚洲欧美一区| 国产又粗又猛又爽又黄91精品| 久久亚洲精品国产精品紫薇| 国产精品原创巨作av| 国产精品久久久久久久久免费相片 | 日韩亚洲欧美成人一区| 韩国成人精品a∨在线观看| 国产亚洲精品aa午夜观看| zzijzzij亚洲日本少妇熟睡| 一区二区三区**美女毛片| 91精品一区二区三区久久久久久| 久久 天天综合| 欧美国产禁国产网站cc| 91香蕉视频污在线| 免费看日韩精品| 中文幕一区二区三区久久蜜桃| 欧美体内she精视频| 久久99国产精品久久99| 亚洲精品自拍动漫在线| 国产精品三级久久久久三级| 在线观看一区二区精品视频| 精东粉嫩av免费一区二区三区| 亚洲天堂久久久久久久| 51精品国自产在线| 国产成人精品一区二区三区四区| 一区二区三区日韩在线观看| 26uuu久久综合| 色综合天天综合网天天看片| 精品中文av资源站在线观看| 自拍av一区二区三区| 精品日韩99亚洲| 欧美性极品少妇| 不卡一二三区首页| 久久国产综合精品| 亚洲一区二区免费视频| 欧美激情在线一区二区| 欧美大片免费久久精品三p| 日本道在线观看一区二区| 韩国精品久久久| 日欧美一区二区| 亚洲蜜臀av乱码久久精品| 久久久另类综合| 日韩欧美亚洲一区二区| 欧美三级中文字| 99久久精品国产一区| 国产一区不卡视频| 婷婷久久综合九色国产成人 | 制服丝袜激情欧洲亚洲| 丁香婷婷综合网| 国产麻豆欧美日韩一区| 另类成人小视频在线| 婷婷一区二区三区| 亚洲一区二区精品久久av| 国产精品久久三| 国产精品免费av| 国产欧美一区二区精品性色超碰| 日韩一二三区视频| 欧美日韩一区二区三区免费看| 99精品久久免费看蜜臀剧情介绍| 国产91精品露脸国语对白| 国产一区二区免费看| 狠狠色丁香婷综合久久| 国产在线视频一区二区三区| 免费在线观看一区| 麻豆精品一二三| 免费观看日韩电影| 日本欧美在线观看| 日韩av不卡在线观看| 日韩有码一区二区三区| 精品一区二区三区在线视频| 日本网站在线观看一区二区三区| 亚洲成人自拍网| 婷婷国产v国产偷v亚洲高清| 亚洲精品中文在线影院| 亚洲午夜电影在线| 亚洲bdsm女犯bdsm网站| 亚洲成人动漫一区| 天堂av在线一区| 日本va欧美va欧美va精品| 一区二区不卡在线视频 午夜欧美不卡在| 日韩理论片一区二区| 亚洲激情五月婷婷| 亚洲小少妇裸体bbw| 婷婷久久综合九色国产成人| 九一久久久久久| 国产麻豆精品在线| 97se亚洲国产综合自在线不卡| 色哟哟在线观看一区二区三区| 在线免费不卡视频| 欧美人伦禁忌dvd放荡欲情| 日韩女优电影在线观看| www激情久久| 中文字幕一区二区在线观看| 玉足女爽爽91| 男女男精品视频| 成人激情黄色小说| 欧美在线高清视频| 精品久久人人做人人爱| 国产日韩精品一区| 一区二区三区高清在线| 日韩成人dvd| 国产成人h网站| 色94色欧美sute亚洲线路一久 | 日韩伦理免费电影| 免费成人美女在线观看.| 风流少妇一区二区| 欧美日韩一区久久| 久久精品水蜜桃av综合天堂| 亚洲乱码精品一二三四区日韩在线| 亚洲国产成人tv| 国产精品伊人色| 欧美日韩综合在线免费观看| 精品久久久久99| 一区二区三区中文在线观看| 极品美女销魂一区二区三区| 91黄色免费版| 国产婷婷色一区二区三区| 亚洲va韩国va欧美va| 成人av在线电影| 欧美大片在线观看一区二区| 一区二区三区在线视频观看| 精品系列免费在线观看| 欧美在线不卡视频| 国产目拍亚洲精品99久久精品| 亚洲福利一二三区| 成人国产精品免费| 久久综合一区二区| 一区二区三区成人| 成人白浆超碰人人人人| 日韩欧美www| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲综合久久av| 成av人片一区二区| 精品噜噜噜噜久久久久久久久试看 | 欧美一级免费大片| 亚洲一区二区3| 波波电影院一区二区三区| 精品国产乱码91久久久久久网站| 亚洲成人777| 99久久久久久| 亚洲欧洲日韩一区二区三区| 国产在线国偷精品产拍免费yy| 欧美日韩第一区日日骚| 亚洲主播在线观看| 成人app在线观看| 欧美经典一区二区三区| 国产精一品亚洲二区在线视频| 日韩欧美国产三级电影视频| 日韩av中文字幕一区二区三区| 欧美午夜免费电影| 亚洲免费在线播放| 91片在线免费观看| 国产精品成人免费在线| fc2成人免费人成在线观看播放| 国产视频在线观看一区二区三区| 麻豆久久一区二区| 日韩欧美一二三| 久久成人羞羞网站| 26uuu亚洲综合色| 国产精品99久久久久久似苏梦涵| 精品剧情v国产在线观看在线| 久久99精品久久久久婷婷| 欧美成人精品高清在线播放| 蜜桃av噜噜一区二区三区小说| 日韩亚洲欧美在线观看| 久久91精品久久久久久秒播| 成人午夜电影小说| 蜜桃视频免费观看一区| 一区二区三区在线播| 在线播放91灌醉迷j高跟美女| 亚洲一区中文在线| 91激情在线视频| 日本伊人精品一区二区三区观看方式| 欧美视频一区二区| 免费观看一级欧美片| 久久久久久久综合日本| 成人免费毛片aaaaa**| 亚洲欧美色综合| 欧美影院一区二区三区| 亚洲成av人片一区二区| 日韩免费在线观看| 丰满少妇久久久久久久| 亚洲免费大片在线观看| 在线观看91av| 国产成人亚洲综合a∨猫咪| 成人欧美一区二区三区1314| 在线观看亚洲精品视频| 久久99国产精品尤物| 国产精品久久久久国产精品日日 | 国产精品久久久久久久久免费丝袜| 99久久久免费精品国产一区二区 | 亚洲欧美视频在线观看| 日韩一区二区三区三四区视频在线观看 |