%     
% $RCSfile: arp.tex,v $
%
% x-kernel v3.2
%
% Copyright (c) 1993,1991,1990  Arizona Board of Regents
%
%
% $Revision: 1.2 $
% $Date: 1996/02/02 00:04:22 $
%

\subsection{ARP}
\index{arp}
\index{address resolution}

\topic{NAME}
ARP (Address Resolution Protocol)

\topic{SPECIFICATION}

\noindent D. Plummer. {\it An Ethernet Address Resolution Protocol}.
Request for Comments 826, USC Information Sciences Institute, Marina
del Ray, Calif., Nov. 1982.

\topic{SYNOPSIS}

\noindent ARP translates IP addresses into ethernet addresses, and
vice versa (i.e., it also implements RARP).  This implementation of
ARP supports a single interface, but may be multiply instantiated to
support several network interfaces.

\topic{REALM}

\noindent ARP is in the CONTROL realm.  There are no ARP sessions -- control
operations may be performed on the protocol object only.

\topic{CONTROL OPERATIONS}

\begin{description}

\item[{\tt RESOLVE:}]
Maps an IP address into an ethernet address.
\begin{description}
\item[{\rm Input:}] {\tt IPhost }
\item[{\rm Output:}] {\tt ETHhost}
\end{description}

\item[{\tt RRESOLVE:}]
Maps an ethernet address into an IP address.
\begin{description}
\item[{\rm Input:}] {\tt ETHhost}
\item[{\rm Output:}] {\tt IPhost}
\end{description}

\item[{\tt ARP\_INSTALL:}]
Installs an IP address to ETH address binding.
\begin{description}
\item[{\rm Input:}] { ArpBinding == \tt \{ETHhost eth; IPhost ip;\} }
\item[{\rm Output:}] none
\end{description}

\item[{\tt ARP\_GETMYBINDING:}]
Return the IP and ETH address of the local host for the interface.
\begin{description}
\item[{\rm Input:}] none
\item[{\rm Output:}] { ArpBinding == \tt \{ETHhost eth; IPhost ip;\} }
\end{description}

\item[{\tt ARP\_FOREACH:}]
This is a kludge to allow non-broadcast device drivers, such as
SIMETH, to simulate broadcast without having to keep their own tables
of reachable hosts.  When the ARP\_FOREACH control operation is
invoked, ARP will call-back the invoking protocol once for each
binding in its table.  
\begin{description}
\item[{\rm Input:}] { ArpForEach == \tt \{ void *arg; ArpForEachFunc f; \} }
\item[{\rm Output:}] none
\end{description}

{\sl typedef int}      ({\bf ArpForEachFunc})
( 
{\sl ArpBinding} *, 
{\sl void} * 
);

\item[{\tt ETH\_REGISTER\_ARP:}]
ARP invokes this control operation on its lower protocol at
initialization time so the driver knows which protocol to use if it
has to invoke an ARP\_FOREACH.  This is not pretty.
\begin{description}
\item[{\rm Input:}] { \tt XObj }
\item[{\rm Output:}] none
\end{description}


\end{description}

\topic{CONFIGURATION}

\noindent {\tt name=arp protocols=eth;}

\topic{AUTHORS}

\noindent Larry Peterson and Norm Hutchinson
