aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-01-22 20:28:25 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-07 10:38:04 (GMT)
commit2e69bdd16ac1c4c6a974e588f41aa954f05f1487 (patch)
tree6bccbf561ceef9034bcd79a53c4fac052e44cb94 /src/utils
parent70f4f052f1b183cff150cc8ed2299e52921f6a36 (diff)
downloadhostap-2e69bdd16ac1c4c6a974e588f41aa954f05f1487.zip
hostap-2e69bdd16ac1c4c6a974e588f41aa954f05f1487.tar.gz
hostap-2e69bdd16ac1c4c6a974e588f41aa954f05f1487.tar.bz2
eloop: Add eloop_sock_requeue()
This function can be used to re-build eloop socket tables after forking for eloop implementations that need this. Signed-off-by: Roy Marples <roy@marples.name>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/eloop.c6
-rw-r--r--src/utils/eloop.h8
-rw-r--r--src/utils/eloop_win.c6
3 files changed, 20 insertions, 0 deletions
diff --git a/src/utils/eloop.c b/src/utils/eloop.c
index 8647229..fda1a83 100644
--- a/src/utils/eloop.c
+++ b/src/utils/eloop.c
@@ -525,6 +525,12 @@ static void eloop_sock_table_dispatch(struct epoll_event *events, int nfds)
#endif /* CONFIG_ELOOP_EPOLL */
+int eloop_sock_requeue(void)
+{
+ return 0;
+}
+
+
static void eloop_sock_table_destroy(struct eloop_sock_table *table)
{
if (table) {
diff --git a/src/utils/eloop.h b/src/utils/eloop.h
index 07b8c0d..97af16f 100644
--- a/src/utils/eloop.h
+++ b/src/utils/eloop.h
@@ -313,6 +313,14 @@ int eloop_register_signal_reconfig(eloop_signal_handler handler,
void *user_data);
/**
+ * eloop_sock_requeue - Requeue sockets
+ *
+ * Requeue sockets after forking because some implementations require this,
+ * such as epoll and kqueue.
+ */
+int eloop_sock_requeue(void);
+
+/**
* eloop_run - Start the event loop
*
* Start the event loop and continue running as long as there are any
diff --git a/src/utils/eloop_win.c b/src/utils/eloop_win.c
index de47fb2..9c8b12b 100644
--- a/src/utils/eloop_win.c
+++ b/src/utils/eloop_win.c
@@ -692,3 +692,9 @@ void eloop_wait_for_read_sock(int sock)
WSAEventSelect(sock, event, 0);
WSACloseEvent(event);
}
+
+
+int eloop_sock_requeue(void)
+{
+ return 0;
+}