%
% $RCSfile: eth.tex,v $
%
% $Revision: 1.3 $
% $Date: 1997/06/04 22:36:36 $
%

\subsection{ETH}
\index{eth}

\topic{NAME}
ETH (Ethernet Protocol)

\topic{SYNOPSIS}

\noindent 
This hardware-independent protocol 
provides the interface between the rest of the \xk{} protocols and the
actual ethernet drivers.  It has a UPI interface to protocols above it
and interacts with the drivers through a specialized UPI interface.
There should be a separate instantiation of the ETH protocol for each
driver protocol.

\topic{REALM}

\noindent
ETH is in the ASYNC realm.

\topic{PARTICIPANTS}

\noindent
ETH expects a single remote participant with an ETHhost pointer on the
top of the stack.  If the local participant is
present it is ignored.  

\topic{CONTROL OPERATIONS}

\begin{description}

\item[{\tt ETH\_SETPROMISCUOUS:}]
Sets the corresponding device controller in promiscuous mode and
deliver copies of all packets to this session.  (session only)
\begin{description}
\item[{\rm Input:}] none
\item[{\rm Output:}] none
\end{description}

\end{description}

\topic{EXTERNAL INTERFACE}

\noindent
Ethernet driver protocols should include the file 
{\var protocols/eth/eth\_i.h} which defines the interface between 
ETH and the drivers.

ETH will openenable its driver protocol once at initialization time,
without a participant list.  This gives the driver protocol
the XObj it should use in xDemux when it delivers messages.

ETH calls xPush with the driver {\em protocol} object (not a session)
to send a message.  ETH never opens the lower protocol.

ETH will attach a pointer to an ETHhdr as a message attribute for each
outgoing message:

\begin{verbatim}

        typedef struct {
            ETHhost     dst;
            ETHhost     src;
            u_short     type;
        } ETHhdr;

\end{verbatim}

ETH requires that the driver attach a message attribute pointing to an
appropriate ETHhdr structure for every incoming message.  For both
incoming and outgoing messages, the ETHhdr type field will be in 
network byte order.

ETH requires the driver protocol to implement the control op GETMYHOST.

ETH provides support for IEEE 802.3 packet formats.  An upper protocol
registering with Ethernet type 0 is assumed to the recipient for all
IEEE 802.3 packets.  Conversely, a protocol using an Ethernet type
smaller than the maximum IEEE 802.3 data size will have its packets
sent using IEEE 802.3 format (i.e., with the packet length overwriting
the type field.)

\topic{CONFIGURATION}

\noindent
Each instantiation of ETH should be configured above its corresponding
driver protocol.

\bigskip

\noindent
ETH recognizes the following ROM options:

\smallskip

{\tt eth/xxx mtu N}:
Instantiation xxx of ETH should use an MTU of N (decimal).  Default is 1500.

\topic{AUTHOR}

\noindent Ed Menze
