Mercurial > hg > waaad
diff extensions/radius_gw/sub_echo_drop.h @ 374:883330e610e1
Progress on the echo_drop sub extension
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Tue, 26 May 2009 11:37:32 +0900 |
parents | 0cb02e490017 |
children |
line wrap: on
line diff
--- a/extensions/radius_gw/sub_echo_drop.h Mon May 25 17:25:53 2009 +0900 +++ b/extensions/radius_gw/sub_echo_drop.h Tue May 26 11:37:32 2009 +0900 @@ -39,6 +39,11 @@ #ifndef _SUB_ECHO_DROP #define _SUB_ECHO_DROP +/* Default debug level for the extension */ +#ifndef SUB_ECHO_DROP_VERBO +#define SUB_ECHO_DROP_VERBO 0 +#endif /* SUB_ECHO_DROP_VERBO */ + #define IN_EXTENSION #define DEFINE_DEBUG_MACRO sub_echo_drop @@ -48,9 +53,11 @@ extern int sub_echo_drop_verbosity; +/* Action to perform on an attribute */ #define ACT_ECHO 1 #define ACT_DROP 2 +/* Parsed configuration: list of attributes and associated actions */ struct sed_conf_item { struct rg_list chain; @@ -67,7 +74,8 @@ uint8_t code; /* The attribute code, the list is ordered by this value */ }; - + +/* The structure that holds both configuration and state */ struct rga_conf_state { /* Input: configuration file */ char * conffile; @@ -79,6 +87,13 @@ sess_reg_t * sess_hdl; }; +/* For ECHO items, we save a list of these in the session */ +struct sed_saved_item { + struct rg_list chain; + struct radius_attr_hdr attr; /* copy of the attribute content, including the data */ +}; + + /* The yacc parser */ int sed_conf_parse(struct rga_conf_state *cs);