Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / master / mail_server.h
blob705be1db2e4ccc2c48fffc820213831d2c6790b2
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* mail_server 3h
6 /* SUMMARY
7 /* skeleton servers
8 /* SYNOPSIS
9 /* #include <mail_server.h>
10 /* DESCRIPTION
11 /* .nf
14 * Utility library.
16 #include <vstream.h>
19 * External interface. Tables are defined in mail_conf.h.
21 #define MAIL_SERVER_INT_TABLE 1
22 #define MAIL_SERVER_STR_TABLE 2
23 #define MAIL_SERVER_BOOL_TABLE 3
24 #define MAIL_SERVER_TIME_TABLE 4
25 #define MAIL_SERVER_RAW_TABLE 5
26 #define MAIL_SERVER_NINT_TABLE 6
28 #define MAIL_SERVER_PRE_INIT 10
29 #define MAIL_SERVER_POST_INIT 11
30 #define MAIL_SERVER_LOOP 12
31 #define MAIL_SERVER_EXIT 13
32 #define MAIL_SERVER_PRE_ACCEPT 14
33 #define MAIL_SERVER_SOLITARY 15
34 #define MAIL_SERVER_UNLIMITED 16
35 #define MAIL_SERVER_PRE_DISCONN 17
36 #define MAIL_SERVER_PRIVILEGED 18
37 #define MAIL_SERVER_WATCHDOG 19
39 #define MAIL_SERVER_IN_FLOW_DELAY 20
41 typedef void (*MAIL_SERVER_INIT_FN) (char *, char **);
42 typedef int (*MAIL_SERVER_LOOP_FN) (char *, char **);
43 typedef void (*MAIL_SERVER_EXIT_FN) (char *, char **);
44 typedef void (*MAIL_SERVER_ACCEPT_FN) (char *, char **);
45 typedef void (*MAIL_SERVER_DISCONN_FN) (VSTREAM *, char *, char **);
48 * single_server.c
50 typedef void (*SINGLE_SERVER_FN) (VSTREAM *, char *, char **);
51 extern NORETURN single_server_main(int, char **, SINGLE_SERVER_FN, ...);
54 * multi_server.c
56 typedef void (*MULTI_SERVER_FN) (VSTREAM *, char *, char **);
57 extern NORETURN multi_server_main(int, char **, MULTI_SERVER_FN,...);
58 extern void multi_server_disconnect(VSTREAM *);
59 extern int multi_server_drain(void);
62 * trigger_server.c
64 typedef void (*TRIGGER_SERVER_FN) (char *, int, char *, char **);
65 extern NORETURN trigger_server_main(int, char **, TRIGGER_SERVER_FN, ...);
67 #define TRIGGER_BUF_SIZE 1024
69 /* LICENSE
70 /* .ad
71 /* .fi
72 /* The Secure Mailer license must be distributed with this software.
73 /* AUTHOR(S)
74 /* Wietse Venema
75 /* IBM T.J. Watson Research
76 /* P.O. Box 704
77 /* Yorktown Heights, NY 10598, USA
78 /*--*/