From a75990e8c260332f7a1eb70b2752b7c9723e5fcc Mon Sep 17 00:00:00 2001 From: sperber Date: Thu, 23 Jan 2003 09:38:44 +0000 Subject: [PATCH] Reasonable complete and up-to-date docs. --- doc/latex/ftpd.tex | 245 ++++++++++++++------------------------------- 1 file changed, 73 insertions(+), 172 deletions(-) diff --git a/doc/latex/ftpd.tex b/doc/latex/ftpd.tex index 7c42e25..a2c2af3 100644 --- a/doc/latex/ftpd.tex +++ b/doc/latex/ftpd.tex @@ -1,202 +1,103 @@ \chapter{FTP server}\label{cha:ftpd} -\begin{description} -\item[Used files:] ftpd.scm -\item[Name of the package:] ftpd -\end{description} +The \ex{ftpd} structure contains a complete anonymous ftp server. -\section{What users want to know} +\defun{ftpd}{options}{\noreturn} +\defunx{ftp-inetd}{options}{\noreturn} +\begin{desc} + \ex{Ftpd} starts the server, using \var{anonymous-home} as the + root directory of the server. + + \ex{ftpd-inetd} is the version to be used from \ex{inetd}. + \ex{Ftpd-inetd} handles the connection through the current standard + output and input ports. +\end{desc} +% +The \var{options} argument can be constructed through a number of +procedures with names of the form \texttt{with-\ldots}. Each of these +procedures either creates a fresh options value or adds a +configuration parameter to an old options argument. The configuration +parameter value is always the first argument, the (old) options value +the optional second one. Here they are: -\section{Entry points} +\defun{with-port}{port [options]}{options} +\begin{desc} + This specifies the port on which the server listens. Defaults to 21. +\end{desc} -\defun {ftpd} {options} {\noreturn} -\begin{defundescx}{ftp-inetd} {anonymous-home} {\noreturn} - \ex{ftpd} starts the server, using \semvar{anonymous-home} as the - root directory of the server. Usage of relative paths is not - encouraged. \semvar{port} specifies the port the server is - listening for connections. It defaults to 21. \ex{ftpd} makes a log - entry for each file sent or retrieved. These logs are written to - \semvar{logfile}, if given. If \semvar{dns-lookup?} is \sharpt, the - logfile will contain the host names instead of their IP - addresses. If \semvar{dns-lookup?} is not specified or \sharpf, the - IP addresses are stored. +\defun{with-anonymous-home}{string [options]}{options} +\begin{desc} + This specifies the home directory for anonymous logins. Defaults to + \verb|"~ftp"|. +\end{desc} - The log format of \ex{ftpd} is the same as the one of - \ex{wuftpd}. The fields are seperated by spaces and contain - following informations: -\codex{Fri Apr 19 17:08:14 2002 4 134.2.2.171 56881 /files.lst b \_ i a nop@ssword ftp 0 *} - \begin{enumerate} +\defun{with-banner}{list [options]}{options} +\begin{desc} + This specifies an alternative greeting banner for those members of + the Untergrund who prefer to remain covert. The banner is + represented as a list of strings, one for each line of output. +\end{desc} + +\defun{with-logfile}{file-name [options]}{options} +\begin{desc} + If this is non-\sharpf, ex{ftpd} makes a log entry for each file + sent or retrieved in \var{file-name}. Defaults to \sharpf. +\end{desc} + +\defun{with-dns-lookup?}{boolean [options]}{options} +\begin{desc} + If \var{dns-lookup?} is \sharpt, the log file will contain the host + names instead of their IP addresses. If \var{dns-lookup?} is \sharpf, + the log will only contain IP addresses. Defaults to \sharpf. +\end{desc} + +The log format of \ex{ftpd} is the same as the one of +\ex{wuftpd}. The entries look like this: +% +\begin{verbatim} +Fri Apr 19 17:08:14 2002 4 134.2.2.171 56881 /files.lst b _ i a nop@ssword ftp 0 * +\end{verbatim} +% +These are the fields: +\begin{enumerate} \item Current date and time. This field contains spaces and is 24 characters long. \item Transfer time in seconds. -\item Remote host IP (wuftpd puts the name here). +\item Remote host IP (wu-ftpd puts the name here). \item File size in bytes \item Name of file (spaces are converted to underscores) \item Transfer type: \underline{a}scii or \underline{b}inary (image type). \item Special action flags. As \ex{ftpd} does not support any special -action, we are always `\ex{\_}' here. +action, it always has \ex{\_} here. \item File was sent to user (\underline{o}utgoing) or received from user (\underline{i}ncoming) \item \underline{A}nonymous access -\item Anonymous ftp password. We do not use anyone. -\item Service name - always \ex{ftp}. -\item Authentication mode (always none = `\ex{0}'). -\item Authenticated user ID (always not available = `\ex{*}') +\item Anonymous ftp password. +\item Service name---always \ex{ftp}. +\item Authentication mode (always ``none'' = `\ex{0}'). +\item Authenticated user ID (always ``not available'' = `\ex{*}') \end{enumerate} - As the procedure does not return, you have to do a \ex{fork} in - order to have a ``real'' daemon: \codex{(fork (lambda () (ftpd - "/data/ftp" 8080)))} \ex{ftpd-inetd} is the version to be used with - a daemon like \ex{inetd}. If the server is started this way, it - handles the connection through the current standard output and input - ports. -\end{defundescx} - -\subsubsection*{Examples} - -To start the server with the current home directory as root directory -and listening on port 8080, use -\codex{(ftpd (cwd) 8080)} - -This is how the ftp server at the computing faculty of the university -of Tuebingen\footnote{\texttt{archive.informatik.uni-tuebingen.de}} is -started: -\begin{alltt} -#!/bin/sh /scsh-0.6-alpha/bin/scsh <