00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AWHANDLER_SFILTER__
00023 #define __AWHANDLER_SFILTER__
00024
00025 #include "monitor.h"
00026 #include "wire.h"
00027
00028 #include "regexmatch.h"
00029
00030
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00261 typedef struct {
00262
00263 const byte_t
00264 *regexp;
00265
00266 const byte_t
00267 *subst;
00268
00269 aw_event_sig_t
00270 copy;
00271
00272 } aw_sfilter_regex_filter_t;
00273
00277 typedef struct {
00278
00279 regex_t
00280 pattern;
00281
00282 byte_t
00283 *subst;
00284
00285 aw_event_sig_t
00286 copy;
00287
00288 } aw_sfilter_pattern_filter_t;
00289
00293 typedef struct {
00294
00295 aw_handler_t
00296 handler_header;
00297
00298 u_int32_t
00299 nfilters;
00300
00301 aw_sfilter_pattern_filter_t
00302 *filters;
00303
00304 } aw_sfilterhandler_t;
00305
00306
00318 aw_sfilterhandler_t *aw_create_sfilterhandler(u_int32_t nfilters,
00319 aw_sfilter_regex_filter_t *filters,
00320 u_int32_t alternate,
00321 int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00322 int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00323 const aw_alarm_sched_t *sched,
00324 aw_logger_t *logger);
00325
00326
00331 void aw_free_sfilterhandler(aw_sfilterhandler_t *h);
00332
00336 aw_handler_t *aw_wire_sfilterhandler(aw_wire_mkhandler_args_t *args);
00337
00338
00339 #endif
00340