From ed49d60424a18635c31dafc77e2cb720f75cc4ff Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 25 May 2008 15:14:31 +0200 Subject: add eventfd emulation to communicate receiver -> sender --- include/Makefile.am | 2 +- include/conntrackd.h | 1 + include/event.h | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 include/event.h (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index 92ebbcc..d68f10a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -3,5 +3,5 @@ noinst_HEADERS = alarm.h jhash.h slist.h cache.h linux_list.h linux_rbtree.h \ sync.h conntrackd.h local.h us-conntrack.h \ debug.h log.h hash.h mcast.h conntrack.h \ state_helper.h network.h ignore.h queue.h \ - traffic_stats.h netlink.h fds.h + traffic_stats.h netlink.h fds.h eventfd.h diff --git a/include/conntrackd.h b/include/conntrackd.h index b266289..c7a65be 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -125,6 +125,7 @@ struct ct_sync_state { struct mcast_sock *mcast_server; /* multicast socket: incoming */ struct mcast_sock *mcast_client; /* multicast socket: outgoing */ + struct evfd *evfd; /* event fd */ struct sync_mode *sync; /* sync mode */ diff --git a/include/event.h b/include/event.h new file mode 100644 index 0000000..b6bff5a --- /dev/null +++ b/include/event.h @@ -0,0 +1,14 @@ +#ifndef _EVENT_H_ +#define _EVENT_H_ + +struct evfd *create_evfd(void); + +void destroy_evfd(struct evfd *e); + +int get_read_evfd(struct evfd *evfd); + +int write_evfd(struct evfd *evfd); + +int read_evfd(struct evfd *evfd); + +#endif -- cgit v1.2.3