From 13f4c15f214dd807899c10ebdff74ab5148d650f Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 19 Feb 2008 23:04:49 +0000 Subject: compose the file descriptor set at initialization stage to save some cycles --- include/fds.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 include/fds.h (limited to 'include/fds.h') diff --git a/include/fds.h b/include/fds.h new file mode 100644 index 0000000..cc213fe --- /dev/null +++ b/include/fds.h @@ -0,0 +1,16 @@ +#ifndef _FDS_H_ +#define _FDS_H_ + +struct fds { + int maxfd; + int fd_array_len; + int fd_array_cur; + int *fd_array; + fd_set readfds; +}; + +struct fds *create_fds(void); +void destroy_fds(struct fds *); +int register_fd(int fd, struct fds *fds); + +#endif -- cgit v1.2.3