NSAPI Programmer's Guide for Enterprise Server 4.0
Next | Index | Bookshelf

NSAPI Programmer's Guide for Enterprise Server 4.0


Contents

About This Book

Chapter 1  Basics of Enterprise Server Operation

Configuration Files
magnus.conf
obj.conf
mime.types
How the Server Handles Requests from Clients
HTTP Basics
Steps in the Request Handling Process
Directives for Handling Requests
Using NSAPI to Write New Server Application Functions

Chapter 2  Syntax and Use of Obj.conf

Server Instructions in obj.conf
Summary of the Directives
Object and Client Tags
The Object Tag
The Client Tag
Flow of Control in obj.conf
Init
AuthTrans
NameTrans
PathCheck
ObjectType
Service
AddLog
Error
Syntax Rules for Editing obj.conf
Order of Directives
Parameters
Case Sensitivity
Separators
Quotes
Spaces
Line Continuation
Path Names
Comments

Chapter 3  Predefined SAFS for Each Stage in the Request Handling Process

Init Stage
AuthTrans Stage
NameTrans Stage
PathCheck Stage
ObjectType Stage
Service Stage
AddLog Stage
Error Stage

Chapter 4  Creating Custom SAFs

The SAF Interface
SAF Parameters
pb (parameter block)
sn (session)
rq (request)
Result Codes
Creating and Using Custom SAFs
Write the Source Code
Compile and Link
Load and Initialize the SAF
Instruct the Server to Call the SAFs
Stop and Start the Server
Test the SAF
Overview of NSAPI C Functions
Parameter Block Manipulation Routines
Protocol Utilities for Service SAFs
Memory Management
File I/O
Network I/O
Threads
Utilities
Required Behavior of SAFs for Each Directive
Init SAFs
AuthTrans SAFs
NameTrans SAFs
PathCheck SAFs
ObjectType SAFs
Service SAFs
Error SAFs
AddLog SAFs
CGI to NSAPI Conversion

Chapter 5  NSAPI Function Reference

NSAPI Functions (in Alphabetical Order)

Chapter 6  Examples of Custom SAFsS

Examples in the Build
AuthTrans Example
Installing the Example
Source Code
NameTrans Example
Installing the Example
Source Code
PathCheck Example
Installing the Example
Source Code
ObjectType Example
Installing the Example
Source Code
Service Example
Installing the Example
Source Code
More Complex Service Example
AddLog Example
Installing the Example
Source Code

Appendix A  Data Structure Reference

Privatization of Some Data Structures
session
pblock
pb_entry
pb_param
Session->client
request
stat
shmem_s
cinfo

Appendix B  Variables in magnus.conf

Server Information
Object Configuration File
Language Issues
DNS Lookup
Threads, Processes and Connections
Native Thread Pools
CGI
Error Logging and Statistic Collection
ACL
Security
Miscellaneous

Appendix C  MIME Types

Introduction
Loading the MIME Types File
Determining the MIME Type
How the Type Affects the Response
What Does the Client Do with the MIME Type?
Syntax of the MIME Types File
Sample MIME Types File

Appendix D  Wildcard Patterns

Wildcard Patterns
Wildcard Examples

Appendix E  Time Formats

Appendix F  Server-Parsed HTML Tags

Using Server-Parsed Commands
config
include
echo
fsize
flastmod
exec
Environment Variables in Commands

Appendix G  HyperText Transfer Protocol

Introduction
Requests
Request Method, URI, and Protocol Version
Request Headers
Request Data
Responses
HTTP Protocol Version, Status Code, and Reason Phrase
Response Headers
Response Data

Appendix H  Alphabetical List of NSAPI Functions and Macros

Appendix I  Alphabetical List of Directives in magnus.conf

Appendix J  Alphabetical List of Pre-defined SAFs

Index


Next | Index | Bookshelf

Last Updated: 08/12/99 14:32:19

Copyright © 1999 Netscape Communications Corporation