#verbatim % File viegophr.product % \documentstyle[lpr,appleps]{article} \pagestyle{myheadings} \begin{document} \def\LPtopA{{\tt VieGOPHER}} \def\LPtopB{{\sl The Code}} \pagenumbering{roman} %\thispagestyle{empty} \title{VieGOPHER\\---\\A Gopher System for VM/CMS\\---\\{\small The Code}} \author{Gerhard Gonter} \date{\today} \maketitle \begin{abstract} The Internet Gopher Protocol provides a simple, yet very effective method for distributed document search and retrieval. This document contains a documented source listing of the VieGOPHER system. Included are the sources of the server, the client and the VieGOPHER specific support programs and files. The printed version was generated from a Rose product file ({\tt VIEGOPHR.PRODUCT}). The product file itself was generated by linearizing a portion of a NED hypertext file that contains the documentation, the code and all extra information. The hypertext editor NED as well as the hypertext file for the VieGOPHER system can be obtained from {\tt Gerhard.Gonter@wu-wien.ac.at}. \end{abstract} \pagebreak[4] \begin{normalsize} \def\LPtopC{Contents} \tableofcontents \end{normalsize} \pagebreak[4] \setcounter{page}{1} \pagenumbering{arabic} %\begin{small} \small #endverbatim #section Introduction ROSE file: viegophr.product This file contains most files related to the VieGOPHER system. To install the product enter the command: ROSE VIEGOPHR % NOTE: This is not the original version of the document! % Instead, this is the sequenced and stripped version of a % hypertext file. % The linear ROSE version is provided for your convenience. % For more information contact the author. #set RELEASE VieGOPHER Ver 2.00.00 #set RELEASE_DATE 1993-06-16 #set RELEASE_TIME 18:00 #verbatim \def\LPbotC{VieGOPHER 2.00.00 1993-06-16 18:00} #endverbatim #set SENDFIX NO #section Help messages #help TEST_and_HACK There might be a number of Test and Hack options that can be configured. Usually you should select the predefined value. No further details about any option is given. #endhelp #set TEST_and_HACK YES #prompt TEST_and_HACK #help TEST_dd_binsel TEST_dd_binsel: BIN ... REXTCPIP, selector string is read binary and converted #endhelp #set TEST_dd_binsel NO #prompt TEST_dd_binsel #help Compactor Compactor allows the installation procedure to remove unrelevant parts from the EXEC and XEDIT files. Removed are comments, extra spaces, and lines. This reduces loading time a bit and might bring a little bit of performance. Compacting will only be executed if the program REXXCPCX.MODULE is present. Possible options are: NONE ... to compact nothing at all (the default) ALL ... to compact everything C ... to compact just client modules S ... to compact server modules T ... to compact tools Answering CU allows the compacting of the client and the utilities alone, the server will not be modified. CST is equivalent to ALL. #endhelp #set Compactor NONE #prompt Compactor #help MAKE_SERVER MAKE_SERVER defines if server modules will be generated. The preset value is YES. #endhelp #set MAKE_SERVER YES # currently no prompting, because ROSE doesn't do it anyway... # prompt MAKE_SERVER # This is a block of definitions for the server code. # switch MAKE_SERVER # case YES #help LOGFILE LOGFILE defines the file where server activities are logged. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set LOGFILE 'GOPHERD LOGFILE A' #prompt LOGFILE #help SELECTORFILE SELECTORFILE defines the file where all known selector strings are stored. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set SELECTORFILE 'GOPHERD SELECTOR A' #prompt SELECTORFILE #help GROUPFILE GROUPFILE defines the file where access group information is stored. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set GROUPFILE 'GOPHERD GROUPS A' #prompt GROUPFILE #help EAIFILE EAIFILE defines the file where handlers for embedded applications are declard. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set EAIFILE 'GOPHERD EAI A' #prompt EAIFILE #help DSKGRPFILE DSKGRPFILE names the file where assignments between disks and access groups are defined. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set DSKGRPFILE 'GOPHERD DSKGRP A' #prompt DSKGRPFILE #help ROOTINDEX ROOTINDEX defines the file that contains the root index or root menu. This file is sent out whenever an empty selector string is presented to the GOPHER server. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set ROOTINDEX 'GOPHERD INDEX A' #prompt ROOTINDEX #help GOPHER_PORT GOPHER_PORT is used in the server module to define the TCP port number of the gopher server. It is typically port number 70. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set GOPHER_PORT 70 #prompt GOPHER_PORT #help FINGER_PORT FINGER_PORT is used in the server module to define the TCP port number of the finger server. It is typically port number 79. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set FINGER_PORT 79 #prompt FINGER_PORT #help COOKIE_PORT COOKIE_PORT is used in the server module to define the TCP port number of the cookie server. It is typically port number 17. The preset value can be overridden by a global variable of the same name in the GOPHERD group. #endhelp #set COOKIE_PORT 17 #prompt COOKIE_PORT #help USE_SRE SRE means: Structured Representation Engine This is an experimental protocol and usually you would not select it. If you want to activate it, define the value YES, default is NO. #endhelp #set USE_SRE NO #prompt USE_SRE #help SRE_PORT SRE_PORT is used in the server module to define the TCP port number of the SRE server. It is typically port number 150. #endhelp #set SRE_PORT 150 #prompt SRE_PORT #help SRV_WAKEUP_SYSTEM SRV_WAKEUP_SYSTEM defines if or if not messages (SMSG, MSG) from other virtual machines or from RSCS are accepted and processed. Typically, messages are trapped and processed. In this case the variable value is set to 'YWAKEUP' or to 'WAKEUP', depending on the preference for either method. Trapping messages with option YWAKEUP requires YWAKEUP.MODULE, for WAKEUP you need IBM's WAKEUP module etc. If no message trapping is wanted, enter NO. If you have trouble using either method, select also NO. #endhelp #set SRV_WAKEUP_SYSTEM YWAKEUP #prompt SRV_WAKEUP_SYSTEM #help SRV_TCP SRV_TCP defines the TCP transport package to be used. Allowed value is REXTCPIP (the original and default package). RXSOCKET might be an option in the future. #endhelp #set SRV_TCP REXTCPIP # prompt SRV_TCP #help SRV_ORGANIZATION SRV_ORGANIZATION is the short name of your organization. Don't use single quotes in the string. #endhelp #set SRV_ORGANIZATION Univ. of Economics, Vienna, Austria #prompt SRV_ORGANIZATION # endswitch # this ends the block of fixes for the server modules #help MAKE_CLIENT MAKE_CLIENT defines if client modules will be generated. The preset value is YES. #endhelp #set MAKE_CLIENT YES # currently no prompting, because ROSE doesn't do it anyway... # prompt MAKE_CLIENT # This is a block of definitions for the client code. # switch MAKE_CLIENT # case YES #help STARTUP_DIR STARTUP_DIR defines a string that is displayed as a title for the first Gopher menu. Note: This value is *not* entered a quoted string. This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set STARTUP_DIR WU-Wien Gopher Information Service: Main Menu #prompt STARTUP_DIR #help CL_TCP CL_TCP defines the TCP transport package to be used by the client. Allowed values are REXTCPIP (the original package) and RXSOCKET (now the default). Please report any problem that you encounter with alternative TCP transport support. #endhelp #set CL_TCP RXSOCKET #prompt CL_TCP #help CL_USE_FDNS CL_USE_FDNS defines if the FDNS hack should be used to resolve a gopher hosts IP address or not. Default is NO. YES should be selected if you find it absolutely necessary to circumvent the GetIPAddr() function in REXTCPIP. If RXSOCKET is used, this variable must be set to NO. #endhelp #set CL_USE_FDNS NO # we don't allow this option any longer, it's not necessary ... # prompt CL_USE_FDNS #help CL_USE_LOCALFETCH CL_USE_LOCALFETCH defines if the client should be allowed to access data on the Gopher server's disk, if the server is on the very same host as the client. Localfetch is mainly a trade-off between data-privacy (whatever this means when we speak about a server) and performance. Using localfetch you can also setup a pseudo-server, that is, you provide only gopher data and don't run the server code. YES works if individual clients have read access to the gopher data files. This is needed for pseude servers. NO should work in most cases. Default is NO. #endhelp #set CL_USE_LOCALFETCH NO #prompt CL_USE_LOCALFETCH #help CL_LOCALHOST CL_LOCALHOST containts the IP address of the local machine. This information is only relevant when the option CL_USE_LOCALFETCH is answered with YES. In this case the client will try to read the gopher servers files direclty from his minidisk(s) without establishing a real TCP connection to the server. As fix value enter your machine's IP address. If you don't intend to allow direct access to the servers data you will not need to give the real IP address. Minor bug: if you're using RXSOCKET you should enter your hostname instead of the IP address #endhelp #set CL_LOCALHOST 999.99.9.99 #prompt CL_LOCALHOST #help CL_LANG CL_LANG defines the language that the client uses for messages to the user and help screens. Defined values are: ENGLISH and GERMAN, default is ENGLISH If you want another language included in the client, contact the author. #endhelp #set CL_LANG ENGLISH #prompt CL_LANG #help CL_DEFAULT_HOST CL_DEFAULT_HOST defines the Internet name of the default Gopher server that should be contacted on startup. Usually you will want to declare one of your favorite servers next door but you can of course also use the default value 'gopher.wu-wien.ac.at'. Note: Enter the host name as a quoted string! Default: 'gopher.wu-wien.ac.at' This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set CL_DEFAULT_HOST 'gopher.wu-wien.ac.at' #prompt CL_DEFAULT_HOST #help CL_DEFAULT_PORT CL_DEFAULT_PORT defines the TCP port number at which your Internet Gopher server listens. The 'official' port number is now 70 and so is the default value. Note: the port number must be entered as a quoted string. Default: '70' This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set CL_DEFAULT_PORT '70' #prompt CL_DEFAULT_PORT #help CL_DEFAULT_TYPE CL_DEFAULT_TYPE defines the code for the item type that you'll receive from your Gopher server. According to the protocol, a Gopher server should return a directory, if an empty selector string is sent to the server. The code for directory is '1' and so is the default value for this variable. Note: Values other than '1' are not recommended. Default: '1' This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set CL_DEFAULT_TYPE '1' #prompt CL_DEFAULT_TYPE #help CL_TIME_OUT CL_TIME_OUT defines the time in seconds that the client will wait for the server to respond. After this timeout, the client will simply display a message about the unavailable server. Default value is 15. #endhelp #set CL_TIME_OUT 15 #prompt CL_TIME_OUT #help CL_INFO_LEVEL CL_INFO_LEVEL defines the default level of information that is in effect when the gopher client displays menus or files etc. Currently defined values are: 0 ... no function keys 5 ... two lines of function key description (DEFAULT) 9 ... four lines of function key description This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set CL_INFO_LEVEL 5 #prompt CL_INFO_LEVEL #help CL_CONTACT CL_CONTACT defines the email address of a person that might be able to answer to typical questions of users. The default value 'Gerhard.Gonter@wu-wien.ac.at'. #endhelp #set CL_CONTACT Gerhard.Gonter@wu-wien.ac.at or GONTER@AWIWUW11.bitnet #prompt CL_CONTACT #help CL_TELNET_8 CL_TELNET_8 defines the name of the program for use with Telnet session pointed to by gopher item type 8. Basically, the gopher protocol does not specify, which terminal emulation should be used and it would be a nice feature if the Telnet program could automatically switch to VT100 or 3270 mode as appropriate. Since this is not done by IBM's Telnet you have to trade off between the various disadvantages. A possible choice for CL_TELNET_8 is 'TNVT100 EXEC', Arthur Ecock's VT100 emulater. This program requires TCPIP Version 2 and it might conflict with REXTCPIP in some (most?) installations. Note: Enter the name of the program as a quoted string and specify the filename *AND* the filetype Default: 'TELNET MODULE' This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set CL_TELNET_8 'TELNET MODULE' #prompt CL_TELNET_8 #help CL_TELNET_T CL_TELNET_T defines the name of the program for use with Telnet session pointed to by gopher item type T. Basically, the gopher protocol does not specify, which terminal emulation should be used and it would be a nice feature if the Telnet program could automatically switch to VT100 or 3270 mode as appropriate. Since this is not done by IBM's Telnet you have to trade off between the various disadvantages. Type T is now an official extension to the original Gopher type list and is mostly used for 3270 based telnet sessions. Thus, in most situations the default value 'TELNET MODULE' would be ok. But you have the choice... Note: Enter the name of the program as a quoted string and specify the filename *AND* the filetype Default: 'TELNET MODULE' This setting can be re-defined by the user with the SETUP function in Gopher or by calling GOPHSTP. #endhelp #set CL_TELNET_T 'TELNET MODULE' #prompt CL_TELNET_T # endswitch # this ends the block of fixes for the client modules # This is a block of definitions for the server code. # switch MAKE_SERVER # case YES #section Multi-Threaded Server #erase GOPHERDD EXEC #module GOPHERDD EXEC #subsubsection main init /* ------------------------------------------------------------------- */ REVISION='GOPHERDD EXEC ## ## ##' /* */ /* an experimental multi-threaded multi-protocol daemon for VM/CMS: */ /* 1. GOPHER (protocol description spring 1992) */ /* 2. FINGER (RFC1288 compliant) */ /* 3. COOKIE (RFC865 compliant Quote-of-the-Day) */ #switch USE_SRE #case YES /* 4. S-REP ENGINE (experimental) */ #endswitch /* */ /* Uses: */ /* REXTCPIP MODULE */ #switch SRV_WAKEUP_SYSTEM #case YWAKEUP /* YWAKEUP MODULE */ #case WAKEUP /* WAKEUP MODULE */ #endswitch /* FINGERXX EXEC */ /* COOKIE EXEC */ /* REACCESS EXEC */ /* */ /* written: 1992-05-03: