1168515Sgshapiro/*
2261194Sgshapiro * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
3168515Sgshapiro *	All rights reserved.
4168515Sgshapiro *
5168515Sgshapiro * By using this file, you agree to the terms and conditions set
6168515Sgshapiro * forth in the LICENSE file which can be found at the top level of
7168515Sgshapiro * the sendmail distribution.
8168515Sgshapiro *
9266527Sgshapiro *	$Id: daemon.h,v 8.4 2013-11-22 20:51:55 ca Exp $
10168515Sgshapiro */
11168515Sgshapiro
12168515Sgshapiro#ifndef DAEMON_H
13168515Sgshapiro#define DAEMON_H 1
14168515Sgshapiro
15168515Sgshapiro#if DAEMON_C
16168515Sgshapiro# define EXTERN
17168515Sgshapiro#else
18168515Sgshapiro# define EXTERN extern
19168515Sgshapiro#endif
20168515Sgshapiro
21168515Sgshapiro/* structure to describe a daemon or a client */
22168515Sgshapirostruct daemon
23168515Sgshapiro{
24168515Sgshapiro	int		d_socket;	/* fd for socket */
25168515Sgshapiro	SOCKADDR	d_addr;		/* socket for incoming */
26168515Sgshapiro	unsigned short	d_port;		/* port number */
27168515Sgshapiro	int		d_listenqueue;	/* size of listen queue */
28168515Sgshapiro	int		d_tcprcvbufsize;	/* size of TCP receive buffer */
29168515Sgshapiro	int		d_tcpsndbufsize;	/* size of TCP send buffer */
30168515Sgshapiro	time_t		d_refuse_connections_until;
31168515Sgshapiro	bool		d_firsttime;
32168515Sgshapiro	int		d_socksize;
33168515Sgshapiro	BITMAP256	d_flags;	/* flags; see sendmail.h */
34168515Sgshapiro	char		*d_mflags;	/* flags for use in macro */
35168515Sgshapiro	char		*d_name;	/* user-supplied name */
36168515Sgshapiro
37168515Sgshapiro	int		d_dm;		/* DeliveryMode */
38168515Sgshapiro	int		d_refuseLA;
39168515Sgshapiro	int		d_queueLA;
40168515Sgshapiro	int		d_delayLA;
41168515Sgshapiro	int		d_maxchildren;
42168515Sgshapiro
43168515Sgshapiro#if MILTER
44168515Sgshapiro	char		*d_inputfilterlist;
45168515Sgshapiro	struct milter	*d_inputfilters[MAXFILTERS];
46363466Sgshapiro#endif
47168515Sgshapiro#if _FFR_SS_PER_DAEMON
48168515Sgshapiro	int		d_supersafe;
49363466Sgshapiro#endif
50168515Sgshapiro};
51168515Sgshapiro
52168515Sgshapirotypedef struct daemon DAEMON_T;
53168515Sgshapiro
54168515SgshapiroEXTERN DAEMON_T	Daemons[MAXDAEMONS];
55168515Sgshapiro
56168515Sgshapiro#define DPO_NOTSET	(-1)	/* daemon option (int) not set */
57168515Sgshapiro/* see also sendmail.h: SuperSafe values */
58168515Sgshapiro
59168515Sgshapiroextern bool refuseconnections __P((ENVELOPE *, int, bool));
60168515Sgshapiro
61168515Sgshapiro#undef EXTERN
62168515Sgshapiro#endif /* ! DAEMON_H */
63