aboutsummaryrefslogtreecommitdiff
path: root/src/netcosm.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2015-12-03 21:25:33 -0500
committerFranklin Wei <git@fwei.tk>2015-12-03 21:25:33 -0500
commitb7541dfc74d2d549210aa0ad73e0536ca4818909 (patch)
treefbc2083fe99dffe5085f5861c79a284d48a72171 /src/netcosm.h
parent1c795424fde9839ab6ebfd49ce7a84ac946be3c0 (diff)
downloadnetcosm-b7541dfc74d2d549210aa0ad73e0536ca4818909.zip
netcosm-b7541dfc74d2d549210aa0ad73e0536ca4818909.tar.gz
netcosm-b7541dfc74d2d549210aa0ad73e0536ca4818909.tar.bz2
netcosm-b7541dfc74d2d549210aa0ad73e0536ca4818909.tar.xz
better auth
Diffstat (limited to 'src/netcosm.h')
-rw-r--r--src/netcosm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/netcosm.h b/src/netcosm.h
index e8a1384..86d38b9 100644
--- a/src/netcosm.h
+++ b/src/netcosm.h
@@ -17,7 +17,15 @@
#include <unistd.h>
#define USERFILE "users.dat"
+#define MAX_FAILURES 3
+
+struct authinfo_t {
+ bool success;
+ const char *user;
+ int authlevel; /* 0 = highest */
+};
void client_main(int fd, struct sockaddr_in *addr, int);
void __attribute__((noreturn)) error(const char *fmt, ...);
void first_run_setup(void);
+struct authinfo_t auth_check(const char*, const char*);