10 int __plugin_api_version
= 1;
11 struct pluginfuncs
*p
;
13 int plugin_radius_response(struct param_radius_response
*data
)
15 if (strcmp(data
->key
, "throttle") == 0)
17 if (strcmp(data
->value
, "yes") == 0)
19 p
->log(3, 0, 0, 0, " Throttling user\n");
20 data
->s
->throttle
= 1;
22 else if (strcmp(data
->value
, "no") == 0)
24 p
->log(3, 0, 0, 0, " Not throttling user\n");
25 data
->s
->throttle
= 0;
31 int plugin_init(struct pluginfuncs
*funcs
)
33 return ((p
= funcs
)) ? 1 : 0;