Compile And Link - Netscape ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

Creating and Using Custom SAFs
Enterprise ServerIf necessary, write an initialization function that performs
initialization tasks required by your new SAFs. The initialization function has the
same signature as other SAFs:
pb
sn
rq
int function(pblock *
, Session *
, Request *
);
SAFs expect to be able to obtain certain types of information from their parameters.
In most cases, parameter block (
) data structures provide the fundamental
pblock
storage mechanism for these parameters A
maintains its data as a collection
pblock
of name-value pairs. For a summary of the most commonly used functions for
working with
structures, see "Parameter Block Manipulation Routines," on
pblock
page 124.
When defining a SAF, you do not specifically state which directive it is written for.
However, each SAF must be written for a specific directive (such as
,
AuthTrans
, and so on). Each directive expects its SAFs to do particular things, and
Service
your SAF must conform to the expectations of the directive for which it was
written. For details of what each directive expects of its SAFs, see the section
"Required Behavior of SAFs for Each Directive," on page 128.

Compile and Link

Compile and link your code with the native compiler for the target platform. For
UNIX, use the
command. For Windows NT, use the
command. For
gmake
nmake
Windows NT, use Microsoft® Visual C++® 6.0 or newer. You must have an import
list that specifies all global variables and functions to access from the server binary.
Use the correct compiler and linker flags for your platform. See the example
Makefile in the directory:
server_root
/plugins/nsapi/examples
Follow these guidelines for compiling and linking.
Include Directory and nsapi.h File
Add the server_root
(UNIX) or server_root
/plugins/include
\plugins\include
(Windows NT) directory to your makefile to include the
file.
nsapi.h
Libraries
Add the
(UNIX) or server_root
server_root/bin/https/lib
\bin\https\bin
(Windows NT) library directory to your linker command.
Chapter 4
Creating Custom SAFs
117

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents