File: setup.h

package info (click to toggle)
bnetd 0.4.19-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,552 kB
  • ctags: 2,109
  • sloc: ansic: 23,811; sh: 1,704; makefile: 295
file content (107 lines) | stat: -rw-r--r-- 3,831 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
 * Copyright (C) 1998,1999  Ross Combs (rocombs@cs.nmsu.edu)
 * Copyright (C) 1999  Rob Crittenden (rcrit@greyoak.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/* make bnchat, etc print debug messages */
#undef CLIENTDEBUG

#ifdef USE_MEM_TEST /* set by configure */

#include "mem_test_user.h"

/* test memory allocation by poisoning freed memory */
#define MEM_POISON

/* I have a hacked up mem_test.c that puts magic numbers in
 * newly allocated memory and freed memory. Instead of making
 * the library remember the size of each allocation, I have
 * a special free() called pfree() that takes a second parameter
 * which is the size of the area to free.
 */
#ifndef MEM_POISON
#define pfree(ptr,size) free(ptr)
#endif

#else
#define pfree(ptr,size) free(ptr)
#endif

/* this will test get/unget memory management in account.c */
#undef TESTUNGET

/* to enable /connections for all users */
#define CONNDEBUG

/* length of listen socket queue */
#define LISTEN_QUEUE 10

/* the format of timestamps in the logfile */
#define EVENT_TIME_FORMAT "%b %d %H:%M:%S"
#define EVENT_TIME_MAXLEN 32

/* the format of the stat times in bnstat */
#define STAT_TIME_FORMAT "%Y %b %d %H:%M:%S"
#define STAT_TIME_MAXLEN 32

/* the format of the file modification time in bnftp */
#define FILE_TIME_FORMAT "%Y %b %d %H:%M:%S"
#define FILE_TIME_MAXLEN 32

#ifndef BNETD_DEFAULT_CONF_FILE
#define BNETD_DEFAULT_CONF_FILE "/etc/bnetd/bnetd.conf"
#endif
#define BNETD_FILE_DIR          "/usr/share/bnetd"
#define BNETD_USER_DIR          "/var/cache/bnetd/player"
#define BNETD_REPORT_DIR        "/var/cache/bnetd/reports"
#define BNETD_LOG_FILE          "/var/log/bnetd.log"
#define BNETD_TEMPLATE_FILE     "/etc/bnetd/account_template.txt"
#define BNETD_MOTD_FILE         "/etc/bnetd/bnmotd.txt"
#define BNETD_NEWS_DIR          "/etc/bnetd"
#define BNETD_AD_FILE           "/etc/bnetd/ad.conf"
#define BNETD_CHANNEL_FILE      "/etc/bnetd/channel.conf"
#define BNETD_PID_FILE          "/var/run/bnetd.pid"
#define BNETD_ACCOUNT_TMP       ".bnetd_acct_temp"

/* files relative to FILE_DIR */
#define BNETD_TOS_FILE    "tos.txt"
#define BNETD_ICON_FILE   "icons.bni"
#define BNETD_MPQ_FILE    "missing.mpq"
#define BNETD_MPQ_VERSION 0

/* Other default values */
#define BNETD_LOG_LEVELS          "warn,error"
#define BNETD_SERV_ADDRS          ":" /* this means "all" */
#define BNETD_SERV_PORT           6112 /* use this port if not specified */
#define BNETD_TRACK_ADDRS         "localhost"
#define BNETD_TRACK_PORT          6114 /* use this port if not specified */
#define BNETD_GAME_PORT           6112
#define BNETD_TEST_PORT           6112
#define BNETD_USERSYNC            300
#define BNETD_USERFLUSH           1000
#define BNETD_LATENCY             10
#define BNETD_TRACK_TIME          0
#define BNETD_POLL_INTERVAL       20000 /* 20 ms */
#define BNETD_SHUTDELAY           300
#define BNETD_SHUTDECR            60
#define BNETD_DEFAULT_OWNER       "root"
#define BNETD_DEFAULT_KEY         "3310541526205"
#define BNETD_DEFAULT_HOST        "localhost"

/* adjustable constants */
#define BNETD_LADDER_DEFAULT_TIME "19764578 0" /* 0:00 1 Jan 1970 GMT */