summaryrefslogtreecommitdiff
path: root/components/vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/vpn.c')
-rw-r--r--components/vpn.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/components/vpn.c b/components/vpn.c
new file mode 100644
index 0000000..e5439fb
--- /dev/null
+++ b/components/vpn.c
@@ -0,0 +1,18 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "../slstatus.h"
+#include "../util.h"
+
+const char *
+vpn_status(const char *unused)
+{
+ char state[32];
+
+ if (pscanf("/sys/class/net/tun0/operstate", "%s", state) != 1)
+ return bprintf("");
+
+ return bprintf("");
+}