Sun Java System Web Server 7.0 Update 3 NSAPI Developer's Guide


insert() Function

The insert filter method is called when a filter is inserted into a filter stack by the filter_insert function or insert-filter SAF.


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

Return Values

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.


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.


int myfilter_insert(FilterLayer *layer, pblock *pb)
	    if (pblock_findval("dont-insert-filter", pb))
        return REQ_NOACTION;
        return REQ_PROCEED;

FilterMethods myfilter_methods = FILTER_METHODS_INITIALIZER;
const Filter *myfilter;

myfilter_methods.insert = &myfilter_insert;    
myfilter = filter_create("myfilter", &myfilter_methods);

See Also

filter_insert() Function, filter_create() Function