comparison extensions/app_radgw/rgw_common.h @ 256:042af0000c0a

Ported the auth plugin
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 16 Apr 2010 16:57:39 +0900
parents cb4307a1cd29
children 5df55136361b
comparison
equal deleted inserted replaced
255:cb4307a1cd29 256:042af0000c0a
53 /* This structure is private for each plugin */ 53 /* This structure is private for each plugin */
54 struct rgwp_config; 54 struct rgwp_config;
55 55
56 /* This structure points to a RADIUS client description, the definition is not known to plugins */ 56 /* This structure points to a RADIUS client description, the definition is not known to plugins */
57 struct rgw_client; 57 struct rgw_client;
58 /* This function is required to be able to translate user paswords */
59 int rgw_clients_getkey(struct rgw_client * cli, unsigned char **key, size_t *key_len);
58 60
59 /* Each plugin must provide the following structure. */ 61 /* Each plugin must provide the following structure. */
60 extern struct rgw_api { 62 extern struct rgw_api {
63 /* The name of the plugin */
64 const char * rgwp_name;
65
61 /* Parse the configuration file. It may be called several times with different configurations. 66 /* Parse the configuration file. It may be called several times with different configurations.
62 Returns NULL on errors. 67 Called even if no configuration file is passed (with NULL conf_file parameter then) */
63 Called even if no configuration file is passed (with NULL parameter then) */ 68 int (*rgwp_conf_parse) ( char * conf_file, struct rgwp_config ** state );
64 struct rgwp_config * (*rgwp_conf_parse) ( char * conf_file );
65 69
66 /* Cleanup the configuration state when the daemon is exiting. */ 70 /* Cleanup the configuration state when the daemon is exiting (called even if state is NULL). */
67 void (*rgwp_conf_free) (struct rgwp_config * conf); 71 void (*rgwp_conf_free) (struct rgwp_config * state);
68 72
69 /* handle an incoming RADIUS message */ 73 /* handle an incoming RADIUS message */
70 int (*rgwp_rad_req) ( struct rgwp_config * conf, struct session * session, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ); 74 int (*rgwp_rad_req) ( struct rgwp_config * conf, struct session * session, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli );
71 /* ret 0: continue; 75 /* ret 0: continue;
72 ret -1: stop processing this message 76 ret -1: stop processing this message
"Welcome to our mercurial repository"