Sun Java System Web Server 7.0 NSAPI Developer's Guide

The SAF Interface

All SAFs (custom and built-in) have the same C interface regardless of the request-handling step for which they are written. SAFs are small functions that are designed for a specific purpose within a specific request-response step. SAFs receive parameters from the directive that invokes them in the obj.conf file, from the server, and from previous SAFs.

Here is the C interface for a SAF:

int function(pblock *pb, Session *sn, Request *rq);

The next section discusses the parameters in detail.

The SAF returns a result code that indicates whether and how it succeeded. The server uses the result code from each function to determine how to proceed with processing the request. For more information on the result codes, see Result Codes.