5 #define MMAN_VERSION "1.2.1"
7 /* url for web interface */
8 #define INTERFACEURL "mman"
10 /* timeout for receiving first header and waiting on remote server to send response */
13 /* duration connection will remain open for keep-alive */
14 #define KEEPTIMEOUT 120
16 /* maximum listening ports allowed */
17 #define MAXLISTENPORTS 20
19 /* maximum threads (thus, maximum connections) */
20 #define MAXTHREADS 1024
22 /* template for mkstemp() when using external program with temporary file */
23 #define TEMPFILE "/tmp/mmanXXXXXX"
25 /* time in seconds to hold dns results in cache before purging */
26 #define DNS_EXPIRE 360
28 /* size of hashtable for cached dns results */
29 #define DNS_HASH_SIZE 1024
31 /* flags for regcomp */
32 #define REGFLAGS REG_EXTENDED | REG_ICASE | REG_NOSUB
34 /* flags for pcre_compile */
35 #define PCREFLAGS PCRE_CASELESS | PCRE_DOTALL | PCRE_MULTILINE
37 /* format of log timestamps, see strftime manpage for help */
38 #define TIMEFORMAT "%a %d %H:%M:%S"
40 /* maximum substrings for regexp's with backreferences (rewrite rules) */
41 #define PCRE_MAX_SUBSTRING 16
43 /* filebuf size will always be aligned to a multiple of this number, must be a power of 2.
44 this reduces overhead due to excessive realloc'ing */
45 #define FILEBUF_ALIGNMENT 65536
47 /* size of blocks to read/write at once */
48 #define BLOCKSIZE 65536
50 /* maximum size of pages to buffer for rewriting and external parsing (in bytes), or -1 to disable checking
51 note: this doesn't work for pages that use chunked encoding */
52 #define BUFFERMAX 512000
54 /* default number of log entries to keep in memory for web interface */
55 #define LOGBUFFERSIZE 1000
57 /* mask of log entry types to _NOT_ show on the web interface */
58 #define LOGMASK MMLOG_DEBUG
60 /* web interface colours */
61 #define INTERFACE_BG "#99AABB" /* background */
62 #define INTERFACE_TEXT "#000000" /* text */
63 #define INTERFACE_LINK "#0000FF" /* link */
64 #define INTERFACE_VLINK "#0000FF" /* visited link */
65 #define INTERFACE_TABLEBG "#DDEEFF" /* table background */