*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <signal.h>
+#include <sys/time.h>
+#include <stdbool.h>
+#include <stdint.h>
#include "pppoe.h"
return gettimeofday(tv, NULL);
}
+int signaled(int signal) {
+ if (signal == SIGTERM)
+ return got_sigterm;
+ return 0;
+}
+
+bool debug_on()
+{
+ return !!debug;
+}
+
static void
term_handler(int signum)
{
optarg, strerror(errno));
exit(1);
}
- fprintf(debugFile, "pppoe-discovery from pppd %s\n", VERSION);
+ fprintf(debugFile, "pppoe-discovery from pppd %s\n", PPPD_VERSION);
break;
case 'I':
conn->ifName = xstrdup(optarg);
" -U -- Use Host-Unique to allow multiple PPPoE sessions.\n"
" -W hexvalue -- Set the Host-Unique to the supplied hex string.\n"
" -h -- Print usage information.\n");
- fprintf(stderr, "\npppoe-discovery from pppd " VERSION "\n");
+ fprintf(stderr, "\npppoe-discovery from pppd " PPPD_VERSION "\n");
}