Add support for user-defined interfaces for Samba
[tomato.git] / release / src-rt-6.x.4708 / router / shared / defaults.c
blobeef80b87dbc8548ead5b9a90a4fdf0921dca39bb
1 #include <epivers.h>
2 #include <typedefs.h>
3 #include <string.h>
4 #include <ctype.h>
5 #include <bcmnvram.h>
6 #include <wlioctl.h>
7 #include <stdio.h>
8 #include <shared.h>
9 //#include <version.h>
10 #include <shutils.h>
12 #define XSTR(s) STR(s)
13 #define STR(s) #s
15 #include <tomato_config.h>
16 #include "tomato_profile.h"
18 //! = see restore_main()
20 struct nvram_tuple router_defaults[] = {
21 { "restore_defaults", "0" , 0 }, // Set to 0 to not restore defaults on boot
23 // LAN H/W parameters
24 { "lan_hwnames", "" , 0 }, // LAN driver names (e.g. et0)
25 { "lan_hwaddr", "" , 0 }, // LAN interface MAC address
27 // LAN TCP/IP parameters
28 { "lan_dhcp", "0" , 0 }, // DHCP client [static|dhcp]
29 { "lan_proto", "static" , 0 }, // DHCP server [static|dhcp] // no dhcp if router reboots with corrupted nvram
30 { "lan_ipaddr", "192.168.1.1" , 0 }, // LAN IP address
31 { "lan_netmask", "255.255.255.0" , 0 }, // LAN netmask
32 { "lan_wins", "" , 0 }, // x.x.x.x x.x.x.x ...
33 { "lan_domain", "" , 0 }, // LAN domain name
34 { "lan_lease", "86400" , 0 }, // LAN lease time in seconds
35 { "lan_stp", "0" , 0 }, // LAN spanning tree protocol
36 { "lan_route", "" , 0 }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
38 { "lan_gateway", "0.0.0.0" , 0 }, // LAN Gateway
39 { "wl_wds_enable", "0" , 0 }, // WDS Enable (0|1)
41 { "lan_state", "1" , 0 }, // Show Ethernet LAN ports state (0|1)
42 { "lan_desc", "1" , 0 }, // Show Ethernet LAN ports state (0|1)
43 { "lan_invert", "0" , 0 }, // Invert Ethernet LAN ports state (0|1)
45 { "lan1_ipaddr", "" , 0 },
46 { "lan1_netmask", "" , 0 },
47 { "lan1_stp", "0" , 0 },
48 { "lan2_ipaddr", "" , 0 },
49 { "lan2_netmask", "" , 0 },
50 { "lan2_stp", "0" , 0 },
51 { "lan3_ipaddr", "" , 0 },
52 { "lan3_netmask", "" , 0 },
53 { "lan3_stp", "0" , 0 },
55 // WAN H/W parameters
56 { "wan_hwname", "" , 0 }, // WAN driver name (e.g. et1)
57 { "wan_hwaddr", "" , 0 }, // WAN interface MAC address
58 { "wan_ifnameX", NULL , 0 }, // real wan if; see wan.c:start_wan
60 // WAN TCP/IP parameters
61 { "wan_proto", "dhcp" , 0 }, // [static|dhcp|pppoe|disabled]
62 { "wan_ipaddr", "0.0.0.0" , 0 }, // WAN IP address
63 { "wan_netmask", "0.0.0.0" , 0 }, // WAN netmask
64 { "wan_gateway", "0.0.0.0" , 0 }, // WAN gateway
65 { "wan_gateway_get", "0.0.0.0" , 0 }, // default gateway for PPP
66 { "wan_dns", "" , 0 }, // x.x.x.x x.x.x.x ...
67 #ifdef TCONFIG_DNSSEC
68 { "dnssec_enable", "0" , 0 },
69 #endif
70 #ifdef TCONFIG_DNSCRYPT
71 { "dnscrypt_proxy", "0" , 0 },
72 { "dnscrypt_priority", "1" , 0 }, // 0=none, 1=strict-order, 2=no-resolv
73 { "dnscrypt_port", "40" , 0 }, // local port
74 { "dnscrypt_resolver", "opendns" , 0 }, // default resolver
75 { "dnscrypt_log", "99" , 0 }, // log level
76 { "dnscrypt_manual", "0" , 0 }, // Set manual resolver
77 { "dnscrypt_provider_name", "" , 0 }, // Set manual provider name
78 { "dnscrypt_provider_key", "" , 0 }, // Set manual provider key
79 { "dnscrypt_resolver_address", "" , 0 }, // Set manual resolver address
80 #endif
81 { "wan_wins", "" , 0 }, // x.x.x.x x.x.x.x ...
82 { "wan_lease", "86400" , 0 }, // WAN lease time in seconds
83 { "wan_islan", "0" , 0 },
84 { "modem_ipaddr", "0.0.0.0" , 0 }, // modem IP address (i.e. PPPoE bridged modem)
86 { "wan_primary", "1" , 0 }, // Primary wan connection
87 { "wan_unit", "0" , 0 }, // Last configured connection
89 // DHCP server parameters
90 { "dhcp_start", "100" , 0 }, //
91 { "dhcp_num", "50" , 0 }, //
92 { "dhcpd_startip", "" , 0 }, // if empty, tomato will use dhcp_start/dchp_num for better compatibility
93 { "dhcpd_endip", "" , 0 }, // "
94 { "dhcp_lease", "1440" , 0 }, // LAN lease time in minutes
95 { "dhcp_domain", "wan" , 0 }, // Use WAN domain name first if available (wan|lan)
96 { "wan_get_dns", "" , 0 }, // DNS IP address which get by dhcpc // Add
97 { "wan_routes", "" , 0 },
98 { "wan_msroutes", "" , 0 },
100 { "dhcp1_start", "" , 0 },
101 { "dhcp1_num", "" , 0 },
102 { "dhcpd1_startip", "" , 0 },
103 { "dhcpd1_endip", "" , 0 },
104 { "dhcp1_lease", "1440" , 0 },
105 { "dhcp2_start", "" , 0 },
106 { "dhcp2_num", "" , 0 },
107 { "dhcpd2_startip", "" , 0 },
108 { "dhcpd2_endip", "" , 0 },
109 { "dhcp2_lease", "1440" , 0 },
110 { "dhcp3_start", "" , 0 },
111 { "dhcp3_num", "" , 0 },
112 { "dhcpd3_startip", "" , 0 },
113 { "dhcpd3_endip", "" , 0 },
114 { "dhcp3_lease", "1440" , 0 },
116 // 3G Modem
117 { "modem_pin", "" , 0 },
118 { "modem_dev", "ttyUSB0" , 0 },
119 { "modem_init", "*99#" , 0 },
120 { "modem_apn", "internet" , 0 },
121 { "modem_watchdog", "2" , 0 },
123 // PPPoE parameters
124 { "pppoe_ifname", "" , 0 }, // PPPoE enslaved interface
125 { "ppp_username", "" , 0 }, // PPP username
126 { "ppp_passwd", "" , 0 }, // PPP password
127 { "ppp_idletime", "5" , 0 }, // Dial on demand max idle time (mins)
128 { "ppp_keepalive", "0" , 0 }, // Restore link automatically
129 { "ppp_demand", "0" , 0 }, // Dial on demand
130 { "ppp_redialperiod", "10" , 0 }, // Redial Period (seconds)*/
131 { "ppp_mru", "1500" , 0 }, // Negotiate MRU to this value
132 { "ppp_mtu", "1500" , 0 }, // Negotiate MTU to the smaller of this value or the peer MRU
133 { "ppp_service", "" , 0 }, // PPPoE service name
134 { "ppp_ac", "" , 0 }, // PPPoE access concentrator name
135 { "ppp_static", "0" , 0 }, // Enable / Disable Static IP
136 { "ppp_static_ip", "" , 0 }, // PPPoE Static IP
137 { "ppp_get_ac", "" , 0 }, // PPPoE Server ac name
138 { "ppp_get_srv", "" , 0 }, // PPPoE Server service name
139 { "ppp_custom", "" , 0 }, // PPPD additional options
140 { "ppp_mlppp", "0" , 0 }, // PPPoE single line MLPPP
142 { "pppoe_lei", "10" , 0 },
143 { "pppoe_lef", "5" , 0 },
145 #ifdef TCONFIG_IPV6
146 // IPv6 parameters
147 { "ipv6_service", "" , 0 }, // [''|native|native-pd|6to4|sit|other]
148 { "ipv6_prefix", "" , 0 }, // The global-scope IPv6 prefix to route/advertise
149 { "ipv6_prefix_length", "64" , 0 }, // The bit length of the prefix. Used by dhcp6c. For radvd, /64 is always assumed.
150 { "ipv6_rtr_addr", "" , 0 }, // defaults to $ipv6_prefix::1
151 { "ipv6_radvd", "1" , 0 }, // Enable Router Advertisement (radvd)
152 { "ipv6_accept_ra", "1" , 0 }, // Accept RA on bit 0WAN and/or bit1LAN interfaces
153 { "ipv6_ifname", "six0" , 0 }, // The interface facing the rest of the IPv6 world
154 { "ipv6_tun_v4end", "0.0.0.0" , 0 }, // Foreign IPv4 endpoint of SIT tunnel
155 { "ipv6_relay", "1" , 0 }, // Foreign IPv4 endpoint host of SIT tunnel 192.88.99.?
156 { "ipv6_tun_addr", "" , 0 }, // IPv6 address to assign to local tunnel endpoint
157 { "ipv6_tun_addrlen", "64" , 0 }, // CIDR prefix length for tunnel's IPv6 address
158 { "ipv6_tun_mtu", "0" , 0 }, // Tunnel MTU, 0 for default
159 { "ipv6_tun_ttl", "255" , 0 }, // Tunnel TTL
160 { "ipv6_dns", "" , 0 }, // DNS server(s) IPs
161 { "ipv6_get_dns", "" , 0 }, // DNS IP address which get by dhcp6c
162 { "ipv6_6rd_prefix", "2602:100::" , 0 }, // 6RD prefix (Charter)
163 { "ipv6_6rd_prefix_length", "32" , 0 }, // 6RD prefix length (32-62) checkme
164 { "ipv6_6rd_borderrelay", "68.113.165.1" , 0 }, // 6RD border relay address
165 { "ipv6_6rd_ipv4masklen", "0" , 0 }, // 6RD IPv4 mask length (0-30) checkme
166 { "ipv6_vlan", "0" , 0 }, // Enable IPv6 on 1=LAN1 2=LAN2 4=LAN3
167 { "ipv6_pdonly", "0" , 0 }, // Request DHCPv6 Prefix Delegation Only
168 { "ipv6_ipsec", "1" , 0 }, // Enable Incoming IPv6 IPSec
169 #endif
171 #ifdef RTCONFIG_FANCTRL
172 { "fanctrl_dutycycle", "0" , 0 },
173 #endif
175 // Wireless parameters
176 { "wl_ifname", "" , 0 }, // Interface name
177 { "wl_hwaddr", "" , 0 }, // MAC address
178 { "wl_phytype", "v" , 0 }, // Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) // Modify
179 { "wl_corerev", "" , 0 }, // Current core revision
180 { "wl_phytypes", "" , 0 }, // List of supported wireless bands (e.g. "ga")
181 { "wl_radioids", "" , 0 }, // List of radio IDs
182 { "wl_ssid", "Tomato24" , 0 }, // Service set ID (network name)
183 #ifdef TCONFIG_AC3200
184 { "wl0_ssid", "Tomato24" , 0 }, // Service set ID (network name)
185 { "wl1_ssid", "Tomato50-1" , 0 },
186 { "wl2_ssid", "Tomato50-2" , 0 },
187 #else
188 { "wl1_ssid", "Tomato50" , 0 },
189 #endif
190 { "wl_country_code", "" , 0 }, // Country (default obtained from driver)
191 { "wl_radio", "1" , 0 }, // Enable (1) or disable (0) radio
192 { "wl1_radio", "1" , 0 }, // Enable (1) or disable (0) radio
193 #ifdef TCONFIG_AC3200
194 { "wl2_radio", "1" , 0 }, // Enable (1) or disable (0) radio
195 #endif
196 { "wl_closed", "0" , 0 }, // Closed (hidden) network
197 { "wl_ap_isolate", "0" , 0 }, // AP isolate mode
198 { "wl_mode", "ap" , 0 }, // AP mode (ap|sta|wds)
199 { "wl_lazywds", "1" , 0 }, // Enable "lazy" WDS mode (0|1)
200 { "wl_wds", "" , 0 }, // xx:xx:xx:xx:xx:xx ...
201 { "wl_wds_timeout", "1" , 0 }, // WDS link detection interval defualt 1 sec*/
202 { "wl_wep", "disabled" , 0 }, // WEP data encryption (enabled|disabled)
203 { "wl_auth", "0" , 0 }, // Shared key authentication optional (0) or required (1)
204 { "wl_key", "1" , 0 }, // Current WEP key
205 { "wl_key1", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
206 { "wl_key2", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
207 { "wl_key3", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
208 { "wl_key4", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
209 { "wl_channel", "6" , 0 }, // Channel number
210 { "wl_rate", "0" , 0 }, // Rate (bps, 0 for auto)
211 { "wl_mrate", "0" , 0 }, // Mcast Rate (bps, 0 for auto)
212 { "wl_rateset", "default" , 0 }, // "default" or "all" or "12"
213 { "wl_frag", "2346" , 0 }, // Fragmentation threshold
214 { "wl_rts", "2347" , 0 }, // RTS threshold
215 { "wl_dtim", "1" , 0 }, // DTIM period (3.11.5)*/ // It is best value for WiFi test
216 { "wl_bcn", "100" , 0 }, // Beacon interval
217 { "wl_plcphdr", "long" , 0 }, // 802.11b PLCP preamble type
218 { "wl_net_mode", "mixed" , 0 }, // Wireless mode (mixed|g-only|b-only|disable)
219 { "wl_gmode", "1" , 0 }, // 54g mode
220 { "wl_gmode_protection", "off" , 0 }, // 802.11g RTS/CTS protection (off|auto)
221 { "wl_afterburner", "off" , 0 }, // AfterBurner
222 { "wl_frameburst", "off" , 0 }, // BRCM Frambursting mode (off|on)
223 { "wl_wme", "auto" , 0 }, // WME mode (auto|off|on)
224 { "wl_antdiv", "-1" , 0 }, // Antenna Diversity (-1|0|1|3)
225 { "wl_infra", "1" , 0 }, // Network Type (BSS/IBSS)
226 { "wl_btc_mode", "0" , 0 }, // !!TB - BT Coexistence Mode
227 { "wl_sta_retry_time", "5" , 0 }, // !!TB - Seconds between association attempts (0 to disable retries)
228 { "wl_mitigation", "0" , 0 }, // Interference Mitigation Mode (0|1|2|3|4)
230 { "wl_passphrase", "" , 0 }, // Passphrase // Add
231 { "wl_wep_bit", "128" , 0 }, // WEP encryption [64 | 128] // Add
232 { "wl_wep_buf", "" , 0 }, // save all settings for web // Add
233 { "wl_wep_gen", "" , 0 }, // save all settings for generate button // Add
234 { "wl_wep_last", "" , 0 }, // Save last wl_wep mode // Add
236 { "wl_vifs", "" , 0 }, // multiple/virtual BSSIDs
238 // WPA parameters
239 { "wl_security_mode", "disabled" , 0 }, // WPA mode (disabled|radius|wpa_personal|wpa_enterprise|wep|wpa2_personal|wpa2_enterprise) for WEB // Add
240 { "wl_auth_mode", "none" , 0 }, // Network authentication mode (radius|none)
241 { "wl_wpa_psk", "" , 0 }, // WPA pre-shared key
242 { "wl_wpa_gtk_rekey", "3600" , 0 }, // WPA GTK rekey interval // Modify
243 { "wl_radius_ipaddr", "" , 0 }, // RADIUS server IP address
244 { "wl_radius_key", "" , 0 }, // RADIUS shared secret
245 { "wl_radius_port", "1812" , 0 }, // RADIUS server UDP port
246 { "wl_crypto", "aes" , 0 }, // WPA data encryption
247 { "wl_net_reauth", "36000" , 0 }, // Network Re-auth/PMK caching duration
248 { "wl_akm", "" , 0 }, // WPA akm list
250 // WME parameters (cwmin cwmax aifsn txop_b txop_ag adm_control oldest_first)
251 // EDCA parameters for STA
252 { "wl_wme_sta_bk", "15 1023 7 0 0 off off" , 0 }, // WME STA AC_BK paramters
253 { "wl_wme_sta_be", "15 1023 3 0 0 off off" , 0 }, // WME STA AC_BE paramters
254 { "wl_wme_sta_vi", "7 15 2 6016 3008 off off" , 0 }, // WME STA AC_VI paramters
255 { "wl_wme_sta_vo", "3 7 2 3264 1504 off off" , 0 }, // WME STA AC_VO paramters
257 // EDCA parameters for AP
258 { "wl_wme_ap_bk", "15 1023 7 0 0 off off" , 0 }, // WME AP AC_BK paramters
259 { "wl_wme_ap_be", "15 63 3 0 0 off off" , 0 }, // WME AP AC_BE paramters
260 { "wl_wme_ap_vi", "7 15 1 6016 3008 off off" , 0 }, // WME AP AC_VI paramters
261 { "wl_wme_ap_vo", "3 7 1 3264 1504 off off" , 0 }, // WME AP AC_VO paramters
263 { "wl_wme_no_ack", "off" , 0 }, // WME No-Acknowledgmen mode
264 { "wl_wme_apsd", "on" , 0 }, // WME APSD mode
265 { "wl_wme_bss_disable", "0" , 0 }, // WME BSS disable advertising (off|on)
267 /* Per AC Tx parameters */
268 { "wl_wme_txp_be", "7 3 4 2 0" , 0 }, /* WME AC_BE Tx parameters */
269 { "wl_wme_txp_bk", "7 3 4 2 0" , 0 }, /* WME AC_BK Tx parameters */
270 { "wl_wme_txp_vi", "7 3 4 2 0" , 0 }, /* WME AC_VI Tx parameters */
271 { "wl_wme_txp_vo", "7 3 4 2 0" , 0 }, /* WME AC_VO Tx parameters */
273 { "wl_unit", "0" , 0 }, // Last configured interface
274 { "wl_mac_deny", "" , 0 }, // filter MAC // Add
276 { "wl_leddc", "0x640000" , 0 }, // !!TB - 100% duty cycle for LED on router (WLAN LED fix for some routers)
277 { "wl_bss_enabled", "1" , 0 }, // !!TB - If not present the new versions of wlconf may not bring up wlan
278 { "wl_reg_mode", "off" , 0 }, // !!TB - Regulatory: 802.11H(h)/802.11D(d)/off(off)
280 // !!TB: n-mode
281 { "wl_nmode", "-1" , 0 }, // N-mode
282 { "wl_nband", "2" , 0 }, // 2 - 2.4GHz, 1 - 5GHz, 0 - Auto
283 #ifdef TCONFIG_AC3200
284 { "wl1_nband", "1" , 0 },
285 { "wl2_nband", "1" , 0 },
286 #else
287 { "wl1_nband", "1" , 0 },
288 #endif
289 { "wl_nmcsidx", "-1" , 0 }, // MCS Index for N - rate
290 { "wl_nreqd", "0" , 0 }, // Require 802.11n support
291 { "wl_nbw", "40" , 0 }, // BW: 20 / 40 MHz
292 { "wl_nbw_cap", "1" , 0 }, // BW: def 20inB and 40inA
293 { "wl_mimo_preamble", "mm" , 0 }, // 802.11n Preamble: mm/gf/auto/gfbcm
294 { "wl_nctrlsb", "upper" , 0 }, // N-CTRL SB (none/lower/upper)
295 { "wl_nmode_protection", "off" , 0 }, // 802.11n RTS/CTS protection (off|auto)
296 { "wl_rxstreams", "0" , 0 }, // 802.11n Rx Streams, 0 is invalid, WLCONF will change it to a radio appropriate default
297 { "wl_txstreams", "0" , 0 }, // 802.11n Tx Streams 0, 0 is invalid, WLCONF will change it to a radio appropriate default
298 { "wl_dfs_preism", "60" , 0 }, // 802.11H pre network CAC time
299 { "wl_dfs_postism", "60" , 0 }, // 802.11H In Service Monitoring CAC time
300 { "wl_radarthrs", "1 0x6c0 0x6e0 0x6bc 0x6e0 0x6ac 0x6cc 0x6bc 0x6e0" , 0 }, // Radar thrs params format: version thresh0_20 thresh1_20 thresh0_40 thresh1_40
301 { "wl_bcn_rotate", "1" , 0 }, // Beacon rotation
302 { "wl_vlan_prio_mode", "off" , 0 }, // VLAN Priority support
303 { "wl_obss_coex", "0" , 0 }, // OBSS Coexistence (0|1): when enabled, channel width is forced to 20MHz
305 #ifdef TCONFIG_EMF
306 { "emf_entry", "" , 0 }, // Static MFDB entry (mgrp:if)
307 { "emf_uffp_entry", "" , 0 }, // Unreg frames forwarding ports
308 { "emf_rtport_entry", "" , 0 }, // IGMP frames forwarding ports
309 { "emf_enable", "0" , 0 }, // Disable EMF by default
310 #endif
311 #ifdef CONFIG_BCMWL5
312 // AMPDU
313 { "wl_ampdu", "auto" , 0 }, // Default AMPDU setting
314 { "wl_ampdu_rtylimit_tid", "5 5 5 5 5 5 5 5" , 0 }, // Default AMPDU retry limit per-tid setting
315 { "wl_ampdu_rr_rtylimit_tid", "2 2 2 2 2 2 2 2" , 0 }, // Default AMPDU regular rate retry limit per-tid setting
316 { "wl_amsdu", "auto" , 0 }, // Default AMSDU setting
317 // power save
318 #ifdef TCONFIG_BCMWL6
319 { "wl_bss_opmode_cap_reqd", "0" , 0 },
320 #endif
321 #ifndef TCONFIG_BCMARM
322 { "wl_rxchain_pwrsave_enable", "1" , 0 }, // Rxchain powersave enable
323 { "wl_rxchain_pwrsave_quiet_time","1800" , 0 }, // Quiet time for power save
324 { "wl_rxchain_pwrsave_pps", "10" , 0 }, // Packets per second threshold for power save
325 { "wl_rxchain_pwrsave_stas_assoc_check", "0" , 0 }, /* STAs associated before powersave */
326 #endif
327 { "wl_radio_pwrsave_enable", "0" , 0 }, // Radio powersave enable
328 { "wl_radio_pwrsave_quiet_time","1800" , 0 }, // Quiet time for power save
329 { "wl_radio_pwrsave_pps", "10" , 0 }, // Packets per second threshold for power save
330 { "wl_radio_pwrsave_on_time", "50" , 0 }, // Radio on time for power save
331 { "acs_mode", "legacy" , 0 }, /* Legacy mode if ACS is enabled */
332 // misc
333 { "wl_wmf_bss_enable", "0" , 0 }, // Wireless Multicast Forwarding Enable/Disable
334 { "wl_rifs_advert", "auto" , 0 }, // RIFS mode advertisement
335 { "wl_stbc_tx", "auto" , 0 }, // Default STBC TX setting
336 { "wl_mcast_regen_bss_enable", "1" , 0 }, // MCAST REGEN Enable/Disable
337 #endif
338 #ifdef TCONFIG_BCMWL6
339 { "wl_ack_ratio", "0"},
340 { "wl_ampdu_mpdu", "0"},
341 { "wl_ampdu_rts", "1"},
342 #ifdef TCONFIG_BCMARM
343 { "wl_turbo_qam", "1"},
344 { "wl_itxbf", "1"},
345 { "wl0_itxbf", "0"},
346 #endif
347 #endif
349 #ifdef TCONFIG_BCM7
350 { "wl_acs_dfs", "2", 0 }, /* acsd fcs disable init DFS chan */
351 #else
352 { "wl_acs_dfs", "0", 0 }, /* Enable first DFS chan Selection */
353 #endif
354 { "wl_dcs_csa_unicast", "1", 0 }, /* Enable unicast CSA */
355 /* Exclude ACSD to select 140l, 144u, 140/80, 144/80 to compatible with Ducati 11N */
356 { "wl_acs_excl_chans", "0xd98e,0xd88e,0xe28a,0xe38a", 0 },
357 { "wl_pspretend_retry_limit", "5", 0 }, /* Enable PsPretend */
358 #ifndef TCONFIG_BCM7
359 { "wl_pspretend_threshold", "0", 0 }, /* Disable PsPretend Threshold */
360 #endif
361 { "wl_acs_chan_dwell_time", "70", 0 }, /* WAR for AP to stay on DFS chan */
362 { "wl_frameburst", "on", 0 }, /* BRCM Frambursting mode (off|on) */
363 { "wl_amsdu", "off", 0 }, /* Default IPTV AMSDU setting */
364 { "wl_rx_amsdu_in_ampdu", "off", 0 }, /* Media RX AMSDU In AMPDU setting */
365 #ifdef BCM_BSD
366 { "bsd_role", "0", 0 }, /* Band Steer Daemon */
367 /* 0:Disable, 1:Primary, 2:Helper, 3:Standalone */
368 { "bsd_hport", "9877", 0 }, /* BSD helper port */
369 { "bsd_pport", "9878", 0 }, /* BSD Primary port */
370 { "bsd_helper", "192.168.1.2", 0 }, /* BSD primary ipaddr */
371 { "bsd_primary", "192.168.1.1", 0 }, /* BSD Helper ipaddr */
372 { "smart_connect_x", "0", 0 }, /* 0:Disable, 1:Tri-band, 2:5GHz */
373 #ifdef TCONFIG_AC3200
374 {"bsd_ifnames", "eth2 eth1 eth3", 0 },
375 {"wl0_bsd_steering_policy", "0 5 3 -52 0 110 0x22", 0 },
376 {"wl1_bsd_steering_policy", "80 5 3 -82 0 0 0x0", 0 },
377 {"wl2_bsd_steering_policy", "0 5 3 -82 0 0 0x8", 0 },
378 {"wl0_bsd_sta_select_policy", "2 -52 0 110 0 0 -1 0 0 0 0x122", 0 },
379 {"wl1_bsd_sta_select_policy", "2 -82 0 0 0 0 1 0 0 0 0x4", 0 },
380 {"wl2_bsd_sta_select_policy", "2 -82 0 0 0 0 1 0 0 0 0x8", 0 },
381 {"wl0_bsd_if_select_policy", "eth3 eth1", 0 },
382 {"wl1_bsd_if_select_policy", "eth2 eth3", 0 },
383 {"wl2_bsd_if_select_policy", "eth2 eth1", 0 },
384 {"wl0_bsd_if_qualify_policy", "0 0x0", 0 },
385 {"wl1_bsd_if_qualify_policy", "60 0x0", 0 },
386 {"wl2_bsd_if_qualify_policy", "0 0x4", 0 },
387 {"bsd_bounce_detect", "180 1 3600", 0 },
388 #endif
389 #endif
390 #ifdef TCONFIG_BCM7
391 { "wl_dfs_pref", "", 0 }, /* DFS Preferred channel value */
392 { "wl_probresp_mf", "0", 0 }, /* MAC filter based probe response */
393 { "wl_probresp_sw", "1", 0 }, /* SW probe response */
394 { "wl_vht_features", "-1", 0 }, /* VHT features */
395 #endif
397 { "pptp_server_ip", "" , 0 }, // as same as WAN gateway
398 { "ppp_get_ip", "" , 0 }, // IP Address assigned by PPTP/L2TP server
399 { "pptp_dhcp", "1" , 0 },
401 // for firewall
402 { "mtu_enable", "0" , 0 }, // WAN MTU [1|0]
403 { "wan_mtu", "1500" , 0 }, // Negotiate MTU to the smaller of this value or the peer MRU
405 { "l2tp_server_ip", "" , 0 }, // L2TP auth server (IP Address)
407 // misc
408 { "wl_tnoise", "-99" , 0 },
409 { "led_override", "" , 0 },
410 { "btn_override", "" , 0 },
411 { "btn_reset", "" , 0 },
412 { "env_path", "" , 0 },
413 { "manual_boot_nv", "0" , 0 },
414 { "t_fix1", "" , 0 },
416 // basic-ddns
417 { "ddnsx0", "" , 0 },
418 { "ddnsx1", "" , 0 },
419 { "ddnsx0_cache", "" , 0 },
420 { "ddnsx1_cache", "" , 0 },
421 { "ddnsx_save", "1" , 0 },
422 { "ddnsx_refresh", "28" , 0 },
424 // basic-ident
425 { "router_name", "TomatoUSB" , 0 },
426 { "wan_hostname", "unknown" , 0 },
427 { "wan_domain", "" , 0 },
429 // basic-time
430 { "tm_sel", "CET-1CEST,M3.5.0/2,M10.5.0/3" , 0 },
431 { "tm_tz", "CET-1CEST,M3.5.0/2,M10.5.0/3" , 0 },
432 { "tm_dst", "1" , 0 },
433 { "ntp_updates", "4" , 0 },
434 { "ntp_tdod", "0" , 0 },
435 { "ntp_server", "0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org" , 0 },
436 { "ntp_kiss", "" , 0 },
437 { "ntp_kiss_ignore", "" , 0 },
439 // basic-static
440 { "dhcpd_static", "" , 0 },
441 { "dhcpd_static_only", "0" , 0 },
442 // basic-wfilter
443 { "wl_maclist", "" , 0 }, // xx:xx:xx:xx:xx:xx ...
444 { "wl_macmode", "disabled" , 0 },
445 { "macnames", "" , 0 },
447 // advanced-ctnf
448 { "ct_tcp_timeout", "" , 0 },
449 { "ct_udp_timeout", "" , 0 },
450 { "ct_timeout", "" , 0 },
451 { "ct_max", "" , 0 },
452 { "nf_ttl", "0" , 0 },
453 { "nf_l7in", "1" , 0 },
454 #ifdef LINUX26
455 { "nf_sip", "1" , 0 },
456 { "ct_hashsize", "2048" , 0 },
457 #endif
458 #ifdef LINUX26
459 { "nf_rtsp", "0" , 0 },
460 #else
461 { "nf_rtsp", "1" , 0 },
462 #endif
463 { "nf_pptp", "1" , 0 },
464 { "nf_h323", "1" , 0 },
465 { "nf_ftp", "1" , 0 },
467 // advanced-mac
468 { "mac_wan", "" , 0 },
469 { "wl_macaddr", "" , 0 },
471 // advanced-misc
472 { "boot_wait", "on" , 0 },
473 { "wait_time", "5" , 0 },
474 { "wan_speed", "4" , 0 }, // 0=10 Mb Full, 1=10 Mb Half, 2=100 Mb Full, 3=100 Mb Half, 4=Auto
475 { "jumbo_frame_enable", "0" , 0 }, // Jumbo Frames support (for RT-N16/WNR3500L)
476 { "jumbo_frame_size", "2000" , 0 },
477 #ifdef CONFIG_BCMWL5
478 { "ctf_disable", "1" , 0 },
479 #endif
480 #ifdef TCONFIG_BCMFA
481 { "ctf_fa_mode", "0" , 0 },
482 #endif
484 // advanced-dhcpdns
485 { "dhcpd_dmdns", "1" , 0 },
486 { "dhcpd_slt", "0" , 0 },
487 { "dhcpd_gwmode", "" , 0 },
488 { "dhcpd_lmax", "" , 0 },
489 { "dns_addget", "0" , 0 },
490 { "dns_intcpt", "0" , 0 },
491 { "dhcpc_minpkt", "1" , 0 },
492 { "dhcpc_custom", "" , 0 },
493 { "dns_norebind", "1" , 0 },
494 { "dnsmasq_custom", "" , 0 },
495 { "dnsmasq_static_only", "0" , 0 },
496 { "dnsmasq_q", "0" , 0 }, //Bit0=quiet-dhcp, 1=dhcp6, 2=ra
498 // advanced-firewall
499 { "nf_loopback", "0" , 0 },
500 { "block_wan", "1" , 0 }, // block inbound icmp
501 { "block_wan_limit", "1" , 0 },
502 { "block_wan_limit_icmp", "1" , 0 },
503 { "block_wan_limit_tr", "5" , 0 },
504 { "multicast_pass", "0" , 0 }, // enable multicast proxy
505 { "multicast_lan", "0" , 0 }, // on LAN (br0)
506 { "multicast_lan1", "0" , 0 }, // on LAN1 (br1)
507 { "multicast_lan2", "0" , 0 }, // on LAN2 (br2)
508 { "multicast_lan3", "0" , 0 }, // on LAN3 (br3)
509 { "udpxy_enable", "0" , 0 },
510 { "udpxy_stats", "0" , 0 },
511 { "udpxy_clients", "3" , 0 },
512 { "udpxy_port", "4022" , 0 },
513 { "ne_syncookies", "0" , 0 }, // tcp_syncookies
514 { "DSCP_fix_enable", "1" , 0 }, // Comacst DSCP fix
515 { "ne_snat", "0" , 0 }, // use SNAT instead of MASQUERADE
516 { "dhcp_pass", "1" , 0 }, // allow DHCP responses
517 { "ne_shlimit", "1,3,60" , 0 }, //shibby - enable limit connection attempts for sshd
519 // advanced-routing
520 { "routes_static", "" , 0 },
521 { "dhcp_routes", "1" , 0 },
522 { "wk_mode", "gateway" , 0 }, // Network mode [gateway|router]
523 #ifdef TCONFIG_ZEBRA
524 { "dr_setting", "0" , 0 }, // [ Disable | WAN | LAN | Both ]
525 { "dr_lan_tx", "0" , 0 }, // Dynamic-Routing LAN out
526 { "dr_lan_rx", "0" , 0 }, // Dynamic-Routing LAN in
527 { "dr_lan1_tx", "0" , 0 }, // Dynamic-Routing LAN out
528 { "dr_lan1_rx", "0" , 0 }, // Dynamic-Routing LAN in
529 { "dr_lan2_tx", "0" , 0 }, // Dynamic-Routing LAN out
530 { "dr_lan2_rx", "0" , 0 }, // Dynamic-Routing LAN in
531 { "dr_lan3_tx", "0" , 0 }, // Dynamic-Routing LAN out
532 { "dr_lan3_rx", "0" , 0 }, // Dynamic-Routing LAN in
533 { "dr_wan_tx", "0" , 0 }, // Dynamic-Routing WAN out
534 { "dr_wan_rx", "0" , 0 }, // Dynamic-Routing WAN in
535 #endif
537 // advanced-vlan
538 { "trunk_vlan_so", "0" , 0 }, // VLAN trunk support override
540 // advanced-wireless
541 { "wl_txant", "3" , 0 },
542 { "wl_txpwr", "0" , 0 },
543 { "wl_maxassoc", "128" , 0 }, // Max associations driver could support
544 { "wl_bss_maxassoc", "128" , 0 },
545 { "wl_distance", "" , 0 },
547 // forward-*
548 { "portforward", "0<3<1.1.1.0/24<1000:2000<<192.168.1.2<ex: 1000 to 2000, restricted>0<2<<1000,2000<<192.168.1.2<ex: 1000 and 2000>0<1<<1000<2000<192.168.1.2<ex: different internal port>0<3<<1000:2000,3000<<192.168.1.2<ex: 1000 to 2000, and 3000>" , 0 },
549 #ifdef TCONFIG_IPV6
550 { "ipv6_portforward", "", 0 },
551 #endif
552 { "trigforward", "0<1<3000:4000<5000:6000<ex: open 5000-6000 if 3000-4000>" , 0 },
553 { "dmz_enable", "0" , 0 },
554 { "dmz_ipaddr", "0" , 0 },
555 { "dmz_sip", "" , 0 },
556 { "dmz_ifname", "br0" , 0 },
557 { "dmz_ra", "1" , 0 },
559 // forward-upnp
560 { "upnp_enable", "0" , 0 },
561 { "upnp_secure", "1" , 0 },
562 { "upnp_port", "0" , 0 },
563 { "upnp_ssdp_interval", "60" , 0 }, // SSDP interval
564 { "upnp_mnp", "0" , 0 },
565 { "upnp_custom", "" , 0 },
567 { "upnp_clean", "1" , 0 }, /* 0:Disable 1:Enable */
568 { "upnp_clean_interval", "600" , 0 }, /* Cleaning interval in seconds */
569 { "upnp_clean_threshold", "20" , 0 }, /* Threshold for cleaning unused rules */
570 #if 0 // disabled for miniupnpd
571 { "upnp_max_age", "180" , 0 }, // Max age
572 { "upnp_config", "0" , 0 },
573 #endif
575 // qos
576 { "atm_overhead", "0" , 0 },
577 { "qos_enable", "0" , 0 },
578 { "qos_ack", "0" , 0 },
579 { "qos_syn", "1" , 0 },
580 { "qos_fin", "1" , 0 },
581 { "qos_rst", "1" , 0 },
582 { "qos_udp", "0" , 0 },
583 { "qos_icmp", "1" , 0 },
584 { "qos_pfifo", "3" , 0 }, //Set FQ_Codel Default Qdisc Scheduler
585 { "qos_reset", "1" , 0 },
586 { "qos_obw", "700" , 0 },
587 { "qos_ibw", "16000" , 0 },
588 { "qos_orules", "0<<-1<d<53<0<<0:10<<0<DNS>0<<-1<d<37<0<<0:10<<0<Time>0<<17<d<123<0<<0:10<<0<NTP>0<<-1<d<3455<0<<0:10<<0<RSVP>0<<-1<d<9<0<<0:50<<3<SCTP, Discard>0<<-1<x<135,2101,2103,2105<0<<<<3<RPC (Microsoft)>0<<17<d<3544<0<<<<-1<Teredo Tunnel>0<<6<x<22,2222<0<<<<2<SSH>0<<6<d<23,992<0<<<<2<Telnet>0<<6<s<80,5938,8080,2222<0<<<<2<Remote Access>0<<-1<x<3389<0<<<<2<Remote Assistance>0<<-1<x<1220,6970:7170,8554<0<<<<4<Quicktime/RealAudio>0<<-1<x<554,5004,5005<0<<<<4<RTP, RTSP>0<<-1<x<1755<0<<<<4<MMS (Microsoft)>0<<-1<d<3478,3479,5060:5063<0<<<<1<SIP, Sipgate Stun Services>0<<-1<s<53,88,3074<0<<<<1<Xbox Live>0<<6<d<1718:1720<0<<<<1<H323>0<<-1<d<4380,27000:27050,11031,11235:11335,11999,2300:2400,6073,28800:29100,47624<0<<<<1<Various Games>0<<-1<d<1493,1502,1503,1542,1863,1963,3389,5061,5190:5193,7001<0<<<<5<MSGR1 - Windows Live>0<<-1<d<1071:1074,1455,1638,1644,5000:5010,5050,5100,5101,5150,8000:8002<0<<<<5<MSGR2 - Yahoo>0<<-1<d<194,1720,1730:1732,5220:5223,5298,6660:6669,22555<0<<<<5<MSGR3 - Additional>0<<-1<d<19294:19310<0<<<<5<Google+ & Voice>0<<6<d<6005,6006<0<<<<5<Camfrog>0<<-1<x<6571,6891:6901<0<<<<5<WLM File/Webcam>0<<-1<x<29613<0<<<<5<Skype incoming>0<<6<x<4244,5242<0<<<<1<Viber TCP>0<<17<x<5243,9785<0<<<<1<Viber UDP>0<<17<x<3478:3497,16384:16387,16393:16402<0<<<<5<Apple Facetime/Game Center>0<<6<d<443<0<<0:512<<3<HTTPS>0<<6<d<443<0<<512:<<5<HTTPS>0<<17<d<443<0<<0:512<<3<QUIC>0<<17<d<443<0<<512:<<5<QUIC>0<<-1<a<<0<skypetoskype<<<1<Skype to Skype>0<<-1<a<<0<skypeout<<<-1<Skype Phone (deprecated)>0<<-1<a<<0<youtube-2012<<<4<YouTube 2012 (Youtube)>0<<-1<a<<0<httpvideo<<<4<HTTP Video (Youtube)>0<<-1<a<<0<flash<<<4<Flash Video (Youtube)>0<<-1<a<<0<rtp<<<4<RTP>0<<-1<a<<0<rtmp<<<4<RTMP>0<<-1<a<<0<shoutcast<<<4<Shoutcast>0<<-2<a<<0<rtmpt<<<4<RTMPT (RTMP over HTTP)>0<<-1<a<<0<irc<<<5<IRC>0<<6<d<80,8080<0<<0:512<<3<HTTP, HTTP Proxy>0<<6<d<80,8080<0<<512:<<7<HTTP, HTTP Proxy File Transfers>0<<6<d<20,21,989,990<0<<<<7<FTP>0<<6<d<25,587,465,2525<0<<<<6<SMTP, Submission Mail>0<<6<d<110,995<0<<<<6<POP3 Mail>0<<6<d<119,563<0<<<<7<NNTP News & Downloads>0<<6<d<143,220,585,993<0<<<<6<IMAP Mail>0<<17<d<1:65535<0<<<<8<P2P (uTP, UDP)" , 0 },
590 { "qos_orules", "0<<-1<d<53<0<<0:10<<0<DNS>0<<-1<d<37<0<<0:10<<0<Time>0<<17<d<123<0<<0:10<<0<NTP>0<<-1<d<3455<0<<0:10<<0<RSVP>0<<-1<d<9<0<<0:50<<3<SCTP, Discard>0<<-1<x<135,2101,2103,2105<0<<<<3<RPC (Microsoft)>0<<17<d<3544<0<<<<-1<Teredo Tunnel>0<<6<x<22,2222<0<<<<2<SSH>0<<6<d<23,992<0<<<<2<Telnet>0<<6<s<80,5938,8080,2222<0<<<<2<Remote Access>0<<-1<x<3389<0<<<<2<Remote Assistance>0<<-1<x<1220,6970:7170,8554<0<<<<4<Quicktime/RealAudio>0<<-1<x<554,5004,5005<0<<<<4<RTP, RTSP>0<<-1<x<1755<0<<<<4<MMS (Microsoft)>0<<-1<d<3478,3479,5060:5063<0<<<<1<SIP, Sipgate Stun Services>0<<-1<s<53,88,3074<0<<<<1<Xbox Live>0<<6<d<1718:1720<0<<<<1<H323>0<<-1<d<4380,27000:27050,11031,11235:11335,11999,2300:2400,6073,28800:29100,47624<0<<<<1<Various Games>0<<-1<d<1493,1502,1503,1542,1863,1963,3389,5061,5190:5193,7001<0<<<<5<MSGR1 - Windows Live>0<<-1<d<1071:1074,1455,1638,1644,5000:5010,5050,5100,5101,5150,8000:8002<0<<<<5<MSGR2 - Yahoo>0<<-1<d<194,1720,1730:1732,5220:5223,5298,6660:6669,22555<0<<<<5<MSGR3 - Additional>0<<-1<d<19294:19310<0<<<<5<Google+ & Voice>0<<6<d<6005,6006<0<<<<5<Camfrog>0<<-1<x<6571,6891:6901<0<<<<5<WLM File/Webcam>0<<-1<x<29613<0<<<<5<Skype incoming>0<<6<x<4244,5242<0<<<<1<Viber TCP>0<<17<x<5243,9785<0<<<<1<Viber UDP>0<<17<x<3478:3497,16384:16387,16393:16402<0<<<<5<Apple Facetime/Game Center>0<<6<d<443<0<<0:512<<3<HTTPS>0<<6<d<443<0<<512:<<5<HTTPS>0<<17<d<443<0<<0:512<<3<QUIC>0<<17<d<443<0<<512:<<5<QUIC>0<<-1<a<<0<skypetoskype<<<1<Skype to Skype>0<<-1<a<<0<skypeout<<<-1<Skype Phone (deprecated)>0<<-1<a<<0<youtube-2012<<<4<YouTube 2012 (Youtube)>0<<-1<a<<0<httpvideo<<<4<HTTP Video (Youtube)>0<<-1<a<<0<flash<<<4<Flash Video (Youtube)>0<<-1<a<<0<rtp<<<4<RTP>0<<-1<a<<0<rtmp<<<4<RTMP>0<<-1<a<<0<shoutcast<<<4<Shoutcast>0<<-2<a<<0<rtmpt<<<4<RTMPT (RTMP over HTTP)>0<<-1<a<<0<irc<<<5<IRC>0<<6<d<80,8080<0<<0:512<<3<HTTP, HTTP Proxy>0<<6<d<80,8080<0<<512:<<7<HTTP, HTTP Proxy File Transfers>0<<6<d<20,21,989,990<0<<<<7<FTP>0<<6<d<25,587,465,2525<0<<<<6<SMTP, Submission Mail>0<<6<d<110,995<0<<<<6<POP3 Mail>0<<6<d<119,563<0<<<<7<NNTP News & Downloads>0<<6<d<143,220,585,993<0<<<<6<IMAP Mail>0<<17<d<1:65535<0<<<<8<P2P (uTP, UDP)" , 0 },
592 { "qos_burst0", "" , 0 },
593 { "qos_burst1", "" , 0 },
594 { "qos_default", "8" , 0 },
595 { "qos_orates", "5-100,5-30,5-100,5-70,5-70,5-70,5-70,5-100,5-30,1-1" , 0 },
596 { "qos_irates", "5-100,2-20,5-100,10-90,20-90,5-90,5-70,5-100,5-30,1-1" , 0 },
597 { "qos_irates", "5-100,5-30,5-100,5-70,5-70,5-70,5-70,5-100,5-30,1-1" , 0 },
598 { "qos_classnames", "Service VOIP/Game Remote WWW Media HTTPS/Msgr Mail FileXfer P2P/Bulk Crawl" , 0 },
600 { "ne_vegas", "0" , 0 }, // TCP Vegas
601 { "ne_valpha", "2" , 0 }, // "
602 { "ne_vbeta", "6" , 0 }, // "
603 { "ne_vgamma", "2" , 0 }, // "
605 // access restrictions
606 { "rruleN", "0" , 0 },
607 { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" , 0 },
608 { "rrulewp", "80,8080" , 0 },
610 #if TOMATO_SL
611 // samba
612 { "smbd_on", "0" , 0 },
613 { "nmbd_on", "0" , 0 },
614 { "smbd_wgroup", "WORKGROUP" , 0 },
615 { "smbd_nbname", "TOMATO" , 0 },
616 { "smbd_adminpass", "admin" , 0 },
617 #endif
619 // admin-access
620 { "http_username", "" , 0 }, // Username
621 { "http_passwd", "admin" , 0 }, // Password
622 { "remote_management", "0" , 0 }, // Remote Management [1|0]
623 { "remote_mgt_https", "0" , 0 }, // Remote Management use https [1|0]
624 { "http_wanport", "8080" , 0 }, // WAN port to listen on
625 { "http_lanport", "80" , 0 }, // LAN port to listen on
626 { "https_lanport", "443" , 0 }, // LAN port to listen on
627 { "http_enable", "1" , 0 }, // HTTP server enable/disable
628 { "https_enable", "0" , 0 }, // HTTPS server enable/disable
629 { "https_crt_save", "0" , 0 },
630 { "https_crt_cn", "" , 0 },
631 { "https_crt_file", "" , 0 },
632 { "https_crt", "" , 0 },
633 { "http_root", "1" , 0 }, // 0 - deny, 1 - Allow
634 { "web_wl_filter", "0" , 0 }, // Allow/Deny Wireless Access Web
635 { "web_css", "openlinksys" , 0 },
636 { "web_dir", "default" , 0 }, // jffs, opt, tmp or default (/www)
637 { "ttb_css", "example" , 0 }, //Tomato Themes Base
638 { "web_svg", "1" , 0 },
639 { "telnetd_eas", "1" , 0 },
640 { "telnetd_port", "23" , 0 },
641 { "sshd_eas", "1" , 0 }, //shibby - enable sshd by default
642 { "sshd_pass", "1" , 0 },
643 { "sshd_port", "22" , 0 },
644 { "sshd_remote", "0" , 0 },
645 { "sshd_motd", "1" , 0 },
646 { "sshd_rport", "22" , 0 },
647 { "sshd_authkeys", "" , 0 },
648 { "sshd_hostkey", "" , 0 },
649 { "sshd_dsskey", "" , 0 },
650 { "sshd_forwarding", "1" , 0 },
651 { "rmgt_sip", "" , 0 }, // remote management: source ip address
653 { "http_id", "" , 0 },
654 { "web_mx", "status,bwm" , 0 },
655 { "web_pb", "" , 0 },
657 // admin-bwm
658 { "rstats_enable", "1" , 0 },
659 { "rstats_path", "" , 0 },
660 { "rstats_stime", "48" , 0 },
661 { "rstats_offset", "1" , 0 },
662 { "rstats_data", "" , 0 },
663 { "rstats_colors", "" , 0 },
664 { "rstats_exclude", "" , 0 },
665 { "rstats_sshut", "1" , 0 },
666 { "rstats_bak", "0" , 0 },
668 // admin-ipt
669 { "cstats_enable", "1" , 0 },
670 { "cstats_path", "" , 0 },
671 { "cstats_stime", "48" , 0 },
672 { "cstats_offset", "1" , 0 },
673 { "cstats_labels", "0" , 0 },
674 { "cstats_exclude", "" , 0 },
675 { "cstats_include", "" , 0 },
676 { "cstats_all", "1" , 0 },
677 { "cstats_sshut", "1" , 0 },
678 { "cstats_bak", "0" , 0 },
680 // advanced-buttons
681 { "sesx_led", "0" , 0 },
682 { "sesx_b0", "1" , 0 },
683 { "sesx_b1", "4" , 0 },
684 { "sesx_b2", "4" , 0 },
685 { "sesx_b3", "4" , 0 },
686 { "sesx_script",
687 "[ $1 -ge 20 ] && telnetd -p 233 -l /bin/sh\n"
688 , 0 },
689 { "script_brau",
690 "if [ ! -e /tmp/switch-start ]; then\n"
691 " # do something at startup\n"
692 " echo position at startup was $1 >/tmp/switch-start\n"
693 " exit\n"
694 "fi\n"
695 "if [ $1 = \"bridge\" ]; then\n"
696 " # do something\n"
697 " led bridge on\n"
698 "elif [ $1 = \"auto\" ]; then\n"
699 " # do something\n"
700 " led bridge off\n"
701 "fi\n"
702 , 0 },
704 // admin-log
705 { "log_remote", "0" , 0 },
706 { "log_remoteip", "" , 0 },
707 { "log_remoteport", "514" , 0 },
708 { "log_file", "1" , 0 },
709 { "log_file_custom", "0" , 0 },
710 { "log_file_path", "/var/log/messages" , 0 },
711 { "log_file_size", "50" , 0 },
712 { "log_file_keep", "1" , 0 },
713 { "log_limit", "60" , 0 },
714 { "log_in", "0" , 0 },
715 { "log_out", "0" , 0 },
716 { "log_mark", "60" , 0 },
717 { "log_events", "" , 0 },
719 // admin-log-webmonitor
720 { "log_wm", "0" , 0 },
721 { "log_wmtype", "0" , 0 },
722 { "log_wmip", "" , 0 },
723 { "log_wmdmax", "2000" , 0 },
724 { "log_wmsmax", "2000" , 0 },
725 { "webmon_bkp", "0" , 0 },
726 { "webmon_dir", "/tmp" , 0 },
727 { "webmon_shrink", "0" , 0 },
729 // admin-debugging
730 { "debug_nocommit", "0" , 0 },
731 { "debug_cprintf", "0" , 0 },
732 { "debug_cprintf_file", "0" , 0 },
733 { "console_loglevel", "1" , 0 },
734 { "t_cafree", "1" , 0 },
735 { "t_hidelr", "0" , 0 },
736 { "debug_clkfix", "1" , 0 },
737 { "debug_ddns", "0" , 0 },
739 // admin-cifs
740 { "cifs1", "" , 0 },
741 { "cifs2", "" , 0 },
743 // admin-jffs2
744 { "jffs2_on", "0" , 0 },
745 { "jffs2_exec", "" , 0 },
747 #ifdef TCONFIG_USB
748 // nas-usb - !!TB
749 { "usb_enable", "1" , 0 },
750 { "usb_uhci", "0" , 0 },
751 { "usb_ohci", "0" , 0 },
752 { "usb_usb2", "1" , 0 },
753 { "usb_usb3", "1" , 0 },
754 #if defined(LINUX26) && defined(TCONFIG_MICROSD)
755 { "usb_mmc", "-1" , 0 },
756 #endif
757 { "usb_irq_thresh", "0" , 0 },
758 { "usb_storage", "1" , 0 },
759 { "usb_printer", "0" , 0 },
760 { "usb_printer_bidirect", "0" , 0 },
761 { "usb_ext_opt", "" , 0 },
762 { "usb_fat_opt", "" , 0 },
763 { "usb_ntfs_opt", "" , 0 },
764 { "usb_fs_ext3", "1" , 0 },
765 { "usb_fs_ext4", "1" , 0 },
766 { "usb_fs_fat", "1" , 0 },
767 { "usb_fs_exfat", "1" , 0 },
768 #ifdef TCONFIG_NTFS
769 { "usb_fs_ntfs", "1" , 0 },
770 #ifdef TCONFIG_TUXERA
771 { "usb_ntfs_driver", "tuxera" , 0 },
772 #elif TCONFIG_UFSD
773 { "usb_ntfs_driver", "paragon" , 0 },
774 #else
775 { "usb_ntfs_driver", "ntfs3g" , 0 },
776 #endif
777 #endif //TCONFIG_NTFS
778 #ifdef TCONFIG_HFS
779 { "usb_fs_hfs", "0" , 0 }, //!Victek
780 #endif
781 { "usb_automount", "1" , 0 },
782 #if 0
783 { "usb_bdflush", "30 500 0 0 100 100 60 0 0" , 0 },
784 #endif
785 { "script_usbhotplug", "" , 0 },
786 { "script_usbmount", "" , 0 },
787 { "script_usbumount", "" , 0 },
788 { "idle_enable", "0" , 0 },
789 { "usb_3g", "1" , 0 },
790 #endif
792 #ifdef TCONFIG_FTP
793 // nas-ftp - !!TB
794 { "ftp_enable", "0" , 0 },
795 { "ftp_super", "0" , 0 },
796 { "ftp_anonymous", "0" , 0 },
797 { "ftp_dirlist", "0" , 0 },
798 { "ftp_port", "21" , 0 },
799 { "ftp_max", "0" , 0 },
800 { "ftp_ipmax", "0" , 0 },
801 { "ftp_staytimeout", "300" , 0 },
802 { "ftp_rate", "0" , 0 },
803 { "ftp_anonrate", "0" , 0 },
804 { "ftp_anonroot", "" , 0 },
805 { "ftp_pubroot", "" , 0 },
806 { "ftp_pvtroot", "" , 0 },
807 { "ftp_users", "" , 0 },
808 { "ftp_custom", "" , 0 },
809 { "ftp_sip", "" , 0 }, // wan ftp access: source ip address(es)
810 { "ftp_limit", "0,3,60" , 0 },
811 { "log_ftp", "0" , 0 },
812 #endif
814 #ifdef TCONFIG_SNMP
815 { "snmp_enable", "0" , 0 },
816 { "snmp_port", "161" , 0 },
817 { "snmp_remote", "0" , 0 },
818 { "snmp_remote_sip", "" , 0 },
819 { "snmp_location", "router" , 0 },
820 { "snmp_contact", "admin@tomato" , 0 },
821 { "snmp_ro", "rocommunity" , 0 },
822 #endif
824 #ifdef TCONFIG_SAMBASRV
825 // nas-samba - !!TB
826 { "smbd_enable", "0" , 0 },
827 { "smbd_wgroup", "WORKGROUP" , 0 },
828 { "smbd_master", "1" , 0 },
829 { "smbd_wins", "1" , 0 },
830 { "smbd_cpage", "" , 0 },
831 { "smbd_cset", "utf8" , 0 },
832 { "smbd_custom", "" , 0 },
833 { "smbd_autoshare", "2" , 0 },
834 { "smbd_shares",
835 "jffs</jffs<JFFS<1<0>root$</<Hidden Root<0<1"
836 , 0 },
837 { "smbd_user", "nas" , 0 },
838 { "smbd_passwd", "" , 0 },
839 { "smbd_ifnames", "br0" , 0 },
840 #endif
842 #ifdef TCONFIG_MEDIA_SERVER
843 // nas-media
844 { "ms_enable", "0" , 0 }, /* 0:Disable 1:Enable 2:Enable&Rescan */
845 { "ms_dirs", "/mnt<" , 0 },
846 { "ms_port", "0" , 0 },
847 { "ms_dbdir", "" , 0 },
848 { "ms_tivo", "0" , 0 },
849 { "ms_stdlna", "0" , 0 },
850 { "ms_sas", "0" , 0 },
851 #endif
853 #ifdef TCONFIG_SDHC
854 // admin-sdhc
855 { "mmc_on", "0" , 0 },
856 { "mmc_cs", "7" , 0 },
857 { "mmc_clk", "3" , 0 },
858 { "mmc_din", "2" , 0 },
859 { "mmc_dout", "4" , 0 },
860 { "mmc_fs_partition", "1" , 0 },
861 { "mmc_fs_type", "ext2" , 0 },
862 { "mmc_exec_mount", "" , 0 },
863 { "mmc_exec_umount", "" , 0 },
864 #endif
866 // admin-sch
867 { "sch_rboot", "" , 0 },
868 { "sch_rcon", "" , 0 },
869 { "sch_c1", "" , 0 },
870 { "sch_c2", "" , 0 },
871 { "sch_c3", "" , 0 },
872 { "sch_c4", "" , 0 },
873 { "sch_c5", "" , 0 },
874 { "sch_c1_cmd", "" , 0 },
875 { "sch_c2_cmd", "" , 0 },
876 { "sch_c3_cmd", "" , 0 },
877 { "sch_c4_cmd", "" , 0 },
878 { "sch_c5_cmd", "" , 0 },
880 // admin-script
881 { "script_init", "" , 0 },
882 { "script_shut", "" , 0 },
883 { "script_fire", "" , 0 },
884 { "script_wanup", "" , 0 },
886 #ifdef TCONFIG_NFS
887 { "nfs_enable", "0" , 0 },
888 { "nfs_exports", "" , 0 },
889 #endif
891 #ifdef TCONFIG_OPENVPN
892 // vpn
893 { "vpn_debug", "0" , 0 },
894 { "vpn_server_eas", "" , 0 },
895 { "vpn_server_dns", "" , 0 },
896 { "vpn_server1_poll", "0" , 0 },
897 { "vpn_server1_if", "tun" , 0 },
898 { "vpn_server1_proto", "udp" , 0 },
899 { "vpn_server1_port", "1194" , 0 },
900 { "vpn_server1_firewall", "auto" , 0 },
901 { "vpn_server1_crypt", "tls" , 0 },
902 { "vpn_server1_comp", "adaptive" , 0 },
903 { "vpn_server1_cipher", "default" , 0 },
904 { "vpn_server1_dhcp", "1" , 0 },
905 { "vpn_server1_r1", "192.168.1.50" , 0 },
906 { "vpn_server1_r2", "192.168.1.55" , 0 },
907 { "vpn_server1_sn", "10.8.0.0" , 0 },
908 { "vpn_server1_nm", "255.255.255.0" , 0 },
909 { "vpn_server1_local", "10.8.0.1" , 0 },
910 { "vpn_server1_remote", "10.8.0.2" , 0 },
911 { "vpn_server1_reneg", "-1" , 0 },
912 { "vpn_server1_hmac", "-1" , 0 },
913 { "vpn_server1_plan", "1" , 0 },
914 { "vpn_server1_ccd", "0" , 0 },
915 { "vpn_server1_c2c", "0" , 0 },
916 { "vpn_server1_ccd_excl", "0" , 0 },
917 { "vpn_server1_ccd_val", "" , 0 },
918 { "vpn_server1_pdns", "0" , 0 },
919 { "vpn_server1_rgw", "0" , 0 },
920 { "vpn_server1_custom", "" , 0 },
921 { "vpn_server1_static", "" , 0 },
922 { "vpn_server1_ca", "" , 0 },
923 { "vpn_server1_crt", "" , 0 },
924 { "vpn_server1_key", "" , 0 },
925 { "vpn_server1_dh", "" , 0 },
926 { "vpn_server1_br", "br0" , 0 },
927 { "vpn_server1_route" "0" , 0 },
928 { "vpn_server1_routing_val", "" , 0 },
929 { "vpn_server2_poll", "0" , 0 },
930 { "vpn_server2_if", "tun" , 0 },
931 { "vpn_server2_proto", "udp" , 0 },
932 { "vpn_server2_port", "1194" , 0 },
933 { "vpn_server2_firewall", "auto" , 0 },
934 { "vpn_server2_crypt", "tls" , 0 },
935 { "vpn_server2_comp", "adaptive" , 0 },
936 { "vpn_server2_cipher", "default" , 0 },
937 { "vpn_server2_dhcp", "1" , 0 },
938 { "vpn_server2_r1", "192.168.1.50" , 0 },
939 { "vpn_server2_r2", "192.168.1.55" , 0 },
940 { "vpn_server2_sn", "10.8.0.0" , 0 },
941 { "vpn_server2_nm", "255.255.255.0" , 0 },
942 { "vpn_server2_local", "10.8.0.1" , 0 },
943 { "vpn_server2_remote", "10.8.0.2" , 0 },
944 { "vpn_server2_reneg", "-1" , 0 },
945 { "vpn_server2_hmac", "-1" , 0 },
946 { "vpn_server2_plan", "1" , 0 },
947 { "vpn_server2_ccd", "0" , 0 },
948 { "vpn_server2_c2c", "0" , 0 },
949 { "vpn_server2_ccd_excl", "0" , 0 },
950 { "vpn_server2_ccd_val", "" , 0 },
951 { "vpn_server2_pdns", "0" , 0 },
952 { "vpn_server2_rgw", "0" , 0 },
953 { "vpn_server2_custom", "" , 0 },
954 { "vpn_server2_static", "" , 0 },
955 { "vpn_server2_ca", "" , 0 },
956 { "vpn_server2_crt", "" , 0 },
957 { "vpn_server2_key", "" , 0 },
958 { "vpn_server2_dh", "" , 0 },
959 { "vpn_server2_br", "br0" , 0 },
960 { "vpn_server2_route" "0" , 0 },
961 { "vpn_server2_routing_val", "" , 0 },
962 { "vpn_client_eas", "" , 0 },
963 { "vpn_client1_poll", "0" , 0 },
964 { "vpn_client1_if", "tun" , 0 },
965 { "vpn_client1_bridge", "1" , 0 },
966 { "vpn_client1_nat", "1" , 0 },
967 { "vpn_client1_proto", "udp" , 0 },
968 { "vpn_client1_addr", "" , 0 },
969 { "vpn_client1_port", "1194" , 0 },
970 { "vpn_client1_retry", "30" , 0 },
971 { "vpn_client1_rg", "0" , 0 },
972 { "vpn_client1_firewall", "auto" , 0 },
973 { "vpn_client1_crypt", "tls" , 0 },
974 { "vpn_client1_comp", "adaptive" , 0 },
975 { "vpn_client1_cipher", "default" , 0 },
976 { "vpn_client1_local", "10.8.0.2" , 0 },
977 { "vpn_client1_remote", "10.8.0.1" , 0 },
978 { "vpn_client1_nm", "255.255.255.0" , 0 },
979 { "vpn_client1_reneg", "-1" , 0 },
980 { "vpn_client1_hmac", "-1" , 0 },
981 { "vpn_client1_adns", "0" , 0 },
982 { "vpn_client1_rgw", "0" , 0 },
983 { "vpn_client1_gw", "" , 0 },
984 { "vpn_client1_custom", "" , 0 },
985 { "vpn_client1_static", "" , 0 },
986 { "vpn_client1_ca", "" , 0 },
987 { "vpn_client1_crt", "" , 0 },
988 { "vpn_client1_key", "" , 0 },
989 { "vpn_client1_br", "br0" , 0 },
990 { "vpn_client1_nopull", "0" , 0 },
991 { "vpn_client1_nobind", "1" , 0 },
992 { "vpn_client1_route", "0" , 0 },
993 { "vpn_client1_routing_val", "" , 0 },
994 { "vpn_client2_poll", "0" , 0 },
995 { "vpn_client2_if", "tun" , 0 },
996 { "vpn_client2_bridge", "1" , 0 },
997 { "vpn_client2_nat", "1" , 0 },
998 { "vpn_client2_proto", "udp" , 0 },
999 { "vpn_client2_addr", "" , 0 },
1000 { "vpn_client2_port", "1194" , 0 },
1001 { "vpn_client2_retry", "30" , 0 },
1002 { "vpn_client2_rg", "0" , 0 },
1003 { "vpn_client2_firewall", "auto" , 0 },
1004 { "vpn_client2_crypt", "tls" , 0 },
1005 { "vpn_client2_comp", "adaptive" , 0 },
1006 { "vpn_client2_cipher", "default" , 0 },
1007 { "vpn_client2_local", "10.8.0.2" , 0 },
1008 { "vpn_client2_remote", "10.8.0.1" , 0 },
1009 { "vpn_client2_nm", "255.255.255.0" , 0 },
1010 { "vpn_client2_reneg", "-1" , 0 },
1011 { "vpn_client2_hmac", "-1" , 0 },
1012 { "vpn_client2_adns", "0" , 0 },
1013 { "vpn_client2_rgw", "0" , 0 },
1014 { "vpn_client2_gw", "" , 0 },
1015 { "vpn_client2_custom", "" , 0 },
1016 { "vpn_client2_static", "" , 0 },
1017 { "vpn_client2_ca", "" , 0 },
1018 { "vpn_client2_crt", "" , 0 },
1019 { "vpn_client2_key", "" , 0 },
1020 { "vpn_client2_br", "br0" , 0 },
1021 { "vpn_client2_nopull", "0" , 0 },
1022 { "vpn_client2_nobind", "1" , 0 },
1023 { "vpn_client2_route", "0" , 0 },
1024 { "vpn_client2_routing_val", "" , 0 },
1025 #endif // vpn
1026 #ifdef TCONFIG_PPTPD
1027 { "pptp_client_enable", "0" , 0 },
1028 { "pptp_client_peerdns", "0" , 0 },
1029 { "pptp_client_mtuenable","0" , 0 },
1030 { "pptp_client_mtu", "1450" , 0 },
1031 { "pptp_client_mruenable","0" , 0 },
1032 { "pptp_client_mru", "1450" , 0 },
1033 { "pptp_client_nat", "0" , 0 },
1034 { "pptp_client_srvip", "" , 0 },
1035 { "pptp_client_srvsub", "10.0.0.0" , 0 },
1036 { "pptp_client_srvsubmsk","255.0.0.0" , 0 },
1037 { "pptp_client_username", "" , 0 },
1038 { "pptp_client_passwd", "" , 0 },
1039 { "pptp_client_crypt", "0" , 0 },
1040 { "pptp_client_custom", "" , 0 },
1041 { "pptp_client_dfltroute","0" , 0 },
1042 #endif
1044 #ifdef TCONFIG_TINC
1045 {"tinc_wanup", "0" , 0 },
1046 {"tinc_name", "" , 0 },
1047 {"tinc_devicetype", "tun" , 0 }, // tun, tap
1048 {"tinc_mode", "switch" , 0 }, // switch, hub
1049 {"tinc_vpn_netmask", "255.255.0.0" , 0 },
1050 {"tinc_private_rsa", "" , 0 },
1051 {"tinc_private_ed25519", "" , 0 },
1052 {"tinc_custom", "" , 0 },
1053 {"tinc_hosts", "" , 0 },
1054 {"tinc_manual_firewall", "" , 0 },
1055 {"tinc_manual_tinc_up", "0" , 0 },
1056 // scripts
1057 {"tinc_tinc_up", "" , 0 },
1058 {"tinc_tinc_down", "" , 0 },
1059 {"tinc_host_up", "" , 0 },
1060 {"tinc_host_down", "" , 0 },
1061 {"tinc_subnet_up", "" , 0 },
1062 {"tinc_subnet_down", "" , 0 },
1063 {"tinc_firewall", "" , 0 },
1064 #endif
1066 #ifdef TCONFIG_BT
1067 // nas-transmission
1068 { "bt_enable", "0" , 0 },
1069 #ifdef TCONFIG_BBT
1070 { "bt_binary", "internal" , 0 },
1071 #else
1072 { "bt_binary", "optware" , 0 },
1073 #endif
1074 { "bt_binary_custom", "/path/to/binaries/directory" , 0 },
1075 { "bt_custom", "" , 0 },
1076 { "bt_port", "51515" , 0 },
1077 { "bt_dir", "/mnt" , 0 },
1078 { "bt_incomplete", "1" , 0 },
1079 { "bt_settings", "down_dir" , 0 },
1080 { "bt_settings_custom", "/tmp/btclient" , 0 },
1081 { "bt_rpc_enable", "1" , 0 },
1082 { "bt_rpc_wan", "0" , 0 },
1083 { "bt_auth", "1" , 0 },
1084 { "bt_login", "admin" , 0 },
1085 { "bt_password", "admin11" , 0 },
1086 { "bt_port_gui", "9091" , 0 },
1087 { "bt_dl_enable", "0" , 0 },
1088 { "bt_ul_enable", "0" , 0 },
1089 { "bt_dl", "248" , 0 },
1090 { "bt_ul", "64" , 0 },
1091 { "bt_peer_limit_global", "150" , 0 },
1092 { "bt_peer_limit_per_torrent", "30" , 0 },
1093 { "bt_ul_slot_per_torrent", "10" , 0 },
1094 { "bt_ratio_enable", "0" , 0 },
1095 { "bt_ratio", "1.0000" , 0 },
1096 { "bt_ratio_idle_enable", "0" , 0 },
1097 { "bt_ratio_idle", "30" , 0 },
1098 { "bt_dht", "0" , 0 },
1099 { "bt_pex", "0" , 0 },
1100 { "bt_lpd", "0" , 0 },
1101 { "bt_utp", "1" , 0 },
1102 { "bt_blocklist", "0" , 0 },
1103 { "bt_blocklist_url", "http://list.iblocklist.com/?list=bt_level1" , 0 },
1104 { "bt_sleep", "10" , 0 },
1105 { "bt_check", "1" , 0 },
1106 { "bt_check_time", "15" , 0 },
1107 { "bt_dl_queue_enable", "0" , 0 },
1108 { "bt_dl_queue_size", "5" , 0 },
1109 { "bt_ul_queue_enable", "0" , 0 },
1110 { "bt_ul_queue_size", "5" , 0 },
1111 { "bt_message", "2" , 0 },
1112 { "bt_log", "0" , 0 },
1113 { "bt_log_path", "/var/log" , 0 },
1114 #endif
1116 // new_qoslimit
1117 { "new_qoslimit_enable", "0" , 0 },
1118 { "new_qoslimit_obw", "" , 0 },
1119 { "new_qoslimit_ibw", "" , 0 },
1120 { "new_qoslimit_rules", "" , 0 },
1121 { "qosl_enable", "0" , 0 },
1122 { "qosl_tcp", "0" , 0 },//unlimited
1123 { "qosl_udp", "0" , 0 },//unlimited
1124 { "qosl_dlc", "" , 0 },
1125 { "qosl_ulc", "" , 0 },
1126 { "qosl_dlr", "" , 0 },
1127 { "qosl_ulr", "" , 0 },
1128 { "limit_br0_prio", "3" , 0 },
1129 { "limit_br1_enable", "0" , 0 },
1130 { "limit_br1_dlc", "" , 0 },
1131 { "limit_br1_ulc", "" , 0 },
1132 { "limit_br1_dlr", "" , 0 },
1133 { "limit_br1_ulr", "" , 0 },
1134 { "limit_br1_prio", "2" , 0 },
1135 { "limit_br2_enable", "0" , 0 },
1136 { "limit_br2_dlc", "" , 0 },
1137 { "limit_br2_ulc", "" , 0 },
1138 { "limit_br2_dlr", "" , 0 },
1139 { "limit_br2_ulr", "" , 0 },
1140 { "limit_br2_prio", "2" , 0 },
1141 { "limit_br3_enable", "0" , 0 },
1142 { "limit_br3_dlc", "" , 0 },
1143 { "limit_br3_ulc", "" , 0 },
1144 { "limit_br3_dlr", "" , 0 },
1145 { "limit_br3_ulr", "" , 0 },
1146 { "limit_br3_prio", "2" , 0 },
1149 // NoCatSplash. !!Victek
1150 #ifdef TCONFIG_NOCAT
1151 { "NC_enable", "0" , 0 }, // enable NoCatSplash
1152 { "NC_Verbosity", "2" , 0 },
1153 { "NC_GatewayName", "Tomato Captive Portal" , 0 },
1154 { "NC_GatewayPort", "5280" , 0 },
1155 { "NC_GatewayMode", "Open" , 0 },
1156 { "NC_DocumentRoot", "/tmp/splashd" , 0 },
1157 { "NC_ExcludePorts", "1863" , 0 },
1158 { "NC_HomePage", "http://google.com" , 0 },
1159 { "NC_ForcedRedirect", "0" , 0 },
1160 { "NC_IdleTimeout", "0" , 0 },
1161 { "NC_MaxMissedARP", "5" , 0 },
1162 { "NC_PeerChecktimeout", "0" , 0 },
1163 { "NC_LoginTimeout", "3600" , 0 },
1164 { "NC_RenewTimeout", "0" , 0 },
1165 { "NC_AllowedWebHosts", "" , 0 },
1166 { "NC_BridgeLAN", "br0" , 0 },
1167 #endif
1169 //Tomato RAF - NGINX
1170 #ifdef TCONFIG_NGINX
1171 {"nginx_enable", "0" , 0 }, // NGinX enabled
1172 {"nginx_php", "0" , 0 }, // PHP enabled
1173 {"nginx_keepconf", "0" , 0 }, // Enable/disable keep configuration files unmodified in /etc/nginx
1174 {"nginx_docroot", "/www" , 0 }, // path for server files
1175 {"nginx_port", "85" , 0 }, // port to listen
1176 {"nginx_remote", "0" , 0 }, // open port from WAN site
1177 {"nginx_fqdn", "Tomato" , 0 }, // server name
1178 {"nginx_upload", "100" , 0 }, // upload file size limit
1179 {"nginx_priority", "10" , 0 }, // server priority = worker_priority
1180 {"nginx_custom", "" , 0 }, // additional lines for nginx.conf
1181 {"nginx_httpcustom", "" , 0 }, // additional lines for nginx.conf
1182 {"nginx_servercustom", "" , 0 }, // additional lines for nginx.conf
1183 {"nginx_phpconf", "" , 0 }, // additional lines for php.ini
1184 {"nginx_user", "root" , 0 }, // user/group
1185 {"nginx_override", "0" , 0 }, // additional lines for php.ini
1186 {"nginx_overridefile", "/path/to/nginx.conf" , 0 }, // user/group
1188 // bwq518 - MySQL
1189 { "mysql_enable", "0" , 0 },
1190 { "mysql_sleep", "2" , 0 },
1191 { "mysql_check", "1" , 0 },
1192 { "mysql_check_time", "1" , 0 },
1193 { "mysql_binary", "internal" , 0 },
1194 { "mysql_binary_custom", "/mnt/sda1/mysql/bin" , 0 },
1195 { "mysql_usb_enable", "1" , 0 },
1196 { "mysql_dlroot", "" , 0 },
1197 { "mysql_datadir", "data" , 0 },
1198 { "mysql_tmpdir", "tmp" , 0 },
1199 { "mysql_server_custom", "" , 0 },
1200 { "mysql_port", "3306" , 0 },
1201 { "mysql_allow_anyhost", "0" , 0 },
1202 { "mysql_init_rootpass", "0" , 0 },
1203 { "mysql_username", "root" , 0 }, // mysqladmin username
1204 { "mysql_passwd", "admin" , 0 }, // mysqladmin password
1205 { "mysql_key_buffer", "16" , 0 }, //KB
1206 { "mysql_max_allowed_packet", "4" , 0 }, //MB
1207 { "mysql_thread_stack", "128" , 0 }, //KB
1208 { "mysql_thread_cache_size", "8" , 0 },
1209 { "mysql_init_priv", "0" , 0 },
1210 { "mysql_table_open_cache", "4" , 0 },
1211 { "mysql_sort_buffer_size", "128" , 0 }, //KB
1212 { "mysql_read_buffer_size", "128" , 0 }, //KB
1213 { "mysql_query_cache_size", "16" , 0 }, //MB
1214 { "mysql_read_rnd_buffer_size", "256" , 0 }, //KB
1215 { "mysql_net_buffer_length", "2" , 0 }, //K
1216 { "mysql_max_connections", "1000" , 0 },
1217 #endif
1219 #ifdef TCONFIG_TOR
1220 { "tor_enable", "0" , 0 },
1221 { "tor_socksport", "9050" , 0 },
1222 { "tor_transport", "9040" , 0 },
1223 { "tor_dnsport", "9053" , 0 },
1224 { "tor_datadir", "/tmp/tor" , 0 },
1225 { "tor_iface", "br0" , 0 },
1226 { "tor_users", "192.168.1.0/24" , 0 },
1227 { "tor_custom", "" , 0 },
1228 #endif
1230 { 0, 0, 0}
1233 #ifdef TCONFIG_BCMWL6
1234 #ifndef TCONFIG_BCMARM
1235 struct nvram_tuple bcm4360ac_defaults[] = {
1236 { "pci/2/1/aa2g", "0", 0 },
1237 { "pci/2/1/aa5g", "7", 0 },
1238 { "pci/2/1/aga0", "0", 0 },
1239 { "pci/2/1/aga1", "0", 0 },
1240 { "pci/2/1/aga2", "0", 0 },
1241 { "pci/2/1/agbg0", "133", 0 },
1242 { "pci/2/1/agbg1", "133", 0 },
1243 { "pci/2/1/agbg2", "133", 0 },
1244 { "pci/2/1/antswitch", "0", 0 },
1245 { "pci/2/1/cckbw202gpo", "0", 0 },
1246 { "pci/2/1/cckbw20ul2gpo", "0", 0 },
1247 { "pci/2/1/dot11agofdmhrbw202gpo", "0", 0 },
1248 { "pci/2/1/femctrl", "3", 0 },
1249 { "pci/2/1/papdcap2g", "0", 0 },
1250 { "pci/2/1/tworangetssi2g", "0", 0 },
1251 { "pci/2/1/pdgain2g", "4", 0 },
1252 { "pci/2/1/epagain2g", "0", 0 },
1253 { "pci/2/1/tssiposslope2g", "1", 0 },
1254 { "pci/2/1/gainctrlsph", "0", 0 },
1255 { "pci/2/1/papdcap5g", "0", 0 },
1256 { "pci/2/1/tworangetssi5g", "0", 0 },
1257 { "pci/2/1/pdgain5g", "4", 0 },
1258 { "pci/2/1/epagain5g", "0", 0 },
1259 { "pci/2/1/tssiposslope5g", "1", 0 },
1260 { "pci/2/1/maxp2ga0", "76", 0 },
1261 { "pci/2/1/maxp2ga1", "76", 0 },
1262 { "pci/2/1/maxp2ga2", "76", 0 },
1263 { "pci/2/1/mcsbw202gpo", "0", 0 },
1264 { "pci/2/1/mcsbw402gpo", "0", 0 },
1265 { "pci/2/1/measpower", "0x7f", 0 },
1266 { "pci/2/1/measpower1", "0x7f", 0 },
1267 { "pci/2/1/measpower2", "0x7f", 0 },
1268 { "pci/2/1/noiselvl2ga0", "31", 0 },
1269 { "pci/2/1/noiselvl2ga1", "31", 0 },
1270 { "pci/2/1/noiselvl2ga2", "31", 0 },
1271 { "pci/2/1/noiselvl5gha0", "31", 0 },
1272 { "pci/2/1/noiselvl5gha1", "31", 0 },
1273 { "pci/2/1/noiselvl5gha2", "31", 0 },
1274 { "pci/2/1/noiselvl5gla0", "31", 0 },
1275 { "pci/2/1/noiselvl5gla1", "31", 0 },
1276 { "pci/2/1/noiselvl5gla2", "31", 0 },
1277 { "pci/2/1/noiselvl5gma0", "31", 0 },
1278 { "pci/2/1/noiselvl5gma1", "31", 0 },
1279 { "pci/2/1/noiselvl5gma2", "31", 0 },
1280 { "pci/2/1/noiselvl5gua0", "31", 0 },
1281 { "pci/2/1/noiselvl5gua1", "31", 0 },
1282 { "pci/2/1/noiselvl5gua2", "31", 0 },
1283 { "pci/2/1/ofdmlrbw202gpo", "0", 0 },
1284 { "pci/2/1/pa2ga0", "0xfe72,0x14c0,0xfac7", 0 },
1285 { "pci/2/1/pa2ga1", "0xfe80,0x1472,0xfabc", 0 },
1286 { "pci/2/1/pa2ga2", "0xfe82,0x14bf,0xfad9", 0 },
1287 { "pci/2/1/pcieingress_war", "15", 0 },
1288 { "pci/2/1/phycal_tempdelta", "255", 0 },
1289 { "pci/2/1/rawtempsense", "0x1ff", 0 },
1290 { "pci/2/1/rxchain", "7", 0 },
1291 { "pci/2/1/rxgainerr2g", "0xffff", 0 },
1292 { "pci/2/1/rxgainerr5g", "0xffff,0xffff,0xffff,0xffff", 0 },
1293 { "pci/2/1/rxgains2gelnagaina0", "0", 0 },
1294 { "pci/2/1/rxgains2gelnagaina1", "0", 0 },
1295 { "pci/2/1/rxgains2gelnagaina2", "0", 0 },
1296 { "pci/2/1/rxgains2gtrelnabypa0", "0", 0 },
1297 { "pci/2/1/rxgains2gtrelnabypa1", "0", 0 },
1298 { "pci/2/1/rxgains2gtrelnabypa2", "0", 0 },
1299 { "pci/2/1/rxgains2gtrisoa0", "0", 0 },
1300 { "pci/2/1/rxgains2gtrisoa1", "0", 0 },
1301 { "pci/2/1/rxgains2gtrisoa2", "0", 0 },
1302 { "pci/2/1/sar2g", "18", 0 },
1303 { "pci/2/1/sar5g", "15", 0 },
1304 { "pci/2/1/sromrev", "11", 0 },
1305 { "pci/2/1/subband5gver", "0x4", 0 },
1306 { "pci/2/1/tempcorrx", "0x3f", 0 },
1307 { "pci/2/1/tempoffset", "255", 0 },
1308 { "pci/2/1/temps_hysteresis", "15", 0 },
1309 { "pci/2/1/temps_period", "15", 0 },
1310 { "pci/2/1/tempsense_option", "0x3", 0 },
1311 { "pci/2/1/tempsense_slope", "0xff", 0 },
1312 { "pci/2/1/tempthresh", "255", 0 },
1313 { "pci/2/1/txchain", "7", 0 },
1314 { "pci/2/1/ledbh0", "2", 0 },
1315 { "pci/2/1/ledbh1", "5", 0 },
1316 { "pci/2/1/ledbh2", "4", 0 },
1317 { "pci/2/1/ledbh3", "11", 0 },
1318 { "pci/2/1/ledbh10", "7", 0 },
1320 { 0, 0, 0 }
1322 #elif defined (TCONFIG_AC3200)
1323 struct nvram_tuple bcm4360ac_defaults[] = {
1324 { "devpath1", "pcie/1/4", 0 },
1325 { "1:devpath1", "sb/1/", 0 },
1326 { "1:boardrev", "0x1421", 0 },
1327 { "1:boardvendor", "0x14e4", 0 },
1328 { "1:devid", "0x43bb", 0 },
1329 { "1:sromrev", "11", 0 },
1330 { "1:boardflags", "0x20001000", 0 },
1331 { "1:boardflags2", "0x00100002", 0 },
1332 { "1:venvid", "0x14e4", 0 },
1333 { "1:boardflags3", "0x4000005", 0 },
1334 { "1:aa2g", "7", 0 },
1335 { "1:agbg0", "0x0", 0 },
1336 { "1:agbg1", "0x0", 0 },
1337 { "1:agbg2", "0x0", 0 },
1338 { "1:txchain", "7", 0 },
1339 { "1:rxchain", "7", 0 },
1340 { "1:antswitch", "0", 0 },
1341 { "1:femctrl", "3", 0 },
1342 { "1:tssiposslope2g", "1", 0 },
1343 { "1:epagain2g", "0", 0 },
1344 { "1:pdgain2g", "21", 0 },
1345 { "1:tworangetssi2g", "0", 0 },
1346 { "1:papdcap2g", "0", 0 },
1347 { "1:gainctrlsph", "0", 0 },
1348 { "1:tempthresh", "120", 0 },
1349 { "1:tempoffset", "255", 0 },
1350 { "1:rawtempsense", "0x1ff", 0 },
1351 { "1:tempsense_slope", "0xff", 0 },
1352 { "1:tempcorrx", "0x3f", 0 },
1353 { "1:tempsense_option", "0x3", 0 },
1354 { "1:xtalfreq", "40000", 0 },
1355 { "1:phycal_tempdelta", "15", 0 },
1356 { "1:temps_period", "5", 0 },
1357 { "1:temps_hysteresis", "5", 0 },
1358 { "1:pdoffset2g40ma0", "15", 0 },
1359 { "1:pdoffset2g40ma1", "15", 0 },
1360 { "1:pdoffset2g40ma2", "15", 0 },
1361 { "1:pdoffset2g40mvalid", "1", 0 },
1362 { "1:pdoffset40ma0", "0", 0 },
1363 { "1:pdoffset40ma1", "0", 0 },
1364 { "1:pdoffset40ma2", "0", 0 },
1365 { "1:pdoffset80ma0", "0", 0 },
1366 { "1:pdoffset80ma1", "0", 0 },
1367 { "1:pdoffset80ma2", "0", 0 },
1368 { "1:cckbw202gpo", "0", 0 },
1369 { "1:cckbw20ul2gpo", "0", 0 },
1370 { "1:dot11agofdmhrbw202gpo", "0x2000", 0 },
1371 { "1:ofdmlrbw202gpo", "0", 0 },
1372 { "1:dot11agduphrpo", "0", 0 },
1373 { "1:dot11agduplrpo", "0", 0 },
1374 { "1:maxp2ga0", "102", 0 },
1375 { "1:rxgains2gelnagaina0", "4", 0 },
1376 { "1:rxgains2gtrisoa0", "7", 0 },
1377 { "1:rxgains2gtrelnabypa0", "1", 0 },
1378 { "1:maxp2ga1", "102", 0 },
1379 { "1:rxgains2gelnagaina1", "4", 0 },
1380 { "1:rxgains2gtrisoa1", "7", 0 },
1381 { "1:rxgains2gtrelnabypa1", "1", 0 },
1382 { "1:maxp2ga2", "102", 0 },
1383 { "1:rxgains2gelnagaina2", "4", 0 },
1384 { "1:rxgains2gtrisoa2", "7", 0 },
1385 { "1:rxgains2gtrelnabypa2", "1", 0 },
1386 { "1:ledbh10", "7", 0 },
1387 { "devpath0", "pcie/1/3", 0 },
1388 { "0:devpath0", "sb/1/", 0 },
1389 { "0:boardrev", "0x1421", 0 },
1390 { "0:boardvendor", "0x14e4", 0 },
1391 { "0:devid", "0x43bc", 0 },
1392 { "0:sromrev", "11", 0 },
1393 { "0:boardflags", "0x30040000", 0 },
1394 { "0:boardflags2", "0x00220102", 0 },
1395 { "0:venid", "0x14e4", 0 },
1396 { "0:boardflags3", "0x0", 0 },
1397 { "0:aa5g", "7", 0 },
1398 { "0:aga0", "0x0", 0 },
1399 { "0:aga1", "0x0", 0 },
1400 { "0:aga2", "0x0", 0 },
1401 { "0:txchain", "7", 0 },
1402 { "0:rxchain", "7", 0 },
1403 { "0:antswitch", "0", 0 },
1404 { "0:femctrl", "3", 0 },
1405 { "0:tssiposslope5g", "1", 0 },
1406 { "0:epagain5g", "0", 0 },
1407 { "0:pdgain5g", "4", 0 },
1408 { "0:tworangetssi5g", "0", 0 },
1409 { "0:papdcap5g", "0", 0 },
1410 { "0:gainctrlsph", "0", 0 },
1411 { "0:tempthresh", "125", 0 },
1412 { "0:tempoffset", "255", 0 },
1413 { "0:rawtempsense", "0x1ff", 0 },
1414 { "0:tempsense_slope", "0xff", 0 },
1415 { "0:tempcorrx", "0x3f", 0 },
1416 { "0:tempsense_option", "0x3", 0 },
1417 { "0:xtalfreq", "40000", 0 },
1418 { "0:phycal_tempdelta", "15", 0 },
1419 { "0:temps_period", "5", 0 },
1420 { "0:temps_hysteresis", "5", 0 },
1421 { "0:pdoffset40ma0", "4369", 0 },
1422 { "0:pdoffset40ma1", "4369", 0 },
1423 { "0:pdoffset40ma2", "4369", 0 },
1424 { "0:pdoffset80ma0", "0", 0 },
1425 { "0:pdoffset80ma1", "0", 0 },
1426 { "0:pdoffset80ma2", "0", 0 },
1427 { "0:subband5gver", "0x4", 0 },
1428 { "0:mcsbw1605glpo", "0", 0 },
1429 { "0:mcsbw1605gmpo", "0", 0 },
1430 { "0:mcsbw1605ghpo", "0", 0 },
1431 { "0:mcslr5glpo", "0", 0 },
1432 { "0:mcslr5gmpo", "0", 0 },
1433 { "0:mcslr5ghpo", "0", 0 },
1434 { "0:dot11agduphrpo", "0", 0 },
1435 { "0:dot11agduplrpo", "0", 0 },
1436 { "0:rxgains5gmelnagaina0", "2", 0 },
1437 { "0:rxgains5gmtrisoa0", "5", 0 },
1438 { "0:rxgains5gmtrelnabypa0", "1", 0 },
1439 { "0:rxgains5ghelnagaina0", "2", 0 },
1440 { "0:rxgains5ghtrisoa0", "5", 0 },
1441 { "0:rxgains5ghtrelnabypa0", "1", 0 },
1442 { "0:rxgains5gelnagaina0", "2", 0 },
1443 { "0:rxgains5gtrisoa0", "5", 0 },
1444 { "0:rxgains5gtrelnabypa0", "1", 0 },
1445 { "0:maxp5ga0", "94,94,90,90", 0 },
1446 { "0:rxgains5gmelnagaina1", "2", 0 },
1447 { "0:rxgains5gmtrisoa1", "5", 0 },
1448 { "0:rxgains5gmtrelnabypa1", "1", 0 },
1449 { "0:rxgains5ghelnagaina1", "2", 0 },
1450 { "0:rxgains5ghtrisoa1", "5", 0 },
1451 { "0:rxgains5ghtrelnabypa1", "1", 0 },
1452 { "0:rxgains5gelnagaina1", "2", 0 },
1453 { "0:rxgains5gtrisoa1", "5", 0 },
1454 { "0:rxgains5gtrelnabypa1", "1", 0 },
1455 { "0:maxp5ga1", "94,94,90,90", 0 },
1456 { "0:rxgains5gmelnagaina2", "2", 0 },
1457 { "0:rxgains5gmtrisoa2", "5", 0 },
1458 { "0:rxgains5gmtrelnabypa2", "1", 0 },
1459 { "0:rxgains5ghelnagaina2", "2", 0 },
1460 { "0:rxgains5ghtrisoa2", "5", 0 },
1461 { "0:rxgains5ghtrelnabypa2", "1", 0 },
1462 { "0:rxgains5gelnagaina2", "2", 0 },
1463 { "0:rxgains5gtrisoa2", "5", 0 },
1464 { "0:rxgains5gtrelnabypa2", "1", 0 },
1465 { "0:maxp5ga2", "94,94,90,90", 0 },
1466 { "0:ledbh10", "7", 0 },
1467 { "devpath2", "pcie/2/1", 0 },
1468 { "2:devpath2", "sb/1/", 0 },
1469 { "2:boardrev", "0x1421", 0 },
1470 { "2:boardvendor", "0x14e4", 0 },
1471 { "2:devid", "0x43bc", 0 },
1472 { "2:sromrev", "11", 0 },
1473 { "2:boardflags", "0x30040000", 0 },
1474 { "2:boardflags2", "0x00220102", 0 },
1475 { "2:venid", "0x14e4", 0 },
1476 { "2:boardflags3", "0x0", 0 },
1477 { "2:aa5g", "7", 0 },
1478 { "2:aga0", "0x0", 0 },
1479 { "2:aga1", "0x0", 0 },
1480 { "2:aga2", "0x0", 0 },
1481 { "2:txchain", "7", 0 },
1482 { "2:rxchain", "7", 0 },
1483 { "2:antswitch", "0", 0 },
1484 { "2:femctrl", "3", 0 },
1485 { "2:tssiposslope5g", "1", 0 },
1486 { "2:epagain5g", "0", 0 },
1487 { "2:pdgain5g", "4", 0 },
1488 { "2:tworangetssi5g", "0", 0 },
1489 { "2:papdcap5g", "0", 0 },
1490 { "2:gainctrlsph", "0", 0 },
1491 { "2:tempthresh", "120", 0 },
1492 { "2:tempoffset", "255", 0 },
1493 { "2:rawtempsense", "0x1ff", 0 },
1494 { "2:tempsense_slope", "0xff", 0 },
1495 { "2:tempcorrx", "0x3f", 0 },
1496 { "2:tempsense_option", "0x3", 0 },
1497 { "2:xtalfreq", "40000", 0 },
1498 { "2:phycal_tempdelta", "15", 0 },
1499 { "2:temps_period", "5", 0 },
1500 { "2:temps_hysteresis", "5", 0 },
1501 { "2:pdoffset40ma0", "4369", 0 },
1502 { "2:pdoffset40ma1", "4369", 0 },
1503 { "2:pdoffset40ma2", "4369", 0 },
1504 { "2:pdoffset80ma0", "0", 0 },
1505 { "2:pdoffset80ma1", "0", 0 },
1506 { "2:pdoffset80ma2", "0", 0 },
1507 { "2:subband5gver", "0x4", 0 },
1508 { "2:mcsbw1605glpo", "0", 0 },
1509 { "2:mcsbw1605gmpo", "0", 0 },
1510 { "2:mcsbw1605ghpo", "0", 0 },
1511 { "2:mcslr5glpo", "0", 0 },
1512 { "2:mcslr5gmpo", "0", 0 },
1513 { "2:mcslr5ghpo", "0", 0 },
1514 { "2:dot11agduphrpo", "0", 0 },
1515 { "2:dot11agduplrpo", "0", 0 },
1516 { "2:rxgains5gmelnagaina0", "2", 0 },
1517 { "2:rxgains5gmtrisoa0", "5", 0 },
1518 { "2:rxgains5gmtrelnabypa0", "1", 0 },
1519 { "2:rxgains5ghelnagaina0", "2", 0 },
1520 { "2:rxgains5ghtrisoa0", "5", 0 },
1521 { "2:rxgains5ghtrelnabypa0", "1", 0 },
1522 { "2:rxgains5gelnagaina0", "2", 0 },
1523 { "2:rxgains5gtrisoa0", "5", 0 },
1524 { "2:rxgains5gtrelnabypa0", "1", 0 },
1525 { "2:maxp5ga0", "90,90,106,106", 0 },
1526 { "2:rxgains5gmelnagaina1", "2", 0 },
1527 { "2:rxgains5gmtrisoa1", "5", 0 },
1528 { "2:rxgains5gmtrelnabypa1", "1", 0 },
1529 { "2:rxgains5ghelnagaina1", "2", 0 },
1530 { "2:rxgains5ghtrisoa1", "5", 0 },
1531 { "2:rxgains5ghtrelnabypa1", "1", 0 },
1532 { "2:rxgains5gelnagaina1", "2", 0 },
1533 { "2:rxgains5gtrisoa1", "5", 0 },
1534 { "2:rxgains5gtrelnabypa1", "1", 0 },
1535 { "2:maxp5ga1", "90,90,106,106", 0 },
1536 { "2:rxgains5gmelnagaina2", "2", 0 },
1537 { "2:rxgains5gmtrisoa2", "5", 0 },
1538 { "2:rxgains5gmtrelnabypa2", "1", 0 },
1539 { "2:rxgains5ghelnagaina2", "2", 0 },
1540 { "2:rxgains5ghtrisoa2", "5", 0 },
1541 { "2:rxgains5ghtrelnabypa2", "1", 0 },
1542 { "2:rxgains5gelnagaina2", "2", 0 },
1543 { "2:rxgains5gtrisoa2", "5", 0 },
1544 { "2:rxgains5gtrelnabypa2", "1", 0 },
1545 { "2:maxp5ga2", "90,90,106,106", 0 },
1546 { "2:ledbh10", "7", 0 },
1547 { 0, 0, 0 }
1550 struct nvram_tuple r8000_params[] = {
1551 { "0:aa5g", "7", 0 },
1552 { "0:aga0", "0x0", 0 },
1553 { "0:aga1", "0x0", 0 },
1554 { "0:aga2", "0x0", 0 },
1555 { "0:antswitch", "0", 0 },
1556 { "0:boardflags", "0x30008000", 0 },
1557 { "0:boardflags2", "0x2", 0 },
1558 { "0:boardflags3", "0x1", 0 },
1559 { "0:boardrev", "0x1421", 0 },
1560 { "0:boardvendor", "0x14e4", 0 },
1561 { "0:deadman_to", "720000000", 0 },
1562 { "0:devid", "0x43BC", 0 },
1563 { "0:devpath0", "sb/1/", 0 },
1564 { "0:disband5grp", "0x7", 0 },
1565 { "0:dot11agduphrpo", "0", 0 },
1566 { "0:dot11agduplrpo", "0", 0 },
1567 { "0:epagain5g", "0", 0 },
1568 { "0:femctrl", "6", 0 },
1569 { "0:gainctrlsph", "0", 0 },
1570 { "0:maxp5ga0", "98,98,98,98", 0 },
1571 { "0:maxp5ga1", "98,98,98,98", 0 },
1572 { "0:maxp5ga2", "98,98,98,98", 0 },
1573 { "0:mcsbw1605ghpo", "0", 0 },
1574 { "0:mcsbw1605glpo", "0", 0 },
1575 { "0:mcsbw1605gmpo", "0", 0 },
1576 { "0:mcsbw205ghpo", "0x76434200", 0 },
1577 { "0:mcsbw205glpo", "0", 0 },
1578 { "0:mcsbw205gmpo", "0", 0 },
1579 { "0:mcsbw405ghpo", "0x76434222", 0 },
1580 { "0:mcsbw405glpo", "0", 0 },
1581 { "0:mcsbw405gmpo", "0", 0 },
1582 { "0:mcsbw805ghpo", "0x76434222", 0 },
1583 { "0:mcsbw805glpo", "0", 0 },
1584 { "0:mcsbw805gmpo", "0", 0 },
1585 { "0:mcslr5ghpo", "0", 0 },
1586 { "0:mcslr5glpo", "0", 0 },
1587 { "0:mcslr5gmpo", "0", 0 },
1588 { "0:pa5ga0", "0xff25,0x156d,0xfd52,0xff27,0x1750,0xfd12,0xff33,0x1ca2,0xfc95,0xff40,0x1c48,0xfcb3", 0 },
1589 { "0:pa5ga1", "0xff28,0x1519,0xfd57,0xff31,0x169f,0xfd34,0xff2f,0x1bb3,0xfcad,0xff41,0x1d31,0xfc9f", 0 },
1590 { "0:pa5ga2", "0xff29,0x1543,0xfd5b,0xff2a,0x16f7,0xfd23,0xff27,0x1a50,0xfccd,0xff40,0x1cc1,0xfc95", 0 },
1591 { "0:papdcap5g", "0", 0 },
1592 { "0:pdgain5g", "4", 0 },
1593 { "0:pdoffset40ma0", "0", 0 },
1594 { "0:pdoffset40ma1", "0", 0 },
1595 { "0:pdoffset40ma2", "0", 0 },
1596 { "0:pdoffset80ma0", "0", 0 },
1597 { "0:pdoffset80ma1", "0", 0 },
1598 { "0:pdoffset80ma2", "0", 0 },
1599 { "0:phycal_tempdelta", "15", 0 },
1600 { "0:pwr_scale_1db", "1", 0 },
1601 { "0:rawtempsense", "0x1ff", 0 },
1602 { "0:rpcal5gb0", "0", 0 },
1603 { "0:rpcal5gb1", "0", 0 },
1604 { "0:rpcal5gb2", "0xb53e", 0 },
1605 { "0:rpcal5gb3", "0", 0 },
1606 { "0:rxchain", "7", 0 },
1607 { "0:rxgainerr5ga0", "63,63,63,63", 0 },
1608 { "0:rxgainerr5ga1", "31,31,31,31", 0 },
1609 { "0:rxgainerr5ga2", "31,31,31,31", 0 },
1610 { "0:rxgains5gelnagaina0", "1", 0 },
1611 { "0:rxgains5gelnagaina1", "1", 0 },
1612 { "0:rxgains5gelnagaina2", "1", 0 },
1613 { "0:rxgains5ghelnagaina0", "1", 0 },
1614 { "0:rxgains5ghelnagaina1", "1", 0 },
1615 { "0:rxgains5ghelnagaina2", "1", 0 },
1616 { "0:rxgains5ghtrelnabypa0", "1", 0 },
1617 { "0:rxgains5ghtrelnabypa1", "1", 0 },
1618 { "0:rxgains5ghtrelnabypa2", "1", 0 },
1619 { "0:rxgains5ghtrisoa0", "6", 0 },
1620 { "0:rxgains5ghtrisoa1", "6", 0 },
1621 { "0:rxgains5ghtrisoa2", "6", 0 },
1622 { "0:rxgains5gmelnagaina0", "1", 0 },
1623 { "0:rxgains5gmelnagaina1", "1", 0 },
1624 { "0:rxgains5gmelnagaina2", "1", 0 },
1625 { "0:rxgains5gmtrelnabypa0", "1", 0 },
1626 { "0:rxgains5gmtrelnabypa1", "1", 0 },
1627 { "0:rxgains5gmtrelnabypa2", "1", 0 },
1628 { "0:rxgains5gmtrisoa0", "6", 0 },
1629 { "0:rxgains5gmtrisoa1", "6", 0 },
1630 { "0:rxgains5gmtrisoa2", "6", 0 },
1631 { "0:rxgains5gtrelnabypa0", "1", 0 },
1632 { "0:rxgains5gtrelnabypa1", "1", 0 },
1633 { "0:rxgains5gtrelnabypa2", "1", 0 },
1634 { "0:rxgains5gtrisoa0", "6", 0 },
1635 { "0:rxgains5gtrisoa1", "6", 0 },
1636 { "0:rxgains5gtrisoa2", "6", 0 },
1637 { "0:sromrev", "11", 0 },
1638 { "0:subband5gver", "0x4", 0 },
1639 { "0:tempcorrx", "0x3f", 0 },
1640 { "0:tempoffset", "255", 0 },
1641 { "0:tempsense_option", "0x3", 0 },
1642 { "0:tempsense_slope", "0xff", 0 },
1643 { "0:temps_hysteresis", "5", 0 },
1644 { "0:temps_period", "5", 0 },
1645 { "0:tempthresh", "120", 0 },
1646 { "0:tssiposslope5g", "1", 0 },
1647 { "0:tworangetssi5g", "0", 0 },
1648 { "0:txchain", "7", 0 },
1649 { "0:venid", "0x14e4", 0 },
1650 { "0:watchdog", "3000", 0 },
1651 { "0:xtalfreq", "40000", 0 },
1652 { "1:aa2g", "7", 0 },
1653 { "1:agbg0", "0x0", 0 },
1654 { "1:agbg1", "0x0", 0 },
1655 { "1:agbg2", "0x0", 0 },
1656 { "1:antswitch", "0", 0 },
1657 { "1:boardflags", "0x1000", 0 },
1658 { "1:boardflags2", "0x2", 0 },
1659 { "1:boardflags3", "0x4000001", 0 },
1660 { "1:boardrev", "0x1421", 0 },
1661 { "1:boardvendor", "0x14e4", 0 },
1662 { "1:cckbw202gpo", "0", 0 },
1663 { "1:cckbw20ul2gpo", "0", 0 },
1664 { "1:deadman_to", "720000000", 0 },
1665 { "1:devid", "0x43BB", 0 },
1666 { "1:devpath1", "sb/1/", 0 },
1667 { "1:dot11agduphrpo", "0", 0 },
1668 { "1:dot11agduplrpo", "0", 0 },
1669 { "1:dot11agofdmhrbw202gpo", "0", 0 },
1670 { "1:epagain2g", "0", 0 },
1671 { "1:femctrl", "6", 0 },
1672 { "1:gainctrlsph", "0", 0 },
1673 { "1:maxp2ga0", "58", 0 },
1674 { "1:maxp2ga1", "58", 0 },
1675 { "1:maxp2ga2", "58", 0 },
1676 { "1:mcsbw202gpo", "0", 0 },
1677 { "1:mcsbw402gpo", "0", 0 },
1678 { "1:ofdmlrbw202gpo", "0", 0 },
1679 { "1:pa2ga0", "0xff40,0x1b2a,0xfcd0", 0 },
1680 { "1:pa2ga1", "0xff45,0x1b83,0xfcd2", 0 },
1681 { "1:pa2ga2", "0xff3a,0x1b35,0xfcc2", 0 },
1682 { "1:papdcap2g", "0", 0 },
1683 { "1:pdgain2g", "21", 0 },
1684 { "1:pdoffset2g40ma0", "15", 0 },
1685 { "1:pdoffset2g40ma1", "15", 0 },
1686 { "1:pdoffset2g40ma2", "15", 0 },
1687 { "1:pdoffset2g40mvalid", "1", 0 },
1688 { "1:pdoffset40ma0", "0", 0 },
1689 { "1:pdoffset40ma1", "0", 0 },
1690 { "1:pdoffset40ma2", "0", 0 },
1691 { "1:pdoffset80ma0", "0", 0 },
1692 { "1:pdoffset80ma1", "0", 0 },
1693 { "1:pdoffset80ma2", "0", 0 },
1694 { "1:phycal_tempdelta", "15", 0 },
1695 { "1:pwr_scale_1db", "1", 0 },
1696 { "1:rawtempsense", "0x1ff", 0 },
1697 { "1:rpcal2g", "0x2a06", 0 },
1698 { "1:rxchain", "7", 0 },
1699 { "1:rxgainerr2ga0", "7", 0 },
1700 { "1:rxgainerr2ga1", "2", 0 },
1701 { "1:rxgainerr2ga2", "0", 0 },
1702 { "1:rxgains2gelnagaina0", "2", 0 },
1703 { "1:rxgains2gelnagaina1", "2", 0 },
1704 { "1:rxgains2gelnagaina2", "2", 0 },
1705 { "1:rxgains2gtrelnabypa0", "1", 0 },
1706 { "1:rxgains2gtrelnabypa1", "1", 0 },
1707 { "1:rxgains2gtrelnabypa2", "1", 0 },
1708 { "1:rxgains2gtrisoa0", "6", 0 },
1709 { "1:rxgains2gtrisoa1", "6", 0 },
1710 { "1:rxgains2gtrisoa2", "6", 0 },
1711 { "1:sromrev", "11", 0 },
1712 { "1:tempcorrx", "0x3f", 0 },
1713 { "1:tempoffset", "255", 0 },
1714 { "1:tempsense_option", "0x3", 0 },
1715 { "1:tempsense_slope", "0xff", 0 },
1716 { "1:temps_hysteresis", "5", 0 },
1717 { "1:temps_period", "5", 0 },
1718 { "1:tempthresh", "120", 0 },
1719 { "1:tssiposslope2g", "1", 0 },
1720 { "1:tworangetssi2g", "0", 0 },
1721 { "1:txchain", "7", 0 },
1722 { "1:venvid", "0x14e4", 0 },
1723 { "1:watchdog", "10000", 0 },
1724 { "1:xtalfreq", "40000", 0 },
1725 { "2:aa5g", "7", 0 },
1726 { "2:aga0", "0x0", 0 },
1727 { "2:aga1", "0x0", 0 },
1728 { "2:aga2", "0x0", 0 },
1729 { "2:antswitch", "0", 0 },
1730 { "2:boardflags", "0x10000000", 0 },
1731 { "2:boardflags2", "0x2", 0 },
1732 { "2:boardflags3", "0x2", 0 },
1733 { "2:boardrev", "0x1421", 0 },
1734 { "2:boardvendor", "0x14e4", 0 },
1735 { "2:deadman_to", "720000000", 0 },
1736 { "2:devid", "0x43BC", 0 },
1737 { "2:devpath2", "sb/1/", 0 },
1738 { "2:disband5grp", "0x18", 0 },
1739 { "2:dot11agduphrpo", "0x4444", 0 },
1740 { "2:dot11agduplrpo", "0x4444", 0 },
1741 { "2:epagain5g", "0", 0 },
1742 { "2:femctrl", "6", 0 },
1743 { "2:gainctrlsph", "0", 0 },
1744 { "2:maxp5ga0", "74,74,74,74", 0 },
1745 { "2:maxp5ga1", "74,74,74,74", 0 },
1746 { "2:maxp5ga2", "74,74,74,74", 0 },
1747 { "2:mcsbw1605ghpo", "0", 0 },
1748 { "2:mcsbw1605glpo", "0", 0 },
1749 { "2:mcsbw1605gmpo", "0", 0 },
1750 { "2:mcsbw205ghpo", "0", 0 },
1751 { "2:mcsbw205glpo", "0x43224444", 0 },
1752 { "2:mcsbw205gmpo", "0x43224444", 0 },
1753 { "2:mcsbw405ghpo", "0", 0 },
1754 { "2:mcsbw405glpo", "0x43211111", 0 },
1755 { "2:mcsbw405gmpo", "0x43223333", 0 },
1756 { "2:mcsbw805ghpo", "0", 0 },
1757 { "2:mcsbw805glpo", "0x43211111", 0 },
1758 { "2:mcsbw805gmpo", "0x43212222", 0 },
1759 { "2:mcslr5ghpo", "0", 0 },
1760 { "2:mcslr5glpo", "0", 0 },
1761 { "2:mcslr5gmpo", "0", 0 },
1762 { "2:pa5ga0", "0xff25,0x156d,0xfd52,0xff27,0x1750,0xfd12,0xff33,0x1ca2,0xfc95,0xff40,0x1c48,0xfcb3", 0 },
1763 { "2:pa5ga1", "0xff28,0x1519,0xfd57,0xff31,0x169f,0xfd34,0xff2f,0x1bb3,0xfcad,0xff41,0x1d31,0xfc9f", 0 },
1764 { "2:pa5ga2", "0xff29,0x1543,0xfd5b,0xff2a,0x16f7,0xfd23,0xff27,0x1a50,0xfccd,0xff40,0x1cc1,0xfc95", 0 },
1765 { "2:papdcap5g", "0", 0 },
1766 { "2:pdgain5g", "19", 0 },
1767 { "2:pdoffset40ma0", "0x5444", 0 },
1768 { "2:pdoffset40ma1", "0x5444", 0 },
1769 { "2:pdoffset40ma2", "0x5344", 0 },
1770 { "2:pdoffset80ma0", "0x2111", 0 },
1771 { "2:pdoffset80ma1", "0x0111", 0 },
1772 { "2:pdoffset80ma2", "0x2111", 0 },
1773 { "2:phycal_tempdelta", "15", 0 },
1774 { "2:pwr_scale_1db", "1", 0 },
1775 { "2:rawtempsense", "0x1ff", 0 },
1776 { "2:rpcal5gb0", "0x4053", 0 },
1777 { "2:rpcal5gb1", "0x4b51", 0 },
1778 { "2:rpcal5gb2", "0", 0 },
1779 { "2:rpcal5gb3", "0", 0 },
1780 { "2:rxchain", "7", 0 },
1781 { "2:rxgainerr5ga0", "-2,63,63,63", 0 },
1782 { "2:rxgainerr5ga1", "-2,31,31,31", 0 },
1783 { "2:rxgainerr5ga2", "-5,31,31,31", 0 },
1784 { "2:rxgains5gelnagaina0", "1", 0 },
1785 { "2:rxgains5gelnagaina1", "1", 0 },
1786 { "2:rxgains5gelnagaina2", "1", 0 },
1787 { "2:rxgains5ghelnagaina0", "1", 0 },
1788 { "2:rxgains5ghelnagaina1", "1", 0 },
1789 { "2:rxgains5ghelnagaina2", "1", 0 },
1790 { "2:rxgains5ghtrelnabypa0", "1", 0 },
1791 { "2:rxgains5ghtrelnabypa1", "1", 0 },
1792 { "2:rxgains5ghtrelnabypa2", "1", 0 },
1793 { "2:rxgains5ghtrisoa0", "6", 0 },
1794 { "2:rxgains5ghtrisoa1", "6", 0 },
1795 { "2:rxgains5ghtrisoa2", "6", 0 },
1796 { "2:rxgains5gmelnagaina0", "1", 0 },
1797 { "2:rxgains5gmelnagaina1", "1", 0 },
1798 { "2:rxgains5gmelnagaina2", "1", 0 },
1799 { "2:rxgains5gmtrelnabypa0", "1", 0 },
1800 { "2:rxgains5gmtrelnabypa1", "1", 0 },
1801 { "2:rxgains5gmtrelnabypa2", "1", 0 },
1802 { "2:rxgains5gmtrisoa0", "6", 0 },
1803 { "2:rxgains5gmtrisoa1", "6", 0 },
1804 { "2:rxgains5gmtrisoa2", "6", 0 },
1805 { "2:rxgains5gtrelnabypa0", "1", 0 },
1806 { "2:rxgains5gtrelnabypa1", "1", 0 },
1807 { "2:rxgains5gtrelnabypa2", "1", 0 },
1808 { "2:rxgains5gtrisoa0", "6", 0 },
1809 { "2:rxgains5gtrisoa1", "6", 0 },
1810 { "2:rxgains5gtrisoa2", "6", 0 },
1811 { "2:sromrev", "11", 0 },
1812 { "2:subband5gver", "0x4", 0 },
1813 { "2:tempcorrx", "0x3f", 0 },
1814 { "2:tempoffset", "255", 0 },
1815 { "2:tempsense_option", "0x3", 0 },
1816 { "2:tempsense_slope", "0xff", 0 },
1817 { "2:temps_hysteresis", "5", 0 },
1818 { "2:temps_period", "5", 0 },
1819 { "2:tempthresh", "120", 0 },
1820 { "2:tssiposslope5g", "1", 0 },
1821 { "2:tworangetssi5g", "0", 0 },
1822 { "2:txchain", "7", 0 },
1823 { "2:venid", "0x14e4", 0 },
1824 { "2:watchdog", "3000", 0 },
1825 { "2:xtalfreq", "40000", 0 },
1826 { 0, 0, 0 }
1828 #else
1829 struct nvram_tuple bcm4360ac_defaults[] = {
1830 { "0:ledbh10", "7", 0 },
1831 { "1:ledbh10", "7", 0 },
1832 { 0, 0, 0 }
1834 #endif
1836 /* Translates from, for example, wl0_ (or wl0.1_) to wl_. */
1837 /* Only single digits are currently supported */
1839 static void
1840 fix_name(const char *name, char *fixed_name)
1842 char *pSuffix = NULL;
1844 /* Translate prefix wlx_ and wlx.y_ to wl_ */
1845 /* Expected inputs are: wld_root, wld.d_root, wld.dd_root
1846 * We accept: wld + '_' anywhere
1848 pSuffix = strchr(name, '_');
1850 if ((strncmp(name, "wl", 2) == 0) && isdigit(name[2]) && (pSuffix != NULL)) {
1851 strcpy(fixed_name, "wl");
1852 strcpy(&fixed_name[2], pSuffix);
1853 return;
1856 /* No match with above rules: default to input name */
1857 strcpy(fixed_name, name);
1862 * Find nvram param name; return pointer which should be treated as const
1863 * return NULL if not found.
1865 * NOTE: This routine special-cases the variable wl_bss_enabled. It will
1866 * return the normal default value if asked for wl_ or wl0_. But it will
1867 * return 0 if asked for a virtual BSS reference like wl0.1_.
1869 char *
1870 nvram_default_get(const char *name)
1872 int idx;
1873 char fixed_name[NVRAM_MAX_VALUE_LEN];
1875 fix_name(name, fixed_name);
1876 if (strcmp(fixed_name, "wl_bss_enabled") == 0) {
1877 if (name[3] == '.' || name[4] == '.') { /* Virtual interface */
1878 return "0";
1882 #ifndef RTCONFIG_BCM7
1883 #ifdef __CONFIG_HSPOT__
1884 if (strcmp(fixed_name, "wl_bss_hs2_enabled") == 0) {
1885 if (name[3] == '.' || name[4] == '.') { /* Virtual interface */
1886 return "0";
1889 #endif /* __CONFIG_HSPOT__ */
1890 #endif
1892 for (idx = 0; router_defaults[idx].name != NULL; idx++) {
1893 if (strcmp(router_defaults[idx].name, fixed_name) == 0) {
1894 return router_defaults[idx].value;
1898 return NULL;
1900 /* validate/restore all per-interface related variables */
1901 void
1902 nvram_validate_all(char *prefix, bool restore)
1904 struct nvram_tuple *t;
1905 char tmp[100];
1906 char *v;
1908 for (t = router_defaults; t->name; t++) {
1909 if (!strncmp(t->name, "wl_", 3)) {
1910 strcat_r(prefix, &t->name[3], tmp);
1911 if (!restore && nvram_get(tmp))
1912 continue;
1913 v = nvram_get(t->name);
1914 nvram_set(tmp, v ? v : t->value);
1919 /* restore specific per-interface variable */
1920 void
1921 nvram_restore_var(char *prefix, char *name)
1923 struct nvram_tuple *t;
1924 char tmp[100];
1926 for (t = router_defaults; t->name; t++) {
1927 if (!strncmp(t->name, "wl_", 3) && !strcmp(&t->name[3], name)) {
1928 nvram_set(strcat_r(prefix, name, tmp), t->value);
1929 break;
1933 #endif