summaryrefslogtreecommitdiff
path: root/accel-pppd/pwdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/pwdb.h')
-rw-r--r--accel-pppd/pwdb.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/accel-pppd/pwdb.h b/accel-pppd/pwdb.h
new file mode 100644
index 00000000..a1c2cedb
--- /dev/null
+++ b/accel-pppd/pwdb.h
@@ -0,0 +1,27 @@
+#ifndef PWDB_H
+#define PWDB_H
+
+#include <stdarg.h>
+#include "list.h"
+
+struct ppp_t;
+
+#define PWDB_SUCCESS 0
+#define PWDB_DENIED 1
+#define PWDB_NO_IMPL 2
+
+struct pwdb_t
+{
+ struct list_head entry;
+ int (*check)(struct pwdb_t *, struct ppp_t *, const char *username, int type, va_list args);
+ char* (*get_passwd)(struct pwdb_t *, struct ppp_t *, const char *username);
+};
+
+int pwdb_check(struct ppp_t *, const char *username, int type, ...);
+char *pwdb_get_passwd(struct ppp_t *, const char *username);
+
+void pwdb_register(struct pwdb_t *);
+void pwdb_unregister(struct pwdb_t *);
+
+#endif
+