diff options
Diffstat (limited to 'accel-pppd/pwdb.h')
-rw-r--r-- | accel-pppd/pwdb.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/accel-pppd/pwdb.h b/accel-pppd/pwdb.h index f7d62d6a..7618bbc6 100644 --- a/accel-pppd/pwdb.h +++ b/accel-pppd/pwdb.h @@ -12,16 +12,18 @@ struct ap_session; #define PWDB_SUCCESS 0 #define PWDB_DENIED 1 -#define PWDB_NO_IMPL 2 +#define PWDB_WAIT 2 +#define PWDB_NO_IMPL 3 -struct pwdb_t -{ +typedef void (*pwdb_callback)(void *arg, int res); + +struct pwdb_t { struct list_head entry; - int (*check)(struct pwdb_t *, struct ap_session *, const char *username, int type, va_list args); + int (*check)(struct pwdb_t *, struct ap_session *, pwdb_callback cb, void *cb_arg, const char *username, int type, va_list args); char* (*get_passwd)(struct pwdb_t *, struct ap_session *, const char *username); }; -int pwdb_check(struct ap_session *, const char *username, int type, ...); +int pwdb_check(struct ap_session *, pwdb_callback cb, void *cb_arg, const char *username, int type, ...); char *pwdb_get_passwd(struct ap_session *, const char *username); void pwdb_register(struct pwdb_t *); |