Files
sics/telnet.tex
2000-02-07 10:38:55 +00:00

109 lines
4.6 KiB
TeX

\subsection{SICS Telnet Connection}
SICS support communication through the standard TCP/IP telnet protocoll as
described in RFC-854. SICS implements telnet in the most primitive way: i.e.
no options are supported. In a later stage binary data transfer and
authentication options may be supported. But not in its first
implementation. After a telnet connection has been accepted a SICS task is
installed. In the first stage this task will answer any commands with a
'Fuck--off' message. Only if a special login command is given, the
connection will be verified and finally opened for commands or rejected.
If no login command has been sent within a reasonable intervall of time the
connection will be closed as well. This logic is implemented into a special
task function associated with a telnet connection. The rest of the telnet
logic is so tightly integrated with the network reading, that it has to live
in the network reader module. This section describes the special task
function and its associated data structure.
\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap1}
$\langle$teldat {\footnotesize ?}$\rangle\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@ typdef struct __TelTask {@\\
\mbox{}\verb@ SConnection *pCon;@\\
\mbox{}\verb@ int iLogin;@\\
\mbox{}\verb@ char pLoginWord[132];@\\
\mbox{}\verb@ time_t tStart;@\\
\mbox{}\verb@ } TelTask;@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-1ex}
\footnotesize\addtolength{\baselineskip}{-1ex}
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
\item Macro never referenced.
\end{list}
\end{minipage}\\[4ex]
\end{flushleft}
The fields are: \begin{description}
\item[pCon] The connection object to act upon.
\item[iLogin] If the connection is logged in or not.
\item[pLoginWord] The login word to use. This word will be set as a SICS
server option.
\item[tStart] The start time of the telnet connection. Used to check for
timeout on the connection.
\end{description}
The interface to this module looks like this:
\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap2}
$\langle$telint {\footnotesize ?}$\rangle\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@ typedef struct __TelTask *pTelTask;@\\
\mbox{}\verb@/*--------------------------------------------------------------------------*/@\\
\mbox{}\verb@ pTelTask CreateTelnet(SConnection *pCon);@\\
\mbox{}\verb@ void DeleteTelnet(void *pData);@\\
\mbox{}\verb@/*---------------------------------------------------------------------------*/@\\
\mbox{}\verb@ int TelnetTask(void *pData);@\\
\mbox{}\verb@ void TelnetSignal(void *pData, int iSignal, void *pSigData);@\\
\mbox{}\verb@/*--------------------------------------------------------------------------*/@\\
\mbox{}\verb@ void InstallTelnet(void);@\\
\mbox{}\verb@ void KillTelnet(void);@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-1ex}
\footnotesize\addtolength{\baselineskip}{-1ex}
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
\item Macro referenced in scrap ?.
\end{list}
\end{minipage}\\[4ex]
\end{flushleft}
\begin{description}
\item[CreateTelnet] creates a new telnet task object. Returns NULL on
failure, else apointer to a new data structure.
\item[DeleteTelnet] The deletion function for a telnet task.
\item[TelnetTask] The telnet task function.
\item[TelnetSignal] The telnet signal function.
\item[InstallTelnet] installs a telnet server port into the SICS system.
\item[KillTelnet] deletes the telnet server port from the system.
\end{description}
\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap3}
\verb@"telnet.h"@ {\footnotesize ? }$\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@/*-------------------------------------------------------------------------@\\
\mbox{}\verb@ S I C S T E L N E T S U P P O R T@\\
\mbox{}\verb@@\\
\mbox{}\verb@ This file defines the telnet task function and its associated data@\\
\mbox{}\verb@ structures. The body of the telnet handling code lives in the network@\\
\mbox{}\verb@ reader module.@\\
\mbox{}\verb@@\\
\mbox{}\verb@ Mark Koennecke, January 1998@\\
\mbox{}\verb@---------------------------------------------------------------------------*/@\\
\mbox{}\verb@#ifndef SICSTELNET@\\
\mbox{}\verb@#define SICSTELNET@\\
\mbox{}\verb@@$\langle$telint {\footnotesize ?}$\rangle$\verb@@\\
\mbox{}\verb@@\\
\mbox{}\verb@#endif@\\
\mbox{}\verb@ @\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-2ex}
\end{minipage}\\[4ex]
\end{flushleft}