X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ffilter_chain.h;h=187fe22effeaea372292e0e16d2779b241badbdf;hb=9c98fa31ef50a6ff849d36cac4f5297faa6f7909;hp=f2e22af2b36e8e0953734ccb17075191302c3782;hpb=eab9dd12e4730f22f8b48d2abc16518272b6e53c;p=collectd.git diff --git a/src/filter_chain.h b/src/filter_chain.h index f2e22af2..187fe22e 100644 --- a/src/filter_chain.h +++ b/src/filter_chain.h @@ -1,6 +1,6 @@ /** * collectd - src/filter_chain.h - * Copyright (C) 2008 Florian octo Forster + * Copyright (C) 2008,2009 Florian octo Forster * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -28,8 +28,9 @@ #define FC_MATCH_NO_MATCH 0 #define FC_MATCH_MATCHES 1 -#define FC_ACTION_CONTINUE 0 -#define FC_ACTION_STOP 1 +#define FC_TARGET_CONTINUE 0 +#define FC_TARGET_STOP 1 +#define FC_TARGET_RETURN 2 /* * Match functions @@ -57,6 +58,9 @@ struct target_proc_s }; typedef struct target_proc_s target_proc_t; +struct fc_chain_s; +typedef struct fc_chain_s fc_chain_t; + int fc_register_target (const char *name, target_proc_t proc); /* @@ -81,7 +85,12 @@ int fc_rule_delete (const char *chain_name, int position); /* * Processing function */ -int fc_process (const data_set_t *ds, value_list_t *vl); +fc_chain_t *fc_chain_get_by_name (const char *chain_name); + +int fc_process_chain (const data_set_t *ds, value_list_t *vl, + fc_chain_t *chain); + +int fc_default_action (const data_set_t *ds, value_list_t *vl); /* * Shortcut for global configuration