# WASD HTTP Server -"Nuts and Bolts"

## 3 - HTTPd Modules

> 3.1 - ADMIN.C
> 3.2 - AUTH.C
> 3.3 - AUTHAGENT.C
> 3.4 - AUTHCACHE.C
> 3.5 - AUTHCONFIG.C
> 3.6 - AUTHHTA.C
> 3.7 - AUTHHTL.C
> 3.8 - AUTHVMS.C
> 3.9 - BASIC.C
> 3.10 - CACHE.C
> 3.11 - CGI.C
> 3.12 - CLI.C
> 3.13 - CONTROL.C
> 3.14 - CONFIG.C
> 3.15 - DCL.C
> 3.16 - DECNET.C
> 3.17 - DESCR.C
> 3.18 - DIGEST.C
> 3.19 - DIR.C
> 3.20 - ERROR.C
> 3.21 - FILE.C
> 3.22 - GRAPH.C
> 3.23 - HTADMIN.C
> 3.24 - HTTPD.C
> 3.25 - ISMAP.C
> 3.26 - LOGGING.C
> 3.27 - MAPURL.C
> 3.28 - MD5.C
> 3.29 - MENU.C
> 3.30 - MSG.C
> 3.31 - NET.C
> 3.32 - ODS.C
> 3.33 - PERSONA.C
> 3.34 - PROXY.C
> 3.35 - PROXYCACHE.C
> 3.36 - PROXYMAINT.C
> 3.37 - PUT.C
> 3.38 - REQUEST.C
> 3.39 - SESOLA.C
> 3.40 - SSI.C
> 3.41 - STMLF.C
> 3.42 - SUPPORT.C
> 3.43 - TRACK.C
> 3.44 - UPD.C
> 3.45 - VERSION.C
> 3.46 - VM.C
> 3.47 - WATCH.C

[next] [previous] [contents] [full-page]

The HTTPd server comprises several main modules, implementing the obvious functionality of the server, and other, smaller, support modules. Most modules contains descriptive prologues. As these are usually up-to-date (usually more-so than discrete documentation such as this text anyway), it is recommended that the source code modules be consulted for specific information on how each operates.

All files are located in HT_ROOT:[SRC.HTTPD]

###
WASD.H

This C header file contains many of the general data structures and macros required for the HTTPd.

WASD.H

###
ENAMEL.H

This header is used to work-around the issue of older versions of VMS and DECC not having a long NAM structure or definitions used to support ODS-5. For the same reason an extended FIB structure definition must be provided. For such environments this header file provides the necessary infrastructure, allowing extended file specification compliant code to be compiled and linked on pre-v7.2 systems. Also see 3.32 - ODS.C.

ENAMEL.H

###
3.1 - ADMIN.C

Server administration is based in this module, although other modules provide their own functions for implementing menus, reports and actions.

ADMIN.C
ADMIN.H

###
3.2 - AUTH.C

This module provides path-based authorization and authentication. Uses the HTTPD$AUTH file as the source of configuration information. This module uses the other AUTHxxxxxx.C modules to provide particular required functionalities.

AUTH.C
AUTH.H

###
3.3 - AUTHAGENT.C

Provide authentication and authorization information from an external, CGIplus-based script.

AUTHAGENT.C

###
3.4 - AUTHCACHE.C

Provides the caching of authentication/authorization information so that the sources do not need to be accessed for every request.

AUTHCACHE.C

###
3.5 - AUTHCONFIG.C

Loads authorization configuration information from the HTTPD$CONFIG file into a data structure that the HTTPd then uses during authorization.

AUTHCONFIG.C

###
3.6 - AUTHHTA.C

Accesses information stored in binary authentication databases (files).

AUTHHTA.C

###
3.7 - AUTHHTL.C

Accesses information stored in plain-text authentication files.

AUTHHTL.C

###
3.8 - AUTHVMS.C

Accesses authentication and authorization information from the system's SYSUAF and RIGHTSLIST databases.

AUTHVMS.C

###
3.9 - BASIC.C

Implmentation of the "BASIC" HTTP authentication scheme are implemented in this module.

BASIC.C
BASIC.H

###
3.10 - CACHE.C

This module implements a file data and revision time cache, designed to provided an efficient static document request (file transfer) mechanism.

CACHE.C
CACHE.H

###
3.11 - CGI.C

The CGI module provides the CGI scripting support functions used by the DCL.C and DECNET.C modules.

CGI.C
CGI.H

###
3.12 - CLI.C

Module to process (interpret) the HTTPD command-line.

CLI.C
CLI.H

###
3.13 - CONTROL.C

This module implements the HTTPd command-line control functionality. At the command-line an administrator may enter HTTP/DO=command. This is written to the HTTPd via a mailbox, interpreted and the requested action taken or an error message sent back to the administrator.

CONTROL.C
CONTROL.H

###
3.14 - CONFIG.C

This module provides basic server and service configuration. Uses the HTTPD$CONFIG file as the source of configuration information.

CONFIG.C
CONFIG.H

###
3.15 - DCL.C

The DCL execution functionality must interface and coordinate with an external subprocess. Supports CGI and CGIplus scripting and SSI DCL-processed directives.

DCL.C
DCL.H

###
3.16 - DECNET.C

The DECnet module provides scripting based on process management using DECnet. Both standard WASD CGI scripting and an emulation of OSU (DECthreads) scripting are supported.

DECNET.C
DECNET.H

###
3.17 - DESCR.C

The Descr.c module generates a file description by searching HTML files for the first occurance of <TITLE>...</TITLE> or <Hn>...</Hn> tags, using the description provided there-in. It is primarily used by the directory listing module, but can also be used by the menu module.

DESCR.C
DESCR.H

###
3.18 - DIGEST.C

This module provides authentication functionality for the DIGEST method.

DIGEST.C
DIGEST.H

###
3.19 - DIR.C

This module implements the HTTPd directory listing (Index-of) functionality.

DIR.C
DIR.H

###
3.20 - ERROR.C

Error generating and reporting functions.

ERROR.C
ERROR.H

###
3.21 - FILE.C

This module implements the static file transfer functionality.

FILE.C
FILE.H

###
3.22 - GRAPH.C

This module generates the server activity graph.

GRAPH.C
GRAPH.H

###
3.23 - HTADMIN.C

This module allows on-line administration of the HTTPd-specific authentication (.HTA) databases.

HTADMIN.C
HTADMIN.H

###
3.24 - HTTPD.C

This is the main() module of the server. It performs server startup and shutdown, along with other miscellaneous functionality.

HTTPD.C
HTTPD.H

###
3.25 - ISMAP.C

The clickable-image support module provides this functionality as an integrated part of the server. It supports image configuration file directives in either of NCSA or CERN formats.

ISMAP.C
ISMAP.H

###
3.26 - LOGGING.C

The logging module provides an access log (server logs, including error messages are generated by the detached HTTPd process. The access log format can be that of the Web-standard, "common"-format, "common+server"-format or "combined"-format, along with user-definable formats, allowing processing by most log-analysis tools.

LOGGING.C
LOGGING.H

###
3.27 - MAPURL.C

Module supporting mapping of URLs to VMS file specifications and VMS specifications to URLs, setting specified characteristics agaionst paths, etc. Uses the HTTPD$MAP file as the source of configuration information.

MAPURL.C
MAPURL.H

###
3.28 - MD5.C

Module providing MD5 digest code from RFC1321. This is used to generated "digests" (or unique fingerprints of sequences of bytes and strings) for use in authorization and the generation of file names in proxy caching.

MD5.C
MD5.H

###
3.29 - MENU.C

This module implements the WASD menu interpretation functionality.

MENU.C
MENU.H

###
3.30 - MSG.C

The message database for the server is maintained by this module. Uses the HTTPD$MSG file as the source of configuration information.

MSG.C
MSG.H

###
3.31 - NET.C

This module handles all TCP/IP network activites, from creating the server socket and listening on the port, to reading and writing network I/O. It manages request initiation and rundown, and controls connection persistence.

It supports both the Digital TCP/IP Services (UCX) and MadGoat NETLIB network agents. The excellent MagdGoat freeware tool provides a generic, asynchronous interface to a number of underlying TCP/IP packages. It behaves in much the same manner as the $QIO interface and so dove-tails perfectly into this server.

NET.C
NET.H

###
3.32 - ODS.C

This module supports file system access for both ODS-2 and where appropriate (Alpha VMS v7.2ff) ODS-5.

It does this by abstracting the NAM block so that either the standard or long formats may be used without other modules needing to be aware of the underlying structure. The VAX version does not need to know about long NAMs, or extended file specifications in general (excluded for code compactness and minor efficiency reasons using the ODS_EXTENDED macro). Alpha versions prior to 7.2 do not know about NAMLs and so for compilation in these environments a compatible NAML is provided (ENAMEL.H header file, see ENAMEL.H), allowing extended file specification compliant code to be compiled and linked on pre-v7.2 systems.

Runtime decision structures based on the VMS version, device ACP type, etc., must be used if pre-v7.2 systems are to avoid using the NAML structure with RMS (which would of course result in runtime errors). In this way a single set of base-level Alpha object modules, built in either environment, will support both pre and post 7.2 environments.

ODS.C
ODS.H

###
3.33 - PERSONA.C

For VMS V6.2 and later provides access to the $PERSONA services allowing the server to create scripting processes executing under user accounts other than itself (see DCL.C). For VMS versions not supporting the $PERSONA services (earlier than V6.2) it creates stubs allowing the module to be linked but just returning a status indicating it is not available.

PERSONA.C
PERSONA.H

###
3.34 - PROXY.C

All data structures and general macros, etc., for proxy processing are located in the following header file.

PROXYSTRUCT.H

Provides the request and network functionality for proxy HTTP and HTTPS serving.

PROXY.C
PROXY.H

###
3.35 - PROXYCACHE.C

Implements a basic HTTP proxy disk caching service. The design always trades simplicity off against efficiency and elegance. Cache management is performed by the PROXYMAINT.C module. It works intimately with this module to provide routine and reactive purging (deletion) of cache files to maintain device free space and currency of cache content.

PROXYCACHE.C
PROXYCACHE.H

###
3.36 - PROXYMAINT.C

See PROXYCACHE.C above.

PROXYMAINT.C
PROXYMAINT.H

###
3.37 - PUT.C

The PUT module allows files to be uploaded to, and stored by, the server. It also allows the deletion of files, and the creation and deletion of directories. This same module handles PUT, POST and DELETE methods appropriately. It requires authorization to be enabled on the server.

PUT.C
PUT.H

###
3.38 - REQUEST.C

This module reads the request header from the client, parses this, and then calls the appropriate task function to execute the request (i.e. send a file, SSI an HTML file, generate a directory listing, execute a script, etc.)

REQUEST.C
REQUEST.H

###
3.39 - SESOLA.C

This module provides the optional Secure Sockets Layer (SSL) encrypted communication link functionality for WASD and is named "SeSoLa" to avoid any confusion and/or conflict with OpenSSL package library routines.

SESOLA.C
SESOLA.H

###
3.40 - SSI.C

The Server Side Includes (HTML pre-processor) module provides this functionality as an integrated part of the server.

SSI.C
SSI.H

###
3.41 - STMLF.C

The stmLF.c module converts VARIABLE format records to STREAM-LF. It is only called from the File.c module and only then when STREAM-LF conversion is enabled within the server configuration.

STMLF.C
STMLF.H

###
3.42 - SUPPORT.C

The support module provides a number of miscellaneous support functions for the HTTPd (well go-o-o-lee!).

SUPPORT.C
SUPPORT.H

###
3.43 - TRACK.C

Provides session tracking functions.

TRACK.C
TRACK.H

###
3.44 - UPD.C

Implements the on-line web directory administration and file editing and upload facility. It requires authorization to be enabled on the server. File and directory modification are still performed by the Put.c module. The Upd.c is an overly large body of code generating all of the dialogues and editing pages. It also provides additional functionality for the server administration, adding admin-specific portions of dialogues as required.

UPD.C
UPD.H

###
3.45 - VERSION.C

The VERSION module merely provides a small, convenient place to generate some build information.

VERSION.C
VERSION.H

###
3.46 - VM.C

The virtual memory management module provides dynamic memory allocation and deallocation functions. These functions use the VMS system library virtual memory routines. Also see general comments in 2.5 - Memory Management.

VM.C
VM.H

###
3.47 - WATCH.C

The WATCH facility provides an online, real-time, in-browser-window view of request processing in the running server.

WATCH.C
WATCH.H

[next] [previous] [contents] [full-page]