remove stupid inlines
[apps/pfixtools.git] / common.h
index 75825eb..6e76557 100644 (file)
--- a/common.h
+++ b/common.h
@@ -1,5 +1,5 @@
 /******************************************************************************/
-/*          postlicyd: a postfix policy daemon with a lot of features         */
+/*          pfixtools: a collection of postfix related tools                  */
 /*          ~~~~~~~~~                                                         */
 /*  ________________________________________________________________________  */
 /*                                                                            */
@@ -33,8 +33,8 @@
  * Copyright © 2007 Pierre Habouzit
  */
 
-#ifndef POSTLICYD_H
-#define POSTLICYD_H
+#ifndef PFIXTOOLS_H
+#define PFIXTOOLS_H
 
 #include <errno.h>
 #include <limits.h>
@@ -64,7 +64,6 @@ typedef void (*exitcall_t)(void);
 #define module_exit(fn)  static exitcall_t __exit_##fn __exit = fn;
 
 /* common.c */
-extern sig_atomic_t cleanexit;
 extern sig_atomic_t sigint;
 extern sig_atomic_t sighup;
 
@@ -72,4 +71,11 @@ void common_sighandler(int sig);
 void common_initialize(void);
 void common_shutdown(void);
 
+/* daemon.c */
+int tcp_listen_nonblock(const struct sockaddr *addr, socklen_t len);
+int accept_nonblock(int fd);
+
+int daemon_detach(void);
+int drop_privileges(const char *user, const char *group);
+
 #endif