diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-05 15:18:59 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-05 15:18:59 +0300 |
commit | f28cb1b0a926f1ea98700b7871537ad1793511fd (patch) | |
tree | baf35570bc6b38b6fab5b6524e8f19f58f71e57f /accel-pppd/ppp/ppp_auth.h | |
parent | 2fdf3586c13a72c36f9530084962e29d57dc0329 (diff) | |
download | accel-ppp-f28cb1b0a926f1ea98700b7871537ad1793511fd.tar.gz accel-ppp-f28cb1b0a926f1ea98700b7871537ad1793511fd.zip |
rename accel-pptp to accel-ppp
Diffstat (limited to 'accel-pppd/ppp/ppp_auth.h')
-rw-r--r-- | accel-pppd/ppp/ppp_auth.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp_auth.h b/accel-pppd/ppp/ppp_auth.h new file mode 100644 index 00000000..87cc7420 --- /dev/null +++ b/accel-pppd/ppp/ppp_auth.h @@ -0,0 +1,37 @@ +#ifndef PPP_AUTH_H +#define PPP_AUTH_H + +#include "list.h" + +struct ppp_auth_handler_t; + +struct auth_data_t +{ + struct list_head entry; + int proto; + int state; + struct ppp_auth_handler_t *h; +}; + +struct ppp_auth_handler_t +{ + struct list_head entry; + const char *name; + struct auth_data_t* (*init)(struct ppp_t*); + int (*send_conf_req)(struct ppp_t*, struct auth_data_t*, uint8_t*); + int (*recv_conf_req)(struct ppp_t*, struct auth_data_t*, uint8_t*); + int (*start)(struct ppp_t*, struct auth_data_t*); + int (*finish)(struct ppp_t*, struct auth_data_t*); + void (*free)(struct ppp_t*,struct auth_data_t*); + int (*check)(uint8_t *); + int (*restart)(struct ppp_t*,struct auth_data_t*); +}; + +int ppp_auth_register_handler(struct ppp_auth_handler_t*); + +void ppp_auth_successed(struct ppp_t *ppp, char *username); +void ppp_auth_failed(struct ppp_t *ppp, const char *username); +int ppp_auth_restart(struct ppp_t *ppp); + +#endif + |