%                                                                 -*- LaTeX -*-
% $RCSfile: ethpkt.tex,v $
%
% $Revision: 1.1 $
% $Date: 1997/06/04 22:37:00 $
%

\subsection{ETHPKT}
\index{ethpkt}

\topic{NAME}
ETHPKT (Raw Ethernet Driver (Linux platform))

\topic{SPECIFICATION}

\noindent
ETHPKT provides direct interaction with an ethernet device through a 
Linux SOCK\_PACKET socket.

\topic{SYNOPSIS}

\noindent 
Each instantiation of ETHPKT is associated with a single ethernet
device.  ETHPKT has the ability to re-map and block ethernet types to
allow an {\xk} to coexist with the normal TCP/IP stack.

\topic{REALM}

\noindent
ETHPKT is in the ANCHOR realm, supporting the ethernet driver interface
described in ETH.

\topic{PARTICIPANTS}

\noindent
ETHPKT supports the ethernet driver interface rather than a standard
xkernel UPI, and thus makes no use of participant stacks.

\topic{CONTROL OPERATIONS}

\begin{description}

	\item[{\tt GETMYHOST:}] 

	Returns the six byte hardware address for the ethernet
	device.

	\begin{description}
		\item[{\rm Input:}]	none
		\item[{\rm Output:}]	ETHhost*
	\end{description}

	\item[{\tt ETH\_SETPROMISCUOUS:}]

	Enables promiscuous mode for the ethernet device.

	\begin{description}
		\item[{\rm Input:}]  none
		\item[{\rm Output:}] none
	\end{description}

\end{description}

\topic{EXTERNAL INTERFACE}

\noindent
ETHPKT adheres to the external interface defined by ETH.

\topic{CONFIGURATION}

ETHPKT requires no lower protocol.  The default network device is
``eth0'', which corresponds to the primary ethernet adapter in the
host machine.

\begin{quote}
{\tt name=ethpkt;}
\end{quote}

\medskip
\noindent
ETHPKT recognizes the following ROM options:

\smallskip
{\tt ethpkt/xxx block type}:

Instantiation {\tt xxx} of ETHPKT will block all ethernet packets of
the given {\tt type} from being processed by the driver.  The 
{\tt type} should be specified in hex and should be in network byte 
order. There is no limit to the number of {\tt block} options.

\smallskip
{\tt ethpkt/xxx device name}:

Instantiation {\tt xxx} of ETHPKT will use the given network device.
This is the name used internally by the Linux kernel.  If no option is
provided the default is ``eth0''.

\smallskip
{\tt ethpkt/xxx remap realtype bogustype}:

Instantiation {\tt xxx} of ETHPKT will re-map all outgoing ethernet
packets of type {\tt realtype} to {\tt bogustype}.  The reverse will
be done to all incoming packets.  The {\tt realtype} and 
{\tt bogustype} should be specified in hex and should be in network 
byte order.  There is no limit to the number of {\tt remap} options.
Although subsequent operations on previously mapped ids have no
effect.

After an incoming packet has had its ethernet type field re-mapped it
is subject to being blocked from the {\tt block} option.

This method of changing ethernet types allows different mappings for
each instantiation of ETHPKT.  If this is not required, the {\xk}
protocols tables could be changed to achieve the same result.

Example {\tt graph.comp} and {\tt rom} files for using ETHPKT can be
found in {\tt /usr/xkernel/user\_level/build/Template/example\_ethpkt}.

\topic{AUTHOR}

\noindent Mason Katz




