]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/pppoe/pppoe-discovery.c
Merge pull request #409 from enaess/conf-fixes
[ppp.git] / pppd / plugins / pppoe / pppoe-discovery.c
index 4e2a5f2b7edea8edefd8d3089c11275d222ebf5c..15a80fb4a5bb7007d220e84f46dc9a1477e2cd58 100644 (file)
@@ -21,6 +21,9 @@
 #include <string.h>
 #include <time.h>
 #include <signal.h>
+#include <sys/time.h>
+#include <stdbool.h>
+#include <stdint.h>
 
 #include "pppoe.h"
 
@@ -123,6 +126,17 @@ get_time(struct timeval *tv)
     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)
 {