summaryrefslogtreecommitdiffstats
path: root/eurephiafw_helpers.h
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-09-14 23:02:07 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-09-14 23:02:07 +0200
commitab726a0092fc2f41c347fa86c48fb5bd4e27fa89 (patch)
treec713136a1feee132aa8749a9e2e73fee175c4ca1 /eurephiafw_helpers.h
parentad0df81c0cc8f9ef813dae560679f82d2086e1bb (diff)
downloadeurephia-ab726a0092fc2f41c347fa86c48fb5bd4e27fa89.tar.gz
eurephia-ab726a0092fc2f41c347fa86c48fb5bd4e27fa89.tar.xz
eurephia-ab726a0092fc2f41c347fa86c48fb5bd4e27fa89.zip
Moved creation and destruction of semaphores and message queue into an own helper file. eFW_StartFirewall() now creates and eFW_RunFirewall() destructs, using this helper file.alpha_0.5
Diffstat (limited to 'eurephiafw_helpers.h')
-rw-r--r--eurephiafw_helpers.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/eurephiafw_helpers.h b/eurephiafw_helpers.h
new file mode 100644
index 0000000..30459b0
--- /dev/null
+++ b/eurephiafw_helpers.h
@@ -0,0 +1,35 @@
+/* eurephiafw_helpers.h --
+ *
+ * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef EUREPHIAFW_HELPERS_H_
+#define EUREPHIAFW_HELPERS_H_
+
+#define EFW_MSG_SIZE 1024
+#define MQUEUE_NAME "/eurephiaFW"
+#define SEMPH_MASTER "eurephiafw_master"
+#define SEMPH_WORKER "eurephiafw_worker"
+
+int efwSetupSemaphores(eurephiaCTX *, efw_threaddata *);
+int efwRemoveSemaphores(eurephiaCTX *, efw_threaddata *);
+
+int efwSetupMessageQueue(eurephiaCTX *, efw_threaddata *);
+int efwRemoveMessageQueue(eurephiaCTX *, efw_threaddata *);
+
+#endif /* !EUREPHIAFW_HELPERS_H_ */