+typedef void (*CtdlDbgFunction) (const int);
+
+extern int DebugModules;
+#define MDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugModules != 0))
+
+#define MOD_syslog(LEVEL, FORMAT, ...) \
+ MDBGLOG(LEVEL) syslog(LEVEL, \
+ "Modules: " FORMAT, __VA_ARGS__)
+
+#define MODM_syslog(LEVEL, FORMAT) \
+ MDBGLOG(LEVEL) syslog(LEVEL, \
+ "Modules: " FORMAT);
+
+
+
+
+/*
+ * ServiceFunctionHook extensions are used for hooks which implement various
+ * protocols (either on TCP or on unix domain sockets) directly in the Citadel server.
+ */
+typedef struct ServiceFunctionHook ServiceFunctionHook;
+struct ServiceFunctionHook {
+ ServiceFunctionHook *next;
+ int tcp_port;
+ char *sockpath;
+ void (*h_greeting_function) (void) ;
+ void (*h_command_function) (void) ;
+ void (*h_async_function) (void) ;
+ int msock;
+ const char* ServiceName; /* this is just for debugging and logging purposes. */
+};
+extern ServiceFunctionHook *ServiceHookTable;
+
+typedef struct CleanupFunctionHook CleanupFunctionHook;
+struct CleanupFunctionHook {
+ CleanupFunctionHook *next;
+ void (*h_function_pointer) (void);
+};
+extern CleanupFunctionHook *CleanupHookTable;
+
+