Quality of Service Examples
234
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
logmsg = (char *)
MALLOC(strlen(ip) + 1 + strlen(method) + 1 + strlen(uri) +
1 + 1);
len = util_sprintf(logmsg, "%s %s %s\n", ip, method, uri);
/* The atomic version uses locking to prevent interference */
system_fwrite_atomic(logfd, logmsg, len);
FREE(logmsg);
return REQ_PROCEED;
}
Quality of Service Examples
The code for the
qos-handler
and
qos-error
SAFs is provided as an example in
case you want to define your own SAFs for quality of service handling.
For more information, see the Netscape Enterprise Server Performance Tuning, Sizing,
and Scaling Guide.
Installing the Example
Inside the default object in
obj.conf
, add the following
AuthTrans
and
Error
directives:
Source Code
The source code for this example is in the
qos.c
file in the
plugins/nsapi/examples
subdirectory of the server root directory.
#include "frame/log.h"
#include "frame/http.h"
#include "safs/qos.h"
/*-----------------------------------------------------------------------------
decode : internal function used for parsing of QOS values in pblock
-----------------------------------------------------------------------------*/
AuthTrans fn=qos-handler
...
Error fn=qos-error code=503
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...