home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1000s / rfc1050.txt < prev    next >
Text File  |  1988-04-07  |  50KB  |  1,347 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                             Sun Microsystems, Inc.
  8. Request for Comments: 1050                        April 1988
  9.  
  10.  
  11.  
  12.                        RPC: Remote Procedure Call
  13.                          Protocol Specification
  14.  
  15. STATUS OF THIS MEMO
  16.  
  17.    This RFC describes a standard that Sun Microsystems and others are
  18.    using and is one we wish to propose for the Internet's consideration.
  19.    This memo is not an Internet standard at this time.  Distribution of
  20.    this memo is unlimited.
  21.  
  22. 1. INTRODUCTION
  23.  
  24.    This document specifies a message protocol used in implementing Sun's
  25.    Remote Procedure Call (RPC) package.  The message protocol is
  26.    specified with the eXternal Data Representation (XDR) language [9].
  27.    This document assumes that the reader is familiar with XDR.  It does
  28.    not attempt to justify RPC or its uses.  The paper by Birrell and
  29.    Nelson [1] is recommended as an excellent background to and
  30.    justification of RPC.
  31.  
  32. 2. TERMINOLOGY
  33.  
  34.    This document discusses servers, services, programs, procedures,
  35.    clients, and versions.  A server is a piece of software where network
  36.    services are implemented.  A network service is a collection of one
  37.    or more remote programs.  A remote program implements one or more
  38.    remote procedures; the procedures, their parameters, and results are
  39.    documented in the specific program's protocol specification (see
  40.    Appendix A for an example).  Network clients are pieces of software
  41.    that initiate remote procedure calls to services.  A server may
  42.    support more than one version of a remote program in order to be
  43.    forward compatible with changing protocols.
  44.  
  45.    For example, a network file service may be composed of two programs.
  46.    One program may deal with high-level applications such as file system
  47.    access control and locking.  The other may deal with low-level file
  48.    IO and have procedures like "read" and "write".  A client machine of
  49.    the network file service would call the procedures associated with
  50.    the two programs of the service on behalf of some user on the client
  51.    machine.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Sun Microsystems, Inc.                                          [Page 1]
  59.  
  60. RFC 1050                 Remote Procedure Call                April 1988
  61.  
  62.  
  63. 3. THE RPC MODEL
  64.  
  65.    The remote procedure call model is similar to the local procedure
  66.    call model.  In the local case, the caller places arguments to a
  67.    procedure in some well-specified location (such as a result
  68.    register).  It then transfers control to the procedure, and
  69.    eventually gains back control.  At that point, the results of the
  70.    procedure are extracted from the well-specified location, and the
  71.    caller continues execution.
  72.  
  73.    The remote procedure call is similar, in that one thread of control
  74.    logically winds through two processes -- one is the caller's process,
  75.    the other is a server's process.  That is, the caller process sends a
  76.    call message to the server process and waits (blocks) for a reply
  77.    message.  The call message contains the procedure's parameters, among
  78.    other things.  The reply message contains the procedure's results,
  79.    among other things.  Once the reply message is received, the results
  80.    of the procedure are extracted, and caller's execution is resumed.
  81.  
  82.    On the server side, a process is dormant awaiting the arrival of a
  83.    call message.  When one arrives, the server process extracts the
  84.    procedure's parameters, computes the results, sends a reply message,
  85.    and then awaits the next call message.
  86.  
  87.    Note that in this model, only one of the two processes is active at
  88.    any given time.  However, this model is only given as an example.
  89.    The RPC protocol makes no restrictions on the concurrency model
  90.    implemented, and others are possible.  For example, an implementation
  91.    may choose to have RPC calls be asynchronous, so that the client may
  92.    do useful work while waiting for the reply from the server.  Another
  93.    possibility is to have the server create a task to process an
  94.    incoming request, so that the server can be free to receive other
  95.    requests.
  96.  
  97. 4. TRANSPORTS AND SEMANTICS
  98.  
  99.    The RPC protocol is independent of transport protocols.  That is, RPC
  100.    does not care how a message is passed from one process to another.
  101.    The protocol deals only with specification and interpretation of
  102.    messages.
  103.  
  104.    It is important to point out that RPC does not try to implement any
  105.    kind of reliability and that the application must be aware of the
  106.    type of transport protocol underneath RPC.  If it knows it is running
  107.    on top of a reliable transport such as TCP/IP [6], then most of the
  108.    work is already done for it.  On the other hand, if it is running on
  109.    top of an unreliable transport such as UDP/IP [7], it must implement
  110.    its own retransmission and time-out policy as the RPC layer does not
  111.  
  112.  
  113.  
  114. Sun Microsystems, Inc.                                          [Page 2]
  115.  
  116. RFC 1050                 Remote Procedure Call                April 1988
  117.  
  118.  
  119.    provide this service.
  120.  
  121.    Because of transport independence, the RPC protocol does not attach
  122.    specific semantics to the remote procedures or their execution.
  123.    Semantics can be inferred from (but should be explicitly specified
  124.    by) the underlying transport protocol.  For example, consider RPC
  125.    running on top of an unreliable transport such as UDP/IP.  If an
  126.    application retransmits RPC messages after short time-outs, the only
  127.    thing it can infer if it receives no reply is that the procedure was
  128.    executed zero or more times.  If it does receive a reply, then it can
  129.    infer that the procedure was executed at least once.
  130.  
  131.    A server may wish to remember previously granted requests from a
  132.    client and not regrant them in order to insure some degree of
  133.    execute-at-most-once semantics.  A server can do this by taking
  134.    advantage of the transaction ID that is packaged with every RPC
  135.    request.  The main use of this transaction is by the client RPC layer
  136.    in matching replies to requests.  However, a client application may
  137.    choose to reuse its previous transaction ID when retransmitting a
  138.    request.  The server application, knowing this fact, may choose to
  139.    remember this ID after granting a request and not regrant requests
  140.    with the same ID in order to achieve some degree of execute-at-most-
  141.    once semantics.  The server is not allowed to examine this ID in any
  142.    other way except as a test for equality.
  143.  
  144.    On the other hand, if using a reliable transport such as TCP/IP, the
  145.    application can infer from a reply message that the procedure was
  146.    executed exactly once, but if it receives no reply message, it cannot
  147.    assume the remote procedure was not executed.  Note that even if a
  148.    connection-oriented protocol like TCP is used, an application still
  149.    needs time-outs and reconnection to handle server crashes.
  150.  
  151.    There are other possibilities for transports besides datagram- or
  152.    connection-oriented protocols.  For example, a request-reply protocol
  153.    such as VMTP [2] is perhaps the most natural transport for RPC.
  154.  
  155.    Note:  At Sun, RPC is currently implemented on top of both TCP/IP and
  156.    UDP/IP transports.
  157.  
  158. 5. BINDING AND RENDEZVOUS INDEPENDENCE
  159.  
  160.    The act of binding a client to a service is NOT part of the remote
  161.    procedure call specification.  This important and necessary function
  162.    is left up to some higher-level software.  (The software may use RPC
  163.    itself; see Appendix A.)
  164.  
  165.    Implementors should think of the RPC protocol as the jump-subroutine
  166.    instruction ("JSR") of a network; the loader (binder) makes JSR
  167.  
  168.  
  169.  
  170. Sun Microsystems, Inc.                                          [Page 3]
  171.  
  172. RFC 1050                 Remote Procedure Call                April 1988
  173.  
  174.  
  175.    useful, and the loader itself uses JSR to accomplish its task.
  176.    Likewise, the network makes RPC useful, using RPC to accomplish this
  177.    task.
  178.  
  179. 6. AUTHENTICATION
  180.  
  181.    The RPC protocol provides the fields necessary for a client to
  182.    identify itself to a service and vice-versa.  Security and access
  183.    control mechanisms can be built on top of the message authentication.
  184.    Several different authentication protocols can be supported.  A field
  185.    in the RPC header indicates which protocol is being used.  More
  186.    information on specific authentication protocols is in section 9:
  187.    "Authentication Protocols".
  188.  
  189. 7. RPC PROTOCOL REQUIREMENTS
  190.  
  191.    The RPC protocol must provide for the following:
  192.  
  193.       (1) Unique specification of a procedure to be called.
  194.       (2) Provisions for matching response messages to request messages.
  195.       (3) Provisions for authenticating the caller to service and
  196.           vice-versa.
  197.  
  198.    Besides these requirements, features that detect the following are
  199.    worth supporting because of protocol roll-over errors, implementation
  200.    bugs, user error, and network administration:
  201.  
  202.       (1) RPC protocol mismatches.
  203.       (2) Remote program protocol version mismatches.
  204.       (3) Protocol errors (such as misspecification of a procedure's
  205.           parameters).
  206.       (4) Reasons why remote authentication failed.
  207.       (5) Any other reasons why the desired procedure was not called.
  208.  
  209. 7.1 RPC Programs and Procedures
  210.  
  211.    The RPC call message has three unsigned fields:  remote program
  212.    number, remote program version number, and remote procedure number.
  213.    The three fields uniquely identify the procedure to be called.
  214.    Program numbers are administered by some central authority (like
  215.    Sun).  Once an implementor has a program number, he can implement his
  216.    remote program; the first implementation would most likely have the
  217.    version number of 1.  Because most new protocols evolve into better,
  218.    stable, and mature protocols, a version field of the call message
  219.    identifies which version of the protocol the caller is using.
  220.    Version numbers make speaking old and new protocols through the same
  221.    server process possible.
  222.  
  223.  
  224.  
  225.  
  226. Sun Microsystems, Inc.                                          [Page 4]
  227.  
  228. RFC 1050                 Remote Procedure Call                April 1988
  229.  
  230.  
  231.    The procedure number identifies the procedure to be called.  These
  232.    numbers are documented in the specific program's protocol
  233.    specification.  For example, a file service's protocol specification
  234.    may state that its procedure number 5 is "read" and procedure number
  235.    12 is "write".
  236.  
  237.    Just as remote program protocols may change over several versions,
  238.    the actual RPC message protocol could also change.  Therefore, the
  239.    call message also has in it the RPC version number, which is always
  240.    equal to two for the version of RPC described here.
  241.  
  242.    The reply message to a request message has enough information to
  243.    distinguish the following error conditions:
  244.  
  245.       (1) The remote implementation of RPC does speak protocol version 2.
  246.           The lowest and highest supported RPC version numbers are
  247.           returned.
  248.  
  249.       (2) The remote program is not available on the remote system.
  250.  
  251.       (3) The remote program does not support the requested version number.
  252.           The lowest and highest supported remote program version numbers
  253.           are returned.
  254.  
  255.       (4) The requested procedure number does not exist.  (This is usually
  256.           a caller side protocol or programming error.)
  257.  
  258.       (5) The parameters to the remote procedure appear to be garbage
  259.           from the server's point of view.  (Again, this is usually
  260.           caused by a disagreement about the protocol between client
  261.           and service.)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Sun Microsystems, Inc.                                          [Page 5]
  283.  
  284. RFC 1050                 Remote Procedure Call                April 1988
  285.  
  286.  
  287. 7.2 Authentication
  288.  
  289.    Provisions for authentication of caller to service and vice-versa are
  290.    provided as a part of the RPC protocol.  The call message has two
  291.    authentication fields, the credentials and verifier.  The reply
  292.    message has one authentication field, the response verifier.  The RPC
  293.    protocol specification defines all three fields to be the following
  294.    opaque type:
  295.  
  296.          enum auth_flavor {
  297.             AUTH_NULL       = 0,
  298.             AUTH_UNIX       = 1,
  299.             AUTH_SHORT      = 2,
  300.             AUTH_DES        = 3
  301.             /* and more to be defined */
  302.          };
  303.  
  304.          struct opaque_auth {
  305.             auth_flavor flavor;
  306.             opaque body<400>;
  307.          };
  308.  
  309.    In simple English, any "opaque_auth" structure is an "auth_flavor"
  310.    enumeration followed by bytes which are opaque to the RPC protocol
  311.    implementation.
  312.  
  313.    The interpretation and semantics of the data contained within the
  314.    authentication fields is specified by individual, independent
  315.    authentication protocol specifications.  (Section 9 defines the
  316.    various authentication protocols.)
  317.  
  318.    If authentication parameters were rejected, the response message
  319.    contains information stating why they were rejected.
  320.  
  321. 7.3 Program Number Assignment
  322.  
  323.    Program numbers are given out in groups of hexadecimal 20000000
  324.    (decimal 536870912) according to the following chart:
  325.  
  326.                  0 - 1fffffff   defined by Sun
  327.           20000000 - 3fffffff   defined by user
  328.           40000000 - 5fffffff   transient
  329.           60000000 - 7fffffff   reserved
  330.           80000000 - 9fffffff   reserved
  331.           a0000000 - bfffffff   reserved
  332.           c0000000 - dfffffff   reserved
  333.           e0000000 - ffffffff   reserved
  334.  
  335.  
  336.  
  337.  
  338. Sun Microsystems, Inc.                                          [Page 6]
  339.  
  340. RFC 1050                 Remote Procedure Call                April 1988
  341.  
  342.  
  343.    The first group is a range of numbers administered by Sun
  344.    Microsystems and should be identical for all sites.  The second range
  345.    is for applications peculiar to a particular site.  This range is
  346.    intended primarily for debugging new programs.  When a site develops
  347.    an application that might be of general interest, that application
  348.    should be given an assigned number in the first range.  The third
  349.    group is for applications that generate program numbers dynamically.
  350.    The final groups are reserved for future use, and should not be used.
  351.  
  352. 7.4 Other Uses of the RPC Protocol
  353.  
  354.    The intended use of this protocol is for calling remote procedures.
  355.    That is, each call message is matched with a response message.
  356.    However, the protocol itself is a message-passing protocol with which
  357.    other (non-RPC) protocols can be implemented.  Sun currently uses, or
  358.    perhaps abuses, the RPC message protocol for the following two (non-
  359.    RPC) protocols:  batching (or pipelining) and broadcast RPC.  These
  360.    two protocols are discussed but not defined below.
  361.  
  362. 7.4.1 Batching
  363.  
  364.    Batching allows a client to send an arbitrarily large sequence of
  365.    call messages to a server; batching typically uses reliable byte
  366.    stream protocols (like TCP/IP) for its transport.  In the case of
  367.    batching, the client never waits for a reply from the server, and the
  368.    server does not send replies to batch requests.  A sequence of batch
  369.    calls is usually terminated by a legitimate RPC in order to flush the
  370.    pipeline (with positive acknowledgement).
  371.  
  372. 7.4.2 Broadcast RPC
  373.  
  374.    In broadcast RPC-based protocols, the client sends a broadcast packet
  375.    to the network and waits for numerous replies.  Broadcast RPC uses
  376.    unreliable, packet-based protocols (like UDP/IP) as its transports.
  377.    Servers that support broadcast protocols only respond when the
  378.    request is successfully processed, and are silent in the face of
  379.    errors.  Broadcast RPC uses the Port Mapper RPC service to achieve
  380.    its semantics.  (See Appendix A for more information.)
  381.  
  382. 8. THE RPC MESSAGE PROTOCOL
  383.  
  384.    This section defines the RPC message protocol in the XDR data
  385.    description language.  The message is defined in a top-down style.
  386.  
  387.        enum msg_type {
  388.           CALL  = 0,
  389.           REPLY = 1
  390.        };
  391.  
  392.  
  393.  
  394. Sun Microsystems, Inc.                                          [Page 7]
  395.  
  396. RFC 1050                 Remote Procedure Call                April 1988
  397.  
  398.  
  399.        /*
  400.         * A reply to a call message can take on two forms:
  401.         * The message was either accepted or rejected.
  402.         */
  403.        enum reply_stat {
  404.           MSG_ACCEPTED = 0,
  405.           MSG_DENIED   = 1
  406.        };
  407.  
  408.        /*
  409.         * Given that a call message was accepted, the following is the
  410.         * status of an attempt to call a remote procedure.
  411.         */
  412.        enum accept_stat {
  413.           SUCCESS       = 0, /* RPC executed successfully       */
  414.           PROG_UNAVAIL  = 1, /* remote hasn't exported program  */
  415.           PROG_MISMATCH = 2, /* remote can't support version #  */
  416.           PROC_UNAVAIL  = 3, /* program can't support procedure */
  417.           GARBAGE_ARGS  = 4  /* procedure can't decode params   */
  418.        };
  419.  
  420.        /*
  421.         * Reasons why a call message was rejected:
  422.         */
  423.        enum reject_stat {
  424.           RPC_MISMATCH = 0, /* RPC version number != 2          */
  425.           AUTH_ERROR = 1    /* remote can't authenticate caller */
  426.        };
  427.  
  428.        /*
  429.         * Why authentication failed:
  430.         */
  431.        enum auth_stat {
  432.           AUTH_BADCRED      = 1,  /* bad credentials (seal broken) */
  433.           AUTH_REJECTEDCRED = 2,  /* client must begin new session */
  434.           AUTH_BADVERF      = 3,  /* bad verifier (seal broken)    */
  435.           AUTH_REJECTEDVERF = 4,  /* verifier expired or replayed  */
  436.           AUTH_TOOWEAK      = 5   /* rejected for security reasons */
  437.        };
  438.  
  439.        /*
  440.         * The  RPC  message:
  441.         * All messages start with a transaction identifier, xid,
  442.         * followed by a two-armed discriminated union.  The union's
  443.         * discriminant is a msg_type which switches to one of the two
  444.         * types of the message.  The xid of a REPLY message always
  445.         * matches that of the initiating CALL message.  NB: The xid
  446.         * field is only used for clients  matching reply messages with
  447.  
  448.  
  449.  
  450. Sun Microsystems, Inc.                                          [Page 8]
  451.  
  452. RFC 1050                 Remote Procedure Call                April 1988
  453.  
  454.  
  455.         * call messages or for servers detecting retransmissions; the
  456.         * service side cannot treat this id as any type of sequence
  457.         * number.
  458.         */
  459.        struct rpc_msg {
  460.           unsigned int xid;
  461.           union switch (msg_type mtype) {
  462.           case CALL:
  463.              call_body cbody;
  464.           case REPLY:
  465.              reply_body rbody;
  466.           } body;
  467.        };
  468.  
  469.        /*
  470.         * Body of an RPC request call:
  471.         * In version 2 of the RPC protocol specification, rpcvers must
  472.         * be equal to 2.  The fields prog, vers, and proc specify the
  473.         * remote program, its version number, and the procedure within
  474.         * the remote program to be called.  After these fields are two
  475.         * authentication parameters: cred (authentication credentials)
  476.         * and verf (authentication verifier).  The two authentication
  477.         * parameters are followed by the parameters to the remote
  478.         * procedure, which are specified by the specific program
  479.         * protocol.
  480.         */
  481.        struct call_body {
  482.           unsigned int rpcvers;          /* must be equal to two (2) */
  483.           unsigned int prog;
  484.           unsigned int vers;
  485.           unsigned int proc;
  486.           opaque_auth cred;
  487.           opaque_auth verf;
  488.           /* procedure specific parameters start here */
  489.        };
  490.  
  491.        /*
  492.         * Body of a reply to an RPC request:
  493.         * The call message was either accepted or rejected.
  494.         */
  495.        union reply_body switch (reply_stat stat) {
  496.        case MSG_ACCEPTED:
  497.           accepted_reply areply;
  498.        case MSG_DENIED:
  499.           rejected_reply rreply;
  500.        } reply;
  501.  
  502.        /*
  503.  
  504.  
  505.  
  506. Sun Microsystems, Inc.                                          [Page 9]
  507.  
  508. RFC 1050                 Remote Procedure Call                April 1988
  509.  
  510.  
  511.         * Reply to an RPC request that was accepted by the server:
  512.         * there could be an error even though the request was accepted.
  513.         * The first field is an authentication verifier that the server
  514.         * generates in order to validate itself to the caller.  It is
  515.         * followed by a union whose discriminant is an enum
  516.         * accept_stat.  The SUCCESS arm of the union is protocol
  517.         * specific.  The PROG_UNAVAIL, PROC_UNAVAIL, and GARBAGE_ARGS
  518.         * arms of the union are void.  The PROG_MISMATCH arm specifies
  519.         * the lowest and highest version numbers of the remote program
  520.         * supported by the server.
  521.         */
  522.        struct accepted_reply {
  523.           opaque_auth verf;
  524.           union switch (accept_stat stat) {
  525.           case SUCCESS:
  526.              opaque results[0];
  527.              /*
  528.               * procedure-specific results start here
  529.               */
  530.            case PROG_MISMATCH:
  531.               struct {
  532.                  unsigned int low;
  533.                  unsigned int high;
  534.               } mismatch_info;
  535.            default:
  536.               /*
  537.                * Void.  Cases include PROG_UNAVAIL, PROC_UNAVAIL,
  538.                * and GARBAGE_ARGS.
  539.                */
  540.               void;
  541.            } reply_data;
  542.        };
  543.  
  544.        /*
  545.         * Reply to an RPC request that was rejected by the server:
  546.         * The request can be rejected for two reasons:  either the
  547.         * server is not running a compatible version of the RPC
  548.         * protocol (RPC_MISMATCH), or the server refuses to
  549.         * authenticate the caller (AUTH_ERROR).  In case of an RPC
  550.         * version mismatch, the server returns the lowest and highest
  551.         * supported RPC version numbers.  In case of refused
  552.         * authentication, failure status is returned.
  553.         */
  554.        union rejected_reply switch (reject_stat stat) {
  555.        case RPC_MISMATCH:
  556.           struct {
  557.              unsigned int low;
  558.              unsigned int high;
  559.  
  560.  
  561.  
  562. Sun Microsystems, Inc.                                         [Page 10]
  563.  
  564. RFC 1050                 Remote Procedure Call                April 1988
  565.  
  566.  
  567.           } mismatch_info;
  568.        case AUTH_ERROR:
  569.           auth_stat stat;
  570.        };
  571.  
  572. 9. AUTHENTICATION PROTOCOLS
  573.  
  574.    As previously stated, authentication parameters are opaque, but
  575.    open-ended to the rest of the RPC protocol.  This section defines
  576.    some "flavors" of authentication implemented at (and supported by)
  577.    Sun.  Other sites are free to invent new authentication types, with
  578.    the same rules of flavor number assignment as there is for program
  579.    number assignment.
  580.  
  581. 9.1 Null Authentication
  582.  
  583.    Often calls must be made where the caller does not know who he is or
  584.    the server does not care who the caller is.  In this case, the flavor
  585.    value (the discriminant of the opaque_auth's union) of the RPC
  586.    message's credentials, verifier, and response verifier is
  587.    "AUTH_NULL".  The bytes of the opaque_auth's body are undefined.  It
  588.    is recommended that the opaque length be zero.
  589.  
  590. 9.2 UNIX Authentication
  591.  
  592.    The caller of a remote procedure may wish to identify himself as he
  593.    is identified on a UNIX(tm) system.  The value of the credential's
  594.    discriminant of an RPC call message is "AUTH_UNIX".  The bytes of the
  595.    credential's opaque body encode the the following structure:
  596.  
  597.          struct auth_unix {
  598.             unsigned int stamp;
  599.             string machinename<255>;
  600.             unsigned int uid;
  601.             unsigned int gid;
  602.             unsigned int gids<10>;
  603.          };
  604.  
  605.    The "stamp" is an arbitrary ID which the caller machine may generate.
  606.    The "machinename" is the name of the caller's machine (like
  607.    "krypton").  The "uid" is the caller's effective user ID.  The "gid"
  608.    is the caller's effective group ID.  The "gids" is a counted array of
  609.    groups which contain the caller as a member.  The verifier
  610.    accompanying the credentials should be of "AUTH_NULL" (defined
  611.    above).
  612.  
  613.    The value of the discriminant of the response verifier received in
  614.    the reply message from the server may be "AUTH_NULL" or "AUTH_SHORT".
  615.  
  616.  
  617.  
  618. Sun Microsystems, Inc.                                         [Page 11]
  619.  
  620. RFC 1050                 Remote Procedure Call                April 1988
  621.  
  622.  
  623.    In the case of "AUTH_SHORT", the bytes of the response verifier's
  624.    string encode an opaque structure.  This new opaque structure may now
  625.    be passed to the server instead of the original "AUTH_UNIX" flavor
  626.    credentials.  The server keeps a cache which maps shorthand opaque
  627.    structures (passed back by way of an "AUTH_SHORT" style response
  628.    verifier) to the original credentials of the caller.  The caller can
  629.    save network bandwidth and server cpu cycles by using the new
  630.    credentials.
  631.  
  632.    The server may flush the shorthand opaque structure at any time.  If
  633.    this happens, the remote procedure call message will be rejected due
  634.    to an authentication error.  The reason for the failure will be
  635.    "AUTH_REJECTEDCRED".  At this point, the caller may wish to try the
  636.    original "AUTH_UNIX" style of credentials.
  637.  
  638. 9.3 DES Authentication
  639.  
  640.    UNIX authentication suffers from two major problems:
  641.  
  642.          (1) The naming is too UNIX oriented.
  643.          (2) There is no verifier, so credentials can easily be faked.
  644.  
  645.    DES authentication attempts to fix these two problems.
  646.  
  647. 9.3.1 Naming
  648.  
  649.    The first problem is handled by addressing the caller by a simple
  650.    string of characters instead of by an operating system specific
  651.    integer.  This string of characters is known as the "netname" or
  652.    network name of the caller.  The server is not allowed to interpret
  653.    the contents of the caller's name in any other way except to identify
  654.    the caller.  Thus, netnames should be unique for every caller in the
  655.    Internet.
  656.  
  657.    It is up to each operating system's implementation of DES
  658.    authentication to generate netnames for its users that insure this
  659.    uniqueness when they call upon remote servers.  Operating systems
  660.    already know how to distinguish users local to their systems.  It is
  661.    usually a simple matter to extend this mechanism to the network.  For
  662.    example, a UNIX user at Sun with a user ID of 515 might be assigned
  663.    the following netname: "unix.515@sun.com".  This netname contains
  664.    three items that serve to insure it is unique.  Going backwards,
  665.    there is only one naming domain called "sun.com" in the Internet.
  666.    Within this domain, there is only one UNIX user with user ID 515.
  667.    However, there may be another user on another operating system, for
  668.    example VMS, within the same naming domain that, by coincidence,
  669.    happens to have the same user ID.  To insure that these two users can
  670.    be distinguished, we add the operating system name.  So, one user is
  671.  
  672.  
  673.  
  674. Sun Microsystems, Inc.                                         [Page 12]
  675.  
  676. RFC 1050                 Remote Procedure Call                April 1988
  677.  
  678.  
  679.    "unix.515@sun.com" and the other is "vms.515@sun.com".
  680.  
  681.    The first field is actually a naming method rather than an operating
  682.    system name.  It just happens that today, there is almost a one-to-
  683.    one correspondence between naming methods and operating systems.  If
  684.    the world could agree on a naming standard, the first field could be
  685.    the name of that standard, instead of an operating system name.
  686.  
  687. 9.3.2 DES Authentication Verifiers
  688.  
  689.    Unlike UNIX authentication, DES authentication does have a verifier
  690.    so the server can validate the client's credential (and vice-versa).
  691.    The contents of this verifier is primarily an encrypted timestamp.
  692.    The server can decrypt this timestamp, and if it is close to what the
  693.    real time is, then the client must have encrypted it correctly.  The
  694.    only way the client could encrypt it correctly is to know the
  695.    "conversation key" of the RPC session.  And, if the client knows the
  696.    conversation key, then it must be the real client.
  697.  
  698.    The conversation key is a DES [5] key which the client generates and
  699.    notifies the server of in its first RPC call.  The conversation key
  700.    is encrypted using a public key scheme in this first transaction.
  701.    The particular public key scheme used in DES authentication is
  702.    Diffie-Hellman [3], with 128-bit keys.  The details of this
  703.    encryption method are described later.
  704.  
  705.    The client and the server need the same notion of the current time in
  706.    order for all of this to work.  If network time synchronization
  707.    cannot be guaranteed, then client can synchronize with the server
  708.    before beginning the conversation, perhaps by consulting the Internet
  709.    Time Server (TIME [4]).
  710.  
  711.    The way a server determines if a client timestamp is valid is
  712.    somewhat complicated.  For any other transaction but the first, the
  713.    server just checks for two things:
  714.  
  715.          (1) the timestamp is greater than the one previously seen from
  716.              the same client.
  717.  
  718.          (2) the timestamp has not expired.
  719.  
  720.    A timestamp is expired if the server's time is later than the sum of
  721.    the client's timestamp, plus what is known as the client's "window".
  722.    The "window" is a number the client passes (encrypted) to the server
  723.    in its first transaction.  You can think of it as a lifetime for the
  724.    credential.
  725.  
  726.    This explains everything but the first transaction.  In the first
  727.  
  728.  
  729.  
  730. Sun Microsystems, Inc.                                         [Page 13]
  731.  
  732. RFC 1050                 Remote Procedure Call                April 1988
  733.  
  734.  
  735.    transaction, the server checks only that the timestamp has not
  736.    expired.  If this was all that was done though, then it would be
  737.    quite easy for the client to send random data in place of the
  738.    timestamp with a fairly good chance of succeeding.  As an added
  739.    check, the client sends an encrypted item in the first transaction
  740.    known as the "window verifier" which must be equal to the window
  741.    minus 1, or the server will reject the credential.
  742.  
  743.    The client too, must check the verifier returned from the server to
  744.    be sure it is legitimate.  The server sends back to the client the
  745.    encrypted timestamp it received from the client, minus one second.
  746.    If the client gets anything different than this, it will reject it.
  747.  
  748. 9.3.3 Nicknames and Clock Synchronization
  749.  
  750.    After the first transaction, the server's DES authentication
  751.    subsystem returns in its verifier to the client an integer "nickname"
  752.    which the client may use in its further transactions instead of
  753.    passing its netname, encrypted DES key, and window every time. The
  754.    nickname is most likely an index into a table on the server which
  755.    stores for each client its netname, decrypted DES key, and window.
  756.  
  757.    Though they originally were synchronized, the client's and server's
  758.    clocks can get out of sync again.  When this happens, the client RPC
  759.    subsystem most likely will get back "RPC_AUTHERROR" at which point it
  760.    should resynchronize.
  761.  
  762.    A client may still get the "RPC_AUTHERROR" error even though it is
  763.    synchronized with the server.  The reason is that the server's
  764.    nickname table is a limited size, and it may flush entries whenever
  765.    it wants.  A client should resend its original credential in this
  766.    case and the server will give it a new nickname.  If a server
  767.    crashes, the entire nickname table gets flushed, and all clients will
  768.    have to resend their original credentials.
  769.  
  770. 9.3.4 DES Authentication Protocol Specification (in XDR language)
  771.  
  772.     /*
  773.      * There are two kinds of credentials: one in which the client uses
  774.      * its full network name, and one in which it uses its "nickname"
  775.      * (just an unsigned integer) given to it by the server.  The
  776.      * client must use its fullname in its first transaction with the
  777.      * server, in which the server will return to the client its
  778.      * nickname.  The client may use its nickname in all further
  779.      * transactions with the server.  There is no requirement to use the
  780.      * nickname, but it is wise to use it for performance reasons.
  781.      */
  782.     enum authdes_namekind {
  783.  
  784.  
  785.  
  786. Sun Microsystems, Inc.                                         [Page 14]
  787.  
  788. RFC 1050                 Remote Procedure Call                April 1988
  789.  
  790.  
  791.        ADN_FULLNAME = 0,
  792.        ADN_NICKNAME = 1
  793.     };
  794.  
  795.     /*
  796.      * A 64-bit block of encrypted DES data
  797.      */
  798.     typedef opaque des_block[8];
  799.  
  800.     /*
  801.      * Maximum length of a network user's name
  802.      */
  803.     const MAXNETNAMELEN = 255;
  804.  
  805.     /*
  806.      * A fullname contains the network name of the client, an encrypted
  807.      * conversation key, and the window.  The window is actually a
  808.      * lifetime for the credential.  If the time indicated in the
  809.      * verifier timestamp plus the window has past, then the server
  810.      * should expire the request and not grant it.  To insure that
  811.      * requests are not replayed, the server should insist that
  812.      * timestamps are greater than the previous one seen, unless it is
  813.      * the  first transaction.  In the first transaction, the server
  814.      * checks instead that the window verifier is one less than the
  815.      * window.
  816.      */
  817.     struct authdes_fullname {
  818.        string name<MAXNETNAMELEN>;  /* name of client                */
  819.        des_block key;               /* PK encrypted conversation key */
  820.        unsigned int window;         /* encrypted window              */
  821.     };
  822.  
  823.     /*
  824.      * A credential is either a fullname or a nickname
  825.      */
  826.     union authdes_cred switch (authdes_namekind adc_namekind) {
  827.     case ADN_FULLNAME:
  828.        authdes_fullname adc_fullname;
  829.     case ADN_NICKNAME:
  830.        unsigned int adc_nickname;
  831.     };
  832.  
  833.     /*
  834.      * A timestamp encodes the time since midnight, January 1, 1970.
  835.      */
  836.     struct timestamp {
  837.          unsigned int seconds;    /* seconds          */
  838.          unsigned int useconds;   /* and microseconds */
  839.  
  840.  
  841.  
  842. Sun Microsystems, Inc.                                         [Page 15]
  843.  
  844. RFC 1050                 Remote Procedure Call                April 1988
  845.  
  846.  
  847.     };
  848.  
  849.     /*
  850.      * Verifier: client variety
  851.      * The window verifier is only used in the first transaction.  In
  852.      * conjunction with a fullname credential, these items are packed
  853.      * into the following structure before being encrypted:
  854.      *
  855.      * struct {
  856.      *     adv_timestamp;        -- one DES block
  857.      *     adc_fullname.window;  -- one half DES block
  858.      *     adv_winverf;          -- one half DES block
  859.      * }
  860.      * This structure is encrypted using CBC mode encryption with an
  861.      * input vector of zero.  All other encryptions of timestamps use
  862.      * ECB mode encryption.
  863.      */
  864.     struct authdes_verf_clnt {
  865.        timestamp adv_timestamp;    /* encrypted timestamp       */
  866.        unsigned int adv_winverf;   /* encrypted window verifier */
  867.     };
  868.  
  869.     /*
  870.      * Verifier: server variety
  871.      * The server returns (encrypted) the same timestamp the client
  872.      * gave it minus one second.  It also tells the client its nickname
  873.      * to be used in future transactions (unencrypted).
  874.      */
  875.     struct authdes_verf_svr {
  876.        timestamp adv_timeverf;     /* encrypted verifier      */
  877.        unsigned int adv_nickname;  /* new nickname for client */
  878.     };
  879.  
  880. 9.3.5 Diffie-Hellman Encryption
  881.  
  882.    In this scheme, there are two constants "PROOT" and "MODULUS".  The
  883.    particular values Sun has chosen for these for the DES authentication
  884.    protocol are:
  885.  
  886.         const PROOT = 2;
  887.         const MODULUS = "b520985fb31fcaf75036701e37d8b857"; /* in hex */
  888.  
  889.    The way this scheme works is best explained by an example.  Suppose
  890.    there are two people "A" and "B" who want to send encrypted messages
  891.    to each other.  So, A and B both generate "secret" keys at random
  892.    which they do not reveal to anyone.  Let these keys be represented as
  893.    SK(A) and SK(B).  They also publish in a public directory their
  894.    "public" keys.  These keys are computed as follows:
  895.  
  896.  
  897.  
  898. Sun Microsystems, Inc.                                         [Page 16]
  899.  
  900. RFC 1050                 Remote Procedure Call                April 1988
  901.  
  902.  
  903.             PK(A) = ( PROOT ** SK(A) ) mod MODULUS
  904.             PK(B) = ( PROOT ** SK(B) ) mod MODULUS
  905.  
  906.    The "**" notation is used here to represent exponentiation.  Now,
  907.    both A and B can arrive at the "common" key between them, represented
  908.    here as CK(A, B), without revealing their secret keys.
  909.  
  910.          A computes:
  911.  
  912.             CK(A, B) = ( PK(B) ** SK(A)) mod MODULUS
  913.  
  914.          while B computes:
  915.  
  916.             CK(A, B) = ( PK(A) ** SK(B)) mod MODULUS
  917.  
  918.          These two can be shown to be equivalent:
  919.  
  920.             (PK(B) ** SK(A)) mod MODULUS = (PK(A) ** SK(B)) mod MODULUS
  921.  
  922.          We drop the "mod MODULUS" parts and assume modulo arithmetic to
  923.          simplify things:
  924.  
  925.             PK(B) ** SK(A) = PK(A) ** SK(B)
  926.  
  927.          Then, replace PK(B) by what B computed earlier and likewise for
  928.          PK(A).
  929.  
  930.             ((PROOT ** SK(B)) ** SK(A) = (PROOT ** SK(A)) ** SK(B)
  931.  
  932.          which leads to:
  933.  
  934.             PROOT ** (SK(A) * SK(B)) = PROOT ** (SK(A) * SK(B))
  935.  
  936.    This common key CK(A, B) is not used to encrypt the timestamps used
  937.    in the protocol.  Rather, it is used only to encrypt a conversation
  938.    key which is then used to encrypt the timestamps.  The reason for
  939.    doing this is to use the common key as little as possible, for fear
  940.    that it could be broken.  Breaking the conversation key is a far less
  941.    serious offense, since conversations are relatively short-lived.
  942.  
  943.    The conversation key is encrypted using 56-bit DES keys, yet the
  944.    common key is 128 bits.  To reduce the number of bits, 56 bits are
  945.    selected from the common key as follows.  The middle-most 8-bytes are
  946.    selected from the common key, and then parity is added to the lower
  947.    order bit of each byte, producing a 56-bit key with 8 bits of parity.
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Sun Microsystems, Inc.                                         [Page 17]
  955.  
  956. RFC 1050                 Remote Procedure Call                April 1988
  957.  
  958.  
  959. 10. RECORD MARKING STANDARD
  960.  
  961.    When RPC messages are passed on top of a byte stream protocol (like
  962.    TCP/IP), it is necessary, or at least desirable, to delimit one
  963.    message from another in order to detect and possibly recover from
  964.    user protocol errors.  This is called record marking (RM).  Sun uses
  965.    this RM/TCP/IP transport for passing RPC messages on TCP streams.
  966.    One RPC message fits into one RM record.
  967.  
  968.    A record is composed of one or more record fragments.  A record
  969.    fragment is a four-byte header followed by 0 to (2**31)-1 bytes of
  970.    fragment data.  The bytes encode an unsigned binary number; as with
  971.    XDR integers, the byte order is from highest to lowest.  The number
  972.    encodes two values -- a boolean which indicates whether the fragment
  973.    is the last fragment of the record (bit value 1 implies the fragment
  974.    is the last fragment) and a 31-bit unsigned binary value which is the
  975.    length in bytes of the fragment's data.  The boolean value is the
  976.    highest-order bit of the header; the length is the 31 low-order bits.
  977.    (Note that this record specification is NOT in XDR standard form!)
  978.  
  979. 11. THE RPC LANGUAGE
  980.  
  981.    Just as there was a need to describe the XDR data-types in a formal
  982.    language, there is also need to describe the procedures that operate
  983.    on these XDR data-types in a formal language as well.  We use the RPC
  984.    Language for this purpose.  It is an extension to the XDR language.
  985.    The following example is used to describe the essence of the
  986.    language.
  987.  
  988. 11.1 An Example Service Described in the RPC Language
  989.  
  990.    Here is an example of the specification of a simple ping program:
  991.  
  992.          /*
  993.           * Simple ping program
  994.           */
  995.          program PING_PROG {
  996.             /*
  997.              * Latest and greatest version
  998.              */
  999.             version PING_VERS_PINGBACK {
  1000.                void
  1001.                PINGPROC_NULL(void) = 0;
  1002.  
  1003.                /*
  1004.                 * Ping the caller, return the round-trip time
  1005.                 * (in microseconds).  Returns -1 if the operation
  1006.                 * timed out.
  1007.  
  1008.  
  1009.  
  1010. Sun Microsystems, Inc.                                         [Page 18]
  1011.  
  1012. RFC 1050                 Remote Procedure Call                April 1988
  1013.  
  1014.  
  1015.                 */
  1016.                int
  1017.                PINGPROC_PINGBACK(void) = 1;
  1018.             } = 2;
  1019.  
  1020.             /*
  1021.              * Original version
  1022.              */
  1023.             version PING_VERS_ORIG {
  1024.                void
  1025.                PINGPROC_NULL(void) = 0;
  1026.             } = 1;
  1027.          } = 1;
  1028.  
  1029.          const PING_VERS = 2;      /* latest version */
  1030.  
  1031.    The first version described is PING_VERS_PINGBACK with two
  1032.    procedures, PINGPROC_NULL and PINGPROC_PINGBACK.  PINGPROC_NULL takes
  1033.    no arguments and returns no results, but it is useful for computing
  1034.    round-trip times from the client to the server and back again.  By
  1035.    convention, procedure 0 of any RPC protocol should have the same
  1036.    semantics, and never require any kind of authentication.  The second
  1037.    procedure is used for the client to have the server do a reverse ping
  1038.    operation back to the client, and it returns the amount of time (in
  1039.    microseconds) that the operation used.  The next version,
  1040.    PING_VERS_ORIG, is the original version of the protocol and it does
  1041.    not contain PINGPROC_PINGBACK procedure.  It is useful for
  1042.    compatibility with old client programs, and as this program matures
  1043.    it may be dropped from the protocol entirely.
  1044.  
  1045. 11.1 The RPC Language Specification
  1046.  
  1047.    The RPC language is identical to the XDR language, except for the
  1048.    added definition of a "program-def" described below.
  1049.  
  1050.       program-def:
  1051.          "program" identifier "{"
  1052.              version-def
  1053.              version-def *
  1054.          "}" "=" constant ";"
  1055.  
  1056.       version-def:
  1057.          "version" identifier "{"
  1058.              procedure-def
  1059.              procedure-def *
  1060.          "}" "=" constant ";"
  1061.  
  1062.       procedure-def:
  1063.  
  1064.  
  1065.  
  1066. Sun Microsystems, Inc.                                         [Page 19]
  1067.  
  1068. RFC 1050                 Remote Procedure Call                April 1988
  1069.  
  1070.  
  1071.          type-specifier identifier "(" type-specifier ")"
  1072.          "=" constant ";"
  1073.  
  1074. 11.2 Syntax Notes
  1075.  
  1076.    (1) The following keywords are added and cannot be used as
  1077.        identifiers:  "program" and "version";
  1078.  
  1079.    (2) A version name cannot occur more than once within the scope
  1080.        of a program definition.  Nor can a version number occur more
  1081.        than once within the scope of a program definition.
  1082.  
  1083.    (3) A procedure name cannot occur more than once within the scope
  1084.        of a version definition.  Nor can a procedure number occur
  1085.        more than once within the scope of version definition.
  1086.  
  1087.    (4) Program identifiers are in the same name space as constant
  1088.        and type identifiers.
  1089.  
  1090.    (5) Only unsigned constants can be assigned to programs, versions,
  1091.        and procedures.
  1092.  
  1093. APPENDIX A: PORT MAPPER PROGRAM PROTOCOL
  1094.  
  1095.    The port mapper program maps RPC program and version numbers to
  1096.    transport-specific port numbers.  This program makes dynamic binding
  1097.    of remote programs possible.
  1098.  
  1099.    This is desirable because the range of reserved port numbers is very
  1100.    small, and the number of potential remote programs is very large.  By
  1101.    running only the port mapper on a reserved port, the port numbers of
  1102.    other remote programs can be ascertained by querying the port mapper.
  1103.  
  1104.    The port mapper also aids in broadcast RPC.  A given RPC program will
  1105.    usually have different port number bindings on different machines, so
  1106.    there is no way to directly broadcast to all of these programs.  The
  1107.    port mapper, however, does have a fixed port number.  So, to
  1108.    broadcast to a given program, the client actually sends its message
  1109.    to the port mapper located at the broadcast address.  Each port
  1110.    mapper that picks up the broadcast then calls the local service
  1111.    specified by the client.  When the port mapper gets the reply from
  1112.    the local service, it sends the reply on back to the client.
  1113.  
  1114. A.1 Port Mapper Protocol Specification (in RPC Language)
  1115.  
  1116.  
  1117.       const PMAP_PORT = 111;      /* portmapper port number */
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Sun Microsystems, Inc.                                         [Page 20]
  1123.  
  1124. RFC 1050                 Remote Procedure Call                April 1988
  1125.  
  1126.  
  1127.       /*
  1128.        * A mapping of (program, version, protocol) to port number
  1129.        */
  1130.       struct mapping {
  1131.          unsigned int prog;
  1132.          unsigned int vers;
  1133.          unsigned int prot;
  1134.          unsigned int port;
  1135.       };
  1136.  
  1137.       /*
  1138.        * Supported values for the "prot" field
  1139.        */
  1140.       const IPPROTO_TCP = 6;      /* protocol number for TCP/IP */
  1141.       const IPPROTO_UDP = 17;     /* protocol number for UDP/IP */
  1142.  
  1143.       /*
  1144.        * A list of mappings
  1145.        */
  1146.       struct *pmaplist {
  1147.          mapping map;
  1148.          pmaplist next;
  1149.       };
  1150.       /*
  1151.        * Arguments to callit
  1152.        */
  1153.       struct call_args {
  1154.          unsigned int prog;
  1155.          unsigned int vers;
  1156.          unsigned int proc;
  1157.          opaque args<>;
  1158.       };
  1159.       /*
  1160.        * Results of callit
  1161.        */
  1162.       struct call_result {
  1163.          unsigned int port;
  1164.          opaque res<>;
  1165.       };
  1166.  
  1167.      /*
  1168.       * Port mapper procedures
  1169.       */
  1170.       program PMAP_PROG {
  1171.          version PMAP_VERS {
  1172.             void
  1173.             PMAPPROC_NULL(void)         = 0;
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Sun Microsystems, Inc.                                         [Page 21]
  1179.  
  1180. RFC 1050                 Remote Procedure Call                April 1988
  1181.  
  1182.  
  1183.             bool
  1184.             PMAPPROC_SET(mapping)       = 1;
  1185.  
  1186.             bool
  1187.             PMAPPROC_UNSET(mapping)     = 2;
  1188.  
  1189.             unsigned int
  1190.             PMAPPROC_GETPORT(mapping)   = 3;
  1191.  
  1192.             pmaplist
  1193.             PMAPPROC_DUMP(void)         = 4;
  1194.  
  1195.             call_result
  1196.             PMAPPROC_CALLIT(call_args)  = 5;
  1197.          } = 2;
  1198.       } = 100000;
  1199.  
  1200. A.2 Port Mapper Operation
  1201.  
  1202.    The portmapper program currently supports two protocols (UDP/IP and
  1203.    TCP/IP).  The portmapper is contacted by talking to it on assigned
  1204.    port number 111 (SUNRPC [8]) on either of these protocols.  The
  1205.    following is a description of each of the portmapper procedures:
  1206.  
  1207.       PMAPPROC_NULL:
  1208.  
  1209.          This procedure does no work.  By convention, procedure zero of
  1210.          any protocol takes no parameters and returns no results.
  1211.  
  1212.       PMAPPROC_SET:
  1213.  
  1214.          When a program first becomes available on a machine, it
  1215.          registers itself with the port mapper program on the same
  1216.          machine.  The program passes its program number "prog", version
  1217.          number "vers", transport protocol number "prot", and the port
  1218.          "port" on which it awaits service request.  The procedure
  1219.          returns a boolean response whose value is "TRUE" if the
  1220.          procedure successfully established the mapping and "FALSE"
  1221.          otherwise.  The procedure refuses to establish a mapping if one
  1222.          already exists for the tuple "(prog, vers, prot)".
  1223.  
  1224.       PMAPPROC_UNSET:
  1225.  
  1226.          When a program becomes unavailable, it should unregister itself
  1227.          with the port mapper program on the same machine.  The
  1228.          parameters and results have meanings identical to those of
  1229.          "PMAPPROC_SET".  The protocol and port number fields of the
  1230.          argument are ignored.
  1231.  
  1232.  
  1233.  
  1234. Sun Microsystems, Inc.                                         [Page 22]
  1235.  
  1236. RFC 1050                 Remote Procedure Call                April 1988
  1237.  
  1238.  
  1239.       PMAPPROC_GETPORT:
  1240.  
  1241.          Given a program number "prog", version number "vers", and
  1242.          transport protocol number "prot", this procedure returns the
  1243.          port number on which the program is awaiting call requests.  A
  1244.          port value of zeros means the program has not been registered.
  1245.          The "port" field of the argument is ignored.
  1246.  
  1247.       PMAPPROC_DUMP:
  1248.  
  1249.          This procedure enumerates all entries in the port mapper's
  1250.          database.  The procedure takes no parameters and returns a list
  1251.          of program, version, protocol, and port values.
  1252.  
  1253.       PMAPPROC_CALLIT:
  1254.  
  1255.          This procedure allows a caller to call another remote procedure
  1256.          on the same machine without knowing the remote procedure's port
  1257.          number.  It is intended for supporting broadcasts to arbitrary
  1258.          remote programs via the well-known port mapper's port.  The
  1259.          parameters "prog", "vers", "proc", and the bytes of "args" are
  1260.          the program number, version number, procedure number, and
  1261.          parameters of the remote procedure.  Note:
  1262.  
  1263.             (1) This procedure only sends a response if the procedure
  1264.                  was successfully executed and is silent (no response)
  1265.                  otherwise.
  1266.  
  1267.             (2) The port mapper communicates with the remote program
  1268.                 using UDP/IP only.
  1269.  
  1270.          The procedure returns the remote program's port number, and the
  1271.          bytes of results are the results of the remote procedure.
  1272.  
  1273. REFERENCES
  1274.  
  1275.    [1]  Birrel, A. D., and Nelson, B. J., "Implementing Remote
  1276.         Procedure Calls", XEROX CSL-83-7, October 1983.
  1277.  
  1278.    [2]  Cheriton, D., "VMTP: Versatile Message Transaction Protocol",
  1279.         Version 0.7, RFC-1045, Stanford University, February 1988.
  1280.  
  1281.    [3]  Diffie & Hellman, "Net Directions in Cryptography", IEEE
  1282.         Transactions on Information Theory IT-22, November 1976.
  1283.  
  1284.    [4]  Postel, J., and Harrenstien, K., "Time Protocol", RFC-868,
  1285.         Network Information Center, SRI, May 1983.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Sun Microsystems, Inc.                                         [Page 23]
  1291.  
  1292. RFC 1050                 Remote Procedure Call                April 1988
  1293.  
  1294.  
  1295.    [5]  National Bureau of Standards, "Data Encryption Standard",
  1296.         Federal Information Processing Standards Publication 46,
  1297.         January 1977.
  1298.  
  1299.    [6]  Postel, J., "Transmission Control Protocol - DARPA Internet
  1300.         Program Protocol Specification", RFC-793; Network Information
  1301.         Center, SRI, September 1981.
  1302.  
  1303.    [7]  Postel, J., "User Datagram Protocol", RFC-768, Network
  1304.         Information Center, SRI, August 1980.
  1305.  
  1306.    [8]  Reynolds, J. and Postel, J.; "Assigned Numbers", RFC-1010,
  1307.         Network Information Center, SRI, May 1987.
  1308.  
  1309.    [9]  Sun Microsystems; "XDR:  External Data Representation
  1310.         Standard", RFC-1014; Sun Microsystems, June 1987.
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Sun Microsystems, Inc.                                         [Page 24]
  1347.