Remove TCP Vegas support (ARM)
[tomato.git] / release / src-rt-6.x.4708 / router / shared / defaults.c
blobad2834a8827b268d0e7b2ad33c6847e858c20ebb
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 },
122 // PPPoE parameters
123 { "pppoe_ifname", "" , 0 }, // PPPoE enslaved interface
124 { "ppp_username", "" , 0 }, // PPP username
125 { "ppp_passwd", "" , 0 }, // PPP password
126 { "ppp_idletime", "5" , 0 }, // Dial on demand max idle time (mins)
127 { "ppp_keepalive", "0" , 0 }, // Restore link automatically
128 { "ppp_demand", "0" , 0 }, // Dial on demand
129 { "ppp_redialperiod", "10" , 0 }, // Redial Period (seconds)*/
130 { "ppp_mru", "1500" , 0 }, // Negotiate MRU to this value
131 { "ppp_mtu", "1500" , 0 }, // Negotiate MTU to the smaller of this value or the peer MRU
132 { "ppp_service", "" , 0 }, // PPPoE service name
133 { "ppp_ac", "" , 0 }, // PPPoE access concentrator name
134 { "ppp_static", "0" , 0 }, // Enable / Disable Static IP
135 { "ppp_static_ip", "" , 0 }, // PPPoE Static IP
136 { "ppp_get_ac", "" , 0 }, // PPPoE Server ac name
137 { "ppp_get_srv", "" , 0 }, // PPPoE Server service name
138 { "ppp_custom", "" , 0 }, // PPPD additional options
139 { "ppp_mlppp", "0" , 0 }, // PPPoE single line MLPPP
141 { "pppoe_lei", "10" , 0 },
142 { "pppoe_lef", "5" , 0 },
144 #ifdef TCONFIG_IPV6
145 // IPv6 parameters
146 { "ipv6_service", "" , 0 }, // [''|native|native-pd|6to4|sit|other]
147 { "ipv6_prefix", "" , 0 }, // The global-scope IPv6 prefix to route/advertise
148 { "ipv6_prefix_length", "64" , 0 }, // The bit length of the prefix. Used by dhcp6c. For radvd, /64 is always assumed.
149 { "ipv6_rtr_addr", "" , 0 }, // defaults to $ipv6_prefix::1
150 { "ipv6_radvd", "1" , 0 }, // Enable Router Advertisement (radvd)
151 { "ipv6_accept_ra", "1" , 0 }, // Accept RA on bit 0WAN and/or bit1LAN interfaces
152 { "ipv6_ifname", "six0" , 0 }, // The interface facing the rest of the IPv6 world
153 { "ipv6_tun_v4end", "0.0.0.0" , 0 }, // Foreign IPv4 endpoint of SIT tunnel
154 { "ipv6_relay", "1" , 0 }, // Foreign IPv4 endpoint host of SIT tunnel 192.88.99.?
155 { "ipv6_tun_addr", "" , 0 }, // IPv6 address to assign to local tunnel endpoint
156 { "ipv6_tun_addrlen", "64" , 0 }, // CIDR prefix length for tunnel's IPv6 address
157 { "ipv6_tun_mtu", "0" , 0 }, // Tunnel MTU, 0 for default
158 { "ipv6_tun_ttl", "255" , 0 }, // Tunnel TTL
159 { "ipv6_dns", "" , 0 }, // DNS server(s) IPs
160 { "ipv6_get_dns", "" , 0 }, // DNS IP address which get by dhcp6c
161 { "ipv6_6rd_prefix", "2602:100::" , 0 }, // 6RD prefix (Charter)
162 { "ipv6_6rd_prefix_length", "32" , 0 }, // 6RD prefix length (32-62) checkme
163 { "ipv6_6rd_borderrelay", "68.113.165.1" , 0 }, // 6RD border relay address
164 { "ipv6_6rd_ipv4masklen", "0" , 0 }, // 6RD IPv4 mask length (0-30) checkme
165 { "ipv6_vlan", "0" , 0 }, // Enable IPv6 on 1=LAN1 2=LAN2 4=LAN3
166 { "ipv6_pdonly", "0" , 0 }, // Request DHCPv6 Prefix Delegation Only
167 { "ipv6_ipsec", "1" , 0 }, // Enable Incoming IPv6 IPSec
168 #endif
170 #ifdef RTCONFIG_FANCTRL
171 { "fanctrl_dutycycle", "0" , 0 },
172 #endif
174 // Wireless parameters
175 { "wl_ifname", "" , 0 }, // Interface name
176 { "wl_hwaddr", "" , 0 }, // MAC address
177 { "wl_phytype", "b" , 0 }, // Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) // Modify
178 { "wl_corerev", "" , 0 }, // Current core revision
179 { "wl_phytypes", "" , 0 }, // List of supported wireless bands (e.g. "ga")
180 { "wl_radioids", "" , 0 }, // List of radio IDs
181 { "wl_ssid", "Tomato24" , 0 }, // Service set ID (network name)
182 { "wl1_ssid", "Tomato50" , 0 },
183 { "wl_country_code", "" , 0 }, // Country (default obtained from driver)
184 { "wl_radio", "1" , 0 }, // Enable (1) or disable (0) radio
185 { "wl1_radio", "1" , 0 }, // Enable (1) or disable (0) radio
186 { "wl_closed", "0" , 0 }, // Closed (hidden) network
187 { "wl_ap_isolate", "0" , 0 }, // AP isolate mode
188 { "wl_mode", "ap" , 0 }, // AP mode (ap|sta|wds)
189 { "wl_lazywds", "1" , 0 }, // Enable "lazy" WDS mode (0|1)
190 { "wl_wds", "" , 0 }, // xx:xx:xx:xx:xx:xx ...
191 { "wl_wds_timeout", "1" , 0 }, // WDS link detection interval defualt 1 sec*/
192 { "wl_wep", "disabled" , 0 }, // WEP data encryption (enabled|disabled)
193 { "wl_auth", "0" , 0 }, // Shared key authentication optional (0) or required (1)
194 { "wl_key", "1" , 0 }, // Current WEP key
195 { "wl_key1", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
196 { "wl_key2", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
197 { "wl_key3", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
198 { "wl_key4", "" , 0 }, // 5/13 char ASCII or 10/26 char hex
199 { "wl_channel", "6" , 0 }, // Channel number
200 { "wl1_channel", "0" , 0 },
201 { "wl_rate", "0" , 0 }, // Rate (bps, 0 for auto)
202 { "wl_mrate", "0" , 0 }, // Mcast Rate (bps, 0 for auto)
203 { "wl_rateset", "default" , 0 }, // "default" or "all" or "12"
204 { "wl_frag", "2346" , 0 }, // Fragmentation threshold
205 { "wl_rts", "2347" , 0 }, // RTS threshold
206 { "wl_dtim", "1" , 0 }, // DTIM period (3.11.5)*/ // It is best value for WiFi test
207 { "wl_bcn", "100" , 0 }, // Beacon interval
208 { "wl_plcphdr", "long" , 0 }, // 802.11b PLCP preamble type
209 { "wl_net_mode", "mixed" , 0 }, // Wireless mode (mixed|g-only|b-only|disable)
210 { "wl_gmode", "1" , 0 }, // 54g mode
211 { "wl_gmode_protection", "off" , 0 }, // 802.11g RTS/CTS protection (off|auto)
212 { "wl_afterburner", "off" , 0 }, // AfterBurner
213 { "wl_frameburst", "off" , 0 }, // BRCM Frambursting mode (off|on)
214 { "wl_wme", "auto" , 0 }, // WME mode (auto|off|on)
215 { "wl1_wme", "auto" , 0 }, // WME mode (auto|off|on)
216 { "wl_antdiv", "-1" , 0 }, // Antenna Diversity (-1|0|1|3)
217 { "wl_infra", "1" , 0 }, // Network Type (BSS/IBSS)
218 { "wl_btc_mode", "0" , 0 }, // !!TB - BT Coexistence Mode
219 { "wl_sta_retry_time", "5" , 0 }, // !!TB - Seconds between association attempts (0 to disable retries)
220 { "wl_mitigation", "0" , 0 }, // Interference Mitigation Mode (0|1|2|3|4)
222 { "wl_passphrase", "" , 0 }, // Passphrase // Add
223 { "wl_wep_bit", "128" , 0 }, // WEP encryption [64 | 128] // Add
224 { "wl_wep_buf", "" , 0 }, // save all settings for web // Add
225 { "wl_wep_gen", "" , 0 }, // save all settings for generate button // Add
226 { "wl_wep_last", "" , 0 }, // Save last wl_wep mode // Add
228 { "wl_vifs", "" , 0 }, // multiple/virtual BSSIDs
230 // WPA parameters
231 { "wl_security_mode", "disabled" , 0 }, // WPA mode (disabled|radius|wpa_personal|wpa_enterprise|wep|wpa2_personal|wpa2_enterprise) for WEB // Add
232 { "wl_auth_mode", "none" , 0 }, // Network authentication mode (radius|none)
233 { "wl_wpa_psk", "" , 0 }, // WPA pre-shared key
234 { "wl_wpa_gtk_rekey", "3600" , 0 }, // WPA GTK rekey interval // Modify
235 { "wl_radius_ipaddr", "" , 0 }, // RADIUS server IP address
236 { "wl_radius_key", "" , 0 }, // RADIUS shared secret
237 { "wl_radius_port", "1812" , 0 }, // RADIUS server UDP port
238 { "wl_crypto", "aes" , 0 }, // WPA data encryption
239 { "wl_net_reauth", "36000" , 0 }, // Network Re-auth/PMK caching duration
240 { "wl_akm", "" , 0 }, // WPA akm list
242 // WME parameters (cwmin cwmax aifsn txop_b txop_ag adm_control oldest_first)
243 // EDCA parameters for STA
244 { "wl_wme_sta_bk", "15 1023 7 0 0 off off" , 0 }, // WME STA AC_BK paramters
245 { "wl_wme_sta_be", "15 1023 3 0 0 off off" , 0 }, // WME STA AC_BE paramters
246 { "wl_wme_sta_vi", "7 15 2 6016 3008 off off" , 0 }, // WME STA AC_VI paramters
247 { "wl_wme_sta_vo", "3 7 2 3264 1504 off off" , 0 }, // WME STA AC_VO paramters
249 // EDCA parameters for AP
250 { "wl_wme_ap_bk", "15 1023 7 0 0 off off" , 0 }, // WME AP AC_BK paramters
251 { "wl_wme_ap_be", "15 63 3 0 0 off off" , 0 }, // WME AP AC_BE paramters
252 { "wl_wme_ap_vi", "7 15 1 6016 3008 off off" , 0 }, // WME AP AC_VI paramters
253 { "wl_wme_ap_vo", "3 7 1 3264 1504 off off" , 0 }, // WME AP AC_VO paramters
255 { "wl_wme_no_ack", "off" , 0 }, // WME No-Acknowledgmen mode
256 { "wl_wme_apsd", "on" , 0 }, // WME APSD mode
257 { "wl_wme_bss_disable", "0" , 0 }, // WME BSS disable advertising (off|on)
259 /* Per AC Tx parameters */
260 { "wl_wme_txp_be", "7 3 4 2 0" , 0 }, /* WME AC_BE Tx parameters */
261 { "wl_wme_txp_bk", "7 3 4 2 0" , 0 }, /* WME AC_BK Tx parameters */
262 { "wl_wme_txp_vi", "7 3 4 2 0" , 0 }, /* WME AC_VI Tx parameters */
263 { "wl_wme_txp_vo", "7 3 4 2 0" , 0 }, /* WME AC_VO Tx parameters */
265 { "wl_unit", "0" , 0 }, // Last configured interface
266 { "wl_mac_deny", "" , 0 }, // filter MAC // Add
268 { "wl_leddc", "0x640000" , 0 }, // !!TB - 100% duty cycle for LED on router (WLAN LED fix for some routers)
269 { "wl_bss_enabled", "1" , 0 }, // !!TB - If not present the new versions of wlconf may not bring up wlan
270 { "wl_reg_mode", "off" , 0 }, // !!TB - Regulatory: 802.11H(h)/802.11D(d)/off(off)
272 // !!TB: n-mode
273 { "wl_nmode", "-1" , 0 }, // N-mode
274 { "wl_nband", "2" , 0 }, // 2 - 2.4GHz, 1 - 5GHz, 0 - Auto
275 { "wl1_nband", "1" , 0 },
276 { "wl_nmcsidx", "-1" , 0 }, // MCS Index for N - rate
277 { "wl_nreqd", "0" , 0 }, // Require 802.11n support
278 { "wl_nbw", "40" , 0 }, // BW: 20 / 40 MHz
279 { "wl_nbw_cap", "1" , 0 }, // BW: def 20inB and 40inA
280 { "wl_mimo_preamble", "mm" , 0 }, // 802.11n Preamble: mm/gf/auto/gfbcm
281 { "wl_nctrlsb", "upper" , 0 }, // N-CTRL SB (none/lower/upper)
282 { "wl_nmode_protection", "off" , 0 }, // 802.11n RTS/CTS protection (off|auto)
283 { "wl_rxstreams", "0" , 0 }, // 802.11n Rx Streams, 0 is invalid, WLCONF will change it to a radio appropriate default
284 { "wl_txstreams", "0" , 0 }, // 802.11n Tx Streams 0, 0 is invalid, WLCONF will change it to a radio appropriate default
285 { "wl_dfs_preism", "60" , 0 }, // 802.11H pre network CAC time
286 { "wl_dfs_postism", "60" , 0 }, // 802.11H In Service Monitoring CAC time
287 { "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
288 { "wl_bcn_rotate", "1" , 0 }, // Beacon rotation
289 { "wl_vlan_prio_mode", "off" , 0 }, // VLAN Priority support
290 { "wl_obss_coex", "0" , 0 }, // OBSS Coexistence (0|1): when enabled, channel width is forced to 20MHz
292 #ifdef TCONFIG_EMF
293 { "emf_entry", "" , 0 }, // Static MFDB entry (mgrp:if)
294 { "emf_uffp_entry", "" , 0 }, // Unreg frames forwarding ports
295 { "emf_rtport_entry", "" , 0 }, // IGMP frames forwarding ports
296 { "emf_enable", "0" , 0 }, // Disable EMF by default
297 #endif
298 #ifdef CONFIG_BCMWL5
299 // AMPDU
300 { "wl_ampdu", "auto" , 0 }, // Default AMPDU setting
301 { "wl_ampdu_rtylimit_tid", "5 5 5 5 5 5 5 5" , 0 }, // Default AMPDU retry limit per-tid setting
302 { "wl_ampdu_rr_rtylimit_tid", "2 2 2 2 2 2 2 2" , 0 }, // Default AMPDU regular rate retry limit per-tid setting
303 { "wl_amsdu", "auto" , 0 }, // Default AMSDU setting
304 // power save
305 #ifdef TCONFIG_BCMWL6
306 { "wl_bss_opmode_cap_reqd", "0" , 0 },
307 #endif
308 #ifndef TCONFIG_BCMARM
309 { "wl_rxchain_pwrsave_enable", "1" , 0 }, // Rxchain powersave enable
310 { "wl_rxchain_pwrsave_quiet_time","1800" , 0 }, // Quiet time for power save
311 { "wl_rxchain_pwrsave_pps", "10" , 0 }, // Packets per second threshold for power save
312 { "wl_rxchain_pwrsave_stas_assoc_check", "0" , 0 }, /* STAs associated before powersave */
313 #endif
314 { "wl_radio_pwrsave_enable", "0" , 0 }, // Radio powersave enable
315 { "wl_radio_pwrsave_quiet_time","1800" , 0 }, // Quiet time for power save
316 { "wl_radio_pwrsave_pps", "10" , 0 }, // Packets per second threshold for power save
317 { "wl_radio_pwrsave_on_time", "50" , 0 }, // Radio on time for power save
318 { "acs_mode", "legacy" , 0 }, /* Legacy mode if ACS is enabled */
319 // misc
320 { "wl_wmf_bss_enable", "0" , 0 }, // Wireless Multicast Forwarding Enable/Disable
321 { "wl_rifs_advert", "auto" , 0 }, // RIFS mode advertisement
322 { "wl_stbc_tx", "auto" , 0 }, // Default STBC TX setting
323 { "wl_mcast_regen_bss_enable", "1" , 0 }, // MCAST REGEN Enable/Disable
324 #endif
325 #ifdef TCONFIG_BCMWL6
326 { "wl_ack_ratio", "0"},
327 { "wl_ampdu_mpdu", "0"},
328 { "wl_ampdu_rts", "1"},
329 #ifdef TCONFIG_BCMARM
330 { "wl_turbo_qam", "1"},
331 { "wl_itxbf", "1"},
332 { "wl0_itxbf", "0"},
333 #endif
334 #endif
336 { "pptp_server_ip", "" , 0 }, // as same as WAN gateway
337 { "ppp_get_ip", "" , 0 }, // IP Address assigned by PPTP/L2TP server
338 { "pptp_dhcp", "1" , 0 },
340 // for firewall
341 { "mtu_enable", "0" , 0 }, // WAN MTU [1|0]
342 { "wan_mtu", "1500" , 0 }, // Negotiate MTU to the smaller of this value or the peer MRU
344 { "l2tp_server_ip", "" , 0 }, // L2TP auth server (IP Address)
346 // misc
347 { "wl_tnoise", "-99" , 0 },
348 { "led_override", "" , 0 },
349 { "btn_override", "" , 0 },
350 { "btn_reset", "" , 0 },
351 { "env_path", "" , 0 },
352 { "manual_boot_nv", "0" , 0 },
353 { "t_fix1", "" , 0 },
355 // basic-ddns
356 { "ddnsx0", "" , 0 },
357 { "ddnsx1", "" , 0 },
358 { "ddnsx0_cache", "" , 0 },
359 { "ddnsx1_cache", "" , 0 },
360 { "ddnsx_save", "1" , 0 },
361 { "ddnsx_refresh", "28" , 0 },
363 // basic-ident
364 { "router_name", "TomatoUSB" , 0 },
365 { "wan_hostname", "unknown" , 0 },
366 { "wan_domain", "" , 0 },
368 // basic-time
369 { "tm_sel", "CET-1CEST,M3.5.0/2,M10.5.0/3" , 0 },
370 { "tm_tz", "CET-1CEST,M3.5.0/2,M10.5.0/3" , 0 },
371 { "tm_dst", "1" , 0 },
372 { "ntp_updates", "4" , 0 },
373 { "ntp_tdod", "0" , 0 },
374 { "ntp_server", "0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org" , 0 },
375 { "ntp_kiss", "" , 0 },
376 { "ntp_kiss_ignore", "" , 0 },
378 // basic-static
379 { "dhcpd_static", "" , 0 },
380 { "dhcpd_static_only", "0" , 0 },
381 // basic-wfilter
382 { "wl_maclist", "" , 0 }, // xx:xx:xx:xx:xx:xx ...
383 { "wl_macmode", "disabled" , 0 },
384 { "macnames", "" , 0 },
386 // advanced-ctnf
387 { "ct_tcp_timeout", "" , 0 },
388 { "ct_udp_timeout", "" , 0 },
389 { "ct_timeout", "" , 0 },
390 { "ct_max", "" , 0 },
391 { "nf_ttl", "0" , 0 },
392 { "nf_l7in", "1" , 0 },
393 #ifdef LINUX26
394 { "nf_sip", "1" , 0 },
395 { "ct_hashsize", "2048" , 0 },
396 #endif
397 #ifdef LINUX26
398 { "nf_rtsp", "0" , 0 },
399 #else
400 { "nf_rtsp", "1" , 0 },
401 #endif
402 { "nf_pptp", "1" , 0 },
403 { "nf_h323", "1" , 0 },
404 { "nf_ftp", "1" , 0 },
406 // advanced-mac
407 { "mac_wan", "" , 0 },
408 { "wl_macaddr", "" , 0 },
410 // advanced-misc
411 { "boot_wait", "on" , 0 },
412 { "wait_time", "5" , 0 },
413 { "wan_speed", "4" , 0 }, // 0=10 Mb Full, 1=10 Mb Half, 2=100 Mb Full, 3=100 Mb Half, 4=Auto
414 { "jumbo_frame_enable", "0" , 0 }, // Jumbo Frames support (for RT-N16/WNR3500L)
415 { "jumbo_frame_size", "2000" , 0 },
416 #ifdef CONFIG_BCMWL5
417 { "ctf_disable", "1" , 0 },
418 #endif
419 #ifdef TCONFIG_BCMFA
420 { "ctf_fa_mode", "0" , 0 },
421 #endif
423 // advanced-dhcpdns
424 { "dhcpd_dmdns", "1" , 0 },
425 { "dhcpd_slt", "0" , 0 },
426 { "dhcpd_gwmode", "" , 0 },
427 { "dhcpd_lmax", "" , 0 },
428 { "dns_addget", "0" , 0 },
429 { "dns_intcpt", "0" , 0 },
430 { "dhcpc_minpkt", "1" , 0 },
431 { "dhcpc_custom", "" , 0 },
432 { "dns_norebind", "1" , 0 },
433 { "dnsmasq_custom", "" , 0 },
434 { "dnsmasq_static_only", "0" , 0 },
435 { "dnsmasq_q", "0" , 0 }, //Bit0=quiet-dhcp, 1=dhcp6, 2=ra
437 // advanced-firewall
438 { "nf_loopback", "0" , 0 },
439 { "block_wan", "1" , 0 }, // block inbound icmp
440 { "block_wan_limit", "1" , 0 },
441 { "block_wan_limit_icmp", "1" , 0 },
442 { "block_wan_limit_tr", "5" , 0 },
443 { "multicast_pass", "0" , 0 }, // enable multicast proxy
444 { "multicast_lan", "0" , 0 }, // on LAN (br0)
445 { "multicast_lan1", "0" , 0 }, // on LAN1 (br1)
446 { "multicast_lan2", "0" , 0 }, // on LAN2 (br2)
447 { "multicast_lan3", "0" , 0 }, // on LAN3 (br3)
448 { "udpxy_enable", "0" , 0 },
449 { "udpxy_stats", "0" , 0 },
450 { "udpxy_clients", "3" , 0 },
451 { "udpxy_port", "4022" , 0 },
452 { "ne_syncookies", "0" , 0 }, // tcp_syncookies
453 { "DSCP_fix_enable", "1" , 0 }, // Comacst DSCP fix
454 { "ne_snat", "0" , 0 }, // use SNAT instead of MASQUERADE
455 { "dhcp_pass", "1" , 0 }, // allow DHCP responses
456 { "ne_shlimit", "1,3,60" , 0 }, //shibby - enable limit connection attempts for sshd
458 // advanced-routing
459 { "routes_static", "" , 0 },
460 { "dhcp_routes", "1" , 0 },
461 { "wk_mode", "gateway" , 0 }, // Network mode [gateway|router]
462 #ifdef TCONFIG_ZEBRA
463 { "dr_setting", "0" , 0 }, // [ Disable | WAN | LAN | Both ]
464 { "dr_lan_tx", "0" , 0 }, // Dynamic-Routing LAN out
465 { "dr_lan_rx", "0" , 0 }, // Dynamic-Routing LAN in
466 { "dr_lan1_tx", "0" , 0 }, // Dynamic-Routing LAN out
467 { "dr_lan1_rx", "0" , 0 }, // Dynamic-Routing LAN in
468 { "dr_lan2_tx", "0" , 0 }, // Dynamic-Routing LAN out
469 { "dr_lan2_rx", "0" , 0 }, // Dynamic-Routing LAN in
470 { "dr_lan3_tx", "0" , 0 }, // Dynamic-Routing LAN out
471 { "dr_lan3_rx", "0" , 0 }, // Dynamic-Routing LAN in
472 { "dr_wan_tx", "0" , 0 }, // Dynamic-Routing WAN out
473 { "dr_wan_rx", "0" , 0 }, // Dynamic-Routing WAN in
474 #endif
476 // advanced-vlan
477 { "trunk_vlan_so", "0" , 0 }, // VLAN trunk support override
479 // advanced-wireless
480 { "wl_txant", "3" , 0 },
481 { "wl_txpwr", "0" , 0 },
482 { "wl_maxassoc", "128" , 0 }, // Max associations driver could support
483 { "wl_bss_maxassoc", "128" , 0 },
484 { "wl_distance", "" , 0 },
486 // forward-*
487 { "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 },
488 #ifdef TCONFIG_IPV6
489 { "ipv6_portforward", "", 0 },
490 #endif
491 { "trigforward", "0<1<3000:4000<5000:6000<ex: open 5000-6000 if 3000-4000>" , 0 },
492 { "dmz_enable", "0" , 0 },
493 { "dmz_ipaddr", "0" , 0 },
494 { "dmz_sip", "" , 0 },
495 { "dmz_ifname", "br0" , 0 },
496 { "dmz_ra", "1" , 0 },
498 // forward-upnp
499 { "upnp_enable", "0" , 0 },
500 { "upnp_secure", "1" , 0 },
501 { "upnp_port", "0" , 0 },
502 { "upnp_ssdp_interval", "60" , 0 }, // SSDP interval
503 { "upnp_mnp", "0" , 0 },
504 { "upnp_custom", "" , 0 },
506 { "upnp_clean", "1" , 0 }, /* 0:Disable 1:Enable */
507 { "upnp_clean_interval", "600" , 0 }, /* Cleaning interval in seconds */
508 { "upnp_clean_threshold", "20" , 0 }, /* Threshold for cleaning unused rules */
509 #if 0 // disabled for miniupnpd
510 { "upnp_max_age", "180" , 0 }, // Max age
511 { "upnp_config", "0" , 0 },
512 #endif
514 // qos
515 { "atm_overhead", "0" , 0 },
516 { "qos_enable", "0" , 0 },
517 { "qos_ack", "0" , 0 },
518 { "qos_syn", "1" , 0 },
519 { "qos_fin", "1" , 0 },
520 { "qos_rst", "1" , 0 },
521 { "qos_udp", "0" , 0 },
522 { "qos_icmp", "1" , 0 },
523 { "qos_pfifo", "3" , 0 }, //Set FQ_Codel Default Qdisc Scheduler
524 { "qos_reset", "1" , 0 },
525 { "qos_obw", "700" , 0 },
526 { "qos_ibw", "16000" , 0 },
528 { "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 },
530 { "qos_burst0", "" , 0 },
531 { "qos_burst1", "" , 0 },
532 { "qos_default", "8" , 0 },
533 { "qos_orates", "5-100,5-30,5-100,5-70,5-70,5-70,5-70,5-100,5-30,1-1" , 0 },
534 { "qos_irates", "5-100,5-30,5-100,5-70,5-70,5-70,5-70,5-100,5-30,1-1" , 0 },
535 { "qos_classnames", "Service VOIP/Game Remote WWW Media HTTPS/Msgr Mail FileXfer P2P/Bulk Crawl" , 0 },
537 // access restrictions
538 { "rruleN", "0" , 0 },
539 { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" , 0 },
540 { "rrulewp", "80,8080" , 0 },
542 #if TOMATO_SL
543 // samba
544 { "smbd_on", "0" , 0 },
545 { "nmbd_on", "0" , 0 },
546 { "smbd_wgroup", "WORKGROUP" , 0 },
547 { "smbd_nbname", "TOMATO" , 0 },
548 { "smbd_adminpass", "admin" , 0 },
549 #endif
551 // admin-access
552 { "http_username", "" , 0 }, // Username
553 { "http_passwd", "admin" , 0 }, // Password
554 { "remote_management", "0" , 0 }, // Remote Management [1|0]
555 { "remote_mgt_https", "0" , 0 }, // Remote Management use https [1|0]
556 { "http_wanport", "8080" , 0 }, // WAN port to listen on
557 { "http_lanport", "80" , 0 }, // LAN port to listen on
558 { "https_lanport", "443" , 0 }, // LAN port to listen on
559 { "http_enable", "1" , 0 }, // HTTP server enable/disable
560 { "https_enable", "0" , 0 }, // HTTPS server enable/disable
561 { "https_crt_save", "0" , 0 },
562 { "https_crt_cn", "" , 0 },
563 { "https_crt_file", "" , 0 },
564 { "https_crt", "" , 0 },
565 { "http_root", "1" , 0 }, // 0 - deny, 1 - Allow
566 { "web_wl_filter", "0" , 0 }, // Allow/Deny Wireless Access Web
567 { "web_css", "openlinksys" , 0 },
568 { "web_dir", "default" , 0 }, // jffs, opt, tmp or default (/www)
569 { "ttb_css", "example" , 0 }, //Tomato Themes Base
570 { "web_svg", "1" , 0 },
571 { "telnetd_eas", "1" , 0 },
572 { "telnetd_port", "23" , 0 },
573 { "sshd_eas", "1" , 0 }, //shibby - enable sshd by default
574 { "sshd_pass", "1" , 0 },
575 { "sshd_port", "22" , 0 },
576 { "sshd_remote", "0" , 0 },
577 { "sshd_motd", "1" , 0 },
578 { "sshd_rport", "22" , 0 },
579 { "sshd_authkeys", "" , 0 },
580 { "sshd_hostkey", "" , 0 },
581 { "sshd_dsskey", "" , 0 },
582 { "sshd_ecdsakey", "" , 0 },
583 { "sshd_forwarding", "1" , 0 },
584 { "rmgt_sip", "" , 0 }, // remote management: source ip address
586 { "http_id", "" , 0 },
587 { "web_mx", "status,bwm" , 0 },
588 { "web_pb", "" , 0 },
590 // admin-bwm
591 { "rstats_enable", "1" , 0 },
592 { "rstats_path", "" , 0 },
593 { "rstats_stime", "48" , 0 },
594 { "rstats_offset", "1" , 0 },
595 { "rstats_data", "" , 0 },
596 { "rstats_colors", "" , 0 },
597 { "rstats_exclude", "" , 0 },
598 { "rstats_sshut", "1" , 0 },
599 { "rstats_bak", "0" , 0 },
601 // admin-ipt
602 { "cstats_enable", "1" , 0 },
603 { "cstats_path", "" , 0 },
604 { "cstats_stime", "48" , 0 },
605 { "cstats_offset", "1" , 0 },
606 { "cstats_labels", "0" , 0 },
607 { "cstats_exclude", "" , 0 },
608 { "cstats_include", "" , 0 },
609 { "cstats_all", "1" , 0 },
610 { "cstats_sshut", "1" , 0 },
611 { "cstats_bak", "0" , 0 },
613 // advanced-buttons
614 { "sesx_led", "0" , 0 },
615 { "sesx_b0", "1" , 0 },
616 { "sesx_b1", "4" , 0 },
617 { "sesx_b2", "4" , 0 },
618 { "sesx_b3", "4" , 0 },
619 { "sesx_script",
620 "[ $1 -ge 20 ] && telnetd -p 233 -l /bin/sh\n"
621 , 0 },
622 { "script_brau",
623 "if [ ! -e /tmp/switch-start ]; then\n"
624 " # do something at startup\n"
625 " echo position at startup was $1 >/tmp/switch-start\n"
626 " exit\n"
627 "fi\n"
628 "if [ $1 = \"bridge\" ]; then\n"
629 " # do something\n"
630 " led bridge on\n"
631 "elif [ $1 = \"auto\" ]; then\n"
632 " # do something\n"
633 " led bridge off\n"
634 "fi\n"
635 , 0 },
637 // admin-log
638 { "log_remote", "0" , 0 },
639 { "log_remoteip", "" , 0 },
640 { "log_remoteport", "514" , 0 },
641 { "log_file", "1" , 0 },
642 { "log_file_custom", "0" , 0 },
643 { "log_file_path", "/var/log/messages" , 0 },
644 { "log_file_size", "50" , 0 },
645 { "log_file_keep", "1" , 0 },
646 { "log_limit", "60" , 0 },
647 { "log_in", "0" , 0 },
648 { "log_out", "0" , 0 },
649 { "log_mark", "60" , 0 },
650 { "log_events", "" , 0 },
652 // admin-log-webmonitor
653 { "log_wm", "0" , 0 },
654 { "log_wmtype", "0" , 0 },
655 { "log_wmip", "" , 0 },
656 { "log_wmdmax", "2000" , 0 },
657 { "log_wmsmax", "2000" , 0 },
658 { "webmon_bkp", "0" , 0 },
659 { "webmon_dir", "/tmp" , 0 },
660 { "webmon_shrink", "0" , 0 },
662 // admin-debugging
663 { "debug_nocommit", "0" , 0 },
664 { "debug_cprintf", "0" , 0 },
665 { "debug_cprintf_file", "0" , 0 },
666 { "console_loglevel", "1" , 0 },
667 { "t_cafree", "1" , 0 },
668 { "t_hidelr", "0" , 0 },
669 { "debug_clkfix", "1" , 0 },
670 { "debug_ddns", "0" , 0 },
672 // admin-cifs
673 { "cifs1", "" , 0 },
674 { "cifs2", "" , 0 },
676 // admin-jffs2
677 { "jffs2_on", "0" , 0 },
678 { "jffs2_exec", "" , 0 },
680 #ifdef TCONFIG_USB
681 // nas-usb - !!TB
682 { "usb_enable", "1" , 0 },
683 { "usb_uhci", "0" , 0 },
684 { "usb_ohci", "0" , 0 },
685 { "usb_usb2", "1" , 0 },
686 { "usb_usb3", "1" , 0 },
687 #if defined(LINUX26) && defined(TCONFIG_MICROSD)
688 { "usb_mmc", "-1" , 0 },
689 #endif
690 { "usb_irq_thresh", "0" , 0 },
691 { "usb_storage", "1" , 0 },
692 { "usb_printer", "0" , 0 },
693 { "usb_printer_bidirect", "0" , 0 },
694 { "usb_ext_opt", "" , 0 },
695 { "usb_fat_opt", "" , 0 },
696 { "usb_ntfs_opt", "" , 0 },
697 { "usb_fs_ext3", "1" , 0 },
698 { "usb_fs_ext4", "1" , 0 },
699 { "usb_fs_fat", "1" , 0 },
700 { "usb_fs_exfat", "1" , 0 },
701 #ifdef TCONFIG_NTFS
702 { "usb_fs_ntfs", "1" , 0 },
703 #ifdef TCONFIG_TUXERA
704 { "usb_ntfs_driver", "tuxera" , 0 },
705 #elif TCONFIG_UFSD
706 { "usb_ntfs_driver", "paragon" , 0 },
707 #else
708 { "usb_ntfs_driver", "ntfs3g" , 0 },
709 #endif
710 #endif //TCONFIG_NTFS
711 #ifdef TCONFIG_HFS
712 { "usb_fs_hfs", "0" , 0 }, //!Victek
713 #endif
714 { "usb_automount", "1" , 0 },
715 #if 0
716 { "usb_bdflush", "30 500 0 0 100 100 60 0 0" , 0 },
717 #endif
718 { "script_usbhotplug", "" , 0 },
719 { "script_usbmount", "" , 0 },
720 { "script_usbumount", "" , 0 },
721 { "idle_enable", "0" , 0 },
722 { "usb_3g", "1" , 0 },
723 #endif
725 #ifdef TCONFIG_FTP
726 // nas-ftp - !!TB
727 { "ftp_enable", "0" , 0 },
728 { "ftp_super", "0" , 0 },
729 { "ftp_anonymous", "0" , 0 },
730 { "ftp_dirlist", "0" , 0 },
731 { "ftp_port", "21" , 0 },
732 { "ftp_max", "0" , 0 },
733 { "ftp_ipmax", "0" , 0 },
734 { "ftp_staytimeout", "300" , 0 },
735 { "ftp_rate", "0" , 0 },
736 { "ftp_anonrate", "0" , 0 },
737 { "ftp_anonroot", "" , 0 },
738 { "ftp_pubroot", "" , 0 },
739 { "ftp_pvtroot", "" , 0 },
740 { "ftp_users", "" , 0 },
741 { "ftp_custom", "" , 0 },
742 { "ftp_sip", "" , 0 }, // wan ftp access: source ip address(es)
743 { "ftp_limit", "0,3,60" , 0 },
744 { "log_ftp", "0" , 0 },
745 #endif
747 #ifdef TCONFIG_SNMP
748 { "snmp_enable", "0" , 0 },
749 { "snmp_port", "161" , 0 },
750 { "snmp_remote", "0" , 0 },
751 { "snmp_remote_sip", "" , 0 },
752 { "snmp_location", "router" , 0 },
753 { "snmp_contact", "admin@tomato" , 0 },
754 { "snmp_ro", "rocommunity" , 0 },
755 #endif
757 #ifdef TCONFIG_SAMBASRV
758 // nas-samba - !!TB
759 { "smbd_enable", "0" , 0 },
760 { "smbd_wgroup", "WORKGROUP" , 0 },
761 { "smbd_master", "1" , 0 },
762 { "smbd_wins", "1" , 0 },
763 { "smbd_cpage", "" , 0 },
764 { "smbd_cset", "utf8" , 0 },
765 { "smbd_custom", "" , 0 },
766 { "smbd_autoshare", "2" , 0 },
767 { "smbd_shares",
768 "jffs</jffs<JFFS<1<0>root$</<Hidden Root<0<1"
769 , 0 },
770 { "smbd_user", "nas" , 0 },
771 { "smbd_passwd", "" , 0 },
772 { "smbd_ifnames", "br0" , 0 },
773 #endif
775 #ifdef TCONFIG_MEDIA_SERVER
776 // nas-media
777 { "ms_enable", "0" , 0 }, /* 0:Disable 1:Enable 2:Enable&Rescan */
778 { "ms_dirs", "/mnt<" , 0 },
779 { "ms_port", "0" , 0 },
780 { "ms_dbdir", "" , 0 },
781 { "ms_tivo", "0" , 0 },
782 { "ms_stdlna", "0" , 0 },
783 { "ms_sas", "0" , 0 },
784 #endif
786 #ifdef TCONFIG_SDHC
787 // admin-sdhc
788 { "mmc_on", "0" , 0 },
789 { "mmc_cs", "7" , 0 },
790 { "mmc_clk", "3" , 0 },
791 { "mmc_din", "2" , 0 },
792 { "mmc_dout", "4" , 0 },
793 { "mmc_fs_partition", "1" , 0 },
794 { "mmc_fs_type", "ext2" , 0 },
795 { "mmc_exec_mount", "" , 0 },
796 { "mmc_exec_umount", "" , 0 },
797 #endif
799 // admin-sch
800 { "sch_rboot", "" , 0 },
801 { "sch_rcon", "" , 0 },
802 { "sch_c1", "" , 0 },
803 { "sch_c2", "" , 0 },
804 { "sch_c3", "" , 0 },
805 { "sch_c4", "" , 0 },
806 { "sch_c5", "" , 0 },
807 { "sch_c1_cmd", "" , 0 },
808 { "sch_c2_cmd", "" , 0 },
809 { "sch_c3_cmd", "" , 0 },
810 { "sch_c4_cmd", "" , 0 },
811 { "sch_c5_cmd", "" , 0 },
813 // admin-script
814 { "script_init", "" , 0 },
815 { "script_shut", "" , 0 },
816 { "script_fire", "" , 0 },
817 { "script_wanup", "" , 0 },
819 #ifdef TCONFIG_NFS
820 { "nfs_enable", "0" , 0 },
821 { "nfs_exports", "" , 0 },
822 #endif
824 #ifdef TCONFIG_OPENVPN
825 // vpn
826 { "vpn_debug", "0" , 0 },
827 { "vpn_server_eas", "" , 0 },
828 { "vpn_server_dns", "" , 0 },
829 { "vpn_server1_poll", "0" , 0 },
830 { "vpn_server1_if", "tun" , 0 },
831 { "vpn_server1_proto", "udp" , 0 },
832 { "vpn_server1_port", "1194" , 0 },
833 { "vpn_server1_firewall", "auto" , 0 },
834 { "vpn_server1_crypt", "tls" , 0 },
835 { "vpn_server1_comp", "adaptive" , 0 },
836 { "vpn_server1_cipher", "default" , 0 },
837 { "vpn_server1_dhcp", "1" , 0 },
838 { "vpn_server1_r1", "192.168.1.50" , 0 },
839 { "vpn_server1_r2", "192.168.1.55" , 0 },
840 { "vpn_server1_sn", "10.8.0.0" , 0 },
841 { "vpn_server1_nm", "255.255.255.0" , 0 },
842 { "vpn_server1_local", "10.8.0.1" , 0 },
843 { "vpn_server1_remote", "10.8.0.2" , 0 },
844 { "vpn_server1_reneg", "-1" , 0 },
845 { "vpn_server1_hmac", "-1" , 0 },
846 { "vpn_server1_plan", "1" , 0 },
847 { "vpn_server1_ccd", "0" , 0 },
848 { "vpn_server1_c2c", "0" , 0 },
849 { "vpn_server1_ccd_excl", "0" , 0 },
850 { "vpn_server1_ccd_val", "" , 0 },
851 { "vpn_server1_pdns", "0" , 0 },
852 { "vpn_server1_rgw", "0" , 0 },
853 { "vpn_server1_custom", "" , 0 },
854 { "vpn_server1_static", "" , 0 },
855 { "vpn_server1_ca", "" , 0 },
856 { "vpn_server1_crt", "" , 0 },
857 { "vpn_server1_key", "" , 0 },
858 { "vpn_server1_dh", "" , 0 },
859 { "vpn_server1_br", "br0" , 0 },
860 { "vpn_server1_route" "0" , 0 },
861 { "vpn_server1_routing_val", "" , 0 },
862 { "vpn_server2_poll", "0" , 0 },
863 { "vpn_server2_if", "tun" , 0 },
864 { "vpn_server2_proto", "udp" , 0 },
865 { "vpn_server2_port", "1194" , 0 },
866 { "vpn_server2_firewall", "auto" , 0 },
867 { "vpn_server2_crypt", "tls" , 0 },
868 { "vpn_server2_comp", "adaptive" , 0 },
869 { "vpn_server2_cipher", "default" , 0 },
870 { "vpn_server2_dhcp", "1" , 0 },
871 { "vpn_server2_r1", "192.168.1.50" , 0 },
872 { "vpn_server2_r2", "192.168.1.55" , 0 },
873 { "vpn_server2_sn", "10.8.0.0" , 0 },
874 { "vpn_server2_nm", "255.255.255.0" , 0 },
875 { "vpn_server2_local", "10.8.0.1" , 0 },
876 { "vpn_server2_remote", "10.8.0.2" , 0 },
877 { "vpn_server2_reneg", "-1" , 0 },
878 { "vpn_server2_hmac", "-1" , 0 },
879 { "vpn_server2_plan", "1" , 0 },
880 { "vpn_server2_ccd", "0" , 0 },
881 { "vpn_server2_c2c", "0" , 0 },
882 { "vpn_server2_ccd_excl", "0" , 0 },
883 { "vpn_server2_ccd_val", "" , 0 },
884 { "vpn_server2_pdns", "0" , 0 },
885 { "vpn_server2_rgw", "0" , 0 },
886 { "vpn_server2_custom", "" , 0 },
887 { "vpn_server2_static", "" , 0 },
888 { "vpn_server2_ca", "" , 0 },
889 { "vpn_server2_crt", "" , 0 },
890 { "vpn_server2_key", "" , 0 },
891 { "vpn_server2_dh", "" , 0 },
892 { "vpn_server2_br", "br0" , 0 },
893 { "vpn_server2_route" "0" , 0 },
894 { "vpn_server2_routing_val", "" , 0 },
895 { "vpn_client_eas", "" , 0 },
896 { "vpn_client1_poll", "0" , 0 },
897 { "vpn_client1_if", "tun" , 0 },
898 { "vpn_client1_bridge", "1" , 0 },
899 { "vpn_client1_nat", "1" , 0 },
900 { "vpn_client1_proto", "udp" , 0 },
901 { "vpn_client1_addr", "" , 0 },
902 { "vpn_client1_port", "1194" , 0 },
903 { "vpn_client1_retry", "30" , 0 },
904 { "vpn_client1_rg", "0" , 0 },
905 { "vpn_client1_firewall", "auto" , 0 },
906 { "vpn_client1_crypt", "tls" , 0 },
907 { "vpn_client1_comp", "adaptive" , 0 },
908 { "vpn_client1_cipher", "default" , 0 },
909 { "vpn_client1_local", "10.8.0.2" , 0 },
910 { "vpn_client1_remote", "10.8.0.1" , 0 },
911 { "vpn_client1_nm", "255.255.255.0" , 0 },
912 { "vpn_client1_reneg", "-1" , 0 },
913 { "vpn_client1_hmac", "-1" , 0 },
914 { "vpn_client1_adns", "0" , 0 },
915 { "vpn_client1_rgw", "0" , 0 },
916 { "vpn_client1_gw", "" , 0 },
917 { "vpn_client1_custom", "" , 0 },
918 { "vpn_client1_static", "" , 0 },
919 { "vpn_client1_ca", "" , 0 },
920 { "vpn_client1_crt", "" , 0 },
921 { "vpn_client1_key", "" , 0 },
922 { "vpn_client1_br", "br0" , 0 },
923 { "vpn_client1_nopull", "0" , 0 },
924 { "vpn_client1_nobind", "1" , 0 },
925 { "vpn_client1_route", "0" , 0 },
926 { "vpn_client1_routing_val", "" , 0 },
927 { "vpn_client2_poll", "0" , 0 },
928 { "vpn_client2_if", "tun" , 0 },
929 { "vpn_client2_bridge", "1" , 0 },
930 { "vpn_client2_nat", "1" , 0 },
931 { "vpn_client2_proto", "udp" , 0 },
932 { "vpn_client2_addr", "" , 0 },
933 { "vpn_client2_port", "1194" , 0 },
934 { "vpn_client2_retry", "30" , 0 },
935 { "vpn_client2_rg", "0" , 0 },
936 { "vpn_client2_firewall", "auto" , 0 },
937 { "vpn_client2_crypt", "tls" , 0 },
938 { "vpn_client2_comp", "adaptive" , 0 },
939 { "vpn_client2_cipher", "default" , 0 },
940 { "vpn_client2_local", "10.8.0.2" , 0 },
941 { "vpn_client2_remote", "10.8.0.1" , 0 },
942 { "vpn_client2_nm", "255.255.255.0" , 0 },
943 { "vpn_client2_reneg", "-1" , 0 },
944 { "vpn_client2_hmac", "-1" , 0 },
945 { "vpn_client2_adns", "0" , 0 },
946 { "vpn_client2_rgw", "0" , 0 },
947 { "vpn_client2_gw", "" , 0 },
948 { "vpn_client2_custom", "" , 0 },
949 { "vpn_client2_static", "" , 0 },
950 { "vpn_client2_ca", "" , 0 },
951 { "vpn_client2_crt", "" , 0 },
952 { "vpn_client2_key", "" , 0 },
953 { "vpn_client2_br", "br0" , 0 },
954 { "vpn_client2_nopull", "0" , 0 },
955 { "vpn_client2_nobind", "1" , 0 },
956 { "vpn_client2_route", "0" , 0 },
957 { "vpn_client2_routing_val", "" , 0 },
958 #endif // vpn
959 #ifdef TCONFIG_PPTPD
960 { "pptp_client_enable", "0" , 0 },
961 { "pptp_client_peerdns", "0" , 0 },
962 { "pptp_client_mtuenable","0" , 0 },
963 { "pptp_client_mtu", "1450" , 0 },
964 { "pptp_client_mruenable","0" , 0 },
965 { "pptp_client_mru", "1450" , 0 },
966 { "pptp_client_nat", "0" , 0 },
967 { "pptp_client_srvip", "" , 0 },
968 { "pptp_client_srvsub", "10.0.0.0" , 0 },
969 { "pptp_client_srvsubmsk","255.0.0.0" , 0 },
970 { "pptp_client_username", "" , 0 },
971 { "pptp_client_passwd", "" , 0 },
972 { "pptp_client_crypt", "0" , 0 },
973 { "pptp_client_custom", "" , 0 },
974 { "pptp_client_dfltroute","0" , 0 },
975 #endif
977 #ifdef TCONFIG_TINC
978 {"tinc_wanup", "0" , 0 },
979 {"tinc_name", "" , 0 },
980 {"tinc_devicetype", "tun" , 0 }, // tun, tap
981 {"tinc_mode", "switch" , 0 }, // switch, hub
982 {"tinc_vpn_netmask", "255.255.0.0" , 0 },
983 {"tinc_private_rsa", "" , 0 },
984 {"tinc_private_ed25519", "" , 0 },
985 {"tinc_custom", "" , 0 },
986 {"tinc_hosts", "" , 0 },
987 {"tinc_manual_firewall", "" , 0 },
988 {"tinc_manual_tinc_up", "0" , 0 },
989 // scripts
990 {"tinc_tinc_up", "" , 0 },
991 {"tinc_tinc_down", "" , 0 },
992 {"tinc_host_up", "" , 0 },
993 {"tinc_host_down", "" , 0 },
994 {"tinc_subnet_up", "" , 0 },
995 {"tinc_subnet_down", "" , 0 },
996 {"tinc_firewall", "" , 0 },
997 #endif
999 #ifdef TCONFIG_BT
1000 // nas-transmission
1001 { "bt_enable", "0" , 0 },
1002 #ifdef TCONFIG_BBT
1003 { "bt_binary", "internal" , 0 },
1004 #else
1005 { "bt_binary", "optware" , 0 },
1006 #endif
1007 { "bt_binary_custom", "/path/to/binaries/directory" , 0 },
1008 { "bt_custom", "" , 0 },
1009 { "bt_port", "51515" , 0 },
1010 { "bt_dir", "/mnt" , 0 },
1011 { "bt_incomplete", "1" , 0 },
1012 { "bt_settings", "down_dir" , 0 },
1013 { "bt_settings_custom", "/tmp/btclient" , 0 },
1014 { "bt_rpc_enable", "1" , 0 },
1015 { "bt_rpc_wan", "0" , 0 },
1016 { "bt_auth", "1" , 0 },
1017 { "bt_login", "admin" , 0 },
1018 { "bt_password", "admin11" , 0 },
1019 { "bt_port_gui", "9091" , 0 },
1020 { "bt_dl_enable", "0" , 0 },
1021 { "bt_ul_enable", "0" , 0 },
1022 { "bt_dl", "248" , 0 },
1023 { "bt_ul", "64" , 0 },
1024 { "bt_peer_limit_global", "150" , 0 },
1025 { "bt_peer_limit_per_torrent", "30" , 0 },
1026 { "bt_ul_slot_per_torrent", "10" , 0 },
1027 { "bt_ratio_enable", "0" , 0 },
1028 { "bt_ratio", "1.0000" , 0 },
1029 { "bt_ratio_idle_enable", "0" , 0 },
1030 { "bt_ratio_idle", "30" , 0 },
1031 { "bt_dht", "0" , 0 },
1032 { "bt_pex", "0" , 0 },
1033 { "bt_lpd", "0" , 0 },
1034 { "bt_utp", "1" , 0 },
1035 { "bt_blocklist", "0" , 0 },
1036 { "bt_blocklist_url", "http://list.iblocklist.com/?list=bt_level1" , 0 },
1037 { "bt_sleep", "10" , 0 },
1038 { "bt_check", "1" , 0 },
1039 { "bt_check_time", "15" , 0 },
1040 { "bt_dl_queue_enable", "0" , 0 },
1041 { "bt_dl_queue_size", "5" , 0 },
1042 { "bt_ul_queue_enable", "0" , 0 },
1043 { "bt_ul_queue_size", "5" , 0 },
1044 { "bt_message", "2" , 0 },
1045 { "bt_log", "0" , 0 },
1046 { "bt_log_path", "/var/log" , 0 },
1047 #endif
1049 // new_qoslimit
1050 { "new_qoslimit_enable", "0" , 0 },
1051 { "new_qoslimit_obw", "" , 0 },
1052 { "new_qoslimit_ibw", "" , 0 },
1053 { "new_qoslimit_rules", "" , 0 },
1054 { "qosl_enable", "0" , 0 },
1055 { "qosl_tcp", "0" , 0 },//unlimited
1056 { "qosl_udp", "0" , 0 },//unlimited
1057 { "qosl_dlc", "" , 0 },
1058 { "qosl_ulc", "" , 0 },
1059 { "qosl_dlr", "" , 0 },
1060 { "qosl_ulr", "" , 0 },
1061 { "limit_br0_prio", "3" , 0 },
1062 { "limit_br1_enable", "0" , 0 },
1063 { "limit_br1_dlc", "" , 0 },
1064 { "limit_br1_ulc", "" , 0 },
1065 { "limit_br1_dlr", "" , 0 },
1066 { "limit_br1_ulr", "" , 0 },
1067 { "limit_br1_prio", "2" , 0 },
1068 { "limit_br2_enable", "0" , 0 },
1069 { "limit_br2_dlc", "" , 0 },
1070 { "limit_br2_ulc", "" , 0 },
1071 { "limit_br2_dlr", "" , 0 },
1072 { "limit_br2_ulr", "" , 0 },
1073 { "limit_br2_prio", "2" , 0 },
1074 { "limit_br3_enable", "0" , 0 },
1075 { "limit_br3_dlc", "" , 0 },
1076 { "limit_br3_ulc", "" , 0 },
1077 { "limit_br3_dlr", "" , 0 },
1078 { "limit_br3_ulr", "" , 0 },
1079 { "limit_br3_prio", "2" , 0 },
1082 // NoCatSplash. !!Victek
1083 #ifdef TCONFIG_NOCAT
1084 { "NC_enable", "0" , 0 }, // enable NoCatSplash
1085 { "NC_Verbosity", "2" , 0 },
1086 { "NC_GatewayName", "Tomato Captive Portal" , 0 },
1087 { "NC_GatewayPort", "5280" , 0 },
1088 { "NC_GatewayMode", "Open" , 0 },
1089 { "NC_DocumentRoot", "/tmp/splashd" , 0 },
1090 { "NC_ExcludePorts", "1863" , 0 },
1091 { "NC_HomePage", "http://google.com" , 0 },
1092 { "NC_ForcedRedirect", "0" , 0 },
1093 { "NC_IdleTimeout", "0" , 0 },
1094 { "NC_MaxMissedARP", "5" , 0 },
1095 { "NC_PeerChecktimeout", "0" , 0 },
1096 { "NC_LoginTimeout", "3600" , 0 },
1097 { "NC_RenewTimeout", "0" , 0 },
1098 { "NC_AllowedWebHosts", "" , 0 },
1099 { "NC_BridgeLAN", "br0" , 0 },
1100 #endif
1102 //Tomato RAF - NGINX
1103 #ifdef TCONFIG_NGINX
1104 {"nginx_enable", "0" , 0 }, // NGinX enabled
1105 {"nginx_php", "0" , 0 }, // PHP enabled
1106 {"nginx_keepconf", "0" , 0 }, // Enable/disable keep configuration files unmodified in /etc/nginx
1107 {"nginx_docroot", "/www" , 0 }, // path for server files
1108 {"nginx_port", "85" , 0 }, // port to listen
1109 {"nginx_remote", "0" , 0 }, // open port from WAN site
1110 {"nginx_fqdn", "Tomato" , 0 }, // server name
1111 {"nginx_upload", "100" , 0 }, // upload file size limit
1112 {"nginx_priority", "10" , 0 }, // server priority = worker_priority
1113 {"nginx_custom", "" , 0 }, // additional lines for nginx.conf
1114 {"nginx_httpcustom", "" , 0 }, // additional lines for nginx.conf
1115 {"nginx_servercustom", "" , 0 }, // additional lines for nginx.conf
1116 {"nginx_phpconf", "" , 0 }, // additional lines for php.ini
1117 {"nginx_user", "root" , 0 }, // user/group
1118 {"nginx_override", "0" , 0 }, // additional lines for php.ini
1119 {"nginx_overridefile", "/path/to/nginx.conf" , 0 }, // user/group
1121 // bwq518 - MySQL
1122 { "mysql_enable", "0" , 0 },
1123 { "mysql_sleep", "2" , 0 },
1124 { "mysql_check", "1" , 0 },
1125 { "mysql_check_time", "1" , 0 },
1126 { "mysql_binary", "internal" , 0 },
1127 { "mysql_binary_custom", "/mnt/sda1/mysql/bin" , 0 },
1128 { "mysql_usb_enable", "1" , 0 },
1129 { "mysql_dlroot", "" , 0 },
1130 { "mysql_datadir", "data" , 0 },
1131 { "mysql_tmpdir", "tmp" , 0 },
1132 { "mysql_server_custom", "" , 0 },
1133 { "mysql_port", "3306" , 0 },
1134 { "mysql_allow_anyhost", "0" , 0 },
1135 { "mysql_init_rootpass", "0" , 0 },
1136 { "mysql_username", "root" , 0 }, // mysqladmin username
1137 { "mysql_passwd", "admin" , 0 }, // mysqladmin password
1138 { "mysql_key_buffer", "16" , 0 }, //KB
1139 { "mysql_max_allowed_packet", "4" , 0 }, //MB
1140 { "mysql_thread_stack", "128" , 0 }, //KB
1141 { "mysql_thread_cache_size", "8" , 0 },
1142 { "mysql_init_priv", "0" , 0 },
1143 { "mysql_table_open_cache", "4" , 0 },
1144 { "mysql_sort_buffer_size", "128" , 0 }, //KB
1145 { "mysql_read_buffer_size", "128" , 0 }, //KB
1146 { "mysql_query_cache_size", "16" , 0 }, //MB
1147 { "mysql_read_rnd_buffer_size", "256" , 0 }, //KB
1148 { "mysql_net_buffer_length", "2" , 0 }, //K
1149 { "mysql_max_connections", "1000" , 0 },
1150 #endif
1152 #ifdef TCONFIG_TOR
1153 { "tor_enable", "0" , 0 },
1154 { "tor_socksport", "9050" , 0 },
1155 { "tor_transport", "9040" , 0 },
1156 { "tor_dnsport", "9053" , 0 },
1157 { "tor_datadir", "/tmp/tor" , 0 },
1158 { "tor_iface", "br0" , 0 },
1159 { "tor_users", "192.168.1.0/24" , 0 },
1160 { "tor_custom", "" , 0 },
1161 #endif
1163 { 0, 0, 0}
1166 #ifdef TCONFIG_BCMWL6
1167 #ifndef TCONFIG_BCMARM
1168 struct nvram_tuple bcm4360ac_defaults[] = {
1169 { "pci/2/1/aa2g", "0", 0 },
1170 { "pci/2/1/aa5g", "7", 0 },
1171 { "pci/2/1/aga0", "0", 0 },
1172 { "pci/2/1/aga1", "0", 0 },
1173 { "pci/2/1/aga2", "0", 0 },
1174 { "pci/2/1/agbg0", "133", 0 },
1175 { "pci/2/1/agbg1", "133", 0 },
1176 { "pci/2/1/agbg2", "133", 0 },
1177 { "pci/2/1/antswitch", "0", 0 },
1178 { "pci/2/1/cckbw202gpo", "0", 0 },
1179 { "pci/2/1/cckbw20ul2gpo", "0", 0 },
1180 { "pci/2/1/dot11agofdmhrbw202gpo", "0", 0 },
1181 { "pci/2/1/femctrl", "3", 0 },
1182 { "pci/2/1/papdcap2g", "0", 0 },
1183 { "pci/2/1/tworangetssi2g", "0", 0 },
1184 { "pci/2/1/pdgain2g", "4", 0 },
1185 { "pci/2/1/epagain2g", "0", 0 },
1186 { "pci/2/1/tssiposslope2g", "1", 0 },
1187 { "pci/2/1/gainctrlsph", "0", 0 },
1188 { "pci/2/1/papdcap5g", "0", 0 },
1189 { "pci/2/1/tworangetssi5g", "0", 0 },
1190 { "pci/2/1/pdgain5g", "4", 0 },
1191 { "pci/2/1/epagain5g", "0", 0 },
1192 { "pci/2/1/tssiposslope5g", "1", 0 },
1193 { "pci/2/1/maxp2ga0", "76", 0 },
1194 { "pci/2/1/maxp2ga1", "76", 0 },
1195 { "pci/2/1/maxp2ga2", "76", 0 },
1196 { "pci/2/1/mcsbw202gpo", "0", 0 },
1197 { "pci/2/1/mcsbw402gpo", "0", 0 },
1198 { "pci/2/1/measpower", "0x7f", 0 },
1199 { "pci/2/1/measpower1", "0x7f", 0 },
1200 { "pci/2/1/measpower2", "0x7f", 0 },
1201 { "pci/2/1/noiselvl2ga0", "31", 0 },
1202 { "pci/2/1/noiselvl2ga1", "31", 0 },
1203 { "pci/2/1/noiselvl2ga2", "31", 0 },
1204 { "pci/2/1/noiselvl5gha0", "31", 0 },
1205 { "pci/2/1/noiselvl5gha1", "31", 0 },
1206 { "pci/2/1/noiselvl5gha2", "31", 0 },
1207 { "pci/2/1/noiselvl5gla0", "31", 0 },
1208 { "pci/2/1/noiselvl5gla1", "31", 0 },
1209 { "pci/2/1/noiselvl5gla2", "31", 0 },
1210 { "pci/2/1/noiselvl5gma0", "31", 0 },
1211 { "pci/2/1/noiselvl5gma1", "31", 0 },
1212 { "pci/2/1/noiselvl5gma2", "31", 0 },
1213 { "pci/2/1/noiselvl5gua0", "31", 0 },
1214 { "pci/2/1/noiselvl5gua1", "31", 0 },
1215 { "pci/2/1/noiselvl5gua2", "31", 0 },
1216 { "pci/2/1/ofdmlrbw202gpo", "0", 0 },
1217 { "pci/2/1/pa2ga0", "0xfe72,0x14c0,0xfac7", 0 },
1218 { "pci/2/1/pa2ga1", "0xfe80,0x1472,0xfabc", 0 },
1219 { "pci/2/1/pa2ga2", "0xfe82,0x14bf,0xfad9", 0 },
1220 { "pci/2/1/pcieingress_war", "15", 0 },
1221 { "pci/2/1/phycal_tempdelta", "255", 0 },
1222 { "pci/2/1/rawtempsense", "0x1ff", 0 },
1223 { "pci/2/1/rxchain", "7", 0 },
1224 { "pci/2/1/rxgainerr2g", "0xffff", 0 },
1225 { "pci/2/1/rxgainerr5g", "0xffff,0xffff,0xffff,0xffff", 0 },
1226 { "pci/2/1/rxgains2gelnagaina0", "0", 0 },
1227 { "pci/2/1/rxgains2gelnagaina1", "0", 0 },
1228 { "pci/2/1/rxgains2gelnagaina2", "0", 0 },
1229 { "pci/2/1/rxgains2gtrelnabypa0", "0", 0 },
1230 { "pci/2/1/rxgains2gtrelnabypa1", "0", 0 },
1231 { "pci/2/1/rxgains2gtrelnabypa2", "0", 0 },
1232 { "pci/2/1/rxgains2gtrisoa0", "0", 0 },
1233 { "pci/2/1/rxgains2gtrisoa1", "0", 0 },
1234 { "pci/2/1/rxgains2gtrisoa2", "0", 0 },
1235 { "pci/2/1/sar2g", "18", 0 },
1236 { "pci/2/1/sar5g", "15", 0 },
1237 { "pci/2/1/sromrev", "11", 0 },
1238 { "pci/2/1/subband5gver", "0x4", 0 },
1239 { "pci/2/1/tempcorrx", "0x3f", 0 },
1240 { "pci/2/1/tempoffset", "255", 0 },
1241 { "pci/2/1/temps_hysteresis", "15", 0 },
1242 { "pci/2/1/temps_period", "15", 0 },
1243 { "pci/2/1/tempsense_option", "0x3", 0 },
1244 { "pci/2/1/tempsense_slope", "0xff", 0 },
1245 { "pci/2/1/tempthresh", "255", 0 },
1246 { "pci/2/1/txchain", "7", 0 },
1247 { "pci/2/1/ledbh0", "2", 0 },
1248 { "pci/2/1/ledbh1", "5", 0 },
1249 { "pci/2/1/ledbh2", "4", 0 },
1250 { "pci/2/1/ledbh3", "11", 0 },
1251 { "pci/2/1/ledbh10", "7", 0 },
1253 { 0, 0, 0 }
1255 #else
1256 struct nvram_tuple bcm4360ac_defaults[] = {
1257 { "0:ledbh10", "7", 0 },
1258 { "1:ledbh10", "7", 0 },
1259 { 0, 0, 0 }
1261 #endif
1263 /* nvram override default setting for Media Router */
1264 struct nvram_tuple router_defaults_override_type1[] = {
1265 { "router_disable", "1", 0 }, /* lan_proto=static lan_stp=0 wan_proto=disabled */
1266 { "lan_stp", "0", 0 }, /* LAN spanning tree protocol */
1267 { "wl_wmf_bss_enable", "1", 0 }, /* WMF Enable for IPTV Media or WiFi+PLC */
1268 { "wl_reg_mode", "h", 0 }, /* Regulatory: 802.11H(h) */
1269 { "wl_wet_tunnel", "1", 0 }, /* Enable wet tunnel */
1270 { "wl_taf_enable", "1", 0 }, /* Enable TAF */
1272 /* EBOS feature Media router default */
1273 { "wl_ebos_enable", "0", 0 }, /* EBOS feature on */
1274 { "wl_ebos_flags", "104", 0 }, /* 104(0x68) pseudo-round robin */
1275 { "wl_ebos_prr_threshold", "0x0f000000", 0 }, /* pseudo-round robin threshold */
1277 #ifdef __CONFIG_EMF__
1278 { "emf_enable", "1", 0 }, /* Enable EMF by default */
1279 { "wl_wmf_ucigmp_query", "1", 0 }, /* Enable Converting IGMP Query to ucast */
1280 { "wl_wmf_ucast_upnp", "1", 0 }, /* Enable upnp to ucast conversion */
1281 { "wl_wmf_igmpq_filter", "1", 0 }, /* Enable igmp query filter */
1282 #endif
1283 { "wl_acs_fcs_mode", "1", 0 }, /* Enable acsd fcs mode */
1284 { "wl_acs_dfs", "1", 0 }, /* Enable first DFS chan Selection */
1285 { "wl_dcs_csa_unicast", "1", 0 }, /* Enable unicast CSA */
1286 /* Exclude ACSD to select 140l, 144u, 140/80, 144/80 to compatible with Ducati 11N */
1287 { "wl_acs_excl_chans", "0xd98e,0xd88e,0xe28a,0xe38a", 0 },
1288 { "wl_pspretend_retry_limit", "5", 0 }, /* Enable PsPretend */
1289 { "wl_pspretend_threshold", "0", 0 }, /* Disable PsPretend Threshold */
1290 { "wl_acs_chan_dwell_time", "70", 0 }, /* WAR for AP to stay on DFS chan */
1291 { "wl_frameburst", "on", 0 }, /* BRCM Frambursting mode (off|on) */
1292 { "wl_amsdu", "off", 0 }, /* Default IPTV AMSDU setting */
1293 { "wl_rx_amsdu_in_ampdu", "off", 0 }, /* Media RX AMSDU In AMPDU setting */
1294 { 0, 0, 0 }
1297 /* Translates from, for example, wl0_ (or wl0.1_) to wl_. */
1298 /* Only single digits are currently supported */
1300 static void
1301 fix_name(const char *name, char *fixed_name)
1303 char *pSuffix = NULL;
1305 /* Translate prefix wlx_ and wlx.y_ to wl_ */
1306 /* Expected inputs are: wld_root, wld.d_root, wld.dd_root
1307 * We accept: wld + '_' anywhere
1309 pSuffix = strchr(name, '_');
1311 if ((strncmp(name, "wl", 2) == 0) && isdigit(name[2]) && (pSuffix != NULL)) {
1312 strcpy(fixed_name, "wl");
1313 strcpy(&fixed_name[2], pSuffix);
1314 return;
1317 /* No match with above rules: default to input name */
1318 strcpy(fixed_name, name);
1323 * Find nvram param name; return pointer which should be treated as const
1324 * return NULL if not found.
1326 * NOTE: This routine special-cases the variable wl_bss_enabled. It will
1327 * return the normal default value if asked for wl_ or wl0_. But it will
1328 * return 0 if asked for a virtual BSS reference like wl0.1_.
1330 char *
1331 nvram_default_get(const char *name)
1333 int idx;
1334 char fixed_name[NVRAM_MAX_VALUE_LEN];
1336 fix_name(name, fixed_name);
1337 if (strcmp(fixed_name, "wl_bss_enabled") == 0) {
1338 if (name[3] == '.' || name[4] == '.') { /* Virtual interface */
1339 return "0";
1343 #ifdef __CONFIG_HSPOT__
1344 if (strcmp(fixed_name, "wl_bss_hs2_enabled") == 0) {
1345 if (name[3] == '.' || name[4] == '.') { /* Virtual interface */
1346 return "0";
1349 #endif /* __CONFIG_HSPOT__ */
1351 if (!strcmp(nvram_safe_get("devicemode"), "1")) {
1352 for (idx = 0; router_defaults_override_type1[idx].name != NULL; idx++) {
1353 if (strcmp(router_defaults_override_type1[idx].name, fixed_name) == 0) {
1354 return router_defaults_override_type1[idx].value;
1359 for (idx = 0; router_defaults[idx].name != NULL; idx++) {
1360 if (strcmp(router_defaults[idx].name, fixed_name) == 0) {
1361 return router_defaults[idx].value;
1365 return NULL;
1367 /* validate/restore all per-interface related variables */
1368 void
1369 nvram_validate_all(char *prefix, bool restore)
1371 struct nvram_tuple *t;
1372 char tmp[100];
1373 char *v;
1375 for (t = router_defaults; t->name; t++) {
1376 if (!strncmp(t->name, "wl_", 3)) {
1377 strcat_r(prefix, &t->name[3], tmp);
1378 if (!restore && nvram_get(tmp))
1379 continue;
1380 v = nvram_get(t->name);
1381 nvram_set(tmp, v ? v : t->value);
1385 /* override router type1 nvram setting */
1386 if (!strcmp(nvram_safe_get("devicemode"), "1")) {
1387 for (t = router_defaults_override_type1; t->name; t++) {
1388 if (!strncmp(t->name, "wl_", 3)) {
1389 strcat_r(prefix, &t->name[3], tmp);
1390 if (!restore && nvram_get(tmp))
1391 continue;
1392 v = nvram_get(t->name);
1393 nvram_set(tmp, v ? v : t->value);
1399 /* restore specific per-interface variable */
1400 void
1401 nvram_restore_var(char *prefix, char *name)
1403 struct nvram_tuple *t;
1404 char tmp[100];
1406 for (t = router_defaults; t->name; t++) {
1407 if (!strncmp(t->name, "wl_", 3) && !strcmp(&t->name[3], name)) {
1408 nvram_set(strcat_r(prefix, name, tmp), t->value);
1409 break;
1413 /* override router type1 setting */
1414 if (!strcmp(nvram_safe_get("devicemode"), "1")) {
1415 for (t = router_defaults_override_type1; t->name; t++) {
1416 if (!strncmp(t->name, "wl_", 3) && !strcmp(&t->name[3], name)) {
1417 nvram_set(strcat_r(prefix, name, tmp), t->value);
1418 break;
1423 #endif