summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2007-01-14 12:32:30 +0000
committerDenis Vlasenko2007-01-14 12:32:30 +0000
commitfdf7aec5324782969328b6375c3043b46402cae5 (patch)
tree15140c58d0628f56c72eaf6422375e5c377c2e85
parentc14c95ec89b50c936c72c431f867fccf71a324eb (diff)
downloadbusybox-fdf7aec5324782969328b6375c3043b46402cae5.zip
busybox-fdf7aec5324782969328b6375c3043b46402cae5.tar.gz
I forgot "svn add" AGAIN! :(
-rw-r--r--networking/isrv.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/networking/isrv.h b/networking/isrv.h
new file mode 100644
index 0000000..780636d
--- /dev/null
+++ b/networking/isrv.h
@@ -0,0 +1,23 @@
+/* opaque structure */
+struct isrv_state_t;
+typedef struct isrv_state_t isrv_state_t;
+
+/* callbacks */
+void isrv_want_rd(isrv_state_t *state, int fd);
+void isrv_want_wr(isrv_state_t *state, int fd);
+void isrv_dont_want_rd(isrv_state_t *state, int fd);
+void isrv_dont_want_wr(isrv_state_t *state, int fd);
+int isrv_register_fd(isrv_state_t *state, int peer, int fd);
+void isrv_close_fd(isrv_state_t *state, int fd);
+int isrv_register_peer(isrv_state_t *state, void *param);
+
+/* driver */
+void isrv_run(
+ int listen_fd,
+ int (*new_peer)(isrv_state_t *state, int fd),
+ int (*do_rd)(int fd, void **),
+ int (*do_wr)(int fd, void **),
+ int (*do_timeout)(void **),
+ int timeout,
+ int linger_timeout
+);