xref: /illumos-gate/usr/src/cmd/sendmail/src/daemon.h (revision 058561cb)
1*058561cbSjbeck /*
2*058561cbSjbeck  * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
3*058561cbSjbeck  *	All rights reserved.
4*058561cbSjbeck  *
5*058561cbSjbeck  * By using this file, you agree to the terms and conditions set
6*058561cbSjbeck  * forth in the LICENSE file which can be found at the top level of
7*058561cbSjbeck  * the sendmail distribution.
8*058561cbSjbeck  *
9*058561cbSjbeck  *	$Id: daemon.h,v 8.3 2006/07/13 22:57:03 ca Exp $
10*058561cbSjbeck  */
11*058561cbSjbeck 
12*058561cbSjbeck #pragma ident	"%Z%%M%	%I%	%E% SMI"
13*058561cbSjbeck 
14*058561cbSjbeck #ifndef DAEMON_H
15*058561cbSjbeck #define DAEMON_H 1
16*058561cbSjbeck 
17*058561cbSjbeck #if DAEMON_C
18*058561cbSjbeck # define EXTERN
19*058561cbSjbeck #else
20*058561cbSjbeck # define EXTERN extern
21*058561cbSjbeck #endif
22*058561cbSjbeck 
23*058561cbSjbeck /* structure to describe a daemon or a client */
24*058561cbSjbeck struct daemon
25*058561cbSjbeck {
26*058561cbSjbeck 	int		d_socket;	/* fd for socket */
27*058561cbSjbeck 	SOCKADDR	d_addr;		/* socket for incoming */
28*058561cbSjbeck 	unsigned short	d_port;		/* port number */
29*058561cbSjbeck 	int		d_listenqueue;	/* size of listen queue */
30*058561cbSjbeck 	int		d_tcprcvbufsize;	/* size of TCP receive buffer */
31*058561cbSjbeck 	int		d_tcpsndbufsize;	/* size of TCP send buffer */
32*058561cbSjbeck 	time_t		d_refuse_connections_until;
33*058561cbSjbeck 	bool		d_firsttime;
34*058561cbSjbeck 	int		d_socksize;
35*058561cbSjbeck 	BITMAP256	d_flags;	/* flags; see sendmail.h */
36*058561cbSjbeck 	char		*d_mflags;	/* flags for use in macro */
37*058561cbSjbeck 	char		*d_name;	/* user-supplied name */
38*058561cbSjbeck 
39*058561cbSjbeck 	int		d_dm;		/* DeliveryMode */
40*058561cbSjbeck 	int		d_refuseLA;
41*058561cbSjbeck 	int		d_queueLA;
42*058561cbSjbeck 	int		d_delayLA;
43*058561cbSjbeck 	int		d_maxchildren;
44*058561cbSjbeck 
45*058561cbSjbeck #if MILTER
46*058561cbSjbeck 	char		*d_inputfilterlist;
47*058561cbSjbeck 	struct milter	*d_inputfilters[MAXFILTERS];
48*058561cbSjbeck #endif /* MILTER */
49*058561cbSjbeck #if _FFR_SS_PER_DAEMON
50*058561cbSjbeck 	int		d_supersafe;
51*058561cbSjbeck #endif /* _FFR_SS_PER_DAEMON */
52*058561cbSjbeck };
53*058561cbSjbeck 
54*058561cbSjbeck typedef struct daemon DAEMON_T;
55*058561cbSjbeck 
56*058561cbSjbeck EXTERN DAEMON_T	Daemons[MAXDAEMONS];
57*058561cbSjbeck 
58*058561cbSjbeck #define DPO_NOTSET	(-1)	/* daemon option (int) not set */
59*058561cbSjbeck /* see also sendmail.h: SuperSafe values */
60*058561cbSjbeck 
61*058561cbSjbeck extern bool refuseconnections __P((ENVELOPE *, int, bool));
62*058561cbSjbeck 
63*058561cbSjbeck #undef EXTERN
64*058561cbSjbeck #endif /* ! DAEMON_H */
65