3 Copyright 2003, CyberTAN Inc.
6 This is UNPUBLISHED PROPRIETARY SOURCE CODE of CyberTAN Inc.
7 the contents of this file may not be disclosed to third parties,
8 copied or duplicated in any form without the prior written
9 permission of CyberTAN Inc.
11 This software should be used as a reference only, and it not
12 intended for production use!
14 THIS SOFTWARE IS OFFERED "AS IS", AND CYBERTAN GRANTS NO WARRANTIES OF ANY
15 KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. CYBERTAN
16 SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
17 FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE
22 Copyright 2005, Broadcom Corporation
25 THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
26 KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
27 SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
28 FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
35 #include <tomato_config.h> //!!TB
36 #include "tomato_profile.h"
39 //! = see restore_main()
41 const defaults_t defaults
[] = {
42 { "restore_defaults", "0" }, // Set to 0 to not restore defaults on boot
45 //! { "lan_ifname", "" }, // LAN interface name
46 //! { "lan_ifnames", "" }, // Enslaved LAN interfaces
47 { "lan_hwnames", "" }, // LAN driver names (e.g. et0)
48 { "lan_hwaddr", "" }, // LAN interface MAC address
50 // LAN TCP/IP parameters
51 { "lan_dhcp", "0" }, // DHCP client [static|dhcp]
52 { "lan_proto", "dhcp" }, // DHCP server [static|dhcp] //Barry add 2004 09 16
53 { "lan_ipaddr", "192.168.1.1" }, // LAN IP address
54 { "lan_netmask", "255.255.255.0" }, // LAN netmask
55 { "lan_wins", "" }, // x.x.x.x x.x.x.x ...
56 { "lan_domain", "" }, // LAN domain name
57 { "lan_lease", "86400" }, // LAN lease time in seconds
58 { "lan_stp", "0" }, // LAN spanning tree protocol
59 { "lan_route", "" }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
61 { "lan_gateway", "0.0.0.0" }, // LAN Gateway
62 { "wds_enable", "0" }, // WDS Enable (0|1)
65 //! { "wan_ifname", "" }, // WAN interface name
66 //! { "wan_ifnames", "" }, // WAN interface names
67 { "wan_hwname", "" }, // WAN driver name (e.g. et1)
68 { "wan_hwaddr", "" }, // WAN interface MAC address
69 { "wan_ifnameX", NULL
}, // real wan if; see wan.c:start_wan
71 // WAN TCP/IP parameters
72 { "wan_proto", "dhcp" }, // [static|dhcp|pppoe|disabled]
73 { "wan_ipaddr", "0.0.0.0" }, // WAN IP address
74 { "wan_netmask", "0.0.0.0" }, // WAN netmask
75 { "wan_gateway", "0.0.0.0" }, // WAN gateway
76 { "wan_dns", "" }, // x.x.x.x x.x.x.x ...
77 { "wan_wins", "" }, // x.x.x.x x.x.x.x ...
78 { "wan_lease", "86400" }, // WAN lease time in seconds
81 { "wan_primary", "1" }, // Primary wan connection
82 { "wan_unit", "0" }, // Last configured connection
85 { "filter_maclist", "" }, // xx:xx:xx:xx:xx:xx ...
86 { "filter_macmode", "deny" }, // "allow" only, "deny" only, or "disabled" (allow all)
87 { "filter_client0", "" }, // [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc
89 { "filter", "on" }, // [on | off] Firewall Protection
92 { "autofw_port0", "" }, // out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc
94 // DHCP server parameters
95 { "dhcp_start", "100" }, //
96 { "dhcp_num", "50" }, //
97 { "dhcpd_startip", "" }, // if empty, tomato will use dhcp_start/dchp_num for better compatibility
98 { "dhcpd_endip", "" }, // "
99 { "dhcp_lease", "0" }, // LAN lease time in minutes
100 { "dhcp_domain", "wan" }, // Use WAN domain name first if available (wan|lan)
101 { "wan_get_dns", "" }, // DNS IP address which get by dhcpc // Add
102 { "wan_routes", "" },
103 { "wan_msroutes", "" },
107 { "pppoe_ifname", "" }, // PPPoE enslaved interface
108 { "ppp_username", "" }, // PPP username
109 { "ppp_passwd", "" }, // PPP password
110 { "ppp_idletime", "5" }, // Dial on demand max idle time (mins)
111 { "ppp_keepalive", "0" }, // Restore link automatically
112 { "ppp_demand", "0" }, // Dial on demand
113 { "ppp_redialperiod", "30" }, // Redial Period (seconds)*/
114 { "ppp_mru", "1500" }, // Negotiate MRU to this value
115 { "ppp_mtu", "1500" }, // Negotiate MTU to the smaller of this value or the peer MRU
116 { "ppp_service", "" }, // PPPoE service name
117 { "ppp_ac", "" }, // PPPoE access concentrator name
118 { "ppp_static", "0" }, // Enable / Disable Static IP
119 { "ppp_static_ip", "" }, // PPPoE Static IP
120 { "ppp_get_ac", "" }, // PPPoE Server ac name
121 { "ppp_get_srv", "" }, // PPPoE Server service name
122 { "ppp_custom", "" }, // PPPD additional options
127 // Wireless parameters
128 { "wl_ifname", "" }, // Interface name
129 { "wl_hwaddr", "" }, // MAC address
130 { "wl_phytype", "g" }, // Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) // Modify
131 { "wl_corerev", "" }, // Current core revision
132 { "wl_phytypes", "" }, // List of supported wireless bands (e.g. "ga")
133 { "wl_radioids", "" }, // List of radio IDs
134 { "wl_ssid", "wireless" }, // Service set ID (network name)
135 { "wl_country", "" }, // Country (default obtained from driver)
136 { "wl_country_code", "" }, // Country (default obtained from driver)
137 { "wl_radio", "1" }, // Enable (1) or disable (0) radio
138 { "wl_closed", "0" }, // Closed (hidden) network
139 { "wl_ap_isolate", "0" }, // AP isolate mode
140 { "wl_mode", "ap" }, // AP mode (ap|sta|wds)
141 { "wl_lazywds", "1" }, // Enable "lazy" WDS mode (0|1)
142 { "wl_wds", "" }, // xx:xx:xx:xx:xx:xx ...
143 { "wl_wds_timeout", "1" }, // WDS link detection interval defualt 1 sec*/
144 { "wl_wep", "disabled" }, // WEP data encryption (enabled|disabled)
145 { "wl_auth", "0" }, // Shared key authentication optional (0) or required (1)
146 { "wl_key", "1" }, // Current WEP key
147 { "wl_key1", "" }, // 5/13 char ASCII or 10/26 char hex
148 { "wl_key2", "" }, // 5/13 char ASCII or 10/26 char hex
149 { "wl_key3", "" }, // 5/13 char ASCII or 10/26 char hex
150 { "wl_key4", "" }, // 5/13 char ASCII or 10/26 char hex
151 { "wl_maclist", "" }, // xx:xx:xx:xx:xx:xx ...
152 { "wl_channel", "6" }, // Channel number
153 { "wl_rate", "0" }, // Rate (bps, 0 for auto)
154 { "wl_mrate", "0" }, // Mcast Rate (bps, 0 for auto)
155 { "wl_rateset", "default" }, // "default" or "all" or "12"
156 { "wl_frag", "2346" }, // Fragmentation threshold
157 { "wl_rts", "2347" }, // RTS threshold
158 { "wl_dtim", "1" }, // DTIM period (3.11.5)*/ // It is best value for WiFi test
159 { "wl_bcn", "100" }, // Beacon interval
160 { "wl_plcphdr", "long" }, // 802.11b PLCP preamble type
161 { "wl_net_mode", "mixed" }, // Wireless mode (mixed|g-only|b-only|disable)
162 { "wl_gmode", "1" }, // 54g mode
163 { "wl_gmode_protection","off" }, // 802.11g RTS/CTS protection (off|auto)
164 { "wl_afterburner", "off" }, // AfterBurner
165 { "wl_frameburst", "off" }, // BRCM Frambursting mode (off|on)
166 { "wl_wme", "auto" }, // WME mode (auto|off|on)
167 { "wl_antdiv", "-1" }, // Antenna Diversity (-1|0|1|3)
168 { "wl_infra", "1" }, // Network Type (BSS/IBSS)
169 { "wl_btc_mode", "0" }, // !!TB - BT Coexistence Mode
170 { "wl_sta_retry_time", "5" }, // !!TB - Seconds between association attempts (0 to disable retries)
171 { "wl_interfmode", "2" }, // Interference Mitigation Mode (0|1|2|3)
173 { "wl_passphrase", "" }, // Passphrase // Add
174 { "wl_wep_bit", "128" }, // WEP encryption [64 | 128] // Add
175 { "wl_wep_buf", "" }, // save all settings for web // Add
176 { "wl_wep_gen", "" }, // save all settings for generate button // Add
177 { "wl_wep_last", "" }, // Save last wl_wep mode // Add
178 { "wl_active_mac", "" }, // xx:xx:xx:xx:xx:xx ... // Add
181 { "security_mode2", "disabled" }, // WPA mode (disabled|radius|wpa_personal|wpa_enterprise|wep|wpa2_personal|wpa2_enterprise) for WEB // Add
182 { "security_mode", "disabled" }, // WPA mode (disabled|radius|wpa|psk|wep|psk psk2|wpa wpa2) for WEB // Add
183 { "security_mode_last", "" }, // Save last WPA mode // Add
184 { "wl_auth_mode", "none" }, // Network authentication mode (radius|none)
185 { "wl_wpa_psk", "" }, // WPA pre-shared key
186 { "wl_wpa_gtk_rekey", "3600" }, // WPA GTK rekey interval // Modify
187 { "wl_radius_ipaddr", "" }, // RADIUS server IP address
188 { "wl_radius_key", "" }, // RADIUS shared secret
189 { "wl_radius_port", "1812" }, // RADIUS server UDP port
190 { "wl_crypto", "tkip" }, // WPA data encryption
191 { "wl_net_reauth", "36000" }, // Network Re-auth/PMK caching duration
192 { "wl_akm", "" }, // WPA akm list
194 // WME parameters (cwmin cwmax aifsn txop_b txop_ag adm_control oldest_first)
195 // EDCA parameters for STA
196 { "wl_wme_sta_bk", "15 1023 7 0 0 off off" }, // WME STA AC_BK paramters
197 { "wl_wme_sta_be", "15 1023 3 0 0 off off" }, // WME STA AC_BE paramters
198 { "wl_wme_sta_vi", "7 15 2 6016 3008 off off" }, // WME STA AC_VI paramters
199 { "wl_wme_sta_vo", "3 7 2 3264 1504 off off" }, // WME STA AC_VO paramters
201 // EDCA parameters for AP
202 { "wl_wme_ap_bk", "15 1023 7 0 0 off off" }, // WME AP AC_BK paramters
203 { "wl_wme_ap_be", "15 63 3 0 0 off off" }, // WME AP AC_BE paramters
204 { "wl_wme_ap_vi", "7 15 1 6016 3008 off off" }, // WME AP AC_VI paramters
205 { "wl_wme_ap_vo", "3 7 1 3264 1504 off off" }, // WME AP AC_VO paramters
207 { "wl_wme_no_ack", "off" }, // WME No-Acknowledgmen mode
208 { "wl_wme_apsd", "on" }, // WME APSD mode
209 { "wl_wme_bss_disable", "0" }, // WME BSS disable advertising (off|on)
211 /* Per AC Tx parameters */
212 { "wl_wme_txp_be", "7 3 4 2 0" }, /* WME AC_BE Tx parameters */
213 { "wl_wme_txp_bk", "7 3 4 2 0" }, /* WME AC_BK Tx parameters */
214 { "wl_wme_txp_vi", "7 3 4 2 0" }, /* WME AC_VI Tx parameters */
215 { "wl_wme_txp_vo", "7 3 4 2 0" }, /* WME AC_VO Tx parameters */
217 { "wl_unit", "0" }, // Last configured interface
218 { "wl_mac_deny", "" }, // filter MAC // Add
220 { "wl_leddc", "0x640000" }, // !!TB - 100% duty cycle for LED on router (WLAN LED fix for some routers)
221 { "wl_bss_enabled", "1" }, // !!TB - If not present the new versions of wlconf may not bring up wlan
222 { "wl_reg_mode", "off" }, // !!TB - Regulatory: 802.11H(h)/802.11D(d)/off(off)
225 { "wl_nmode", "-1" }, // N-mode
226 { "wl_nband", "2" }, // 2 - 2.4GHz, 1 - 5GHz, 0 - Auto
228 { "wl_nmcsidx", "-1" }, // MCS Index for N - rate
229 { "wl_nreqd", "0" }, // Require 802.11n support
230 { "wl_nbw", "40" }, // BW: 20 / 40 MHz
231 { "wl_nbw_cap", "1" }, // BW: def 20inB and 40inA
232 { "wl_mimo_preamble", "mm" }, // 802.11n Preamble: mm/gf/auto/gfbcm
233 { "wl_nctrlsb", "upper" }, // N-CTRL SB (none/lower/upper)
234 { "wl_nband", "2" }, // N-Band
235 { "wl_nmode_protection", "off" }, // 802.11n RTS/CTS protection (off|auto)
236 { "wl_rxstreams", "0" }, // 802.11n Rx Streams, 0 is invalid, WLCONF will change it to a radio appropriate default
237 { "wl_txstreams", "0" }, // 802.11n Tx Streams 0, 0 is invalid, WLCONF will change it to a radio appropriate default
238 { "wl_dfs_preism", "60" }, // 802.11H pre network CAC time
239 { "wl_dfs_postism", "60" }, // 802.11H In Service Monitoring CAC time
240 { "wl_radarthrs", "0 0x6a8 0x6c8 0x6ac 0x6c7" }, // Radar thrs params format: version thresh0_20 thresh1_20 thresh0_40 thresh1_40
241 { "wl_bcn_rotate", "1" }, // Beacon rotation
242 { "wl_vlan_prio_mode", "off" }, // VLAN Priority support
243 { "wl_obss_coex", "0" }, // OBSS Coexistence (0|1): when enabled, channel width is forced to 20MHz
247 { "emf_entry", "" }, // Static MFDB entry (mgrp:if)
248 { "emf_uffp_entry", "" }, // Unreg frames forwarding ports
249 { "emf_rtport_entry", "" }, // IGMP frames forwarding ports
250 { "emf_enable", "0" }, // Disable EMF by default
252 { "wl_ampdu", "auto" }, // Default AMPDU setting
253 { "wl_ampdu_rtylimit_tid", "5 5 5 5 5 5 5 5" }, // Default AMPDU retry limit per-tid setting
254 { "wl_ampdu_rr_rtylimit_tid", "2 2 2 2 2 2 2 2" }, // Default AMPDU regular rate retry limit per-tid setting
255 { "wl_amsdu", "auto" }, // Default AMSDU setting
257 { "wl_rxchain_pwrsave_enable", "1" }, // Rxchain powersave enable
258 { "wl_rxchain_pwrsave_quiet_time","1800" }, // Quiet time for power save
259 { "wl_rxchain_pwrsave_pps", "10" }, // Packets per second threshold for power save
260 { "wl_radio_pwrsave_enable", "0" }, // Radio powersave enable
261 { "wl_radio_pwrsave_quiet_time","1800" }, // Quiet time for power save
262 { "wl_radio_pwrsave_pps", "10" }, // Packets per second threshold for power save
263 { "wl_radio_pwrsave_on_time", "50" }, // Radio on time for power save
265 { "wl_wmf_bss_enable", "0" }, // WMF Enable/Disable
266 { "wl_rifs_advert", "auto" }, // RIFS mode advertisement
267 { "wl_stbc_tx", "auto" }, // Default STBC TX setting
268 { "wl_mcast_regen_bss_enable", "1" }, // MCAST REGEN Enable/Disable
271 { "pptp_server_ip", "" }, // as same as WAN gateway
272 { "ppp_get_ip", "" }, // IP Address assigned by PPTP/L2TP server
273 { "pptp_dhcp", "1" },
274 { "ppp_defgw", "1" }, // use default gateway on remote network
277 { "mtu_enable", "0" }, // WAN MTU [1|0]
278 { "wan_mtu", "1500" }, // Negotiate MTU to the smaller of this value or the peer MRU
280 { "l2tp_server_ip", "" }, // L2TP auth server (IP Address)
281 { "wan_gateway_buf", "0.0.0.0" }, // save the default gateway for DHCP
282 // hbobs { "hb_server_ip", "" }, // heartbeat auth server (IP Address)
283 // hbobs { "hb_server_domain", "" }, // heartbeat auth server (domain name)
286 { "t_noise", "-99" },
287 { "led_override", "" },
288 { "btn_override", "" },
291 { "manual_boot_nv", "0" },
292 // { "wlx_hpamp", "" },
293 // { "wlx_hperx", "" }, // see init.c
299 { "ddnsx0_cache", "" },
300 { "ddnsx1_cache", "" },
301 { "ddnsx_save", "1" },
302 { "ddnsx_refresh", "28" },
308 { "router_name", "tomato" },
309 { "wan_hostname", "unknown" },
310 { "wan_domain", "" },
313 { "tm_sel", "PST8PDT,M3.2.0/2,M11.1.0/2" },
314 { "tm_tz", "PST8PDT,M3.2.0/2,M11.1.0/2" },
316 { "ntp_updates", "4" },
318 { "ntp_server", "0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org" },
320 { "ntp_kiss_ignore", "" },
323 { "dhcpd_static", "" },
326 { "wl_mac_list", "" },
327 { "wl_macmode", "disabled" },
331 { "ct_tcp_timeout", "" },
332 { "ct_udp_timeout", "" },
333 { "ct_timeout", "" },
339 { "ct_hashsize", "" },
355 { "boot_wait", "on" },
356 { "wait_time", "5" },
357 { "wan_speed", "4" }, // 0=10 Mb Full, 1=10 Mb Half, 2=100 Mb Full, 3=100 Mb Half, 4=Auto
358 { "jumbo_frame_enable", "0" }, // Jumbo Frames support (for RT-N16/WNR3500L)
359 { "jumbo_frame_size", "2000" },
362 { "dhcpd_dmdns", "1" },
363 { "dhcpd_slt", "0" },
364 { "dhcpd_gwmode", "" },
365 { "dhcpd_lmax", "" },
366 { "dns_addget", "0" },
367 { "dns_intcpt", "0" },
368 { "dns_cache", "4096" }, // DNS cache size (0 to disable cache)
369 { "dhcpc_minpkt", "1" },
370 { "dhcpc_vendorclass", "" },
371 { "dhcpc_requestip", "" },
372 { "dns_norebind", "1" },
373 { "dnsmasq_custom", "" },
374 // { "dnsmasq_norw", "0" },
377 // { "block_loopback", "0" }, // nat loopback
378 { "nf_loopback", "1" },
379 { "block_wan", "1" }, // block inbound icmp
380 { "multicast_pass", "0" }, // enable multicast proxy
381 { "ne_syncookies", "0" }, // tcp_syncookies
382 { "dhcp_pass", "1" }, // allow DHCP responses
383 { "ne_shlimit", "0,3,60" },
386 { "routes_static", "" },
387 { "dhcp_routes", "1" },
388 { "wk_mode", "gateway" }, // Network mode [gateway|router]
390 { "dr_setting", "0" }, // [ Disable | WAN | LAN | Both ]
391 { "dr_lan_tx", "0" }, // Dynamic-Routing LAN out
392 { "dr_lan_rx", "0" }, // Dynamic-Routing LAN in
393 { "dr_wan_tx", "0" }, // Dynamic-Routing WAN out
394 { "dr_wan_rx", "0" }, // Dynamic-Routing WAN in
399 { "wl_txpwr", "42" },
400 { "wl_maxassoc", "128" }, // Max associations driver could support
401 { "wl_bss_maxassoc", "128" },
402 { "wl_distance", "" },
405 { "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>" },
406 { "trigforward", "0<1<3000:4000<5000:6000<ex: open 5000-6000 if 3000-4000>" },
407 { "dmz_enable", "0" },
408 { "dmz_ipaddr", "0" },
412 { "upnp_enable", "0" },
413 { "upnp_secure", "1" },
414 { "upnp_port", "0" },
415 { "upnp_ssdp_interval", "60" }, // SSDP interval
418 { "upnp_clean", "1" }, /* 0:Disable 1:Enable */
419 { "upnp_clean_interval", "600" }, /* Cleaning interval in seconds */
420 { "upnp_clean_threshold", "20" }, /* Threshold for cleaning unused rules */
421 #if 0 // disabled for miniupnpd
422 { "upnp_max_age", "180" }, // Max age
423 { "upnp_config", "0" },
427 { "qos_enable", "0" },
433 { "qos_reset", "0" },
434 { "qos_obw", "230" },
435 { "qos_ibw", "1000" },
436 { "qos_orules", "0<<6<d<80,443<0<<0:512<1<WWW>0<<6<d<80,443<0<<512:<3<WWW (512K+)>0<<-1<d<53<0<<0:2<0<DNS>0<<-1<d<53<0<<2:<4<DNS (2K+)" },
437 { "qos_burst0", "" },
438 { "qos_burst1", "" },
440 { "qos_default", "4" },
441 { "qos_orates", "80-100,10-100,5-100,3-100,2-95,1-50,1-40,1-30,1-20,1-10" },
443 { "ne_vegas", "0" }, // TCP Vegas
444 { "ne_valpha", "2" }, // "
445 { "ne_vbeta", "6" }, // "
446 { "ne_vgamma", "2" }, // "
448 // access restrictions
450 { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" },
451 //* { "rrule##", "" },
452 { "rrulewp", "80,8080" },
458 { "smbd_wgroup", "WORKGROUP" },
459 { "smbd_nbname", "TOMATO" },
460 { "smbd_adminpass", "admin" },
464 { "http_username", "" }, // Username
465 { "http_passwd", "admin" }, // Password
466 { "remote_management", "0" }, // Remote Management [1|0]
467 { "remote_mgt_https", "0" }, // Remote Management use https [1|0]
468 { "http_wanport", "8080" }, // WAN port to listen on
469 { "http_lanport", "80" }, // LAN port to listen on
470 { "https_lanport", "443" }, // LAN port to listen on
471 { "http_enable", "1" }, // HTTP server enable/disable
472 { "https_enable", "0" }, // HTTPS server enable/disable
473 { "https_crt_save", "0" },
474 { "https_crt_cn", "" },
475 { "https_crt_file", "" },
477 { "web_wl_filter", "0" }, // Allow/Deny Wireless Access Web
478 { "web_css", "tomato" },
480 { "telnetd_eas", "1" },
481 { "telnetd_port", "23" },
483 { "sshd_pass", "1" },
484 { "sshd_port", "22" },
485 { "sshd_remote", "0" },
486 { "sshd_rport", "2222" },
487 { "sshd_authkeys", "" },
488 { "sshd_hostkey", "" },
489 { "sshd_dsskey", "" },
490 { "sshd_forwarding", "1" },
491 { "rmgt_sip", "" }, // remote management: source ip address
494 { "web_mx", "status,bwm" },
498 { "rstats_enable", "1" },
499 { "rstats_path", "" },
500 { "rstats_stime", "48" },
501 { "rstats_offset", "1" },
502 { "rstats_data", "" },
503 { "rstats_colors", "" },
504 { "rstats_exclude", "" },
505 { "rstats_sshut", "1" },
506 { "rstats_bak", "0" },
515 "[ $1 -ge 20 ] && telnetd -p 233 -l /bin/sh\n"
518 "if [ ! -e /tmp/switch-start ]; then\n"
519 " # do something at startup\n"
520 " echo position at startup was $1 >/tmp/switch-start\n"
523 "if [ $1 = \"bridge\" ]; then\n"
526 "elif [ $1 = \"auto\" ]; then\n"
533 { "log_remote", "0" },
534 { "log_remoteip", "" },
535 { "log_remoteport", "514" },
537 { "log_limit", "60" },
540 { "log_mark", "60" },
541 { "log_events", "" },
543 // admin-log-webmonitor
545 { "log_wmtype", "0" },
547 { "log_wmdmax", "300" },
548 { "log_wmsmax", "300" },
551 { "debug_nocommit", "0" },
552 { "debug_cprintf", "0" },
553 { "debug_cprintf_file", "0" },
554 // { "debug_keepfiles", "0" },
555 { "console_loglevel", "1" },
558 { "debug_clkfix", "1" },
559 { "debug_ddns", "0" },
567 { "jffs2_exec", "" },
571 { "usb_enable", "0" },
575 { "usb_irq_thresh", "0" },
576 { "usb_storage", "1" },
577 { "usb_printer", "1" },
578 { "usb_printer_bidirect", "1" },
579 { "usb_ext_opt", "" },
580 { "usb_fat_opt", "" },
581 { "usb_ntfs_opt", "" },
582 { "usb_fs_ext3", "1" },
583 { "usb_fs_fat", "1" },
585 { "usb_fs_ntfs", "1" },
587 { "usb_automount", "1" },
589 { "usb_bdflush", "30 500 0 0 100 100 60 0 0" },
591 { "script_usbhotplug", "" },
592 { "script_usbmount", "" },
593 { "script_usbumount", "" },
598 { "ftp_enable", "0" },
599 { "ftp_super", "0" },
600 { "ftp_anonymous", "0" },
601 { "ftp_dirlist", "0" },
602 { "ftp_port", "21" },
604 { "ftp_ipmax", "0" },
605 { "ftp_staytimeout", "300" },
607 { "ftp_anonrate", "0" },
608 { "ftp_anonroot", "" },
609 { "ftp_pubroot", "" },
610 { "ftp_pvtroot", "" },
612 { "ftp_custom", "" },
613 { "ftp_sip", "" }, // wan ftp access: source ip address(es)
614 { "ftp_limit", "0,3,60" },
618 #ifdef TCONFIG_SAMBASRV
620 { "smbd_enable", "0" },
621 { "smbd_wgroup", "WORKGROUP" },
622 { "smbd_master", "1" },
623 { "smbd_wins", "1" },
624 { "smbd_cpage", "" },
625 { "smbd_cset", "utf8" },
626 { "smbd_custom", "" },
627 { "smbd_autoshare", "1" },
629 "share</mnt<Default Share<0<0>root$</<Hidden Root<0<1"
631 { "smbd_user", "nas" },
632 { "smbd_passwd", "" },
635 #ifdef TCONFIG_MEDIA_SERVER
637 { "ms_enable", "0" }, /* 0:Disable 1:Enable 2:Enable&Rescan */
638 { "ms_dirs", "/mnt<" },
642 { "ms_stdlna", "0" },
652 { "sch_c1_cmd", "" },
653 { "sch_c2_cmd", "" },
654 { "sch_c3_cmd", "" },
657 { "script_init", "" },
658 { "script_shut", "" },
659 { "script_fire", "" },
660 { "script_wanup", "" },
662 #ifdef TCONFIG_OPENVPN
664 { "vpn_debug", "0" },
665 { "vpn_server_eas", "" },
666 { "vpn_server_dns", "" },
667 { "vpn_server1_poll", "0" },
668 { "vpn_server1_if", "tun" },
669 { "vpn_server1_proto", "udp" },
670 { "vpn_server1_port", "1194" },
671 { "vpn_server1_firewall", "auto" },
672 { "vpn_server1_crypt", "tls" },
673 { "vpn_server1_comp", "adaptive" },
674 { "vpn_server1_cipher", "default" },
675 { "vpn_server1_dhcp", "1" },
676 { "vpn_server1_r1", "192.168.1.50" },
677 { "vpn_server1_r2", "192.168.1.55" },
678 { "vpn_server1_sn", "10.8.0.0" },
679 { "vpn_server1_nm", "255.255.255.0" },
680 { "vpn_server1_local", "10.8.0.1" },
681 { "vpn_server1_remote", "10.8.0.2" },
682 { "vpn_server1_reneg", "-1" },
683 { "vpn_server1_hmac", "-1" },
684 { "vpn_server1_plan", "1" },
685 { "vpn_server1_ccd", "0" },
686 { "vpn_server1_c2c", "0" },
687 { "vpn_server1_ccd_excl", "0" },
688 { "vpn_server1_ccd_val", "" },
689 { "vpn_server1_pdns", "0" },
690 { "vpn_server1_rgw", "0" },
691 { "vpn_server1_custom", "" },
692 { "vpn_server1_static", "" },
693 { "vpn_server1_ca", "" },
694 { "vpn_server1_crt", "" },
695 { "vpn_server1_key", "" },
696 { "vpn_server1_dh", "" },
697 { "vpn_server2_poll", "0" },
698 { "vpn_server2_if", "tun" },
699 { "vpn_server2_proto", "udp" },
700 { "vpn_server2_port", "1194" },
701 { "vpn_server2_firewall", "auto" },
702 { "vpn_server2_crypt", "tls" },
703 { "vpn_server2_comp", "adaptive" },
704 { "vpn_server2_cipher", "default" },
705 { "vpn_server2_dhcp", "1" },
706 { "vpn_server2_r1", "192.168.1.50" },
707 { "vpn_server2_r2", "192.168.1.55" },
708 { "vpn_server2_sn", "10.8.0.0" },
709 { "vpn_server2_nm", "255.255.255.0" },
710 { "vpn_server2_local", "10.8.0.1" },
711 { "vpn_server2_remote", "10.8.0.2" },
712 { "vpn_server2_reneg", "-1" },
713 { "vpn_server2_hmac", "-1" },
714 { "vpn_server2_plan", "1" },
715 { "vpn_server2_ccd", "0" },
716 { "vpn_server2_c2c", "0" },
717 { "vpn_server2_ccd_excl", "0" },
718 { "vpn_server2_ccd_val", "" },
719 { "vpn_server2_pdns", "0" },
720 { "vpn_server2_rgw", "0" },
721 { "vpn_server2_custom", "" },
722 { "vpn_server2_static", "" },
723 { "vpn_server2_ca", "" },
724 { "vpn_server2_crt", "" },
725 { "vpn_server2_key", "" },
726 { "vpn_server2_dh", "" },
727 { "vpn_client_eas", "" },
728 { "vpn_client1_poll", "0" },
729 { "vpn_client1_if", "tun" },
730 { "vpn_client1_bridge", "1" },
731 { "vpn_client1_nat", "1" },
732 { "vpn_client1_proto", "udp" },
733 { "vpn_client1_addr", "" },
734 { "vpn_client1_port", "1194" },
735 { "vpn_client1_retry", "30" },
736 { "vpn_client1_rg", "0" },
737 { "vpn_client1_firewall", "auto" },
738 { "vpn_client1_crypt", "tls" },
739 { "vpn_client1_comp", "adaptive" },
740 { "vpn_client1_cipher", "default" },
741 { "vpn_client1_local", "10.8.0.2" },
742 { "vpn_client1_remote", "10.8.0.1" },
743 { "vpn_client1_nm", "255.255.255.0" },
744 { "vpn_client1_reneg", "-1" },
745 { "vpn_client1_hmac", "-1" },
746 { "vpn_client1_adns", "0" },
747 { "vpn_client1_rgw", "0" },
748 { "vpn_client1_gw", "" },
749 { "vpn_client1_custom", "" },
750 { "vpn_client1_static", "" },
751 { "vpn_client1_ca", "" },
752 { "vpn_client1_crt", "" },
753 { "vpn_client1_key", "" },
754 { "vpn_client2_poll", "0" },
755 { "vpn_client2_if", "tun" },
756 { "vpn_client2_bridge", "1" },
757 { "vpn_client2_nat", "1" },
758 { "vpn_client2_proto", "udp" },
759 { "vpn_client2_addr", "" },
760 { "vpn_client2_port", "1194" },
761 { "vpn_client2_retry", "30" },
762 { "vpn_client2_rg", "0" },
763 { "vpn_client2_firewall", "auto" },
764 { "vpn_client2_crypt", "tls" },
765 { "vpn_client2_comp", "adaptive" },
766 { "vpn_client2_cipher", "default" },
767 { "vpn_client2_local", "10.8.0.2" },
768 { "vpn_client2_remote", "10.8.0.1" },
769 { "vpn_client2_nm", "255.255.255.0" },
770 { "vpn_client2_reneg", "-1" },
771 { "vpn_client2_hmac", "-1" },
772 { "vpn_client2_adns", "0" },
773 { "vpn_client2_rgw", "0" },
774 { "vpn_client2_gw", "" },
775 { "vpn_client2_custom", "" },
776 { "vpn_client2_static", "" },
777 { "vpn_client2_ca", "" },
778 { "vpn_client2_crt", "" },
779 { "vpn_client2_key", "" },
786 { "ses_enable", "0" }, // enable ses
787 { "ses_event", "2" }, // initial ses event
788 { "ses_led_assertlvl", "0" }, // For SES II
789 { "ses_client_join", "0" }, // For SES II
790 { "ses_sw_btn_status", "DEFAULTS" }, // Barry Adds 20050309 for SW SES BTN
791 { "ses_count", "0" },
792 { "eou_configured", "0" },
794 { "port_priority_1", "0" }, // port 1 priority; 1:high, 0:low
795 { "port_flow_control_1", "1" }, // port 1 flow control; 1:enable, 0:disable
796 { "port_rate_limit_1", "0" }, // port 1 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
797 { "port_priority_2", "0" }, // port 2 priority; 1:high, 0:low
798 { "port_flow_control_2", "1" }, // port 2 flow control; 1:enable, 0:disable
799 { "port_rate_limit_2", "0" }, // port 2 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
800 { "port_priority_3", "0" }, // port 3 priority; 1:high, 0:low
801 { "port_flow_control_3", "1" }, // port 3 flow control; 1:enable, 0:disable
802 { "port_rate_limit_3", "0" }, // port 3 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
803 { "port_priority_4", "0" }, // port 4 priority; 1:high, 0:low
804 { "port_flow_control_4", "1" }, // port 4 flow control; 1:enable, 0:disable
805 { "port_rate_limit_4", "0" }, // port 4 rate limit: 256k,512k,1M,2M,5M,10M,20M,50M
807 //obs zzz { "http_method", "post" }, // HTTP method
809 // { "wl_macmode1", "disabled" },
812 { "filter", "on" }, // Firewall Protection [on|off]
813 { "ipsec_pass", "1" }, // IPSec Pass Through [1|0]
814 { "pptp_pass", "1" }, // PPTP Pass Through [1|0]
815 { "l2tp_pass", "1" }, // L2TP Pass Through [1|0]
816 { "block_cookie", "0" }, // Block Cookie [1|0]
817 { "ident_pass", "0" }, // IDENT passthrough [1|0]
818 { "block_proxy", "0" }, // Block Proxy [1|0]
822 { "forward_port", "" }, // name:[on|off]:[tcp|udp|both]:wan_port>lan_ipaddr:lan_port0
823 { "port_trigger", "" }, // name:[on|off]:[tcp|udp|both]:wan_port0-wan_port1>lan_port0-lan_port1
826 { "mac_clone_enable", "0" }, // User define WAN interface MAC address
827 { "def_hwaddr", "00:00:00:00:00:00" }, // User define WAN interface MAC address
829 { "public_ip", "" }, // public ip
832 //forced in rc.c { "os_name", "" }, // OS name string
833 //forced in rc.c { "os_version", EPI_VERSION_STR }, // OS revision
834 //forced in rc.c { "os_date", __DATE__ }, // OS date
835 //not used { "ct_modules", "" }, // CyberTAN kernel modules
836 //obs { "timer_interval", "3600" }, // Timer interval in seconds
837 //obs { "ezc_enable", "1" }, // Enable EZConfig updates
838 //obs { "ezc_version", EZC_VERSION_STR }, // EZConfig version
839 //obs { "is_default", "1" }, // is it default setting: 1:yes 0:no*/
840 //obs { "os_server", "" }, // URL for getting upgrades
841 //obs { "stats_server", "" }, // URL for posting stats -- used by httpd/stats.c
842 //obs { "router_disable", "0" }, // lan_proto=static lan_stp=0 wan_proto=disabled
843 //obs { "fw_disable", "0" }, // Disable firewall (allow new connections from the WAN)
844 //obs { "static_route", "" }, // Static routes (ipaddr:netmask:gateway:metric:ifname ...)
845 //obs { "static_route_name", "" }, // Static routes name ($NAME:name)
846 // { "filter_port", "" }, // [lan_ipaddr|*]:lan_port0-lan_port1
847 //{ "dhcp_end", "150" }, // Last assignable DHCP address // Remove
848 //zzz not used { "dhcp_wins", "wan" }, // Use WAN WINS first if available (wan|lan)
849 //{ "eou_device_id", "" },
850 //{ "eou_public_key", "" },
851 //{ "eou_private_key", "" },
852 //{ "eou_public", "b49b5ec6866f5b166cc058110b20551d4fe7a5c96a9b5f01a3929f40015e4248359732b7467bae4948d6bb62f96996a7122c6834311c1ea276b35d12c37895501c0f5bd215499cf443d580b999830ac620ac2bf3b7f912741f54fea17627d13a92f44d014030d5c8d3249df385f500ffc90311563e89aa290e7c6f06ef9a6ec311" },
853 //{ "eou_private", "1fdf2ed7bd5ef1f4e603d34e4d41f0e70e19d1f65e1b6b1e6828eeed2d6afca354c0543e75d9973a1be9a898fed665e13f713f90bd5f50b3421fa7034fabde1ce63c44d01a5489765dc4dc3486521163bf6288db6c5e99c44bbb0ad7494fef20148ad862662dabcbff8dae7b466fad087d9f4754e9a6c84bc9adcbda7bc22e59" },
854 { "eou_expired_hour", "72" }, //The expired time is 72 hours, and this value = 72 * 10*/
855 // { "ntp_enable", "1" }, // replaced with ntp_updates
856 // { "ntp_mode", "auto" }, // auto, manual
860 { "aol_block_traffic", "0" }, // 0:Disable 1:Enable for global
861 { "aol_block_traffic1", "0" }, // 0:Disable 1:Enable for "ppp_username"
862 { "aol_block_traffic2", "0" }, // 0:Disable 1:Enable for "Parental control"
863 { "skip_amd_check", "0" }, // 0:Disable 1:Enable
864 { "skip_intel_check", "0" }, // 0:Disable 1:Enable
884 const defaults_t if_generic
[] = {
885 { "lan_ifname", "br0" },
886 { "lan_ifnames", "eth0 eth2 eth3 eth4" },
887 { "wan_ifname", "eth1" },
888 { "wan_ifnames", "eth1" },
892 const defaults_t if_vlan
[] = {
893 { "lan_ifname", "br0" },
894 { "lan_ifnames", "vlan0 eth1 eth2 eth3" },
895 { "wan_ifname", "vlan1" },
896 { "wan_ifnames", "vlan1" },