chiark / gitweb /
server/tripe.c: Formalize the main loop machinery.
[tripe] / server / tripe.h
index a2fdd006416c3ffffe831bdf778ec6e053c95cfa..bd70bb84b4751476f578fa28ac685a84ab1eca2a 100644 (file)
@@ -1855,6 +1855,31 @@ extern void iv_addreason(void);
 
 extern void iv_rmreason(void);
 
+/*----- The main loop -----------------------------------------------------*/
+
+/* --- @lp_init@ --- *
+ *
+ * Arguments:  ---
+ *
+ * Returns:    ---
+ *
+ * Use:                Initializes the main loop.  Most importantly, this sets up
+ *             the select multiplexor that everything else hooks onto.
+ */
+
+extern void lp_init(void);
+
+/* --- @lp_run@ --- *
+ *
+ * Arguments:  ---
+ *
+ * Returns:    Zero on successful termination; @-1@ if things went wrong.
+ *
+ * Use:                Cranks the main loop until it should be cranked no more.
+ */
+
+extern int lp_run(void);
+
 /*----- Tunnel drivers ----------------------------------------------------*/
 
 #ifdef TUN_LINUX