Overview of NSAPI C Functions
Chapter
4
Creating Custom SAFs
127
Overview of NSAPI C Functions
NSAPI provides a set of C functions that are used to implement SAFs. They serve
several purposes. They provide platform-independence across Netscape Server
operating system and hardware platforms. They provide improved performance.
They are thread-safe which is a requirement for SAFs. They prevent memory leaks.
And they provide functionality necessary for implementing SAFs. You should
always use these NSAPI routines when defining new SAFs.
This section provides an overview of the function categories available and some of
the more commonly used routines. All the public routines are detailed in Chapter
5, “NSAPI Function Reference.”
The main categories of NSAPI functions are:
•
Parameter Block Manipulation Routines
•
Protocol Utilities for Service SAFs
•
Memory Management
•
File I/O
•
Network I/O
•
Threads
•
Enterprise ServerUtilities
•
Virtual Server
Parameter Block Manipulation Routines
The parameter block manipulation functions provide routines for locating, adding,
and removing entries in a
pblock
data structure include:
•
pblock_findval
returns the value for a given name in a
pblock
.
•
pblock_nvinsert
adds a new name-value entry to a
pblock
.
•
pblock_remove
removes a
pblock
entry by name from a
pblock
. The entry is
not disposed. Use
param_free
to free the memory used by the entry.
•
param_free
frees the memory for the given
pblock
entry.
•
pblock_pblock2str
creates a new string containing all the name-value pairs
from a
pblock
in the form “name
=
value name
=
value.” This can be a useful
function for debugging.
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...