diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-02-19 23:04:49 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-02-19 23:04:49 +0000 |
commit | 13f4c15f214dd807899c10ebdff74ab5148d650f (patch) | |
tree | 50bbeb5ef948e29b40fd2a2833f0b68189fd2a1f /include/fds.h | |
parent | 426f53894b8ced42130425c196aea38d115e9e18 (diff) | |
download | conntrack-tools-13f4c15f214dd807899c10ebdff74ab5148d650f.tar.gz conntrack-tools-13f4c15f214dd807899c10ebdff74ab5148d650f.zip |
compose the file descriptor set at initialization stage to save some cycles
Diffstat (limited to 'include/fds.h')
-rw-r--r-- | include/fds.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 |