The FilterMethods data structure is passed to filter_create to define the filter methods a filter supports. Each new FilterMethods instance must be initialized with the FILTER_METHODS_INITIALIZER macro. For each filter method a filter supports, the corresponding FilterMethods member should point to a function that implements that filter method.
typedef struct {
size_t size;
FilterInsertFunc *insert;
FilterRemoveFunc *remove;
FilterFlushFunc *flush;
FilterReadFunc *read;
FilterWriteFunc *write;
FilterWritevFunc *writev;
FilterSendfileFunc *sendfile;
} FilterMethods;
|