119eaac72e07514c67c4faf162bc0405665b7b83
[openwrt.git] / target / linux / package / nvram / src / defaults.c
1 /*
2 * Router default NVRAM values
3 *
4 * Copyright 2004, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 *
12 * $Id$
13 */
14
15 #include <epivers.h>
16 #include <string.h>
17 #include <bcmnvram.h>
18 #include <typedefs.h>
19 #include <wlioctl.h>
20
21 #define XSTR(s) STR(s)
22 #define STR(s) #s
23
24 struct nvram_tuple router_defaults[] = {
25 /* OS parameters */
26 { "os_name", "", 0 }, /* OS name string */
27 { "os_version", EPI_VERSION_STR, 0 }, /* OS revision */
28 { "os_date", __DATE__, 0 }, /* OS date */
29
30 /* Miscellaneous parameters */
31 { "timer_interval", "3600", 0 }, /* Timer interval in seconds */
32 { "ntp_server", "192.5.41.40 192.5.41.41 133.100.9.2", 0 }, /* NTP server */
33 { "time_zone", "PST8PDT", 0 }, /* Time zone (GNU TZ format) */
34 { "log_level", "0", 0 }, /* Bitmask 0:off 1:denied 2:accepted */
35 { "upnp_enable", "0", 0 }, /* Start UPnP */
36 { "ezc_enable", "1", 0 }, /* Enable EZConfig updates */
37 { "ezc_version", "1", 0 }, /* EZConfig version */
38 { "is_default", "1", 0 }, /* is it default setting: 1:yes 0:no*/
39 { "os_server", "", 0 }, /* URL for getting upgrades */
40 { "stats_server", "", 0 }, /* URL for posting stats */
41 { "console_loglevel", "1", 0 }, /* Kernel panics only */
42
43 /* Big switches */
44 { "router_disable", "0", 0 }, /* lan_proto=static lan_stp=0 wan_proto=disabled */
45 { "fw_disable", "0", 0 }, /* Disable firewall (allow new connections from the WAN) */
46
47 { "log_ipaddr", "", 0 }, /* syslog recipient */
48
49 /* LAN H/W parameters */
50 { "lan_ifname", "", 0 }, /* LAN interface name */
51 { "lan_ifnames", "", 0 }, /* Enslaved LAN interfaces */
52 { "lan_hwnames", "", 0 }, /* LAN driver names (e.g. et0) */
53 { "lan_hwaddr", "", 0 }, /* LAN interface MAC address */
54
55 /* LAN TCP/IP parameters */
56 { "lan_proto", "dhcp", 0 }, /* [static|dhcp] */
57 { "lan_ipaddr", "192.168.1.1", 0 }, /* LAN IP address */
58 { "lan_netmask", "255.255.255.0", 0 }, /* LAN netmask */
59 { "lan_stp", "0", 0 }, /* LAN spanning tree protocol */
60 { "lan_wins", "", 0 }, /* x.x.x.x x.x.x.x ... */
61 { "lan_domain", "", 0 }, /* LAN domain name */
62 { "lan_lease", "86400", 0 }, /* LAN lease time in seconds */
63
64 /* WAN H/W parameters */
65 { "wan_ifname", "", 0 }, /* WAN interface name */
66 { "wan_ifnames", "", 0 }, /* WAN interface names */
67 { "wan_hwname", "", 0 }, /* WAN driver name (e.g. et1) */
68 { "wan_hwaddr", "", 0 }, /* WAN interface MAC address */
69
70 /* WAN TCP/IP parameters */
71 { "wan_proto", "dhcp", 0 }, /* [static|dhcp|pppoe|disabled] */
72 { "wan_ipaddr", "0.0.0.0", 0 }, /* WAN IP address */
73 { "wan_netmask", "0.0.0.0", 0 }, /* WAN netmask */
74 { "wan_gateway", "0.0.0.0", 0 }, /* WAN gateway */
75 { "wan_dns", "", 0 }, /* x.x.x.x x.x.x.x ... */
76 { "wan_wins", "", 0 }, /* x.x.x.x x.x.x.x ... */
77 { "wan_hostname", "", 0 }, /* WAN hostname */
78 { "wan_domain", "", 0 }, /* WAN domain name */
79 { "wan_lease", "86400", 0 }, /* WAN lease time in seconds */
80
81 /* PPPoE parameters */
82 { "wan_pppoe_ifname", "", 0 }, /* PPPoE enslaved interface */
83 { "wan_pppoe_username", "", 0 }, /* PPP username */
84 { "wan_pppoe_passwd", "", 0 }, /* PPP password */
85 { "wan_pppoe_idletime", "60", 0 }, /* Dial on demand max idle time (seconds) */
86 { "wan_pppoe_keepalive", "0", 0 }, /* Restore link automatically */
87 { "wan_pppoe_demand", "0", 0 }, /* Dial on demand */
88 { "wan_pppoe_mru", "1492", 0 }, /* Negotiate MRU to this value */
89 { "wan_pppoe_mtu", "1492", 0 }, /* Negotiate MTU to the smaller of this value or the peer MRU */
90 { "wan_pppoe_service", "", 0 }, /* PPPoE service name */
91 { "wan_pppoe_ac", "", 0 }, /* PPPoE access concentrator name */
92
93 /* Misc WAN parameters */
94 { "wan_desc", "", 0 }, /* WAN connection description */
95 { "wan_route", "", 0 }, /* Static routes (ipaddr:netmask:gateway:metric:ifname ...) */
96 { "wan_primary", "0", 0 }, /* Primary wan connection */
97
98 { "wan_unit", "0", 0 }, /* Last configured connection */
99
100 /* Filters */
101 { "filter_maclist", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */
102 { "filter_macmode", "deny", 0 }, /* "allow" only, "deny" only, or "disabled" (allow all) */
103 { "filter_client0", "", 0 }, /* [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc */
104
105 /* Port forwards */
106 { "dmz_ipaddr", "", 0 }, /* x.x.x.x (equivalent to 0-60999>dmz_ipaddr:0-60999) */
107 { "forward_port0", "", 0 }, /* wan_port0-wan_port1>lan_ipaddr:lan_port0-lan_port1[:,]proto[:,]enable[:,]desc */
108 { "autofw_port0", "", 0 }, /* out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc */
109
110 /* DHCP server parameters */
111 { "dhcp_start", "192.168.1.100", 0 }, /* First assignable DHCP address */
112 { "dhcp_end", "192.168.1.150", 0 }, /* Last assignable DHCP address */
113 { "dhcp_domain", "wan", 0 }, /* Use WAN domain name first if available (wan|lan) */
114 { "dhcp_wins", "wan", 0 }, /* Use WAN WINS first if available (wan|lan) */
115
116 /* Web server parameters */
117 { "http_username", "", 0 }, /* Username */
118 { "http_passwd", "admin", 0 }, /* Password */
119 { "http_wanport", "", 0 }, /* WAN port to listen on */
120 { "http_lanport", "80", 0 }, /* LAN port to listen on */
121
122 /* Wireless parameters */
123 { "wl_ifname", "", 0 }, /* Interface name */
124 { "wl_hwaddr", "", 0 }, /* MAC address */
125 { "wl_phytype", "g", 0 }, /* Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) */
126 { "wl_corerev", "", 0 }, /* Current core revision */
127 { "wl_phytypes", "", 0 }, /* List of supported wireless bands (e.g. "ga") */
128 { "wl_radioids", "", 0 }, /* List of radio IDs */
129 { "wl_ssid", "OpenWrt", 0 }, /* Service set ID (network name) */
130 { "wl_country", "", 0 }, /* Country (default obtained from driver) */
131 { "wl_radio", "1", 0 }, /* Enable (1) or disable (0) radio */
132 { "wl_closed", "0", 0 }, /* Closed (hidden) network */
133 { "wl_ap_isolate", "0", 0 }, /* AP isolate mode */
134 { "wl_mode", "ap", 0 }, /* AP mode (ap|sta|wds) */
135 { "wl_lazywds", "0", 0 }, /* Enable "lazy" WDS mode (0|1) */
136 { "wl_wds", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */
137 { "wl_wep", "disabled", 0 }, /* WEP data encryption (enabled|disabled) */
138 { "wl_auth", "0", 0 }, /* Shared key authentication optional (0) or required (1) */
139 { "wl_key", "1", 0 }, /* Current WEP key */
140 { "wl_key1", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */
141 { "wl_key2", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */
142 { "wl_key3", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */
143 { "wl_key4", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */
144 { "wl_maclist", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */
145 { "wl_macmode", "disabled", 0 }, /* "allow" only, "deny" only, or "disabled" (allow all) */
146 { "wl_channel", "11", 0 }, /* Channel number */
147 { "wl_rate", "0", 0 }, /* Rate (bps, 0 for auto) */
148 { "wl_rateset", "default", 0 }, /* "default" or "all" or "12" */
149 { "wl_frag", "2346", 0 }, /* Fragmentation threshold */
150 { "wl_rts", "2347", 0 }, /* RTS threshold */
151 { "wl_dtim", "1", 0 }, /* DTIM period */
152 { "wl_bcn", "100", 0 }, /* Beacon interval */
153 { "wl_plcphdr", "long", 0 }, /* 802.11b PLCP preamble type */
154 { "wl_net_mode", "mixed", 0 }, /* 54g mode */
155 { "wl_gmode", "6", 0 }, /* 54g mode */
156 { "wl_gmode_protection", "auto", 0 }, /* 802.11g RTS/CTS protection (off|auto) */
157 { "wl_afterburner", "auto", 0 }, /* AfterBurner */
158 { "wl_frameburst", "off", 0 }, /* BRCM Frambursting mode (off|on) */
159 { "wl_antdiv", "-1", 0 }, /* Antenna Diversity (-1|0|1|3) */
160 { "wl_infra", "1", 0 }, /* Network Type (BSS/IBSS) */
161
162 /* WPA parameters */
163 { "security_mode", "open", 0 },
164 { "wl_auth_mode", "open", 0 }, /* Network authentication mode (open|shared|radius|wpa|psk) */
165 { "wl_wpa_psk", "", 0 }, /* WPA pre-shared key */
166 { "wl_wpa_gtk_rekey", "3600", 0 }, /* GTK rotation interval */
167 { "wl_radius_ipaddr", "", 0 }, /* RADIUS server IP address */
168 { "wl_radius_key", "", 0 }, /* RADIUS shared secret */
169 { "wl_radius_port", "1812", 0 }, /* RADIUS server UDP port */
170 { "wl_crypto", "tkip", 0 }, /* WPA data encryption */
171
172
173 { "wl_unit", "0", 0 }, /* Last configured interface */
174
175 /* Restore defaults */
176 { "restore_defaults", "0", 0 }, /* Set to 0 to not restore defaults on boot */
177
178 { 0, 0, 0 }
179 };
This page took 0.059343 seconds and 3 git commands to generate.