modules/admin-core: extend network scheme to cover ipv6 routes and metric options
[project/luci.git] / modules / admin-core / root / lib / uci / schema / default / network
1 package network
2
3 config package
4 option title 'Network configuration'
5
6 config section
7 option name 'interface'
8 option title 'Network interface'
9 option package 'network'
10 list depends 'proto=static, ipaddr, netmask'
11 list depends 'proto=static, ip6addr'
12 list depends 'proto=pppoe, username, password'
13 list depends 'proto=ppp, device'
14 list depends 'proto=3g, device'
15 list depends 'proto=pptp, username, password, server'
16 list depends 'proto=dhcp'
17 list depends 'proto=none'
18 option named 'true'
19 option required 'true'
20
21 config variable
22 option name 'ifname'
23 option title 'Physical interface'
24 option section 'network.interface'
25
26 config variable
27 option name 'macaddr'
28 option title 'Interface MAC address'
29 option section 'network.interface'
30 option datatype 'macaddr'
31
32 config variable
33 option name 'mtu'
34 option title 'MTU'
35 option section 'network.interface'
36 option datatype 'uint'
37
38 config variable
39 option name 'ipaddr'
40 option title 'IPv4 host address'
41 option section 'network.interface'
42 option datatype 'ip4addr'
43
44 config variable
45 option name 'netmask'
46 option title 'IPv4 network mask'
47 option section 'network.interface'
48 option datatype 'ip4addr'
49
50 config variable
51 option name 'gateway'
52 option title 'IPv4 gateway'
53 option section 'network.interface'
54 option datatype 'ip4addr'
55
56 config variable
57 option name 'bcast'
58 option title 'IPv4 broadcast address'
59 option section 'network.interface'
60 option datatype 'ip4addr'
61
62 config variable
63 option name 'ip6addr'
64 option title 'IPv6 address (CIDR)'
65 option section 'network.interface'
66 option datatype 'ip6addr'
67
68 config variable
69 option name 'ip6gw'
70 option title 'IPv6 gateway'
71 option section 'network.interface'
72 option datatype 'ip6addr'
73
74 config variable
75 option name 'dns'
76 option title 'DNS server (IPv4 or IPv6)'
77 option section 'network.interface'
78 option datatype 'ipaddr'
79 option multival 'true'
80
81 config variable
82 option name 'keepalive'
83 option title 'keep-alive'
84 option description 'Number of connection failures before reconnect'
85 option section 'network.interface'
86 option datatype 'uint'
87 list depends 'proto=pppoe'
88 list depends 'proto=pptp'
89 list depends 'proto=ppp'
90 list depends 'proto=3g'
91
92 config variable
93 option name 'demand'
94 option title 'Dial on-demand'
95 option description 'Number of seconds to wait before closing the connection due to inactivity'
96 option section 'network.interface'
97 option datatype 'uint'
98 list depends 'proto=pppoe'
99 list depends 'proto=pptp'
100 list depends 'proto=ppp'
101 list depends 'proto=3g'
102
103 config variable
104 option name 'username'
105 option title 'Username'
106 option section 'network.interface'
107 option datatype 'string'
108 list depends 'proto=pppoe'
109 list depends 'proto=pptp'
110 list depends 'proto=ppp'
111 list depends 'proto=3g'
112
113 config variable
114 option name 'password'
115 option title 'Password'
116 option section 'network.interface'
117 option datatype 'string'
118 list depends 'proto=pppoe'
119 list depends 'proto=pptp'
120 list depends 'proto=ppp'
121 list depends 'proto=3g'
122
123 config variable
124 option name 'server'
125 option title 'PPTP server'
126 option section 'network.interface'
127 option datatype 'host'
128 list depends 'proto=pptp'
129
130 config variable
131 option name 'device'
132 option title 'Modem device'
133 option section 'network.interface'
134 option datatype 'device'
135 list depends 'proto=ppp'
136 list depends 'proto=3g'
137
138 config variable
139 option name 'defaultroute'
140 option title 'Replace default route'
141 option section 'network.interface'
142 option datatype 'boolean'
143 list depends 'proto=ppp'
144 list depends 'proto=3g'
145
146 config variable
147 option name 'peerdns'
148 option title 'Use peer DNS'
149 option section 'network.interface'
150 option datatype 'boolean'
151 list depends 'proto=ppp'
152 list depends 'proto=3g'
153
154 config variable
155 option name 'ipv6'
156 option title 'Enable IPv6 on PPP link'
157 option section 'network.interface'
158 option datatype 'boolean'
159 list depends 'proto=ppp'
160 list depends 'proto=3g'
161
162 config variable
163 option name 'connect'
164 option title 'PPP connect script'
165 option section 'network.interface'
166 option datatype 'file'
167 list depends 'proto=ppp'
168 list depends 'proto=3g'
169
170 config variable
171 option name 'disconnect'
172 option title 'PPP disconnect script'
173 option section 'network.interface'
174 option datatype 'file'
175 list depends 'proto=ppp'
176 list depends 'proto=3g'
177
178 config variable
179 option name 'pppd_options'
180 option title 'Additional PPP daemon options'
181 option section 'network.interface'
182 option datatype 'string'
183 list depends 'proto=ppp'
184 list depends 'proto=3g'
185
186 config variable
187 option name 'maxwait'
188 option title 'Setup wait time'
189 option description 'Number of seconds to wait for the device to become ready'
190 option section 'network.interface'
191 option datatype 'uint'
192 list depends 'proto=3g'
193
194 config variable
195 option name 'apn'
196 option title 'Access point (APN)'
197 option section 'network.interface'
198 option datatype 'string'
199 list depends 'proto=3g'
200
201 config variable
202 option name 'pincode'
203 option title 'PIN code'
204 option section 'network.interface'
205 option datatype 'uint'
206 list depends 'proto=3g'
207
208 config variable
209 option name 'service'
210 option title 'Service type'
211 option section 'network.interface'
212 option type 'enum'
213 list depends 'proto=3g'
214
215 config enum
216 option variable 'network.interface.service'
217 option value 'umts'
218 option title 'UMTS/GPRS'
219
220 config enum
221 option variable 'network.interface.service'
222 option value 'cdma'
223 option title 'CDMA'
224
225 config enum
226 option variable 'network.interface.service'
227 option value 'evdo'
228 option title 'EV-DO'
229
230 config variable
231 option name 'proto'
232 option title 'Protocol'
233 option section 'network.interface'
234 option type 'enum'
235 option required 'true'
236
237 config enum
238 option variable 'network.interface.proto'
239 option value 'none'
240 option title 'Disabled'
241
242 config enum
243 option variable 'network.interface.proto'
244 option value 'dhcp'
245 option title 'Retrieve IP address via DHCP'
246 option default 'true'
247
248 config enum
249 option variable 'network.interface.proto'
250 option value 'pptp'
251 option title 'Interface is a PPTP tunnel endpoint'
252
253 config enum
254 option variable 'network.interface.proto'
255 option value 'static'
256 option title 'Interface has static network configuration'
257
258 config enum
259 option variable 'network.interface.proto'
260 option value 'pppoe'
261 option title 'Interface is a PPPoE connection'
262
263 config enum
264 option variable 'network.interface.proto'
265 option value 'ppp'
266 option title 'Interface is a PPP connection'
267
268 config enum
269 option variable 'network.interface.proto'
270 option value '3g'
271 option title '3G UMTS/GPRS connection'
272
273 config variable
274 option name 'type'
275 option title 'Option type'
276 option section 'network.interface'
277 option type 'enum'
278
279 config enum
280 option variable 'network.interface.type'
281 option value 'bridge'
282 option title 'This is a bridge interface'
283
284
285
286 config section
287 option name 'alias'
288 option title 'Alias interface definition'
289 option package 'network'
290 list depends 'proto=static, ipaddr, netmask'
291 list depends 'proto=static, ip6addr'
292 option named 'true'
293
294 config variable
295 option name 'interface'
296 option title 'Parent interface'
297 option section 'network.alias'
298 option valueof 'network.interface'
299 option required 'true'
300
301 config variable
302 option name 'ipaddr'
303 option title 'IPv4 host address'
304 option section 'network.alias'
305 option datatype 'ip4addr'
306
307 config variable
308 option name 'netmask'
309 option title 'IPv4 network mask'
310 option section 'network.alias'
311 option datatype 'ip4addr'
312
313 config variable
314 option name 'gateway'
315 option title 'IPv4 gateway'
316 option section 'network.alias'
317 option datatype 'ip4addr'
318
319 config variable
320 option name 'bcast'
321 option title 'IPv4 broadcast address'
322 option section 'network.alias'
323 option datatype 'ip4addr'
324
325 config variable
326 option name 'ip6addr'
327 option title 'IPv6 address (CIDR)'
328 option section 'network.alias'
329 option datatype 'ip6addr'
330
331 config variable
332 option name 'ip6gw'
333 option title 'IPv6 gateway'
334 option section 'network.alias'
335 option datatype 'ip6addr'
336
337 config variable
338 option name 'dns'
339 option title 'DNS server (IPv4 or IPv6)'
340 option section 'network.alias'
341 option datatype 'ipaddr'
342
343 config variable
344 option name 'proto'
345 option title 'Protocol'
346 option section 'network.alias'
347 option type 'enum'
348 option required 'true'
349
350 config enum
351 option variable 'network.alias.proto'
352 option value 'static'
353 option title 'Interface has static network configuration'
354
355
356
357 config section
358 option name 'route'
359 option title 'Static route definition'
360 option package 'network'
361
362 config variable
363 option name 'interface'
364 option title 'Interface'
365 option section 'network.route'
366 option valueof 'network.interface'
367 option required 'true'
368
369 config variable
370 option name 'target'
371 option title 'Target IPv4 host or network'
372 option section 'network.route'
373 option datatype 'ip4addr'
374 option required 'true'
375
376 config variable
377 option name 'netmask'
378 option title 'Target IPv4 netmask'
379 option section 'network.route'
380 option datatype 'ip4addr'
381
382 config variable
383 option name 'gateway'
384 option title 'IPv4 gateway'
385 option section 'network.route'
386 option datatype 'ip4addr'
387 option required 'true'
388
389 config variable
390 option name 'metric'
391 option title 'Metric'
392 option section 'network.route6'
393 option datatype 'uint'
394
395
396
397 config section
398 option name 'route6'
399 option title 'Static IPv6 route definition'
400 option package 'network'
401
402 config variable
403 option name 'interface'
404 option title 'Interface'
405 option section 'network.route6'
406 option valueof 'network.interface'
407 option required 'true'
408
409 config variable
410 option name 'target'
411 option title 'Target IPv6 host or network (CIDR)'
412 option section 'network.route6'
413 option datatype 'ip6addr'
414 option required 'true'
415
416 config variable
417 option name 'gateway'
418 option title 'IPv6 gateway'
419 option section 'network.route6'
420 option datatype 'ip6addr'
421 option required 'true'
422
423 config variable
424 option name 'metric'
425 option title 'Metric'
426 option section 'network.route6'
427 option datatype 'uint'
428
429
430
431 config section
432 option name 'switch'
433 option title 'Section switch'
434 option package 'network'
435 option named 'true'
436 option dynamic 'true'
437 option required 'true'