\magnification=\magstep1
{

\hoffset=1truein
\hsize=5.25truein
\vsize=10.25truein
\font\small=cmssbx10 at 14.4truept
\font\medium=cmssbx10 at 17.28truept
\font\large=cmssbx10 at 20.74truept
\nopagenumbers
\hrule height 0pt
\parindent=0pt
%\parskip=0pt
\hskip 3.9truein
\large
EDOC018\par
\vskip .5truein
\large
EUROGAM PROJECT\par
\vskip 1.5truein
\hrule height 2pt
\vskip 20pt
\large
NSF DATA ACQUISITION SYSTEM\par
\vskip .5truein
Remote Procedure Call\par
\vskip 20pt
\hrule height 2pt
\vskip 1truein
\medium
Edition 2.0\par
\vskip 5pt
July 1990\par
\vfill
\medium
NSF Software Systems Group\par
\vskip 5pt
UK Science and Engineering Research Council\par
\vskip 5pt
Daresbury Laboratory\par
\vskip .5truein

\eject
}
\parindent=0pt\hsize=6.25truein\vsize=9.75truein
\def\section#1{\bigbreak{\bf #1}\par\nobreak\medskip}
\def\blob{$\bullet$}
\parskip=.5\baselineskip
\def\list{\parindent=2em\parskip=0pt\smallskip}
\def\endlist{\par\parindent=0pt\parskip=.5\baselineskip}
\def\tabrule{\noalign{\hrule\vskip-0.4pt}}
\newbox\tab
\newdimen\tabht\newcount\tablines
\newdimen\savepagetotal\newcount\savepageno
\newcount\label
\newdimen\pagesum
\newtoks\stuff
\newtoks\heading

\def\lb{\hfil\break}
\def\Group#1. #2\par{
\heading={\bf Order Group    #1.\quad #2} 
\hbox{\the\heading}\nobreak}

\def\endGroup{\vfill\eject}

\def\order#1. #2\par{
\heading={\bf Order #1.\quad #2}}

\def\table{
   \label=0
   \setbox\tab=
   \vbox\bgroup\offinterlineskip
   \tabskip=0pt
   \halign to 2.0 truein \bgroup
   \vrule##\tabskip=0in plus1in\strut&
   \hbox to 0.99truein{\hfil##\hfil}&
   \vrule##&
   \hbox to 0.99truein{\hfil##\hfil}&
   \vrule##\cr
}
\def\byte#1#2{
   \tabrule
   \global\advance\label by 2\relax
   &\sl #1&&\sl #2&\cr
   }
\def\half#1{
   \tabrule
   \global\advance\label by 2\relax
   &\multispan3\hbox to 1.99truein{\hfil\sl #1\hfil}&\cr
   }
\def\full#1{
   \tabrule
   \global\advance\label by 4\relax
   &\multispan3\hbox to 1.99truein{\vrule height14.5pt depth9.5pt width0pt
   \hfil\sl #1\hfil}&\cr
   }
\def\data#1{
   \tabrule
   \global\advance\label by 4\relax
   &\multispan3\hbox to 1.99truein{\vrule height20.5pt depth15.5pt width0pt
   \hfil\sl #1\hfil}&\cr
   }
\def\endtable{\tabrule\egroup\egroup}



\def\desc{
   \tabht=\ht\tab
   \vskip24pt plus 3in\penalty-200\vskip0pt plus -3in
   \hbox{\the\heading}\nobreak\medskip
   \moveright 4.5truein \box\tab
   \savepagetotal=\pagetotal\savepageno=\pageno
   \vskip-\tabht\prevdepth=0pt
   \tablines=\tabht
%  \advance\tablines by \baselineskip
   \divide\tablines by \baselineskip
   \hangindent=-2.0truein \hangafter=-\tablines
   \vskip-\parskip
   \noindent\tolerance=2000
   }
\def\enddesc{
   \par 
   \ifnum\prevgraf<\tablines
      \advance\tablines by -\prevgraf
      \savepagetotal=\baselineskip
      \multiply\savepagetotal by\tablines
     \vskip\savepagetotal\fi}     
   

\def\block{
   \vbox\bgroup\offinterlineskip
   \tabskip=0pt
   \halign to 2.0 truein \bgroup
   \vrule              ##\tabskip=0in plus2in\strut&
                       \hfil##\hfil &
   \vrule              ##\tabskip=0pt         \cr
}

\def\entry#1{
   \tabrule
   &\sl #1 &\cr
   }

\def\fullentry#1{
   \tabrule
   &\vrule height14.5pt depth9.5pt width0pt
   \hfil\sl #1\hfil&\cr
   }

\def\endblock{\tabrule\egroup\egroup}
\tolerance=1000\hfuzz=5pt\raggedbottom
\hyphenation{key-slot}
\section{Introduction}
This document describes the protocol specification for   
a Remote Procedure Call mechanism forming part of the
NSF Data
Acquisition system.
 
The protocol is a compatible subset of the RPC protocol
defined by Sun Microsystems.
 
This document describes Version 2 of the RPC protocol.
 
This protocol will be carried by a datagram type communications
protocol such as described in the document 
{\sl Ethernet Communications}.
 
The protocol dialogue is between an INITIATOR and a TARGET. Only
the INITIATOR may send protocol requests, the TARGET will 
reply with a protocol reject or accept.
 
RPC messages passed by a datagram transport are treated as
unreliable. Thus if the initiator retransmits call messages
after suitable time-outs the only thing that can be inferred
from no reply message is that the remote procedure 
was executed zero or more times and from a reply message
that it was executed one or more times.
 
The initiator application may have a number of requests 
outstanding at any time which can be identified
by use of the {\sl transaction id}.
 
 
All error detection and recovery is the responsibility of 
the application users of the protocol with the exception
of those errors reported by the reject
message.
\vskip .4in
 
\section{Program interface}
The Sun Microsystems RPC library may be used for writting 
application client and server programs if the constraints 
and limitations placed by use of the library routines are
acceptable. Use of the library routines is however not 
essential as long as the protocol is followed.
 
 For full details see the Sun manual {\sl Remote Procedure 
Call - Programming Guide}. For additional information 
see also the Eurogam document {\sl RPC Applications Programs}.
\par



\vfill\eject


\section{Protocol Specification}
\desc
\enddesc
The protocol diagrams are in terms of data items 32 bits wide.
 
\heading={REQUEST}
\table
\half{transaction id}
\half{message type : call $= 0$}
\half{RPC version $= 2$}
\half{program}
\half{version}
\half{procedure}
\data{authorisation}
\data{procedure specific data}
\endtable
\desc
General form of a RPC request.
\enddesc
{\sl Transaction id} is a 4 byte field available for use of the
client to identify this REQUEST. \lb
This field
is returned with the subsequent RESPONSE.
It is available for clients to match reply messages with call
messages. The server cannot treat this ID as any type of
sequence number.     \lb
{\sl Program, Version} and {\sl Procedure} specify the remote
program, its version number, and the procedure within the remote
program to be called.  \lb
{\sl Authorisation} is a field which contains the
client's authorisation to access the server. Currently only
the null authorisation is used and hence this field
is 16 bytes long  and
should be set to nulls.   \lb
{\sl Procedure specific data} contains application program specific
request data which defines the parameters to be passed to the called
procedure.
\heading={RESPONSE}
\desc
\enddesc
The response to a RPC request can take one of two forms: the
message was either accepted or rejected.
\heading={Reject}
\table
\half{transaction id}
\half{message type : reply $= 1$}
\half{reply status : reject $= 1$}
\half{reason}
\endtable
\desc
The RPC REQUEST may be rejected by the server.
\enddesc
The request can be rejected by the server because of 
two reasons: either the server is not running a compatible version
of the RPC protocol or the server refuses 
to accept the client's authorisation . \lb
{\sl Reason} is a 4 byte field which indicates the reason for
the reject.
\smallskip
\settabs\+
\qquad&code = \quad&9999\quad&RPC version number invalid (ie not equal 2)  \cr
\+& reason=&  0  &  RPC version number invalid (ie not equal 2) \cr
\+&             &  1  &  Authorisation failure        \cr
Since  only RPC version 2 is acceptable and only the null
authorisation is used these errors are not expected.
\heading={Accept - Error}
\table
\half{transaction id}
\half{message type : reply $= 1$}
\half{reply status : accept $= 0$}
\data{authorisation verifier}
\half{reason}
\endtable
\desc
The RPC REQUEST may be accepted by the server but subsequentially an 
error detected.  
\enddesc
{\sl Authorisation verifier} is a field returned by the server
in response to the client's authorisation information. Since only
the null authorisation is currently used this field is 
8 bytes long and should be set to nulls.   \lb
{\sl Reason} is a 4 byte field which is non  zero and 
indicates the cause of the error.   \lb
Note {\sl reason} = 0 indicates successful execution of the
procedure.
\smallskip
\settabs\+
\qquad&code = \quad&9999\quad&RPC version number invalid (ie not equal 2)  \cr
\+& reason=&  1  &  remote program invalid or unavailable      \cr
\+&             &  2  &  remote program version invalid or not supported \cr
\+&             &  3  &  remote procedure invalid or not supported \cr
\+&             &  4  &  precedure cannot decode parameters \cr
\heading={Accept - OK}
\table
\half{transaction id}
\half{message type : reply $= 1$}
\half{reply status : accept $= 0$}
\data{authorisation verifier}
\half{accept status : success $= 0$}
\data{procedure specific data}
\endtable
\desc
The RPC REQUEST may be accepted by the server and executed 
successfully.
\enddesc
{\sl Authorisation verifier} is a field returned by the server
in response to the client's authorisation information. Since only
the null authorisation is currently used this field is 
8 bytes long and should be set to nulls. \lb
{\sl Procedure specific data} contains application program
specific response data which defines the results to be
returned to the calling program.
\endGroup
\end
