summaryrefslogtreecommitdiffstats
path: root/doc/networking
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-04-01 21:43:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-04-01 21:43:50 +0000
commit5345873a5bbb955d6bfec35a802eca8fd9ca480d (patch)
tree6edf82cbad65ec3a1005118af291c07fcb2fb0b4 /doc/networking
parentPatch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to address problems (diff)
downloadrtems-5345873a5bbb955d6bfec35a802eca8fd9ca480d.tar.bz2
New file. Text from Jake Janovetz.
Diffstat (limited to 'doc/networking')
-rw-r--r--doc/networking/Makefile8
-rw-r--r--doc/networking/servers.t115
2 files changed, 122 insertions, 1 deletions
diff --git a/doc/networking/Makefile b/doc/networking/Makefile
index afa7d89b49..5264b5943d 100644
--- a/doc/networking/Makefile
+++ b/doc/networking/Makefile
@@ -22,7 +22,8 @@ dirs:
COMMON_FILES=../common/cpright.texi ../common/setup.texi
-GENERATED_FILES=networkapp.texi driver.texi networktasks.texi testing.texi
+GENERATED_FILES=networkapp.texi driver.texi networktasks.texi testing.texi \
+ servers.texi
FILES= $(PROJECT).texi \
networktasks.texi preface.texi $(GENERATED_FILES)
@@ -64,6 +65,11 @@ networkapp.texi: networkapp.t Makefile
testing.texi: testing.t Makefile
$(BMENU) -p "Network Statistics" \
-u "Top" \
+ -n "Network Servers" ${*}.t
+
+servers.texi: servers.t Makefile
+ $(BMENU) -p "Network Servers" \
+ -u "Top" \
-n "Command and Variable Index" ${*}.t
html: dirs $(FILES)
diff --git a/doc/networking/servers.t b/doc/networking/servers.t
new file mode 100644
index 0000000000..3680d0d22a
--- /dev/null
+++ b/doc/networking/servers.t
@@ -0,0 +1,115 @@
+@c
+@c Text Written by Jake Janovetz
+@c
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
+@c
+@c $Id$
+@c
+
+
+@chapter Network Servers
+
+@section RTEMS FTP Daemon
+
+The RTEMS FTPD is a complete file transfer protocol (FTP) daemon
+which can store, retrieve, and manipulate files on the local
+filesystem. In addition, the RTEMS FTPD provides ``hooks''
+which are actions performed on received data. Hooks are useful
+in situations where a destination file is not necessarily
+appropriate or in cases when a formal device driver has not yet
+been implemented.
+
+@subsection Configuration Parameters
+
+The configuration structure for FTPD is as follows:
+
+@example
+struct rtems_ftpd_configuration
+@{
+ rtems_task_priority priority; /* FTPD task priority */
+ unsigned long max_hook_filesize; /* Maximum buffersize */
+ /* for hooks */
+ int port; /* Well-known port */
+ struct rtems_ftpd_hook *hooks; /* List of hooks */
+@};
+@end example
+
+The FTPD task priority is specified with @code{priority}. Because
+hooks are not saved as files, the received data is placed in an
+allocated buffer. @code{max_hook_filesize} specifies the maximum
+size of this buffer. Finally, @code{hooks} is a pointer to the
+configured hooks structure.
+
+@subsection Initializing FTPD (Starting the daemon)
+
+Starting FTPD is done with a call to @code{rtems_initialize_ftpd()}.
+The configuration structure must be provided in the application
+source code. Example hooks structure and configuration structure
+folllow.
+
+@example
+struct rtems_ftpd_hook ftp_hooks[] =
+ @{
+ @{"untar", Untar_FromMemory@},
+ @{NULL, NULL@}
+ @};
+
+struct rtems_ftpd_configuration rtems_ftpd_configuration =
+ @{
+ 40, /* FTPD task priority */
+ 512*1024, /* Maximum hook 'file' size */
+ 0, /* Use default port */
+ ftp_hooks /* Local ftp hooks */
+ @};
+@end example
+
+Specifying 0 for the well-known port causes FTPD to use the
+UNIX standard FTPD port (21).
+
+@subsection Using Hooks
+
+In the example above, one hook was installed. The hook causes
+FTPD to call the function @code{Untar_FromMemory} when the
+user sends data to the file @code{untar}. The prototype for
+the @code{untar} hook (and hooks, in general) is:
+
+@example
+ int Untar_FromMemory(unsigned char *tar_buf, unsigned long size);
+@end example
+
+An example FTP transcript which exercises this hook is:
+
+@example
+220 RTEMS FTP server (Version 1.0-JWJ) ready.
+Name (dcomm0:janovetz): John Galt
+230 User logged in.
+Remote system type is RTEMS.
+ftp> bin
+200 Type set to I.
+ftp> dir
+200 PORT command successful.
+150 ASCII data connection for LIST.
+drwxrwx--x 0 0 268 dev
+drwxrwx--x 0 0 0 TFTP
+226 Transfer complete.
+ftp> put html.tar untar
+local: html.tar remote: untar
+200 PORT command successful.
+150 BINARY data connection.
+210 File transferred successfully.
+471040 bytes sent in 0.48 secs (9.6e+02 Kbytes/sec)
+ftp> dir
+200 PORT command successful.
+150 ASCII data connection for LIST.
+drwxrwx--x 0 0 268 dev
+drwxrwx--x 0 0 0 TFTP
+drwxrwx--x 0 0 3484 public_html
+226 Transfer complete.
+ftp> quit
+221 Goodbye.
+@end example
+
+
+