Table of Contents | Previous | Bookshelf

NSAPI Programmer's Guide for iPlanet Web Server
    

Index

A

abbrev, value of sizefmt attribute 248
about this book 9
AcceptLanguage
magnus.conf directive 219
access
logging 104, 105
access control lists
see also ACLs
ACLFile
magnus.conf directive 228
ACLs
settings in magnus.conf 228
add-footer
Service-class function 91
add-header
Service-class function 91
AddLog 15
example of custom SAF 204
flow of control 34
requirements for SAFs 128
summary 22
AddLog directive
obj.conf 104
Address
magnus.conf directive 214
AdminLanguage
magnus.conf directive 219
alphabetical reference
magnus.conf variables 267
NSAPI functions 131
SAFs 271
API functions
cif_find 132
condvar_init 133
condvar_notify 133
condvar_terminate 134
condvar_wait 134
crit_enter 134
crit_exit 135
crit_init 135
crit_terminate 136
daemon_atrestart 136
filebuf_buf2sd 137
filebuf_close 137
filebuf_getc 138
filebuf_open 138
filebuf_open_nostat 139
FREE 139
func_exec 140
func_find 140
log_error 141
magnus_atrestart 142
MALLOC 132, 142
net_ip2host 143
net_read 143
net_socket 187
net_write 144
netbuf_buf2sd 144
netbuf_close 145
netbuf_getc 145
netbuf_grab 145
netbuf_open 146
param_create 146
param_free 147
pblock_copy 147
pblock_create 147
pblock_dup 148
pblock_find 148
pblock_findval 149
pblock_free 149
pblock_nninsert 149
pblock_nvinsert 150
pblock_pb2env 150
pblock_pblock2str 151
pblock_pinsert 151
pblock_remove 152
pblock_str2pblock 152
PERM_FREE 153
PERM_MALLOC 153, 154
PERM_STRDUP 155
protocol_dump822 155
protocol_set_finfo 156
protocol_start_response 156
protocol_status 157
protocol_uri2url 158, 159
REALLOC 160
request_header 160
request_stat_path 161
request_translate_uri 162
session_maxdns 162
shexp_casecmp 162
shexp_cmp 163
shexp_match 164
shexp_valid 164
STRDUP 165
system_errmsg 165
system_fclose 166
system_flock 166
system_fopenRO 166
system_fopenRW 167
system_fopenWA 167
system_fread 168
system_fwrite 168
system_fwrite_atomic 169
system_gmtime 169
system_localtime 170
system_lseek 170
system_rename 171
system_ulock 170, 171
system_unix2local 172
systhread_current 172
systhread_getdata 173
systhread_newkey 173
systhread_setdata 174
systhread_sleep 174
systhread_start 174
systhread_terminate 175
systhread_timerset 175
util_can_exec 176
util_chdir2path 176, 177
util_cookie_find 177
util_env_find 177
util_env_free 178
util_env_replace 178
util_env_str 179
util_getline 179
util_hostname 180
util_is_mozilla 180
util_is_url 180
util_itoa 181
util_later_than 181
util_sh_escape 181
util_snprintf 182
util_strcasecmp 183
util_strftime 183
util_strncasecmp 184
util_uri_escape 185
util_uri_is_evil 185
util_uri_parse 186
util_uri_unescape 186
util_vsnprintf 186
util_vsprintf 187
util-cookie_find 177
util-sprintf 182
append-trailer
Service-class function 92
assign-name
NameTrans-class function 65
AsyncDNS
magnus.conf directive 220
AUTH_TYPE environment variable 128
AUTH_USER environment variable 128
AuthTrans 15
directive, full description 61
example of custom SAF 191
flow of control 27
requirements for SAFs 125
summary 20
auth-type function 62, 63

B

basic-auth
AuthTrans-class function 62
basic-ncsa
AuthTrans-class function 63
basics
of server operation 11
BlockingListenSockets
magnus.conf directive 221
browsers 13
buffered streams 258
builtin SAFs, core SAFs 39
bytes, value of sizefmt attribute 248

C

cache
enabling memory allocation pool 58
for static files 42, 101
cache-init
Init-class function 42
case sensitivity
in obj.conf 36
catch-all
Service directive 34
cert2user
PathCheck-class function 73
certificates
settings in magnus.conf 229
CGI
environment variables in NSAPI 128
settings in magnus.conf 225
to NSAPI conversion 128
cgi attribute of the exec command 250
CGIExpirationTimeout
magnus.conf directive 226
CGIWaitPid
magnus.conf directive 226
charset
defining default 86
check-acl
PathCheck-class function 74
checking
secret keys 83
Chroot
magnus.conf directive 229
chunked encoding 233
ChunkedRequestBufferSize
magnus.conf directive 234
ChunkedRequestTimeout
magnus.conf directive 234
cif_find
API function 132
cindex-ini
Init-class function 45
cinfo
NSAPI data structure 211
cinfo_find
API function 132
Ciphers
magnus.conf directive 230
client
CLIENT tag 25
field in session parameter 111
getting DNS name for 210
getting IP address for 210
requests 13
sessions and 208
CLIENT_CERT environment variable 129
ClientLanguage
magnus.conf directive 219
CLIENT tag 25
cmd attribute of the exec command 250
comments
in obj.conf 37
common-log
Service-class function 104
Common Log subsystem, initializing 54
compiling
custom SAFs 116
Concurrency
magnus.conf directive 214
condvar_init
API function 133
condvar_notify
API function 133
condvar_terminate
API function 134
condvar_wait
API function 134
config command
server-parsed HTML 248
config directory
location 12
configuration files 12
location 12
connectons
settings in magnus.conf 220
CONTENT_LENGTH environment variable 128
CONTENT_TYPE environment variable 128
content-encoding
defining default 86
content-language
defining default 86
creating
custom SAFs 109
crit_enter
API function 134
crit_exit
API function 135
crit_init
API function 135
crit_terminate
API function 136
csd
field in session parameter 111
custom SAFs
creating 109

D

daemon_atrestart
API function 136
DaemonStats
magnus.conf directive 226
data structures
NSAPI reference 207
DATE_GMT
server parsed variable 251
DATE_LOCAL
server parsed variable 250
Day of month 245
default
Service directive 34
DefaultLanguage
magnus.conf directive 219
defining
custom SAFs 109
deny-existence
PathCheck-class function 74
directive_is_cacheable
field in request parameter 112
directives
for handling requests 16
in obj.conf 39
magnus.conf 213
order of 35
SAFs for each directive 124
summary for obj.conf 20
syntax in obj.conf 20
DNS
magnus.conf directive 220
dns-cache-init 47
DNS lookup
directives in magnus.conf 220
DNS names
getting clients 210
DOCUMENT_NAME
server parsed variable 250
DOCUMENT_URI
server parsed variable 250
document-root 67
documents
file typing 88
dynamic link library, loading 56

E

echo command
server-parsed HTML 249
enc 236
encoding
chunked 233
Enterprise Server
see server
environment variables
and init-cgi function 54
CGI to NSAPI conversion 128
in server-prased commands 250
errmsg attribute of config command 248
Error 16
Error directive
flow of control 35
obj.conf 107
requirements for SAFs 127
summary 23
ErrorLog
magnus.conf directive 227
error logging
settings in magnus.conf 226
errors
finding most recent system error 165
sending customized messages 108
examples
location in the build 190
of custom SAFs (plugins) 189
of custom SAFs in the build 190
wildcard patterns 242
exec command
server-parsed HTML 250

F

fancy indexing 45
file attribute of include command 249
filebuf_buf2sd
API function 137
filebuf_close
API function 137
filebuf_getc
API function 138
filebuf_open
API function 138
filebuf_open_nostat
API function 139
file cache 42
and logging 50
initializing 42
file descriptor
closing 166
locking 166
opening read-only 166
opening read-write 167
opening write-append 167
reading into a buffer 168
unlocking 170, 171
writing from a buffer 168
writing without interruption 169
file I/O routines 123
file name extensions
mapping to MIME types 57
MIME types 235
object type 30
files
forcing type of 86
mapping types of 235
typing 88
typing by wildcard pattern 87
file types 86
find-index
PathCheck-class function 75
find-links
PathCheck-class function 76
find-pathinfo
PathCheck-class function 76
flastmod command
affected by timefmt attribute 248
server-parsed HTML 250
flexible logging 47
flex-init
Init-class function 47
flex-log
AddLog-class function 105
flex-rotate-init
Init-class function 53
flow of control 26
flushTimer
magnus.conf directive 233
fn argument
in directives in obj.conf 20
footers
adding 91
force-type 31
example 31
ObjectType-class function 85
forcing
object type 30
formats
time 245
forward slashes 37
FREE
API function 139
fsize command
server-parsed HTML 249
func_exec
API function 140
func_find
API function 140
funcs 117
funcs parameter 56
functions
pre-defined SAFs 39
see also SAFs

G

GATEWAY_INTERFACE environment variable 128
GET
method 89
get-client-cert
PathCheck-class function 77
GMT time
getting thread-safe value 169
-G option 116

H

hard links, finding 76
HEAD
method 89
header files
nsapi.h 116, 207
headers 14
adding 91
field in request parameter 112
home-page 68
HOST environment variable 129
HTML tags
server-parsed 247
HTTP 253
basics 14
compliance with 1.1 254
requests 254
responses 255
HTTP_* environment variable 128
HTTP method
registering 59
HTTPS_KEYSIZE environment variable 129
HTTPS_SECRETKEYSIZE environment variable 129
HTTPS environment variable 129
HUP signal
Chroot and 229
PidLog and 227
HyperText Transfer Protocol
see HTTP

I

imagemap
Service-class function 93
include command
server-parsed HTML 249
include directory
for SAFs 116
index-common
Service-class function 94
indexing
fancy 45
index-simple
Service-class function 95
Init
flow of control 26
obj.conf directive 41
requirements for SAFs 125
summary 20
init-cgi 54
Init-class function 47, 54
init-clf
Init-class function 54
initializing
global settings 213
plugins 117
SAFs 117
initializing for CGI 54
init-uhome
Init-class function 55
IP address
getting clients 210
iPlanet Web Server
see server
iPlanet Web Server Administrator's Guide 222, 223
iponly function 105, 106

K

KeepAliveTimeout
magnus.conf directive 221
KernelThreads
magnus.conf directive 221
key-toosmall
Service-class function 96

L

lang 236
language issues
directives in magnus.conf 218
LAST_MODIFIED
server parsed variable 251
LateInit parameter to Init directive 42
line continuation 37
linking
SAFs 116
list-dir
Service-class function 96
ListenQ
magnus.conf directive 222
load-config
PathCheck-class function 79
loading
custom SAFs 117
MIME types file 236
plugins 117
SAFs 117
load-modules 117
example 118
Init-class function 56
LoadObjects
magnus.conf directive 217
load-types
Init-class function 57
localtime
getting thread-safe value 170
local-types parameter 58
log_error
API function 141
log analyzer 104, 105
log file 104, 105
analyzer for 104, 105
log format 49
logging
cookies 50
flexible 47
impact on cache acceleration 50
relaxed mode 49
rotating logs 53
settings in magnus.conf 226
LogVerbose
magnus.conf directive 227

M

magnus.conf 12, 213
alphabetical list of directives 267
directives in 213
magnus_atrestart
API function 142
make-dir
Service-class function 97
Makefile file 116
MALLOC
API function 132, 142
matching
special characters 241
MaxKeepAliveConnections
magnus.conf directive 222
MaxProcs
magnus.conf directive 222
memory allocation, pool-init Init-class function 58
memory management routines 122
method 14
server and 89
mime.types 13
mime.types file 235, 236
sample of 239
MIME types 235
mapping from file name extensions 57
typing files 88
MIME types file
loading 236
syntax 238
MIME-types parameter 58
month name 245
mozilla-redirect 69
MtaHost
magnus.conf directive 215

N

name attribute
in obj.conf objects 23
in objects 24
NameTrans 15
directive in obj.conf 65
example of custom SAF 193
flow of control 27
requirements for SAFs 126
summary 21
NameTrans-class function 67, 68, 69
NativePoolMaxThreads
magnus.conf directive 225
NativePoolMinThreads
magnus.conf directive 225
NativePoolQueueSize
magnus.conf directive 225
NativePoolStackSize
magnus.conf directive 224
NativeThread 60
NativeThread parameter to Init directive 57
native thread pools
defining in obj.conf 59
settings in magnus.conf 224
NativeThreads 247
net_ip2host
API function 143
net_read
API function 143
net_socket
API function 187
net_write
API function 144
netbuf_buf2sd
API function 144
netbuf_close
API function 145
netbuf_getc
API function 145
netbuf_grab
API function 145
netbuf_open
API function 146
network I/O routines 123
NSAPI
alphabetical function reference
functions NSAPI reference 131

CGI environment variables 128
data structures reference 207
using 16
nsapi.h 116, 207
location 116
overview of data structures 207
NSAPI functions
overview 120
NSCP_POOL_STACKSIZE 224
NSCP_POOL_THREADMAX 224
NSCP_POOL_WORKQUEUEMAX 224
nshttpd3x.lib 116
nshttpd40.lib 116
ntcgicheck
PathCheck-class function 82
ntrans-base 66, 67, 69, 77
nt-uri-clean
PathCheck-class function 81

O

obj.conf 12
adding directives for new SAFs 118
case sensitivity 36
CLIENT tag 25
comments 37
directives 19, 39
directives summary 20
directive syntax 20
flow of control 26
OBJECT tag 23
parameters for directives 36
processinng other objects 28
server instructions 19
syntax rules 35
use 19
object
default,
specifying 218
object configuration file
specifying in magnus.conf 217
objects
processing non-default objects 28
OBJECT tag 23
name attribute 23
ppath attribute 23
ObjectType 15
directive in obj.conf 85
example of custom SAF 199
flow of control 29
requirements for SAFs 127
summary 21
object type
forcing 30
setting by file extension 30
order
of directives in obj.conf 35
overview
server operation 11

P

param_create
API function 146
param_free
API function 147
parameter block
manipulation routines 121
SAF parameter 110
parameters
for obj.conf directives 36
for SAFs 110
parse-html
Service-class function 98
path
absolute with Chroot directive 229
PATH_INFO environment variable 128
PATH_TRANSLATED environment variable 128
PathCheck 15
directive in obj.conf 72
example of custom SAF 196
flow of control 29
requirements for SAFs 126
summary 21
path name
converting Unix-style to local 172
path names 37
patterns 241
pb
SAF parameter 110
pb_entry
NSAPI data structure 209
pb_param
NSAPI data structure 209
pblock
NSAPI data structure 209
see parameter block
pblock_copy
API function 147
pblock_create
API function 147
pblock_dup
API function 148
pblock_find
API function 148
pblock_findval
API function 149
pblock_free
API function 149
pblock_nninsert
API function 149
pblock_nvinsert
API function 150
pblock_pb2env
API function 150
pblock_pblock2str
API function 151
pblock_pinsert
API function 151
pblock_remove
API function 152
pblock_str2pblock
API function 152
PERM_FREE
API function 153
PERM_MALLOC
API function 153, 154
PERM_STRDUP
API function 155
pfx2dir 69
example 28
NameTrans-class function 69
PidLog
magnus.conf directive 227
plugins
creating 109
example of new plugins 189
instructing the server to use 118
loading and initializing 117
pool-init Init-class function 58
port
magnus.conf directive 215
specifying 215
POST
method 89
PostThreadsEarly
magnus.conf directive 222
ppath attribute
in obj.conf objects 23
in objects 25
predefined SAFs 39
preface 9
processes
settings in magnus.conf 220
processing
non-default objects 28
protocol_dump822
API function 155
protocol_set_finfo
API function 156
protocol_start_response
API function 156
protocol_status
API function 157
protocol_uri2url
API function 158, 159
protocol utility routines 122

Q

QUERY_STRING_UNESCAPED
server parsed variable 250
QUERY_STRING environment variable 129
QUERY environment variable 129
query-handler
Service-class function 98
quotes 36

R

RcvBufSize
magnus.conf directive 222
REALLOC
API function 160
record-useragent
Service-class function 106
redirect
NameTrans-class function 70
reference
NSAPI data structures 207
NSAPI functions 131
register-http-method Init-class function 59
relaxed logging 49
relink_36plugin file 116
REMOTE_ADDR environment variable 129
REMOTE_HOST environment variable 129
REMOTE_IDENT environment variable 129
REMOTE_USER environment variable 129
remove-dir
Service-class function 99
remove-file
Service-class function 99
rename-file
Service-class function 100
REQ_ABORTED
response code 114
REQ_EXIT
response code 114
REQ_NOACTION
response code 113
REQ_PROCEED
response code 113
reqpb
field in request parameter 112
request
NSAPI data structure 210
SAF parameter 111
REQUEST_METHOD environment variable 129
request_stat_path
API function 161
request_translate_uri
API function 162
request-handling process 13
flow of control 26
steps 15
request-header
API function 160
request-response process 13
see request-handling process
requests
directives for handling 16
how server handles 13
HTTP 254
methods 14
steps in handling 15
require-auth
PathCheck-class function 82
responses, HTTP 255
result codes 113
RootObject
magnus.conf directive 218
rotating logs 53
rq
SAF parameter 111
rq->directive_is_cacheable 112
rq->headers 112
rq->reqpb 112
rq->srvhdrs 112
rq->vars 112
RqThrottle
magnus.conf directive 222
RqThrottleMinPerSocket
magnus.conf directive 223
rules
for editing obj.conf 35

S

SAFs
alphabetical list 271
compiling and linking 116
creating 109
examples of custom SAFs 189
for each directive 124
include directory 116
interface 110
loading and initializing 117
parameters 110
predefined 39
result codes 113
return values 113
signature 110
writing new 16
SCRIPT_NAME environment variable 129
search patterns 241
secret keys
checking 83
Security
magnus.conf directive 230
security
constraining the server 229
settings in mangus.conf 229
send-cgi
Service-class function 100
send-error
Error-class function 107
send-file
Service-class function 101
send-range
Service-class function 102
send-shellcgi
Service-class function 103
send-wincgi
Service-class function 103
separators 36
server
constraining 229
flow of control 26
HUP signal 227
initialization variables in magnus.conf 213
initializing 41
instructions for using plugins 118
instructions in obj.conf 19
killing process of 227
modifying 11
processing non-default objects 28
request handling 13
TERM signal 227
SERVER_NAME environment variable 129
SERVER_PORT environment variable 129
SERVER_PROTOCOL environment variable 129
SERVER_SOFTWARE environment variable 129
SERVER_URL environment variable 129
Server Application Functions
see SAFs
ServerCert
magnus.conf directive 230
ServerID
magnus.conf directive 215
server information
magnus.conf directives 214
ServerKey
magnus.conf directive 231
ServerName
magnus.conf directive 215
server-parsed HTML tags 247
ServerRoot
magnus.conf directive 216
server-side
HTML tags 247
includes 247
Service 15
default directive 34
directive in obj.conf 89
directives for new SAFs (plugins) 119
example of custom SAF 202
examples 32
flow of control 31
requirements for SAFs 127
summary 22
session
defined 208
NSAPI data structure 208
resolving the IP address of 162
SAF parameter 111
Session->client
NSAPI data structure 210
session_maxdns
API function 162
set-default-type
ObjectType-class function 86
shared library, loading 56
shell expression
comparing (case-blind) to a string 162
comparing (case-sensitive) to a string 163, 164
validating 164
shexp_casecmp
API function 162
shexp_cmp
API function 163
shexp_match
API function 164
shexp_valid
API function 164
shlib 117
shlib parameter 56
shmem_s
NSAPI data structure 211
shtml_init 247
shtml_send 247
shtml-hacktype
ObjectType-class function 87
sizefmt attribute of config command 248
sn
SAF parameter 111
sn->client 111
sn->csd 111
SndBufSize
magnus.conf directive 223
socket
closing 145
opening connection to 187
reading from 143
sending a buffer to 144
sending file buffer to 137
writing to 144
spaces 37
special characters 241
sprintf, see util_sprintf 182
srvhdrs
field in request parameter 112
SSL
settings in magnus.conf 229
SSL2
magnus.conf directive 232
SSL3Ciphers
magnus.conf directive 232
SSL3SessionTimeout
magnus.conf directive 232
SSLCacheEntries
magnus.conf directive 231
ssl-check
PathCheck-class function 83
SSLClientAuth
magnus.conf directive 231
SSLSessionTimeout
magnus.conf directive 231
StackSize
magnus.conf directive 223
stat
structure 211
statistic collection
settings in magnus.conf 226
STRDUP
API function 165
streams
buffered 258
StrictHttpHeaders
magnus.conf directive 223
string
creating a copy of 165
symbolic links
finding 76
syntax
directives in obj.conf 20
for editing obj.conf 35
MIME types file 238
system 171
system_errmsg
API function 165
system_fclose
API function 166
system_flock
API function 166
system_fopenRO
API function 166
system_fopenRW
API function 167
system_fopenWA
API function 167
system_fread
API function 168
system_fwrite
API function 168
system_fwrite_atomic
API function 169
system_gmtime
API function 169
system_localtime
API function 170
system_lseek
API function 170
system_rename
API function 171
system_ulock
API function 170, 171
system_unix2local
API function 172
systhread_current
API function 172
systhread_getdata
API function 173
systhread_newkey
API function 173
systhread_setdata
API function 174
systhread_sleep
API function 174
systhread_start
API function 174
systhread_terminate
API function 175
systhread_timerset
API function 175

T

TerminateTimeout
magnus.conf directive 223
TERM signal 227
thread
allocating a key for 173
creating 174
getting a pointer to 172
getting data belonging to 173
putting to sleep 174
setting data belonging to 174
setting interrupt timer 175
terminating 175
thread-pool-init Init-class function 59
thread pools
defining in obj.conf 59
settings in magnus.conf 224
thread routines 123
threads
settings in magnus.conf 220
timefmt tag 248
time formats 245
trailers
appending 92
type
content-type 236
type-by-exp
ObjectType-class function 87
type-by-extension 236
ObjectType-class function 88

U

Umask
magnus.conf directive 234
Unix
constraining the server 229
unix-home
NameTrans-class function 71
unix-uri-clean
PathCheck-class function 84
Unix user account
specifying 216
upload-file
Service-class function 103
URL
mapping to other servers 69
translated to file path 21
UseOutputStreamSize
magnus.conf directive 233
User
magnus.conf directive 216
user account
specifying 216
user home directories
symlinks and 76
util_can_exec
API function 176
util_chdir2path
API function 176, 177
util_cookie_find
API function 177
util_env_find
API function 177
util_env_free
API function 178
util_env_replace
API function 178
util_env_str
API function 179
util_getline
API function 179
util_hostname
API function 180
util_is_mozilla
API function 180
util_is_url
API function 180
util_itoa
API function 181
util_later_than
API function 181
util_sh_escape
API function 181
util_snprintf
API function 182
util_sprintf
API function 182
util_strcasecmp
API function 183
util_strftime 245
API function 183
util_strncasecmp
API function 184
util_uri_escape
API function 185
util_uri_is_evil
API function 185
util_uri_parse
API function 186
util_uri_unescape
API function 186
util_vsnprintf
API function 186
util_vsprintf
API function 187
utility routines 124

V

variables
magnus.conf 213
vars
field in request parameter 112
virtual attribute of the include command 249
VirtualServerFile
magnus.conf directive 217
vsnprintf, see util_vsnprintf 186
vsprintf, see util_vsprintf 187

W

weekday 245
wildcard patterns 241
file typing and 87

Table of Contents | Previous | Bookshelf

Last Updated: 03/01/00 09:22:29

© Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.