summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src/nixio.h
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-02-08 14:01:48 +0000
committerSteven Barth <steven@midlink.org>2009-02-08 14:01:48 +0000
commit56d142a1a1b0286b8611040ea47ddf3a9844bb91 (patch)
treeb538774fc3c689230d151247beb31d36227424b7 /libs/nixio/src/nixio.h
parentf52ec227175c9db1bfee95f8a59c7c56d01911d4 (diff)
nixio linux IO/socket api (incomplete / WIP)
Diffstat (limited to 'libs/nixio/src/nixio.h')
-rw-r--r--libs/nixio/src/nixio.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libs/nixio/src/nixio.h b/libs/nixio/src/nixio.h
new file mode 100644
index 000000000..ce79c9aa6
--- /dev/null
+++ b/libs/nixio/src/nixio.h
@@ -0,0 +1,31 @@
+#ifndef NIXIO_H_
+#define NIXIO_H_
+
+#define NIXIO_META "nixio.socket"
+
+struct nixio_socket {
+ int fd;
+ int domain;
+ int type;
+ int protocol;
+};
+
+typedef struct nixio_socket nixio_sock;
+
+int nixio__perror(lua_State *L);
+int nixio__pstatus(lua_State *L, int condition);
+nixio_sock* nixio__checksock(lua_State *L);
+int nixio__checksockfd(lua_State *L);
+int nixio__checkfd(lua_State *L, int ud);
+int nixio__tofd(lua_State *L, int ud);
+
+/* Module functions */
+void nixio_open_socket(lua_State *L);
+void nixio_open_sockopt(lua_State *L);
+void nixio_open_bind(lua_State *L);
+void nixio_open_address(lua_State *L);
+void nixio_open_select(lua_State *L);
+
+/* Method functions */
+
+#endif /* NIXIO_H_ */