Oracle iPlanet Web Proxy Server 4.0.14 NSAPI Developer's Guide

insert

The insert filter method is called when a filter is inserted into a filter stack by the filter_insert function or insert-filter SAF (applicable in Input-class directives).

Syntax

int insert(FilterLayer *layer, pblock *pb);

Returns

Returns REQ_PROCEED if the filter should be inserted into the filter stack, REQ_NOACTION if the filter should not be inserted because it is not required, or REQ_ABORTED if the filter should not be inserted because of an error.

Parameters

FilterLayer *layer is the filter layer at which the filter is being inserted.

pblock *pb is the set of parameters passed to filter_insert or specified by the fn="insert-filter" directive.

Example

FilterMethods myfilter_methods = FILTER_METHODS_INITIALIZER;
	const Filter *myfilter;int myfilter_insert(FilterLayer *layer, pblock *pb)
	{if (pblock_findval("dont-insert-filter", pb)) return REQ_NOACTION;
	return REQ_PROCEED;}...myfilter_methods.insert = &myfilter_insert; 
	myfilter = filter_create("myfilter", &myfilter_methods);...