aboutsummaryrefslogtreecommitdiff
path: root/unix.h
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-10-28 02:06:01 +0100
committerubq323 <ubq323@ubq323.website>2022-10-28 02:06:01 +0100
commitfa433836c643bbd9a60ed8ccdc9451a1edd98418 (patch)
tree30054b508d903007b5545329197aa7dcb18e311f /unix.h
parentf56709bfcdad99a47d52196ba971ff1d41746289 (diff)
handling of unix domain sockets
Diffstat (limited to 'unix.h')
-rw-r--r--unix.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/unix.h b/unix.h
new file mode 100644
index 0000000..410911e
--- /dev/null
+++ b/unix.h
@@ -0,0 +1,17 @@
+#ifndef unix_h_INCLUDED
+#define unix_h_INCLUDED
+
+#include <sys/types.h>
+#include <grp.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+
+// takes filename, returns socket fd
+// or -1 on failure.
+int unix_setup(char sockname[]);
+
+#endif // unix_h_INCLUDED
+