summaryrefslogtreecommitdiffstats
path: root/kppp/kpppconfig.h
blob: 1fdf43d3802ada25254aade7491412084a132350 (plain)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*
 *            kPPP: A pppd front end for the KDE project
 *
 * $Id$
 *
 *            Copyright (C) 1997 Bernd Johannes Wuebben
 *                   [email protected]
 *
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */


#ifndef _KPPPCONFIG_H_
#define _KPPPCONFIG_H_

#ifdef Q_OS_SOLARIS
#define STREAMS
#define _XOPEN_SOURCE 600
#define _XOPEN_SOURCE_EXTENDED 1
#define __EXTENSIONS__ 1
#endif

#include <config.h>

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

// Warning: If you fiddle with the following directories you have
// to adjust make_directories() in main.cpp()

// file used for PAP authetication purposes
#define PAP_AUTH_FILE "/etc/ppp/pap-secrets"

// file used for CHAP authetication purposes
#define CHAP_AUTH_FILE "/etc/ppp/chap-secrets"

// Define the default modem response timeout
#define MODEM_TIMEOUT 60

// Define the default modem tone duration (ATS11=)
#define MODEM_TONEDURATION 70

// Define the default time for pppd to get the interface up
#define PPPD_TIMEOUT 30

// Define the default time to wait after a busy signal before redialing
#define BUSY_WAIT 0



// Every PPP_STATS_INTERVAL milli seconds kppp will read
// and display the ppp statistics IF the stats window
// is visible. If the stats window is not visible
// the stats are not taken.
// 200 milli secs is 5 times per second and results in
// 0 load on my machine. Play with this parameter if
// you feel like it.

#define PPP_STATS_INTERVAL 200
// comment this out to get some more debugging info
/*
#define MY_DEBUG
*/

// Define the maximum number of accounts
#define MAX_ACCOUNTS 100

// Define the maximum number of modems
#define MAX_MODEMS 100

// Define the mamimum number of script entries
#define MAX_SCRIPT_ENTRIES 20

// Define the maximun number of DNS entries
#define MAX_DNS_ENTRIES 5

// Maximum size of the command executing pppd
const unsigned int MAX_CMDLEN = 2024;

// Define the maximum number of arguments passed to the pppd daemon
#define MAX_PPPD_ARGUMENTS 20

// Define the maximun number of lines of /etc/resolv.conf
#define MAX_RESOLVCONF_LINES 128

// Directory for modem lock files (Needed by mgetty users)
#ifdef __linux__
# define LOCK_DIR "/var/lock"
#else /* linux */
# ifdef BSD
#  define	LOCK_DIR "/var/spool/lock"
# else  /* BSD */
#  define	LOCK_DIR "/var/spool/locks"
# endif /* BSD */
#endif  /* linux */

// search path for pppd binary
#define PPPDSEARCHPATH "/sbin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin"

// name of the pppd binary
#define PPPDNAME "pppd"

// support for internal ISDN cards and modem emulation
#ifdef __linux__
#define ISDNSUPPORT
#endif

#if defined(__linux__) || defined(BSD)
#define PPP_PID_DIR "/var/run/"
#else
#define PPP_PID_DIR "/etc/ppp/"
#endif

// defined in opener.cpp
extern const char * const kppp_syslog[];

#ifdef _XPG4_2
#define __xnet_connect connect
#endif

#define CBTYPE_NONE     0
#define CBTYPE_ADMIN    1
#define CBTYPE_USER     2

#endif