]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/passwordfd.c
Header file reorganization and cleaning up the public API for pppd version 2.5.0...
[ppp.git] / pppd / plugins / passwordfd.c
index 84fd72e3b9b6994a43d112410de3312744cdf3bc..c1f782e0c947e3fed686b26490ed2f965aced1de 100644 (file)
@@ -7,23 +7,27 @@
  *  with pap- and chap-secrets files.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <sys/time.h>
 
-#include "pppd.h"
+#include <pppd/pppd.h>
+#include <pppd/upap.h>
+#include <pppd/chap.h>
+#include <pppd/eap.h>
+#include <pppd/options.h>
 
-char pppd_version[] = VERSION;
+char pppd_version[] = PPPD_VERSION;
 
 static int passwdfd = -1;
 static char save_passwd[MAXSECRETLEN];
 
-static option_t options[] = {
+static struct option options[] = {
     { "passwordfd", o_int, &passwdfd,
       "Receive password on this file descriptor" },
     { NULL }
@@ -76,7 +80,7 @@ static int pwfd_passwd (char *user, char *passwd)
 
 void plugin_init (void)
 {
-    add_options (options);
+    ppp_add_options (options);
 
     pap_check_hook = pwfd_check;
     pap_passwd_hook = pwfd_passwd;
@@ -84,7 +88,7 @@ void plugin_init (void)
     chap_check_hook = pwfd_check;
     chap_passwd_hook = pwfd_passwd;
 
-#ifdef USE_EAPTLS
+#ifdef PPP_WITH_EAPTLS
     eaptls_passwd_hook = pwfd_passwd;
 #endif
 }