nixio:
[project/luci.git] / libs / nixio / src / nixio.h
index e4bb6d6..1b35e2e 100644 (file)
@@ -6,6 +6,10 @@
 #define NIXIO_BUFFERSIZE 8096
 #define _FILE_OFFSET_BITS 64
 
+#define NIXIO_PUSH_CONSTANT(x) \
+       lua_pushinteger(L, x); \
+       lua_setfield(L, -2, #x);
+
 /* uClibc: broken as always */
 #define _LARGEFILE_SOURCE
 
 #include <lualib.h>
 #include <lauxlib.h>
 
-struct nixio_socket {
+typedef struct nixio_socket {
        int fd;
        int domain;
        int type;
        int protocol;
-};
-
-typedef struct nixio_socket nixio_sock;
+} nixio_sock;
 
 int nixio__perror(lua_State *L);
 int nixio__pstatus(lua_State *L, int condition);
@@ -39,6 +41,8 @@ void nixio_open_address(lua_State *L);
 void nixio_open_poll(lua_State *L);
 void nixio_open_io(lua_State *L);
 void nixio_open_splice(lua_State *L);
+void nixio_open_tls_context(lua_State *L);
+void nixio_open_tls_socket(lua_State *L);
 
 /* Method functions */