Sun Java System Web Proxy Server 4.0.11 NSAPI Developer's Guide

USE_NSAPI_VERSION

To request a particular version of NSAPI, define the USE_NSAPI_VERSION macro before including the nsapi.h header file. The requested NSAPI version is encoded by multiplying the major version number by 100 and then adding this to the minor version number. For example, the following code requests NSAPI 3.2 features:

#define USE_NSAPI_VERSION 302 /* We want NSAPI 3.2 (Web Server 6.1) */
#include "nsapi.h"

To develop a plug-in that is compatible across multiple server versions, define USE_NSAPI_VERSION to the highest NSAPI version supported by all of the target server versions.

The following table lists server versions and the highest NSAPI version supported by each:

Table 4–2 NSAPI Versions Supported by Different Servers

Server Version  

NSAPI Version  

iPlanet Web Server 4.1 

3.0 

iPlanet Web Server 6.0 

3.1 

Netscape Enterprise Server 6.0 

3.1 

Netscape Enterprise Server 6.1 

3.1 

Sun ONE Application Server 7.0 

3.1 

Sun Java System Web Server 6.1 

3.2 

Sun Java System Web Proxy Server 4 

3.3 

Do not request a version of NSAPI higher than the highest version supported by the nsapi.h header that the plug-in is being compiled against. Additionally, to use USE_NSAPI_VERSION, you must compile against an nsapi.h header file that supports NSAPI 3.3 or higher.

Syntax

int USE_NSAPI_VERSION

Example

The following code can be used when building a plug-in designed to work with Sun Java System Web Proxy Server 4:

#define USE_NSAPI_VERSION 303 /* We want NSAPI 3.3 (Proxy Server 4) */
#include "nsapi.h"

See Also

NSAPI_RUNTIME_VERSION, NSAPI_VERSION