summaryrefslogtreecommitdiff
path: root/src/tailnet.h
diff options
context:
space:
mode:
authorWayne Cole <waynecole339@gmail.com>2026-04-26 16:29:30 +0000
committerWayne Cole <waynecole339@gmail.com>2026-04-26 16:29:30 +0000
commitc45c35cf85f3f10dadff964165cff3e5dba5fffc (patch)
tree06005afbdd1d63691ace663e0aacedb152f50889 /src/tailnet.h
downloadhoodsgate-c45c35cf85f3f10dadff964165cff3e5dba5fffc.tar.xz
hoodsgate-c45c35cf85f3f10dadff964165cff3e5dba5fffc.zip
chore: actually vcs this proj, working on it for monthsmain
Diffstat (limited to 'src/tailnet.h')
-rw-r--r--src/tailnet.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tailnet.h b/src/tailnet.h
new file mode 100644
index 0000000..8e7c8a6
--- /dev/null
+++ b/src/tailnet.h
@@ -0,0 +1,25 @@
+#ifndef TAILNET_H
+#define TAILNET_H
+
+#include <stdbool.h>
+
+#define DEFINE_PROGRAM_LIST(...) \
+ static const char *REQUIRED_PROGS[] = {__VA_ARGS__}; \
+ static const int REQUIRED_PROGS_COUNT = \
+ sizeof(REQUIRED_PROGS) / sizeof(REQUIRED_PROGS[0]);
+
+#define PROG_TAILSCALE "tailscale"
+#define PROG_SYSCTL "sysctl"
+#define PROG_UFW "ufw"
+#define PROG_CURL "curl"
+#define PROG_NFT "nft"
+#define MAX_PROG_COUNT \
+ 10 // this is here cause of C99 array sizes compile time constraints
+
+extern const char *tailnetMissingProgs[MAX_PROG_COUNT];
+bool tailnet_is_program_installed_boolean(const char *program_name);
+bool tailnet_is_file_executable_boolean(const char *filepath);
+bool tailnet_check_required_programs_boolean(void);
+bool tailnet_advertise_exit_node_boolean(void);
+
+#endif