1 /*
2  * wzdftpd - a modular and cool ftp server
3  * Copyright (C) 2002-2004  Pierre Chifflier
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18  *
19  * As a special exemption, Pierre Chifflier
20  * and other respective copyright holders give permission to link this program
21  * with OpenSSL, and distribute the resulting executable, without including
22  * the source code for OpenSSL in the source distribution.
23  */
24 
25 #ifndef __WZD_HARD_LIMITS__
26 #define __WZD_HARD_LIMITS__
27 
28 #ifdef HAVE_CONFIG_H
29 # include "config.h"
30 #endif
31 
32 #define	DEFAULT_SERVER_TICK	1L
33 #define	DEFAULT_CLIENT_TICK	10L
34 
35 #define	HARD_REACTION_TIME	1L
36 
37 /* FIXME should be a variable */
38 #define	HARD_XFER_TIMEOUT	30L
39 #define	HARD_IDENT_TIMEOUT	5
40 
41 #define	TRFMSG_INTERVAL		1000000
42 
43 
44 #define	HARD_THREADLIMIT	2000
45 
46 #define	HARD_MSG_LIMIT		1024
47 #define	HARD_MSG_LENGTH_MAX	16384
48 
49 #define	MAX_IP_LENGTH		128
50 #define	HARD_IP_PER_USER	8
51 #define	HARD_IP_PER_GROUP	8
52 
53 #define	MAX_GROUPS_PER_USER	32
54 
55 #define	MAX_FLAGS_NUM		32
56 #define	MAX_PASS_LENGTH		48
57 
58 #define	MAX_TAGLINE_LENGTH	256
59 
60 
61 #define	HARD_PERMFILE		".dirinfo"
62 
63 /* interval of time to check dynamic ip (default: 1 mns) */
64 #define	HARD_DYNAMIC_IP_INTVL	"*"
65 
66 /* interval of time to commit backend */
67 #define	HARD_COMMIT_BACKEND_INTVL	"*"
68 
69 #define	HARD_LS_BUFFERSIZE	4096
70 
71 /* the maximum number of channels for log */
72 #define MAX_LOG_CHANNELS 64
73 /* the number of reserved channels (with special behaviour) */
74 #define RESERVED_LOG_CHANNELS 10
75 
76 /* do NOT ever change the following ! */
77 #define WZD_BUFFER_LEN	1024
78 #define WZD_MAX_PATH 1024
79 
80 #define	HARD_BACKEND_NAME_LENGTH	256
81 #define	HARD_LAST_COMMAND_LENGTH	(WZD_BUFFER_LEN)
82 #define	HARD_USERNAME_LENGTH		256
83 #define	HARD_GROUPNAME_LENGTH		128
84 
85 #endif /* __WZD_HARD_LIMITS__ */
86