]> git.ipfire.org Git - people/stevee/network.git/blob - src/functions/functions.constants
ipsec: Move connections to /etc/network/vpn/ipsec/connections
[people/stevee/network.git] / src / functions / functions.constants
1 #!/bin/bash
2 ###############################################################################
3 # #
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2010 Michael Tremer & Christian Schmidt #
6 # #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
11 # #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
16 # #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 # #
20 ###############################################################################
21
22 # Set gettext text domain.
23 TEXTDOMAIN="network"
24
25 LOG_DIR=/var/log/network
26 RUN_DIR=/run/network
27 LOCK_DIR=/var/lock
28
29 RED_RUN=${RUN_DIR}/red
30 PPP_SECRETS=/etc/ppp/secrets
31
32 # Network directory configuration.
33 NETWORK_CONFIG_DIR="/etc/network"
34 NETWORK_DB_DIR="${RUN_DIR}/db"
35 NETWORK_ZONE_DIR="${NETWORK_CONFIG_DIR}"
36 NETWORK_HOOKS_DIR=/usr/lib/network/hooks
37 NETWORK_TRIGGERS_DIR=/usr/lib/network/triggers
38 NETWORK_SHARE_DIR=/usr/share/network
39
40 NETWORK_IPSEC_CONNS_DIR="${NETWORK_CONFIG_DIR}/vpn/ipsec/connections"
41
42 # Network file configuration.
43 NETWORK_SETTINGS_FILE=${NETWORK_CONFIG_DIR}/config
44 NETWORK_SETTINGS_FILE_PARAMS="DEBUG"
45 CONFIG_HOSTNAME="/etc/hostname"
46
47 RED_DB_DIR=${RUN_DIR}/red
48 ROUTING_DB_DIR=${RUN_DIR}/routing
49
50 DB_CONNECTION_FILE="${LOG_DIR}/connections.db"
51
52 # (Static) route settings.
53 NETWORK_CONFIG_ROUTES="${NETWORK_CONFIG_DIR}/routes"
54 NETWORK_CONFIG_ROUTES_PARAMS="network gateway unreachable prohibit blackhole mtu"
55
56 # Proper error codes
57 EXIT_OK=0
58 EXIT_ERROR=1
59 EXIT_CONF_ERROR=2
60 EXIT_NOT_SUPPORTED=3
61 EXIT_NOT_HANDLED=4
62 EXIT_COMMAND_NOT_FOUND=127
63 EXIT_ERROR_ASSERT=128
64
65 EXIT_TRUE=0
66 EXIT_FALSE=1
67 EXIT_UNKNOWN=2
68
69 # Exit codes for IPv6 duplicate address detection (DAD)
70 EXIT_DAD_OK=0
71 EXIT_DAD_FAILED=8
72 EXIT_DAD_TENTATIVE=8
73
74 # Spanning Tree Protocol
75 EXIT_STP_KERNEL=1
76 EXIT_STP_ERROR=2
77
78 STATUS_UP=0
79 STATUS_DOWN=1
80 STATUS_NOCARRIER=2
81
82 DISCOVER_OK=0
83 DISCOVER_ERROR=1
84 DISCOVER_NOT_SUPPORTED=2
85
86 # The user is able to create zones that begin
87 # with these names followed by a number.
88 ZONE_LOCAL="net"
89 ZONE_NONLOCAL="upl"
90 VALID_ZONES="${ZONE_LOCAL} ${ZONE_NONLOCAL}"
91
92 SYS_CLASS_NET="/sys/class/net"
93
94 # Timeout values
95 TIMEOUT_RESTART=2
96
97 DEVICE_PRINT_LINE1=" %-24s %s\n"
98
99 PORT_PATTERN="pN"
100 PORT_PATTERN_ACCESSPOINT="apN"
101 PORT_PATTERN_BATMAN_ADV="batN"
102 PORT_PATTERN_WIRELESS="wN"
103 PORT_PATTERN_WIRELESS_ADHOC="adhocN"
104 PORT_PATTERN_WIRELESS_MONITOR="wmonN"