home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / rpc3.9 / part12 < prev    next >
SHell self-extracting ARchive  |  1988-02-27  |  60.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 31 33 69 30 38 |Subject:| v13i08|
|00000010| 39 3a 20 20 53 75 6e 20 | 52 50 43 2c 20 72 65 6c |9: Sun |RPC, rel|
|00000020| 65 61 73 65 20 33 2e 39 | 2c 20 50 61 72 74 31 32 |ease 3.9|, Part12|
|00000030| 2f 31 35 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |/15.News|groups: |
|00000040| 63 6f 6d 70 2e 73 6f 75 | 72 63 65 73 2e 75 6e 69 |comp.sou|rces.uni|
|00000050| 78 0a 53 65 6e 64 65 72 | 3a 20 73 6f 75 72 63 65 |x.Sender|: source|
|00000060| 73 0a 41 70 70 72 6f 76 | 65 64 3a 20 72 73 61 6c |s.Approv|ed: rsal|
|00000070| 7a 40 75 75 6e 65 74 2e | 55 55 2e 4e 45 54 0a 0a |z@uunet.|UU.NET..|
|00000080| 53 75 62 6d 69 74 74 65 | 64 2d 62 79 3a 20 53 74 |Submitte|d-by: St|
|00000090| 65 70 68 65 6e 20 58 2e | 20 4e 61 68 6d 20 3c 73 |ephen X.| Nahm <s|
|000000a0| 78 6e 40 53 75 6e 2e 43 | 4f 4d 3e 0a 50 6f 73 74 |xn@Sun.C|OM>.Post|
|000000b0| 69 6e 67 2d 6e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-numb|er: Volu|
|000000c0| 6d 65 20 31 33 2c 20 49 | 73 73 75 65 20 38 39 0a |me 13, I|ssue 89.|
|000000d0| 41 72 63 68 69 76 65 2d | 6e 61 6d 65 3a 20 72 70 |Archive-|name: rp|
|000000e0| 63 33 2e 39 2f 70 61 72 | 74 31 32 0a 0a 23 21 20 |c3.9/par|t12..#! |
|000000f0| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000100| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000110| 65 2e 20 54 6f 20 65 78 | 74 72 61 63 74 2c 20 72 |e. To ex|tract, r|
|00000120| 65 6d 6f 76 65 20 74 68 | 65 20 68 65 61 64 65 72 |emove th|e header|
|00000130| 20 61 6e 64 20 74 79 70 | 65 20 22 73 68 20 66 69 | and typ|e "sh fi|
|00000140| 6c 65 6e 61 6d 65 22 0a | 23 0a 63 64 20 64 6f 63 |lename".|#.cd doc|
|00000150| 0a 65 63 68 6f 20 78 20 | 2d 20 72 70 63 2e 72 66 |.echo x |- rpc.rf|
|00000160| 63 2e 6d 73 0a 73 65 64 | 20 2d 65 20 27 73 2f 5e |c.ms.sed| -e 's/^|
|00000170| 58 2f 2f 27 20 3e 20 72 | 70 63 2e 72 66 63 2e 6d |X//' > r|pc.rfc.m|
|00000180| 73 20 3c 3c 27 46 75 6e | 6b 79 5f 53 74 75 66 66 |s <<'Fun|ky_Stuff|
|00000190| 27 0a 58 2e 5c 22 20 40 | 28 23 29 72 70 63 2e 72 |'.X.\" @|(#)rpc.r|
|000001a0| 66 63 2e 6d 73 09 31 2e | 32 20 38 37 2f 31 31 2f |fc.ms.1.|2 87/11/|
|000001b0| 30 39 20 33 2e 39 20 52 | 50 43 53 52 43 0a 58 2e |09 3.9 R|PCSRC.X.|
|000001c0| 64 65 20 42 54 0a 58 2e | 69 66 20 5c 5c 6e 25 3d |de BT.X.|if \\n%=|
|000001d0| 31 20 2e 74 6c 20 27 27 | 2d 20 25 20 2d 27 27 0a |1 .tl ''|- % -''.|
|000001e0| 58 2e 2e 0a 58 2e 4e 44 | 0a 58 2e 5c 22 20 70 72 |X...X.ND|.X.\" pr|
|000001f0| 65 76 65 6e 74 20 65 78 | 63 65 73 73 20 75 6e 64 |event ex|cess und|
|00000200| 65 72 6c 69 6e 69 6e 67 | 20 69 6e 20 6e 72 6f 66 |erlining| in nrof|
|00000210| 66 0a 58 2e 69 66 20 6e | 20 2e 66 70 20 32 20 52 |f.X.if n| .fp 2 R|
|00000220| 0a 58 2e 4f 48 20 27 52 | 65 6d 6f 74 65 20 50 72 |.X.OH 'R|emote Pr|
|00000230| 6f 63 65 64 75 72 65 20 | 43 61 6c 6c 73 3a 20 50 |ocedure |Calls: P|
|00000240| 72 6f 74 6f 63 6f 6c 20 | 53 70 65 63 69 66 69 63 |rotocol |Specific|
|00000250| 61 74 69 6f 6e 27 27 50 | 61 67 65 20 25 27 0a 58 |ation''P|age %'.X|
|00000260| 2e 45 48 20 27 50 61 67 | 65 20 25 27 27 52 65 6d |.EH 'Pag|e %''Rem|
|00000270| 6f 74 65 20 50 72 6f 63 | 65 64 75 72 65 20 43 61 |ote Proc|edure Ca|
|00000280| 6c 6c 73 3a 20 50 72 6f | 74 6f 63 6f 6c 20 53 70 |lls: Pro|tocol Sp|
|00000290| 65 63 69 66 69 63 61 74 | 69 6f 6e 27 0a 58 2e 69 |ecificat|ion'.X.i|
|000002a0| 66 20 5c 5c 6e 25 3d 31 | 20 2e 62 70 0a 58 2e 53 |f \\n%=1| .bp.X.S|
|000002b0| 48 0a 5c 26 52 65 6d 6f | 74 65 20 50 72 6f 63 65 |H.\&Remo|te Proce|
|000002c0| 64 75 72 65 20 43 61 6c | 6c 73 3a 20 50 72 6f 74 |dure Cal|ls: Prot|
|000002d0| 6f 63 6f 6c 20 53 70 65 | 63 69 66 69 63 61 74 69 |ocol Spe|cificati|
|000002e0| 6f 6e 0a 58 2e 4c 50 0a | 58 2e 4e 48 20 30 0a 5c |on.X.LP.|X.NH 0.\|
|000002f0| 26 53 74 61 74 75 73 20 | 6f 66 20 74 68 69 73 20 |&Status |of this |
|00000300| 4d 65 6d 6f 0a 58 2e 4c | 50 0a 4e 6f 74 65 3a 20 |Memo.X.L|P.Note: |
|00000310| 54 68 69 73 20 63 68 61 | 70 74 65 72 20 73 70 65 |This cha|pter spe|
|00000320| 63 69 66 69 65 73 20 61 | 20 70 72 6f 74 6f 63 6f |cifies a| protoco|
|00000330| 6c 20 74 68 61 74 20 53 | 75 6e 20 4d 69 63 72 6f |l that S|un Micro|
|00000340| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 2c 0a 61 |systems,| Inc.,.a|
|00000350| 6e 64 20 6f 74 68 65 72 | 73 20 61 72 65 20 75 73 |nd other|s are us|
|00000360| 69 6e 67 2e 20 20 49 74 | 20 68 61 73 20 62 65 65 |ing. It| has bee|
|00000370| 6e 20 73 75 62 6d 69 74 | 74 65 64 20 74 6f 20 74 |n submit|ted to t|
|00000380| 68 65 20 41 52 50 41 2d | 49 6e 74 65 72 6e 65 74 |he ARPA-|Internet|
|00000390| 0a 66 6f 72 20 63 6f 6e | 73 69 64 65 72 61 74 69 |.for con|siderati|
|000003a0| 6f 6e 20 61 73 20 61 6e | 20 52 46 43 2e 20 20 5c |on as an| RFC. \|
|000003b0| 66 42 43 65 72 74 61 69 | 6e 20 64 65 74 61 69 6c |fBCertai|n detail|
|000003c0| 73 20 6d 61 79 20 63 68 | 61 6e 67 65 20 61 73 20 |s may ch|ange as |
|000003d0| 61 20 72 65 73 75 6c 74 | 0a 6f 66 20 63 6f 6d 6d |a result|.of comm|
|000003e0| 65 6e 74 73 20 6d 61 64 | 65 20 64 75 72 69 6e 67 |ents mad|e during|
|000003f0| 20 74 68 65 20 72 65 76 | 69 65 77 20 6f 66 20 74 | the rev|iew of t|
|00000400| 68 69 73 20 64 72 61 66 | 74 20 73 74 61 6e 64 61 |his draf|t standa|
|00000410| 72 64 2e 5c 66 50 20 20 | 0a 58 2e 4c 50 0a 58 2e |rd.\fP |.X.LP.X.|
|00000420| 4e 48 20 31 0a 5c 26 49 | 6e 74 72 6f 64 75 63 74 |NH 1.\&I|ntroduct|
|00000430| 69 6f 6e 0a 58 2e 4c 50 | 0a 54 68 69 73 20 63 68 |ion.X.LP|.This ch|
|00000440| 61 70 74 65 72 20 73 70 | 65 63 69 66 69 65 73 20 |apter sp|ecifies |
|00000450| 20 61 20 20 6d 65 73 73 | 61 67 65 20 70 72 6f 74 | a mess|age prot|
|00000460| 6f 63 6f 6c 20 20 75 73 | 65 64 20 69 6e 20 69 6d |ocol us|ed in im|
|00000470| 70 6c 65 6d 65 6e 74 69 | 6e 67 0a 53 75 6e 27 73 |plementi|ng.Sun's|
|00000480| 20 52 65 6d 6f 74 65 20 | 50 72 6f 63 65 64 75 72 | Remote |Procedur|
|00000490| 65 20 43 61 6c 6c 20 28 | 52 50 43 29 20 70 61 63 |e Call (|RPC) pac|
|000004a0| 6b 61 67 65 2e 20 20 28 | 54 68 65 20 6d 65 73 73 |kage. (|The mess|
|000004b0| 61 67 65 20 70 72 6f 74 | 6f 63 6f 6c 20 69 73 0a |age prot|ocol is.|
|000004c0| 73 70 65 63 69 66 69 65 | 64 20 77 69 74 68 20 74 |specifie|d with t|
|000004d0| 68 65 20 65 58 74 65 72 | 6e 61 6c 20 44 61 74 61 |he eXter|nal Data|
|000004e0| 20 52 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | Represe|ntation |
|000004f0| 28 58 44 52 29 20 6c 61 | 6e 67 75 61 67 65 2e 0a |(XDR) la|nguage..|
|00000500| 53 65 65 20 74 68 65 0a | 5c 66 49 65 58 74 65 72 |See the.|\fIeXter|
|00000510| 6e 61 6c 20 44 61 74 61 | 20 52 65 70 72 65 73 65 |nal Data| Represe|
|00000520| 6e 74 61 74 69 6f 6e 20 | 53 74 61 6e 64 61 72 64 |ntation |Standard|
|00000530| 5c 66 50 0a 66 6f 72 20 | 74 68 65 20 64 65 74 61 |\fP.for |the deta|
|00000540| 69 6c 73 2e 20 20 48 65 | 72 65 2c 20 77 65 20 61 |ils. He|re, we a|
|00000550| 73 73 75 6d 65 20 74 68 | 61 74 20 20 74 68 65 20 |ssume th|at the |
|00000560| 20 72 65 61 64 65 72 20 | 69 73 20 66 61 6d 69 6c | reader |is famil|
|00000570| 69 61 72 20 20 0a 77 69 | 74 68 20 58 44 52 20 61 |iar .wi|th XDR a|
|00000580| 6e 64 20 64 6f 20 6e 6f | 74 20 61 74 74 65 6d 70 |nd do no|t attemp|
|00000590| 74 20 74 6f 20 6a 75 73 | 74 69 66 79 20 52 50 43 |t to jus|tify RPC|
|000005a0| 20 6f 72 20 20 69 74 73 | 20 75 73 65 73 29 2e 20 | or its| uses). |
|000005b0| 20 54 68 65 20 70 61 70 | 65 72 0a 62 79 20 42 69 | The pap|er.by Bi|
|000005c0| 72 72 65 6c 6c 20 61 6e | 64 20 4e 65 6c 73 6f 6e |rrell an|d Nelson|
|000005d0| 20 5b 31 5d 20 20 69 73 | 20 72 65 63 6f 6d 6d 65 | [1] is| recomme|
|000005e0| 6e 64 65 64 20 61 73 20 | 61 6e 20 20 65 78 63 65 |nded as |an exce|
|000005f0| 6c 6c 65 6e 74 20 62 61 | 63 6b 67 72 6f 75 6e 64 |llent ba|ckground|
|00000600| 0a 74 6f 20 20 61 6e 64 | 20 6a 75 73 74 69 66 69 |.to and| justifi|
|00000610| 63 61 74 69 6f 6e 20 6f | 66 20 52 50 43 2e 0a 58 |cation o|f RPC..X|
|00000620| 2e 4e 48 20 32 0a 5c 26 | 54 65 72 6d 69 6e 6f 6c |.NH 2.\&|Terminol|
|00000630| 6f 67 79 0a 58 2e 4c 50 | 0a 54 68 69 73 20 63 68 |ogy.X.LP|.This ch|
|00000640| 61 70 74 65 72 20 64 69 | 73 63 75 73 73 65 73 20 |apter di|scusses |
|00000650| 73 65 72 76 65 72 73 2c | 20 73 65 72 76 69 63 65 |servers,| service|
|00000660| 73 2c 20 70 72 6f 67 72 | 61 6d 73 2c 20 70 72 6f |s, progr|ams, pro|
|00000670| 63 65 64 75 72 65 73 2c | 0a 63 6c 69 65 6e 74 73 |cedures,|.clients|
|00000680| 2c 20 61 6e 64 20 76 65 | 72 73 69 6f 6e 73 2e 20 |, and ve|rsions. |
|00000690| 20 41 20 73 65 72 76 65 | 72 20 69 73 20 61 20 70 | A serve|r is a p|
|000006a0| 69 65 63 65 20 6f 66 20 | 73 6f 66 74 77 61 72 65 |iece of |software|
|000006b0| 20 77 68 65 72 65 20 6e | 65 74 77 6f 72 6b 0a 73 | where n|etwork.s|
|000006c0| 65 72 76 69 63 65 73 20 | 61 72 65 20 69 6d 70 6c |ervices |are impl|
|000006d0| 65 6d 65 6e 74 65 64 2e | 20 20 41 20 6e 65 74 77 |emented.| A netw|
|000006e0| 6f 72 6b 20 73 65 72 76 | 69 63 65 20 69 73 20 61 |ork serv|ice is a|
|000006f0| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 20 6f 66 20 6f | collect|ion of o|
|00000700| 6e 65 0a 6f 72 20 6d 6f | 72 65 20 72 65 6d 6f 74 |ne.or mo|re remot|
|00000710| 65 20 70 72 6f 67 72 61 | 6d 73 2e 20 20 41 20 72 |e progra|ms. A r|
|00000720| 65 6d 6f 74 65 20 70 72 | 6f 67 72 61 6d 20 69 6d |emote pr|ogram im|
|00000730| 70 6c 65 6d 65 6e 74 73 | 20 6f 6e 65 20 6f 72 20 |plements| one or |
|00000740| 6d 6f 72 65 0a 72 65 6d | 6f 74 65 20 70 72 6f 63 |more.rem|ote proc|
|00000750| 65 64 75 72 65 73 3b 20 | 74 68 65 20 70 72 6f 63 |edures; |the proc|
|00000760| 65 64 75 72 65 73 2c 20 | 74 68 65 69 72 20 70 61 |edures, |their pa|
|00000770| 72 61 6d 65 74 65 72 73 | 2c 20 61 6e 64 20 72 65 |rameters|, and re|
|00000780| 73 75 6c 74 73 20 61 72 | 65 0a 64 6f 63 75 6d 65 |sults ar|e.docume|
|00000790| 6e 74 65 64 20 69 6e 20 | 74 68 65 20 73 70 65 63 |nted in |the spec|
|000007a0| 69 66 69 63 20 70 72 6f | 67 72 61 6d 27 73 20 70 |ific pro|gram's p|
|000007b0| 72 6f 74 6f 63 6f 6c 20 | 73 70 65 63 69 66 69 63 |rotocol |specific|
|000007c0| 61 74 69 6f 6e 20 28 73 | 65 65 20 74 68 65 0a 5c |ation (s|ee the.\|
|000007d0| 66 49 50 6f 72 74 20 4d | 61 70 70 65 72 20 50 72 |fIPort M|apper Pr|
|000007e0| 6f 67 72 61 6d 20 50 72 | 6f 74 6f 63 6f 6c 5c 66 |ogram Pr|otocol\f|
|000007f0| 50 5c 2c 20 62 65 6c 6f | 77 2c 20 66 6f 72 20 61 |P\, belo|w, for a|
|00000800| 6e 20 65 78 61 6d 70 6c | 65 29 2e 20 20 4e 65 74 |n exampl|e). Net|
|00000810| 77 6f 72 6b 0a 63 6c 69 | 65 6e 74 73 20 61 72 65 |work.cli|ents are|
|00000820| 20 70 69 65 63 65 73 20 | 6f 66 20 73 6f 66 74 77 | pieces |of softw|
|00000830| 61 72 65 20 74 68 61 74 | 20 69 6e 69 74 69 61 74 |are that| initiat|
|00000840| 65 20 72 65 6d 6f 74 65 | 20 70 72 6f 63 65 64 75 |e remote| procedu|
|00000850| 72 65 20 63 61 6c 6c 73 | 0a 74 6f 20 73 65 72 76 |re calls|.to serv|
|00000860| 69 63 65 73 2e 20 20 41 | 20 73 65 72 76 65 72 20 |ices. A| server |
|00000870| 6d 61 79 20 73 75 70 70 | 6f 72 74 20 6d 6f 72 65 |may supp|ort more|
|00000880| 20 74 68 61 6e 20 6f 6e | 65 20 76 65 72 73 69 6f | than on|e versio|
|00000890| 6e 20 6f 66 20 61 20 72 | 65 6d 6f 74 65 0a 70 72 |n of a r|emote.pr|
|000008a0| 6f 67 72 61 6d 20 69 6e | 20 6f 72 64 65 72 20 74 |ogram in| order t|
|000008b0| 6f 20 62 65 20 66 6f 72 | 77 61 72 64 20 63 6f 6d |o be for|ward com|
|000008c0| 70 61 74 69 62 6c 65 20 | 77 69 74 68 20 63 68 61 |patible |with cha|
|000008d0| 6e 67 69 6e 67 20 70 72 | 6f 74 6f 63 6f 6c 73 2e |nging pr|otocols.|
|000008e0| 0a 58 2e 4c 50 0a 46 6f | 72 20 65 78 61 6d 70 6c |.X.LP.Fo|r exampl|
|000008f0| 65 2c 20 61 20 6e 65 74 | 77 6f 72 6b 20 66 69 6c |e, a net|work fil|
|00000900| 65 20 73 65 72 76 69 63 | 65 20 6d 61 79 20 62 65 |e servic|e may be|
|00000910| 20 63 6f 6d 70 6f 73 65 | 64 20 6f 66 20 74 77 6f | compose|d of two|
|00000920| 20 70 72 6f 67 72 61 6d | 73 2e 0a 4f 6e 65 20 70 | program|s..One p|
|00000930| 72 6f 67 72 61 6d 20 6d | 61 79 20 64 65 61 6c 20 |rogram m|ay deal |
|00000940| 77 69 74 68 20 68 69 67 | 68 2d 6c 65 76 65 6c 20 |with hig|h-level |
|00000950| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 73 75 63 |applicat|ions suc|
|00000960| 68 20 61 73 20 66 69 6c | 65 20 73 79 73 74 65 6d |h as fil|e system|
|00000970| 0a 61 63 63 65 73 73 20 | 63 6f 6e 74 72 6f 6c 20 |.access |control |
|00000980| 61 6e 64 20 6c 6f 63 6b | 69 6e 67 2e 20 20 54 68 |and lock|ing. Th|
|00000990| 65 20 6f 74 68 65 72 20 | 6d 61 79 20 64 65 61 6c |e other |may deal|
|000009a0| 20 77 69 74 68 20 6c 6f | 77 2d 6c 65 76 65 6c 20 | with lo|w-level |
|000009b0| 66 69 6c 65 0a 49 4f 20 | 61 6e 64 20 68 61 76 65 |file.IO |and have|
|000009c0| 20 70 72 6f 63 65 64 75 | 72 65 73 20 6c 69 6b 65 | procedu|res like|
|000009d0| 20 22 72 65 61 64 22 20 | 61 6e 64 20 22 77 72 69 | "read" |and "wri|
|000009e0| 74 65 22 2e 20 20 41 20 | 63 6c 69 65 6e 74 20 6d |te". A |client m|
|000009f0| 61 63 68 69 6e 65 20 6f | 66 0a 74 68 65 20 6e 65 |achine o|f.the ne|
|00000a00| 74 77 6f 72 6b 20 66 69 | 6c 65 20 73 65 72 76 69 |twork fi|le servi|
|00000a10| 63 65 20 77 6f 75 6c 64 | 20 63 61 6c 6c 20 74 68 |ce would| call th|
|00000a20| 65 20 70 72 6f 63 65 64 | 75 72 65 73 20 61 73 73 |e proced|ures ass|
|00000a30| 6f 63 69 61 74 65 64 20 | 77 69 74 68 0a 74 68 65 |ociated |with.the|
|00000a40| 20 74 77 6f 20 70 72 6f | 67 72 61 6d 73 20 6f 66 | two pro|grams of|
|00000a50| 20 74 68 65 20 73 65 72 | 76 69 63 65 20 6f 6e 20 | the ser|vice on |
|00000a60| 62 65 68 61 6c 66 20 6f | 66 20 73 6f 6d 65 20 75 |behalf o|f some u|
|00000a70| 73 65 72 20 6f 6e 20 74 | 68 65 20 63 6c 69 65 6e |ser on t|he clien|
|00000a80| 74 0a 6d 61 63 68 69 6e | 65 2e 0a 58 2e 4e 48 20 |t.machin|e..X.NH |
|00000a90| 32 0a 5c 26 54 68 65 20 | 52 50 43 20 4d 6f 64 65 |2.\&The |RPC Mode|
|00000aa0| 6c 0a 58 2e 4c 50 0a 54 | 68 65 20 72 65 6d 6f 74 |l.X.LP.T|he remot|
|00000ab0| 65 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |e proced|ure call|
|00000ac0| 20 6d 6f 64 65 6c 20 69 | 73 20 73 69 6d 69 6c 61 | model i|s simila|
|00000ad0| 72 20 74 6f 20 74 68 65 | 20 6c 6f 63 61 6c 20 70 |r to the| local p|
|00000ae0| 72 6f 63 65 64 75 72 65 | 0a 63 61 6c 6c 20 6d 6f |rocedure|.call mo|
|00000af0| 64 65 6c 2e 20 20 49 6e | 20 74 68 65 20 6c 6f 63 |del. In| the loc|
|00000b00| 61 6c 20 63 61 73 65 2c | 20 74 68 65 20 63 61 6c |al case,| the cal|
|00000b10| 6c 65 72 20 70 6c 61 63 | 65 73 20 61 72 67 75 6d |ler plac|es argum|
|00000b20| 65 6e 74 73 20 74 6f 20 | 61 0a 70 72 6f 63 65 64 |ents to |a.proced|
|00000b30| 75 72 65 20 69 6e 20 73 | 6f 6d 65 20 77 65 6c 6c |ure in s|ome well|
|00000b40| 2d 73 70 65 63 69 66 69 | 65 64 20 6c 6f 63 61 74 |-specifi|ed locat|
|00000b50| 69 6f 6e 20 28 73 75 63 | 68 20 61 73 20 61 20 72 |ion (suc|h as a r|
|00000b60| 65 73 75 6c 74 0a 72 65 | 67 69 73 74 65 72 29 2e |esult.re|gister).|
|00000b70| 20 20 49 74 20 74 68 65 | 6e 20 74 72 61 6e 73 66 | It the|n transf|
|00000b80| 65 72 73 20 63 6f 6e 74 | 72 6f 6c 20 74 6f 20 74 |ers cont|rol to t|
|00000b90| 68 65 20 70 72 6f 63 65 | 64 75 72 65 2c 20 61 6e |he proce|dure, an|
|00000ba0| 64 0a 65 76 65 6e 74 75 | 61 6c 6c 79 20 67 61 69 |d.eventu|ally gai|
|00000bb0| 6e 73 20 62 61 63 6b 20 | 63 6f 6e 74 72 6f 6c 2e |ns back |control.|
|00000bc0| 20 20 41 74 20 74 68 61 | 74 20 70 6f 69 6e 74 2c | At tha|t point,|
|00000bd0| 20 74 68 65 20 72 65 73 | 75 6c 74 73 20 6f 66 20 | the res|ults of |
|00000be0| 74 68 65 0a 70 72 6f 63 | 65 64 75 72 65 20 61 72 |the.proc|edure ar|
|00000bf0| 65 20 65 78 74 72 61 63 | 74 65 64 20 66 72 6f 6d |e extrac|ted from|
|00000c00| 20 74 68 65 20 77 65 6c | 6c 2d 73 70 65 63 69 66 | the wel|l-specif|
|00000c10| 69 65 64 20 6c 6f 63 61 | 74 69 6f 6e 2c 20 61 6e |ied loca|tion, an|
|00000c20| 64 20 74 68 65 0a 63 61 | 6c 6c 65 72 20 63 6f 6e |d the.ca|ller con|
|00000c30| 74 69 6e 75 65 73 20 65 | 78 65 63 75 74 69 6f 6e |tinues e|xecution|
|00000c40| 2e 0a 58 2e 4c 50 0a 54 | 68 65 20 72 65 6d 6f 74 |..X.LP.T|he remot|
|00000c50| 65 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |e proced|ure call|
|00000c60| 20 69 73 20 73 69 6d 69 | 6c 61 72 2c 20 69 6e 20 | is simi|lar, in |
|00000c70| 74 68 61 74 20 6f 6e 65 | 20 74 68 72 65 61 64 20 |that one| thread |
|00000c80| 6f 66 20 63 6f 6e 74 72 | 6f 6c 0a 6c 6f 67 69 63 |of contr|ol.logic|
|00000c90| 61 6c 6c 79 20 77 69 6e | 64 73 20 74 68 72 6f 75 |ally win|ds throu|
|00000ca0| 67 68 20 74 77 6f 20 70 | 72 6f 63 65 73 73 65 73 |gh two p|rocesses|
|00000cb0| 5c 28 65 6d 6f 6e 65 20 | 69 73 20 74 68 65 20 63 |\(emone |is the c|
|00000cc0| 61 6c 6c 65 72 27 73 20 | 70 72 6f 63 65 73 73 2c |aller's |process,|
|00000cd0| 0a 74 68 65 20 6f 74 68 | 65 72 20 69 73 20 61 20 |.the oth|er is a |
|00000ce0| 73 65 72 76 65 72 27 73 | 20 70 72 6f 63 65 73 73 |server's| process|
|00000cf0| 2e 20 20 54 68 61 74 20 | 69 73 2c 20 74 68 65 20 |. That |is, the |
|00000d00| 63 61 6c 6c 65 72 20 70 | 72 6f 63 65 73 73 20 73 |caller p|rocess s|
|00000d10| 65 6e 64 73 20 61 0a 63 | 61 6c 6c 20 6d 65 73 73 |ends a.c|all mess|
|00000d20| 61 67 65 20 74 6f 20 74 | 68 65 20 73 65 72 76 65 |age to t|he serve|
|00000d30| 72 20 70 72 6f 63 65 73 | 73 20 61 6e 64 20 77 61 |r proces|s and wa|
|00000d40| 69 74 73 20 28 62 6c 6f | 63 6b 73 29 20 66 6f 72 |its (blo|cks) for|
|00000d50| 20 61 20 72 65 70 6c 79 | 0a 6d 65 73 73 61 67 65 | a reply|.message|
|00000d60| 2e 20 20 54 68 65 20 63 | 61 6c 6c 20 6d 65 73 73 |. The c|all mess|
|00000d70| 61 67 65 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |age cont|ains the|
|00000d80| 20 70 72 6f 63 65 64 75 | 72 65 27 73 20 70 61 72 | procedu|re's par|
|00000d90| 61 6d 65 74 65 72 73 2c | 20 61 6d 6f 6e 67 0a 6f |ameters,| among.o|
|00000da0| 74 68 65 72 20 74 68 69 | 6e 67 73 2e 20 20 54 68 |ther thi|ngs. Th|
|00000db0| 65 20 72 65 70 6c 79 20 | 6d 65 73 73 61 67 65 20 |e reply |message |
|00000dc0| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 70 72 6f |contains| the pro|
|00000dd0| 63 65 64 75 72 65 27 73 | 20 72 65 73 75 6c 74 73 |cedure's| results|
|00000de0| 2c 0a 61 6d 6f 6e 67 20 | 6f 74 68 65 72 20 74 68 |,.among |other th|
|00000df0| 69 6e 67 73 2e 20 20 4f | 6e 63 65 20 74 68 65 20 |ings. O|nce the |
|00000e00| 72 65 70 6c 79 20 6d 65 | 73 73 61 67 65 20 69 73 |reply me|ssage is|
|00000e10| 20 72 65 63 65 69 76 65 | 64 2c 20 74 68 65 20 72 | receive|d, the r|
|00000e20| 65 73 75 6c 74 73 0a 6f | 66 20 74 68 65 20 70 72 |esults.o|f the pr|
|00000e30| 6f 63 65 64 75 72 65 20 | 61 72 65 20 65 78 74 72 |ocedure |are extr|
|00000e40| 61 63 74 65 64 2c 20 61 | 6e 64 20 63 61 6c 6c 65 |acted, a|nd calle|
|00000e50| 72 27 73 20 65 78 65 63 | 75 74 69 6f 6e 20 69 73 |r's exec|ution is|
|00000e60| 20 72 65 73 75 6d 65 64 | 2e 0a 58 2e 4c 50 0a 4f | resumed|..X.LP.O|
|00000e70| 6e 20 74 68 65 20 73 65 | 72 76 65 72 20 73 69 64 |n the se|rver sid|
|00000e80| 65 2c 20 61 20 70 72 6f | 63 65 73 73 20 69 73 20 |e, a pro|cess is |
|00000e90| 64 6f 72 6d 61 6e 74 20 | 61 77 61 69 74 69 6e 67 |dormant |awaiting|
|00000ea0| 20 74 68 65 20 61 72 72 | 69 76 61 6c 20 6f 66 20 | the arr|ival of |
|00000eb0| 61 0a 63 61 6c 6c 20 6d | 65 73 73 61 67 65 2e 20 |a.call m|essage. |
|00000ec0| 20 57 68 65 6e 20 6f 6e | 65 20 61 72 72 69 76 65 | When on|e arrive|
|00000ed0| 73 2c 20 74 68 65 20 73 | 65 72 76 65 72 20 70 72 |s, the s|erver pr|
|00000ee0| 6f 63 65 73 73 20 65 78 | 74 72 61 63 74 73 20 74 |ocess ex|tracts t|
|00000ef0| 68 65 0a 70 72 6f 63 65 | 64 75 72 65 27 73 20 70 |he.proce|dure's p|
|00000f00| 61 72 61 6d 65 74 65 72 | 73 2c 20 63 6f 6d 70 75 |arameter|s, compu|
|00000f10| 74 65 73 20 74 68 65 20 | 72 65 73 75 6c 74 73 2c |tes the |results,|
|00000f20| 20 73 65 6e 64 73 20 61 | 20 72 65 70 6c 79 20 6d | sends a| reply m|
|00000f30| 65 73 73 61 67 65 2c 0a | 61 6e 64 20 74 68 65 6e |essage,.|and then|
|00000f40| 20 61 77 61 69 74 73 20 | 74 68 65 20 6e 65 78 74 | awaits |the next|
|00000f50| 20 63 61 6c 6c 20 6d 65 | 73 73 61 67 65 2e 0a 58 | call me|ssage..X|
|00000f60| 2e 4c 50 0a 4e 6f 74 65 | 20 74 68 61 74 20 69 6e |.LP.Note| that in|
|00000f70| 20 74 68 69 73 20 6d 6f | 64 65 6c 2c 20 6f 6e 6c | this mo|del, onl|
|00000f80| 79 20 6f 6e 65 20 6f 66 | 20 74 68 65 20 74 77 6f |y one of| the two|
|00000f90| 20 70 72 6f 63 65 73 73 | 65 73 20 69 73 20 61 63 | process|es is ac|
|00000fa0| 74 69 76 65 20 61 74 0a | 61 6e 79 20 67 69 76 65 |tive at.|any give|
|00000fb0| 6e 20 74 69 6d 65 2e 20 | 20 48 6f 77 65 76 65 72 |n time. | However|
|00000fc0| 2c 20 74 68 69 73 20 6d | 6f 64 65 6c 20 69 73 20 |, this m|odel is |
|00000fd0| 6f 6e 6c 79 20 67 69 76 | 65 6e 20 61 73 20 61 6e |only giv|en as an|
|00000fe0| 20 65 78 61 6d 70 6c 65 | 2e 0a 54 68 65 20 52 50 | example|..The RP|
|00000ff0| 43 20 70 72 6f 74 6f 63 | 6f 6c 20 6d 61 6b 65 73 |C protoc|ol makes|
|00001000| 20 6e 6f 20 72 65 73 74 | 72 69 63 74 69 6f 6e 73 | no rest|rictions|
|00001010| 20 6f 6e 20 74 68 65 20 | 63 6f 6e 63 75 72 72 65 | on the |concurre|
|00001020| 6e 63 79 20 6d 6f 64 65 | 6c 0a 69 6d 70 6c 65 6d |ncy mode|l.implem|
|00001030| 65 6e 74 65 64 2c 20 61 | 6e 64 20 6f 74 68 65 72 |ented, a|nd other|
|00001040| 73 20 61 72 65 20 70 6f | 73 73 69 62 6c 65 2e 20 |s are po|ssible. |
|00001050| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 61 6e | For exa|mple, an|
|00001060| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 0a | impleme|ntation.|
|00001070| 6d 61 79 20 63 68 6f 6f | 73 65 20 74 6f 20 68 61 |may choo|se to ha|
|00001080| 76 65 20 52 50 43 20 63 | 61 6c 6c 73 20 62 65 20 |ve RPC c|alls be |
|00001090| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 2c 20 73 6f |asynchro|nous, so|
|000010a0| 20 74 68 61 74 20 74 68 | 65 20 63 6c 69 65 6e 74 | that th|e client|
|000010b0| 20 6d 61 79 0a 64 6f 20 | 75 73 65 66 75 6c 20 77 | may.do |useful w|
|000010c0| 6f 72 6b 20 77 68 69 6c | 65 20 77 61 69 74 69 6e |ork whil|e waitin|
|000010d0| 67 20 66 6f 72 20 74 68 | 65 20 72 65 70 6c 79 20 |g for th|e reply |
|000010e0| 66 72 6f 6d 20 74 68 65 | 20 73 65 72 76 65 72 2e |from the| server.|
|000010f0| 20 20 41 6e 6f 74 68 65 | 72 0a 70 6f 73 73 69 62 | Anothe|r.possib|
|00001100| 69 6c 69 74 79 20 69 73 | 20 74 6f 20 68 61 76 65 |ility is| to have|
|00001110| 20 74 68 65 20 73 65 72 | 76 65 72 20 63 72 65 61 | the ser|ver crea|
|00001120| 74 65 20 61 20 74 61 73 | 6b 20 74 6f 20 70 72 6f |te a tas|k to pro|
|00001130| 63 65 73 73 20 61 6e 0a | 69 6e 63 6f 6d 69 6e 67 |cess an.|incoming|
|00001140| 20 72 65 71 75 65 73 74 | 2c 20 73 6f 20 74 68 61 | request|, so tha|
|00001150| 74 20 74 68 65 20 73 65 | 72 76 65 72 20 63 61 6e |t the se|rver can|
|00001160| 20 62 65 20 66 72 65 65 | 20 74 6f 20 72 65 63 65 | be free| to rece|
|00001170| 69 76 65 20 6f 74 68 65 | 72 0a 72 65 71 75 65 73 |ive othe|r.reques|
|00001180| 74 73 2e 0a 58 2e 4e 48 | 20 32 0a 5c 26 54 72 61 |ts..X.NH| 2.\&Tra|
|00001190| 6e 73 70 6f 72 74 73 20 | 61 6e 64 20 53 65 6d 61 |nsports |and Sema|
|000011a0| 6e 74 69 63 73 0a 58 2e | 4c 50 0a 54 68 65 20 52 |ntics.X.|LP.The R|
|000011b0| 50 43 20 70 72 6f 74 6f | 63 6f 6c 20 69 73 20 69 |PC proto|col is i|
|000011c0| 6e 64 65 70 65 6e 64 65 | 6e 74 20 6f 66 20 74 72 |ndepende|nt of tr|
|000011d0| 61 6e 73 70 6f 72 74 20 | 70 72 6f 74 6f 63 6f 6c |ansport |protocol|
|000011e0| 73 2e 20 20 54 68 61 74 | 20 69 73 2c 20 52 50 43 |s. That| is, RPC|
|000011f0| 0a 64 6f 65 73 20 6e 6f | 74 20 63 61 72 65 20 68 |.does no|t care h|
|00001200| 6f 77 20 61 20 6d 65 73 | 73 61 67 65 20 69 73 20 |ow a mes|sage is |
|00001210| 70 61 73 73 65 64 20 66 | 72 6f 6d 20 6f 6e 65 20 |passed f|rom one |
|00001220| 70 72 6f 63 65 73 73 20 | 74 6f 20 61 6e 6f 74 68 |process |to anoth|
|00001230| 65 72 2e 0a 54 68 65 20 | 70 72 6f 74 6f 63 6f 6c |er..The |protocol|
|00001240| 20 64 65 61 6c 73 20 6f | 6e 6c 79 20 77 69 74 68 | deals o|nly with|
|00001250| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 20 61 | specifi|cation a|
|00001260| 6e 64 20 69 6e 74 65 72 | 70 72 65 74 61 74 69 6f |nd inter|pretatio|
|00001270| 6e 20 6f 66 0a 6d 65 73 | 73 61 67 65 73 2e 0a 58 |n of.mes|sages..X|
|00001280| 2e 4c 50 0a 49 74 20 69 | 73 20 69 6d 70 6f 72 74 |.LP.It i|s import|
|00001290| 61 6e 74 20 74 6f 20 70 | 6f 69 6e 74 20 6f 75 74 |ant to p|oint out|
|000012a0| 20 74 68 61 74 20 52 50 | 43 20 64 6f 65 73 20 6e | that RP|C does n|
|000012b0| 6f 74 20 74 72 79 20 74 | 6f 20 69 6d 70 6c 65 6d |ot try t|o implem|
|000012c0| 65 6e 74 20 61 6e 79 0a | 6b 69 6e 64 20 6f 66 20 |ent any.|kind of |
|000012d0| 72 65 6c 69 61 62 69 6c | 69 74 79 20 61 6e 64 20 |reliabil|ity and |
|000012e0| 74 68 61 74 20 74 68 65 | 20 61 70 70 6c 69 63 61 |that the| applica|
|000012f0| 74 69 6f 6e 20 6d 75 73 | 74 20 62 65 20 61 77 61 |tion mus|t be awa|
|00001300| 72 65 20 6f 66 20 74 68 | 65 0a 74 79 70 65 20 6f |re of th|e.type o|
|00001310| 66 20 74 72 61 6e 73 70 | 6f 72 74 20 70 72 6f 74 |f transp|ort prot|
|00001320| 6f 63 6f 6c 20 75 6e 64 | 65 72 6e 65 61 74 68 20 |ocol und|erneath |
|00001330| 52 50 43 2e 20 20 49 66 | 20 69 74 20 6b 6e 6f 77 |RPC. If| it know|
|00001340| 73 20 69 74 20 69 73 20 | 72 75 6e 6e 69 6e 67 0a |s it is |running.|
|00001350| 6f 6e 20 74 6f 70 20 6f | 66 20 61 20 72 65 6c 69 |on top o|f a reli|
|00001360| 61 62 6c 65 20 74 72 61 | 6e 73 70 6f 72 74 20 73 |able tra|nsport s|
|00001370| 75 63 68 20 61 73 20 54 | 43 50 2f 49 50 5b 36 5d |uch as T|CP/IP[6]|
|00001380| 2c 20 74 68 65 6e 20 6d | 6f 73 74 20 6f 66 20 74 |, then m|ost of t|
|00001390| 68 65 0a 77 6f 72 6b 20 | 69 73 20 61 6c 72 65 61 |he.work |is alrea|
|000013a0| 64 79 20 64 6f 6e 65 20 | 66 6f 72 20 69 74 2e 20 |dy done |for it. |
|000013b0| 20 4f 6e 20 74 68 65 20 | 6f 74 68 65 72 20 68 61 | On the |other ha|
|000013c0| 6e 64 2c 20 69 66 20 69 | 74 20 69 73 20 72 75 6e |nd, if i|t is run|
|000013d0| 6e 69 6e 67 20 6f 6e 0a | 74 6f 70 20 6f 66 20 61 |ning on.|top of a|
|000013e0| 6e 20 75 6e 72 65 6c 69 | 61 62 6c 65 20 74 72 61 |n unreli|able tra|
|000013f0| 6e 73 70 6f 72 74 20 73 | 75 63 68 20 61 73 20 55 |nsport s|uch as U|
|00001400| 44 50 2f 49 50 5b 37 5d | 2c 20 69 74 20 6d 75 73 |DP/IP[7]|, it mus|
|00001410| 74 20 69 6d 70 6c 65 6d | 65 6e 74 0a 69 73 20 6f |t implem|ent.is o|
|00001420| 77 6e 20 72 65 74 72 61 | 6e 73 6d 69 73 73 69 6f |wn retra|nsmissio|
|00001430| 6e 20 61 6e 64 20 74 69 | 6d 65 2d 6f 75 74 20 70 |n and ti|me-out p|
|00001440| 6f 6c 69 63 79 20 61 73 | 20 74 68 65 20 52 50 43 |olicy as| the RPC|
|00001450| 20 6c 61 79 65 72 20 64 | 6f 65 73 20 6e 6f 74 0a | layer d|oes not.|
|00001460| 70 72 6f 76 69 64 65 20 | 74 68 69 73 20 73 65 72 |provide |this ser|
|00001470| 76 69 63 65 2e 0a 58 2e | 4c 50 0a 42 65 63 61 75 |vice..X.|LP.Becau|
|00001480| 73 65 20 6f 66 20 74 72 | 61 6e 73 70 6f 72 74 20 |se of tr|ansport |
|00001490| 69 6e 64 65 70 65 6e 64 | 65 6e 63 65 2c 20 74 68 |independ|ence, th|
|000014a0| 65 20 52 50 43 20 70 72 | 6f 74 6f 63 6f 6c 20 64 |e RPC pr|otocol d|
|000014b0| 6f 65 73 20 6e 6f 74 20 | 61 74 74 61 63 68 0a 73 |oes not |attach.s|
|000014c0| 70 65 63 69 66 69 63 20 | 73 65 6d 61 6e 74 69 63 |pecific |semantic|
|000014d0| 73 20 74 6f 20 74 68 65 | 20 72 65 6d 6f 74 65 20 |s to the| remote |
|000014e0| 70 72 6f 63 65 64 75 72 | 65 73 20 6f 72 20 74 68 |procedur|es or th|
|000014f0| 65 69 72 20 65 78 65 63 | 75 74 69 6f 6e 2e 0a 53 |eir exec|ution..S|
|00001500| 65 6d 61 6e 74 69 63 73 | 20 63 61 6e 20 62 65 20 |emantics| can be |
|00001510| 69 6e 66 65 72 72 65 64 | 20 66 72 6f 6d 20 28 62 |inferred| from (b|
|00001520| 75 74 20 73 68 6f 75 6c | 64 20 62 65 20 65 78 70 |ut shoul|d be exp|
|00001530| 6c 69 63 69 74 6c 79 20 | 73 70 65 63 69 66 69 65 |licitly |specifie|
|00001540| 64 0a 62 79 29 20 74 68 | 65 20 75 6e 64 65 72 6c |d.by) th|e underl|
|00001550| 79 69 6e 67 20 74 72 61 | 6e 73 70 6f 72 74 20 70 |ying tra|nsport p|
|00001560| 72 6f 74 6f 63 6f 6c 2e | 20 20 46 6f 72 20 65 78 |rotocol.| For ex|
|00001570| 61 6d 70 6c 65 2c 20 63 | 6f 6e 73 69 64 65 72 20 |ample, c|onsider |
|00001580| 52 50 43 0a 72 75 6e 6e | 69 6e 67 20 6f 6e 20 74 |RPC.runn|ing on t|
|00001590| 6f 70 20 6f 66 20 61 6e | 20 75 6e 72 65 6c 69 61 |op of an| unrelia|
|000015a0| 62 6c 65 20 74 72 61 6e | 73 70 6f 72 74 20 73 75 |ble tran|sport su|
|000015b0| 63 68 20 61 73 20 55 44 | 50 2f 49 50 2e 20 20 49 |ch as UD|P/IP. I|
|000015c0| 66 20 61 6e 0a 61 70 70 | 6c 69 63 61 74 69 6f 6e |f an.app|lication|
|000015d0| 20 72 65 74 72 61 6e 73 | 6d 69 74 73 20 52 50 43 | retrans|mits RPC|
|000015e0| 20 6d 65 73 73 61 67 65 | 73 20 61 66 74 65 72 20 | message|s after |
|000015f0| 73 68 6f 72 74 20 74 69 | 6d 65 2d 6f 75 74 73 2c |short ti|me-outs,|
|00001600| 20 74 68 65 20 6f 6e 6c | 79 0a 74 68 69 6e 67 20 | the onl|y.thing |
|00001610| 69 74 20 63 61 6e 20 69 | 6e 66 65 72 20 69 66 20 |it can i|nfer if |
|00001620| 69 74 20 72 65 63 65 69 | 76 65 73 20 6e 6f 20 72 |it recei|ves no r|
|00001630| 65 70 6c 79 20 69 73 20 | 74 68 61 74 20 74 68 65 |eply is |that the|
|00001640| 20 70 72 6f 63 65 64 75 | 72 65 20 77 61 73 0a 65 | procedu|re was.e|
|00001650| 78 65 63 75 74 65 64 20 | 7a 65 72 6f 20 6f 72 20 |xecuted |zero or |
|00001660| 6d 6f 72 65 20 74 69 6d | 65 73 2e 20 20 49 66 20 |more tim|es. If |
|00001670| 69 74 20 64 6f 65 73 20 | 72 65 63 65 69 76 65 20 |it does |receive |
|00001680| 61 20 72 65 70 6c 79 2c | 20 74 68 65 6e 20 69 74 |a reply,| then it|
|00001690| 20 63 61 6e 0a 69 6e 66 | 65 72 20 74 68 61 74 20 | can.inf|er that |
|000016a0| 74 68 65 20 70 72 6f 63 | 65 64 75 72 65 20 77 61 |the proc|edure wa|
|000016b0| 73 20 65 78 65 63 75 74 | 65 64 20 61 74 20 6c 65 |s execut|ed at le|
|000016c0| 61 73 74 20 6f 6e 63 65 | 2e 0a 58 2e 4c 50 0a 41 |ast once|..X.LP.A|
|000016d0| 20 73 65 72 76 65 72 20 | 6d 61 79 20 77 69 73 68 | server |may wish|
|000016e0| 20 74 6f 20 72 65 6d 65 | 6d 62 65 72 20 70 72 65 | to reme|mber pre|
|000016f0| 76 69 6f 75 73 6c 79 20 | 67 72 61 6e 74 65 64 20 |viously |granted |
|00001700| 72 65 71 75 65 73 74 73 | 20 66 72 6f 6d 20 61 0a |requests| from a.|
|00001710| 63 6c 69 65 6e 74 20 61 | 6e 64 20 6e 6f 74 20 72 |client a|nd not r|
|00001720| 65 67 72 61 6e 74 20 74 | 68 65 6d 20 69 6e 20 6f |egrant t|hem in o|
|00001730| 72 64 65 72 20 74 6f 20 | 69 6e 73 75 72 65 20 73 |rder to |insure s|
|00001740| 6f 6d 65 20 64 65 67 72 | 65 65 20 6f 66 0a 65 78 |ome degr|ee of.ex|
|00001750| 65 63 75 74 65 2d 61 74 | 2d 6d 6f 73 74 2d 6f 6e |ecute-at|-most-on|
|00001760| 63 65 20 73 65 6d 61 6e | 74 69 63 73 2e 20 20 41 |ce seman|tics. A|
|00001770| 20 73 65 72 76 65 72 20 | 63 61 6e 20 64 6f 20 74 | server |can do t|
|00001780| 68 69 73 20 62 79 20 74 | 61 6b 69 6e 67 0a 61 64 |his by t|aking.ad|
|00001790| 76 61 6e 74 61 67 65 20 | 6f 66 20 74 68 65 20 74 |vantage |of the t|
|000017a0| 72 61 6e 73 61 63 74 69 | 6f 6e 20 49 44 20 74 68 |ransacti|on ID th|
|000017b0| 61 74 20 69 73 20 70 61 | 63 6b 61 67 65 64 20 77 |at is pa|ckaged w|
|000017c0| 69 74 68 20 65 76 65 72 | 79 20 52 50 43 0a 72 65 |ith ever|y RPC.re|
|000017d0| 71 75 65 73 74 2e 20 20 | 54 68 65 20 6d 61 69 6e |quest. |The main|
|000017e0| 20 75 73 65 20 6f 66 20 | 74 68 69 73 20 74 72 61 | use of |this tra|
|000017f0| 6e 73 61 63 74 69 6f 6e | 20 69 73 20 62 79 20 74 |nsaction| is by t|
|00001800| 68 65 20 63 6c 69 65 6e | 74 20 52 50 43 20 6c 61 |he clien|t RPC la|
|00001810| 79 65 72 0a 69 6e 20 6d | 61 74 63 68 69 6e 67 20 |yer.in m|atching |
|00001820| 72 65 70 6c 69 65 73 20 | 74 6f 20 72 65 71 75 65 |replies |to reque|
|00001830| 73 74 73 2e 20 20 48 6f | 77 65 76 65 72 2c 20 61 |sts. Ho|wever, a|
|00001840| 20 63 6c 69 65 6e 74 20 | 61 70 70 6c 69 63 61 74 | client |applicat|
|00001850| 69 6f 6e 20 6d 61 79 0a | 63 68 6f 6f 73 65 20 74 |ion may.|choose t|
|00001860| 6f 20 72 65 75 73 65 20 | 69 74 73 20 70 72 65 76 |o reuse |its prev|
|00001870| 69 6f 75 73 20 74 72 61 | 6e 73 61 63 74 69 6f 6e |ious tra|nsaction|
|00001880| 20 49 44 20 77 68 65 6e | 20 72 65 74 72 61 6e 73 | ID when| retrans|
|00001890| 6d 69 74 74 69 6e 67 20 | 61 0a 72 65 71 75 65 73 |mitting |a.reques|
|000018a0| 74 2e 20 20 54 68 65 20 | 73 65 72 76 65 72 20 61 |t. The |server a|
|000018b0| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 6b 6e 6f 77 |pplicati|on, know|
|000018c0| 69 6e 67 20 74 68 69 73 | 20 66 61 63 74 2c 20 6d |ing this| fact, m|
|000018d0| 61 79 20 63 68 6f 6f 73 | 65 20 74 6f 0a 72 65 6d |ay choos|e to.rem|
|000018e0| 65 6d 62 65 72 20 74 68 | 69 73 20 49 44 20 61 66 |ember th|is ID af|
|000018f0| 74 65 72 20 67 72 61 6e | 74 69 6e 67 20 61 20 72 |ter gran|ting a r|
|00001900| 65 71 75 65 73 74 20 61 | 6e 64 20 6e 6f 74 20 72 |equest a|nd not r|
|00001910| 65 67 72 61 6e 74 20 72 | 65 71 75 65 73 74 73 0a |egrant r|equests.|
|00001920| 77 69 74 68 20 74 68 65 | 20 73 61 6d 65 20 49 44 |with the| same ID|
|00001930| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 61 63 68 | in orde|r to ach|
|00001940| 69 65 76 65 20 73 6f 6d | 65 20 64 65 67 72 65 65 |ieve som|e degree|
|00001950| 20 6f 66 0a 65 78 65 63 | 75 74 65 2d 61 74 2d 6d | of.exec|ute-at-m|
|00001960| 6f 73 74 2d 6f 6e 63 65 | 20 73 65 6d 61 6e 74 69 |ost-once| semanti|
|00001970| 63 73 2e 20 20 54 68 65 | 20 73 65 72 76 65 72 20 |cs. The| server |
|00001980| 69 73 20 6e 6f 74 20 61 | 6c 6c 6f 77 65 64 20 74 |is not a|llowed t|
|00001990| 6f 20 65 78 61 6d 69 6e | 65 0a 74 68 69 73 20 49 |o examin|e.this I|
|000019a0| 44 20 69 6e 20 61 6e 79 | 20 6f 74 68 65 72 20 77 |D in any| other w|
|000019b0| 61 79 20 65 78 63 65 70 | 74 20 61 73 20 61 20 74 |ay excep|t as a t|
|000019c0| 65 73 74 20 66 6f 72 20 | 65 71 75 61 6c 69 74 79 |est for |equality|
|000019d0| 2e 0a 58 2e 4c 50 0a 4f | 6e 20 74 68 65 20 6f 74 |..X.LP.O|n the ot|
|000019e0| 68 65 72 20 68 61 6e 64 | 2c 20 69 66 20 75 73 69 |her hand|, if usi|
|000019f0| 6e 67 20 61 20 72 65 6c | 69 61 62 6c 65 20 74 72 |ng a rel|iable tr|
|00001a00| 61 6e 73 70 6f 72 74 20 | 73 75 63 68 20 61 73 20 |ansport |such as |
|00001a10| 54 43 50 2f 49 50 2c 20 | 74 68 65 0a 61 70 70 6c |TCP/IP, |the.appl|
|00001a20| 69 63 61 74 69 6f 6e 20 | 63 61 6e 20 69 6e 66 65 |ication |can infe|
|00001a30| 72 20 66 72 6f 6d 20 61 | 20 72 65 70 6c 79 20 6d |r from a| reply m|
|00001a40| 65 73 73 61 67 65 20 74 | 68 61 74 20 74 68 65 20 |essage t|hat the |
|00001a50| 70 72 6f 63 65 64 75 72 | 65 20 77 61 73 0a 65 78 |procedur|e was.ex|
|00001a60| 65 63 75 74 65 64 20 65 | 78 61 63 74 6c 79 20 6f |ecuted e|xactly o|
|00001a70| 6e 63 65 2c 20 62 75 74 | 20 69 66 20 69 74 20 72 |nce, but| if it r|
|00001a80| 65 63 65 69 76 65 73 20 | 6e 6f 20 72 65 70 6c 79 |eceives |no reply|
|00001a90| 20 6d 65 73 73 61 67 65 | 2c 20 69 74 20 63 61 6e | message|, it can|
|00001aa0| 6e 6f 74 0a 61 73 73 75 | 6d 65 20 74 68 65 20 72 |not.assu|me the r|
|00001ab0| 65 6d 6f 74 65 20 70 72 | 6f 63 65 64 75 72 65 20 |emote pr|ocedure |
|00001ac0| 77 61 73 20 6e 6f 74 20 | 65 78 65 63 75 74 65 64 |was not |executed|
|00001ad0| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 65 76 65 |. Note |that eve|
|00001ae0| 6e 20 69 66 20 61 0a 63 | 6f 6e 6e 65 63 74 69 6f |n if a.c|onnectio|
|00001af0| 6e 2d 6f 72 69 65 6e 74 | 65 64 20 70 72 6f 74 6f |n-orient|ed proto|
|00001b00| 63 6f 6c 20 6c 69 6b 65 | 20 54 43 50 20 69 73 20 |col like| TCP is |
|00001b10| 75 73 65 64 2c 20 61 6e | 20 61 70 70 6c 69 63 61 |used, an| applica|
|00001b20| 74 69 6f 6e 20 73 74 69 | 6c 6c 0a 6e 65 65 64 73 |tion sti|ll.needs|
|00001b30| 20 74 69 6d 65 2d 6f 75 | 74 73 20 61 6e 64 20 72 | time-ou|ts and r|
|00001b40| 65 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 74 6f 20 68 |econnect|ion to h|
|00001b50| 61 6e 64 6c 65 20 73 65 | 72 76 65 72 20 63 72 61 |andle se|rver cra|
|00001b60| 73 68 65 73 2e 0a 58 2e | 4c 50 0a 54 68 65 72 65 |shes..X.|LP.There|
|00001b70| 20 61 72 65 20 6f 74 68 | 65 72 20 70 6f 73 73 69 | are oth|er possi|
|00001b80| 62 69 6c 69 74 69 65 73 | 20 66 6f 72 20 74 72 61 |bilities| for tra|
|00001b90| 6e 73 70 6f 72 74 73 20 | 62 65 73 69 64 65 73 20 |nsports |besides |
|00001ba0| 64 61 74 61 67 72 61 6d | 2d 20 6f 72 0a 63 6f 6e |datagram|- or.con|
|00001bb0| 6e 65 63 74 69 6f 6e 2d | 6f 72 69 65 6e 74 65 64 |nection-|oriented|
|00001bc0| 20 70 72 6f 74 6f 63 6f | 6c 73 2e 20 20 46 6f 72 | protoco|ls. For|
|00001bd0| 20 65 78 61 6d 70 6c 65 | 2c 20 61 20 72 65 71 75 | example|, a requ|
|00001be0| 65 73 74 2d 72 65 70 6c | 79 20 70 72 6f 74 6f 63 |est-repl|y protoc|
|00001bf0| 6f 6c 0a 73 75 63 68 20 | 61 73 20 56 4d 54 50 5b |ol.such |as VMTP[|
|00001c00| 32 5d 20 69 73 20 70 65 | 72 68 61 70 73 20 74 68 |2] is pe|rhaps th|
|00001c10| 65 20 6d 6f 73 74 20 6e | 61 74 75 72 61 6c 20 74 |e most n|atural t|
|00001c20| 72 61 6e 73 70 6f 72 74 | 20 66 6f 72 20 52 50 43 |ransport| for RPC|
|00001c30| 2e 0a 58 2e 53 48 0a 58 | 2e 49 0a 4e 4f 54 45 3a |..X.SH.X|.I.NOTE:|
|00001c40| 20 20 41 74 20 53 75 6e | 2c 20 52 50 43 20 69 73 | At Sun|, RPC is|
|00001c50| 20 63 75 72 72 65 6e 74 | 6c 79 20 69 6d 70 6c 65 | current|ly imple|
|00001c60| 6d 65 6e 74 65 64 20 6f | 6e 20 74 6f 70 20 6f 66 |mented o|n top of|
|00001c70| 20 62 6f 74 68 20 54 43 | 50 2f 49 50 0a 61 6e 64 | both TC|P/IP.and|
|00001c80| 20 55 44 50 2f 49 50 20 | 74 72 61 6e 73 70 6f 72 | UDP/IP |transpor|
|00001c90| 74 73 2e 0a 58 2e 4c 50 | 0a 58 2e 4e 48 20 32 0a |ts..X.LP|.X.NH 2.|
|00001ca0| 5c 26 42 69 6e 64 69 6e | 67 20 61 6e 64 20 52 65 |\&Bindin|g and Re|
|00001cb0| 6e 64 65 7a 76 6f 75 73 | 20 49 6e 64 65 70 65 6e |ndezvous| Indepen|
|00001cc0| 64 65 6e 63 65 0a 58 2e | 4c 50 0a 54 68 65 20 61 |dence.X.|LP.The a|
|00001cd0| 63 74 20 6f 66 20 62 69 | 6e 64 69 6e 67 20 61 20 |ct of bi|nding a |
|00001ce0| 63 6c 69 65 6e 74 20 74 | 6f 20 61 20 73 65 72 76 |client t|o a serv|
|00001cf0| 69 63 65 20 69 73 20 4e | 4f 54 20 70 61 72 74 20 |ice is N|OT part |
|00001d00| 6f 66 20 74 68 65 20 72 | 65 6d 6f 74 65 0a 70 72 |of the r|emote.pr|
|00001d10| 6f 63 65 64 75 72 65 20 | 63 61 6c 6c 20 73 70 65 |ocedure |call spe|
|00001d20| 63 69 66 69 63 61 74 69 | 6f 6e 2e 20 20 54 68 69 |cificati|on. Thi|
|00001d30| 73 20 69 6d 70 6f 72 74 | 61 6e 74 20 61 6e 64 20 |s import|ant and |
|00001d40| 6e 65 63 65 73 73 61 72 | 79 20 66 75 6e 63 74 69 |necessar|y functi|
|00001d50| 6f 6e 0a 69 73 20 6c 65 | 66 74 20 75 70 20 74 6f |on.is le|ft up to|
|00001d60| 20 73 6f 6d 65 20 68 69 | 67 68 65 72 2d 6c 65 76 | some hi|gher-lev|
|00001d70| 65 6c 20 73 6f 66 74 77 | 61 72 65 2e 20 20 28 54 |el softw|are. (T|
|00001d80| 68 65 20 73 6f 66 74 77 | 61 72 65 20 6d 61 79 20 |he softw|are may |
|00001d90| 75 73 65 20 52 50 43 0a | 69 74 73 65 6c 66 5c 28 |use RPC.|itself\(|
|00001da0| 65 6d 73 65 65 20 74 68 | 65 20 5c 66 49 50 6f 72 |emsee th|e \fIPor|
|00001db0| 74 20 4d 61 70 70 65 72 | 20 50 72 6f 67 72 61 6d |t Mapper| Program|
|00001dc0| 20 50 72 6f 74 6f 63 6f | 6c 5c 66 50 5c 2c 20 62 | Protoco|l\fP\, b|
|00001dd0| 65 6c 6f 77 29 2e 0a 58 | 2e 4c 50 0a 49 6d 70 6c |elow)..X|.LP.Impl|
|00001de0| 65 6d 65 6e 74 6f 72 73 | 20 73 68 6f 75 6c 64 20 |ementors| should |
|00001df0| 74 68 69 6e 6b 20 6f 66 | 20 74 68 65 20 52 50 43 |think of| the RPC|
|00001e00| 20 70 72 6f 74 6f 63 6f | 6c 20 61 73 20 74 68 65 | protoco|l as the|
|00001e10| 20 6a 75 6d 70 2d 73 75 | 62 72 6f 75 74 69 6e 65 | jump-su|broutine|
|00001e20| 0a 69 6e 73 74 72 75 63 | 74 69 6f 6e 20 28 22 4a |.instruc|tion ("J|
|00001e30| 53 52 22 29 20 6f 66 20 | 61 20 6e 65 74 77 6f 72 |SR") of |a networ|
|00001e40| 6b 3b 20 74 68 65 20 6c | 6f 61 64 65 72 20 28 62 |k; the l|oader (b|
|00001e50| 69 6e 64 65 72 29 20 6d | 61 6b 65 73 20 4a 53 52 |inder) m|akes JSR|
|00001e60| 0a 75 73 65 66 75 6c 2c | 20 61 6e 64 20 74 68 65 |.useful,| and the|
|00001e70| 20 6c 6f 61 64 65 72 20 | 69 74 73 65 6c 66 20 75 | loader |itself u|
|00001e80| 73 65 73 20 4a 53 52 20 | 74 6f 20 61 63 63 6f 6d |ses JSR |to accom|
|00001e90| 70 6c 69 73 68 20 69 74 | 73 20 74 61 73 6b 2e 0a |plish it|s task..|
|00001ea0| 4c 69 6b 65 77 69 73 65 | 2c 20 74 68 65 20 6e 65 |Likewise|, the ne|
|00001eb0| 74 77 6f 72 6b 20 6d 61 | 6b 65 73 20 52 50 43 20 |twork ma|kes RPC |
|00001ec0| 75 73 65 66 75 6c 2c 20 | 75 73 69 6e 67 20 52 50 |useful, |using RP|
|00001ed0| 43 20 74 6f 20 61 63 63 | 6f 6d 70 6c 69 73 68 20 |C to acc|omplish |
|00001ee0| 74 68 69 73 0a 74 61 73 | 6b 2e 0a 58 2e 4e 48 20 |this.tas|k..X.NH |
|00001ef0| 32 0a 5c 26 41 75 74 68 | 65 6e 74 69 63 61 74 69 |2.\&Auth|enticati|
|00001f00| 6f 6e 0a 58 2e 4c 50 0a | 54 68 65 20 52 50 43 20 |on.X.LP.|The RPC |
|00001f10| 70 72 6f 74 6f 63 6f 6c | 20 70 72 6f 76 69 64 65 |protocol| provide|
|00001f20| 73 20 74 68 65 20 66 69 | 65 6c 64 73 20 6e 65 63 |s the fi|elds nec|
|00001f30| 65 73 73 61 72 79 20 66 | 6f 72 20 61 20 63 6c 69 |essary f|or a cli|
|00001f40| 65 6e 74 20 74 6f 0a 69 | 64 65 6e 74 69 66 79 20 |ent to.i|dentify |
|00001f50| 69 74 73 65 6c 66 20 74 | 6f 20 61 20 73 65 72 76 |itself t|o a serv|
|00001f60| 69 63 65 20 61 6e 64 20 | 76 69 63 65 2d 76 65 72 |ice and |vice-ver|
|00001f70| 73 61 2e 20 20 53 65 63 | 75 72 69 74 79 20 61 6e |sa. Sec|urity an|
|00001f80| 64 20 61 63 63 65 73 73 | 0a 63 6f 6e 74 72 6f 6c |d access|.control|
|00001f90| 20 6d 65 63 68 61 6e 69 | 73 6d 73 20 63 61 6e 20 | mechani|sms can |
|00001fa0| 62 65 20 62 75 69 6c 74 | 20 6f 6e 20 74 6f 70 20 |be built| on top |
|00001fb0| 6f 66 20 74 68 65 20 6d | 65 73 73 61 67 65 20 61 |of the m|essage a|
|00001fc0| 75 74 68 65 6e 74 69 63 | 61 74 69 6f 6e 2e 0a 53 |uthentic|ation..S|
|00001fd0| 65 76 65 72 61 6c 20 64 | 69 66 66 65 72 65 6e 74 |everal d|ifferent|
|00001fe0| 20 61 75 74 68 65 6e 74 | 69 63 61 74 69 6f 6e 20 | authent|ication |
|00001ff0| 70 72 6f 74 6f 63 6f 6c | 73 20 63 61 6e 20 62 65 |protocol|s can be|
|00002000| 20 73 75 70 70 6f 72 74 | 65 64 2e 20 20 41 20 66 | support|ed. A f|
|00002010| 69 65 6c 64 0a 69 6e 20 | 74 68 65 20 52 50 43 20 |ield.in |the RPC |
|00002020| 68 65 61 64 65 72 20 69 | 6e 64 69 63 61 74 65 73 |header i|ndicates|
|00002030| 20 77 68 69 63 68 20 70 | 72 6f 74 6f 63 6f 6c 20 | which p|rotocol |
|00002040| 69 73 20 62 65 69 6e 67 | 20 75 73 65 64 2e 20 20 |is being| used. |
|00002050| 4d 6f 72 65 0a 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |More.inf|ormation|
|00002060| 20 6f 6e 20 73 70 65 63 | 69 66 69 63 20 61 75 74 | on spec|ific aut|
|00002070| 68 65 6e 74 69 63 61 74 | 69 6f 6e 20 70 72 6f 74 |henticat|ion prot|
|00002080| 6f 63 6f 6c 73 20 63 61 | 6e 20 62 65 20 66 6f 75 |ocols ca|n be fou|
|00002090| 6e 64 20 69 6e 20 74 68 | 65 0a 5c 66 49 41 75 74 |nd in th|e.\fIAut|
|000020a0| 68 65 6e 74 69 63 61 74 | 69 6f 6e 20 50 72 6f 74 |henticat|ion Prot|
|000020b0| 6f 63 6f 6c 73 5c 66 50 | 5c 2c 0a 62 65 6c 6f 77 |ocols\fP|\,.below|
|000020c0| 2e 0a 58 2e 4b 53 0a 58 | 2e 4e 48 20 31 0a 5c 26 |..X.KS.X|.NH 1.\&|
|000020d0| 52 50 43 20 50 72 6f 74 | 6f 63 6f 6c 20 52 65 71 |RPC Prot|ocol Req|
|000020e0| 75 69 72 65 6d 65 6e 74 | 73 0a 58 2e 4c 50 0a 54 |uirement|s.X.LP.T|
|000020f0| 68 65 20 52 50 43 20 70 | 72 6f 74 6f 63 6f 6c 20 |he RPC p|rotocol |
|00002100| 6d 75 73 74 20 70 72 6f | 76 69 64 65 20 66 6f 72 |must pro|vide for|
|00002110| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 3a 0a | the fol|lowing:.|
|00002120| 58 2e 49 50 20 20 31 2e | 0a 55 6e 69 71 75 65 20 |X.IP 1.|.Unique |
|00002130| 73 70 65 63 69 66 69 63 | 61 74 69 6f 6e 20 6f 66 |specific|ation of|
|00002140| 20 61 20 70 72 6f 63 65 | 64 75 72 65 20 74 6f 20 | a proce|dure to |
|00002150| 62 65 20 63 61 6c 6c 65 | 64 2e 0a 58 2e 49 50 20 |be calle|d..X.IP |
|00002160| 20 32 2e 0a 50 72 6f 76 | 69 73 69 6f 6e 73 20 66 | 2..Prov|isions f|
|00002170| 6f 72 20 6d 61 74 63 68 | 69 6e 67 20 72 65 73 70 |or match|ing resp|
|00002180| 6f 6e 73 65 20 6d 65 73 | 73 61 67 65 73 20 74 6f |onse mes|sages to|
|00002190| 20 72 65 71 75 65 73 74 | 20 6d 65 73 73 61 67 65 | request| message|
|000021a0| 73 2e 0a 58 2e 4b 45 0a | 58 2e 49 50 20 20 33 2e |s..X.KE.|X.IP 3.|
|000021b0| 0a 50 72 6f 76 69 73 69 | 6f 6e 73 20 66 6f 72 20 |.Provisi|ons for |
|000021c0| 61 75 74 68 65 6e 74 69 | 63 61 74 69 6e 67 20 74 |authenti|cating t|
|000021d0| 68 65 20 63 61 6c 6c 65 | 72 20 74 6f 20 73 65 72 |he calle|r to ser|
|000021e0| 76 69 63 65 20 61 6e 64 | 20 76 69 63 65 2d 76 65 |vice and| vice-ve|
|000021f0| 72 73 61 2e 0a 58 2e 4c | 50 0a 42 65 73 69 64 65 |rsa..X.L|P.Beside|
|00002200| 73 20 74 68 65 73 65 20 | 72 65 71 75 69 72 65 6d |s these |requirem|
|00002210| 65 6e 74 73 2c 20 66 65 | 61 74 75 72 65 73 20 74 |ents, fe|atures t|
|00002220| 68 61 74 20 64 65 74 65 | 63 74 20 74 68 65 20 66 |hat dete|ct the f|
|00002230| 6f 6c 6c 6f 77 69 6e 67 | 20 61 72 65 0a 77 6f 72 |ollowing| are.wor|
|00002240| 74 68 20 73 75 70 70 6f | 72 74 69 6e 67 20 62 65 |th suppo|rting be|
|00002250| 63 61 75 73 65 20 6f 66 | 20 70 72 6f 74 6f 63 6f |cause of| protoco|
|00002260| 6c 20 72 6f 6c 6c 2d 6f | 76 65 72 20 65 72 72 6f |l roll-o|ver erro|
|00002270| 72 73 2c 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |rs, impl|ementati|
|00002280| 6f 6e 0a 62 75 67 73 2c | 20 75 73 65 72 20 65 72 |on.bugs,| user er|
|00002290| 72 6f 72 2c 20 61 6e 64 | 20 6e 65 74 77 6f 72 6b |ror, and| network|
|000022a0| 20 61 64 6d 69 6e 69 73 | 74 72 61 74 69 6f 6e 3a | adminis|tration:|
|000022b0| 0a 58 2e 49 50 20 20 31 | 2e 0a 52 50 43 20 70 72 |.X.IP 1|..RPC pr|
|000022c0| 6f 74 6f 63 6f 6c 20 6d | 69 73 6d 61 74 63 68 65 |otocol m|ismatche|
|000022d0| 73 2e 0a 58 2e 49 50 20 | 20 32 2e 0a 52 65 6d 6f |s..X.IP | 2..Remo|
|000022e0| 74 65 20 70 72 6f 67 72 | 61 6d 20 70 72 6f 74 6f |te progr|am proto|
|000022f0| 63 6f 6c 20 76 65 72 73 | 69 6f 6e 20 6d 69 73 6d |col vers|ion mism|
|00002300| 61 74 63 68 65 73 2e 0a | 58 2e 49 50 20 20 33 2e |atches..|X.IP 3.|
|00002310| 0a 50 72 6f 74 6f 63 6f | 6c 20 65 72 72 6f 72 73 |.Protoco|l errors|
|00002320| 20 28 73 75 63 68 20 61 | 73 20 6d 69 73 73 70 65 | (such a|s misspe|
|00002330| 63 69 66 69 63 61 74 69 | 6f 6e 20 6f 66 20 61 20 |cificati|on of a |
|00002340| 70 72 6f 63 65 64 75 72 | 65 27 73 20 70 61 72 61 |procedur|e's para|
|00002350| 6d 65 74 65 72 73 29 2e | 0a 58 2e 49 50 20 20 34 |meters).|.X.IP 4|
|00002360| 2e 0a 52 65 61 73 6f 6e | 73 20 77 68 79 20 72 65 |..Reason|s why re|
|00002370| 6d 6f 74 65 20 61 75 74 | 68 65 6e 74 69 63 61 74 |mote aut|henticat|
|00002380| 69 6f 6e 20 66 61 69 6c | 65 64 2e 0a 58 2e 49 50 |ion fail|ed..X.IP|
|00002390| 20 20 35 2e 0a 41 6e 79 | 20 6f 74 68 65 72 20 72 | 5..Any| other r|
|000023a0| 65 61 73 6f 6e 73 20 77 | 68 79 20 74 68 65 20 64 |easons w|hy the d|
|000023b0| 65 73 69 72 65 64 20 70 | 72 6f 63 65 64 75 72 65 |esired p|rocedure|
|000023c0| 20 77 61 73 20 6e 6f 74 | 20 63 61 6c 6c 65 64 2e | was not| called.|
|000023d0| 0a 58 2e 4e 48 20 32 0a | 5c 26 50 72 6f 67 72 61 |.X.NH 2.|\&Progra|
|000023e0| 6d 73 20 61 6e 64 20 50 | 72 6f 63 65 64 75 72 65 |ms and P|rocedure|
|000023f0| 73 0a 58 2e 4c 50 0a 54 | 68 65 20 52 50 43 20 63 |s.X.LP.T|he RPC c|
|00002400| 61 6c 6c 20 6d 65 73 73 | 61 67 65 20 68 61 73 20 |all mess|age has |
|00002410| 74 68 72 65 65 20 75 6e | 73 69 67 6e 65 64 20 66 |three un|signed f|
|00002420| 69 65 6c 64 73 3a 20 20 | 72 65 6d 6f 74 65 20 70 |ields: |remote p|
|00002430| 72 6f 67 72 61 6d 0a 6e | 75 6d 62 65 72 2c 20 72 |rogram.n|umber, r|
|00002440| 65 6d 6f 74 65 20 70 72 | 6f 67 72 61 6d 20 76 65 |emote pr|ogram ve|
|00002450| 72 73 69 6f 6e 20 6e 75 | 6d 62 65 72 2c 20 61 6e |rsion nu|mber, an|
|00002460| 64 20 72 65 6d 6f 74 65 | 20 70 72 6f 63 65 64 75 |d remote| procedu|
|00002470| 72 65 20 6e 75 6d 62 65 | 72 2e 0a 54 68 65 20 74 |re numbe|r..The t|
|00002480| 68 72 65 65 20 66 69 65 | 6c 64 73 20 75 6e 69 71 |hree fie|lds uniq|
|00002490| 75 65 6c 79 20 69 64 65 | 6e 74 69 66 79 20 74 68 |uely ide|ntify th|
|000024a0| 65 20 70 72 6f 63 65 64 | 75 72 65 20 74 6f 20 62 |e proced|ure to b|
|000024b0| 65 20 63 61 6c 6c 65 64 | 2e 0a 50 72 6f 67 72 61 |e called|..Progra|
|000024c0| 6d 20 6e 75 6d 62 65 72 | 73 20 61 72 65 20 61 64 |m number|s are ad|
|000024d0| 6d 69 6e 69 73 74 65 72 | 65 64 20 62 79 20 73 6f |minister|ed by so|
|000024e0| 6d 65 20 63 65 6e 74 72 | 61 6c 20 61 75 74 68 6f |me centr|al autho|
|000024f0| 72 69 74 79 20 28 6c 69 | 6b 65 0a 53 75 6e 29 2e |rity (li|ke.Sun).|
|00002500| 20 20 4f 6e 63 65 20 61 | 6e 20 69 6d 70 6c 65 6d | Once a|n implem|
|00002510| 65 6e 74 6f 72 20 68 61 | 73 20 61 20 70 72 6f 67 |entor ha|s a prog|
|00002520| 72 61 6d 20 6e 75 6d 62 | 65 72 2c 20 68 65 20 63 |ram numb|er, he c|
|00002530| 61 6e 20 69 6d 70 6c 65 | 6d 65 6e 74 20 68 69 73 |an imple|ment his|
|00002540| 0a 72 65 6d 6f 74 65 20 | 70 72 6f 67 72 61 6d 3b |.remote |program;|
|00002550| 20 74 68 65 20 66 69 72 | 73 74 20 69 6d 70 6c 65 | the fir|st imple|
|00002560| 6d 65 6e 74 61 74 69 6f | 6e 20 77 6f 75 6c 64 20 |mentatio|n would |
|00002570| 6d 6f 73 74 20 6c 69 6b | 65 6c 79 20 68 61 76 65 |most lik|ely have|
|00002580| 20 74 68 65 0a 76 65 72 | 73 69 6f 6e 20 6e 75 6d | the.ver|sion num|
|00002590| 62 65 72 20 6f 66 20 31 | 2e 20 20 42 65 63 61 75 |ber of 1|. Becau|
|000025a0| 73 65 20 6d 6f 73 74 20 | 6e 65 77 20 70 72 6f 74 |se most |new prot|
|000025b0| 6f 63 6f 6c 73 20 65 76 | 6f 6c 76 65 20 69 6e 74 |ocols ev|olve int|
|000025c0| 6f 20 62 65 74 74 65 72 | 2c 0a 73 74 61 62 6c 65 |o better|,.stable|
|000025d0| 2c 20 61 6e 64 20 6d 61 | 74 75 72 65 20 70 72 6f |, and ma|ture pro|
|000025e0| 74 6f 63 6f 6c 73 2c 20 | 61 20 76 65 72 73 69 6f |tocols, |a versio|
|000025f0| 6e 20 66 69 65 6c 64 20 | 6f 66 20 74 68 65 20 63 |n field |of the c|
|00002600| 61 6c 6c 20 6d 65 73 73 | 61 67 65 0a 69 64 65 6e |all mess|age.iden|
|00002610| 74 69 66 69 65 73 20 77 | 68 69 63 68 20 76 65 72 |tifies w|hich ver|
|00002620| 73 69 6f 6e 20 6f 66 20 | 74 68 65 20 70 72 6f 74 |sion of |the prot|
|00002630| 6f 63 6f 6c 20 74 68 65 | 20 63 61 6c 6c 65 72 20 |ocol the| caller |
|00002640| 69 73 20 75 73 69 6e 67 | 2e 0a 56 65 72 73 69 6f |is using|..Versio|
|00002650| 6e 20 6e 75 6d 62 65 72 | 73 20 6d 61 6b 65 20 73 |n number|s make s|
|00002660| 70 65 61 6b 69 6e 67 20 | 6f 6c 64 20 61 6e 64 20 |peaking |old and |
|00002670| 6e 65 77 20 70 72 6f 74 | 6f 63 6f 6c 73 20 74 68 |new prot|ocols th|
|00002680| 72 6f 75 67 68 20 74 68 | 65 20 73 61 6d 65 0a 73 |rough th|e same.s|
|00002690| 65 72 76 65 72 20 70 72 | 6f 63 65 73 73 20 70 6f |erver pr|ocess po|
|000026a0| 73 73 69 62 6c 65 2e 0a | 58 2e 4c 50 0a 54 68 65 |ssible..|X.LP.The|
|000026b0| 20 70 72 6f 63 65 64 75 | 72 65 20 6e 75 6d 62 65 | procedu|re numbe|
|000026c0| 72 20 69 64 65 6e 74 69 | 66 69 65 73 20 74 68 65 |r identi|fies the|
|000026d0| 20 70 72 6f 63 65 64 75 | 72 65 20 74 6f 20 62 65 | procedu|re to be|
|000026e0| 20 63 61 6c 6c 65 64 2e | 20 20 54 68 65 73 65 0a | called.| These.|
|000026f0| 6e 75 6d 62 65 72 73 20 | 61 72 65 20 64 6f 63 75 |numbers |are docu|
|00002700| 6d 65 6e 74 65 64 20 69 | 6e 20 74 68 65 20 73 70 |mented i|n the sp|
|00002710| 65 63 69 66 69 63 20 70 | 72 6f 67 72 61 6d 27 73 |ecific p|rogram's|
|00002720| 20 70 72 6f 74 6f 63 6f | 6c 0a 73 70 65 63 69 66 | protoco|l.specif|
|00002730| 69 63 61 74 69 6f 6e 2e | 20 20 46 6f 72 20 65 78 |ication.| For ex|
|00002740| 61 6d 70 6c 65 2c 20 61 | 20 66 69 6c 65 20 73 65 |ample, a| file se|
|00002750| 72 76 69 63 65 27 73 20 | 70 72 6f 74 6f 63 6f 6c |rvice's |protocol|
|00002760| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 0a 6d | specifi|cation.m|
|00002770| 61 79 20 73 74 61 74 65 | 20 74 68 61 74 20 69 74 |ay state| that it|
|00002780| 73 20 70 72 6f 63 65 64 | 75 72 65 20 6e 75 6d 62 |s proced|ure numb|
|00002790| 65 72 20 35 20 69 73 20 | 22 72 65 61 64 22 20 61 |er 5 is |"read" a|
|000027a0| 6e 64 20 70 72 6f 63 65 | 64 75 72 65 20 6e 75 6d |nd proce|dure num|
|000027b0| 62 65 72 0a 31 32 20 69 | 73 20 22 77 72 69 74 65 |ber.12 i|s "write|
|000027c0| 22 2e 0a 58 2e 4c 50 0a | 4a 75 73 74 20 61 73 20 |"..X.LP.|Just as |
|000027d0| 72 65 6d 6f 74 65 20 70 | 72 6f 67 72 61 6d 20 70 |remote p|rogram p|
|000027e0| 72 6f 74 6f 63 6f 6c 73 | 20 6d 61 79 20 63 68 61 |rotocols| may cha|
|000027f0| 6e 67 65 20 6f 76 65 72 | 20 73 65 76 65 72 61 6c |nge over| several|
|00002800| 20 76 65 72 73 69 6f 6e | 73 2c 0a 74 68 65 20 61 | version|s,.the a|
|00002810| 63 74 75 61 6c 20 52 50 | 43 20 6d 65 73 73 61 67 |ctual RP|C messag|
|00002820| 65 20 70 72 6f 74 6f 63 | 6f 6c 20 63 6f 75 6c 64 |e protoc|ol could|
|00002830| 20 61 6c 73 6f 20 63 68 | 61 6e 67 65 2e 20 20 54 | also ch|ange. T|
|00002840| 68 65 72 65 66 6f 72 65 | 2c 20 74 68 65 0a 63 61 |herefore|, the.ca|
|00002850| 6c 6c 20 6d 65 73 73 61 | 67 65 20 61 6c 73 6f 20 |ll messa|ge also |
|00002860| 68 61 73 20 69 6e 20 69 | 74 20 74 68 65 20 52 50 |has in i|t the RP|
|00002870| 43 20 76 65 72 73 69 6f | 6e 20 6e 75 6d 62 65 72 |C versio|n number|
|00002880| 2c 20 77 68 69 63 68 20 | 69 73 20 61 6c 77 61 79 |, which |is alway|
|00002890| 73 0a 65 71 75 61 6c 20 | 74 6f 20 74 77 6f 20 66 |s.equal |to two f|
|000028a0| 6f 72 20 74 68 65 20 76 | 65 72 73 69 6f 6e 20 6f |or the v|ersion o|
|000028b0| 66 20 52 50 43 20 64 65 | 73 63 72 69 62 65 64 20 |f RPC de|scribed |
|000028c0| 68 65 72 65 2e 0a 58 2e | 4c 50 0a 54 68 65 20 72 |here..X.|LP.The r|
|000028d0| 65 70 6c 79 20 6d 65 73 | 73 61 67 65 20 74 6f 20 |eply mes|sage to |
|000028e0| 61 20 72 65 71 75 65 73 | 74 20 20 6d 65 73 73 61 |a reques|t messa|
|000028f0| 67 65 20 20 68 61 73 20 | 65 6e 6f 75 67 68 20 20 |ge has |enough |
|00002900| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 74 6f 0a 64 |informat|ion to.d|
|00002910| 69 73 74 69 6e 67 75 69 | 73 68 20 74 68 65 20 66 |istingui|sh the f|
|00002920| 6f 6c 6c 6f 77 69 6e 67 | 20 65 72 72 6f 72 20 63 |ollowing| error c|
|00002930| 6f 6e 64 69 74 69 6f 6e | 73 3a 0a 58 2e 49 50 20 |ondition|s:.X.IP |
|00002940| 20 31 2e 0a 54 68 65 20 | 72 65 6d 6f 74 65 20 69 | 1..The |remote i|
|00002950| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|00002960| 20 52 50 43 20 64 6f 65 | 73 20 73 70 65 61 6b 20 | RPC doe|s speak |
|00002970| 70 72 6f 74 6f 63 6f 6c | 20 76 65 72 73 69 6f 6e |protocol| version|
|00002980| 20 32 2e 0a 54 68 65 20 | 6c 6f 77 65 73 74 20 61 | 2..The |lowest a|
|00002990| 6e 64 20 68 69 67 68 65 | 73 74 20 73 75 70 70 6f |nd highe|st suppo|
|000029a0| 72 74 65 64 20 52 50 43 | 20 76 65 72 73 69 6f 6e |rted RPC| version|
|000029b0| 20 6e 75 6d 62 65 72 73 | 20 61 72 65 20 72 65 74 | numbers| are ret|
|000029c0| 75 72 6e 65 64 2e 0a 58 | 2e 49 50 20 20 32 2e 0a |urned..X|.IP 2..|
|000029d0| 54 68 65 20 72 65 6d 6f | 74 65 20 70 72 6f 67 72 |The remo|te progr|
|000029e0| 61 6d 20 69 73 20 6e 6f | 74 20 61 76 61 69 6c 61 |am is no|t availa|
|000029f0| 62 6c 65 20 6f 6e 20 74 | 68 65 20 72 65 6d 6f 74 |ble on t|he remot|
|00002a00| 65 20 73 79 73 74 65 6d | 2e 0a 58 2e 49 50 20 20 |e system|..X.IP |
|00002a10| 33 2e 0a 54 68 65 20 72 | 65 6d 6f 74 65 20 70 72 |3..The r|emote pr|
|00002a20| 6f 67 72 61 6d 20 64 6f | 65 73 20 6e 6f 74 20 73 |ogram do|es not s|
|00002a30| 75 70 70 6f 72 74 20 74 | 68 65 20 72 65 71 75 65 |upport t|he reque|
|00002a40| 73 74 65 64 20 76 65 72 | 73 69 6f 6e 20 6e 75 6d |sted ver|sion num|
|00002a50| 62 65 72 2e 0a 54 68 65 | 20 6c 6f 77 65 73 74 20 |ber..The| lowest |
|00002a60| 61 6e 64 20 68 69 67 68 | 65 73 74 20 73 75 70 70 |and high|est supp|
|00002a70| 6f 72 74 65 64 20 72 65 | 6d 6f 74 65 20 70 72 6f |orted re|mote pro|
|00002a80| 67 72 61 6d 20 76 65 72 | 73 69 6f 6e 20 6e 75 6d |gram ver|sion num|
|00002a90| 62 65 72 73 20 61 72 65 | 0a 72 65 74 75 72 6e 65 |bers are|.returne|
|00002aa0| 64 2e 0a 58 2e 49 50 20 | 20 34 2e 0a 54 68 65 20 |d..X.IP | 4..The |
|00002ab0| 72 65 71 75 65 73 74 65 | 64 20 70 72 6f 63 65 64 |requeste|d proced|
|00002ac0| 75 72 65 20 6e 75 6d 62 | 65 72 20 64 6f 65 73 20 |ure numb|er does |
|00002ad0| 6e 6f 74 20 65 78 69 73 | 74 2e 20 20 28 54 68 69 |not exis|t. (Thi|
|00002ae0| 73 20 69 73 20 75 73 75 | 61 6c 6c 79 20 61 0a 63 |s is usu|ally a.c|
|00002af0| 61 6c 6c 65 72 20 73 69 | 64 65 20 70 72 6f 74 6f |aller si|de proto|
|00002b00| 63 6f 6c 20 6f 72 20 70 | 72 6f 67 72 61 6d 6d 69 |col or p|rogrammi|
|00002b10| 6e 67 20 65 72 72 6f 72 | 2e 29 0a 58 2e 49 50 20 |ng error|.).X.IP |
|00002b20| 20 35 2e 0a 54 68 65 20 | 70 61 72 61 6d 65 74 65 | 5..The |paramete|
|00002b30| 72 73 20 74 6f 20 74 68 | 65 20 72 65 6d 6f 74 65 |rs to th|e remote|
|00002b40| 20 70 72 6f 63 65 64 75 | 72 65 20 61 70 70 65 61 | procedu|re appea|
|00002b50| 72 20 74 6f 20 62 65 20 | 67 61 72 62 61 67 65 20 |r to be |garbage |
|00002b60| 66 72 6f 6d 20 74 68 65 | 0a 73 65 72 76 65 72 27 |from the|.server'|
|00002b70| 73 20 70 6f 69 6e 74 20 | 6f 66 20 76 69 65 77 2e |s point |of view.|
|00002b80| 20 20 28 41 67 61 69 6e | 2c 20 74 68 69 73 20 69 | (Again|, this i|
|00002b90| 73 20 75 73 75 61 6c 6c | 79 20 63 61 75 73 65 64 |s usuall|y caused|
|00002ba0| 20 62 79 20 61 0a 64 69 | 73 61 67 72 65 65 6d 65 | by a.di|sagreeme|
|00002bb0| 6e 74 20 61 62 6f 75 74 | 20 74 68 65 20 70 72 6f |nt about| the pro|
|00002bc0| 74 6f 63 6f 6c 20 62 65 | 74 77 65 65 6e 20 63 6c |tocol be|tween cl|
|00002bd0| 69 65 6e 74 20 61 6e 64 | 20 73 65 72 76 69 63 65 |ient and| service|
|00002be0| 2e 29 0a 58 2e 4e 48 20 | 32 0a 5c 26 41 75 74 68 |.).X.NH |2.\&Auth|
|00002bf0| 65 6e 74 69 63 61 74 69 | 6f 6e 0a 58 2e 4c 50 0a |enticati|on.X.LP.|
|00002c00| 50 72 6f 76 69 73 69 6f | 6e 73 20 66 6f 72 20 61 |Provisio|ns for a|
|00002c10| 75 74 68 65 6e 74 69 63 | 61 74 69 6f 6e 20 6f 66 |uthentic|ation of|
|00002c20| 20 63 61 6c 6c 65 72 20 | 74 6f 20 73 65 72 76 69 | caller |to servi|
|00002c30| 63 65 20 61 6e 64 20 76 | 69 63 65 2d 76 65 72 73 |ce and v|ice-vers|
|00002c40| 61 20 61 72 65 0a 70 72 | 6f 76 69 64 65 64 20 61 |a are.pr|ovided a|
|00002c50| 73 20 61 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 |s a part| of the |
|00002c60| 52 50 43 20 70 72 6f 74 | 6f 63 6f 6c 2e 20 20 54 |RPC prot|ocol. T|
|00002c70| 68 65 20 63 61 6c 6c 20 | 6d 65 73 73 61 67 65 20 |he call |message |
|00002c80| 68 61 73 20 74 77 6f 0a | 61 75 74 68 65 6e 74 69 |has two.|authenti|
|00002c90| 63 61 74 69 6f 6e 20 66 | 69 65 6c 64 73 2c 20 74 |cation f|ields, t|
|00002ca0| 68 65 20 63 72 65 64 65 | 6e 74 69 61 6c 73 20 61 |he crede|ntials a|
|00002cb0| 6e 64 20 76 65 72 69 66 | 69 65 72 2e 20 20 54 68 |nd verif|ier. Th|
|00002cc0| 65 20 72 65 70 6c 79 0a | 6d 65 73 73 61 67 65 20 |e reply.|message |
|00002cd0| 68 61 73 20 6f 6e 65 20 | 61 75 74 68 65 6e 74 69 |has one |authenti|
|00002ce0| 63 61 74 69 6f 6e 20 66 | 69 65 6c 64 2c 20 74 68 |cation f|ield, th|
|00002cf0| 65 20 72 65 73 70 6f 6e | 73 65 20 76 65 72 69 66 |e respon|se verif|
|00002d00| 69 65 72 2e 20 20 54 68 | 65 20 52 50 43 0a 70 72 |ier. Th|e RPC.pr|
|00002d10| 6f 74 6f 63 6f 6c 20 73 | 70 65 63 69 66 69 63 61 |otocol s|pecifica|
|00002d20| 74 69 6f 6e 20 64 65 66 | 69 6e 65 73 20 61 6c 6c |tion def|ines all|
|00002d30| 20 74 68 72 65 65 20 66 | 69 65 6c 64 73 20 74 6f | three f|ields to|
|00002d40| 20 62 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | be the |followin|
|00002d50| 67 0a 6f 70 61 71 75 65 | 20 74 79 70 65 3a 0a 58 |g.opaque| type:.X|
|00002d60| 2e 44 53 0a 58 2e 66 74 | 20 43 57 0a 58 2e 76 73 |.DS.X.ft| CW.X.vs|
|00002d70| 20 31 31 0a 65 6e 75 6d | 20 61 75 74 68 5f 66 6c | 11.enum| auth_fl|
|00002d80| 61 76 6f 72 20 7b 0a 20 | 20 20 20 41 55 54 48 5f |avor {. | AUTH_|
|00002d90| 4e 55 4c 4c 20 20 20 20 | 20 20 20 20 3d 20 30 2c |NULL | = 0,|
|00002da0| 0a 20 20 20 20 41 55 54 | 48 5f 55 4e 49 58 20 20 |. AUT|H_UNIX |
|00002db0| 20 20 20 20 20 20 3d 20 | 31 2c 0a 20 20 20 20 41 | = |1,. A|
|00002dc0| 55 54 48 5f 53 48 4f 52 | 54 20 20 20 20 20 20 20 |UTH_SHOR|T |
|00002dd0| 3d 20 32 2c 0a 20 20 20 | 20 2f 2a 20 5c 66 49 61 |= 2,. | /* \fIa|
|00002de0| 6e 64 20 6d 6f 72 65 20 | 74 6f 20 62 65 20 64 65 |nd more |to be de|
|00002df0| 66 69 6e 65 64 5c 66 50 | 20 2a 2f 0a 7d 3b 0a 0a |fined\fP| */.};..|
|00002e00| 73 74 72 75 63 74 20 6f | 70 61 71 75 65 5f 61 75 |struct o|paque_au|
|00002e10| 74 68 20 7b 0a 20 20 20 | 20 61 75 74 68 5f 66 6c |th {. | auth_fl|
|00002e20| 61 76 6f 72 20 66 6c 61 | 76 6f 72 3b 0a 20 20 20 |avor fla|vor;. |
|00002e30| 20 6f 70 61 71 75 65 20 | 62 6f 64 79 3c 34 30 30 | opaque |body<400|
|00002e40| 3e 3b 0a 7d 3b 0a 58 2e | 44 45 0a 58 2e 4c 50 0a |>;.};.X.|DE.X.LP.|
|00002e50| 49 6e 20 73 69 6d 70 6c | 65 20 45 6e 67 6c 69 73 |In simpl|e Englis|
|00002e60| 68 2c 20 61 6e 79 0a 58 | 2e 49 20 6f 70 61 71 75 |h, any.X|.I opaqu|
|00002e70| 65 5f 61 75 74 68 20 0a | 73 74 72 75 63 74 75 72 |e_auth .|structur|
|00002e80| 65 20 69 73 20 61 6e 20 | 0a 58 2e 49 20 61 75 74 |e is an |.X.I aut|
|00002e90| 68 5f 66 6c 61 76 6f 72 | 20 0a 65 6e 75 6d 65 72 |h_flavor| .enumer|
|00002ea0| 61 74 69 6f 6e 20 66 6f | 6c 6c 6f 77 65 64 20 62 |ation fo|llowed b|
|00002eb0| 79 20 62 79 74 65 73 20 | 77 68 69 63 68 20 61 72 |y bytes |which ar|
|00002ec0| 65 20 20 6f 70 61 71 75 | 65 20 74 6f 20 74 68 65 |e opaqu|e to the|
|00002ed0| 20 52 50 43 20 70 72 6f | 74 6f 63 6f 6c 0a 69 6d | RPC pro|tocol.im|
|00002ee0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 2e 0a 58 2e |plementa|tion..X.|
|00002ef0| 4c 50 0a 54 68 65 20 69 | 6e 74 65 72 70 72 65 74 |LP.The i|nterpret|
|00002f00| 61 74 69 6f 6e 20 61 6e | 64 20 73 65 6d 61 6e 74 |ation an|d semant|
|00002f10| 69 63 73 20 20 6f 66 20 | 74 68 65 20 64 61 74 61 |ics of |the data|
|00002f20| 20 63 6f 6e 74 61 69 6e | 65 64 20 20 77 69 74 68 | contain|ed with|
|00002f30| 69 6e 20 74 68 65 0a 61 | 75 74 68 65 6e 74 69 63 |in the.a|uthentic|
|00002f40| 61 74 69 6f 6e 20 20 20 | 66 69 65 6c 64 73 20 20 |ation |fields |
|00002f50| 69 73 20 73 70 65 63 69 | 66 69 65 64 20 20 62 79 |is speci|fied by|
|00002f60| 20 20 69 6e 64 69 76 69 | 64 75 61 6c 2c 20 20 69 | indivi|dual, i|
|00002f70| 6e 64 65 70 65 6e 64 65 | 6e 74 0a 61 75 74 68 65 |ndepende|nt.authe|
|00002f80| 6e 74 69 63 61 74 69 6f | 6e 20 20 70 72 6f 74 6f |nticatio|n proto|
|00002f90| 63 6f 6c 20 73 70 65 63 | 69 66 69 63 61 74 69 6f |col spec|ificatio|
|00002fa0| 6e 73 2e 20 20 20 28 53 | 65 65 20 0a 5c 66 49 41 |ns. (S|ee .\fIA|
|00002fb0| 75 74 68 65 6e 74 69 63 | 61 74 69 6f 6e 20 50 72 |uthentic|ation Pr|
|00002fc0| 6f 74 6f 63 6f 6c 73 5c | 66 50 5c 2c 0a 62 65 6c |otocols\|fP\,.bel|
|00002fd0| 6f 77 2c 20 66 6f 72 20 | 64 65 66 69 6e 69 74 69 |ow, for |definiti|
|00002fe0| 6f 6e 73 20 6f 66 20 74 | 68 65 20 76 61 72 69 6f |ons of t|he vario|
|00002ff0| 75 73 20 61 75 74 68 65 | 6e 74 69 63 61 74 69 6f |us authe|nticatio|
|00003000| 6e 20 70 72 6f 74 6f 63 | 6f 6c 73 2e 29 0a 58 2e |n protoc|ols.).X.|
|00003010| 4c 50 0a 49 66 20 61 75 | 74 68 65 6e 74 69 63 61 |LP.If au|thentica|
|00003020| 74 69 6f 6e 20 70 61 72 | 61 6d 65 74 65 72 73 20 |tion par|ameters |
|00003030| 77 65 72 65 20 20 20 72 | 65 6a 65 63 74 65 64 2c |were r|ejected,|
|00003040| 20 74 68 65 20 20 72 65 | 73 70 6f 6e 73 65 20 6d | the re|sponse m|
|00003050| 65 73 73 61 67 65 0a 63 | 6f 6e 74 61 69 6e 73 20 |essage.c|ontains |
|00003060| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 73 74 61 74 |informat|ion stat|
|00003070| 69 6e 67 20 77 68 79 20 | 74 68 65 79 20 77 65 72 |ing why |they wer|
|00003080| 65 20 72 65 6a 65 63 74 | 65 64 2e 0a 58 2e 4e 48 |e reject|ed..X.NH|
|00003090| 20 32 0a 5c 26 50 72 6f | 67 72 61 6d 20 4e 75 6d | 2.\&Pro|gram Num|
|000030a0| 62 65 72 20 41 73 73 69 | 67 6e 6d 65 6e 74 0a 58 |ber Assi|gnment.X|
|000030b0| 2e 4c 50 0a 50 72 6f 67 | 72 61 6d 20 6e 75 6d 62 |.LP.Prog|ram numb|
|000030c0| 65 72 73 20 61 72 65 20 | 67 69 76 65 6e 20 6f 75 |ers are |given ou|
|000030d0| 74 20 69 6e 20 67 72 6f | 75 70 73 20 6f 66 0a 58 |t in gro|ups of.X|
|000030e0| 2e 49 20 30 78 32 30 30 | 30 30 30 30 30 20 0a 28 |.I 0x200|00000 .(|
|000030f0| 64 65 63 69 6d 61 6c 20 | 35 33 36 38 37 30 39 31 |decimal |53687091|
|00003100| 32 29 20 61 63 63 6f 72 | 64 69 6e 67 20 74 6f 20 |2) accor|ding to |
|00003110| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 68 |the foll|owing ch|
|00003120| 61 72 74 3a 0a 58 2e 54 | 53 0a 62 6f 78 20 74 61 |art:.X.T|S.box ta|
|00003130| 62 20 28 26 29 20 3b 0a | 6c 66 49 20 6c 66 49 0a |b (&) ;.|lfI lfI.|
|00003140| 72 66 4c 20 63 66 49 20 | 2e 0a 50 72 6f 67 72 61 |rfL cfI |..Progra|
|00003150| 6d 20 4e 75 6d 62 65 72 | 73 26 44 65 73 63 72 69 |m Number|s&Descri|
|00003160| 70 74 69 6f 6e 0a 5f 0a | 58 2e 73 70 20 2e 35 0a |ption._.|X.sp .5.|
|00003170| 30 20 2d 20 31 66 66 66 | 66 66 66 66 26 44 65 66 |0 - 1fff|ffff&Def|
|00003180| 69 6e 65 64 20 62 79 20 | 53 75 6e 0a 32 30 30 30 |ined by |Sun.2000|
|00003190| 30 30 30 30 20 2d 20 33 | 66 66 66 66 66 66 66 26 |0000 - 3|fffffff&|
|000031a0| 44 65 66 69 6e 65 64 20 | 62 79 20 75 73 65 72 0a |Defined |by user.|
|000031b0| 34 30 30 30 30 30 30 30 | 20 2d 20 35 66 66 66 66 |40000000| - 5ffff|
|000031c0| 66 66 66 26 54 72 61 6e | 73 69 65 6e 74 0a 36 30 |fff&Tran|sient.60|
|000031d0| 30 30 30 30 30 30 20 2d | 20 37 66 66 66 66 66 66 |000000 -| 7ffffff|
|000031e0| 66 26 52 65 73 65 72 76 | 65 64 0a 38 30 30 30 30 |f&Reserv|ed.80000|
|000031f0| 30 30 30 20 2d 20 39 66 | 66 66 66 66 66 66 26 52 |000 - 9f|ffffff&R|
|00003200| 65 73 65 72 76 65 64 0a | 61 30 30 30 30 30 30 30 |eserved.|a0000000|
|00003210| 20 2d 20 62 66 66 66 66 | 66 66 66 26 52 65 73 65 | - bffff|fff&Rese|
|00003220| 72 76 65 64 0a 63 30 30 | 30 30 30 30 30 20 2d 20 |rved.c00|00000 - |
|00003230| 64 66 66 66 66 66 66 66 | 26 52 65 73 65 72 76 65 |dfffffff|&Reserve|
|00003240| 64 0a 65 30 30 30 30 30 | 30 30 20 2d 20 66 66 66 |d.e00000|00 - fff|
|00003250| 66 66 66 66 66 26 52 65 | 73 65 72 76 65 64 0a 58 |fffff&Re|served.X|
|00003260| 2e 54 45 0a 58 2e 4c 50 | 0a 54 68 65 20 66 69 72 |.TE.X.LP|.The fir|
|00003270| 73 74 20 67 72 6f 75 70 | 20 69 73 20 61 20 72 61 |st group| is a ra|
|00003280| 6e 67 65 20 6f 66 20 6e | 75 6d 62 65 72 73 20 61 |nge of n|umbers a|
|00003290| 64 6d 69 6e 69 73 74 65 | 72 65 64 20 62 79 20 53 |dministe|red by S|
|000032a0| 75 6e 0a 4d 69 63 72 6f | 73 79 73 74 65 6d 73 20 |un.Micro|systems |
|000032b0| 61 6e 64 20 73 68 6f 75 | 6c 64 20 62 65 20 69 64 |and shou|ld be id|
|000032c0| 65 6e 74 69 63 61 6c 20 | 66 6f 72 20 61 6c 6c 20 |entical |for all |
|000032d0| 73 69 74 65 73 2e 20 20 | 54 68 65 20 73 65 63 6f |sites. |The seco|
|000032e0| 6e 64 20 72 61 6e 67 65 | 0a 69 73 20 66 6f 72 20 |nd range|.is for |
|000032f0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 70 65 63 |applicat|ions pec|
|00003300| 75 6c 69 61 72 20 74 6f | 20 61 20 70 61 72 74 69 |uliar to| a parti|
|00003310| 63 75 6c 61 72 20 73 69 | 74 65 2e 20 20 54 68 69 |cular si|te. Thi|
|00003320| 73 20 72 61 6e 67 65 20 | 69 73 0a 69 6e 74 65 6e |s range |is.inten|
|00003330| 64 65 64 20 70 72 69 6d | 61 72 69 6c 79 20 66 6f |ded prim|arily fo|
|00003340| 72 20 64 65 62 75 67 67 | 69 6e 67 20 6e 65 77 20 |r debugg|ing new |
|00003350| 70 72 6f 67 72 61 6d 73 | 2e 20 20 57 68 65 6e 20 |programs|. When |
|00003360| 61 20 73 69 74 65 20 64 | 65 76 65 6c 6f 70 73 0a |a site d|evelops.|
|00003370| 61 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 74 |an appli|cation t|
|00003380| 68 61 74 20 6d 69 67 68 | 74 20 62 65 20 6f 66 20 |hat migh|t be of |
|00003390| 67 65 6e 65 72 61 6c 20 | 69 6e 74 65 72 65 73 74 |general |interest|
|000033a0| 2c 20 74 68 61 74 20 61 | 70 70 6c 69 63 61 74 69 |, that a|pplicati|
|000033b0| 6f 6e 0a 73 68 6f 75 6c | 64 20 62 65 20 67 69 76 |on.shoul|d be giv|
|000033c0| 65 6e 20 61 6e 20 61 73 | 73 69 67 6e 65 64 20 6e |en an as|signed n|
|000033d0| 75 6d 62 65 72 20 69 6e | 20 74 68 65 20 66 69 72 |umber in| the fir|
|000033e0| 73 74 20 72 61 6e 67 65 | 2e 20 20 54 68 65 20 74 |st range|. The t|
|000033f0| 68 69 72 64 0a 67 72 6f | 75 70 20 69 73 20 66 6f |hird.gro|up is fo|
|00003400| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 74 |r applic|ations t|
|00003410| 68 61 74 20 67 65 6e 65 | 72 61 74 65 20 70 72 6f |hat gene|rate pro|
|00003420| 67 72 61 6d 20 6e 75 6d | 62 65 72 73 20 64 79 6e |gram num|bers dyn|
|00003430| 61 6d 69 63 61 6c 6c 79 | 2e 0a 54 68 65 20 66 69 |amically|..The fi|
|00003440| 6e 61 6c 20 67 72 6f 75 | 70 73 20 61 72 65 20 72 |nal grou|ps are r|
|00003450| 65 73 65 72 76 65 64 20 | 66 6f 72 20 66 75 74 75 |eserved |for futu|
|00003460| 72 65 20 75 73 65 2c 20 | 61 6e 64 20 73 68 6f 75 |re use, |and shou|
|00003470| 6c 64 20 6e 6f 74 20 62 | 65 20 75 73 65 64 2e 0a |ld not b|e used..|
|00003480| 58 2e 4e 48 20 32 0a 5c | 26 4f 74 68 65 72 20 55 |X.NH 2.\|&Other U|
|00003490| 73 65 73 20 6f 66 20 74 | 68 65 20 52 50 43 20 50 |ses of t|he RPC P|
|000034a0| 72 6f 74 6f 63 6f 6c 0a | 58 2e 4c 50 0a 54 68 65 |rotocol.|X.LP.The|
|000034b0| 20 69 6e 74 65 6e 64 65 | 64 20 75 73 65 20 6f 66 | intende|d use of|
|000034c0| 20 74 68 69 73 20 70 72 | 6f 74 6f 63 6f 6c 20 69 | this pr|otocol i|
|000034d0| 73 20 66 6f 72 20 63 61 | 6c 6c 69 6e 67 20 72 65 |s for ca|lling re|
|000034e0| 6d 6f 74 65 20 70 72 6f | 63 65 64 75 72 65 73 2e |mote pro|cedures.|
|000034f0| 0a 54 68 61 74 20 69 73 | 2c 20 65 61 63 68 20 63 |.That is|, each c|
|00003500| 61 6c 6c 20 6d 65 73 73 | 61 67 65 20 69 73 20 6d |all mess|age is m|
|00003510| 61 74 63 68 65 64 20 77 | 69 74 68 20 61 20 72 65 |atched w|ith a re|
|00003520| 73 70 6f 6e 73 65 20 6d | 65 73 73 61 67 65 2e 0a |sponse m|essage..|
|00003530| 48 6f 77 65 76 65 72 2c | 20 74 68 65 20 70 72 6f |However,| the pro|
|00003540| 74 6f 63 6f 6c 20 69 74 | 73 65 6c 66 20 69 73 20 |tocol it|self is |
|00003550| 61 20 6d 65 73 73 61 67 | 65 2d 70 61 73 73 69 6e |a messag|e-passin|
|00003560| 67 20 70 72 6f 74 6f 63 | 6f 6c 20 77 69 74 68 20 |g protoc|ol with |
|00003570| 77 68 69 63 68 0a 6f 74 | 68 65 72 20 28 6e 6f 6e |which.ot|her (non|
|00003580| 2d 52 50 43 29 20 70 72 | 6f 74 6f 63 6f 6c 73 20 |-RPC) pr|otocols |
|00003590| 63 61 6e 20 62 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |can be i|mplement|
|000035a0| 65 64 2e 20 20 53 75 6e | 20 63 75 72 72 65 6e 74 |ed. Sun| current|
|000035b0| 6c 79 20 75 73 65 73 2c | 20 6f 72 0a 70 65 72 68 |ly uses,| or.perh|
|000035c0| 61 70 73 20 61 62 75 73 | 65 73 2c 20 74 68 65 20 |aps abus|es, the |
|000035d0| 52 50 43 20 6d 65 73 73 | 61 67 65 20 70 72 6f 74 |RPC mess|age prot|
|000035e0| 6f 63 6f 6c 20 66 6f 72 | 20 74 68 65 20 66 6f 6c |ocol for| the fol|
|000035f0| 6c 6f 77 69 6e 67 20 74 | 77 6f 0a 28 6e 6f 6e 2d |lowing t|wo.(non-|
|00003600| 52 50 43 29 20 70 72 6f | 74 6f 63 6f 6c 73 3a 20 |RPC) pro|tocols: |
|00003610| 20 62 61 74 63 68 69 6e | 67 20 28 6f 72 20 70 69 | batchin|g (or pi|
|00003620| 70 65 6c 69 6e 69 6e 67 | 29 20 61 6e 64 20 62 72 |pelining|) and br|
|00003630| 6f 61 64 63 61 73 74 20 | 52 50 43 2e 0a 54 68 65 |oadcast |RPC..The|
|00003640| 73 65 20 74 77 6f 20 70 | 72 6f 74 6f 63 6f 6c 73 |se two p|rotocols|
|00003650| 20 61 72 65 20 64 69 73 | 63 75 73 73 65 64 20 62 | are dis|cussed b|
|00003660| 75 74 20 6e 6f 74 20 64 | 65 66 69 6e 65 64 20 62 |ut not d|efined b|
|00003670| 65 6c 6f 77 2e 0a 58 2e | 4e 48 20 33 0a 5c 26 42 |elow..X.|NH 3.\&B|
|00003680| 61 74 63 68 69 6e 67 0a | 58 2e 4c 50 0a 42 61 74 |atching.|X.LP.Bat|
|00003690| 63 68 69 6e 67 20 61 6c | 6c 6f 77 73 20 61 20 63 |ching al|lows a c|
|000036a0| 6c 69 65 6e 74 20 74 6f | 20 73 65 6e 64 20 61 6e |lient to| send an|
|000036b0| 20 61 72 62 69 74 72 61 | 72 69 6c 79 20 6c 61 72 | arbitra|rily lar|
|000036c0| 67 65 20 73 65 71 75 65 | 6e 63 65 20 6f 66 0a 63 |ge seque|nce of.c|
|000036d0| 61 6c 6c 20 6d 65 73 73 | 61 67 65 73 20 74 6f 20 |all mess|ages to |
|000036e0| 61 20 73 65 72 76 65 72 | 3b 20 62 61 74 63 68 69 |a server|; batchi|
|000036f0| 6e 67 20 74 79 70 69 63 | 61 6c 6c 79 20 75 73 65 |ng typic|ally use|
|00003700| 73 20 72 65 6c 69 61 62 | 6c 65 20 62 79 74 65 0a |s reliab|le byte.|
|00003710| 73 74 72 65 61 6d 20 70 | 72 6f 74 6f 63 6f 6c 73 |stream p|rotocols|
|00003720| 20 28 6c 69 6b 65 20 54 | 43 50 2f 49 50 29 20 66 | (like T|CP/IP) f|
|00003730| 6f 72 20 69 74 73 20 74 | 72 61 6e 73 70 6f 72 74 |or its t|ransport|
|00003740| 2e 20 20 49 6e 20 74 68 | 65 20 63 61 73 65 20 6f |. In th|e case o|
|00003750| 66 0a 62 61 74 63 68 69 | 6e 67 2c 20 74 68 65 20 |f.batchi|ng, the |
|00003760| 63 6c 69 65 6e 74 20 6e | 65 76 65 72 20 77 61 69 |client n|ever wai|
|00003770| 74 73 20 66 6f 72 20 61 | 20 72 65 70 6c 79 20 66 |ts for a| reply f|
|00003780| 72 6f 6d 20 74 68 65 20 | 73 65 72 76 65 72 2c 20 |rom the |server, |
|00003790| 61 6e 64 20 74 68 65 0a | 73 65 72 76 65 72 20 64 |and the.|server d|
|000037a0| 6f 65 73 20 6e 6f 74 20 | 73 65 6e 64 20 72 65 70 |oes not |send rep|
|000037b0| 6c 69 65 73 20 74 6f 20 | 62 61 74 63 68 20 72 65 |lies to |batch re|
|000037c0| 71 75 65 73 74 73 2e 20 | 20 41 20 73 65 71 75 65 |quests. | A seque|
|000037d0| 6e 63 65 20 6f 66 20 62 | 61 74 63 68 0a 63 61 6c |nce of b|atch.cal|
|000037e0| 6c 73 20 69 73 20 75 73 | 75 61 6c 6c 79 20 74 65 |ls is us|ually te|
|000037f0| 72 6d 69 6e 61 74 65 64 | 20 62 79 20 61 20 6c 65 |rminated| by a le|
|00003800| 67 69 74 69 6d 61 74 65 | 20 52 50 43 20 69 6e 20 |gitimate| RPC in |
|00003810| 6f 72 64 65 72 20 74 6f | 20 66 6c 75 73 68 20 74 |order to| flush t|
|00003820| 68 65 0a 70 69 70 65 6c | 69 6e 65 20 28 77 69 74 |he.pipel|ine (wit|
|00003830| 68 20 70 6f 73 69 74 69 | 76 65 20 61 63 6b 6e 6f |h positi|ve ackno|
|00003840| 77 6c 65 64 67 65 6d 65 | 6e 74 29 2e 0a 58 2e 4e |wledgeme|nt)..X.N|
|00003850| 48 20 33 0a 5c 26 42 72 | 6f 61 64 63 61 73 74 20 |H 3.\&Br|oadcast |
|00003860| 52 50 43 0a 58 2e 4c 50 | 0a 49 6e 20 62 72 6f 61 |RPC.X.LP|.In broa|
|00003870| 64 63 61 73 74 20 52 50 | 43 2d 62 61 73 65 64 20 |dcast RP|C-based |
|00003880| 70 72 6f 74 6f 63 6f 6c | 73 2c 20 74 68 65 20 63 |protocol|s, the c|
|00003890| 6c 69 65 6e 74 20 73 65 | 6e 64 73 20 61 20 62 72 |lient se|nds a br|
|000038a0| 6f 61 64 63 61 73 74 20 | 70 61 63 6b 65 74 0a 74 |oadcast |packet.t|
|000038b0| 6f 20 74 68 65 20 6e 65 | 74 77 6f 72 6b 20 61 6e |o the ne|twork an|
|000038c0| 64 20 77 61 69 74 73 20 | 66 6f 72 20 6e 75 6d 65 |d waits |for nume|
|000038d0| 72 6f 75 73 20 72 65 70 | 6c 69 65 73 2e 20 20 42 |rous rep|lies. B|
|000038e0| 72 6f 61 64 63 61 73 74 | 20 52 50 43 20 75 73 65 |roadcast| RPC use|
|000038f0| 73 0a 75 6e 72 65 6c 69 | 61 62 6c 65 2c 20 70 61 |s.unreli|able, pa|
|00003900| 63 6b 65 74 2d 62 61 73 | 65 64 20 70 72 6f 74 6f |cket-bas|ed proto|
|00003910| 63 6f 6c 73 20 28 6c 69 | 6b 65 20 55 44 50 2f 49 |cols (li|ke UDP/I|
|00003920| 50 29 20 61 73 20 69 74 | 73 20 74 72 61 6e 73 70 |P) as it|s transp|
|00003930| 6f 72 74 73 2e 0a 53 65 | 72 76 65 72 73 20 74 68 |orts..Se|rvers th|
|00003940| 61 74 20 73 75 70 70 6f | 72 74 20 62 72 6f 61 64 |at suppo|rt broad|
|00003950| 63 61 73 74 20 70 72 6f | 74 6f 63 6f 6c 73 20 6f |cast pro|tocols o|
|00003960| 6e 6c 79 20 72 65 73 70 | 6f 6e 64 20 77 68 65 6e |nly resp|ond when|
|00003970| 20 74 68 65 0a 72 65 71 | 75 65 73 74 20 69 73 20 | the.req|uest is |
|00003980| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 70 72 6f |successf|ully pro|
|00003990| 63 65 73 73 65 64 2c 20 | 61 6e 64 20 61 72 65 20 |cessed, |and are |
|000039a0| 73 69 6c 65 6e 74 20 69 | 6e 20 74 68 65 20 66 61 |silent i|n the fa|
|000039b0| 63 65 20 6f 66 0a 65 72 | 72 6f 72 73 2e 20 20 42 |ce of.er|rors. B|
|000039c0| 72 6f 61 64 63 61 73 74 | 20 52 50 43 20 75 73 65 |roadcast| RPC use|
|000039d0| 73 20 74 68 65 20 50 6f | 72 74 20 4d 61 70 70 65 |s the Po|rt Mappe|
|000039e0| 72 20 52 50 43 20 73 65 | 72 76 69 63 65 20 74 6f |r RPC se|rvice to|
|000039f0| 20 61 63 68 69 65 76 65 | 0a 69 74 73 20 73 65 6d | achieve|.its sem|
|00003a00| 61 6e 74 69 63 73 2e 20 | 20 53 65 65 20 74 68 65 |antics. | See the|
|00003a10| 20 5c 66 49 50 6f 72 74 | 20 4d 61 70 70 65 72 20 | \fIPort| Mapper |
|00003a20| 50 72 6f 67 72 61 6d 20 | 50 72 6f 74 6f 63 6f 6c |Program |Protocol|
|00003a30| 5c 66 50 5c 2c 20 62 65 | 6c 6f 77 2c 0a 66 6f 72 |\fP\, be|low,.for|
|00003a40| 20 6d 6f 72 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | more in|formatio|
|00003a50| 6e 2e 0a 58 2e 4b 53 0a | 58 2e 4e 48 20 31 0a 5c |n..X.KS.|X.NH 1.\|
|00003a60| 26 54 68 65 20 52 50 43 | 20 4d 65 73 73 61 67 65 |&The RPC| Message|
|00003a70| 20 50 72 6f 74 6f 63 6f | 6c 0a 58 2e 4c 50 0a 54 | Protoco|l.X.LP.T|
|00003a80| 68 69 73 20 73 65 63 74 | 69 6f 6e 20 64 65 66 69 |his sect|ion defi|
|00003a90| 6e 65 73 20 74 68 65 20 | 52 50 43 20 6d 65 73 73 |nes the |RPC mess|
|00003aa0| 61 67 65 20 70 72 6f 74 | 6f 63 6f 6c 20 69 6e 20 |age prot|ocol in |
|00003ab0| 74 68 65 20 58 44 52 20 | 64 61 74 61 0a 64 65 73 |the XDR |data.des|
|00003ac0| 63 72 69 70 74 69 6f 6e | 20 6c 61 6e 67 75 61 67 |cription| languag|
|00003ad0| 65 2e 20 20 54 68 65 20 | 6d 65 73 73 61 67 65 20 |e. The |message |
|00003ae0| 69 73 20 64 65 66 69 6e | 65 64 20 69 6e 20 61 20 |is defin|ed in a |
|00003af0| 74 6f 70 2d 64 6f 77 6e | 20 73 74 79 6c 65 2e 0a |top-down| style..|
|00003b00| 58 2e 69 65 20 74 20 2e | 44 53 0a 58 2e 65 6c 20 |X.ie t .|DS.X.el |
|00003b10| 2e 44 53 20 4c 0a 58 2e | 66 74 20 43 57 0a 65 6e |.DS L.X.|ft CW.en|
|00003b20| 75 6d 20 6d 73 67 5f 74 | 79 70 65 20 7b 0a 09 43 |um msg_t|ype {..C|
|00003b30| 41 4c 4c 20 20 3d 20 30 | 2c 0a 09 52 45 50 4c 59 |ALL = 0|,..REPLY|
|00003b40| 20 3d 20 31 0a 7d 3b 0a | 0a 58 2e 66 74 20 49 0a | = 1.};.|.X.ft I.|
|00003b50| 2f 2a 0a 2a 20 41 20 72 | 65 70 6c 79 20 74 6f 20 |/*.* A r|eply to |
|00003b60| 61 20 63 61 6c 6c 20 6d | 65 73 73 61 67 65 20 63 |a call m|essage c|
|00003b70| 61 6e 20 74 61 6b 65 20 | 6f 6e 20 74 77 6f 20 66 |an take |on two f|
|00003b80| 6f 72 6d 73 3a 0a 2a 20 | 54 68 65 20 6d 65 73 73 |orms:.* |The mess|
|00003b90| 61 67 65 20 77 61 73 20 | 65 69 74 68 65 72 20 61 |age was |either a|
|00003ba0| 63 63 65 70 74 65 64 20 | 6f 72 20 72 65 6a 65 63 |ccepted |or rejec|
|00003bb0| 74 65 64 2e 0a 2a 2f 0a | 58 2e 66 74 20 43 57 0a |ted..*/.|X.ft CW.|
|00003bc0| 65 6e 75 6d 20 72 65 70 | 6c 79 5f 73 74 61 74 20 |enum rep|ly_stat |
|00003bd0| 7b 0a 09 4d 53 47 5f 41 | 43 43 45 50 54 45 44 20 |{..MSG_A|CCEPTED |
|00003be0| 3d 20 30 2c 0a 09 4d 53 | 47 5f 44 45 4e 49 45 44 |= 0,..MS|G_DENIED|
|00003bf0| 20 20 20 3d 20 31 0a 7d | 3b 0a 0a 58 2e 66 74 20 | = 1.}|;..X.ft |
|00003c00| 49 0a 2f 2a 0a 2a 20 47 | 69 76 65 6e 20 74 68 61 |I./*.* G|iven tha|
|00003c10| 74 20 61 20 63 61 6c 6c | 20 6d 65 73 73 61 67 65 |t a call| message|
|00003c20| 20 77 61 73 20 61 63 63 | 65 70 74 65 64 2c 20 20 | was acc|epted, |
|00003c30| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |the foll|owing is|
|00003c40| 20 74 68 65 0a 2a 20 73 | 74 61 74 75 73 20 6f 66 | the.* s|tatus of|
|00003c50| 20 61 6e 20 61 74 74 65 | 6d 70 74 20 74 6f 20 63 | an atte|mpt to c|
|00003c60| 61 6c 6c 20 61 20 72 65 | 6d 6f 74 65 20 70 72 6f |all a re|mote pro|
|00003c70| 63 65 64 75 72 65 2e 0a | 2a 2f 0a 58 2e 66 74 20 |cedure..|*/.X.ft |
|00003c80| 43 57 0a 65 6e 75 6d 20 | 61 63 63 65 70 74 5f 73 |CW.enum |accept_s|
|00003c90| 74 61 74 20 7b 0a 09 53 | 55 43 43 45 53 53 20 20 |tat {..S|UCCESS |
|00003ca0| 20 20 20 20 20 3d 20 30 | 2c 20 2f 2a 20 5c 66 49 | = 0|, /* \fI|
|00003cb0| 52 50 43 20 65 78 65 63 | 75 74 65 64 20 73 75 63 |RPC exec|uted suc|
|00003cc0| 63 65 73 73 66 75 6c 6c | 79 20 20 20 20 20 20 20 |cessfull|y |
|00003cd0| 5c 66 50 2a 2f 0a 09 50 | 52 4f 47 5f 55 4e 41 56 |\fP*/..P|ROG_UNAV|
|00003ce0| 41 49 4c 20 20 3d 20 31 | 2c 20 2f 2a 20 5c 66 49 |AIL = 1|, /* \fI|
|00003cf0| 72 65 6d 6f 74 65 20 68 | 61 73 6e 27 74 20 65 78 |remote h|asn't ex|
|00003d00| 70 6f 72 74 65 64 20 70 | 72 6f 67 72 61 6d 20 20 |ported p|rogram |
|00003d10| 5c 66 50 2a 2f 0a 09 50 | 52 4f 47 5f 4d 49 53 4d |\fP*/..P|ROG_MISM|
|00003d20| 41 54 43 48 20 3d 20 32 | 2c 20 2f 2a 20 5c 66 49 |ATCH = 2|, /* \fI|
|00003d30| 72 65 6d 6f 74 65 20 63 | 61 6e 27 74 20 73 75 70 |remote c|an't sup|
|00003d40| 70 6f 72 74 20 76 65 72 | 73 69 6f 6e 20 23 20 20 |port ver|sion # |
|00003d50| 5c 66 50 2a 2f 0a 09 50 | 52 4f 43 5f 55 4e 41 56 |\fP*/..P|ROC_UNAV|
|00003d60| 41 49 4c 20 20 3d 20 33 | 2c 20 2f 2a 20 5c 66 49 |AIL = 3|, /* \fI|
|00003d70| 70 72 6f 67 72 61 6d 20 | 63 61 6e 27 74 20 73 75 |program |can't su|
|00003d80| 70 70 6f 72 74 20 70 72 | 6f 63 65 64 75 72 65 20 |pport pr|ocedure |
|00003d90| 5c 66 50 2a 2f 0a 09 47 | 41 52 42 41 47 45 5f 41 |\fP*/..G|ARBAGE_A|
|00003da0| 52 47 53 20 20 3d 20 34 | 20 20 2f 2a 20 5c 66 49 |RGS = 4| /* \fI|
|00003db0| 70 72 6f 63 65 64 75 72 | 65 20 63 61 6e 27 74 20 |procedur|e can't |
|00003dc0| 64 65 63 6f 64 65 20 70 | 61 72 61 6d 73 20 20 20 |decode p|arams |
|00003dd0| 5c 66 50 2a 2f 0a 7d 3b | 0a 58 2e 44 45 0a 58 2e |\fP*/.};|.X.DE.X.|
|00003de0| 69 65 20 74 20 2e 44 53 | 0a 58 2e 65 6c 20 2e 44 |ie t .DS|.X.el .D|
|00003df0| 53 20 4c 0a 58 2e 66 74 | 20 49 0a 2f 2a 0a 2a 20 |S L.X.ft| I./*.* |
|00003e00| 52 65 61 73 6f 6e 73 20 | 77 68 79 20 61 20 63 61 |Reasons |why a ca|
|00003e10| 6c 6c 20 6d 65 73 73 61 | 67 65 20 77 61 73 20 72 |ll messa|ge was r|
|00003e20| 65 6a 65 63 74 65 64 3a | 0a 2a 2f 0a 58 2e 66 74 |ejected:|.*/.X.ft|
|00003e30| 20 43 57 0a 65 6e 75 6d | 20 72 65 6a 65 63 74 5f | CW.enum| reject_|
|00003e40| 73 74 61 74 20 7b 0a 09 | 52 50 43 5f 4d 49 53 4d |stat {..|RPC_MISM|
|00003e50| 41 54 43 48 20 3d 20 30 | 2c 20 2f 2a 20 5c 66 49 |ATCH = 0|, /* \fI|
|00003e60| 52 50 43 20 76 65 72 73 | 69 6f 6e 20 6e 75 6d 62 |RPC vers|ion numb|
|00003e70| 65 72 20 21 3d 20 32 20 | 20 20 20 20 20 20 20 20 |er != 2 | |
|00003e80| 20 5c 66 50 2a 2f 0a 09 | 41 55 54 48 5f 45 52 52 | \fP*/..|AUTH_ERR|
|00003e90| 4f 52 20 3d 20 31 20 20 | 20 20 2f 2a 20 5c 66 49 |OR = 1 | /* \fI|
|00003ea0| 72 65 6d 6f 74 65 20 63 | 61 6e 27 74 20 61 75 74 |remote c|an't aut|
|00003eb0| 68 65 6e 74 69 63 61 74 | 65 20 63 61 6c 6c 65 72 |henticat|e caller|
|00003ec0| 20 5c 66 50 2a 2f 0a 7d | 3b 0a 0a 58 2e 66 74 20 | \fP*/.}|;..X.ft |
|00003ed0| 49 0a 2f 2a 0a 2a 20 57 | 68 79 20 61 75 74 68 65 |I./*.* W|hy authe|
|00003ee0| 6e 74 69 63 61 74 69 6f | 6e 20 66 61 69 6c 65 64 |nticatio|n failed|
|00003ef0| 3a 0a 2a 2f 0a 58 2e 66 | 74 20 43 57 0a 65 6e 75 |:.*/.X.f|t CW.enu|
|00003f00| 6d 20 61 75 74 68 5f 73 | 74 61 74 20 7b 0a 09 41 |m auth_s|tat {..A|
|00003f10| 55 54 48 5f 42 41 44 43 | 52 45 44 20 20 20 20 20 |UTH_BADC|RED |
|00003f20| 20 3d 20 31 2c 20 20 2f | 2a 20 5c 66 49 62 61 64 | = 1, /|* \fIbad|
|00003f30| 20 63 72 65 64 65 6e 74 | 69 61 6c 73 20 28 73 65 | credent|ials (se|
|00003f40| 61 6c 20 62 72 6f 6b 65 | 6e 29 20 5c 66 50 2a 2f |al broke|n) \fP*/|
|00003f50| 0a 09 41 55 54 48 5f 52 | 45 4a 45 43 54 45 44 43 |..AUTH_R|EJECTEDC|
|00003f60| 52 45 44 20 3d 20 32 2c | 20 20 2f 2a 20 5c 66 49 |RED = 2,| /* \fI|
|00003f70| 63 6c 69 65 6e 74 20 6d | 75 73 74 20 62 65 67 69 |client m|ust begi|
|00003f80| 6e 20 6e 65 77 20 73 65 | 73 73 69 6f 6e 20 5c 66 |n new se|ssion \f|
|00003f90| 50 2a 2f 0a 09 41 55 54 | 48 5f 42 41 44 56 45 52 |P*/..AUT|H_BADVER|
|00003fa0| 46 20 20 20 20 20 20 3d | 20 33 2c 20 20 2f 2a 20 |F =| 3, /* |
|00003fb0| 5c 66 49 62 61 64 20 76 | 65 72 69 66 69 65 72 20 |\fIbad v|erifier |
|00003fc0| 28 73 65 61 6c 20 62 72 | 6f 6b 65 6e 29 20 20 20 |(seal br|oken) |
|00003fd0| 20 5c 66 50 2a 2f 0a 09 | 41 55 54 48 5f 52 45 4a | \fP*/..|AUTH_REJ|
|00003fe0| 45 43 54 45 44 56 45 52 | 46 20 3d 20 34 2c 20 20 |ECTEDVER|F = 4, |
|00003ff0| 2f 2a 20 5c 66 49 76 65 | 72 69 66 69 65 72 20 65 |/* \fIve|rifier e|
|00004000| 78 70 69 72 65 64 20 6f | 72 20 72 65 70 6c 61 79 |xpired o|r replay|
|00004010| 65 64 20 20 5c 66 50 2a | 2f 0a 09 41 55 54 48 5f |ed \fP*|/..AUTH_|
|00004020| 54 4f 4f 57 45 41 4b 20 | 20 20 20 20 20 3d 20 35 |TOOWEAK | = 5|
|00004030| 20 20 20 2f 2a 20 5c 66 | 49 72 65 6a 65 63 74 65 | /* \f|Irejecte|
|00004040| 64 20 66 6f 72 20 73 65 | 63 75 72 69 74 79 20 72 |d for se|curity r|
|00004050| 65 61 73 6f 6e 73 20 5c | 66 50 2a 2f 0a 7d 3b 0a |easons \|fP*/.};.|
|00004060| 58 2e 44 45 0a 58 2e 4b | 45 0a 58 2e 69 65 20 74 |X.DE.X.K|E.X.ie t|
|00004070| 20 2e 44 53 0a 58 2e 65 | 6c 20 2e 44 53 20 4c 0a | .DS.X.e|l .DS L.|
|00004080| 58 2e 66 74 20 49 0a 2f | 2a 0a 2a 20 54 68 65 20 |X.ft I./|*.* The |
|00004090| 20 52 50 43 20 20 6d 65 | 73 73 61 67 65 3a 20 0a | RPC me|ssage: .|
|000040a0| 2a 20 41 6c 6c 20 20 20 | 6d 65 73 73 61 67 65 73 |* All |messages|
|000040b0| 20 20 73 74 61 72 74 20 | 77 69 74 68 20 20 20 61 | start |with a|
|000040c0| 20 74 72 61 6e 73 61 63 | 74 69 6f 6e 20 20 69 64 | transac|tion id|
|000040d0| 65 6e 74 69 66 69 65 72 | 2c 20 20 78 69 64 2c 0a |entifier|, xid,.|
|000040e0| 2a 20 66 6f 6c 6c 6f 77 | 65 64 20 20 62 79 20 61 |* follow|ed by a|
|000040f0| 20 20 74 77 6f 2d 61 72 | 6d 65 64 20 20 64 69 73 | two-ar|med dis|
|00004100| 63 72 69 6d 69 6e 61 74 | 65 64 20 75 6e 69 6f 6e |criminat|ed union|
|00004110| 2e 20 20 20 54 68 65 20 | 75 6e 69 6f 6e 27 73 0a |. The |union's.|
|00004120| 2a 20 64 69 73 63 72 69 | 6d 69 6e 61 6e 74 20 69 |* discri|minant i|
|00004130| 73 20 61 20 20 6d 73 67 | 5f 74 79 70 65 20 77 68 |s a msg|_type wh|
|00004140| 69 63 68 20 73 77 69 74 | 63 68 65 73 20 74 6f 20 |ich swit|ches to |
|00004150| 20 6f 6e 65 20 6f 66 20 | 74 68 65 20 74 77 6f 0a | one of |the two.|
|00004160| 2a 20 74 79 70 65 73 20 | 20 20 6f 66 20 74 68 65 |* types | of the|
|00004170| 20 6d 65 73 73 61 67 65 | 2e 20 20 20 54 68 65 20 | message|. The |
|00004180| 78 69 64 20 20 6f 66 20 | 61 20 5c 66 49 52 45 50 |xid of |a \fIREP|
|00004190| 4c 59 5c 66 50 20 20 6d | 65 73 73 61 67 65 20 61 |LY\fP m|essage a|
|000041a0| 6c 77 61 79 73 0a 2a 20 | 6d 61 74 63 68 65 73 20 |lways.* |matches |
|000041b0| 20 74 68 61 74 20 6f 66 | 20 74 68 65 20 69 6e 69 | that of| the ini|
|000041c0| 74 69 61 74 69 6e 67 20 | 5c 66 49 43 41 4c 4c 5c |tiating |\fICALL\|
|000041d0| 66 50 20 20 20 6d 65 73 | 73 61 67 65 2e 20 20 20 |fP mes|sage. |
|000041e0| 4e 42 3a 20 54 68 65 20 | 78 69 64 0a 2a 20 66 69 |NB: The |xid.* fi|
|000041f0| 65 6c 64 20 69 73 20 6f | 6e 6c 79 20 20 75 73 65 |eld is o|nly use|
|00004200| 64 20 66 6f 72 20 63 6c | 69 65 6e 74 73 20 20 6d |d for cl|ients m|
|00004210| 61 74 63 68 69 6e 67 20 | 72 65 70 6c 79 20 6d 65 |atching |reply me|
|00004220| 73 73 61 67 65 73 20 77 | 69 74 68 0a 2a 20 63 61 |ssages w|ith.* ca|
|00004230| 6c 6c 20 6d 65 73 73 61 | 67 65 73 20 20 6f 72 20 |ll messa|ges or |
|00004240| 66 6f 72 20 73 65 72 76 | 65 72 73 20 64 65 74 65 |for serv|ers dete|
|00004250| 63 74 69 6e 67 20 20 72 | 65 74 72 61 6e 73 6d 69 |cting r|etransmi|
|00004260| 73 73 69 6f 6e 73 3b 20 | 74 68 65 0a 2a 20 73 65 |ssions; |the.* se|
|00004270| 72 76 69 63 65 20 73 69 | 64 65 20 20 63 61 6e 6e |rvice si|de cann|
|00004280| 6f 74 20 74 72 65 61 74 | 20 74 68 69 73 20 69 64 |ot treat| this id|
|00004290| 20 20 61 73 20 61 6e 79 | 20 74 79 70 65 20 20 20 | as any| type |
|000042a0| 6f 66 20 73 65 71 75 65 | 6e 63 65 0a 2a 20 6e 75 |of seque|nce.* nu|
|000042b0| 6d 62 65 72 2e 0a 2a 2f | 0a 58 2e 66 74 20 43 57 |mber..*/|.X.ft CW|
|000042c0| 0a 73 74 72 75 63 74 20 | 72 70 63 5f 6d 73 67 20 |.struct |rpc_msg |
|000042d0| 7b 0a 09 75 6e 73 69 67 | 6e 65 64 20 69 6e 74 20 |{..unsig|ned int |
|000042e0| 78 69 64 3b 0a 09 75 6e | 69 6f 6e 20 73 77 69 74 |xid;..un|ion swit|
|000042f0| 63 68 20 28 6d 73 67 5f | 74 79 70 65 20 6d 74 79 |ch (msg_|type mty|
|00004300| 70 65 29 20 7b 0a 09 09 | 63 61 73 65 20 43 41 4c |pe) {...|case CAL|
|00004310| 4c 3a 0a 09 09 09 63 61 | 6c 6c 5f 62 6f 64 79 20 |L:....ca|ll_body |
|00004320| 63 62 6f 64 79 3b 0a 09 | 09 63 61 73 65 20 52 45 |cbody;..|.case RE|
|00004330| 50 4c 59 3a 20 20 0a 09 | 09 09 72 65 70 6c 79 5f |PLY: ..|..reply_|
|00004340| 62 6f 64 79 20 72 62 6f | 64 79 3b 0a 09 7d 20 62 |body rbo|dy;..} b|
|00004350| 6f 64 79 3b 0a 7d 3b 0a | 58 2e 44 45 0a 58 2e 69 |ody;.};.|X.DE.X.i|
|00004360| 65 20 74 20 2e 44 53 0a | 58 2e 65 6c 20 2e 44 53 |e t .DS.|X.el .DS|
|00004370| 20 4c 0a 58 2e 66 74 20 | 49 0a 2f 2a 0a 2a 20 42 | L.X.ft |I./*.* B|
|00004380| 6f 64 79 20 6f 66 20 61 | 6e 20 52 50 43 20 72 65 |ody of a|n RPC re|
|00004390| 71 75 65 73 74 20 63 61 | 6c 6c 3a 20 0a 2a 20 49 |quest ca|ll: .* I|
|000043a0| 6e 20 76 65 72 73 69 6f | 6e 20 32 20 6f 66 20 74 |n versio|n 2 of t|
|000043b0| 68 65 20 20 52 50 43 20 | 70 72 6f 74 6f 63 6f 6c |he RPC |protocol|
|000043c0| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 2c 20 | specifi|cation, |
|000043d0| 72 70 63 76 65 72 73 20 | 6d 75 73 74 0a 2a 20 62 |rpcvers |must.* b|
|000043e0| 65 20 65 71 75 61 6c 20 | 74 6f 20 32 2e 20 20 54 |e equal |to 2. T|
|000043f0| 68 65 20 20 66 69 65 6c | 64 73 20 70 72 6f 67 2c |he fiel|ds prog,|
|00004400| 20 20 76 65 72 73 2c 20 | 61 6e 64 20 70 72 6f 63 | vers, |and proc|
|00004410| 20 73 70 65 63 69 66 79 | 20 74 68 65 0a 2a 20 72 | specify| the.* r|
|00004420| 65 6d 6f 74 65 20 70 72 | 6f 67 72 61 6d 2c 20 69 |emote pr|ogram, i|
|00004430| 74 73 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |ts versi|on numbe|
|00004440| 72 2c 20 61 6e 64 20 74 | 68 65 20 20 70 72 6f 63 |r, and t|he proc|
|00004450| 65 64 75 72 65 20 77 69 | 74 68 69 6e 0a 2a 20 74 |edure wi|thin.* t|
|00004460| 68 65 20 72 65 6d 6f 74 | 65 20 70 72 6f 67 72 61 |he remot|e progra|
|00004470| 6d 20 74 6f 20 62 65 20 | 63 61 6c 6c 65 64 2e 20 |m to be |called. |
|00004480| 20 41 66 74 65 72 20 74 | 68 65 73 65 20 20 66 69 | After t|hese fi|
|00004490| 65 6c 64 73 20 61 72 65 | 20 74 77 6f 0a 2a 20 61 |elds are| two.* a|
|000044a0| 75 74 68 65 6e 74 69 63 | 61 74 69 6f 6e 20 20 70 |uthentic|ation p|
|000044b0| 61 72 61 6d 65 74 65 72 | 73 3a 20 63 72 65 64 20 |arameter|s: cred |
|000044c0| 28 61 75 74 68 65 6e 74 | 69 63 61 74 69 6f 6e 20 |(authent|ication |
|000044d0| 63 72 65 64 65 6e 74 69 | 61 6c 73 29 0a 2a 20 61 |credenti|als).* a|
|000044e0| 6e 64 20 76 65 72 66 20 | 20 28 61 75 74 68 65 6e |nd verf | (authen|
|000044f0| 74 69 63 61 74 69 6f 6e | 20 76 65 72 69 66 69 65 |tication| verifie|
|00004500| 72 29 2e 20 20 54 68 65 | 20 20 74 77 6f 20 61 75 |r). The| two au|
|00004510| 74 68 65 6e 74 69 63 61 | 74 69 6f 6e 0a 2a 20 70 |thentica|tion.* p|
|00004520| 61 72 61 6d 65 74 65 72 | 73 20 61 72 65 20 20 20 |arameter|s are |
|00004530| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 20 74 68 65 |followed| by the|
|00004540| 20 20 70 61 72 61 6d 65 | 74 65 72 73 20 20 74 6f | parame|ters to|
|00004550| 20 20 74 68 65 20 72 65 | 6d 6f 74 65 0a 2a 20 70 | the re|mote.* p|
|00004560| 72 6f 63 65 64 75 72 65 | 2c 20 20 77 68 69 63 68 |rocedure|, which|
|00004570| 20 20 61 72 65 20 73 70 | 65 63 69 66 69 65 64 20 | are sp|ecified |
|00004580| 20 62 79 20 20 74 68 65 | 20 20 73 70 65 63 69 66 | by the| specif|
|00004590| 69 63 20 20 20 70 72 6f | 67 72 61 6d 0a 2a 20 70 |ic pro|gram.* p|
|000045a0| 72 6f 74 6f 63 6f 6c 2e | 0a 2a 2f 0a 58 2e 66 74 |rotocol.|.*/.X.ft|
|000045b0| 20 43 57 0a 73 74 72 75 | 63 74 20 63 61 6c 6c 5f | CW.stru|ct call_|
|000045c0| 62 6f 64 79 20 7b 0a 09 | 75 6e 73 69 67 6e 65 64 |body {..|unsigned|
|000045d0| 20 69 6e 74 20 72 70 63 | 76 65 72 73 3b 20 20 2f | int rpc|vers; /|
|000045e0| 2a 20 5c 66 49 6d 75 73 | 74 20 62 65 20 65 71 75 |* \fImus|t be equ|
|000045f0| 61 6c 20 74 6f 20 74 77 | 6f 20 28 32 29 20 5c 66 |al to tw|o (2) \f|
|00004600| 50 2a 2f 0a 09 75 6e 73 | 69 67 6e 65 64 20 69 6e |P*/..uns|igned in|
|00004610| 74 20 70 72 6f 67 3b 0a | 09 75 6e 73 69 67 6e 65 |t prog;.|.unsigne|
|00004620| 64 20 69 6e 74 20 76 65 | 72 73 3b 0a 09 75 6e 73 |d int ve|rs;..uns|
|00004630| 69 67 6e 65 64 20 69 6e | 74 20 70 72 6f 63 3b 0a |igned in|t proc;.|
|00004640| 09 6f 70 61 71 75 65 5f | 61 75 74 68 20 63 72 65 |.opaque_|auth cre|
|00004650| 64 3b 0a 09 6f 70 61 71 | 75 65 5f 61 75 74 68 20 |d;..opaq|ue_auth |
|00004660| 76 65 72 66 3b 0a 09 2f | 2a 20 5c 66 49 70 72 6f |verf;../|* \fIpro|
|00004670| 63 65 64 75 72 65 20 73 | 70 65 63 69 66 69 63 20 |cedure s|pecific |
|00004680| 70 61 72 61 6d 65 74 65 | 72 73 20 73 74 61 72 74 |paramete|rs start|
|00004690| 20 68 65 72 65 20 5c 66 | 50 2a 2f 0a 7d 3b 0a 58 | here \f|P*/.};.X|
|000046a0| 2e 44 45 0a 58 2e 69 65 | 20 74 20 2e 44 53 0a 58 |.DE.X.ie| t .DS.X|
|000046b0| 2e 65 6c 20 2e 44 53 20 | 4c 0a 58 2e 66 74 20 49 |.el .DS |L.X.ft I|
|000046c0| 0a 2f 2a 0a 2a 20 42 6f | 64 79 20 6f 66 20 61 20 |./*.* Bo|dy of a |
|000046d0| 72 65 70 6c 79 20 74 6f | 20 61 6e 20 52 50 43 20 |reply to| an RPC |
|000046e0| 72 65 71 75 65 73 74 3a | 0a 2a 20 54 68 65 20 63 |request:|.* The c|
|000046f0| 61 6c 6c 20 6d 65 73 73 | 61 67 65 20 77 61 73 20 |all mess|age was |
|00004700| 65 69 74 68 65 72 20 61 | 63 63 65 70 74 65 64 20 |either a|ccepted |
|00004710| 6f 72 20 72 65 6a 65 63 | 74 65 64 2e 0a 2a 2f 0a |or rejec|ted..*/.|
|00004720| 58 2e 66 74 20 43 57 0a | 75 6e 69 6f 6e 20 72 65 |X.ft CW.|union re|
|00004730| 70 6c 79 5f 62 6f 64 79 | 20 73 77 69 74 63 68 20 |ply_body| switch |
|00004740| 28 72 65 70 6c 79 5f 73 | 74 61 74 20 73 74 61 74 |(reply_s|tat stat|
|00004750| 29 20 7b 0a 09 63 61 73 | 65 20 4d 53 47 5f 41 43 |) {..cas|e MSG_AC|
|00004760| 43 45 50 54 45 44 3a 20 | 20 0a 09 09 61 63 63 65 |CEPTED: | ...acce|
|00004770| 70 74 65 64 5f 72 65 70 | 6c 79 20 61 72 65 70 6c |pted_rep|ly arepl|
|00004780| 79 3b 0a 09 63 61 73 65 | 20 4d 53 47 5f 44 45 4e |y;..case| MSG_DEN|
|00004790| 49 45 44 3a 20 20 0a 09 | 09 72 65 6a 65 63 74 65 |IED: ..|.rejecte|
|000047a0| 64 5f 72 65 70 6c 79 20 | 72 72 65 70 6c 79 3b 0a |d_reply |rreply;.|
|000047b0| 7d 20 72 65 70 6c 79 3b | 0a 58 2e 44 45 0a 58 2e |} reply;|.X.DE.X.|
|000047c0| 69 65 20 74 20 2e 44 53 | 0a 58 2e 65 6c 20 2e 44 |ie t .DS|.X.el .D|
|000047d0| 53 20 4c 0a 58 2e 66 74 | 20 49 0a 2f 2a 0a 2a 20 |S L.X.ft| I./*.* |
|000047e0| 52 65 70 6c 79 20 74 6f | 20 20 20 61 6e 20 52 50 |Reply to| an RP|
|000047f0| 43 20 72 65 71 75 65 73 | 74 20 20 74 68 61 74 20 |C reques|t that |
|00004800| 20 77 61 73 20 61 63 63 | 65 70 74 65 64 20 20 62 | was acc|epted b|
|00004810| 79 20 74 68 65 20 73 65 | 72 76 65 72 3a 0a 2a 20 |y the se|rver:.* |
|00004820| 74 68 65 72 65 20 63 6f | 75 6c 64 20 62 65 20 61 |there co|uld be a|
|00004830| 6e 20 65 72 72 6f 72 20 | 65 76 65 6e 20 74 68 6f |n error |even tho|
|00004840| 75 67 68 20 74 68 65 20 | 72 65 71 75 65 73 74 20 |ugh the |request |
|00004850| 77 61 73 20 61 63 63 65 | 70 74 65 64 2e 0a 2a 20 |was acce|pted..* |
|00004860| 54 68 65 20 66 69 72 73 | 74 20 66 69 65 6c 64 20 |The firs|t field |
|00004870| 69 73 20 61 6e 20 61 75 | 74 68 65 6e 74 69 63 61 |is an au|thentica|
|00004880| 74 69 6f 6e 20 76 65 72 | 69 66 69 65 72 20 74 68 |tion ver|ifier th|
|00004890| 61 74 20 74 68 65 20 73 | 65 72 76 65 72 0a 2a 20 |at the s|erver.* |
|000048a0| 67 65 6e 65 72 61 74 65 | 73 20 69 6e 20 6f 72 64 |generate|s in ord|
|000048b0| 65 72 20 74 6f 20 20 76 | 61 6c 69 64 61 74 65 20 |er to v|alidate |
|000048c0| 69 74 73 65 6c 66 20 20 | 74 6f 20 74 68 65 20 63 |itself |to the c|
|000048d0| 61 6c 6c 65 72 2e 20 20 | 49 74 20 69 73 0a 2a 20 |aller. |It is.* |
|000048e0| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 20 20 20 61 |followed| by a|
|000048f0| 20 20 75 6e 69 6f 6e 20 | 77 68 6f 73 65 20 20 20 | union |whose |
|00004900| 20 20 64 69 73 63 72 69 | 6d 69 6e 61 6e 74 20 20 | discri|minant |
|00004910| 69 73 20 20 20 61 6e 20 | 20 65 6e 75 6d 0a 2a 20 |is an | enum.* |
|00004920| 61 63 63 65 70 74 5f 73 | 74 61 74 2e 20 20 54 68 |accept_s|tat. Th|
|00004930| 65 20 20 5c 66 49 53 55 | 43 43 45 53 53 5c 66 50 |e \fISU|CCESS\fP|
|00004940| 20 20 61 72 6d 20 6f 66 | 20 20 20 20 74 68 65 20 | arm of| the |
|00004950| 75 6e 69 6f 6e 20 20 69 | 73 20 20 70 72 6f 74 6f |union i|s proto|
|00004960| 63 6f 6c 0a 2a 20 73 70 | 65 63 69 66 69 63 2e 20 |col.* sp|ecific. |
|00004970| 20 54 68 65 20 5c 66 49 | 50 52 4f 47 5f 55 4e 41 | The \fI|PROG_UNA|
|00004980| 56 41 49 4c 5c 66 50 2c | 20 5c 66 49 50 52 4f 43 |VAIL\fP,| \fIPROC|
|00004990| 5f 55 4e 41 56 41 49 4c | 5c 66 50 2c 20 61 6e 64 |_UNAVAIL|\fP, and|
|000049a0| 20 5c 66 49 47 41 52 42 | 41 47 45 5f 41 52 47 50 | \fIGARB|AGE_ARGP|
|000049b0| 5c 66 50 0a 2a 20 61 72 | 6d 73 20 6f 66 20 74 68 |\fP.* ar|ms of th|
|000049c0| 65 20 75 6e 69 6f 6e 20 | 61 72 65 20 76 6f 69 64 |e union |are void|
|000049d0| 2e 20 20 20 54 68 65 20 | 5c 66 49 50 52 4f 47 5f |. The |\fIPROG_|
|000049e0| 4d 49 53 4d 41 54 43 48 | 5c 66 50 20 61 72 6d 20 |MISMATCH|\fP arm |
|000049f0| 73 70 65 63 69 66 69 65 | 73 0a 2a 20 74 68 65 20 |specifie|s.* the |
|00004a00| 6c 6f 77 65 73 74 20 61 | 6e 64 20 68 69 67 68 65 |lowest a|nd highe|
|00004a10| 73 74 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |st versi|on numbe|
|00004a20| 72 73 20 6f 66 20 74 68 | 65 20 20 72 65 6d 6f 74 |rs of th|e remot|
|00004a30| 65 20 70 72 6f 67 72 61 | 6d 0a 2a 20 73 75 70 70 |e progra|m.* supp|
|00004a40| 6f 72 74 65 64 20 62 79 | 20 74 68 65 20 73 65 72 |orted by| the ser|
|00004a50| 76 65 72 2e 0a 2a 2f 0a | 58 2e 66 74 20 43 57 0a |ver..*/.|X.ft CW.|
|00004a60| 73 74 72 75 63 74 20 61 | 63 63 65 70 74 65 64 5f |struct a|ccepted_|
|00004a70| 72 65 70 6c 79 20 7b 0a | 09 6f 70 61 71 75 65 5f |reply {.|.opaque_|
|00004a80| 61 75 74 68 20 76 65 72 | 66 3b 0a 09 75 6e 69 6f |auth ver|f;..unio|
|00004a90| 6e 20 73 77 69 74 63 68 | 20 28 61 63 63 65 70 74 |n switch| (accept|
|00004aa0| 5f 73 74 61 74 20 73 74 | 61 74 29 20 7b 0a 09 09 |_stat st|at) {...|
|00004ab0| 63 61 73 65 20 53 55 43 | 43 45 53 53 3a 0a 09 09 |case SUC|CESS:...|
|00004ac0| 09 6f 70 61 71 75 65 20 | 72 65 73 75 6c 74 73 5b |.opaque |results[|
|00004ad0| 30 5d 3b 0a 09 09 09 2f | 2a 20 5c 66 49 70 72 6f |0];..../|* \fIpro|
|00004ae0| 63 65 64 75 72 65 2d 73 | 70 65 63 69 66 69 63 20 |cedure-s|pecific |
|00004af0| 72 65 73 75 6c 74 73 20 | 73 74 61 72 74 20 68 65 |results |start he|
|00004b00| 72 65 5c 66 50 20 2a 2f | 0a 09 09 63 61 73 65 20 |re\fP */|...case |
|00004b10| 50 52 4f 47 5f 4d 49 53 | 4d 41 54 43 48 3a 0a 09 |PROG_MIS|MATCH:..|
|00004b20| 09 09 73 74 72 75 63 74 | 20 7b 0a 09 09 09 09 75 |..struct| {.....u|
|00004b30| 6e 73 69 67 6e 65 64 20 | 69 6e 74 20 6c 6f 77 3b |nsigned |int low;|
|00004b40| 0a 09 09 09 09 75 6e 73 | 69 67 6e 65 64 20 69 6e |.....uns|igned in|
|00004b50| 74 20 68 69 67 68 3b 0a | 09 09 09 7d 20 6d 69 73 |t high;.|...} mis|
|00004b60| 6d 61 74 63 68 5f 69 6e | 66 6f 3b 0a 09 09 64 65 |match_in|fo;...de|
|00004b70| 66 61 75 6c 74 3a 0a 58 | 2e 66 74 20 49 0a 09 09 |fault:.X|.ft I...|
|00004b80| 09 2f 2a 0a 09 09 09 2a | 20 56 6f 69 64 2e 20 20 |./*....*| Void. |
|00004b90| 43 61 73 65 73 20 69 6e | 63 6c 75 64 65 20 5c 66 |Cases in|clude \f|
|00004ba0| 49 50 52 4f 47 5f 55 4e | 41 56 41 49 4c 2c 20 50 |IPROG_UN|AVAIL, P|
|00004bb0| 52 4f 43 5f 55 4e 41 56 | 41 49 4c 5c 66 50 2c 0a |ROC_UNAV|AIL\fP,.|
|00004bc0| 09 09 09 2a 20 61 6e 64 | 20 5c 66 49 47 41 52 42 |...* and| \fIGARB|
|00004bd0| 41 47 45 5f 41 52 47 53 | 5c 66 50 2e 0a 09 09 09 |AGE_ARGS|\fP.....|
|00004be0| 2a 2f 0a 58 2e 66 74 20 | 43 57 0a 09 09 09 76 6f |*/.X.ft |CW....vo|
|00004bf0| 69 64 3b 0a 09 7d 20 72 | 65 70 6c 79 5f 64 61 74 |id;..} r|eply_dat|
|00004c00| 61 3b 0a 7d 3b 0a 58 2e | 44 45 0a 58 2e 69 65 20 |a;.};.X.|DE.X.ie |
|00004c10| 74 20 2e 44 53 0a 58 2e | 65 6c 20 2e 44 53 20 4c |t .DS.X.|el .DS L|
|00004c20| 0a 58 2e 66 74 20 49 0a | 2f 2a 0a 2a 20 52 65 70 |.X.ft I.|/*.* Rep|
|00004c30| 6c 79 20 74 6f 20 61 6e | 20 52 50 43 20 72 65 71 |ly to an| RPC req|
|00004c40| 75 65 73 74 20 74 68 61 | 74 20 77 61 73 20 72 65 |uest tha|t was re|
|00004c50| 6a 65 63 74 65 64 20 62 | 79 20 74 68 65 20 73 65 |jected b|y the se|
|00004c60| 72 76 65 72 3a 20 0a 2a | 20 54 68 65 20 72 65 71 |rver: .*| The req|
|00004c70| 75 65 73 74 20 20 63 61 | 6e 20 20 20 62 65 20 72 |uest ca|n be r|
|00004c80| 65 6a 65 63 74 65 64 20 | 66 6f 72 20 20 20 74 77 |ejected |for tw|
|00004c90| 6f 20 72 65 61 73 6f 6e | 73 3a 20 20 65 69 74 68 |o reason|s: eith|
|00004ca0| 65 72 20 74 68 65 0a 2a | 20 73 65 72 76 65 72 20 |er the.*| server |
|00004cb0| 20 20 69 73 20 6e 6f 74 | 20 20 72 75 6e 6e 69 6e | is not| runnin|
|00004cc0| 67 20 61 20 20 20 63 6f | 6d 70 61 74 69 62 6c 65 |g a co|mpatible|
|00004cd0| 20 20 76 65 72 73 69 6f | 6e 20 20 6f 66 20 74 68 | versio|n of th|
|00004ce0| 65 20 20 52 50 43 0a 2a | 20 70 72 6f 74 6f 63 6f |e RPC.*| protoco|
|00004cf0| 6c 20 20 20 20 28 5c 66 | 49 52 50 43 5f 4d 49 53 |l (\f|IRPC_MIS|
|00004d00| 4d 41 54 43 48 5c 66 50 | 29 2c 20 6f 72 20 20 20 |MATCH\fP|), or |
|00004d10| 20 74 68 65 20 20 73 65 | 72 76 65 72 20 20 20 72 | the se|rver r|
|00004d20| 65 66 75 73 65 73 20 20 | 20 20 74 6f 0a 2a 20 61 |efuses | to.* a|
|00004d30| 75 74 68 65 6e 74 69 63 | 61 74 65 20 74 68 65 20 |uthentic|ate the |
|00004d40| 20 63 61 6c 6c 65 72 20 | 20 28 5c 66 49 41 55 54 | caller | (\fIAUT|
|00004d50| 48 5f 45 52 52 4f 52 5c | 66 50 29 2e 20 20 49 6e |H_ERROR\|fP). In|
|00004d60| 20 20 63 61 73 65 20 6f | 66 20 20 61 6e 20 20 52 | case o|f an R|
|00004d70| 50 43 0a 2a 20 76 65 72 | 73 69 6f 6e 20 6d 69 73 |PC.* ver|sion mis|
|00004d80| 6d 61 74 63 68 2c 20 20 | 74 68 65 20 73 65 72 76 |match, |the serv|
|00004d90| 65 72 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 20 |er retur|ns the |
|00004da0| 6c 6f 77 65 73 74 20 61 | 6e 64 20 68 69 67 68 65 |lowest a|nd highe|
|00004db0| 73 74 0a 2a 20 73 75 70 | 70 6f 72 74 65 64 20 20 |st.* sup|ported |
|00004dc0| 20 20 52 50 43 20 20 76 | 65 72 73 69 6f 6e 20 20 | RPC v|ersion |
|00004dd0| 20 20 6e 75 6d 62 65 72 | 73 2e 20 20 49 6e 20 20 | number|s. In |
|00004de0| 20 63 61 73 65 20 20 20 | 6f 66 20 72 65 66 75 73 | case |of refus|
|00004df0| 65 64 0a 2a 20 61 75 74 | 68 65 6e 74 69 63 61 74 |ed.* aut|henticat|
|00004e00| 69 6f 6e 2c 20 66 61 69 | 6c 75 72 65 20 73 74 61 |ion, fai|lure sta|
|00004e10| 74 75 73 20 69 73 20 72 | 65 74 75 72 6e 65 64 2e |tus is r|eturned.|
|00004e20| 0a 2a 2f 0a 58 2e 66 74 | 20 43 57 0a 75 6e 69 6f |.*/.X.ft| CW.unio|
|00004e30| 6e 20 72 65 6a 65 63 74 | 65 64 5f 72 65 70 6c 79 |n reject|ed_reply|
|00004e40| 20 73 77 69 74 63 68 20 | 28 72 65 6a 65 63 74 5f | switch |(reject_|
|00004e50| 73 74 61 74 20 73 74 61 | 74 29 20 7b 0a 09 63 61 |stat sta|t) {..ca|
|00004e60| 73 65 20 52 50 43 5f 4d | 49 53 4d 41 54 43 48 3a |se RPC_M|ISMATCH:|
|00004e70| 0a 09 09 73 74 72 75 63 | 74 20 7b 0a 09 09 09 75 |...struc|t {....u|
|00004e80| 6e 73 69 67 6e 65 64 20 | 69 6e 74 20 6c 6f 77 3b |nsigned |int low;|
|00004e90| 0a 09 09 09 75 6e 73 69 | 67 6e 65 64 20 69 6e 74 |....unsi|gned int|
|00004ea0| 20 68 69 67 68 3b 0a 09 | 09 7d 20 6d 69 73 6d 61 | high;..|.} misma|
|00004eb0| 74 63 68 5f 69 6e 66 6f | 3b 0a 09 63 61 73 65 20 |tch_info|;..case |
|00004ec0| 41 55 54 48 5f 45 52 52 | 4f 52 3a 20 0a 09 09 61 |AUTH_ERR|OR: ...a|
|00004ed0| 75 74 68 5f 73 74 61 74 | 20 73 74 61 74 3b 0a 7d |uth_stat| stat;.}|
|00004ee0| 3b 0a 58 2e 44 45 0a 58 | 2e 4e 48 20 31 0a 5c 26 |;.X.DE.X|.NH 1.\&|
|00004ef0| 41 75 74 68 65 6e 74 69 | 63 61 74 69 6f 6e 20 50 |Authenti|cation P|
|00004f00| 72 6f 74 6f 63 6f 6c 73 | 0a 58 2e 4c 50 0a 41 73 |rotocols|.X.LP.As|
|00004f10| 20 70 72 65 76 69 6f 75 | 73 6c 79 20 73 74 61 74 | previou|sly stat|
|00004f20| 65 64 2c 20 61 75 74 68 | 65 6e 74 69 63 61 74 69 |ed, auth|enticati|
|00004f30| 6f 6e 20 70 61 72 61 6d | 65 74 65 72 73 20 61 72 |on param|eters ar|
|00004f40| 65 20 6f 70 61 71 75 65 | 2c 20 62 75 74 0a 6f 70 |e opaque|, but.op|
|00004f50| 65 6e 2d 65 6e 64 65 64 | 20 74 6f 20 74 68 65 20 |en-ended| to the |
|00004f60| 72 65 73 74 20 6f 66 20 | 74 68 65 20 52 50 43 20 |rest of |the RPC |
|00004f70| 70 72 6f 74 6f 63 6f 6c | 2e 20 20 54 68 69 73 20 |protocol|. This |
|00004f80| 73 65 63 74 69 6f 6e 20 | 64 65 66 69 6e 65 73 0a |section |defines.|
|00004f90| 73 6f 6d 65 20 22 66 6c | 61 76 6f 72 73 22 20 6f |some "fl|avors" o|
|00004fa0| 66 20 61 75 74 68 65 6e | 74 69 63 61 74 69 6f 6e |f authen|tication|
|00004fb0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 61 74 20 | impleme|nted at |
|00004fc0| 28 61 6e 64 20 73 75 70 | 70 6f 72 74 65 64 20 62 |(and sup|ported b|
|00004fd0| 79 29 0a 53 75 6e 2e 20 | 20 4f 74 68 65 72 20 73 |y).Sun. | Other s|
|00004fe0| 69 74 65 73 20 61 72 65 | 20 66 72 65 65 20 74 6f |ites are| free to|
|00004ff0| 20 69 6e 76 65 6e 74 20 | 6e 65 77 20 61 75 74 68 | invent |new auth|
|00005000| 65 6e 74 69 63 61 74 69 | 6f 6e 20 74 79 70 65 73 |enticati|on types|
|00005010| 2c 20 77 69 74 68 0a 74 | 68 65 20 73 61 6d 65 20 |, with.t|he same |
|00005020| 72 75 6c 65 73 20 6f 66 | 20 66 6c 61 76 6f 72 20 |rules of| flavor |
|00005030| 6e 75 6d 62 65 72 20 61 | 73 73 69 67 6e 6d 65 6e |number a|ssignmen|
|00005040| 74 20 61 73 20 74 68 65 | 72 65 20 69 73 20 66 6f |t as the|re is fo|
|00005050| 72 20 70 72 6f 67 72 61 | 6d 0a 6e 75 6d 62 65 72 |r progra|m.number|
|00005060| 20 61 73 73 69 67 6e 6d | 65 6e 74 2e 0a 58 2e 4e | assignm|ent..X.N|
|00005070| 48 20 32 0a 5c 26 4e 75 | 6c 6c 20 41 75 74 68 65 |H 2.\&Nu|ll Authe|
|00005080| 6e 74 69 63 61 74 69 6f | 6e 0a 58 2e 4c 50 0a 4f |nticatio|n.X.LP.O|
|00005090| 66 74 65 6e 20 63 61 6c | 6c 73 20 6d 75 73 74 20 |ften cal|ls must |
|000050a0| 62 65 20 6d 61 64 65 20 | 77 68 65 72 65 20 74 68 |be made |where th|
|000050b0| 65 20 63 61 6c 6c 65 72 | 20 64 6f 65 73 20 6e 6f |e caller| does no|
|000050c0| 74 20 6b 6e 6f 77 20 77 | 68 6f 20 68 65 20 69 73 |t know w|ho he is|
|000050d0| 20 6f 72 0a 74 68 65 20 | 73 65 72 76 65 72 20 64 | or.the |server d|
|000050e0| 6f 65 73 20 6e 6f 74 20 | 63 61 72 65 20 77 68 6f |oes not |care who|
|000050f0| 20 74 68 65 20 63 61 6c | 6c 65 72 20 69 73 2e 20 | the cal|ler is. |
|00005100| 20 49 6e 20 74 68 69 73 | 20 63 61 73 65 2c 20 74 | In this| case, t|
|00005110| 68 65 20 66 6c 61 76 6f | 72 0a 76 61 6c 75 65 20 |he flavo|r.value |
|00005120| 28 74 68 65 20 64 69 73 | 63 72 69 6d 69 6e 61 6e |(the dis|criminan|
|00005130| 74 20 6f 66 20 74 68 65 | 20 5c 66 49 6f 70 61 71 |t of the| \fIopaq|
|00005140| 75 65 5f 61 75 74 68 5c | 66 50 27 73 20 75 6e 69 |ue_auth\|fP's uni|
|00005150| 6f 6e 29 20 6f 66 20 74 | 68 65 20 52 50 43 0a 6d |on) of t|he RPC.m|
|00005160| 65 73 73 61 67 65 27 73 | 20 63 72 65 64 65 6e 74 |essage's| credent|
|00005170| 69 61 6c 73 2c 20 76 65 | 72 69 66 69 65 72 2c 20 |ials, ve|rifier, |
|00005180| 61 6e 64 20 72 65 73 70 | 6f 6e 73 65 20 76 65 72 |and resp|onse ver|
|00005190| 69 66 69 65 72 20 69 73 | 0a 58 2e 49 20 41 55 54 |ifier is|.X.I AUT|
|000051a0| 48 5f 4e 55 4c 4c 20 2e | 0a 54 68 65 20 20 62 79 |H_NULL .|.The by|
|000051b0| 74 65 73 20 6f 66 20 74 | 68 65 20 6f 70 61 71 75 |tes of t|he opaqu|
|000051c0| 65 5f 61 75 74 68 27 73 | 20 62 6f 64 79 20 20 61 |e_auth's| body a|
|000051d0| 72 65 20 75 6e 64 65 66 | 69 6e 65 64 2e 0a 49 74 |re undef|ined..It|
|000051e0| 20 69 73 20 72 65 63 6f | 6d 6d 65 6e 64 65 64 20 | is reco|mmended |
|000051f0| 74 68 61 74 20 74 68 65 | 20 6f 70 61 71 75 65 20 |that the| opaque |
|00005200| 6c 65 6e 67 74 68 20 62 | 65 20 7a 65 72 6f 2e 0a |length b|e zero..|
|00005210| 58 2e 4e 48 20 32 0a 5c | 26 55 4e 49 58 20 41 75 |X.NH 2.\|&UNIX Au|
|00005220| 74 68 65 6e 74 69 63 61 | 74 69 6f 6e 0a 58 2e 4c |thentica|tion.X.L|
|00005230| 50 0a 54 68 65 20 63 61 | 6c 6c 65 72 20 6f 66 20 |P.The ca|ller of |
|00005240| 61 20 72 65 6d 6f 74 65 | 20 70 72 6f 63 65 64 75 |a remote| procedu|
|00005250| 72 65 20 6d 61 79 20 77 | 69 73 68 20 74 6f 20 69 |re may w|ish to i|
|00005260| 64 65 6e 74 69 66 79 20 | 68 69 6d 73 65 6c 66 20 |dentify |himself |
|00005270| 61 73 20 68 65 0a 69 73 | 20 69 64 65 6e 74 69 66 |as he.is| identif|
|00005280| 69 65 64 20 6f 6e 20 61 | 20 55 4e 49 58 20 73 79 |ied on a| UNIX sy|
|00005290| 73 74 65 6d 2e 20 20 54 | 68 65 20 20 76 61 6c 75 |stem. T|he valu|
|000052a0| 65 20 6f 66 20 74 68 65 | 20 63 72 65 64 65 6e 74 |e of the| credent|
|000052b0| 69 61 6c 27 73 0a 64 69 | 73 63 72 69 6d 69 6e 61 |ial's.di|scrimina|
|000052c0| 6e 74 20 6f 66 20 61 6e | 20 52 50 43 20 63 61 6c |nt of an| RPC cal|
|000052d0| 6c 20 20 6d 65 73 73 61 | 67 65 20 69 73 20 20 0a |l messa|ge is .|
|000052e0| 58 2e 49 20 41 55 54 48 | 5f 55 4e 49 58 20 2e 0a |X.I AUTH|_UNIX ..|
|000052f0| 74 68 65 20 63 72 65 64 | 65 6e 74 69 61 6c 27 73 |the cred|ential's|
|00005300| 20 6f 70 61 71 75 65 20 | 62 6f 64 79 20 65 6e 63 | opaque |body enc|
|00005310| 6f 64 65 20 74 68 65 20 | 74 68 65 20 66 6f 6c 6c |ode the |the foll|
|00005320| 6f 77 69 6e 67 20 73 74 | 72 75 63 74 75 72 65 3a |owing st|ructure:|
|00005330| 0a 58 2e 44 53 0a 58 2e | 66 74 20 43 57 0a 73 74 |.X.DS.X.|ft CW.st|
|00005340| 72 75 63 74 20 61 75 74 | 68 5f 75 6e 69 78 20 7b |ruct aut|h_unix {|
|00005350| 0a 09 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 73 |..unsign|ed int s|
|00005360| 74 61 6d 70 3b 0a 09 73 | 74 72 69 6e 67 20 6d 61 |tamp;..s|tring ma|
|00005370| 63 68 69 6e 65 6e 61 6d | 65 3c 32 35 35 3e 3b 0a |chinenam|e<255>;.|
|00005380| 09 75 6e 73 69 67 6e 65 | 64 20 69 6e 74 20 75 69 |.unsigne|d int ui|
|00005390| 64 3b 0a 09 75 6e 73 69 | 67 6e 65 64 20 69 6e 74 |d;..unsi|gned int|
|000053a0| 20 67 69 64 3b 0a 09 75 | 6e 73 69 67 6e 65 64 20 | gid;..u|nsigned |
|000053b0| 69 6e 74 20 67 69 64 73 | 3c 31 30 3e 3b 0a 7d 3b |int gids|<10>;.};|
|000053c0| 0a 58 2e 44 45 0a 54 68 | 65 20 0a 58 2e 49 20 73 |.X.DE.Th|e .X.I s|
|000053d0| 74 61 6d 70 20 0a 69 73 | 20 61 6e 20 20 61 72 62 |tamp .is| an arb|
|000053e0| 69 74 72 61 72 79 20 20 | 20 20 49 44 20 77 68 69 |itrary | ID whi|
|000053f0| 63 68 20 74 68 65 20 20 | 63 61 6c 6c 65 72 20 6d |ch the |caller m|
|00005400| 61 63 68 69 6e 65 20 20 | 20 6d 61 79 0a 67 65 6e |achine | may.gen|
|00005410| 65 72 61 74 65 2e 20 20 | 54 68 65 20 0a 58 2e 49 |erate. |The .X.I|
|00005420| 20 6d 61 63 68 69 6e 65 | 6e 61 6d 65 20 0a 69 73 | machine|name .is|
|00005430| 20 74 68 65 20 20 6e 61 | 6d 65 20 6f 66 20 74 68 | the na|me of th|
|00005440| 65 20 20 63 61 6c 6c 65 | 72 27 73 20 6d 61 63 68 |e calle|r's mach|
|00005450| 69 6e 65 20 28 6c 69 6b | 65 20 20 22 6b 72 79 70 |ine (lik|e "kryp|
|00005460| 74 6f 6e 22 29 2e 20 20 | 54 68 65 20 0a 58 2e 49 |ton"). |The .X.I|
|00005470| 20 75 69 64 20 0a 69 73 | 20 20 74 68 65 20 63 61 | uid .is| the ca|
|00005480| 6c 6c 65 72 27 73 20 65 | 66 66 65 63 74 69 76 65 |ller's e|ffective|
|00005490| 20 75 73 65 72 20 20 49 | 44 2e 20 20 54 68 65 20 | user I|D. The |
|000054a0| 20 0a 58 2e 49 20 67 69 | 64 20 0a 69 73 20 20 74 | .X.I gi|d .is t|
|000054b0| 68 65 20 63 61 6c 6c 65 | 72 27 73 20 65 66 66 65 |he calle|r's effe|
|000054c0| 63 74 69 76 65 20 20 67 | 72 6f 75 70 20 20 49 44 |ctive g|roup ID|
|000054d0| 2e 20 20 54 68 65 20 0a | 58 2e 49 20 67 69 64 73 |. The .|X.I gids|
|000054e0| 20 0a 69 73 20 20 61 0a | 63 6f 75 6e 74 65 64 20 | .is a.|counted |
|000054f0| 61 72 72 61 79 20 6f 66 | 20 67 72 6f 75 70 73 20 |array of| groups |
|00005500| 77 68 69 63 68 20 63 6f | 6e 74 61 69 6e 20 74 68 |which co|ntain th|
|00005510| 65 20 63 61 6c 6c 65 72 | 20 61 73 20 20 61 20 6d |e caller| as a m|
|00005520| 65 6d 62 65 72 2e 20 20 | 54 68 65 0a 76 65 72 69 |ember. |The.veri|
|00005530| 66 69 65 72 20 61 63 63 | 6f 6d 70 61 6e 79 69 6e |fier acc|ompanyin|
|00005540| 67 20 74 68 65 20 20 63 | 72 65 64 65 6e 74 69 61 |g the c|redentia|
|00005550| 6c 73 20 20 73 68 6f 75 | 6c 64 20 20 62 65 20 20 |ls shou|ld be |
|00005560| 6f 66 20 20 0a 58 2e 49 | 20 41 55 54 48 5f 4e 55 |of .X.I| AUTH_NU|
|00005570| 4c 4c 0a 28 64 65 66 69 | 6e 65 64 20 61 62 6f 76 |LL.(defi|ned abov|
|00005580| 65 29 2e 0a 58 2e 4c 50 | 0a 54 68 65 20 76 61 6c |e)..X.LP|.The val|
|00005590| 75 65 20 6f 66 20 74 68 | 65 20 64 69 73 63 72 69 |ue of th|e discri|
|000055a0| 6d 69 6e 61 6e 74 20 6f | 66 20 20 74 68 65 20 72 |minant o|f the r|
|000055b0| 65 73 70 6f 6e 73 65 20 | 76 65 72 69 66 69 65 72 |esponse |verifier|
|000055c0| 20 72 65 63 65 69 76 65 | 64 20 69 6e 0a 74 68 65 | receive|d in.the|
|000055d0| 20 20 72 65 70 6c 79 20 | 20 6d 65 73 73 61 67 65 | reply | message|
|000055e0| 20 20 66 72 6f 6d 20 20 | 74 68 65 20 20 20 20 73 | from |the s|
|000055f0| 65 72 76 65 72 20 20 6d | 61 79 20 20 20 62 65 20 |erver m|ay be |
|00005600| 20 20 0a 58 2e 49 20 41 | 55 54 48 5f 4e 55 4c 4c | .X.I A|UTH_NULL|
|00005610| 20 0a 6f 72 0a 58 2e 49 | 20 41 55 54 48 5f 53 48 | .or.X.I| AUTH_SH|
|00005620| 4f 52 54 20 2e 0a 49 6e | 20 20 74 68 65 20 20 63 |ORT ..In| the c|
|00005630| 61 73 65 20 20 6f 66 20 | 0a 58 2e 49 20 41 55 54 |ase of |.X.I AUT|
|00005640| 48 5f 53 48 4f 52 54 20 | 2c 0a 74 68 65 20 62 79 |H_SHORT |,.the by|
|00005650| 74 65 73 20 6f 66 20 74 | 68 65 20 72 65 73 70 6f |tes of t|he respo|
|00005660| 6e 73 65 20 76 65 72 69 | 66 69 65 72 27 73 20 73 |nse veri|fier's s|
|00005670| 74 72 69 6e 67 20 65 6e | 63 6f 64 65 20 61 6e 20 |tring en|code an |
|00005680| 6f 70 61 71 75 65 0a 73 | 74 72 75 63 74 75 72 65 |opaque.s|tructure|
|00005690| 2e 20 20 54 68 69 73 20 | 6e 65 77 20 6f 70 61 71 |. This |new opaq|
|000056a0| 75 65 20 73 74 72 75 63 | 74 75 72 65 20 6d 61 79 |ue struc|ture may|
|000056b0| 20 6e 6f 77 20 62 65 20 | 70 61 73 73 65 64 20 74 | now be |passed t|
|000056c0| 6f 20 74 68 65 20 73 65 | 72 76 65 72 0a 69 6e 73 |o the se|rver.ins|
|000056d0| 74 65 61 64 20 6f 66 20 | 74 68 65 20 6f 72 69 67 |tead of |the orig|
|000056e0| 69 6e 61 6c 0a 58 2e 49 | 20 41 55 54 48 5f 55 4e |inal.X.I| AUTH_UN|
|000056f0| 49 58 0a 66 6c 61 76 6f | 72 20 63 72 65 64 65 6e |IX.flavo|r creden|
|00005700| 74 69 61 6c 73 2e 20 20 | 54 68 65 20 73 65 72 76 |tials. |The serv|
|00005710| 65 72 20 6b 65 65 70 73 | 20 61 20 63 61 63 68 65 |er keeps| a cache|
|00005720| 20 77 68 69 63 68 20 6d | 61 70 73 20 73 68 6f 72 | which m|aps shor|
|00005730| 74 68 61 6e 64 0a 6f 70 | 61 71 75 65 20 73 74 72 |thand.op|aque str|
|00005740| 75 63 74 75 72 65 73 20 | 28 70 61 73 73 65 64 20 |uctures |(passed |
|00005750| 62 61 63 6b 20 62 79 20 | 77 61 79 20 6f 66 20 61 |back by |way of a|
|00005760| 6e 0a 58 2e 49 20 41 55 | 54 48 5f 53 48 4f 52 54 |n.X.I AU|TH_SHORT|
|00005770| 0a 73 74 79 6c 65 20 72 | 65 73 70 6f 6e 73 65 20 |.style r|esponse |
|00005780| 76 65 72 69 66 69 65 72 | 29 20 74 6f 20 74 68 65 |verifier|) to the|
|00005790| 20 6f 72 69 67 69 6e 61 | 6c 20 63 72 65 64 65 6e | origina|l creden|
|000057a0| 74 69 61 6c 73 20 6f 66 | 20 74 68 65 20 63 61 6c |tials of| the cal|
|000057b0| 6c 65 72 2e 0a 54 68 65 | 20 63 61 6c 6c 65 72 20 |ler..The| caller |
|000057c0| 63 61 6e 20 73 61 76 65 | 20 6e 65 74 77 6f 72 6b |can save| network|
|000057d0| 20 62 61 6e 64 77 69 64 | 74 68 20 61 6e 64 20 73 | bandwid|th and s|
|000057e0| 65 72 76 65 72 20 63 70 | 75 20 63 79 63 6c 65 73 |erver cp|u cycles|
|000057f0| 20 62 79 20 75 73 69 6e | 67 0a 74 68 65 20 6e 65 | by usin|g.the ne|
|00005800| 77 20 63 72 65 64 65 6e | 74 69 61 6c 73 2e 0a 58 |w creden|tials..X|
|00005810| 2e 4c 50 0a 54 68 65 20 | 73 65 72 76 65 72 20 6d |.LP.The |server m|
|00005820| 61 79 20 66 6c 75 73 68 | 20 74 68 65 20 73 68 6f |ay flush| the sho|
|00005830| 72 74 68 61 6e 64 20 6f | 70 61 71 75 65 20 73 74 |rthand o|paque st|
|00005840| 72 75 63 74 75 72 65 20 | 61 74 20 61 6e 79 20 74 |ructure |at any t|
|00005850| 69 6d 65 2e 20 20 49 66 | 0a 74 68 69 73 20 68 61 |ime. If|.this ha|
|00005860| 70 70 65 6e 73 2c 20 74 | 68 65 20 72 65 6d 6f 74 |ppens, t|he remot|
|00005870| 65 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |e proced|ure call|
|00005880| 20 6d 65 73 73 61 67 65 | 20 77 69 6c 6c 20 62 65 | message| will be|
|00005890| 20 72 65 6a 65 63 74 65 | 64 20 64 75 65 0a 74 6f | rejecte|d due.to|
|000058a0| 20 61 6e 20 61 75 74 68 | 65 6e 74 69 63 61 74 69 | an auth|enticati|
|000058b0| 6f 6e 20 65 72 72 6f 72 | 2e 20 20 54 68 65 20 72 |on error|. The r|
|000058c0| 65 61 73 6f 6e 20 66 6f | 72 20 74 68 65 20 66 61 |eason fo|r the fa|
|000058d0| 69 6c 75 72 65 20 77 69 | 6c 6c 20 62 65 0a 58 2e |ilure wi|ll be.X.|
|000058e0| 49 20 41 55 54 48 5f 52 | 45 4a 45 43 54 45 44 43 |I AUTH_R|EJECTEDC|
|000058f0| 52 45 44 20 2e 0a 41 74 | 20 74 68 69 73 20 70 6f |RED ..At| this po|
|00005900| 69 6e 74 2c 20 74 68 65 | 20 63 61 6c 6c 65 72 20 |int, the| caller |
|00005910| 6d 61 79 20 77 69 73 68 | 20 74 6f 20 74 72 79 20 |may wish| to try |
|00005920| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 0a 58 2e 49 |the orig|inal.X.I|
|00005930| 20 41 55 54 48 5f 55 4e | 49 58 0a 73 74 79 6c 65 | AUTH_UN|IX.style|
|00005940| 20 6f 66 20 63 72 65 64 | 65 6e 74 69 61 6c 73 2e | of cred|entials.|
|00005950| 0a 58 2e 4b 53 0a 58 2e | 4e 48 20 31 0a 5c 26 52 |.X.KS.X.|NH 1.\&R|
|00005960| 65 63 6f 72 64 20 4d 61 | 72 6b 69 6e 67 20 53 74 |ecord Ma|rking St|
|00005970| 61 6e 64 61 72 64 0a 58 | 2e 4c 50 0a 57 68 65 6e |andard.X|.LP.When|
|00005980| 20 52 50 43 20 6d 65 73 | 73 61 67 65 73 20 61 72 | RPC mes|sages ar|
|00005990| 65 20 70 61 73 73 65 64 | 20 6f 6e 20 74 6f 70 20 |e passed| on top |
|000059a0| 6f 66 20 61 20 62 79 74 | 65 20 73 74 72 65 61 6d |of a byt|e stream|
|000059b0| 20 70 72 6f 74 6f 63 6f | 6c 20 28 6c 69 6b 65 0a | protoco|l (like.|
|000059c0| 54 43 50 2f 49 50 29 2c | 20 69 74 20 69 73 20 6e |TCP/IP),| it is n|
|000059d0| 65 63 65 73 73 61 72 79 | 2c 20 6f 72 20 61 74 20 |ecessary|, or at |
|000059e0| 6c 65 61 73 74 20 64 65 | 73 69 72 61 62 6c 65 2c |least de|sirable,|
|000059f0| 20 74 6f 20 64 65 6c 69 | 6d 69 74 20 6f 6e 65 0a | to deli|mit one.|
|00005a00| 6d 65 73 73 61 67 65 20 | 66 72 6f 6d 20 61 6e 6f |message |from ano|
|00005a10| 74 68 65 72 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |ther in |order to|
|00005a20| 20 64 65 74 65 63 74 20 | 61 6e 64 20 70 6f 73 73 | detect |and poss|
|00005a30| 69 62 6c 79 20 72 65 63 | 6f 76 65 72 20 66 72 6f |ibly rec|over fro|
|00005a40| 6d 0a 75 73 65 72 20 70 | 72 6f 74 6f 63 6f 6c 20 |m.user p|rotocol |
|00005a50| 65 72 72 6f 72 73 2e 20 | 20 54 68 69 73 20 69 73 |errors. | This is|
|00005a60| 20 63 61 6c 6c 65 64 20 | 72 65 63 6f 72 64 20 6d | called |record m|
|00005a70| 61 72 6b 69 6e 67 20 28 | 52 4d 29 2e 20 20 53 75 |arking (|RM). Su|
|00005a80| 6e 20 75 73 65 73 0a 74 | 68 69 73 20 52 4d 2f 54 |n uses.t|his RM/T|
|00005a90| 43 50 2f 49 50 20 74 72 | 61 6e 73 70 6f 72 74 20 |CP/IP tr|ansport |
|00005aa0| 66 6f 72 20 70 61 73 73 | 69 6e 67 20 52 50 43 20 |for pass|ing RPC |
|00005ab0| 6d 65 73 73 61 67 65 73 | 20 6f 6e 20 54 43 50 20 |messages| on TCP |
|00005ac0| 73 74 72 65 61 6d 73 2e | 0a 4f 6e 65 20 52 50 43 |streams.|.One RPC|
|00005ad0| 20 6d 65 73 73 61 67 65 | 20 66 69 74 73 20 69 6e | message| fits in|
|00005ae0| 74 6f 20 6f 6e 65 20 52 | 4d 20 72 65 63 6f 72 64 |to one R|M record|
|00005af0| 2e 0a 58 2e 4c 50 0a 41 | 20 72 65 63 6f 72 64 20 |..X.LP.A| record |
|00005b00| 69 73 20 63 6f 6d 70 6f | 73 65 64 20 6f 66 20 6f |is compo|sed of o|
|00005b10| 6e 65 20 6f 72 20 6d 6f | 72 65 20 72 65 63 6f 72 |ne or mo|re recor|
|00005b20| 64 20 66 72 61 67 6d 65 | 6e 74 73 2e 20 20 41 20 |d fragme|nts. A |
|00005b30| 72 65 63 6f 72 64 0a 66 | 72 61 67 6d 65 6e 74 20 |record.f|ragment |
|00005b40| 69 73 20 61 20 66 6f 75 | 72 2d 62 79 74 65 20 68 |is a fou|r-byte h|
|00005b50| 65 61 64 65 72 20 66 6f | 6c 6c 6f 77 65 64 20 62 |eader fo|llowed b|
|00005b60| 79 20 30 20 74 6f 20 28 | 32 2a 2a 33 31 29 20 2d |y 0 to (|2**31) -|
|00005b70| 20 31 20 62 79 74 65 73 | 20 6f 66 0a 66 72 61 67 | 1 bytes| of.frag|
|00005b80| 6d 65 6e 74 20 64 61 74 | 61 2e 20 20 54 68 65 20 |ment dat|a. The |
|00005b90| 62 79 74 65 73 20 65 6e | 63 6f 64 65 20 61 6e 20 |bytes en|code an |
|00005ba0| 75 6e 73 69 67 6e 65 64 | 20 62 69 6e 61 72 79 20 |unsigned| binary |
|00005bb0| 6e 75 6d 62 65 72 3b 20 | 61 73 20 77 69 74 68 0a |number; |as with.|
|00005bc0| 58 44 52 20 69 6e 74 65 | 67 65 72 73 2c 20 74 68 |XDR inte|gers, th|
|00005bd0| 65 20 62 79 74 65 20 6f | 72 64 65 72 20 69 73 20 |e byte o|rder is |
|00005be0| 66 72 6f 6d 20 68 69 67 | 68 65 73 74 20 74 6f 20 |from hig|hest to |
|00005bf0| 6c 6f 77 65 73 74 2e 20 | 20 54 68 65 20 6e 75 6d |lowest. | The num|
|00005c00| 62 65 72 0a 65 6e 63 6f | 64 65 73 20 74 77 6f 20 |ber.enco|des two |
|00005c10| 76 61 6c 75 65 73 5c 28 | 65 6d 61 20 62 6f 6f 6c |values\(|ema bool|
|00005c20| 65 61 6e 20 77 68 69 63 | 68 20 69 6e 64 69 63 61 |ean whic|h indica|
|00005c30| 74 65 73 20 77 68 65 74 | 68 65 72 20 74 68 65 20 |tes whet|her the |
|00005c40| 66 72 61 67 6d 65 6e 74 | 0a 69 73 20 74 68 65 20 |fragment|.is the |
|00005c50| 6c 61 73 74 20 66 72 61 | 67 6d 65 6e 74 20 6f 66 |last fra|gment of|
|00005c60| 20 74 68 65 20 72 65 63 | 6f 72 64 20 28 62 69 74 | the rec|ord (bit|
|00005c70| 20 76 61 6c 75 65 20 31 | 20 69 6d 70 6c 69 65 73 | value 1| implies|
|00005c80| 20 74 68 65 20 66 72 61 | 67 6d 65 6e 74 0a 69 73 | the fra|gment.is|
|00005c90| 20 74 68 65 20 6c 61 73 | 74 20 66 72 61 67 6d 65 | the las|t fragme|
|00005ca0| 6e 74 29 20 61 6e 64 20 | 61 20 33 31 2d 62 69 74 |nt) and |a 31-bit|
|00005cb0| 20 75 6e 73 69 67 6e 65 | 64 20 62 69 6e 61 72 79 | unsigne|d binary|
|00005cc0| 20 76 61 6c 75 65 20 77 | 68 69 63 68 20 69 73 20 | value w|hich is |
|00005cd0| 74 68 65 0a 6c 65 6e 67 | 74 68 20 69 6e 20 62 79 |the.leng|th in by|
|00005ce0| 74 65 73 20 6f 66 20 74 | 68 65 20 66 72 61 67 6d |tes of t|he fragm|
|00005cf0| 65 6e 74 27 73 20 64 61 | 74 61 2e 20 20 54 68 65 |ent's da|ta. The|
|00005d00| 20 62 6f 6f 6c 65 61 6e | 20 76 61 6c 75 65 20 69 | boolean| value i|
|00005d10| 73 20 74 68 65 0a 68 69 | 67 68 65 73 74 2d 6f 72 |s the.hi|ghest-or|
|00005d20| 64 65 72 20 62 69 74 20 | 6f 66 20 74 68 65 20 68 |der bit |of the h|
|00005d30| 65 61 64 65 72 3b 20 74 | 68 65 20 6c 65 6e 67 74 |eader; t|he lengt|
|00005d40| 68 20 69 73 20 74 68 65 | 20 33 31 20 6c 6f 77 2d |h is the| 31 low-|
|00005d50| 6f 72 64 65 72 20 62 69 | 74 73 2e 0a 28 4e 6f 74 |order bi|ts..(Not|
|00005d60| 65 20 74 68 61 74 20 74 | 68 69 73 20 72 65 63 6f |e that t|his reco|
|00005d70| 72 64 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |rd speci|fication|
|00005d80| 20 69 73 20 4e 4f 54 20 | 69 6e 20 58 44 52 20 73 | is NOT |in XDR s|
|00005d90| 74 61 6e 64 61 72 64 20 | 66 6f 72 6d 21 29 0a 58 |tandard |form!).X|
|00005da0| 2e 4b 45 0a 58 2e 4b 53 | 0a 58 2e 4e 48 20 31 0a |.KE.X.KS|.X.NH 1.|
|00005db0| 5c 26 54 68 65 20 52 50 | 43 20 4c 61 6e 67 75 61 |\&The RP|C Langua|
|00005dc0| 67 65 0a 58 2e 4c 50 0a | 4a 75 73 74 20 61 73 20 |ge.X.LP.|Just as |
|00005dd0| 74 68 65 72 65 20 77 61 | 73 20 61 20 6e 65 65 64 |there wa|s a need|
|00005de0| 20 74 6f 20 64 65 73 63 | 72 69 62 65 20 74 68 65 | to desc|ribe the|
|00005df0| 20 58 44 52 20 64 61 74 | 61 2d 74 79 70 65 73 20 | XDR dat|a-types |
|00005e00| 69 6e 20 61 20 66 6f 72 | 6d 61 6c 0a 6c 61 6e 67 |in a for|mal.lang|
|00005e10| 75 61 67 65 2c 20 74 68 | 65 72 65 20 69 73 20 61 |uage, th|ere is a|
|00005e20| 6c 73 6f 20 6e 65 65 64 | 20 74 6f 20 64 65 73 63 |lso need| to desc|
|00005e30| 72 69 62 65 20 74 68 65 | 20 70 72 6f 63 65 64 75 |ribe the| procedu|
|00005e40| 72 65 73 20 74 68 61 74 | 20 6f 70 65 72 61 74 65 |res that| operate|
|00005e50| 0a 6f 6e 20 74 68 65 73 | 65 20 58 44 52 20 64 61 |.on thes|e XDR da|
|00005e60| 74 61 2d 74 79 70 65 73 | 20 69 6e 20 61 20 66 6f |ta-types| in a fo|
|00005e70| 72 6d 61 6c 20 6c 61 6e | 67 75 61 67 65 20 61 73 |rmal lan|guage as|
|00005e80| 20 77 65 6c 6c 2e 20 20 | 57 65 20 75 73 65 20 74 | well. |We use t|
|00005e90| 68 65 20 52 50 43 0a 4c | 61 6e 67 75 61 67 65 20 |he RPC.L|anguage |
|00005ea0| 66 6f 72 20 74 68 69 73 | 20 70 75 72 70 6f 73 65 |for this| purpose|
|00005eb0| 2e 20 20 49 74 20 69 73 | 20 61 6e 20 65 78 74 65 |. It is| an exte|
|00005ec0| 6e 73 69 6f 6e 20 74 6f | 20 74 68 65 20 58 44 52 |nsion to| the XDR|
|00005ed0| 20 6c 61 6e 67 75 61 67 | 65 2e 0a 54 68 65 20 66 | languag|e..The f|
|00005ee0| 6f 6c 6c 6f 77 69 6e 67 | 20 65 78 61 6d 70 6c 65 |ollowing| example|
|00005ef0| 20 69 73 20 75 73 65 64 | 20 74 6f 20 64 65 73 63 | is used| to desc|
|00005f00| 72 69 62 65 20 74 68 65 | 20 65 73 73 65 6e 63 65 |ribe the| essence|
|00005f10| 20 6f 66 20 74 68 65 0a | 6c 61 6e 67 75 61 67 65 | of the.|language|
|00005f20| 2e 0a 58 2e 4e 48 20 32 | 0a 5c 26 41 6e 20 45 78 |..X.NH 2|.\&An Ex|
|00005f30| 61 6d 70 6c 65 20 53 65 | 72 76 69 63 65 20 44 65 |ample Se|rvice De|
|00005f40| 73 63 72 69 62 65 64 20 | 69 6e 20 74 68 65 20 52 |scribed |in the R|
|00005f50| 50 43 20 4c 61 6e 67 75 | 61 67 65 0a 58 2e 4c 50 |PC Langu|age.X.LP|
|00005f60| 0a 48 65 72 65 20 69 73 | 20 61 6e 20 65 78 61 6d |.Here is| an exam|
|00005f70| 70 6c 65 20 6f 66 20 74 | 68 65 20 73 70 65 63 69 |ple of t|he speci|
|00005f80| 66 69 63 61 74 69 6f 6e | 20 6f 66 20 61 20 73 69 |fication| of a si|
|00005f90| 6d 70 6c 65 20 70 69 6e | 67 20 70 72 6f 67 72 61 |mple pin|g progra|
|00005fa0| 6d 2e 0a 58 2e 69 65 20 | 74 20 2e 44 53 0a 58 2e |m..X.ie |t .DS.X.|
|00005fb0| 65 6c 20 2e 44 53 20 4c | 0a 58 2e 76 73 20 31 31 |el .DS L|.X.vs 11|
|00005fc0| 0a 58 2e 66 74 20 49 0a | 2f 2a 0a 2a 20 53 69 6d |.X.ft I.|/*.* Sim|
|00005fd0| 70 6c 65 20 70 69 6e 67 | 20 70 72 6f 67 72 61 6d |ple ping| program|
|00005fe0| 0a 2a 2f 0a 58 2e 66 74 | 20 43 57 0a 70 72 6f 67 |.*/.X.ft| CW.prog|
|00005ff0| 72 61 6d 20 50 49 4e 47 | 5f 50 52 4f 47 20 7b 0a |ram PING|_PROG {.|
|00006000| 09 2f 2a 20 5c 66 49 4c | 61 74 65 73 74 20 61 6e |./* \fIL|atest an|
|00006010| 64 20 67 72 65 61 74 65 | 73 74 20 76 65 72 73 69 |d greate|st versi|
|00006020| 6f 6e 5c 66 50 20 2a 2f | 0a 09 76 65 72 73 69 6f |on\fP */|..versio|
|00006030| 6e 20 50 49 4e 47 5f 56 | 45 52 53 5f 50 49 4e 47 |n PING_V|ERS_PING|
|00006040| 42 41 43 4b 20 7b 0a 09 | 76 6f 69 64 20 0a 09 50 |BACK {..|void ..P|
|00006050| 49 4e 47 50 52 4f 43 5f | 4e 55 4c 4c 28 76 6f 69 |INGPROC_|NULL(voi|
|00006060| 64 29 20 3d 20 30 3b 0a | 0a 58 2e 66 74 20 49 0a |d) = 0;.|.X.ft I.|
|00006070| 09 2f 2a 0a 09 2a 20 50 | 69 6e 67 20 74 68 65 20 |./*..* P|ing the |
|00006080| 63 61 6c 6c 65 72 2c 20 | 72 65 74 75 72 6e 20 74 |caller, |return t|
|00006090| 68 65 20 72 6f 75 6e 64 | 2d 74 72 69 70 20 74 69 |he round|-trip ti|
|000060a0| 6d 65 0a 09 2a 20 28 69 | 6e 20 6d 69 63 72 6f 73 |me..* (i|n micros|
|000060b0| 65 63 6f 6e 64 73 29 2e | 20 52 65 74 75 72 6e 73 |econds).| Returns|
|000060c0| 20 2d 31 20 69 66 20 74 | 68 65 20 6f 70 65 72 61 | -1 if t|he opera|
|000060d0| 74 69 6f 6e 0a 09 2a 20 | 74 69 6d 65 64 20 6f 75 |tion..* |timed ou|
|000060e0| 74 2e 0a 09 2a 2f 0a 58 | 2e 66 74 20 43 57 0a 09 |t...*/.X|.ft CW..|
|000060f0| 69 6e 74 0a 09 50 49 4e | 47 50 52 4f 43 5f 50 49 |int..PIN|GPROC_PI|
|00006100| 4e 47 42 41 43 4b 28 76 | 6f 69 64 29 20 3d 20 31 |NGBACK(v|oid) = 1|
|00006110| 3b 20 20 20 20 20 20 20 | 20 0a 7d 20 3d 20 32 3b |; | .} = 2;|
|00006120| 20 20 20 20 20 0a 0a 58 | 2e 66 74 20 49 0a 2f 2a | ..X|.ft I./*|
|00006130| 0a 2a 20 4f 72 69 67 69 | 6e 61 6c 20 76 65 72 73 |.* Origi|nal vers|
|00006140| 69 6f 6e 0a 2a 2f 0a 58 | 2e 66 74 20 43 57 0a 76 |ion.*/.X|.ft CW.v|
|00006150| 65 72 73 69 6f 6e 20 50 | 49 4e 47 5f 56 45 52 53 |ersion P|ING_VERS|
|00006160| 5f 4f 52 49 47 20 7b 0a | 09 76 6f 69 64 20 0a 09 |_ORIG {.|.void ..|
|00006170| 50 49 4e 47 50 52 4f 43 | 5f 4e 55 4c 4c 28 76 6f |PINGPROC|_NULL(vo|
|00006180| 69 64 29 20 3d 20 30 3b | 0a 09 7d 20 3d 20 31 3b |id) = 0;|..} = 1;|
|00006190| 0a 7d 20 3d 20 31 3b 0a | 0a 63 6f 6e 73 74 20 50 |.} = 1;.|.const P|
|000061a0| 49 4e 47 5f 56 45 52 53 | 20 3d 20 32 3b 20 20 20 |ING_VERS| = 2; |
|000061b0| 20 20 20 2f 2a 20 5c 66 | 49 6c 61 74 65 73 74 20 | /* \f|Ilatest |
|000061c0| 76 65 72 73 69 6f 6e 20 | 5c 66 50 2a 2f 0a 58 2e |version |\fP*/.X.|
|000061d0| 76 73 0a 58 2e 44 45 0a | 58 2e 4b 45 0a 58 2e 4c |vs.X.DE.|X.KE.X.L|
|000061e0| 50 0a 54 68 65 20 66 69 | 72 73 74 20 76 65 72 73 |P.The fi|rst vers|
|000061f0| 69 6f 6e 20 64 65 73 63 | 72 69 62 65 64 20 69 73 |ion desc|ribed is|
|00006200| 0a 58 2e 49 20 50 49 4e | 47 5f 56 45 52 53 5f 50 |.X.I PIN|G_VERS_P|
|00006210| 49 4e 47 42 41 43 4b 0a | 77 69 74 68 20 20 74 77 |INGBACK.|with tw|
|00006220| 6f 20 70 72 6f 63 65 64 | 75 72 65 73 2c 20 20 20 |o proced|ures, |
|00006230| 0a 58 2e 49 20 50 49 4e | 47 50 52 4f 43 5f 4e 55 |.X.I PIN|GPROC_NU|
|00006240| 4c 4c 20 0a 61 6e 64 20 | 0a 58 2e 49 20 50 49 4e |LL .and |.X.I PIN|
|00006250| 47 50 52 4f 43 5f 50 49 | 4e 47 42 41 43 4b 2e 0a |GPROC_PI|NGBACK..|
|00006260| 58 2e 49 20 50 49 4e 47 | 50 52 4f 43 5f 4e 55 4c |X.I PING|PROC_NUL|
|00006270| 4c 20 0a 74 61 6b 65 73 | 20 6e 6f 20 61 72 67 75 |L .takes| no argu|
|00006280| 6d 65 6e 74 73 20 61 6e | 64 20 72 65 74 75 72 6e |ments an|d return|
|00006290| 73 20 6e 6f 20 72 65 73 | 75 6c 74 73 2c 20 62 75 |s no res|ults, bu|
|000062a0| 74 20 69 74 20 69 73 20 | 75 73 65 66 75 6c 20 66 |t it is |useful f|
|000062b0| 6f 72 0a 63 6f 6d 70 75 | 74 69 6e 67 20 72 6f 75 |or.compu|ting rou|
|000062c0| 6e 64 2d 74 72 69 70 20 | 74 69 6d 65 73 20 66 72 |nd-trip |times fr|
|000062d0| 6f 6d 20 74 68 65 20 63 | 6c 69 65 6e 74 20 74 6f |om the c|lient to|
|000062e0| 20 74 68 65 20 73 65 72 | 76 65 72 20 61 6e 64 20 | the ser|ver and |
|000062f0| 62 61 63 6b 0a 61 67 61 | 69 6e 2e 20 20 42 79 20 |back.aga|in. By |
|00006300| 63 6f 6e 76 65 6e 74 69 | 6f 6e 2c 20 70 72 6f 63 |conventi|on, proc|
|00006310| 65 64 75 72 65 20 30 20 | 6f 66 20 61 6e 79 20 52 |edure 0 |of any R|
|00006320| 50 43 20 70 72 6f 74 6f | 63 6f 6c 20 73 68 6f 75 |PC proto|col shou|
|00006330| 6c 64 20 68 61 76 65 0a | 74 68 65 20 73 61 6d 65 |ld have.|the same|
|00006340| 20 73 65 6d 61 6e 74 69 | 63 73 2c 20 61 6e 64 20 | semanti|cs, and |
|00006350| 6e 65 76 65 72 20 72 65 | 71 75 69 72 65 20 61 6e |never re|quire an|
|00006360| 79 20 6b 69 6e 64 20 6f | 66 20 61 75 74 68 65 6e |y kind o|f authen|
|00006370| 74 69 63 61 74 69 6f 6e | 2e 0a 54 68 65 20 73 65 |tication|..The se|
|00006380| 63 6f 6e 64 20 70 72 6f | 63 65 64 75 72 65 20 69 |cond pro|cedure i|
|00006390| 73 20 75 73 65 64 20 66 | 6f 72 20 74 68 65 20 63 |s used f|or the c|
|000063a0| 6c 69 65 6e 74 20 74 6f | 20 68 61 76 65 20 74 68 |lient to| have th|
|000063b0| 65 20 73 65 72 76 65 72 | 20 64 6f 20 61 0a 72 65 |e server| do a.re|
|000063c0| 76 65 72 73 65 20 70 69 | 6e 67 20 6f 70 65 72 61 |verse pi|ng opera|
|000063d0| 74 69 6f 6e 20 62 61 63 | 6b 20 74 6f 20 74 68 65 |tion bac|k to the|
|000063e0| 20 63 6c 69 65 6e 74 2c | 20 61 6e 64 20 69 74 20 | client,| and it |
|000063f0| 72 65 74 75 72 6e 73 20 | 74 68 65 20 61 6d 6f 75 |returns |the amou|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.